@excalidraw/math 0.18.0-7ea3229 → 0.18.0-816c81c

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 (87) hide show
  1. package/dist/types/common/src/appEventBus.d.ts +27 -0
  2. package/dist/types/common/src/colors.d.ts +1 -1
  3. package/dist/types/common/src/index.d.ts +2 -0
  4. package/dist/types/common/src/utils.d.ts +1 -3
  5. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  6. package/dist/types/element/src/Scene.d.ts +2 -0
  7. package/dist/types/element/src/arrowheads.d.ts +3 -0
  8. package/dist/types/element/src/binding.d.ts +3 -4
  9. package/dist/types/element/src/bounds.d.ts +1 -1
  10. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  11. package/dist/types/element/src/index.d.ts +1 -0
  12. package/dist/types/element/src/linearElementEditor.d.ts +3 -0
  13. package/dist/types/element/src/mutateElement.d.ts +2 -0
  14. package/dist/types/element/src/types.d.ts +5 -2
  15. package/dist/types/element/src/utils.d.ts +1 -1
  16. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +23 -29
  17. package/dist/types/excalidraw/actions/actionBoundText.d.ts +16 -20
  18. package/dist/types/excalidraw/actions/actionCanvas.d.ts +97 -121
  19. package/dist/types/excalidraw/actions/actionClipboard.d.ts +16 -20
  20. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +8 -10
  21. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +24 -30
  22. package/dist/types/excalidraw/actions/actionElementLink.d.ts +4 -10
  23. package/dist/types/excalidraw/actions/actionElementLock.d.ts +16 -20
  24. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +8 -10
  25. package/dist/types/excalidraw/actions/actionExport.d.ts +60 -344
  26. package/dist/types/excalidraw/actions/actionFrame.d.ts +32 -40
  27. package/dist/types/excalidraw/actions/actionGroup.d.ts +16 -20
  28. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +8 -10
  29. package/dist/types/excalidraw/actions/actionLink.d.ts +8 -10
  30. package/dist/types/excalidraw/actions/actionMenu.d.ts +4 -10
  31. package/dist/types/excalidraw/actions/actionProperties.d.ts +16 -20
  32. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +8 -10
  33. package/dist/types/excalidraw/actions/actionStyles.d.ts +7 -9
  34. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +172 -0
  35. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +8 -10
  36. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +172 -0
  37. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +8 -10
  38. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +4 -10
  39. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +8 -10
  40. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +8 -10
  41. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +8 -10
  42. package/dist/types/excalidraw/actions/index.d.ts +2 -0
  43. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  44. package/dist/types/excalidraw/appState.d.ts +4 -2
  45. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  46. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  47. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  48. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  49. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  50. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  51. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  52. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  53. package/dist/types/excalidraw/clipboard.d.ts +2 -5
  54. package/dist/types/excalidraw/components/App.d.ts +33 -11
  55. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  56. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  57. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  58. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  59. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  60. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
  61. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  62. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  63. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  64. package/dist/types/excalidraw/components/Toast.d.ts +8 -4
  65. package/dist/types/excalidraw/components/icons.d.ts +17 -8
  66. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -0
  67. package/dist/types/excalidraw/data/blob.d.ts +25 -30
  68. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  69. package/dist/types/excalidraw/data/index.d.ts +2 -3
  70. package/dist/types/excalidraw/data/json.d.ts +28 -22
  71. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  72. package/dist/types/excalidraw/types.d.ts +84 -13
  73. package/package.json +2 -2
  74. package/dist/types/excalidraw/charts.d.ts +0 -27
  75. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  76. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
  77. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  78. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
  79. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
  80. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  81. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
  82. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  83. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  84. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
  85. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  86. package/dist/types/excalidraw/index.d.ts +0 -47
  87. package/dist/types/excalidraw/polyfill.d.ts +0 -2
@@ -1,17 +1,17 @@
1
- import type { Theme } from "@excalidraw/element/types";
1
+ import type { ExcalidrawElement, Theme } from "@excalidraw/element/types";
2
2
  import "../components/ToolIcon.scss";
