@excalidraw/math 0.18.0-9ba0f5d → 0.18.0-a9ca16e

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 (128) hide show
  1. package/dist/dev/index.js +116 -125
  2. package/dist/dev/index.js.map +4 -4
  3. package/dist/prod/index.js +1 -1
  4. package/dist/types/common/debug.d.ts +21 -0
  5. package/dist/types/common/src/appEventBus.d.ts +27 -0
  6. package/dist/types/common/src/colors.d.ts +1 -1
  7. package/dist/types/common/src/constants.d.ts +4 -0
  8. package/dist/types/common/src/index.d.ts +3 -0
  9. package/dist/types/common/src/utils.d.ts +4 -7
  10. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  11. package/dist/types/element/src/Scene.d.ts +2 -0
  12. package/dist/types/element/src/arrowheads.d.ts +3 -0
  13. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  14. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  15. package/dist/types/element/src/binding.d.ts +13 -8
  16. package/dist/types/element/src/bounds.d.ts +1 -1
  17. package/dist/types/element/src/collision.d.ts +4 -3
  18. package/dist/types/element/src/distribute.d.ts +2 -1
  19. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  20. package/dist/types/element/src/index.d.ts +3 -0
  21. package/dist/types/element/src/linearElementEditor.d.ts +5 -0
  22. package/dist/types/element/src/mutateElement.d.ts +2 -0
  23. package/dist/types/element/src/selection.d.ts +5 -1
  24. package/dist/types/element/src/textElement.d.ts +1 -1
  25. package/dist/types/element/src/textWrapping.d.ts +26 -0
  26. package/dist/types/element/src/types.d.ts +5 -2
  27. package/dist/types/element/src/utils.d.ts +5 -3
  28. package/dist/types/element/src/zindex.d.ts +1 -1
  29. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +38 -35
  30. package/dist/types/excalidraw/actions/actionBoundText.d.ts +27 -25
  31. package/dist/types/excalidraw/actions/actionCanvas.d.ts +157 -145
  32. package/dist/types/excalidraw/actions/actionClipboard.d.ts +26 -24
  33. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +13 -12
  34. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +41 -36
  35. package/dist/types/excalidraw/actions/actionElementLink.d.ts +9 -12
  36. package/dist/types/excalidraw/actions/actionElementLock.d.ts +26 -24
  37. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +13 -12
  38. package/dist/types/excalidraw/actions/actionExport.d.ts +75 -347
  39. package/dist/types/excalidraw/actions/actionFrame.d.ts +52 -48
  40. package/dist/types/excalidraw/actions/actionGroup.d.ts +27 -25
  41. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +15 -12
  42. package/dist/types/excalidraw/actions/actionLink.d.ts +13 -12
  43. package/dist/types/excalidraw/actions/actionMenu.d.ts +9 -12
  44. package/dist/types/excalidraw/actions/actionProperties.d.ts +28 -26
  45. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +13 -12
  46. package/dist/types/excalidraw/actions/actionStyles.d.ts +13 -11
  47. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  48. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +172 -0
  49. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +13 -12
  50. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +172 -0
  51. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +13 -12
  52. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +9 -12
  53. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +13 -12
  54. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +13 -12
  55. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +13 -12
  56. package/dist/types/excalidraw/actions/index.d.ts +2 -0
  57. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  58. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  59. package/dist/types/excalidraw/appState.d.ts +9 -7
  60. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  61. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  62. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  63. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  64. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  65. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  66. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  67. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  68. package/dist/types/excalidraw/clipboard.d.ts +6 -7
  69. package/dist/types/excalidraw/components/App.d.ts +53 -13
  70. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  71. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -1
  72. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  73. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  74. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  75. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  76. package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +2 -6
  77. package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +2 -1
  78. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  79. package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +11 -7
  80. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  81. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
  82. package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
  83. package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +2 -1
  84. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  85. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +4 -0
  86. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  87. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  88. package/dist/types/excalidraw/components/Toast.d.ts +8 -4
  89. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
  90. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -16
  91. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
  92. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -12
  93. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  94. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +2 -1
  95. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  96. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  97. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  98. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  99. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  100. package/dist/types/excalidraw/components/icons.d.ts +23 -9
  101. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +17 -0
  102. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -14
  103. package/dist/types/excalidraw/components/shapes.d.ts +74 -1
  104. package/dist/types/excalidraw/data/blob.d.ts +45 -44
  105. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  106. package/dist/types/excalidraw/data/index.d.ts +2 -3
  107. package/dist/types/excalidraw/data/json.d.ts +37 -28
  108. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  109. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  110. package/dist/types/excalidraw/types.d.ts +93 -16
  111. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
  112. package/dist/types/math/src/point.d.ts +7 -2
  113. package/dist/types/math/src/types.d.ts +25 -1
  114. package/package.json +2 -2
  115. package/dist/types/excalidraw/charts.d.ts +0 -27
  116. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  117. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
  118. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  119. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
  120. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
  121. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  122. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
  123. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  124. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  125. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
  126. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  127. package/dist/types/excalidraw/index.d.ts +0 -46
  128. package/dist/types/excalidraw/polyfill.d.ts +0 -2
