@excalidraw/math 0.18.0-c65b684e9 → 0.18.0-dda3affcb
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/types/element/src/delta.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +0 -13
- package/dist/types/excalidraw/data/reconcile.d.ts +1 -0
- package/dist/types/excalidraw/data/restore.d.ts +6 -1
- package/dist/types/excalidraw/index.d.ts +1 -1
- package/dist/types/excalidraw/types.d.ts +4 -2
- package/package.json +2 -2
|
@@ -131,7 +131,6 @@ export declare class AppStateDelta implements DeltaContainer<AppState> {
|
|
|
131
131
|
* @returns `true` if a visible change is found, `false` otherwise.
|
|
132
132
|
*/
|
|
133
133
|
private filterInvisibleChanges;
|
|
134
|
-
private static convertToAppStateKey;
|
|
135
134
|
private static filterSelectedElements;
|
|
136
135
|
private static filterSelectedGroups;
|
|
137
136
|
private static stripElementsProps;
|
|
@@ -222,5 +221,6 @@ export declare class ElementsDelta implements DeltaContainer<SceneElementsMap> {
|
|
|
222
221
|
*/
|
|
223
222
|
private static postProcess;
|
|
224
223
|
private static stripIrrelevantProps;
|
|
224
|
+
private static stripVersionProps;
|
|
225
225
|
}
|
|
226
226
|
export {};
|
|
@@ -160,7 +160,6 @@ export declare const actionClearCanvas: {
|
|
|
160
160
|
openMenu: "canvas" | "shape" | null;
|
|
161
161
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
162
162
|
openSidebar: {
|
|
163
|
-
/** zoom content to cover X of the viewport, when fitToViewport=true */
|
|
164
163
|
name: string;
|
|
165
164
|
tab?: string | undefined;
|
|
166
165
|
} | null;
|
|
@@ -278,7 +277,6 @@ export declare const actionZoomIn: {
|
|
|
278
277
|
openMenu: "canvas" | "shape" | null;
|
|
279
278
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
280
279
|
openSidebar: {
|
|
281
|
-
/** zoom content to cover X of the viewport, when fitToViewport=true */
|
|
282
280
|
name: string;
|
|
283
281
|
tab?: string | undefined;
|
|
284
282
|
} | null;
|
|
@@ -465,7 +463,6 @@ export declare const actionZoomOut: {
|
|
|
465
463
|
openMenu: "canvas" | "shape" | null;
|
|
466
464
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
467
465
|
openSidebar: {
|
|
468
|
-
/** zoom content to cover X of the viewport, when fitToViewport=true */
|
|
469
466
|
name: string;
|
|
470
467
|
tab?: string | undefined;
|
|
471
468
|
} | null;
|
|
@@ -652,7 +649,6 @@ export declare const actionResetZoom: {
|
|
|
652
649
|
openMenu: "canvas" | "shape" | null;
|
|
653
650
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
654
651
|
openSidebar: {
|
|
655
|
-
/** zoom content to cover X of the viewport, when fitToViewport=true */
|
|
656
652
|
name: string;
|
|
657
653
|
tab?: string | undefined;
|
|
658
654
|
} | null;
|
|
@@ -845,7 +841,6 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
|
|
|
845
841
|
openMenu: "canvas" | "shape" | null;
|
|
846
842
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
847
843
|
openSidebar: {
|
|
848
|
-
/** zoom content to cover X of the viewport, when fitToViewport=true */
|
|
849
844
|
name: string;
|
|
850
845
|
tab?: string | undefined;
|
|
851
846
|
} | null;
|
|
@@ -1034,7 +1029,6 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
|
|
|
1034
1029
|
openMenu: "canvas" | "shape" | null;
|
|
1035
1030
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1036
1031
|
openSidebar: {
|
|
1037
|
-
/** zoom content to cover X of the viewport, when fitToViewport=true */
|
|
1038
1032
|
name: string;
|
|
1039
1033
|
tab?: string | undefined;
|
|
1040
1034
|
} | null;
|
|
@@ -1215,7 +1209,6 @@ export declare const actionZoomToFitSelectionInViewport: {
|
|
|
1215
1209
|
openMenu: "canvas" | "shape" | null;
|
|
1216
1210
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1217
1211
|
openSidebar: {
|
|
1218
|
-
/** zoom content to cover X of the viewport, when fitToViewport=true */
|
|
1219
1212
|
name: string;
|
|
1220
1213
|
tab?: string | undefined;
|
|
1221
1214
|
} | null;
|
|
@@ -1400,7 +1393,6 @@ export declare const actionZoomToFitSelection: {
|
|
|
1400
1393
|
openMenu: "canvas" | "shape" | null;
|
|
1401
1394
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1402
1395
|
openSidebar: {
|
|
1403
|
-
/** zoom content to cover X of the viewport, when fitToViewport=true */
|
|
1404
1396
|
name: string;
|
|
1405
1397
|
tab?: string | undefined;
|
|
1406
1398
|
} | null;
|
|
@@ -1586,7 +1578,6 @@ export declare const actionZoomToFit: {
|
|
|
1586
1578
|
openMenu: "canvas" | "shape" | null;
|
|
1587
1579
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1588
1580
|
openSidebar: {
|
|
1589
|
-
/** zoom content to cover X of the viewport, when fitToViewport=true */
|
|
1590
1581
|
name: string;
|
|
1591
1582
|
tab?: string | undefined;
|
|
1592
1583
|
} | null;
|
|
@@ -1774,7 +1765,6 @@ export declare const actionToggleTheme: {
|
|
|
1774
1765
|
openMenu: "canvas" | "shape" | null;
|
|
1775
1766
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1776
1767
|
openSidebar: {
|
|
1777
|
-
/** zoom content to cover X of the viewport, when fitToViewport=true */
|
|
1778
1768
|
name: string;
|
|
1779
1769
|
tab?: string | undefined;
|
|
1780
1770
|
} | null;
|
|
@@ -1957,7 +1947,6 @@ export declare const actionToggleEraserTool: {
|
|
|
1957
1947
|
openMenu: "canvas" | "shape" | null;
|
|
1958
1948
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1959
1949
|
openSidebar: {
|
|
1960
|
-
/** zoom content to cover X of the viewport, when fitToViewport=true */
|
|
1961
1950
|
name: string;
|
|
1962
1951
|
tab?: string | undefined;
|
|
1963
1952
|
} | null;
|
|
@@ -2135,7 +2124,6 @@ export declare const actionToggleLassoTool: {
|
|
|
2135
2124
|
openMenu: "canvas" | "shape" | null;
|
|
2136
2125
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
2137
2126
|
openSidebar: {
|
|
2138
|
-
/** zoom content to cover X of the viewport, when fitToViewport=true */
|
|
2139
2127
|
name: string;
|
|
2140
2128
|
tab?: string | undefined;
|
|
2141
2129
|
} | null;
|
|
@@ -2313,7 +2301,6 @@ export declare const actionToggleHandTool: {
|
|
|
2313
2301
|
openMenu: "canvas" | "shape" | null;
|
|
2314
2302
|
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
2315
2303
|
openSidebar: {
|
|
2316
|
-
/** zoom content to cover X of the viewport, when fitToViewport=true */
|
|
2317
2304
|
name: string;
|
|
2318
2305
|
tab?: string | undefined;
|
|
2319
2306
|
} | null;
|
|
@@ -3,4 +3,5 @@ import type { MakeBrand } from "@excalidraw/common/utility-types";
|
|
|
3
3
|
import type { AppState } from "../types";
|
|
4
4
|
export type ReconciledExcalidrawElement = OrderedExcalidrawElement & MakeBrand<"ReconciledElement">;
|
|
5
5
|
export type RemoteExcalidrawElement = OrderedExcalidrawElement & MakeBrand<"RemoteExcalidrawElement">;
|
|
6
|
+
export declare const shouldDiscardRemoteElement: (localAppState: AppState, local: OrderedExcalidrawElement | undefined, remote: RemoteExcalidrawElement) => boolean;
|
|
6
7
|
export declare const reconcileElements: (localElements: readonly OrderedExcalidrawElement[], remoteElements: readonly RemoteExcalidrawElement[], localAppState: AppState) => ReconciledExcalidrawElement[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExcalidrawElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
|
|
1
|
+
import type { ExcalidrawArrowElement, ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawSelectionElement, ExcalidrawTextElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
|
|
2
2
|
import type { AppState, BinaryFiles, LibraryItem } from "../types";
|
|
3
3
|
import type { ImportedDataState } from "./types";
|
|
4
4
|
type RestoredAppState = Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
|
|
@@ -8,14 +8,19 @@ export type RestoredDataState = {
|
|
|
8
8
|
appState: RestoredAppState;
|
|
9
9
|
files: BinaryFiles;
|
|
10
10
|
};
|
|
11
|
+
export declare const restoreElement: (element: Exclude<ExcalidrawElement, ExcalidrawSelectionElement>, opts?: {
|
|
12
|
+
deleteInvisibleElements?: boolean;
|
|
13
|
+
}) => ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement | ExcalidrawArrowElement | null;
|
|
11
14
|
export declare const restoreElements: (elements: ImportedDataState["elements"], localElements: readonly ExcalidrawElement[] | null | undefined, opts?: {
|
|
12
15
|
refreshDimensions?: boolean;
|
|
13
16
|
repairBindings?: boolean;
|
|
17
|
+
deleteInvisibleElements?: boolean;
|
|
14
18
|
} | undefined) => OrderedExcalidrawElement[];
|
|
15
19
|
export declare const restoreAppState: (appState: ImportedDataState["appState"], localAppState: Partial<AppState> | null | undefined) => RestoredAppState;
|
|
16
20
|
export declare const restore: (data: Pick<ImportedDataState, "appState" | "elements" | "files"> | null, localAppState: Partial<AppState> | null | undefined, localElements: readonly ExcalidrawElement[] | null | undefined, elementsConfig?: {
|
|
17
21
|
refreshDimensions?: boolean;
|
|
18
22
|
repairBindings?: boolean;
|
|
23
|
+
deleteInvisibleElements?: boolean;
|
|
19
24
|
}) => RestoredDataState;
|
|
20
25
|
export declare const restoreLibraryItems: (libraryItems: ImportedDataState["libraryItems"], defaultStatus: LibraryItem["status"]) => LibraryItem[];
|
|
21
26
|
export {};
|
|
@@ -12,7 +12,7 @@ export { getSceneVersion, hashElementsVersion, hashString, getNonDeletedElements
|
|
|
12
12
|
export { getTextFromElements } from "@excalidraw/element";
|
|
13
13
|
export { isInvisiblySmallElement } from "@excalidraw/element";
|
|
14
14
|
export { defaultLang, useI18n, languages } from "./i18n";
|
|
15
|
-
export { restore, restoreAppState, restoreElements, restoreLibraryItems, } from "./data/restore";
|
|
15
|
+
export { restore, restoreAppState, restoreElement, restoreElements, restoreLibraryItems, } from "./data/restore";
|
|
16
16
|
export { reconcileElements } from "./data/reconcile";
|
|
17
17
|
export { exportToCanvas, exportToBlob, exportToSvg, exportToClipboard, } from "@excalidraw/utils/export";
|
|
18
18
|
export { serializeAsJSON, serializeLibraryAsJSON } from "./data/json";
|
|
@@ -155,8 +155,10 @@ export type ObservedElementsAppState = {
|
|
|
155
155
|
editingGroupId: AppState["editingGroupId"];
|
|
156
156
|
selectedElementIds: AppState["selectedElementIds"];
|
|
157
157
|
selectedGroupIds: AppState["selectedGroupIds"];
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
selectedLinearElement: {
|
|
159
|
+
elementId: LinearElementEditor["elementId"];
|
|
160
|
+
isEditing: boolean;
|
|
161
|
+
} | null;
|
|
160
162
|
croppingElementId: AppState["croppingElementId"];
|
|
161
163
|
lockedMultiSelections: AppState["lockedMultiSelections"];
|
|
162
164
|
activeLockedId: AppState["activeLockedId"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@excalidraw/math",
|
|
3
|
-
"version": "0.18.0-
|
|
3
|
+
"version": "0.18.0-dda3affcb",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/math/src/index.d.ts",
|
|
6
6
|
"main": "./dist/prod/index.js",
|
|
@@ -61,6 +61,6 @@
|
|
|
61
61
|
"build:esm": "rimraf dist && node ../../scripts/buildBase.js && yarn gen:types"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@excalidraw/common": "0.18.0-
|
|
64
|
+
"@excalidraw/common": "0.18.0-dda3affcb"
|
|
65
65
|
}
|
|
66
66
|
}
|