@myoc/math 0.19.502-ff5a131b0 → 0.19.504

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 (122) 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/arrange-algorithms/maxRects.d.ts +16 -0
  13. package/dist/types/element/src/arrowheads.d.ts +3 -0
  14. package/dist/types/element/src/arrows/focus.d.ts +27 -0
  15. package/dist/types/element/src/arrows/helpers.d.ts +5 -0
  16. package/dist/types/element/src/binding.d.ts +13 -8
  17. package/dist/types/element/src/bounds.d.ts +1 -1
  18. package/dist/types/element/src/collision.d.ts +4 -3
  19. package/dist/types/element/src/distribute.d.ts +2 -1
  20. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  21. package/dist/types/element/src/index.d.ts +4 -0
  22. package/dist/types/element/src/linearElementEditor.d.ts +6 -1
  23. package/dist/types/element/src/mutateElement.d.ts +2 -0
  24. package/dist/types/element/src/selection.d.ts +5 -1
  25. package/dist/types/element/src/shapes.d.ts +2 -22
  26. package/dist/types/element/src/textElement.d.ts +1 -1
  27. package/dist/types/element/src/textWrapping.d.ts +26 -0
  28. package/dist/types/element/src/types.d.ts +6 -3
  29. package/dist/types/element/src/utils.d.ts +5 -3
  30. package/dist/types/element/src/zindex.d.ts +1 -1
  31. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +38 -35
  32. package/dist/types/excalidraw/actions/actionAlign.d.ts +8 -8
  33. package/dist/types/excalidraw/actions/actionArrange.d.ts +2 -2
  34. package/dist/types/excalidraw/actions/actionBoundText.d.ts +27 -25
  35. package/dist/types/excalidraw/actions/actionCanvas.d.ts +159 -148
  36. package/dist/types/excalidraw/actions/actionClipboard.d.ts +28 -26
  37. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +13 -12
  38. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +43 -38
  39. package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -4
  40. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  41. package/dist/types/excalidraw/actions/actionElementLink.d.ts +9 -12
  42. package/dist/types/excalidraw/actions/actionElementLock.d.ts +28 -26
  43. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +13 -12
  44. package/dist/types/excalidraw/actions/actionExport.d.ts +87 -380
  45. package/dist/types/excalidraw/actions/actionFlip.d.ts +4 -4
  46. package/dist/types/excalidraw/actions/actionFrame.d.ts +54 -50
  47. package/dist/types/excalidraw/actions/actionGroup.d.ts +31 -29
  48. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +15 -12
  49. package/dist/types/excalidraw/actions/actionLink.d.ts +15 -14
  50. package/dist/types/excalidraw/actions/actionMenu.d.ts +11 -14
  51. package/dist/types/excalidraw/actions/actionProperties.d.ts +33 -31
  52. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +16 -15
  53. package/dist/types/excalidraw/actions/actionSmartZoom.d.ts +2 -2
  54. package/dist/types/excalidraw/actions/actionStyles.d.ts +17 -15
  55. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
  56. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +181 -0
  57. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +15 -14
  58. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +181 -0
  59. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +15 -14
  60. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +11 -14
  61. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +15 -14
  62. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +15 -14
  63. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +15 -14
  64. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
  65. package/dist/types/excalidraw/actions/index.d.ts +2 -0
  66. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  67. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  68. package/dist/types/excalidraw/appState.d.ts +15 -13
  69. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  70. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  71. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  72. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  73. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  74. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  75. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  76. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  77. package/dist/types/excalidraw/clipboard.d.ts +6 -7
  78. package/dist/types/excalidraw/components/App.d.ts +57 -14
  79. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  80. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -1
  81. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  82. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  83. package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
  84. package/dist/types/excalidraw/components/Range.d.ts +10 -4
  85. package/dist/types/excalidraw/components/Toast.d.ts +8 -4
  86. package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
  87. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -17
  88. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
  89. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -13
  90. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
  91. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
  92. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
  93. package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
  94. package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  95. package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
  96. package/dist/types/excalidraw/components/icons.d.ts +23 -9
  97. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +17 -0
  98. package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -13
  99. package/dist/types/excalidraw/data/blob.d.ts +57 -56
  100. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  101. package/dist/types/excalidraw/data/index.d.ts +2 -3
  102. package/dist/types/excalidraw/data/json.d.ts +43 -34
  103. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  104. package/dist/types/excalidraw/editorPreferences.d.ts +11 -0
  105. package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
  106. package/dist/types/excalidraw/types.d.ts +114 -16
  107. package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
  108. package/dist/types/math/src/point.d.ts +7 -2
  109. package/dist/types/math/src/types.d.ts +25 -1
  110. package/package.json +2 -2
  111. package/dist/types/excalidraw/charts.d.ts +0 -27
  112. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  113. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
  114. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  115. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  116. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
  117. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  118. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  119. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
  120. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  121. package/dist/types/excalidraw/index.d.ts +0 -42
  122. 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,179 +20,26 @@ 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;