@@ -1,8 +1,8 @@
1
1
  import { LinearElementEditor } from "@excalidraw/element";
2
- import type { Arrowhead, ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawLinearElement, FontFamilyValues, TextAlign } from "@excalidraw/element/types";
2
+ import type { Arrowhead, ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextElement, FontFamilyValues, TextAlign } from "@excalidraw/element/types";
3
3
  import type { AppClassProperties, AppState, Primitive } from "../types";
4
4
  export declare const changeProperty: (elements: readonly ExcalidrawElement[], appState: AppState, callback: (element: ExcalidrawElement) => ExcalidrawElement, includeBoundText?: boolean) => ExcalidrawElement[];
5
- export declare const getFormValue: <T extends Primitive>(elements: readonly ExcalidrawElement[], app: AppClassProperties, getAttribute: (element: ExcalidrawElement) => T, isRelevantElement: true | ((element: ExcalidrawElement) => boolean), defaultValue: T | ((isSomeElementSelected: boolean) => T)) => T;
5
+ export declare const getFormValue: <T extends Primitive>(elements: readonly ExcalidrawElement[], app: AppClassProperties, getAttribute: (element: ExcalidrawElement) => T, elementPredicate: true | ((element: ExcalidrawElement) => boolean), defaultValue: T | ((isSomeElementSelected: boolean) => T)) => T;
6
6
  export declare const actionChangeStrokeColor: import("./types").Action<Pick<AppState, "currentItemStrokeColor">> & {
7
7
  keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
8
8
  };
