@excalidraw/common 0.18.0-2874f9e → 0.18.0-2b0e4c9
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.
- package/dist/dev/index.js +137 -19
- package/dist/dev/index.js.map +3 -3
- package/dist/prod/index.js +3 -3
- package/dist/types/common/src/appEventBus.d.ts +27 -0
- package/dist/types/common/src/colors.d.ts +13 -13
- package/dist/types/common/src/index.d.ts +2 -0
- package/dist/types/common/src/utils.d.ts +1 -3
- package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
- package/dist/types/element/src/Scene.d.ts +2 -0
- package/dist/types/element/src/arrowheads.d.ts +3 -0
- package/dist/types/element/src/binding.d.ts +3 -4
- package/dist/types/element/src/bounds.d.ts +1 -1
- package/dist/types/element/src/elbowArrow.d.ts +2 -0
- package/dist/types/element/src/index.d.ts +1 -0
- package/dist/types/element/src/linearElementEditor.d.ts +3 -0
- package/dist/types/element/src/mutateElement.d.ts +2 -0
- package/dist/types/element/src/selection.d.ts +1 -1
- package/dist/types/element/src/types.d.ts +5 -2
- package/dist/types/element/src/utils.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +23 -29
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +16 -20
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +160 -184
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +16 -20
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +8 -10
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +25 -31
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +4 -10
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +16 -20
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +8 -10
- package/dist/types/excalidraw/actions/actionExport.d.ts +104 -388
- package/dist/types/excalidraw/actions/actionFrame.d.ts +32 -40
- package/dist/types/excalidraw/actions/actionGroup.d.ts +18 -22
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +8 -10
- package/dist/types/excalidraw/actions/actionLink.d.ts +8 -10
- package/dist/types/excalidraw/actions/actionMenu.d.ts +4 -10
- package/dist/types/excalidraw/actions/actionProperties.d.ts +17 -21
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +9 -11
- package/dist/types/excalidraw/actions/actionStyles.d.ts +7 -9
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +172 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +8 -10
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +172 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +8 -10
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +4 -10
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +8 -10
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +8 -10
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +8 -10
- package/dist/types/excalidraw/actions/index.d.ts +2 -0
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +29 -27
- package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
- package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
- package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
- package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
- package/dist/types/excalidraw/charts/index.d.ts +7 -0
- package/dist/types/excalidraw/clipboard.d.ts +4 -7
- package/dist/types/excalidraw/components/App.d.ts +33 -11
- package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
- package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
- package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
- package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
- package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
- package/dist/types/excalidraw/components/Toast.d.ts +8 -4
- package/dist/types/excalidraw/components/icons.d.ts +17 -8
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -0
- package/dist/types/excalidraw/data/blob.d.ts +157 -162
- package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
- package/dist/types/excalidraw/data/index.d.ts +2 -3
- package/dist/types/excalidraw/data/json.d.ts +90 -84
- package/dist/types/excalidraw/data/resave.d.ts +7 -2
- package/dist/types/excalidraw/types.d.ts +83 -13
- package/package.json +1 -1
- package/dist/types/excalidraw/charts.d.ts +0 -27
- package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
- package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
- package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
- package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
- package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
- package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
- package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
- package/dist/types/excalidraw/index.d.ts +0 -47
- package/dist/types/excalidraw/polyfill.d.ts +0 -2
|
@@ -26,6 +26,8 @@ export declare const actionAddToLibrary: {
|
|
|
26
26
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
27
27
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
28
28
|
isBindingEnabled: boolean;
|
|
29
|
+
bindingPreference: "enabled" | "disabled";
|
|
30
|
+
isMidpointSnappingEnabled: boolean;
|
|
29
31
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
30
32
|
suggestedBinding: {
|
|
31
33
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
@@ -98,6 +100,10 @@ export declare const actionAddToLibrary: {
|
|
|
98
100
|
} | {
|
|
99
101
|
name: "elementLinkSelector";
|
|
100
102
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
103
|
+
} | {
|
|
104
|
+
name: "charts";
|
|
105
|
+
data: import("../charts").Spreadsheet;
|
|
106
|
+
rawText: string;
|
|
101
107
|
};
|
|
102
108
|
defaultSidebarDockedPreference: boolean;
|
|
103
109
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -126,20 +132,12 @@ export declare const actionAddToLibrary: {
|
|
|
126
132
|
height: number;
|
|
127
133
|
offsetTop: number;
|
|
128
134
|
offsetLeft: number;
|
|
129
|
-
fileHandle:
|
|
135
|
+
fileHandle: FileSystemFileHandle | null;
|
|
130
136
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
131
137
|
stats: {
|
|
132
138
|
open: boolean;
|
|
133
139
|
panels: number;
|
|
134
140
|
};
|
|
135
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
136
|
-
pasteDialog: {
|
|
137
|
-
shown: false;
|
|
138
|
-
data: null;
|
|
139
|
-
} | {
|
|
140
|
-
shown: true;
|
|
141
|
-
data: import("../charts").Spreadsheet;
|
|
142
|
-
};
|
|
143
141
|
showHyperlinkPopup: false | "info" | "editor";
|
|
144
142
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
145
143
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -182,6 +180,8 @@ export declare const actionAddToLibrary: {
|
|
|
182
180
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
183
181
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
184
182
|
isBindingEnabled: boolean;
|
|
183
|
+
bindingPreference: "enabled" | "disabled";
|
|
184
|
+
isMidpointSnappingEnabled: boolean;
|
|
185
185
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
186
186
|
suggestedBinding: {
|
|
187
187
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
@@ -254,6 +254,10 @@ export declare const actionAddToLibrary: {
|
|
|
254
254
|
} | {
|
|
255
255
|
name: "elementLinkSelector";
|
|
256
256
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
257
|
+
} | {
|
|
258
|
+
name: "charts";
|
|
259
|
+
data: import("../charts").Spreadsheet;
|
|
260
|
+
rawText: string;
|
|
257
261
|
};
|
|
258
262
|
defaultSidebarDockedPreference: boolean;
|
|
259
263
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -269,7 +273,7 @@ export declare const actionAddToLibrary: {
|
|
|
269
273
|
selectedElementsAreBeingDragged: boolean;
|
|
270
274
|
shouldCacheIgnoreZoom: boolean;
|
|
271
275
|
toast: {
|
|
272
|
-
message:
|
|
276
|
+
message: React.ReactNode;
|
|
273
277
|
closable?: boolean;
|
|
274
278
|
duration?: number;
|
|
275
279
|
} | null;
|
|
@@ -287,20 +291,12 @@ export declare const actionAddToLibrary: {
|
|
|
287
291
|
height: number;
|
|
288
292
|
offsetTop: number;
|
|
289
293
|
offsetLeft: number;
|
|
290
|
-
fileHandle:
|
|
294
|
+
fileHandle: FileSystemFileHandle | null;
|
|
291
295
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
292
296
|
stats: {
|
|
293
297
|
open: boolean;
|
|
294
298
|
panels: number;
|
|
295
299
|
};
|
|
296
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
297
|
-
pasteDialog: {
|
|
298
|
-
shown: false;
|
|
299
|
-
data: null;
|
|
300
|
-
} | {
|
|
301
|
-
shown: true;
|
|
302
|
-
data: import("../charts").Spreadsheet;
|
|
303
|
-
};
|
|
304
300
|
showHyperlinkPopup: false | "info" | "editor";
|
|
305
301
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
306
302
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -343,6 +339,8 @@ export declare const actionAddToLibrary: {
|
|
|
343
339
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
344
340
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
345
341
|
isBindingEnabled: boolean;
|
|
342
|
+
bindingPreference: "enabled" | "disabled";
|
|
343
|
+
isMidpointSnappingEnabled: boolean;
|
|
346
344
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
347
345
|
suggestedBinding: {
|
|
348
346
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
@@ -415,6 +413,10 @@ export declare const actionAddToLibrary: {
|
|
|
415
413
|
} | {
|
|
416
414
|
name: "elementLinkSelector";
|
|
417
415
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
416
|
+
} | {
|
|
417
|
+
name: "charts";
|
|
418
|
+
data: import("../charts").Spreadsheet;
|
|
419
|
+
rawText: string;
|
|
418
420
|
};
|
|
419
421
|
defaultSidebarDockedPreference: boolean;
|
|
420
422
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -430,7 +432,7 @@ export declare const actionAddToLibrary: {
|
|
|
430
432
|
selectedElementsAreBeingDragged: boolean;
|
|
431
433
|
shouldCacheIgnoreZoom: boolean;
|
|
432
434
|
toast: {
|
|
433
|
-
message:
|
|
435
|
+
message: React.ReactNode;
|
|
434
436
|
closable?: boolean;
|
|
435
437
|
duration?: number;
|
|
436
438
|
} | null;
|
|
@@ -448,20 +450,12 @@ export declare const actionAddToLibrary: {
|
|
|
448
450
|
height: number;
|
|
449
451
|
offsetTop: number;
|
|
450
452
|
offsetLeft: number;
|
|
451
|
-
fileHandle:
|
|
453
|
+
fileHandle: FileSystemFileHandle | null;
|
|
452
454
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
453
455
|
stats: {
|
|
454
456
|
open: boolean;
|
|
455
457
|
panels: number;
|
|
456
458
|
};
|
|
457
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
458
|
-
pasteDialog: {
|
|
459
|
-
shown: false;
|
|
460
|
-
data: null;
|
|
461
|
-
} | {
|
|
462
|
-
shown: true;
|
|
463
|
-
data: import("../charts").Spreadsheet;
|
|
464
|
-
};
|
|
465
459
|
showHyperlinkPopup: false | "info" | "editor";
|
|
466
460
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
467
461
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -46,6 +46,8 @@ export declare const actionBindText: {
|
|
|
46
46
|
multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
47
47
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
48
48
|
isBindingEnabled: boolean;
|
|
49
|
+
bindingPreference: "enabled" | "disabled";
|
|
50
|
+
isMidpointSnappingEnabled: boolean;
|
|
49
51
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
50
52
|
suggestedBinding: {
|
|
51
53
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
@@ -118,6 +120,10 @@ export declare const actionBindText: {
|
|
|
118
120
|
} | {
|
|
119
121
|
name: "elementLinkSelector";
|
|
120
122
|
sourceElementId: ExcalidrawElement["id"];
|
|
123
|
+
} | {
|
|
124
|
+
name: "charts";
|
|
125
|
+
data: import("../charts").Spreadsheet;
|
|
126
|
+
rawText: string;
|
|
121
127
|
};
|
|
122
128
|
defaultSidebarDockedPreference: boolean;
|
|
123
129
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -130,7 +136,7 @@ export declare const actionBindText: {
|
|
|
130
136
|
selectedElementsAreBeingDragged: boolean;
|
|
131
137
|
shouldCacheIgnoreZoom: boolean;
|
|
132
138
|
toast: {
|
|
133
|
-
message:
|
|
139
|
+
message: React.ReactNode;
|
|
134
140
|
closable?: boolean;
|
|
135
141
|
duration?: number;
|
|
136
142
|
} | null;
|
|
@@ -148,20 +154,12 @@ export declare const actionBindText: {
|
|
|
148
154
|
height: number;
|
|
149
155
|
offsetTop: number;
|
|
150
156
|
offsetLeft: number;
|
|
151
|
-
fileHandle:
|
|
157
|
+
fileHandle: FileSystemFileHandle | null;
|
|
152
158
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
153
159
|
stats: {
|
|
154
160
|
open: boolean;
|
|
155
161
|
panels: number;
|
|
156
162
|
};
|
|
157
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
158
|
-
pasteDialog: {
|
|
159
|
-
shown: false;
|
|
160
|
-
data: null;
|
|
161
|
-
} | {
|
|
162
|
-
shown: true;
|
|
163
|
-
data: import("../charts").Spreadsheet;
|
|
164
|
-
};
|
|
165
163
|
showHyperlinkPopup: false | "info" | "editor";
|
|
166
164
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
167
165
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -219,6 +217,8 @@ export declare const actionWrapTextInContainer: {
|
|
|
219
217
|
multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
220
218
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
221
219
|
isBindingEnabled: boolean;
|
|
220
|
+
bindingPreference: "enabled" | "disabled";
|
|
221
|
+
isMidpointSnappingEnabled: boolean;
|
|
222
222
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
223
223
|
suggestedBinding: {
|
|
224
224
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
@@ -291,6 +291,10 @@ export declare const actionWrapTextInContainer: {
|
|
|
291
291
|
} | {
|
|
292
292
|
name: "elementLinkSelector";
|
|
293
293
|
sourceElementId: ExcalidrawElement["id"];
|
|
294
|
+
} | {
|
|
295
|
+
name: "charts";
|
|
296
|
+
data: import("../charts").Spreadsheet;
|
|
297
|
+
rawText: string;
|
|
294
298
|
};
|
|
295
299
|
defaultSidebarDockedPreference: boolean;
|
|
296
300
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -303,7 +307,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
303
307
|
selectedElementsAreBeingDragged: boolean;
|
|
304
308
|
shouldCacheIgnoreZoom: boolean;
|
|
305
309
|
toast: {
|
|
306
|
-
message:
|
|
310
|
+
message: React.ReactNode;
|
|
307
311
|
closable?: boolean;
|
|
308
312
|
duration?: number;
|
|
309
313
|
} | null;
|
|
@@ -321,20 +325,12 @@ export declare const actionWrapTextInContainer: {
|
|
|
321
325
|
height: number;
|
|
322
326
|
offsetTop: number;
|
|
323
327
|
offsetLeft: number;
|
|
324
|
-
fileHandle:
|
|
328
|
+
fileHandle: FileSystemFileHandle | null;
|
|
325
329
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
326
330
|
stats: {
|
|
327
331
|
open: boolean;
|
|
328
332
|
panels: number;
|
|
329
333
|
};
|
|
330
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
331
|
-
pasteDialog: {
|
|
332
|
-
shown: false;
|
|
333
|
-
data: null;
|
|
334
|
-
} | {
|
|
335
|
-
shown: true;
|
|
336
|
-
data: import("../charts").Spreadsheet;
|
|
337
|
-
};
|
|
338
334
|
showHyperlinkPopup: false | "info" | "editor";
|
|
339
335
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
340
336
|
snapLines: readonly import("../snapping").SnapLine[];
|