@excalidraw/common 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 (91) hide show
  1. package/dist/dev/index.js +137 -19
  2. package/dist/dev/index.js.map +3 -3
  3. package/dist/prod/index.js +3 -3
  4. package/dist/types/common/src/appEventBus.d.ts +27 -0
  5. package/dist/types/common/src/colors.d.ts +13 -13
  6. package/dist/types/common/src/index.d.ts +2 -0
  7. package/dist/types/common/src/utils.d.ts +1 -3
  8. package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
  9. package/dist/types/element/src/Scene.d.ts +2 -0
  10. package/dist/types/element/src/arrowheads.d.ts +3 -0
  11. package/dist/types/element/src/binding.d.ts +3 -4
  12. package/dist/types/element/src/bounds.d.ts +1 -1
  13. package/dist/types/element/src/elbowArrow.d.ts +2 -0
  14. package/dist/types/element/src/index.d.ts +1 -0
  15. package/dist/types/element/src/linearElementEditor.d.ts +3 -0
  16. package/dist/types/element/src/mutateElement.d.ts +2 -0
  17. package/dist/types/element/src/selection.d.ts +1 -1
  18. package/dist/types/element/src/types.d.ts +5 -2
  19. package/dist/types/element/src/utils.d.ts +1 -1
  20. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +23 -29
  21. package/dist/types/excalidraw/actions/actionBoundText.d.ts +16 -20
  22. package/dist/types/excalidraw/actions/actionCanvas.d.ts +161 -185
  23. package/dist/types/excalidraw/actions/actionClipboard.d.ts +16 -20
  24. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +8 -10
  25. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +25 -31
  26. package/dist/types/excalidraw/actions/actionElementLink.d.ts +4 -10
  27. package/dist/types/excalidraw/actions/actionElementLock.d.ts +16 -20
  28. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +8 -10
  29. package/dist/types/excalidraw/actions/actionExport.d.ts +104 -388
  30. package/dist/types/excalidraw/actions/actionFrame.d.ts +32 -40
  31. package/dist/types/excalidraw/actions/actionGroup.d.ts +18 -22
  32. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +8 -10
  33. package/dist/types/excalidraw/actions/actionLink.d.ts +8 -10
  34. package/dist/types/excalidraw/actions/actionMenu.d.ts +4 -10
  35. package/dist/types/excalidraw/actions/actionProperties.d.ts +17 -21
  36. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +9 -11
  37. package/dist/types/excalidraw/actions/actionStyles.d.ts +7 -9
  38. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +172 -0
  39. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +8 -10
  40. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +172 -0
  41. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +8 -10
  42. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +4 -10
  43. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +8 -10
  44. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +8 -10
  45. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +8 -10
  46. package/dist/types/excalidraw/actions/index.d.ts +2 -0
  47. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  48. package/dist/types/excalidraw/appState.d.ts +29 -27
  49. package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
  50. package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
  51. package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
  52. package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
  53. package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
  54. package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
  55. package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
  56. package/dist/types/excalidraw/charts/index.d.ts +7 -0
  57. package/dist/types/excalidraw/clipboard.d.ts +4 -7
  58. package/dist/types/excalidraw/components/App.d.ts +33 -11
  59. package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
  60. package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
  61. package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
  62. package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
  63. package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
  64. package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
  65. package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
  66. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
  67. package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
  68. package/dist/types/excalidraw/components/Toast.d.ts +8 -4
  69. package/dist/types/excalidraw/components/icons.d.ts +17 -8
  70. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -0
  71. package/dist/types/excalidraw/data/blob.d.ts +157 -162
  72. package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
  73. package/dist/types/excalidraw/data/index.d.ts +2 -3
  74. package/dist/types/excalidraw/data/json.d.ts +90 -84
  75. package/dist/types/excalidraw/data/resave.d.ts +7 -2
  76. package/dist/types/excalidraw/types.d.ts +84 -13
  77. package/package.json +1 -1
  78. package/dist/types/excalidraw/charts.d.ts +0 -27
  79. package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
  80. package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
  81. package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
  82. package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
  83. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
  84. package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
  85. package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
  86. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
  87. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
  88. package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
  89. package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
  90. package/dist/types/excalidraw/index.d.ts +0 -47
  91. 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;
59
- };
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;
30
+ duration: number;
71
31
  };
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,14 +49,52 @@ 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
  };