@@ -53,8 +53,13 @@ export declare const actionDecreaseFontSize: {
53
53
  multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
54
54
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
55
55
  isBindingEnabled: boolean;
56
+ bindingPreference: "enabled" | "disabled";
57
+ isMidpointSnappingEnabled: boolean;
56
58
  startBoundElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement> | null;
57
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement> | null;
59
+ suggestedBinding: {
60
+ element: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement>;
61
+ midPoint?: import("@excalidraw/math").GlobalPoint;
62
+ } | null;
58
63
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
59
64
  frameRendering: {
60
65
  enabled: boolean;
@@ -64,7 +69,7 @@ export declare const actionDecreaseFontSize: {
64
69
  };
65
70
  editingFrame: string | null;
66
71
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
67
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
72
+ editingTextElement: ExcalidrawTextElement | null;
68
73
  activeTool: {
69
74
  lastActiveTool: import("../types").ActiveTool | null;
70
75
  locked: boolean;
@@ -121,6 +126,10 @@ export declare const actionDecreaseFontSize: {
121
126
  } | {
122
127
  name: "elementLinkSelector";
123
128
  sourceElementId: ExcalidrawElement["id"];
129
+ } | {
130
+ name: "charts";
131
+ data: import("../charts").Spreadsheet;
132
+ rawText: string;
124
133
  };
125
134
  defaultSidebarDockedPreference: boolean;
126
135
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -136,7 +145,7 @@ export declare const actionDecreaseFontSize: {
136
145
  selectedElementsAreBeingDragged: boolean;
137
146
  shouldCacheIgnoreZoom: boolean;
138
147
  toast: {
139
- message: string;
148
+ message: React.ReactNode;
140
149
  closable?: boolean;
141
150
  duration?: number;
142
151
  } | null;
@@ -154,20 +163,12 @@ export declare const actionDecreaseFontSize: {
154
163
  height: number;
155
164
  offsetTop: number;
156
165
  offsetLeft: number;
157
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
166
+ fileHandle: FileSystemFileHandle | null;
158
167
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
159
168
  stats: {
160
169
  open: boolean;
161
170
  panels: number;
162
171
  };
163
- currentChartType: import("@excalidraw/element/types").ChartType;
164
- pasteDialog: {
165
- shown: false;
166
- data: null;
167
- } | {
168
- shown: true;
169
- data: import("../charts").Spreadsheet;
170
- };
171
172
  showHyperlinkPopup: false | "info" | "editor";
172
173
  selectedLinearElement: LinearElementEditor | null;
173
174
  snapLines: readonly import("../snapping").SnapLine[];
@@ -222,8 +223,13 @@ export declare const actionIncreaseFontSize: {
222
223
  multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
223
224
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
224
225
  isBindingEnabled: boolean;
226
+ bindingPreference: "enabled" | "disabled";
227
+ isMidpointSnappingEnabled: boolean;
225
228
  startBoundElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement> | null;
226
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement> | null;
229
+ suggestedBinding: {
230
+ element: import("@excalidraw/element/types").NonDeleted<ExcalidrawBindableElement>;
231
+ midPoint?: import("@excalidraw/math").GlobalPoint;
232
+ } | null;
227
233
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
228
234
  frameRendering: {
229
235
  enabled: boolean;
@@ -233,7 +239,7 @@ export declare const actionIncreaseFontSize: {
233
239
  };
234
240
  editingFrame: string | null;
235
241
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
236
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
242
+ editingTextElement: ExcalidrawTextElement | null;
237
243
  activeTool: {
238
244
  lastActiveTool: import("../types").ActiveTool | null;
239
245
  locked: boolean;
@@ -290,6 +296,10 @@ export declare const actionIncreaseFontSize: {
290
296
  } | {
291
297
  name: "elementLinkSelector";
292
298
  sourceElementId: ExcalidrawElement["id"];
299
+ } | {
300
+ name: "charts";
301
+ data: import("../charts").Spreadsheet;
302
+ rawText: string;
293
303
  };
294
304
  defaultSidebarDockedPreference: boolean;
295
305
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -305,7 +315,7 @@ export declare const actionIncreaseFontSize: {
305
315
  selectedElementsAreBeingDragged: boolean;
306
316
  shouldCacheIgnoreZoom: boolean;
307
317
  toast: {
308
- message: string;
318
+ message: React.ReactNode;
309
319
  closable?: boolean;
310
320
  duration?: number;
311
321
  } | null;
@@ -323,20 +333,12 @@ export declare const actionIncreaseFontSize: {
323
333
  height: number;
324
334
  offsetTop: number;
325
335
  offsetLeft: number;
326
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
336
+ fileHandle: FileSystemFileHandle | null;
327
337
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
328
338
  stats: {
329
339
  open: boolean;
330
340
  panels: number;
331
341
  };
332
- currentChartType: import("@excalidraw/element/types").ChartType;
333
- pasteDialog: {
334
- shown: false;
335
- data: null;
336
- } | {
337
- shown: true;
338
- data: import("../charts").Spreadsheet;
339
- };
340
342
  showHyperlinkPopup: false | "info" | "editor";
341
343
  selectedLinearElement: LinearElementEditor | null;
342
344
  snapLines: readonly import("../snapping").SnapLine[];
@@ -31,8 +31,13 @@ export declare const actionSelectAll: {
31
31
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
32
32
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
33
33
  isBindingEnabled: boolean;
34
+ bindingPreference: "enabled" | "disabled";
35
+ isMidpointSnappingEnabled: boolean;
34
36
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
35
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
37
+ suggestedBinding: {
38
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
39
+ midPoint?: import("@excalidraw/math").GlobalPoint;
40
+ } | null;
36
41
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
37
42
  frameRendering: {
38
43
  enabled: boolean;
@@ -42,7 +47,7 @@ export declare const actionSelectAll: {
42
47
  };
43
48
  editingFrame: string | null;
44
49
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
45
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
50
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
46
51
  activeTool: {
47
52
  lastActiveTool: import("../types").ActiveTool | null;
48
53
  locked: boolean;
@@ -100,6 +105,10 @@ export declare const actionSelectAll: {
100
105
  } | {
101
106
  name: "elementLinkSelector";
102
107
  sourceElementId: ExcalidrawElement["id"];
108
+ } | {
109
+ name: "charts";
110
+ data: import("../charts").Spreadsheet;
111
+ rawText: string;
103
112
  };
104
113
  defaultSidebarDockedPreference: boolean;
105
114
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -112,7 +121,7 @@ export declare const actionSelectAll: {
112
121
  selectedElementsAreBeingDragged: boolean;
113
122
  shouldCacheIgnoreZoom: boolean;
114
123
  toast: {
115
- message: string;
124
+ message: React.ReactNode;
116
125
  closable?: boolean;
117
126
  duration?: number;
118
127
  } | null;
@@ -126,20 +135,12 @@ export declare const actionSelectAll: {
126
135
  height: number;
127
136
  offsetTop: number;
128
137
  offsetLeft: number;
129
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
138
+ fileHandle: FileSystemFileHandle | null;
130
139
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
131
140
  stats: {
132
141
  open: boolean;
133
142
  panels: number;
134
143
  };
135
- currentChartType: import("@excalidraw/element/types").ChartType;
136
- pasteDialog: {
137
- shown: false;
138
- data: null;
139
- } | {
140
- shown: true;
141
- data: import("../charts").Spreadsheet;
142
- };
143
144
  showHyperlinkPopup: false | "info" | "editor";
144
145
  snapLines: readonly import("../snapping").SnapLine[];
145
146
  originSnapOffset: {
@@ -1,3 +1,4 @@
1
+ import type { ExcalidrawTextElement } from "@excalidraw/element/types";
1
2
  export declare let copiedStyles: string;
2
3
  export declare const actionCopyStyles: {
3
4
  name: "copyStyles";
@@ -28,8 +29,13 @@ export declare const actionCopyStyles: {
28
29
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
29
30
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
30
31
  isBindingEnabled: boolean;
32
+ bindingPreference: "enabled" | "disabled";
33
+ isMidpointSnappingEnabled: boolean;
31
34
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
32
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
35
+ suggestedBinding: {
36
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
37
+ midPoint?: import("@excalidraw/math").GlobalPoint;
38
+ } | null;
33
39
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
34
40
  frameRendering: {
35
41
  enabled: boolean;
@@ -39,7 +45,7 @@ export declare const actionCopyStyles: {
39
45
  };
40
46
  editingFrame: string | null;
41
47
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
42
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
48
+ editingTextElement: ExcalidrawTextElement | null;
43
49
  activeTool: {
44
50
  lastActiveTool: import("../types").ActiveTool | null;
45
51
  locked: boolean;
@@ -97,6 +103,10 @@ export declare const actionCopyStyles: {
97
103
  } | {
98
104
  name: "elementLinkSelector";
99
105
  sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
106
+ } | {
107
+ name: "charts";
108
+ data: import("../charts").Spreadsheet;
109
+ rawText: string;
100
110
  };
101
111
  defaultSidebarDockedPreference: boolean;
102
112
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -125,20 +135,12 @@ export declare const actionCopyStyles: {
125
135
  height: number;
126
136
  offsetTop: number;
127
137
  offsetLeft: number;
128
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
138
+ fileHandle: FileSystemFileHandle | null;
129
139
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
130
140
  stats: {
131
141
  open: boolean;
132
142
  panels: number;
133
143
  };
134
- currentChartType: import("@excalidraw/element/types").ChartType;
135
- pasteDialog: {
136
- shown: false;
137
- data: null;
138
- } | {
139
- shown: true;
140
- data: import("../charts").Spreadsheet;
141
- };
142
144
  showHyperlinkPopup: false | "info" | "editor";
143
145
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
144
146
  snapLines: readonly import("../snapping").SnapLine[];
@@ -1,4 +1,4 @@
1
- import type { AppClassProperties } from "../types";
1
+ import type { ExcalidrawElement } from "@excalidraw/element/types";
2
2
  export declare const actionTextAutoResize: {
3
3
  name: "autoResize";
4
4
  label: string;
@@ -6,8 +6,8 @@ export declare const actionTextAutoResize: {
6
6
  trackEvent: {
7
7
  category: "element";
8
8
  };
9
- predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, _: unknown, app: AppClassProperties) => boolean;
10
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: AppClassProperties) => {
9
+ predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: unknown) => boolean;
10
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, targetElement: unknown) => {
11
11
  appState: Readonly<import("../types").AppState>;
12
12
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
13
13
  captureUpdate: "IMMEDIATELY";
@@ -0,0 +1,172 @@
1
+ export declare const actionToggleArrowBinding: {
2
+ name: "arrowBinding";
3
+ label: string;
4
+ viewMode: false;
5
+ trackEvent: {
6
+ category: "canvas";
7
+ predicate: (appState: Readonly<import("../types").AppState>) => boolean;
8
+ };
9
+ perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
10
+ appState: {
11
+ bindingPreference: "enabled" | "disabled";
12
+ isBindingEnabled: boolean;
13
+ contextMenu: {
14
+ items: import("../components/ContextMenu").ContextMenuItems;
15
+ top: number;
16
+ left: number;
17
+ } | null;
18
+ showWelcomeScreen: boolean;
19
+ isLoading: boolean;
20
+ errorMessage: React.ReactNode;
21
+ activeEmbeddable: {
22
+ element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
23
+ state: "hover" | "active";
24
+ } | null;
25
+ newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
26
+ resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
27
+ multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
28
+ selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
29
+ isMidpointSnappingEnabled: boolean;
30
+ startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
31
+ suggestedBinding: {
32
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
33
+ midPoint?: import("@excalidraw/math").GlobalPoint;
34
+ } | null;
35
+ frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
36
+ frameRendering: {
37
+ enabled: boolean;
38
+ name: boolean;
39
+ outline: boolean;
40
+ clip: boolean;
41
+ };
42
+ editingFrame: string | null;
43
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
44
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
45
+ activeTool: {
46
+ lastActiveTool: import("../types").ActiveTool | null;
47
+ locked: boolean;
48
+ fromSelection: boolean;
49
+ } & import("../types").ActiveTool;
50
+ preferredSelectionTool: {
51
+ type: "selection" | "lasso";
52
+ initialized: boolean;
53
+ };
54
+ penMode: boolean;
55
+ penDetected: boolean;
56
+ exportBackground: boolean;
57
+ exportEmbedScene: boolean;
58
+ exportWithDarkMode: boolean;
59
+ exportScale: number;
60
+ currentItemStrokeColor: string;
61
+ currentItemBackgroundColor: string;
62
+ currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
63
+ currentItemStrokeWidth: number;
64
+ currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
65
+ currentItemRoughness: number;
66
+ currentItemOpacity: number;
67
+ currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
68
+ currentItemFontSize: number;
69
+ currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
70
+ currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
71
+ currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
72
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
73
+ currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
74
+ currentItemArrowType: "sharp" | "round" | "elbow";
75
+ viewBackgroundColor: string;
76
+ scrollX: number;
77
+ scrollY: number;
78
+ cursorButton: "up" | "down";
79
+ scrolledOutside: boolean;
80
+ name: string | null;
81
+ isResizing: boolean;
82
+ isRotating: boolean;
83
+ zoom: import("../types").Zoom;
84
+ openMenu: "canvas" | null;
85
+ openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
86
+ openSidebar: {
87
+ name: import("../types").SidebarName;
88
+ tab?: import("../types").SidebarTabName;
89
+ } | null;
90
+ openDialog: null | {
91
+ name: "imageExport" | "help" | "jsonExport";
92
+ } | {
93
+ name: "ttd";
94
+ tab: "text-to-diagram" | "mermaid";
95
+ } | {
96
+ name: "commandPalette";
97
+ } | {
98
+ name: "settings";
99
+ } | {
100
+ name: "elementLinkSelector";
101
+ sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
102
+ } | {
103
+ name: "charts";
104
+ data: import("../charts").Spreadsheet;
105
+ rawText: string;
106
+ };
107
+ defaultSidebarDockedPreference: boolean;
108
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
109
+ selectedElementIds: Readonly<{
110
+ [id: string]: true;
111
+ }>;
112
+ hoveredElementIds: Readonly<{
113
+ [id: string]: true;
114
+ }>;
115
+ previousSelectedElementIds: {
116
+ [id: string]: true;
117
+ };
118
+ selectedElementsAreBeingDragged: boolean;
119
+ shouldCacheIgnoreZoom: boolean;
120
+ toast: {
121
+ message: React.ReactNode;
122
+ closable?: boolean;
123
+ duration?: number;
124
+ } | null;
125
+ zenModeEnabled: boolean;
126
+ theme: import("@excalidraw/element/types").Theme;
127
+ gridSize: number;
128
+ gridStep: number;
129
+ gridModeEnabled: boolean;
130
+ viewModeEnabled: boolean;
131
+ selectedGroupIds: {
132
+ [groupId: string]: boolean;
133
+ };
134
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
135
+ width: number;
136
+ height: number;
137
+ offsetTop: number;
138
+ offsetLeft: number;
139
+ fileHandle: FileSystemFileHandle | null;
140
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
141
+ stats: {
142
+ open: boolean;
143
+ panels: number;
144
+ };
145
+ showHyperlinkPopup: false | "info" | "editor";
146
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
147
+ snapLines: readonly import("../snapping").SnapLine[];
148
+ originSnapOffset: {
149
+ x: number;
150
+ y: number;
151
+ } | null;
152
+ objectsSnapModeEnabled: boolean;
153
+ userToFollow: import("../types").UserToFollow | null;
154
+ followedBy: Set<import("../types").SocketId>;
155
+ isCropping: boolean;
156
+ croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
157
+ searchMatches: Readonly<{
158
+ focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
159
+ matches: readonly import("../types").SearchMatch[];
160
+ }> | null;
161
+ activeLockedId: string | null;
162
+ lockedMultiSelections: {
163
+ [groupId: string]: true;
164
+ };
165
+ bindMode: import("@excalidraw/element/types").BindMode;
166
+ };
167
+ captureUpdate: "NEVER";
168
+ };
169
+ checked: (appState: Readonly<import("../types").AppState>) => boolean;
170
+ } & {
171
+ keyTest?: undefined;
172
+ };
@@ -30,8 +30,13 @@ export declare const actionToggleGridMode: {
30
30
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
31
31
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
32
32
  isBindingEnabled: boolean;
33
+ bindingPreference: "enabled" | "disabled";
34
+ isMidpointSnappingEnabled: boolean;
33
35
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
34
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
36
+ suggestedBinding: {
37
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
38
+ midPoint?: import("@excalidraw/math").GlobalPoint;
39
+ } | null;
35
40
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
36
41
  frameRendering: {
37
42
  enabled: boolean;
@@ -41,7 +46,7 @@ export declare const actionToggleGridMode: {
41
46
  };
42
47
  editingFrame: string | null;
43
48
  elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
44
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
49
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
45
50
  activeTool: {
46
51
  lastActiveTool: import("../types").ActiveTool | null;
47
52
  locked: boolean;
@@ -99,6 +104,10 @@ export declare const actionToggleGridMode: {
99
104
  } | {
100
105
  name: "elementLinkSelector";
101
106
  sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
107
+ } | {
108
+ name: "charts";
109
+ data: import("../charts").Spreadsheet;
110
+ rawText: string;
102
111
  };
103
112
  defaultSidebarDockedPreference: boolean;
104
113
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -114,7 +123,7 @@ export declare const actionToggleGridMode: {
114
123
  selectedElementsAreBeingDragged: boolean;
115
124
  shouldCacheIgnoreZoom: boolean;
116
125
  toast: {
117
- message: string;
126
+ message: React.ReactNode;
118
127
  closable?: boolean;
119
128
  duration?: number;
120
129
  } | null;
@@ -131,20 +140,12 @@ export declare const actionToggleGridMode: {
131
140
  height: number;
132
141
  offsetTop: number;
133
142
  offsetLeft: number;
134
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
143
+ fileHandle: FileSystemFileHandle | null;
135
144
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
136
145
  stats: {
137
146
  open: boolean;
138
147
  panels: number;
139
148
  };
140
- currentChartType: import("@excalidraw/element/types").ChartType;
141
- pasteDialog: {
142
- shown: false;
143
- data: null;
144
- } | {
145
- shown: true;
146
- data: import("../charts").Spreadsheet;
147
- };
148
149
  showHyperlinkPopup: false | "info" | "editor";
149
150
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
150
151
  snapLines: readonly import("../snapping").SnapLine[];