@myoc/math 0.19.502-d9d5eeb32 → 0.19.503

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 (103) 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 +3 -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 +143 -132
  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 -368
  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 +181 -0
  49. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +13 -12
  50. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +181 -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 +55 -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/Toast.d.ts +8 -4
  77. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
  78. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -17
  79. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
  80. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -13
  81. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  82. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  83. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  84. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  85. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  86. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  87. package/dist/types/excalidraw/components/icons.d.ts +23 -9
  88. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +17 -0
  89. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -13
  90. package/dist/types/excalidraw/data/blob.d.ts +45 -44
  91. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  92. package/dist/types/excalidraw/data/index.d.ts +2 -3
  93. package/dist/types/excalidraw/data/json.d.ts +37 -28
  94. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  95. package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
  96. package/dist/types/excalidraw/index.d.ts +25 -3
  97. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  98. package/dist/types/excalidraw/types.d.ts +93 -16
  99. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
  100. package/dist/types/math/src/point.d.ts +7 -2
  101. package/dist/types/math/src/types.d.ts +25 -1
  102. package/package.json +2 -2
  103. package/dist/types/excalidraw/charts.d.ts +0 -27
@@ -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,175 +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
- myocSimplifiedMode: boolean;
39
- dontResizeLimitMBs: number;
40
- hideMainMenus: boolean;
41
- wheelZoomsOnDefault?: boolean;
42
- arrangeConfiguration: {
43
- algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
44
- gap: number;
45
- };
46
- normaliseConfiguration: {
47
- mode: import("../types").NormaliseMode;
48
- metric: import("../types").NormaliseMetric;
30
+ duration: number;
49
31
  };
50
- errorMessage: React.ReactNode;
51
- activeEmbeddable: {
52
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
53
- state: "hover" | "active";
54
- } | null;
55
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
56
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
57
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
58
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
59
- isBindingEnabled: boolean;
60
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
61
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
62
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
63
- frameRendering: {
64
- enabled: boolean;
65
- name: boolean;
66
- outline: boolean;
67
- clip: boolean;
68
- };
69
- editingFrame: string | null;
70
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
71
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
72
- activeTool: {
73
- lastActiveTool: import("../types").ActiveTool | null;
74
- locked: boolean;
75
- fromSelection: boolean;
76
- } & import("../types").ActiveTool;
77
- preferredSelectionTool: {
78
- type: "selection" | "lasso";
79
- initialized: boolean;
80
- };
81
- penMode: boolean;
82
- penDetected: boolean;
83
- exportBackground: boolean;
84
- exportEmbedScene: boolean;
85
- exportWithDarkMode: boolean;
86
- exportScale: number;
87
- currentItemStrokeColor: string;
88
- currentItemBackgroundColor: string;
89
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
90
- currentItemStrokeWidth: number;
91
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
92
- currentItemRoughness: number;
93
- currentItemOpacity: number;
94
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
95
- currentItemFontSize: number;
96
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
97
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
98
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
99
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
100
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
101
- currentItemArrowType: "sharp" | "round" | "elbow";
102
- viewBackgroundColor: string;
103
- scrollX: number;
104
- scrollY: number;
105
- cursorButton: "up" | "down";
106
- scrolledOutside: boolean;
107
- name: string | null;
108
- isResizing: boolean;
109
- isRotating: boolean;
110
- zoom: import("../types").Zoom;
111
- openMenu: "canvas" | null;
112
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
113
- openSidebar: {
114
- name: import("../types").SidebarName;
115
- tab?: import("../types").SidebarTabName;
116
- } | null;
117
- openDialog: null | {
118
- name: "imageExport" | "help" | "jsonExport";
119
- } | {
120
- name: "commandPalette";
121
- } | {
122
- name: "settings";
123
- } | {
124
- name: "elementLinkSelector";
125
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
126
- };
127
- defaultSidebarDockedPreference: boolean;
128
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
129
- selectedElementIds: Readonly<{
130
- [id: string]: true;
131
- }>;
132
- hoveredElementIds: Readonly<{
133
- [id: string]: true;
134
- }>;
135
- previousSelectedElementIds: {
136
- [id: string]: true;
137
- };
138
- selectedElementsAreBeingDragged: boolean;
139
- shouldCacheIgnoreZoom: boolean;
140
- zenModeEnabled: boolean;
141
- theme: Theme;
142
- gridSize: number;
143
- gridStep: number;
144
- gridModeEnabled: boolean;
145
- viewModeEnabled: boolean;
146
- selectedGroupIds: {
147
- [groupId: string]: boolean;
148
- };
149
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
150
- width: number;
151
- height: number;
152
- offsetTop: number;
153
- offsetLeft: number;
154
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
155
- stats: {
156
- open: boolean;
157
- panels: number;
158
- };
159
- currentChartType: import("@excalidraw/element/types").ChartType;
160
- pasteDialog: {
161
- shown: false;
162
- data: null;
163
- } | {
164
- shown: true;
165
- data: import("../charts").Spreadsheet;
166
- };
167
- showHyperlinkPopup: false | "info" | "editor";
168
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
169
- snapLines: readonly import("../snapping").SnapLine[];
170
- originSnapOffset: {
171
- x: number;
172
- y: number;
173
- } | null;
174
- objectsSnapModeEnabled: boolean;
175
- userToFollow: import("../types").UserToFollow | null;
176
- followedBy: Set<import("../types").SocketId>;
177
- isCropping: boolean;
178
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
179
- searchMatches: Readonly<{
180
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
181
- matches: readonly import("../types").SearchMatch[];
182
- }> | null;
183
- activeLockedId: string | null;
184
- lockedMultiSelections: {
185
- [groupId: string]: true;
186
- };
187
- bindMode: import("@excalidraw/element/types").BindMode;
188
32
  };
