@excalidraw/common 0.18.0-143b5b6 → 0.18.0-1440f2d

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 (119) hide show
  1. package/dist/dev/index.js +28 -18
  2. package/dist/dev/index.js.map +3 -3
  3. package/dist/prod/index.js +3 -3
  4. package/dist/types/common/src/constants.d.ts +1 -0
  5. package/dist/types/common/src/utils.d.ts +7 -1
  6. package/dist/types/element/src/align.d.ts +4 -1
  7. package/dist/types/element/src/binding.d.ts +62 -0
  8. package/dist/types/element/src/bounds.d.ts +10 -2
  9. package/dist/types/element/src/collision.d.ts +7 -0
  10. package/dist/types/element/src/cropElement.d.ts +36 -4
  11. package/dist/types/element/src/delta.d.ts +7 -1
  12. package/dist/types/element/src/distribute.d.ts +4 -1
  13. package/dist/types/element/src/dragElements.d.ts +8 -3
  14. package/dist/types/element/src/elbowArrow.d.ts +5 -0
  15. package/dist/types/element/src/embeddable.d.ts +2 -1
  16. package/dist/types/element/src/flowchart.d.ts +1 -7
  17. package/dist/types/element/src/frame.d.ts +19 -1
  18. package/dist/types/element/src/groups.d.ts +1 -6
  19. package/dist/types/element/src/image.d.ts +5 -2
  20. package/dist/types/element/src/index.d.ts +1 -0
  21. package/dist/types/element/src/linearElementEditor.d.ts +4 -1
  22. package/dist/types/element/src/listMarker.d.ts +7 -2
  23. package/dist/types/element/src/newElement.d.ts +3 -1
  24. package/dist/types/element/src/renderElement.d.ts +10 -0
  25. package/dist/types/element/src/renderEnvironment.d.ts +66 -0
  26. package/dist/types/element/src/resizeElements.d.ts +15 -5
  27. package/dist/types/element/src/selection.d.ts +1 -7
  28. package/dist/types/element/src/shape.d.ts +2 -0
  29. package/dist/types/element/src/stickyNote.d.ts +8 -0
  30. package/dist/types/element/src/textElement.d.ts +3 -2
  31. package/dist/types/element/src/textMeasurements.d.ts +15 -11
  32. package/dist/types/element/src/textWrapping.d.ts +3 -2
  33. package/dist/types/element/src/transform.d.ts +5 -1
  34. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +3 -0
  35. package/dist/types/excalidraw/actions/actionBoundText.d.ts +47 -221
  36. package/dist/types/excalidraw/actions/actionCanvas.d.ts +9 -5
  37. package/dist/types/excalidraw/actions/actionClipboard.d.ts +2 -0
  38. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +1 -0
  39. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +4 -588
  40. package/dist/types/excalidraw/actions/actionDeselect.d.ts +1 -0
  41. package/dist/types/excalidraw/actions/actionElementLink.d.ts +1 -0
  42. package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -0
  43. package/dist/types/excalidraw/actions/actionExport.d.ts +4 -2
  44. package/dist/types/excalidraw/actions/actionFrame.d.ts +44 -525
  45. package/dist/types/excalidraw/actions/actionGroup.d.ts +2 -0
  46. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +1 -0
  47. package/dist/types/excalidraw/actions/actionLink.d.ts +1 -0
  48. package/dist/types/excalidraw/actions/actionMenu.d.ts +1 -0
  49. package/dist/types/excalidraw/actions/actionProperties.d.ts +2 -0
  50. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +1 -0
  51. package/dist/types/excalidraw/actions/actionStyles.d.ts +1 -0
  52. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +1 -0
  53. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -0
  54. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +1 -0
  55. package/dist/types/excalidraw/actions/actionToggleMinimap.d.ts +201 -0
  56. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -0
  57. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +1 -0
  58. package/dist/types/excalidraw/actions/actionToggleShowHints.d.ts +1 -0
  59. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -0
  60. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -0
  61. package/dist/types/excalidraw/actions/actionToggleWrap.d.ts +12 -0
  62. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +1 -0
  63. package/dist/types/excalidraw/actions/index.d.ts +2 -0
  64. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  65. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  66. package/dist/types/excalidraw/appState.d.ts +3 -2
  67. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -1
  68. package/dist/types/excalidraw/charts/charts.helpers.d.ts +6 -5
  69. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -1
  70. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -1
  71. package/dist/types/excalidraw/charts/index.d.ts +2 -1
  72. package/dist/types/excalidraw/components/Actions.d.ts +9 -2
  73. package/dist/types/excalidraw/components/App.d.ts +23 -8
  74. package/dist/types/excalidraw/components/App.host.d.ts +102 -0
  75. package/dist/types/excalidraw/components/App.selection.d.ts +265 -0
  76. package/dist/types/excalidraw/components/App.selectionTool.d.ts +42 -6
  77. package/dist/types/excalidraw/components/App.viewport.d.ts +23 -3
  78. package/dist/types/excalidraw/components/App.wheel.d.ts +6 -2
  79. package/dist/types/excalidraw/components/App.wrap.d.ts +31 -0
  80. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -1
  81. package/dist/types/excalidraw/components/Minimap/Minimap.d.ts +15 -0
  82. package/dist/types/excalidraw/components/Minimap/MinimapAnnouncementDot.d.ts +10 -0
  83. package/dist/types/excalidraw/components/Minimap/minimap-controller.chunk.d.ts +90 -0
  84. package/dist/types/excalidraw/components/Minimap/minimap-shared.chunk.d.ts +122 -0
  85. package/dist/types/excalidraw/components/Minimap/minimap-worker.chunk.d.ts +12 -0
  86. package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -2
  87. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +2 -1
  88. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
  89. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +5 -2
  90. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +2 -1
  91. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +4 -1
  92. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +3 -2
  93. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +14 -1
  94. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +16 -0
  95. package/dist/types/excalidraw/components/Tooltip.d.ts +11 -1
  96. package/dist/types/excalidraw/components/TopPicksDnD/topPicksDnD.d.ts +1 -1
  97. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +0 -1
  98. package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
  99. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
  100. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +13 -2
  101. package/dist/types/excalidraw/components/icons.d.ts +1 -0
  102. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -0
  103. package/dist/types/excalidraw/data/blob.d.ts +6 -4
  104. package/dist/types/excalidraw/data/index.d.ts +3 -3
  105. package/dist/types/excalidraw/data/json.d.ts +3 -2
  106. package/dist/types/excalidraw/fonts/Fonts.d.ts +9 -6
  107. package/dist/types/excalidraw/history.d.ts +10 -4
  108. package/dist/types/excalidraw/mermaid.d.ts +7 -0
  109. package/dist/types/excalidraw/reactUtils.d.ts +1 -1
  110. package/dist/types/excalidraw/renderer/animation.d.ts +11 -4
  111. package/dist/types/excalidraw/renderer/staticScene.d.ts +11 -6
  112. package/dist/types/excalidraw/scene/Renderer.d.ts +1 -1
  113. package/dist/types/excalidraw/scene/export.d.ts +343 -20
  114. package/dist/types/excalidraw/scene/types.d.ts +23 -1
  115. package/dist/types/excalidraw/types.d.ts +48 -1
  116. package/dist/types/excalidraw/viewport.d.ts +1 -0
  117. package/dist/types/utils/src/index.d.ts +3 -1
  118. package/package.json +1 -1
  119. package/dist/types/utils/src/export.d.ts +0 -36
