@excalidraw/math 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 (116) hide show
  1. package/dist/types/common/src/constants.d.ts +1 -0
  2. package/dist/types/common/src/utils.d.ts +7 -1
  3. package/dist/types/element/src/align.d.ts +4 -1
  4. package/dist/types/element/src/binding.d.ts +62 -0
  5. package/dist/types/element/src/bounds.d.ts +10 -2
  6. package/dist/types/element/src/collision.d.ts +7 -0
  7. package/dist/types/element/src/cropElement.d.ts +36 -4
  8. package/dist/types/element/src/delta.d.ts +7 -1
  9. package/dist/types/element/src/distribute.d.ts +4 -1
  10. package/dist/types/element/src/dragElements.d.ts +8 -3
  11. package/dist/types/element/src/elbowArrow.d.ts +5 -0
  12. package/dist/types/element/src/embeddable.d.ts +2 -1
  13. package/dist/types/element/src/flowchart.d.ts +1 -7
  14. package/dist/types/element/src/frame.d.ts +19 -1
  15. package/dist/types/element/src/groups.d.ts +1 -6
  16. package/dist/types/element/src/image.d.ts +5 -2
  17. package/dist/types/element/src/index.d.ts +1 -0
  18. package/dist/types/element/src/linearElementEditor.d.ts +4 -1
  19. package/dist/types/element/src/listMarker.d.ts +7 -2
  20. package/dist/types/element/src/newElement.d.ts +3 -1
  21. package/dist/types/element/src/renderElement.d.ts +10 -0
  22. package/dist/types/element/src/renderEnvironment.d.ts +66 -0
  23. package/dist/types/element/src/resizeElements.d.ts +15 -5
  24. package/dist/types/element/src/selection.d.ts +1 -7
  25. package/dist/types/element/src/shape.d.ts +2 -0
  26. package/dist/types/element/src/stickyNote.d.ts +8 -0
  27. package/dist/types/element/src/textElement.d.ts +3 -2
  28. package/dist/types/element/src/textMeasurements.d.ts +15 -11
  29. package/dist/types/element/src/textWrapping.d.ts +3 -2
  30. package/dist/types/element/src/transform.d.ts +5 -1
  31. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +3 -0
  32. package/dist/types/excalidraw/actions/actionBoundText.d.ts +47 -221
  33. package/dist/types/excalidraw/actions/actionCanvas.d.ts +13 -9
  34. package/dist/types/excalidraw/actions/actionClipboard.d.ts +2 -0
  35. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +1 -0
  36. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +4 -588
  37. package/dist/types/excalidraw/actions/actionDeselect.d.ts +2 -1
  38. package/dist/types/excalidraw/actions/actionElementLink.d.ts +1 -0
  39. package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -0
  40. package/dist/types/excalidraw/actions/actionExport.d.ts +9 -7
  41. package/dist/types/excalidraw/actions/actionFrame.d.ts +44 -525
  42. package/dist/types/excalidraw/actions/actionGroup.d.ts +4 -2
  43. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +1 -0
  44. package/dist/types/excalidraw/actions/actionLink.d.ts +1 -0
  45. package/dist/types/excalidraw/actions/actionMenu.d.ts +1 -0
  46. package/dist/types/excalidraw/actions/actionProperties.d.ts +2 -0
  47. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +2 -1
  48. package/dist/types/excalidraw/actions/actionStyles.d.ts +1 -0
  49. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +1 -0
  50. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -0
  51. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +1 -0
  52. package/dist/types/excalidraw/actions/actionToggleMinimap.d.ts +201 -0
  53. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -0
  54. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +1 -0
  55. package/dist/types/excalidraw/actions/actionToggleShowHints.d.ts +1 -0
  56. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -0
  57. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -0
  58. package/dist/types/excalidraw/actions/actionToggleWrap.d.ts +12 -0
  59. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +1 -0
  60. package/dist/types/excalidraw/actions/index.d.ts +2 -0
  61. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  62. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  63. package/dist/types/excalidraw/appState.d.ts +8 -7
  64. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -1
  65. package/dist/types/excalidraw/charts/charts.helpers.d.ts +6 -5
  66. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -1
  67. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -1
  68. package/dist/types/excalidraw/charts/index.d.ts +2 -1
  69. package/dist/types/excalidraw/components/Actions.d.ts +9 -2
  70. package/dist/types/excalidraw/components/App.d.ts +23 -8
  71. package/dist/types/excalidraw/components/App.host.d.ts +102 -0
  72. package/dist/types/excalidraw/components/App.selection.d.ts +265 -0
  73. package/dist/types/excalidraw/components/App.selectionTool.d.ts +42 -6
  74. package/dist/types/excalidraw/components/App.viewport.d.ts +23 -3
  75. package/dist/types/excalidraw/components/App.wheel.d.ts +6 -2
  76. package/dist/types/excalidraw/components/App.wrap.d.ts +31 -0
  77. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -1
  78. package/dist/types/excalidraw/components/Minimap/Minimap.d.ts +15 -0
  79. package/dist/types/excalidraw/components/Minimap/MinimapAnnouncementDot.d.ts +10 -0
  80. package/dist/types/excalidraw/components/Minimap/minimap-controller.chunk.d.ts +90 -0
  81. package/dist/types/excalidraw/components/Minimap/minimap-shared.chunk.d.ts +122 -0
  82. package/dist/types/excalidraw/components/Minimap/minimap-worker.chunk.d.ts +12 -0
  83. package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -2
  84. package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +2 -1
  85. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
  86. package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +5 -2
  87. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +2 -1
  88. package/dist/types/excalidraw/components/TTDDialog/common.d.ts +4 -1
  89. package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +3 -2
  90. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +14 -1
  91. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +16 -0
  92. package/dist/types/excalidraw/components/Tooltip.d.ts +11 -1
  93. package/dist/types/excalidraw/components/TopPicksDnD/topPicksDnD.d.ts +1 -1
  94. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +0 -1
  95. package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
  96. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
  97. package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +13 -2
  98. package/dist/types/excalidraw/components/icons.d.ts +1 -0
  99. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -0
  100. package/dist/types/excalidraw/data/blob.d.ts +16 -14
  101. package/dist/types/excalidraw/data/index.d.ts +3 -3
  102. package/dist/types/excalidraw/data/json.d.ts +8 -7
  103. package/dist/types/excalidraw/fonts/Fonts.d.ts +9 -6
  104. package/dist/types/excalidraw/history.d.ts +10 -4
  105. package/dist/types/excalidraw/mermaid.d.ts +7 -0
  106. package/dist/types/excalidraw/reactUtils.d.ts +1 -1
  107. package/dist/types/excalidraw/renderer/animation.d.ts +11 -4
  108. package/dist/types/excalidraw/renderer/staticScene.d.ts +11 -6
  109. package/dist/types/excalidraw/scene/Renderer.d.ts +1 -1
  110. package/dist/types/excalidraw/scene/export.d.ts +343 -20
  111. package/dist/types/excalidraw/scene/types.d.ts +23 -1
  112. package/dist/types/excalidraw/types.d.ts +48 -1
  113. package/dist/types/excalidraw/viewport.d.ts +1 -0
  114. package/dist/types/utils/src/index.d.ts +3 -1
  115. package/package.json +2 -2
  116. package/dist/types/utils/src/export.d.ts +0 -36