189
33
  } | {
190
- captureUpdate: "EVENTUALLY";
191
- appState?: undefined;
34
+ captureUpdate: "NEVER";
35
+ appState: {
36
+ toast: null;
37
+ fileHandle?: undefined;
38
+ };
192
39
  }>;
193
40
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => false;
194
41
  } & {
@@ -202,165 +49,23 @@ export declare const actionSaveFileToDisk: {
202
49
  trackEvent: {
203
50
  category: "export";
204
51
  };
205
- perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: unknown, app: import("../types").AppClassProperties) => Promise<{
206
- captureUpdate: "EVENTUALLY";
52
+ perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, value: unknown, app: AppClassProperties) => Promise<false | {
53
+ captureUpdate: "NEVER";
207
54
  appState: {
208
55
  openDialog: null;
209
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
56
+ fileHandle: FileSystemFileHandle | null;
210
57
  toast: {
211
58
  message: string;
59
+ duration: number;
212
60
  };
213
- contextMenu: {
214
- items: import("../components/ContextMenu").ContextMenuItems;
215
- top: number;
216
- left: number;
217
- } | null;
218
- showWelcomeScreen: boolean;
219
- isLoading: boolean;
220
- myocSimplifiedMode: boolean;
221
- dontResizeLimitMBs: number;
222
- hideMainMenus: boolean;
223
- wheelZoomsOnDefault?: boolean;
224
- arrangeConfiguration: {
225
- algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
226
- gap: number;
227
- };
228
- normaliseConfiguration: {
229
- mode: import("../types").NormaliseMode;
230
- metric: import("../types").NormaliseMetric;
231
- };
232
- errorMessage: React.ReactNode;
233
- activeEmbeddable: {
234
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
235
- state: "hover" | "active";
236
- } | null;
237
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
238
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
239
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
240
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
241
- isBindingEnabled: boolean;
242
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
243
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
244
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
245
- frameRendering: {
246
- enabled: boolean;
247
- name: boolean;
248
- outline: boolean;
249
- clip: boolean;
250
- };
251
- editingFrame: string | null;
252
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
253
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
254
- activeTool: {
255
- lastActiveTool: import("../types").ActiveTool | null;
256
- locked: boolean;
257
- fromSelection: boolean;
258
- } & import("../types").ActiveTool;
259
- preferredSelectionTool: {
260
- type: "selection" | "lasso";
261
- initialized: boolean;
262
- };
263
- penMode: boolean;
264
- penDetected: boolean;
265
- exportBackground: boolean;
266
- exportEmbedScene: boolean;
267
- exportWithDarkMode: boolean;
268
- exportScale: number;
269
- currentItemStrokeColor: string;
270
- currentItemBackgroundColor: string;
271
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
272
- currentItemStrokeWidth: number;
273
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
274
- currentItemRoughness: number;
275
- currentItemOpacity: number;
276
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
277
- currentItemFontSize: number;
278
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
279
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
280
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
281
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
282
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
283
- currentItemArrowType: "sharp" | "round" | "elbow";
284
- viewBackgroundColor: string;
285
- scrollX: number;
286
- scrollY: number;
287
- cursorButton: "up" | "down";
288
- scrolledOutside: boolean;
289
- name: string | null;
290
- isResizing: boolean;
291
- isRotating: boolean;
292
- zoom: import("../types").Zoom;
293
- openMenu: "canvas" | null;
294
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
295
- openSidebar: {
296
- name: import("../types").SidebarName;
297
- tab?: import("../types").SidebarTabName;
298
- } | null;
299
- defaultSidebarDockedPreference: boolean;
300
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
301
- selectedElementIds: Readonly<{
302
- [id: string]: true;
303
- }>;
304
- hoveredElementIds: Readonly<{
305
- [id: string]: true;
306
- }>;
307
- previousSelectedElementIds: {
308
- [id: string]: true;
309
- };
310
- selectedElementsAreBeingDragged: boolean;
311
- shouldCacheIgnoreZoom: boolean;
312
- zenModeEnabled: boolean;
313
- theme: Theme;
314
- gridSize: number;
315
- gridStep: number;
316
- gridModeEnabled: boolean;
317
- viewModeEnabled: boolean;
318
- selectedGroupIds: {
319
- [groupId: string]: boolean;
320
- };
321
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
322
- width: number;
323
- height: number;
324
- offsetTop: number;
325
- offsetLeft: number;
326
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
327
- stats: {
328
- open: boolean;
329
- panels: number;
330
- };
331
- currentChartType: import("@excalidraw/element/types").ChartType;
332
- pasteDialog: {
333
- shown: false;
334
- data: null;
335
- } | {
336
- shown: true;
337
- data: import("../charts").Spreadsheet;
338
- };
339
- showHyperlinkPopup: false | "info" | "editor";
340
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
341
- snapLines: readonly import("../snapping").SnapLine[];
342
- originSnapOffset: {
343
- x: number;
344
- y: number;
345
- } | null;
346
- objectsSnapModeEnabled: boolean;
347
- userToFollow: import("../types").UserToFollow | null;
348
- followedBy: Set<import("../types").SocketId>;
349
- isCropping: boolean;
350
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
351
- searchMatches: Readonly<{
352
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
353
- matches: readonly import("../types").SearchMatch[];
354
- }> | null;
355
- activeLockedId: string | null;
356
- lockedMultiSelections: {
357
- [groupId: string]: true;
358
- };
359
- bindMode: import("@excalidraw/element/types").BindMode;
360
61
  };
361
62
  } | {
362
- captureUpdate: "EVENTUALLY";
363
- appState?: undefined;
63
+ captureUpdate: "NEVER";
64
+ appState: {
65
+ toast: null;
66
+ openDialog?: undefined;
67
+ fileHandle?: undefined;
68
+ };
364
69
  }>;
365
70
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
366
71
  PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -373,8 +78,8 @@ export declare const actionLoadScene: {
373
78
  trackEvent: {
374
79
  category: "export";
375
80
  };
376
- predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
377
- 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 | {
378
83
  elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
379
84
  appState: {
380
85
  viewBackgroundColor: string;
@@ -398,13 +103,22 @@ export declare const actionLoadScene: {
398
103
  name: "settings";
399
104
  } | {
400
105
  name: "elementLinkSelector";
401
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
106
+ sourceElementId: ExcalidrawElement["id"];
107
+ } | {
108
+ name: "charts";
109
+ data: import("../charts").Spreadsheet;
110
+ rawText: string;
402
111
  };
403
112
  editingGroupId: import("@excalidraw/element/types").GroupId | null;
404
113
  selectedElementIds: Readonly<{
405
114
  [id: string]: true;
406
115
  }>;
407
116
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
117
+ activeTool: {
118
+ lastActiveTool: import("../types").ActiveTool | null;
119
+ locked: boolean;
120
+ fromSelection: boolean;
121
+ } & import("../types").ActiveTool;
408
122
  activeEmbeddable: {
409
123
  element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
410
124
  state: "hover" | "active";
@@ -417,17 +131,21 @@ export declare const actionLoadScene: {
417
131
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
418
132
  newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
419
133
  isBindingEnabled: boolean;
420
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
134
+ isMidpointSnappingEnabled: boolean;
135
+ suggestedBinding: {
136
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
137
+ midPoint?: import("@excalidraw/math").GlobalPoint;
138
+ } | null;
421
139
  isRotating: boolean;
422
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
140
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
423
141
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
424
142
  snapLines: readonly import("../snapping").SnapLine[];
425
143
  zenModeEnabled: boolean;
426
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
144
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
427
145
  isCropping: boolean;
428
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
146
+ croppingElementId: ExcalidrawElement["id"] | null;
429
147
  searchMatches: Readonly<{
430
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
148
+ focusedId: ExcalidrawElement["id"] | null;
431
149
  matches: readonly import("../types").SearchMatch[];
432
150
  }> | null;
433
151
  activeLockedId: string | null;
@@ -436,6 +154,7 @@ export declare const actionLoadScene: {
436
154
  }>;
437
155
  shouldCacheIgnoreZoom: boolean;
438
156
  exportScale: number;
157
+ currentItemArrowType: "sharp" | "round" | "elbow";
439
158
  bindMode: import("@excalidraw/element/types").BindMode;
440
159
  gridSize: number;
441
160
  contextMenu: {
@@ -459,13 +178,9 @@ export declare const actionLoadScene: {
459
178
  };
460
179
  errorMessage: React.ReactNode;
461
180
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
181
+ bindingPreference: "enabled" | "disabled";
462
182
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
463
183
  editingFrame: string | null;
464
- activeTool: {
465
- lastActiveTool: import("../types").ActiveTool | null;
466
- locked: boolean;
467
- fromSelection: boolean;
468
- } & import("../types").ActiveTool;
469
184
  preferredSelectionTool: {
470
185
  type: "selection" | "lasso";
471
186
  initialized: boolean;
@@ -477,9 +192,9 @@ export declare const actionLoadScene: {
477
192
  exportWithDarkMode: boolean;
478
193
  currentItemStrokeColor: string;
479
194
  currentItemBackgroundColor: string;
480
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
195
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
481
196
  currentItemStrokeWidth: number;
482
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
197
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
483
198
  currentItemRoughness: number;
484
199
  currentItemOpacity: number;
485
200
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
@@ -489,7 +204,6 @@ export declare const actionLoadScene: {
489
204
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
490
205
  currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
491
206
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
492
- currentItemArrowType: "sharp" | "round" | "elbow";
493
207
  cursorButton: "up" | "down";
494
208
  scrolledOutside: boolean;
495
209
  isResizing: boolean;
@@ -506,25 +220,17 @@ export declare const actionLoadScene: {
506
220
  };
507
221
  selectedElementsAreBeingDragged: boolean;
508
222
  toast: {
509
- message: string;
223
+ message: React.ReactNode;
510
224
  closable?: boolean;
511
225
  duration?: number;
512
226
  } | null;
513
227
  gridStep: number;
514
228
  gridModeEnabled: boolean;
515
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
229
+ fileHandle: FileSystemFileHandle | null;
516
230
  stats: {
517
231
  open: boolean;
518
232
  panels: number;
519
233
  };
520
- currentChartType: import("@excalidraw/element/types").ChartType;
521
- pasteDialog: {
522
- shown: false;
523
- data: null;
524
- } | {
525
- shown: true;
526
- data: import("../charts").Spreadsheet;
527
- };
528
234
  showHyperlinkPopup: false | "info" | "editor";
529
235
  originSnapOffset: {
530
236
  x: number;
@@ -537,7 +243,7 @@ export declare const actionLoadScene: {
537
243
  [groupId: string]: true;
538
244
  };
539
245
  };
540
- files: import("../types").BinaryFiles;
246
+ files: BinaryFiles;
541
247
  captureUpdate: "IMMEDIATELY";
542
248
  } | {
543
249
  elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
@@ -571,8 +277,13 @@ export declare const actionLoadScene: {
571
277
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
572
278
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
573
279
  isBindingEnabled: boolean;
280
+ bindingPreference: "enabled" | "disabled";
281
+ isMidpointSnappingEnabled: boolean;
574
282
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
575
- suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
283
+ suggestedBinding: {
284
+ element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
285
+ midPoint?: import("@excalidraw/math").GlobalPoint;
286
+ } | null;
576
287
  frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
577
288
  frameRendering: {
578
289
  enabled: boolean;
@@ -581,8 +292,8 @@ export declare const actionLoadScene: {
581
292
  clip: boolean;
582
293
  };
583
294
  editingFrame: string | null;
584
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
585
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
295
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
296
+ editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
586
297
  activeTool: {
587
298
  lastActiveTool: import("../types").ActiveTool | null;
588
299
  locked: boolean;
@@ -600,9 +311,9 @@ export declare const actionLoadScene: {
600
311
  exportScale: number;
601
312
  currentItemStrokeColor: string;
602
313
  currentItemBackgroundColor: string;
603
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
314
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
604
315
  currentItemStrokeWidth: number;
605
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
316
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
606
317
  currentItemRoughness: number;
607
318
  currentItemOpacity: number;
608
319
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
@@ -636,7 +347,11 @@ export declare const actionLoadScene: {
636
347
  name: "settings";
637
348
  } | {
638
349
  name: "elementLinkSelector";
639
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
350
+ sourceElementId: ExcalidrawElement["id"];
351
+ } | {
352
+ name: "charts";
353
+ data: import("../charts").Spreadsheet;
354
+ rawText: string;
640
355
  };
641
356
  defaultSidebarDockedPreference: boolean;
642
357
  lastPointerDownWith: import("@excalidraw/element/types").PointerType;
@@ -652,7 +367,7 @@ export declare const actionLoadScene: {
652
367
  selectedElementsAreBeingDragged: boolean;
653
368
  shouldCacheIgnoreZoom: boolean;
654
369
  toast: {
655
- message: string;
370
+ message: React.ReactNode;
656
371
  closable?: boolean;
657
372
  duration?: number;
658
373
  } | null;
@@ -670,20 +385,12 @@ export declare const actionLoadScene: {
670
385
  height: number;
671
386
  offsetTop: number;
672
387
  offsetLeft: number;
673
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
388
+ fileHandle: FileSystemFileHandle | null;
674
389
  collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
675
390
  stats: {
676
391
  open: boolean;
677
392
  panels: number;
678
393
  };
679
- currentChartType: import("@excalidraw/element/types").ChartType;
680
- pasteDialog: {
681
- shown: false;
682
- data: null;
683
- } | {
684
- shown: true;
685
- data: import("../charts").Spreadsheet;
686
- };
687
394
  showHyperlinkPopup: false | "info" | "editor";
688
395
  selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
689
396
  snapLines: readonly import("../snapping").SnapLine[];
@@ -695,9 +402,9 @@ export declare const actionLoadScene: {
695
402
  userToFollow: import("../types").UserToFollow | null;
696
403
  followedBy: Set<import("../types").SocketId>;
697
404
  isCropping: boolean;
698
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
405
+ croppingElementId: ExcalidrawElement["id"] | null;
699
406
  searchMatches: Readonly<{
700
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
407
+ focusedId: ExcalidrawElement["id"] | null;
701
408
  matches: readonly import("../types").SearchMatch[];
702
409
  }> | null;
703
410
  activeLockedId: string | null;
@@ -706,7 +413,7 @@ export declare const actionLoadScene: {
706
413
  };
707
414
  bindMode: import("@excalidraw/element/types").BindMode;
708
415
  };
709
- files: import("../types").BinaryFiles;
416
+ files: BinaryFiles;
710
417
  captureUpdate: "EVENTUALLY";
711
418
  }>;
712
419
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
@@ -714,5 +421,5 @@ export declare const actionLoadScene: {
714
421
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
715
422
  };
716
423
  export declare const actionExportWithDarkMode: import("./types").Action<boolean> & {
717
- keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
424
+ keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
718
425
  };