3
- import type { AppState } from "../types";
3
+ import type { AppClassProperties, AppState, BinaryFiles, ExcalidrawProps } from "../types";
4
4
  export declare const actionChangeProjectName: import("./types").Action<string | null> & {
5
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
5
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
6
6
  };
7
7
  export declare const actionChangeExportScale: import("./types").Action<number> & {
8
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
8
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
9
9
  };
10
10
  export declare const actionChangeExportBackground: import("./types").Action<boolean> & {
11
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
11
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
12
12
  };
13
13
  export declare const actionChangeExportEmbedScene: import("./types").Action<boolean> & {
14
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
14
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
15
15
  };
16
16
  export declare const actionSaveToActiveFile: {
17
17
  name: "saveToActiveFile";
@@ -20,169 +20,22 @@ export declare const actionSaveToActiveFile: {
20
20
  trackEvent: {
21
21
  category: "export";
22
22
  };
23
- predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
24
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: unknown, app: import("../types").AppClassProperties) => Promise<{
25
- captureUpdate: "EVENTUALLY";
23
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: ExcalidrawProps, app: AppClassProperties) => boolean;
24
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: unknown, app: AppClassProperties) => Promise<false | {
25
+ captureUpdate: "NEVER";
26
26
  appState: {
27
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
27
+ fileHandle: FileSystemFileHandle | null;
28
28
  toast: {
29
29
  message: string;
30
- } | null;
31
- contextMenu: {
32
- items: import("../components/ContextMenu").ContextMenuItems;
33
- top: number;
34
- left: number;
35
- } | null;
36
- showWelcomeScreen: boolean;
37
- isLoading: boolean;
38
- errorMessage: React.ReactNode;
39
- activeEmbeddable: {
40
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
41
- state: "hover" | "active";
42
- } | null;
43
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
44
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
45
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
46
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
47
- isBindingEnabled: boolean;
48
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
49
- suggestedBinding: {
50
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
51
- midPoint?: import("@excalidraw/math").GlobalPoint;
52
- } | null;
53
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
54
- frameRendering: {
55
- enabled: boolean;
56
- name: boolean;
57
- outline: boolean;
58
- clip: boolean;
30
+ duration: number;
59
31
  };
60
- editingFrame: string | null;
61
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
62
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
63
- activeTool: {
64
- lastActiveTool: import("../types").ActiveTool | null;
65
- locked: boolean;
66
- fromSelection: boolean;
67
- } & import("../types").ActiveTool;
68
- preferredSelectionTool: {
69
- type: "selection" | "lasso";
70
- initialized: boolean;
71
- };
72
- penMode: boolean;
73
- penDetected: boolean;
74
- exportBackground: boolean;
75
- exportEmbedScene: boolean;
76
- exportWithDarkMode: boolean;
77
- exportScale: number;
78
- currentItemStrokeColor: string;
79
- currentItemBackgroundColor: string;
80
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
81
- currentItemStrokeWidth: number;
82
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
83
- currentItemRoughness: number;
84
- currentItemOpacity: number;
85
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
86
- currentItemFontSize: number;
87
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
88
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
89
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
90
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
91
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
92
- currentItemArrowType: "sharp" | "round" | "elbow";
93
- viewBackgroundColor: string;
94
- scrollX: number;
95
- scrollY: number;
96
- cursorButton: "up" | "down";
97
- scrolledOutside: boolean;
98
- name: string | null;
99
- isResizing: boolean;
100
- isRotating: boolean;
101
- zoom: import("../types").Zoom;
102
- openMenu: "canvas" | null;
103
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
104
- openSidebar: {
105
- name: import("../types").SidebarName;
106
- tab?: import("../types").SidebarTabName;
107
- } | null;
108
- openDialog: null | {
109
- name: "imageExport" | "help" | "jsonExport";
110
- } | {
111
- name: "ttd";
112
- tab: "text-to-diagram" | "mermaid";
113
- } | {
114
- name: "commandPalette";
115
- } | {
116
- name: "settings";
117
- } | {
118
- name: "elementLinkSelector";
119
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
120
- };
121
- defaultSidebarDockedPreference: boolean;
122
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
123
- selectedElementIds: Readonly<{
124
- [id: string]: true;
125
- }>;
126
- hoveredElementIds: Readonly<{
127
- [id: string]: true;
128
- }>;
129
- previousSelectedElementIds: {
130
- [id: string]: true;
131
- };
132
- selectedElementsAreBeingDragged: boolean;
133
- shouldCacheIgnoreZoom: boolean;
134
- zenModeEnabled: boolean;
135
- theme: Theme;
136
- gridSize: number;
137
- gridStep: number;
138
- gridModeEnabled: boolean;
139
- viewModeEnabled: boolean;
140
- selectedGroupIds: {
141
- [groupId: string]: boolean;
142
- };
143
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
144
- width: number;
145
- height: number;
146
- offsetTop: number;
147
- offsetLeft: number;
148
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
149
- stats: {
150
- open: boolean;
151
- panels: number;
152
- };
153
- currentChartType: import("@excalidraw/element/types").ChartType;
154
- pasteDialog: {
155
- shown: false;
156
- data: null;
157
- } | {
158
- shown: true;
159
- data: import("../charts").Spreadsheet;
160
- };
161
- showHyperlinkPopup: false | "info" | "editor";
162
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
163
- snapLines: readonly import("../snapping").SnapLine[];
164
- originSnapOffset: {
165
- x: number;
166
- y: number;
167
- } | null;
168
- objectsSnapModeEnabled: boolean;
169
- userToFollow: import("../types").UserToFollow | null;
170
- followedBy: Set<import("../types").SocketId>;
171
- isCropping: boolean;
172
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
173
- searchMatches: Readonly<{
174
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
175
- matches: readonly import("../types").SearchMatch[];
176
- }> | null;
177
- activeLockedId: string | null;
178
- lockedMultiSelections: {
179
- [groupId: string]: true;
180
- };
181
- bindMode: import("@excalidraw/element/types").BindMode;
182
32
  };
183
33
  } | {
184
- captureUpdate: "EVENTUALLY";
185
- appState?: undefined;
34
+ captureUpdate: "NEVER";
35
+ appState: {
36
+ toast: null;
37
+ fileHandle?: undefined;
38
+ };
186
39
  }>;