@@ -1,12 +1,13 @@
1
- import type { ExcalidrawElement } from "@excalidraw/element/types";
2
- import type { AppClassProperties, UIAppState } from "../types";
1
+ import type { ElementsMap, ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
2
+ import type { ActionResult } from "./types";
3
+ import type { AppClassProperties, AppState, UIAppState } from "../types";
3
4
  export declare const actionSelectAllElementsInFrame: {
4
5
  name: "selectAllElementsInFrame";
5
6
  label: string;
6
7
  trackEvent: {
7
8
  category: "canvas";
8
9
  };
9
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
10
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
10
11
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
11
12
  appState: {
12
13
  selectedElementIds: Record<string, true>;
@@ -19,13 +20,13 @@ export declare const actionSelectAllElementsInFrame: {
19
20
  isLoading: boolean;
20
21
  errorMessage: React.ReactNode;
21
22
  activeEmbeddable: {
22
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
23
+ element: NonDeletedExcalidrawElement;
23
24
  state: "hover" | "active";
24
25
  } | null;
25
26
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
26
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
27
+ resizingElement: NonDeletedExcalidrawElement | null;
27
28
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
28
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
29
+ selectionElement: NonDeletedExcalidrawElement | null;
29
30
  isBindingEnabled: boolean;
30
31
  boxSelectionMode: import("../types").BoxSelectionMode;
31
32
  bindingPreference: "enabled" | "disabled";
@@ -47,15 +48,15 @@ export declare const actionSelectAllElementsInFrame: {
47
48
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
48
49
  anchor: "start" | "end" | "label";
49
50
  } | null;
50
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
51
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawFrameLikeElement> | null;
51
52
  frameRendering: {
52
53
  enabled: boolean;
53
54
  name: boolean;
54
55
  outline: boolean;
55
56
  clip: boolean;
56
57
  };
57
- editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
58
- elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
58
+ editingFrame: ExcalidrawFrameLikeElement["id"] | null;
59
+ elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
59
60
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
60
61
  activeTool: {
61
62
  lastActiveTool: import("../types").ActiveTool | null;
@@ -139,6 +140,7 @@ export declare const actionSelectAllElementsInFrame: {
139
140
  duration?: number;
140
141
  } | null;
141
142
  zenModeEnabled: boolean;
143
+ minimapEnabled: boolean;
142
144
  theme: import("@excalidraw/element/types").Theme;
143
145
  gridSize: number;
144
146
  gridStep: number;
@@ -189,10 +191,10 @@ export declare const actionSelectAllElementsInFrame: {
189
191
  captureUpdate: "IMMEDIATELY";
190
192
  } | {
191
193
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
192
- appState: Readonly<import("../types").AppState>;
194
+ appState: Readonly<AppState>;
193
195
  captureUpdate: "EVENTUALLY";
194
196
  };
195
- predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
197
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
196
198
  } & {
197
199
  keyTest?: undefined;
198
200
  };
@@ -202,7 +204,7 @@ export declare const actionRemoveAllElementsFromFrame: {
202
204
  trackEvent: {
203
205
  category: "history";
204
206
  };
205
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
207
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
206
208
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
207
209
  appState: {
208
210
  selectedElementIds: {
@@ -217,13 +219,13 @@ export declare const actionRemoveAllElementsFromFrame: {
217
219
  isLoading: boolean;
218
220
  errorMessage: React.ReactNode;
219
221
  activeEmbeddable: {
220
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
222
+ element: NonDeletedExcalidrawElement;
221
223
  state: "hover" | "active";
222
224
  } | null;
223
225
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
224
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
226
+ resizingElement: NonDeletedExcalidrawElement | null;
225
227
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
226
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
228
+ selectionElement: NonDeletedExcalidrawElement | null;
227
229
  isBindingEnabled: boolean;
228
230
  boxSelectionMode: import("../types").BoxSelectionMode;
229
231
  bindingPreference: "enabled" | "disabled";
@@ -245,15 +247,15 @@ export declare const actionRemoveAllElementsFromFrame: {
245
247
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
246
248
  anchor: "start" | "end" | "label";
247
249
  } | null;
248
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
250
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawFrameLikeElement> | null;
249
251
  frameRendering: {
250
252
  enabled: boolean;
251
253
  name: boolean;
252
254
  outline: boolean;
253
255
  clip: boolean;
254
256
  };
255
- editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
256
- elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
257
+ editingFrame: ExcalidrawFrameLikeElement["id"] | null;
258
+ elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
257
259
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
258
260
  activeTool: {
259
261
  lastActiveTool: import("../types").ActiveTool | null;
@@ -337,6 +339,7 @@ export declare const actionRemoveAllElementsFromFrame: {
337
339
  duration?: number;
338
340
  } | null;
339
341
  zenModeEnabled: boolean;
342
+ minimapEnabled: boolean;
340
343
  theme: import("@excalidraw/element/types").Theme;
341
344
  gridSize: number;
342
345
  gridStep: number;
@@ -387,10 +390,10 @@ export declare const actionRemoveAllElementsFromFrame: {
387
390
  captureUpdate: "IMMEDIATELY";
388
391
  } | {
389
392
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
390
- appState: Readonly<import("../types").AppState>;
393
+ appState: Readonly<AppState>;
391
394
  captureUpdate: "EVENTUALLY";
392
395
  };
393
- predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
396
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
394
397
  } & {
395
398
  keyTest?: undefined;
396
399
  };
@@ -401,7 +404,7 @@ export declare const actionupdateFrameRendering: {
401
404
  trackEvent: {
402
405
  category: "canvas";
403
406
  };
404
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
407
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>) => {
405
408
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
406
409
  appState: {
407
410
  frameRendering: {
@@ -419,13 +422,13 @@ export declare const actionupdateFrameRendering: {
419
422
  isLoading: boolean;
420
423
  errorMessage: React.ReactNode;
421
424
  activeEmbeddable: {
422
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
425
+ element: NonDeletedExcalidrawElement;
423
426
  state: "hover" | "active";
424
427
  } | null;
425
428
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
426
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
429
+ resizingElement: NonDeletedExcalidrawElement | null;
427
430
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
428
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
431
+ selectionElement: NonDeletedExcalidrawElement | null;
429
432
  isBindingEnabled: boolean;
430
433
  boxSelectionMode: import("../types").BoxSelectionMode;
431
434
  bindingPreference: "enabled" | "disabled";
@@ -447,9 +450,9 @@ export declare const actionupdateFrameRendering: {
447
450
  elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
448
451
  anchor: "start" | "end" | "label";
449
452
  } | null;
450
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
451
- editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
452
- elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
453
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawFrameLikeElement> | null;
454
+ editingFrame: ExcalidrawFrameLikeElement["id"] | null;
455
+ elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
453
456
  editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
454
457
  activeTool: {
455
458
  lastActiveTool: import("../types").ActiveTool | null;
@@ -536,6 +539,7 @@ export declare const actionupdateFrameRendering: {
536
539
  duration?: number;
537
540
  } | null;
538
541
  zenModeEnabled: boolean;
542
+ minimapEnabled: boolean;
539
543
  theme: import("@excalidraw/element/types").Theme;
540
544
  gridSize: number;
541
545
  gridStep: number;
@@ -589,509 +593,24 @@ export declare const actionupdateFrameRendering: {
589
593
  } & {
590
594
  keyTest?: undefined;
591
595
  };
596
+ /**
597
+ * The frame that wrapping the selection removes instead: the one frame the
598
+ * selection holds (along with any of its children), or, with no frame
599
+ * selected, the frame whose children are all selected.
600
+ */
601
+ export declare const getFrameToUnwrap: (selectedElements: readonly ExcalidrawElement[], elementsMap: ElementsMap) => ExcalidrawFrameLikeElement | null;
602
+ /** removes the frame, keeping its children selected in its place */
603
+ export declare const unwrapFrame: (elements: readonly ExcalidrawElement[], appState: AppState, frame: ExcalidrawFrameLikeElement, app: AppClassProperties) => ActionResult;
604
+ /** wraps the selection in a new frame — edge to edge when it's an image */
605
+ export declare const wrapInFrame: (elements: readonly ExcalidrawElement[], appState: AppState, selectedElements: NonDeletedExcalidrawElement[], app: AppClassProperties) => ActionResult;
592
606
  export declare const actionWrapSelectionInFrame: {
593
607
  name: "wrapSelectionInFrame";
594
- label: string;
608
+ label: (elements: readonly ExcalidrawElement[], appState: Readonly<UIAppState>, app: AppClassProperties) => "labels.removeFrame" | "labels.wrapSelectionInFrame";
595
609
  trackEvent: {
596
610
  category: "element";
597
611
  };
598
- predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
599
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
600
- elements: ((Readonly<{
601
- id: string;
602
- x: number;
603
- y: number;
604
- strokeColor: string;
605
- backgroundColor: string;
606
- fillStyle: import("@excalidraw/element/types").FillStyle;
607
- strokeWidth: number;
608
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
609
- roundness: null | {
610
- type: import("@excalidraw/element/types").RoundnessType;
611
- value?: number;
612
- };
613
- roughness: number;
614
- opacity: number;
615
- width: number;
616
- height: number;
617
- angle: import("@excalidraw/math").Radians;
618
- seed: number;
619
- version: number;
620
- versionNonce: number;
621
- index: import("@excalidraw/element/types").FractionalIndex | null;
622
- isDeleted: boolean;
623
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
624
- frameId: string | null;
625
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
626
- updated: number;
627
- created: number | null;
628
- link: string | null;
629
- locked: boolean;
630
- customData?: Record<string, any>;
631
- }> & Readonly<{
632
- type: "line" | "arrow";
633
- points: readonly import("@excalidraw/math").LocalPoint[];
634
- startBinding: import("@excalidraw/element/types").FixedPointBinding | null;
635
- endBinding: import("@excalidraw/element/types").FixedPointBinding | null;
636
- startArrowhead: import("@excalidraw/element/types").Arrowhead | null;
637
- endArrowhead: import("@excalidraw/element/types").Arrowhead | null;
638
- }> & {
639
- index: import("@excalidraw/element/types").FractionalIndex;
640
- }) | (Readonly<{
641
- id: string;
642
- x: number;
643
- y: number;
644
- strokeColor: string;
645
- backgroundColor: string;
646
- fillStyle: import("@excalidraw/element/types").FillStyle;
647
- strokeWidth: number;
648
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
649
- roundness: null | {
650
- type: import("@excalidraw/element/types").RoundnessType;
651
- value?: number;
652
- };
653
- roughness: number;
654
- opacity: number;
655
- width: number;
656
- height: number;
657
- angle: import("@excalidraw/math").Radians;
658
- seed: number;
659
- version: number;
660
- versionNonce: number;
661
- index: import("@excalidraw/element/types").FractionalIndex | null;
662
- isDeleted: boolean;
663
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
664
- frameId: string | null;
665
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
666
- updated: number;
667
- created: number | null;
668
- link: string | null;
669
- locked: boolean;
670
- customData?: Record<string, any>;
671
- }> & {
672
- type: "selection";
673
- } & {
674
- index: import("@excalidraw/element/types").FractionalIndex;
675
- }) | (Readonly<{
676
- id: string;
677
- x: number;
678
- y: number;
679
- strokeColor: string;
680
- backgroundColor: string;
681
- fillStyle: import("@excalidraw/element/types").FillStyle;
682
- strokeWidth: number;
683
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
684
- roundness: null | {
685
- type: import("@excalidraw/element/types").RoundnessType;
686
- value?: number;
687
- };
688
- roughness: number;
689
- opacity: number;
690
- width: number;
691
- height: number;
692
- angle: import("@excalidraw/math").Radians;
693
- seed: number;
694
- version: number;
695
- versionNonce: number;
696
- index: import("@excalidraw/element/types").FractionalIndex | null;
697
- isDeleted: boolean;
698
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
699
- frameId: string | null;
700
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
701
- updated: number;
702
- created: number | null;
703
- link: string | null;
704
- locked: boolean;
705
- customData?: Record<string, any>;
706
- }> & {
707
- type: "rectangle";
708
- } & {
709
- index: import("@excalidraw/element/types").FractionalIndex;
710
- }) | (Readonly<{
711
- id: string;
712
- x: number;
713
- y: number;
714
- strokeColor: string;
715
- backgroundColor: string;
716
- fillStyle: import("@excalidraw/element/types").FillStyle;
717
- strokeWidth: number;
718
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
719
- roundness: null | {
720
- type: import("@excalidraw/element/types").RoundnessType;
721
- value?: number;
722
- };
723
- roughness: number;
724
- opacity: number;
725
- width: number;
726
- height: number;
727
- angle: import("@excalidraw/math").Radians;
728
- seed: number;
729
- version: number;
730
- versionNonce: number;
731
- index: import("@excalidraw/element/types").FractionalIndex | null;
732
- isDeleted: boolean;
733
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
734
- frameId: string | null;
735
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
736
- updated: number;
737
- created: number | null;
738
- link: string | null;
739
- locked: boolean;
740
- customData?: Record<string, any>;
741
- }> & Readonly<{
742
- type: "stickynote";
743
- baseHeight: number;
744
- }> & {
745
- index: import("@excalidraw/element/types").FractionalIndex;
746
- }) | (Readonly<{
747
- id: string;
748
- x: number;
749
- y: number;
750
- strokeColor: string;
751
- backgroundColor: string;
752
- fillStyle: import("@excalidraw/element/types").FillStyle;
753
- strokeWidth: number;
754
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
755
- roundness: null | {
756
- type: import("@excalidraw/element/types").RoundnessType;
757
- value?: number;
758
- };
759
- roughness: number;
760
- opacity: number;
761
- width: number;
762
- height: number;
763
- angle: import("@excalidraw/math").Radians;
764
- seed: number;
765
- version: number;
766
- versionNonce: number;
767
- index: import("@excalidraw/element/types").FractionalIndex | null;
768
- isDeleted: boolean;
769
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
770
- frameId: string | null;
771
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
772
- updated: number;
773
- created: number | null;
774
- link: string | null;
775
- locked: boolean;
776
- customData?: Record<string, any>;
777
- }> & {
778
- type: "diamond";
779
- } & {
780
- index: import("@excalidraw/element/types").FractionalIndex;
781
- }) | (Readonly<{
782
- id: string;
783
- x: number;
784
- y: number;
785
- strokeColor: string;
786
- backgroundColor: string;
787
- fillStyle: import("@excalidraw/element/types").FillStyle;
788
- strokeWidth: number;
789
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
790
- roundness: null | {
791
- type: import("@excalidraw/element/types").RoundnessType;
792
- value?: number;
793
- };
794
- roughness: number;
795
- opacity: number;
796
- width: number;
797
- height: number;
798
- angle: import("@excalidraw/math").Radians;
799
- seed: number;
800
- version: number;
801
- versionNonce: number;
802
- index: import("@excalidraw/element/types").FractionalIndex | null;
803
- isDeleted: boolean;
804
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
805
- frameId: string | null;
806
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
807
- updated: number;
808
- created: number | null;
809
- link: string | null;
810
- locked: boolean;
811
- customData?: Record<string, any>;
812
- }> & {
813
- type: "ellipse";
814
- } & {
815
- index: import("@excalidraw/element/types").FractionalIndex;
816
- }) | (Readonly<{
817
- id: string;
818
- x: number;
819
- y: number;
820
- strokeColor: string;
821
- backgroundColor: string;
822
- fillStyle: import("@excalidraw/element/types").FillStyle;
823
- strokeWidth: number;
824
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
825
- roundness: null | {
826
- type: import("@excalidraw/element/types").RoundnessType;
827
- value?: number;
828
- };
829
- roughness: number;
830
- opacity: number;
831
- width: number;
832
- height: number;
833
- angle: import("@excalidraw/math").Radians;
834
- seed: number;
835
- version: number;
836
- versionNonce: number;
837
- index: import("@excalidraw/element/types").FractionalIndex | null;
838
- isDeleted: boolean;
839
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
840
- frameId: string | null;
841
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
842
- updated: number;
843
- created: number | null;
844
- link: string | null;
845
- locked: boolean;
846
- customData?: Record<string, any>;
847
- }> & Readonly<{
848
- type: "embeddable";
849
- }> & {
850
- index: import("@excalidraw/element/types").FractionalIndex;
851
- }) | (Readonly<{
852
- id: string;
853
- x: number;
854
- y: number;
855
- strokeColor: string;
856
- backgroundColor: string;
857
- fillStyle: import("@excalidraw/element/types").FillStyle;
858
- strokeWidth: number;
859
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
860
- roundness: null | {
861
- type: import("@excalidraw/element/types").RoundnessType;
862
- value?: number;
863
- };
864
- roughness: number;
865
- opacity: number;
866
- width: number;
867
- height: number;
868
- angle: import("@excalidraw/math").Radians;
869
- seed: number;
870
- version: number;
871
- versionNonce: number;
872
- index: import("@excalidraw/element/types").FractionalIndex | null;
873
- isDeleted: boolean;
874
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
875
- frameId: string | null;
876
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
877
- updated: number;
878
- created: number | null;
879
- link: string | null;
880
- locked: boolean;
881
- customData?: Record<string, any>;
882
- }> & Readonly<{
883
- type: "iframe";
884
- customData?: {
885
- generationData?: import("@excalidraw/element/types").MagicGenerationData;
886
- };
887
- }> & {
888
- index: import("@excalidraw/element/types").FractionalIndex;
889
- }) | (Readonly<{
890
- id: string;
891
- x: number;
892
- y: number;
893
- strokeColor: string;
894
- backgroundColor: string;
895
- fillStyle: import("@excalidraw/element/types").FillStyle;
896
- strokeWidth: number;
897
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
898
- roundness: null | {
899
- type: import("@excalidraw/element/types").RoundnessType;
900
- value?: number;
901
- };
902
- roughness: number;
903
- opacity: number;
904
- width: number;
905
- height: number;
906
- angle: import("@excalidraw/math").Radians;
907
- seed: number;
908
- version: number;
909
- versionNonce: number;
910
- index: import("@excalidraw/element/types").FractionalIndex | null;
911
- isDeleted: boolean;
912
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
913
- frameId: string | null;
914
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
915
- updated: number;
916
- created: number | null;
917
- link: string | null;
918
- locked: boolean;
919
- customData?: Record<string, any>;
920
- }> & Readonly<{
921
- type: "image";
922
- fileId: import("@excalidraw/element/types").FileId | null;
923
- status: "pending" | "saved" | "error";
924
- scale: [number, number];
925
- crop: import("@excalidraw/element/types").ImageCrop | null;
926
- }> & {
927
- index: import("@excalidraw/element/types").FractionalIndex;
928
- }) | (Readonly<{
929
- id: string;
930
- x: number;
931
- y: number;
932
- strokeColor: string;
933
- backgroundColor: string;
934
- fillStyle: import("@excalidraw/element/types").FillStyle;
935
- strokeWidth: number;
936
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
937
- roundness: null | {
938
- type: import("@excalidraw/element/types").RoundnessType;
939
- value?: number;
940
- };
941
- roughness: number;
942
- opacity: number;
943
- width: number;
944
- height: number;
945
- angle: import("@excalidraw/math").Radians;
946
- seed: number;
947
- version: number;
948
- versionNonce: number;
949
- index: import("@excalidraw/element/types").FractionalIndex | null;
950
- isDeleted: boolean;
951
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
952
- frameId: string | null;
953
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
954
- updated: number;
955
- created: number | null;
956
- link: string | null;
957
- locked: boolean;
958
- customData?: Record<string, any>;
959
- }> & {
960
- type: "frame";
961
- name: string | null;
962
- } & {
963
- index: import("@excalidraw/element/types").FractionalIndex;
964
- }) | (Readonly<{
965
- id: string;
966
- x: number;
967
- y: number;
968
- strokeColor: string;
969
- backgroundColor: string;
970
- fillStyle: import("@excalidraw/element/types").FillStyle;
971
- strokeWidth: number;
972
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
973
- roundness: null | {
974
- type: import("@excalidraw/element/types").RoundnessType;
975
- value?: number;
976
- };
977
- roughness: number;
978
- opacity: number;
979
- width: number;
980
- height: number;
981
- angle: import("@excalidraw/math").Radians;
982
- seed: number;
983
- version: number;
984
- versionNonce: number;
985
- index: import("@excalidraw/element/types").FractionalIndex | null;
986
- isDeleted: boolean;
987
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
988
- frameId: string | null;
989
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
990
- updated: number;
991
- created: number | null;
992
- link: string | null;
993
- locked: boolean;
994
- customData?: Record<string, any>;
995
- }> & {
996
- type: "magicframe";
997
- name: string | null;
998
- } & {
999
- index: import("@excalidraw/element/types").FractionalIndex;
1000
- }) | (Readonly<{
1001
- id: string;
1002
- x: number;
1003
- y: number;
1004
- strokeColor: string;
1005
- backgroundColor: string;
1006
- fillStyle: import("@excalidraw/element/types").FillStyle;
1007
- strokeWidth: number;
1008
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
1009
- roundness: null | {
1010
- type: import("@excalidraw/element/types").RoundnessType;
1011
- value?: number;
1012
- };
1013
- roughness: number;
1014
- opacity: number;
1015
- width: number;
1016
- height: number;
1017
- angle: import("@excalidraw/math").Radians;
1018
- seed: number;
1019
- version: number;
1020
- versionNonce: number;
1021
- index: import("@excalidraw/element/types").FractionalIndex | null;
1022
- isDeleted: boolean;
1023
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
1024
- frameId: string | null;
1025
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
1026
- updated: number;
1027
- created: number | null;
1028
- link: string | null;
1029
- locked: boolean;
1030
- customData?: Record<string, any>;
1031
- }> & Readonly<{
1032
- type: "text";
1033
- fontSize: number;
1034
- fontFamily: import("@excalidraw/element/types").FontFamilyValues;
1035
- baseFontSize: number | null;
1036
- text: string;
1037
- textAlign: import("@excalidraw/element/types").TextAlign;
1038
- verticalAlign: import("@excalidraw/element/types").VerticalAlign;
1039
- containerId: import("@excalidraw/element/types").ExcalidrawTextContainer["id"] | null;
1040
- originalText: string;
1041
- autoResize: boolean;
1042
- lineHeight: number & {
1043
- _brand: "unitlessLineHeight";
1044
- };
1045
- labelPosition?: number | null;
1046
- }> & {
1047
- index: import("@excalidraw/element/types").FractionalIndex;
1048
- }) | (Readonly<{
1049
- id: string;
1050
- x: number;
1051
- y: number;
1052
- strokeColor: string;
1053
- backgroundColor: string;
1054
- fillStyle: import("@excalidraw/element/types").FillStyle;
1055
- strokeWidth: number;
1056
- strokeStyle: import("@excalidraw/element/types").StrokeStyle;
1057
- roundness: null | {
1058
- type: import("@excalidraw/element/types").RoundnessType;
1059
- value?: number;
1060
- };
1061
- roughness: number;
1062
- opacity: number;
1063
- width: number;
1064
- height: number;
1065
- angle: import("@excalidraw/math").Radians;
1066
- seed: number;
1067
- version: number;
1068
- versionNonce: number;
1069
- index: import("@excalidraw/element/types").FractionalIndex | null;
1070
- isDeleted: boolean;
1071
- groupIds: readonly import("@excalidraw/element/types").GroupId[];
1072
- frameId: string | null;
1073
- boundElements: readonly import("@excalidraw/element/types").BoundElement[] | null;
1074
- updated: number;
1075
- created: number | null;
1076
- link: string | null;
1077
- locked: boolean;
1078
- customData?: Record<string, any>;
1079
- }> & Readonly<{
1080
- type: "freedraw";
1081
- points: readonly import("@excalidraw/math").LocalPoint[];
1082
- pressures: readonly number[];
1083
- simulatePressure: boolean;
1084
- strokeOptions: import("@excalidraw/element/types").StrokeOptions;
1085
- }> & {
1086
- index: import("@excalidraw/element/types").FractionalIndex;
1087
- }) | import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameElement>)[];
1088
- appState: {
1089
- selectedElementIds: {
1090
- [x: string]: true;
1091
- };
1092
- };
1093
- captureUpdate: "IMMEDIATELY";
1094
- };
612
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
613
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => ActionResult;
1095
614
  } & {
1096
615
  keyTest?: undefined;
1097
616
  };