49
- };
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;
30
+ duration: number;
80
31
  };
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
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => false;
40
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => false;
194
41
  } & {
195
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => false) | undefined;
42
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => false) | undefined;
196
43
  };
197
44
  export declare const actionSaveFileToDisk: {
198
45
  name: "saveFileToDisk";
@@ -202,170 +49,28 @@ 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
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
70
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
366
71
  PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
367
72
  } & {
368
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
73
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
369
74
  };
370
75
  export declare const actionLoadScene: {
371
76
  name: "loadScene";
@@ -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,8 +154,15 @@ 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;
160
+ gridModeEnabled: boolean;
161
+ objectsSnapModeEnabled: boolean;
162
+ wheelZoomsOnDefault?: boolean | undefined;
163
+ selectedElementsAreBeingDragged: boolean;
164
+ gridStep: number;
165
+ currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
441
166
  contextMenu: {
442
167
  items: import("../components/ContextMenu").ContextMenuItems;
443
168
  top: number;
@@ -448,7 +173,6 @@ export declare const actionLoadScene: {
448
173
  myocSimplifiedMode: boolean;
449
174
  dontResizeLimitMBs: number;
450
175
  hideMainMenus: boolean;
451
- wheelZoomsOnDefault?: boolean | undefined;
452
176
  arrangeConfiguration: {
453
177
  algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
454
178
  gap: number;
@@ -459,13 +183,9 @@ export declare const actionLoadScene: {
459
183
  };
460
184
  errorMessage: React.ReactNode;
461
185
  resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
186
+ bindingPreference: "enabled" | "disabled";
462
187
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
463
188
  editingFrame: string | null;
464
- activeTool: {
465
- lastActiveTool: import("../types").ActiveTool | null;
466
- locked: boolean;
467
- fromSelection: boolean;
468
- } & import("../types").ActiveTool;
469
189
  preferredSelectionTool: {
470
190
  type: "selection" | "lasso";
471
191
  initialized: boolean;
@@ -477,9 +197,9 @@ export declare const actionLoadScene: {
477
197
  exportWithDarkMode: boolean;
478
198
  currentItemStrokeColor: string;
479
199
  currentItemBackgroundColor: string;
480
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
200
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
481
201
  currentItemStrokeWidth: number;
482
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
202
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
483
203
  currentItemRoughness: number;
484
204
  currentItemOpacity: number;
485
205
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
@@ -487,9 +207,7 @@ export declare const actionLoadScene: {
487
207
  currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
488
208
  currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
489
209
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
490
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
491
210
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
492
- currentItemArrowType: "sharp" | "round" | "elbow";
493
211
  cursorButton: "up" | "down";
494
212
  scrolledOutside: boolean;
495
213
  isResizing: boolean;
@@ -504,40 +222,28 @@ export declare const actionLoadScene: {
504
222
  previousSelectedElementIds: {
505
223
  [id: string]: true;
506
224
  };
507
- selectedElementsAreBeingDragged: boolean;
508
225
  toast: {
509
- message: string;
226
+ message: React.ReactNode;
510
227
  closable?: boolean;
511
228
  duration?: number;
512
229
  } | null;
513
- gridStep: number;
514
- gridModeEnabled: boolean;
515
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
230
+ fileHandle: FileSystemFileHandle | null;
516
231
  stats: {
517
232
  open: boolean;
518
233
  panels: number;
519
234
  };
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
235
  showHyperlinkPopup: false | "info" | "editor";
529
236
  originSnapOffset: {
530
237
  x: number;
531
238
  y: number;
532
239
  } | null;
533
- objectsSnapModeEnabled: boolean;
534
240
  userToFollow: import("../types").UserToFollow | null;
535
241
  followedBy: Set<import("../types").SocketId>;
536
242
  lockedMultiSelections: {
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,13 +413,13 @@ 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
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
419
+ keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
713
420
  } & {
714
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
421
+ keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => 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
  };