187
40
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
188
41
  } & {
@@ -196,156 +49,23 @@ export declare const actionSaveFileToDisk: {
196
49
  trackEvent: {
197
50
  category: "export";
198
51
  };
199
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: unknown, app: import("../types").AppClassProperties) => Promise<{
200
- captureUpdate: "EVENTUALLY";
52
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: unknown, app: AppClassProperties) => Promise<false | {
53
+ captureUpdate: "NEVER";
201
54
  appState: {
202
55
  openDialog: null;
203
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
56
+ fileHandle: FileSystemFileHandle | null;
204
57
  toast: {
205
58
  message: string;
59
+ duration: number;
206
60
  };
207
- contextMenu: {
208
- items: import("../components/ContextMenu").ContextMenuItems;
209
- top: number;
210
- left: number;
211
- } | null;
212
- showWelcomeScreen: boolean;
213
- isLoading: boolean;
214
- errorMessage: React.ReactNode;
215
- activeEmbeddable: {
216
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
217
- state: "hover" | "active";
218
- } | null;
219
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
220
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
221
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
222
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
223
- isBindingEnabled: boolean;
224
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
225
- suggestedBinding: {
226
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
227
- midPoint?: import("@excalidraw/math").GlobalPoint;
228
- } | null;
229
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
230
- frameRendering: {
231
- enabled: boolean;
232
- name: boolean;
233
- outline: boolean;
234
- clip: boolean;
235
- };
236
- editingFrame: string | null;
237
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
238
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
239
- activeTool: {
240
- lastActiveTool: import("../types").ActiveTool | null;
241
- locked: boolean;
242
- fromSelection: boolean;
243
- } & import("../types").ActiveTool;
244
- preferredSelectionTool: {
245
- type: "selection" | "lasso";
246
- initialized: boolean;
247
- };
248
- penMode: boolean;
249
- penDetected: boolean;
250
- exportBackground: boolean;
251
- exportEmbedScene: boolean;
252
- exportWithDarkMode: boolean;
253
- exportScale: number;
254
- currentItemStrokeColor: string;
255
- currentItemBackgroundColor: string;
256
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
257
- currentItemStrokeWidth: number;
258
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
259
- currentItemRoughness: number;
260
- currentItemOpacity: number;
261
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
262
- currentItemFontSize: number;
263
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
264
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
265
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
266
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
267
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
268
- currentItemArrowType: "sharp" | "round" | "elbow";
269
- viewBackgroundColor: string;
270
- scrollX: number;
271
- scrollY: number;
272
- cursorButton: "up" | "down";
273
- scrolledOutside: boolean;
274
- name: string | null;
275
- isResizing: boolean;
276
- isRotating: boolean;
277
- zoom: import("../types").Zoom;
278
- openMenu: "canvas" | null;
279
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
280
- openSidebar: {
281
- name: import("../types").SidebarName;
282
- tab?: import("../types").SidebarTabName;
283
- } | null;
284
- defaultSidebarDockedPreference: boolean;
285
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
286
- selectedElementIds: Readonly<{
287
- [id: string]: true;
288
- }>;
289
- hoveredElementIds: Readonly<{
290
- [id: string]: true;
291
- }>;
292
- previousSelectedElementIds: {
293
- [id: string]: true;
294
- };
295
- selectedElementsAreBeingDragged: boolean;
296
- shouldCacheIgnoreZoom: boolean;
297
- zenModeEnabled: boolean;
298
- theme: Theme;
299
- gridSize: number;
300
- gridStep: number;
301
- gridModeEnabled: boolean;
302
- viewModeEnabled: boolean;
303
- selectedGroupIds: {
304
- [groupId: string]: boolean;
305
- };
306
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
307
- width: number;
308
- height: number;
309
- offsetTop: number;
310
- offsetLeft: number;
311
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
312
- stats: {
313
- open: boolean;
314
- panels: number;
315
- };
316
- currentChartType: import("@excalidraw/element/types").ChartType;
317
- pasteDialog: {
318
- shown: false;
319
- data: null;
320
- } | {
321
- shown: true;
322
- data: import("../charts").Spreadsheet;
323
- };
324
- showHyperlinkPopup: false | "info" | "editor";
325
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
326
- snapLines: readonly import("../snapping").SnapLine[];
327
- originSnapOffset: {
328
- x: number;
329
- y: number;
330
- } | null;
331
- objectsSnapModeEnabled: boolean;
332
- userToFollow: import("../types").UserToFollow | null;
333
- followedBy: Set<import("../types").SocketId>;
334
- isCropping: boolean;
335
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
336
- searchMatches: Readonly<{
337
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
338
- matches: readonly import("../types").SearchMatch[];
339
- }> | null;
340
- activeLockedId: string | null;
341
- lockedMultiSelections: {
342
- [groupId: string]: true;
343
- };
344
- bindMode: import("@excalidraw/element/types").BindMode;
345
61
  };
346
62
  } | {
347
- captureUpdate: "EVENTUALLY";
348
- appState?: undefined;
63
+ captureUpdate: "NEVER";
64
+ appState: {
65
+ toast: null;
66
+ openDialog?: undefined;
67
+ fileHandle?: undefined;
68
+ };
349
69
  }>;
350
70
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
351
71
  PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -358,8 +78,8 @@ export declare const actionLoadScene: {
358
78
  trackEvent: {
359
79
  category: "export";
360
80
  };
361
- predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
362
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => Promise<false | {
81
+ predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: ExcalidrawProps, app: AppClassProperties) => boolean;
82
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => Promise<false | {
363
83
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
364
84
  appState: {
365
85
  viewBackgroundColor: string;
@@ -386,7 +106,11 @@ export declare const actionLoadScene: {
386
106
  name: "settings";
387
107
  } | {
388
108
  name: "elementLinkSelector";
389
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
109
+ sourceElementId: ExcalidrawElement["id"];
110
+ } | {
111
+ name: "charts";
112
+ data: import("../charts").Spreadsheet;
113
+ rawText: string;
390
114
  };
391
115
  editingGroupId: import("@excalidraw/element/types").GroupId | null;
392
116
  selectedElementIds: Readonly<{
@@ -410,20 +134,21 @@ export declare const actionLoadScene: {
410
134
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
411
135
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
412
136
  isBindingEnabled: boolean;
137
+ isMidpointSnappingEnabled: boolean;
413
138
  suggestedBinding: {
414
139
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
415
140
  midPoint?: import("@excalidraw/math").GlobalPoint;
416
141
  } | null;
417
142
  isRotating: boolean;
418
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
143
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
419
144
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
420
145
  snapLines: readonly import("../snapping").SnapLine[];
421
146
  zenModeEnabled: boolean;
422
147
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
423
148
  isCropping: boolean;
424
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
149
+ croppingElementId: ExcalidrawElement["id"] | null;
425
150
  searchMatches: Readonly<{
426
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
151
+ focusedId: ExcalidrawElement["id"] | null;
427
152
  matches: readonly import("../types").SearchMatch[];
428
153
  }> | null;
429
154
  activeLockedId: string | null;
@@ -432,6 +157,7 @@ export declare const actionLoadScene: {
432
157
  }>;
433
158
  shouldCacheIgnoreZoom: boolean;
434
159
  exportScale: number;
160
+ currentItemArrowType: "sharp" | "round" | "elbow";
435
161
  bindMode: import("@excalidraw/element/types").BindMode;
436
162
  gridSize: number;
437
163
  contextMenu: {
@@ -443,6 +169,7 @@ export declare const actionLoadScene: {
443
169
  isLoading: boolean;
444
170
  errorMessage: React.ReactNode;
445
171
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
172
+ bindingPreference: "enabled" | "disabled";
446
173
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
447
174
  editingFrame: string | null;
448
175
  preferredSelectionTool: {
@@ -456,9 +183,9 @@ export declare const actionLoadScene: {
456
183
  exportWithDarkMode: boolean;
457
184
  currentItemStrokeColor: string;
458
185
  currentItemBackgroundColor: string;
459
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
186
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
460
187
  currentItemStrokeWidth: number;
461
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
188
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
462
189
  currentItemRoughness: number;
463
190
  currentItemOpacity: number;
464
191
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
@@ -468,7 +195,6 @@ export declare const actionLoadScene: {
468
195
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
469
196
  currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
470
197
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
471
- currentItemArrowType: "sharp" | "round" | "elbow";
472
198
  cursorButton: "up" | "down";
473
199
  scrolledOutside: boolean;
474
200
  isResizing: boolean;
@@ -485,25 +211,17 @@ export declare const actionLoadScene: {
485
211
  };
486
212
  selectedElementsAreBeingDragged: boolean;
487
213
  toast: {
488
- message: string;
214
+ message: React.ReactNode;
489
215
  closable?: boolean;
490
216
  duration?: number;
491
217
  } | null;
492
218
  gridStep: number;
493
219
  gridModeEnabled: boolean;
494
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
220
+ fileHandle: FileSystemFileHandle | null;
495
221
  stats: {
496
222
  open: boolean;
497
223
  panels: number;
498
224
  };
499
- currentChartType: import("@excalidraw/element/types").ChartType;
500
- pasteDialog: {
501
- shown: false;
502
- data: null;
503
- } | {
504
- shown: true;
505
- data: import("../charts").Spreadsheet;
506
- };
507
225
  showHyperlinkPopup: false | "info" | "editor";
508
226
  originSnapOffset: {
509
227
  x: number;
@@ -516,7 +234,7 @@ export declare const actionLoadScene: {
516
234
  [groupId: string]: true;
517
235
  };
518
236
  };
519
- files: import("../types").BinaryFiles;
237
+ files: BinaryFiles;
520
238
  captureUpdate: "IMMEDIATELY";
521
239
  } | {
522
240
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
@@ -538,6 +256,8 @@ export declare const actionLoadScene: {
538
256
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
539
257
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
540
258
  isBindingEnabled: boolean;
259
+ bindingPreference: "enabled" | "disabled";
260
+ isMidpointSnappingEnabled: boolean;
541
261
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
542
262
  suggestedBinding: {
543
263
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
@@ -551,7 +271,7 @@ export declare const actionLoadScene: {
551
271
  clip: boolean;
552
272
  };
553
273
  editingFrame: string | null;
554
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
274
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
555
275
  editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
556
276
  activeTool: {
557
277
  lastActiveTool: import("../types").ActiveTool | null;
@@ -570,9 +290,9 @@ export declare const actionLoadScene: {
570
290
  exportScale: number;
571
291
  currentItemStrokeColor: string;
572
292
  currentItemBackgroundColor: string;
573
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
293
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
574
294
  currentItemStrokeWidth: number;
575
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
295
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
576
296
  currentItemRoughness: number;
577
297
  currentItemOpacity: number;
578
298
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
@@ -609,7 +329,11 @@ export declare const actionLoadScene: {
609
329
  name: "settings";
610
330
  } | {
611
331
  name: "elementLinkSelector";
612
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
332
+ sourceElementId: ExcalidrawElement["id"];
333
+ } | {
334
+ name: "charts";
335
+ data: import("../charts").Spreadsheet;
336
+ rawText: string;
613
337
  };
614
338
  defaultSidebarDockedPreference: boolean;
615
339
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -625,7 +349,7 @@ export declare const actionLoadScene: {
625
349
  selectedElementsAreBeingDragged: boolean;
626
350
  shouldCacheIgnoreZoom: boolean;
627
351
  toast: {
628
- message: string;
352
+ message: React.ReactNode;
629
353
  closable?: boolean;
630
354
  duration?: number;
631
355
  } | null;
@@ -643,20 +367,12 @@ export declare const actionLoadScene: {
643
367
  height: number;
644
368
  offsetTop: number;
645
369
  offsetLeft: number;
646
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
370
+ fileHandle: FileSystemFileHandle | null;
647
371
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
648
372
  stats: {
649
373
  open: boolean;
650
374
  panels: number;
651
375
  };
652
- currentChartType: import("@excalidraw/element/types").ChartType;
653
- pasteDialog: {
654
- shown: false;
655
- data: null;
656
- } | {
657
- shown: true;
658
- data: import("../charts").Spreadsheet;
659
- };
660
376
  showHyperlinkPopup: false | "info" | "editor";
661
377
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
662
378
  snapLines: readonly import("../snapping").SnapLine[];
@@ -668,9 +384,9 @@ export declare const actionLoadScene: {
668
384
  userToFollow: import("../types").UserToFollow | null;
669
385
  followedBy: Set<import("../types").SocketId>;
670
386
  isCropping: boolean;
671
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
387
+ croppingElementId: ExcalidrawElement["id"] | null;
672
388
  searchMatches: Readonly<{
673
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
389
+ focusedId: ExcalidrawElement["id"] | null;
674
390
  matches: readonly import("../types").SearchMatch[];
675
391
  }> | null;
676
392
  activeLockedId: string | null;
@@ -679,7 +395,7 @@ export declare const actionLoadScene: {
679
395
  };
680
396
  bindMode: import("@excalidraw/element/types").BindMode;
681
397
  };
682
- files: import("../types").BinaryFiles;
398
+ files: BinaryFiles;
683
399
  captureUpdate: "EVENTUALLY";
684
400
  }>;
685
401
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
@@ -687,5 +403,5 @@ export declare const actionLoadScene: {
687
403
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
688
404
  };
689
405
  export declare const actionExportWithDarkMode: import("./types").Action<boolean> & {
690
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
406
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
691
407
  };