@@ -1,34 +1,26 @@
1
- import type { ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextElement } from "@excalidraw/element/types";
2
- import type { Mutable } from "@excalidraw/common/utility-types";
3
- import type { AppState } from "../types";
1
+ import type { Scene } from "@excalidraw/element";
2
+ import type { ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextContainer, ExcalidrawTextElement, ExcalidrawTextElementWithContainer, NonDeleted, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
3
+ import type { ActionResult } from "./types";
4
+ import type { AppClassProperties, AppState } from "../types";
5
+ /**
6
+ * Frees the container's text as it rendered: wrapped the same, at a fixed
7
+ * width.
8
+ */
9
+ export declare const unbindTextFromContainer: (container: ExcalidrawElement, boundTextElement: ExcalidrawTextElementWithContainer, scene: Scene) => void;
4
10
  export declare const actionUnbindText: {
5
11
  name: "unbindText";
6
12
  label: string;
7
13
  trackEvent: {
8
14
  category: "element";
9
15
  };
10
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
11
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
16
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
17
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
12
18
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
13
- appState: Readonly<AppState>;
14
- captureUpdate: "IMMEDIATELY";
15
- };
16
- } & {
17
- keyTest?: undefined;
18
- };
19
- export declare const actionBindText: {
20
- name: "bindText";
21
- label: string;
22
- trackEvent: {
23
- category: "element";
24
- };
25
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
26
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
27
- elements: ExcalidrawElement[];
28
19
  appState: {
29
- selectedElementIds: {
30
- [x: string]: true;
31
- };
20
+ selectedElementIds: AppState["selectedElementIds"];
21
+ selectedGroupIds: AppState["selectedGroupIds"];
22
+ editingGroupId: AppState["editingGroupId"];
23
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
32
24
  contextMenu: {
33
25
  items: import("../components/ContextMenu").ContextMenuItems;
34
26
  top: number;
@@ -38,13 +30,13 @@ export declare const actionBindText: {
38
30
  isLoading: boolean;
39
31
  errorMessage: React.ReactNode;
40
32
  activeEmbeddable: {
41
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
33
+ element: NonDeletedExcalidrawElement;
42
34
  state: "hover" | "active";
43
35
  } | null;
44
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
45
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
46
- multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
47
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
36
+ newElement: NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
37
+ resizingElement: NonDeletedExcalidrawElement | null;
38
+ multiElement: NonDeleted<ExcalidrawLinearElement> | null;
39
+ selectionElement: NonDeletedExcalidrawElement | null;
48
40
  isBindingEnabled: boolean;
49
41
  boxSelectionMode: import("../types").BoxSelectionMode;
50
42
  bindingPreference: "enabled" | "disabled";
@@ -52,7 +44,7 @@ export declare const actionBindText: {
52
44
  showHints: boolean;
53
45
  inputDevice: import("../types").InputDevice;
54
46
  suggestedBinding: {
55
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
47
+ element: NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
56
48
  midPoint?: import("@excalidraw/math").GlobalPoint;
57
49
  } | null;
58
50
  textToolHover: {
@@ -66,7 +58,7 @@ export declare const actionBindText: {
66
58
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
67
59
  anchor: "start" | "end" | "label";
68
60
  } | null;
69
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
61
+ frameToHighlight: NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
70
62
  frameRendering: {
71
63
  enabled: boolean;
72
64
  name: boolean;
@@ -74,7 +66,7 @@ export declare const actionBindText: {
74
66
  clip: boolean;
75
67
  };
76
68
  editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
77
- elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
69
+ elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
78
70
  editingTextElement: ExcalidrawTextElement | null;
79
71
  activeTool: {
80
72
  lastActiveTool: import("../types").ActiveTool | null;
@@ -158,15 +150,12 @@ export declare const actionBindText: {
158
150
  duration?: number;
159
151
  } | null;
160
152
  zenModeEnabled: boolean;
153
+ minimapEnabled: boolean;
161
154
  theme: import("@excalidraw/element/types").Theme;
162
155
  gridSize: number;
163
156
  gridStep: number;
164
157
  gridModeEnabled: boolean;
165
158
  viewModeEnabled: boolean;
166
- selectedGroupIds: {
167
- [groupId: string]: boolean;
168
- };
169
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
170
159
  width: number;
171
160
  height: number;
172
161
  offsetTop: number;
@@ -178,7 +167,6 @@ export declare const actionBindText: {
178
167
  panels: number;
179
168
  };
180
169
  showHyperlinkPopup: false | "info" | "editor";
181
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
182
170
  snapLines: readonly import("../snapping").SnapLine[];
183
171
  originSnapOffset: {
184
172
  x: number;
@@ -210,197 +198,35 @@ export declare const actionBindText: {
210
198
  } & {
211
199
  keyTest?: undefined;
212
200
  };
201
+ export declare const actionBindText: {
202
+ name: "bindText";
203
+ label: string;
204
+ trackEvent: {
205
+ category: "element";
206
+ };
207
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
208
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => ActionResult;
209
+ } & {
210
+ keyTest?: undefined;
211
+ };
212
+ /**
213
+ * A note and its label share one ink: the text the user styled wins, unless it
214
+ * is transparent (a note's label never is).
215
+ */
216
+ export declare const getStickyNoteInk: (textElement: ExcalidrawTextElement, container: ExcalidrawElement) => string | null;
217
+ /** binds the text to the (label-less) container, selecting the container */
218
+ export declare const bindTextToContainer: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, textElement: ExcalidrawTextElement, container: NonDeleted<ExcalidrawTextContainer>, app: AppClassProperties) => ActionResult;
219
+ export declare const pushContainerBelowText: (elements: readonly ExcalidrawElement[], container: ExcalidrawElement, textElement: ExcalidrawTextElement) => ExcalidrawElement[];
213
220
  export declare const actionWrapTextInContainer: {
214
221
  name: "wrapTextInContainer";
215
222
  label: string;
216
223
  trackEvent: {
217
224
  category: "element";
218
225
  };
219
- predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
220
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
221
- elements: readonly ExcalidrawElement[];
222
- appState: {
223
- selectedElementIds: Mutable<Readonly<{
224
- [id: string]: true;
225
- }>>;
226
- contextMenu: {
227
- items: import("../components/ContextMenu").ContextMenuItems;
228
- top: number;
229
- left: number;
230
- } | null;
231
- showWelcomeScreen: boolean;
232
- isLoading: boolean;
233
- errorMessage: React.ReactNode;
234
- activeEmbeddable: {
235
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
236
- state: "hover" | "active";
237
- } | null;
238
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
239
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
240
- multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
241
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
242
- isBindingEnabled: boolean;
243
- boxSelectionMode: import("../types").BoxSelectionMode;
244
- bindingPreference: "enabled" | "disabled";
245
- isMidpointSnappingEnabled: boolean;
246
- showHints: boolean;
247
- inputDevice: import("../types").InputDevice;
248
- suggestedBinding: {
249
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
250
- midPoint?: import("@excalidraw/math").GlobalPoint;
251
- } | null;
252
- textToolHover: {
253
- type: "text";
254
- elementId: ExcalidrawElement["id"];
255
- } | {
256
- type: "container";
257
- elementId: ExcalidrawElement["id"];
258
- } | {
259
- type: "arrow";
260
- elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
261
- anchor: "start" | "end" | "label";
262
- } | null;
263
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
264
- frameRendering: {
265
- enabled: boolean;
266
- name: boolean;
267
- outline: boolean;
268
- clip: boolean;
269
- };
270
- editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
271
- elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
272
- editingTextElement: ExcalidrawTextElement | null;
273
- activeTool: {
274
- lastActiveTool: import("../types").ActiveTool | null;
275
- locked: boolean;
276
- fromSelection: boolean;
277
- } & import("../types").ActiveTool;
278
- preferredSelectionTool: {
279
- type: "selection" | "lasso";
280
- initialized: boolean;
281
- };
282
- penMode: boolean;
283
- penDetected: boolean;
284
- exportBackground: boolean;
285
- exportEmbedScene: boolean;
286
- exportWithDarkMode: boolean;
287
- exportScale: number;
288
- currentItemStrokeColor: string;
289
- currentItemStickynoteStrokeColor: string;
290
- currentItemStickynoteBackgroundColor: string;
291
- currentItemBackgroundColor: string;
292
- currentItemFillStyle: ExcalidrawElement["fillStyle"];
293
- currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
294
- currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
295
- currentItemRoughness: number;
296
- currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
297
- currentItemOpacity: number;
298
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
299
- currentItemFontSize: number;
300
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
301
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
302
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
303
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
304
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
305
- currentItemArrowType: "sharp" | "round" | "elbow";
306
- viewBackgroundColor: string;
307
- scrollX: number;
308
- scrollY: number;
309
- scrollConstraints: import("../types").ScrollConstraints | null;
310
- cursorButton: "up" | "down";
311
- scrolledOutside: boolean;
312
- name: string | null;
313
- isResizing: boolean;
314
- isRotating: boolean;
315
- zoom: import("../types").Zoom;
316
- openMenu: "canvas" | null;
317
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
318
- openSidebar: {
319
- name: import("../types").SidebarName;
320
- tab?: import("../types").SidebarTabName;
321
- } | null;
322
- openDialog: null | {
323
- name: "imageExport" | "help" | "jsonExport";
324
- } | {
325
- name: "ttd";
326
- tab: "text-to-diagram" | "mermaid";
327
- } | {
328
- name: "commandPalette";
329
- } | {
330
- name: "settings";
331
- } | {
332
- name: "elementLinkSelector";
333
- sourceElementId: ExcalidrawElement["id"];
334
- } | {
335
- name: "charts";
336
- data: import("../charts").Spreadsheet;
337
- rawText: string;
338
- };
339
- defaultSidebarDockedPreference: boolean;
340
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
341
- hoveredElementIds: Readonly<{
342
- [id: string]: true;
343
- }>;
344
- previousSelectedElementIds: {
345
- [id: string]: true;
346
- };
347
- selectedElementsAreBeingDragged: boolean;
348
- shouldCacheIgnoreZoom: boolean;
349
- toast: {
350
- message: React.ReactNode;
351
- closable?: boolean;
352
- duration?: number;
353
- } | null;
354
- zenModeEnabled: boolean;
355
- theme: import("@excalidraw/element/types").Theme;
356
- gridSize: number;
357
- gridStep: number;
358
- gridModeEnabled: boolean;
359
- viewModeEnabled: boolean;
360
- selectedGroupIds: {
361
- [groupId: string]: boolean;
362
- };
363
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
364
- width: number;
365
- height: number;
366
- offsetTop: number;
367
- offsetLeft: number;
368
- fileHandle: FileSystemFileHandle | null;
369
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
370
- stats: {
371
- open: boolean;
372
- panels: number;
373
- };
374
- showHyperlinkPopup: false | "info" | "editor";
375
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
376
- snapLines: readonly import("../snapping").SnapLine[];
377
- originSnapOffset: {
378
- x: number;
379
- y: number;
380
- } | null;
381
- objectsSnapModeEnabled: boolean;
382
- isCropping: boolean;
383
- croppingElementId: ExcalidrawElement["id"] | null;
384
- searchMatches: Readonly<{
385
- focusedId: ExcalidrawElement["id"] | null;
386
- matches: readonly import("../types").SearchMatch[];
387
- }> | null;
388
- activeLockedId: string | null;
389
- lockedMultiSelections: {
390
- [groupId: string]: true;
391
- };
392
- bindMode: import("@excalidraw/element/types").BindMode;
393
- colorTopPicks: {
394
- elementStroke: readonly string[] | null;
395
- elementBackground: readonly string[] | null;
396
- bucketFill: readonly string[] | null;
397
- stickyNoteStroke: readonly string[] | null;
398
- stickyNoteBackground: readonly string[] | null;
399
- };
400
- fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
401
- };
402
- captureUpdate: "IMMEDIATELY";
403
- };
226
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
227
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => ActionResult;
404
228
  } & {
405
229
  keyTest?: undefined;
406
230
  };
231
+ /** wraps each (unbound) text in a new container, selecting the containers */
232
+ export declare const wrapTextsInContainers: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, textElements: readonly ExcalidrawTextElement[], app: AppClassProperties) => ActionResult;
@@ -45,6 +45,8 @@ export declare const actionClearCanvas: {
45
45
  objectsSnapModeEnabled: boolean;
46
46
  name: string | null;
47
47
  currentItemArrowType: "sharp" | "round" | "elbow";
48
+ scrollX: number;
49
+ scrollY: number;
48
50
  contextMenu: {
49
51
  items: import("../components/ContextMenu").ContextMenuItems;
50
52
  top: number;
@@ -116,8 +118,6 @@ export declare const actionClearCanvas: {
116
118
  currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
117
119
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
118
120
  viewBackgroundColor: string;
119
- scrollX: number;
120
- scrollY: number;
121
121
  scrollConstraints: import("../types").ScrollConstraints | null;
122
122
  cursorButton: "up" | "down";
123
123
  scrolledOutside: boolean;
@@ -164,6 +164,7 @@ export declare const actionClearCanvas: {
164
164
  closable?: boolean;
165
165
  duration?: number;
166
166
  } | null;
167
+ minimapEnabled: boolean;
167
168
  selectedGroupIds: {
168
169
  [groupId: string]: boolean;
169
170
  };
@@ -338,6 +339,7 @@ export declare const actionZoomIn: {
338
339
  duration?: number;
339
340
  } | null;
340
341
  zenModeEnabled: boolean;
342
+ minimapEnabled: boolean;
341
343
  theme: import("@excalidraw/element/types").Theme;
342
344
  gridSize: number;
343
345
  gridStep: number;
@@ -387,7 +389,6 @@ export declare const actionZoomIn: {
387
389
  };
388
390
  captureUpdate: "EVENTUALLY";
389
391
  };
390
- PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
391
392
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
392
393
  } & {
393
394
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -536,6 +537,7 @@ export declare const actionZoomOut: {
536
537
  duration?: number;
537
538
  } | null;
538
539
  zenModeEnabled: boolean;
540
+ minimapEnabled: boolean;
539
541
  theme: import("@excalidraw/element/types").Theme;
540
542
  gridSize: number;
541
543
  gridStep: number;
@@ -585,7 +587,6 @@ export declare const actionZoomOut: {
585
587
  };
586
588
  captureUpdate: "EVENTUALLY";
587
589
  };
588
- PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
589
590
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
590
591
  } & {
591
592
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -734,6 +735,7 @@ export declare const actionResetZoom: {
734
735
  duration?: number;
735
736
  } | null;
736
737
  zenModeEnabled: boolean;
738
+ minimapEnabled: boolean;
737
739
  theme: import("@excalidraw/element/types").Theme;
738
740
  gridSize: number;
739
741
  gridStep: number;
@@ -783,7 +785,6 @@ export declare const actionResetZoom: {
783
785
  };
784
786
  captureUpdate: "EVENTUALLY";
785
787
  };
786
- PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
787
788
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
788
789
  } & {
789
790
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -932,6 +933,7 @@ export declare const actionZoomToFitSelectionInViewport: {
932
933
  duration?: number;
933
934
  } | null;
934
935
  zenModeEnabled: boolean;
936
+ minimapEnabled: boolean;
935
937
  theme: import("@excalidraw/element/types").Theme;
936
938
  gridSize: number;
937
939
  gridStep: number;
@@ -1129,6 +1131,7 @@ export declare const actionZoomToFitSelection: {
1129
1131
  duration?: number;
1130
1132
  } | null;
1131
1133
  zenModeEnabled: boolean;
1134
+ minimapEnabled: boolean;
1132
1135
  theme: import("@excalidraw/element/types").Theme;
1133
1136
  gridSize: number;
1134
1137
  gridStep: number;
@@ -1326,6 +1329,7 @@ export declare const actionZoomToFit: {
1326
1329
  duration?: number;
1327
1330
  } | null;
1328
1331
  zenModeEnabled: boolean;
1332
+ minimapEnabled: boolean;
1329
1333
  theme: import("@excalidraw/element/types").Theme;
1330
1334
  gridSize: number;
1331
1335
  gridStep: number;
@@ -142,6 +142,7 @@ export declare const actionPaste: {
142
142
  duration?: number;
143
143
  } | null;
144
144
  zenModeEnabled: boolean;
145
+ minimapEnabled: boolean;
145
146
  theme: import("@excalidraw/element/types").Theme;
146
147
  gridSize: number;
147
148
  gridStep: number;
@@ -374,6 +375,7 @@ export declare const actionCopyAsPng: {
374
375
  duration?: number;
375
376
  } | null;
376
377
  zenModeEnabled: boolean;
378
+ minimapEnabled: boolean;
377
379
  theme: import("@excalidraw/element/types").Theme;
378
380
  gridSize: number;
379
381
  gridStep: number;
@@ -143,6 +143,7 @@ export declare const actionToggleCropEditor: {
143
143
  duration?: number;
144
144
  } | null;
145
145
  zenModeEnabled: boolean;
146
+ minimapEnabled: boolean;
146
147
  theme: import("@excalidraw/element/types").Theme;
147
148
  gridSize: number;
148
149
  gridStep: number;