61
+ };
62
+ } | {
63
+ captureUpdate: "NEVER";
64
+ appState: {
65
+ toast: null;
66
+ openDialog?: undefined;
67
+ fileHandle?: undefined;
68
+ };
69
+ }>;
70
+ keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
71
+ PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
72
+ } & {
73
+ keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
74
+ };
75
+ export declare const actionLoadScene: {
76
+ name: "loadScene";
77
+ label: string;
78
+ trackEvent: {
79
+ category: "export";
80
+ };
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 | {
83
+ elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
84
+ appState: {
85
+ viewModeEnabled: boolean;
86
+ zenModeEnabled: boolean;
87
+ gridModeEnabled: boolean;
88
+ objectsSnapModeEnabled: boolean;
89
+ theme: Theme;
90
+ name: string | null;
91
+ currentItemArrowType: "sharp" | "round" | "elbow";
92
+ gridSize: number;
93
+ activeTool: {
94
+ lastActiveTool: import("../types").ActiveTool | null;
95
+ locked: boolean;
96
+ fromSelection: boolean;
97
+ } & import("../types").ActiveTool;
207
98
  contextMenu: {
208
99
  items: import("../components/ContextMenu").ContextMenuItems;
209
100
  top: number;
@@ -221,6 +112,8 @@ export declare const actionSaveFileToDisk: {
221
112
  multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
222
113
  selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
223
114
  isBindingEnabled: boolean;
115
+ bindingPreference: "enabled" | "disabled";
116
+ isMidpointSnappingEnabled: boolean;
224
117
  startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
225
118
  suggestedBinding: {
226
119
  element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
@@ -234,13 +127,8 @@ export declare const actionSaveFileToDisk: {
234
127
  clip: boolean;
235
128
  };
236
129
  editingFrame: string | null;
237
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
130
+ elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
238
131
  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
132
  preferredSelectionTool: {
245
133
  type: "selection" | "lasso";
246
134
  initialized: boolean;
@@ -253,9 +141,9 @@ export declare const actionSaveFileToDisk: {
253
141
  exportScale: number;
254
142
  currentItemStrokeColor: string;
255
143
  currentItemBackgroundColor: string;
256
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
144
+ currentItemFillStyle: ExcalidrawElement["fillStyle"];
257
145
  currentItemStrokeWidth: number;
258
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
146
+ currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
259
147
  currentItemRoughness: number;
260
148
  currentItemOpacity: number;
261
149
  currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
@@ -265,13 +153,11 @@ export declare const actionSaveFileToDisk: {
265
153
  currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
266
154
  currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
267
155
  currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
268
- currentItemArrowType: "sharp" | "round" | "elbow";
269
156
  viewBackgroundColor: string;
270
157
  scrollX: number;
271
158
  scrollY: number;
272
159
  cursorButton: "up" | "down";
273
160
  scrolledOutside: boolean;
274
- name: string | null;
275
161
  isResizing: boolean;
276
162
  isRotating: boolean;
277
163
  zoom: import("../types").Zoom;
@@ -281,100 +167,6 @@ export declare const actionSaveFileToDisk: {
281
167
  name: import("../types").SidebarName;
282
168
  tab?: import("../types").SidebarTabName;
283
169
  } | 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
- };
346
- } | {
347
- captureUpdate: "EVENTUALLY";
348
- appState?: undefined;
349
- }>;
350
- keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
351
- PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
352
- } & {
353
- keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
354
- };
355
- export declare const actionLoadScene: {
356
- name: "loadScene";
357
- label: string;
358
- trackEvent: {
359
- category: "export";
360
- };
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 | {
363
- elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
364
- appState: {
365
- viewBackgroundColor: string;
366
- theme: Theme;
367
- frameRendering: {
368
- enabled: boolean;
369
- name: boolean;
370
- outline: boolean;
371
- clip: boolean;
372
- };
373
- name: string | null;
374
- zoom: import("../types").Zoom;
375
- scrollX: number;
376
- scrollY: number;
377
- viewModeEnabled: boolean;
378
170
  openDialog: null | {
379
171
  name: "imageExport" | "help" | "jsonExport";
380
172
  } | {
@@ -386,137 +178,63 @@ export declare const actionLoadScene: {
386
178
  name: "settings";
387
179
  } | {
388
180
  name: "elementLinkSelector";
389
- sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
181
+ sourceElementId: ExcalidrawElement["id"];
182
+ } | {
183
+ name: "charts";
184
+ data: import("../charts").Spreadsheet;
185
+ rawText: string;
390
186
  };
391
- editingGroupId: import("@excalidraw/element/types").GroupId | null;
187
+ defaultSidebarDockedPreference: boolean;
188
+ lastPointerDownWith: import("@excalidraw/element/types").PointerType;
392
189
  selectedElementIds: Readonly<{
393
190
  [id: string]: true;
394
191
  }>;
395
- frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
396
- activeTool: {
397
- lastActiveTool: import("../types").ActiveTool | null;
398
- locked: boolean;
399
- fromSelection: boolean;
400
- } & import("../types").ActiveTool;
401
- activeEmbeddable: {
402
- element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
403
- state: "hover" | "active";
404
- } | null;
405
- selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
406
- selectedGroupIds: {
407
- [groupId: string]: boolean;
408
- };
409
- selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
410
- multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
411
- newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
412
- isBindingEnabled: boolean;
413
- suggestedBinding: {
414
- element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
415
- midPoint?: import("@excalidraw/math").GlobalPoint;
416
- } | null;
417
- isRotating: boolean;
418
- elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
419
- collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
420
- snapLines: readonly import("../snapping").SnapLine[];
421
- zenModeEnabled: boolean;
422
- editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
423
- isCropping: boolean;
424
- croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
425
- searchMatches: Readonly<{
426
- focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
427
- matches: readonly import("../types").SearchMatch[];
428
- }> | null;
429
- activeLockedId: string | null;
430
192
  hoveredElementIds: Readonly<{
431
193
  [id: string]: true;
432
194
  }>;
433
- shouldCacheIgnoreZoom: boolean;
434
- exportScale: number;
435
- bindMode: import("@excalidraw/element/types").BindMode;
436
- gridSize: number;
437
- contextMenu: {
438
- items: import("../components/ContextMenu").ContextMenuItems;
439
- top: number;
440
- left: number;
441
- } | null;
442
- showWelcomeScreen: boolean;
443
- isLoading: boolean;
444
- errorMessage: React.ReactNode;
445
- resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
446
- startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
447
- editingFrame: string | null;
448
- preferredSelectionTool: {
449
- type: "selection" | "lasso";
450
- initialized: boolean;
451
- };
452
- penMode: boolean;
453
- penDetected: boolean;
454
- exportBackground: boolean;
455
- exportEmbedScene: boolean;
456
- exportWithDarkMode: boolean;
457
- currentItemStrokeColor: string;
458
- currentItemBackgroundColor: string;
459
- currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
460
- currentItemStrokeWidth: number;
461
- currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
462
- currentItemRoughness: number;
463
- currentItemOpacity: number;
464
- currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
465
- currentItemFontSize: number;
466
- currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
467
- currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
468
- currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
469
- currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
470
- currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
471
- currentItemArrowType: "sharp" | "round" | "elbow";
472
- cursorButton: "up" | "down";
473
- scrolledOutside: boolean;
474
- isResizing: boolean;
475
- openMenu: "canvas" | null;
476
- openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
477
- openSidebar: {
478
- name: import("../types").SidebarName;
479
- tab?: import("../types").SidebarTabName;
480
- } | null;
481
- defaultSidebarDockedPreference: boolean;
482
- lastPointerDownWith: import("@excalidraw/element/types").PointerType;
483
195
  previousSelectedElementIds: {
484
196
  [id: string]: true;
485
197
  };
486
198
  selectedElementsAreBeingDragged: boolean;
199
+ shouldCacheIgnoreZoom: boolean;
487
200
  toast: {
488
- message: string;
201
+ message: React.ReactNode;
489
202
  closable?: boolean;
490
203
  duration?: number;
491
204
  } | null;
492
205
  gridStep: number;
493
- gridModeEnabled: boolean;
494
- fileHandle: import("browser-fs-access").FileSystemHandle | null;
206
+ selectedGroupIds: {
207
+ [groupId: string]: boolean;
208
+ };
209
+ editingGroupId: import("@excalidraw/element/types").GroupId | null;
210
+ fileHandle: FileSystemFileHandle | null;
211
+ collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
495
212
  stats: {
496
213
  open: boolean;
497
214
  panels: number;
498
215
  };
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
216
  showHyperlinkPopup: false | "info" | "editor";
217
+ selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
218
+ snapLines: readonly import("../snapping").SnapLine[];
508
219
  originSnapOffset: {
509
220
  x: number;
510
221
  y: number;
511
222
  } | null;
512
- objectsSnapModeEnabled: boolean;
513
223
  userToFollow: import("../types").UserToFollow | null;
514
224
  followedBy: Set<import("../types").SocketId>;
225
+ isCropping: boolean;
226
+ croppingElementId: ExcalidrawElement["id"] | null;
227
+ searchMatches: Readonly<{
228
+ focusedId: ExcalidrawElement["id"] | null;
229
+ matches: readonly import("../types").SearchMatch[];
230
+ }> | null;
231
+ activeLockedId: string | null;
515
232
  lockedMultiSelections: {
516
233
  [groupId: string]: true;
517
234
  };
235
+ bindMode: import("@excalidraw/element/types").BindMode;
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
  };