@zsviczian/excalidraw 0.18.0-23 → 0.18.0-24
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/excalidraw.development.js +23 -23
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/common/src/constants.d.ts +1 -1
- package/types/common/src/points.d.ts +1 -1
- package/types/common/src/utils.d.ts +2 -2
- package/types/element/src/Scene.d.ts +1 -1
- package/types/element/src/binding.d.ts +4 -0
- package/types/element/src/bounds.d.ts +3 -1
- package/types/element/src/elbowArrow.d.ts +1 -1
- package/types/element/src/frame.d.ts +2 -2
- package/types/element/src/heading.d.ts +2 -2
- package/types/element/src/linearElementEditor.d.ts +1 -4
- package/types/element/src/resizeTest.d.ts +2 -2
- package/types/element/src/selection.d.ts +1 -1
- package/types/element/src/shape.d.ts +2 -2
- package/types/element/src/store.d.ts +1 -1
- package/types/element/src/transformHandles.d.ts +4 -4
- package/types/element/src/utils.d.ts +11 -5
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +6 -6
- package/types/excalidraw/actions/actionAlign.d.ts +8 -8
- package/types/excalidraw/actions/actionBoundText.d.ts +4 -4
- package/types/excalidraw/actions/actionCanvas.d.ts +137 -137
- package/types/excalidraw/actions/actionClipboard.d.ts +17 -17
- package/types/excalidraw/actions/actionCropEditor.d.ts +2 -2
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +9 -9
- package/types/excalidraw/actions/actionDistribute.d.ts +4 -4
- package/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
- package/types/excalidraw/actions/actionElementLink.d.ts +2 -2
- package/types/excalidraw/actions/actionElementLock.d.ts +6 -6
- package/types/excalidraw/actions/actionEmbeddable.d.ts +2 -2
- package/types/excalidraw/actions/actionExport.d.ts +121 -121
- package/types/excalidraw/actions/actionFinalize.d.ts +8 -8
- package/types/excalidraw/actions/actionFlip.d.ts +4 -4
- package/types/excalidraw/actions/actionFrame.d.ts +61 -61
- package/types/excalidraw/actions/actionGroup.d.ts +10 -10
- package/types/excalidraw/actions/actionLinearEditor.d.ts +53 -53
- package/types/excalidraw/actions/actionLink.d.ts +3 -3
- package/types/excalidraw/actions/actionMenu.d.ts +8 -8
- package/types/excalidraw/actions/actionNavigate.d.ts +4 -4
- package/types/excalidraw/actions/actionProperties.d.ts +33 -33
- package/types/excalidraw/actions/actionSelectAll.d.ts +5 -5
- package/types/excalidraw/actions/actionStyles.d.ts +6 -6
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleStats.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +4 -4
- package/types/excalidraw/actions/actionZindex.d.ts +8 -8
- package/types/excalidraw/appState.d.ts +21 -21
- package/types/excalidraw/components/App.d.ts +8 -4
- package/types/excalidraw/components/Stats/DragInput.d.ts +11 -1
- package/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
- package/types/excalidraw/components/shapes.d.ts +1 -1
- package/types/excalidraw/data/blob.d.ts +1 -1
- package/types/excalidraw/data/library.d.ts +1 -1
- package/types/math/src/angle.d.ts +1 -1
- package/types/math/src/curve.d.ts +1 -1
- package/types/math/src/ellipse.d.ts +3 -3
- package/types/math/src/point.d.ts +2 -2
- package/types/math/src/polygon.d.ts +2 -2
- package/types/math/src/rectangle.d.ts +2 -0
- package/types/math/src/segment.d.ts +5 -5
- package/types/math/src/utils.d.ts +0 -2
- package/types/utils/src/shape.d.ts +12 -12
- package/types/excalidraw/visualdebug.d.ts +0 -41
|
@@ -11,13 +11,13 @@ export declare const actionSelectAll: {
|
|
|
11
11
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => false | {
|
|
12
12
|
appState: {
|
|
13
13
|
selectedLinearElement: LinearElementEditor | null;
|
|
14
|
+
editingGroupId: string | null;
|
|
14
15
|
selectedElementIds: Readonly<{
|
|
15
16
|
[id: string]: true;
|
|
16
17
|
}>;
|
|
17
18
|
selectedGroupIds: {
|
|
18
19
|
[groupId: string]: boolean;
|
|
19
20
|
};
|
|
20
|
-
editingGroupId: string | null;
|
|
21
21
|
contextMenu: {
|
|
22
22
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
23
23
|
top: number;
|
|
@@ -73,7 +73,7 @@ export declare const actionSelectAll: {
|
|
|
73
73
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
74
74
|
currentHoveredFontFamily: number | null;
|
|
75
75
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
76
|
-
currentItemArrowType: "
|
|
76
|
+
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
77
77
|
viewBackgroundColor: string;
|
|
78
78
|
scrollX: number;
|
|
79
79
|
scrollY: number;
|
|
@@ -160,7 +160,7 @@ export declare const actionSelectAll: {
|
|
|
160
160
|
shown: true;
|
|
161
161
|
data: import("../charts").Spreadsheet;
|
|
162
162
|
};
|
|
163
|
-
showHyperlinkPopup: false | "
|
|
163
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
164
164
|
linkOpacity: number;
|
|
165
165
|
trayModeEnabled: boolean;
|
|
166
166
|
colorPalette?: {
|
|
@@ -218,7 +218,7 @@ export declare const actionSelectAll: {
|
|
|
218
218
|
};
|
|
219
219
|
captureUpdate: "IMMEDIATELY";
|
|
220
220
|
};
|
|
221
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
221
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
222
222
|
} & {
|
|
223
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
223
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
224
224
|
};
|
|
@@ -66,7 +66,7 @@ export declare const actionCopyStyles: {
|
|
|
66
66
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
67
67
|
currentHoveredFontFamily: number | null;
|
|
68
68
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
69
|
-
currentItemArrowType: "
|
|
69
|
+
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
70
70
|
viewBackgroundColor: string;
|
|
71
71
|
scrollX: number;
|
|
72
72
|
scrollY: number;
|
|
@@ -155,7 +155,7 @@ export declare const actionCopyStyles: {
|
|
|
155
155
|
shown: true;
|
|
156
156
|
data: import("../charts").Spreadsheet;
|
|
157
157
|
};
|
|
158
|
-
showHyperlinkPopup: false | "
|
|
158
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
159
159
|
linkOpacity: number;
|
|
160
160
|
trayModeEnabled: boolean;
|
|
161
161
|
colorPalette?: {
|
|
@@ -214,9 +214,9 @@ export declare const actionCopyStyles: {
|
|
|
214
214
|
};
|
|
215
215
|
captureUpdate: "EVENTUALLY";
|
|
216
216
|
};
|
|
217
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
217
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
218
218
|
} & {
|
|
219
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
219
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
220
220
|
};
|
|
221
221
|
export declare const actionPasteStyles: {
|
|
222
222
|
name: "pasteStyles";
|
|
@@ -232,7 +232,7 @@ export declare const actionPasteStyles: {
|
|
|
232
232
|
elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
233
233
|
captureUpdate: "IMMEDIATELY";
|
|
234
234
|
};
|
|
235
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
235
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
236
236
|
} & {
|
|
237
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
237
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
238
238
|
};
|
|
@@ -68,7 +68,7 @@ export declare const actionToggleGridMode: {
|
|
|
68
68
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
69
69
|
currentHoveredFontFamily: number | null;
|
|
70
70
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
71
|
-
currentItemArrowType: "
|
|
71
|
+
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
72
72
|
viewBackgroundColor: string;
|
|
73
73
|
scrollX: number;
|
|
74
74
|
scrollY: number;
|
|
@@ -161,7 +161,7 @@ export declare const actionToggleGridMode: {
|
|
|
161
161
|
shown: true;
|
|
162
162
|
data: import("../charts").Spreadsheet;
|
|
163
163
|
};
|
|
164
|
-
showHyperlinkPopup: false | "
|
|
164
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
165
165
|
linkOpacity: number;
|
|
166
166
|
trayModeEnabled: boolean;
|
|
167
167
|
colorPalette?: {
|
|
@@ -221,7 +221,7 @@ export declare const actionToggleGridMode: {
|
|
|
221
221
|
};
|
|
222
222
|
checked: (appState: AppState) => boolean;
|
|
223
223
|
predicate: (element: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps) => boolean;
|
|
224
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
224
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
225
225
|
} & {
|
|
226
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
226
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
227
227
|
};
|
|
@@ -66,7 +66,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
66
66
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
67
67
|
currentHoveredFontFamily: number | null;
|
|
68
68
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
69
|
-
currentItemArrowType: "
|
|
69
|
+
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
70
70
|
viewBackgroundColor: string;
|
|
71
71
|
scrollX: number;
|
|
72
72
|
scrollY: number;
|
|
@@ -159,7 +159,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
159
159
|
shown: true;
|
|
160
160
|
data: import("../charts").Spreadsheet;
|
|
161
161
|
};
|
|
162
|
-
showHyperlinkPopup: false | "
|
|
162
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
163
163
|
linkOpacity: number;
|
|
164
164
|
trayModeEnabled: boolean;
|
|
165
165
|
colorPalette?: {
|
|
@@ -219,7 +219,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
219
219
|
};
|
|
220
220
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
221
221
|
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
222
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
222
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
223
223
|
} & {
|
|
224
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
224
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
225
225
|
};
|
|
@@ -72,7 +72,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
72
72
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
73
73
|
currentHoveredFontFamily: number | null;
|
|
74
74
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
75
|
-
currentItemArrowType: "
|
|
75
|
+
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
76
76
|
viewBackgroundColor: string;
|
|
77
77
|
scrollX: number;
|
|
78
78
|
scrollY: number;
|
|
@@ -151,7 +151,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
151
151
|
shown: true;
|
|
152
152
|
data: import("../charts").Spreadsheet;
|
|
153
153
|
};
|
|
154
|
-
showHyperlinkPopup: false | "
|
|
154
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
155
155
|
linkOpacity: number;
|
|
156
156
|
trayModeEnabled: boolean;
|
|
157
157
|
colorPalette?: {
|
|
@@ -212,7 +212,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
212
212
|
};
|
|
213
213
|
checked: (appState: AppState) => boolean;
|
|
214
214
|
predicate: (element: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps) => boolean;
|
|
215
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
215
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
216
216
|
} & {
|
|
217
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
217
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
218
218
|
};
|
|
@@ -68,7 +68,7 @@ export declare const actionToggleStats: {
|
|
|
68
68
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
69
69
|
currentHoveredFontFamily: number | null;
|
|
70
70
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
71
|
-
currentItemArrowType: "
|
|
71
|
+
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
72
72
|
viewBackgroundColor: string;
|
|
73
73
|
scrollX: number;
|
|
74
74
|
scrollY: number;
|
|
@@ -158,7 +158,7 @@ export declare const actionToggleStats: {
|
|
|
158
158
|
shown: true;
|
|
159
159
|
data: import("../charts").Spreadsheet;
|
|
160
160
|
};
|
|
161
|
-
showHyperlinkPopup: false | "
|
|
161
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
162
162
|
linkOpacity: number;
|
|
163
163
|
trayModeEnabled: boolean;
|
|
164
164
|
colorPalette?: {
|
|
@@ -218,7 +218,7 @@ export declare const actionToggleStats: {
|
|
|
218
218
|
captureUpdate: "EVENTUALLY";
|
|
219
219
|
};
|
|
220
220
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
221
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
221
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
222
222
|
} & {
|
|
223
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
223
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
224
224
|
};
|
|
@@ -65,7 +65,7 @@ export declare const actionToggleViewMode: {
|
|
|
65
65
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
66
66
|
currentHoveredFontFamily: number | null;
|
|
67
67
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
68
|
-
currentItemArrowType: "
|
|
68
|
+
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
69
69
|
viewBackgroundColor: string;
|
|
70
70
|
scrollX: number;
|
|
71
71
|
scrollY: number;
|
|
@@ -158,7 +158,7 @@ export declare const actionToggleViewMode: {
|
|
|
158
158
|
shown: true;
|
|
159
159
|
data: import("../charts").Spreadsheet;
|
|
160
160
|
};
|
|
161
|
-
showHyperlinkPopup: false | "
|
|
161
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
162
162
|
linkOpacity: number;
|
|
163
163
|
trayModeEnabled: boolean;
|
|
164
164
|
colorPalette?: {
|
|
@@ -219,7 +219,7 @@ export declare const actionToggleViewMode: {
|
|
|
219
219
|
};
|
|
220
220
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
221
221
|
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
222
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
222
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
223
223
|
} & {
|
|
224
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
224
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
225
225
|
};
|
|
@@ -65,7 +65,7 @@ export declare const actionToggleZenMode: {
|
|
|
65
65
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
66
66
|
currentHoveredFontFamily: number | null;
|
|
67
67
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
68
|
-
currentItemArrowType: "
|
|
68
|
+
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
69
69
|
viewBackgroundColor: string;
|
|
70
70
|
scrollX: number;
|
|
71
71
|
scrollY: number;
|
|
@@ -158,7 +158,7 @@ export declare const actionToggleZenMode: {
|
|
|
158
158
|
shown: true;
|
|
159
159
|
data: import("../charts").Spreadsheet;
|
|
160
160
|
};
|
|
161
|
-
showHyperlinkPopup: false | "
|
|
161
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
162
162
|
linkOpacity: number;
|
|
163
163
|
trayModeEnabled: boolean;
|
|
164
164
|
colorPalette?: {
|
|
@@ -219,7 +219,7 @@ export declare const actionToggleZenMode: {
|
|
|
219
219
|
};
|
|
220
220
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
221
221
|
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
222
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
222
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
223
223
|
} & {
|
|
224
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
224
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
225
225
|
};
|
|
@@ -12,10 +12,10 @@ export declare const actionSendBackward: {
|
|
|
12
12
|
captureUpdate: "IMMEDIATELY";
|
|
13
13
|
};
|
|
14
14
|
keyPriority: number;
|
|
15
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
15
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
16
16
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
} & {
|
|
18
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
18
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
19
19
|
};
|
|
20
20
|
export declare const actionBringForward: {
|
|
21
21
|
name: "bringForward";
|
|
@@ -31,10 +31,10 @@ export declare const actionBringForward: {
|
|
|
31
31
|
captureUpdate: "IMMEDIATELY";
|
|
32
32
|
};
|
|
33
33
|
keyPriority: number;
|
|
34
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
34
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
35
35
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
36
|
} & {
|
|
37
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
37
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
38
38
|
};
|
|
39
39
|
export declare const actionSendToBack: {
|
|
40
40
|
name: "sendToBack";
|
|
@@ -49,10 +49,10 @@ export declare const actionSendToBack: {
|
|
|
49
49
|
appState: Readonly<import("../types").AppState>;
|
|
50
50
|
captureUpdate: "IMMEDIATELY";
|
|
51
51
|
};
|
|
52
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
52
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
53
53
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
54
54
|
} & {
|
|
55
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
55
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
56
56
|
};
|
|
57
57
|
export declare const actionBringToFront: {
|
|
58
58
|
name: "bringToFront";
|
|
@@ -67,8 +67,8 @@ export declare const actionBringToFront: {
|
|
|
67
67
|
appState: Readonly<import("../types").AppState>;
|
|
68
68
|
captureUpdate: "IMMEDIATELY";
|
|
69
69
|
};
|
|
70
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
70
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
71
71
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
72
72
|
} & {
|
|
73
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
73
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
74
74
|
};
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import type { AppState, NormalizedZoomValue } from "./types";
|
|
2
2
|
export declare const getDefaultAppState: () => Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
|
|
3
3
|
export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
cursorButton?: "up" | "down" | undefined;
|
|
4
|
+
viewBackgroundColor?: string | undefined;
|
|
5
|
+
name?: string | null | undefined;
|
|
6
|
+
zoom?: Readonly<{
|
|
7
|
+
value: NormalizedZoomValue;
|
|
8
|
+
}> | undefined;
|
|
10
9
|
scrollX?: number | undefined;
|
|
11
10
|
scrollY?: number | undefined;
|
|
11
|
+
editingGroupId?: string | null | undefined;
|
|
12
|
+
selectedElementIds?: Readonly<{
|
|
13
|
+
[id: string]: true;
|
|
14
|
+
}> | undefined;
|
|
15
|
+
theme?: import("@excalidraw/element/types").Theme | undefined;
|
|
16
|
+
selectedGroupIds?: {
|
|
17
|
+
[groupId: string]: boolean;
|
|
18
|
+
} | undefined;
|
|
19
|
+
selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
|
|
20
|
+
zenModeEnabled?: boolean | undefined;
|
|
12
21
|
showWelcomeScreen?: boolean | undefined;
|
|
13
22
|
activeTool?: ({
|
|
14
23
|
lastActiveTool: import("./types").ActiveTool | null;
|
|
@@ -19,6 +28,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
19
28
|
penDetected?: boolean | undefined;
|
|
20
29
|
exportBackground?: boolean | undefined;
|
|
21
30
|
exportEmbedScene?: boolean | undefined;
|
|
31
|
+
exportWithDarkMode?: boolean | undefined;
|
|
22
32
|
exportScale?: number | undefined;
|
|
23
33
|
currentItemStrokeColor?: string | undefined;
|
|
24
34
|
currentItemBackgroundColor?: string | undefined;
|
|
@@ -33,13 +43,9 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
33
43
|
currentItemStartArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
|
|
34
44
|
currentItemEndArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
|
|
35
45
|
currentItemRoundness?: import("@excalidraw/element/types").StrokeRoundness | undefined;
|
|
36
|
-
currentItemArrowType?: "
|
|
37
|
-
|
|
46
|
+
currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
|
|
47
|
+
cursorButton?: "up" | "down" | undefined;
|
|
38
48
|
scrolledOutside?: boolean | undefined;
|
|
39
|
-
name?: string | null | undefined;
|
|
40
|
-
zoom?: Readonly<{
|
|
41
|
-
value: NormalizedZoomValue;
|
|
42
|
-
}> | undefined;
|
|
43
49
|
openMenu?: "canvas" | "shape" | null | undefined;
|
|
44
50
|
openSidebar?: {
|
|
45
51
|
name: string;
|
|
@@ -47,24 +53,18 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
47
53
|
} | null | undefined;
|
|
48
54
|
defaultSidebarDockedPreference?: boolean | undefined;
|
|
49
55
|
lastPointerDownWith?: import("@excalidraw/element/types").PointerType | undefined;
|
|
50
|
-
selectedElementIds?: Readonly<{
|
|
51
|
-
[id: string]: true;
|
|
52
|
-
}> | undefined;
|
|
53
56
|
previousSelectedElementIds?: {
|
|
54
57
|
[id: string]: true;
|
|
55
58
|
} | undefined;
|
|
56
59
|
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
57
|
-
zenModeEnabled?: boolean | undefined;
|
|
58
|
-
theme?: import("@excalidraw/element/types").Theme | undefined;
|
|
59
60
|
gridSize?: number | undefined;
|
|
60
61
|
gridStep?: number | undefined;
|
|
61
62
|
gridModeEnabled?: boolean | undefined;
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
stats?: {
|
|
64
|
+
open: boolean;
|
|
65
|
+
panels: number;
|
|
64
66
|
} | undefined;
|
|
65
|
-
editingGroupId?: string | null | undefined;
|
|
66
67
|
currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
|
|
67
|
-
selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
|
|
68
68
|
objectsSnapModeEnabled?: boolean | undefined;
|
|
69
69
|
lockedMultiSelections?: {
|
|
70
70
|
[groupId: string]: true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type EXPORT_IMAGE_TYPES, Emitter } from "@excalidraw/common";
|
|
3
3
|
import { LinearElementEditor, FlowChartCreator, Scene, type ElementUpdate } from "@excalidraw/element";
|
|
4
|
-
import type { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted,
|
|
4
|
+
import type { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "@excalidraw/element/types";
|
|
5
5
|
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
6
6
|
import { ActionManager } from "../actions/manager";
|
|
7
7
|
import { AnimationFrameHandler } from "../animation-frame-handler";
|
|
@@ -520,12 +520,17 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
520
520
|
private restoreReadyToEraseElements;
|
|
521
521
|
private eraseElements;
|
|
522
522
|
private initializeImage;
|
|
523
|
+
/**
|
|
524
|
+
* use during async image initialization,
|
|
525
|
+
* when the placeholder image could have been modified in the meantime,
|
|
526
|
+
* and when you don't want to loose those modifications
|
|
527
|
+
*/
|
|
528
|
+
private getLatestInitializedImageElement;
|
|
523
529
|
/**
|
|
524
530
|
* inserts image into elements array and rerenders
|
|
525
531
|
*/
|
|
526
|
-
insertImageElement
|
|
532
|
+
private insertImageElement;
|
|
527
533
|
private onImageAction;
|
|
528
|
-
initializeImageDimensions: (imageElement: ExcalidrawImageElement) => void;
|
|
529
534
|
private getImageNaturalDimensions;
|
|
530
535
|
/** updates image cache, refreshing updated elements and/or setting status
|
|
531
536
|
to error for images that fail during <img> element creation */
|
|
@@ -537,7 +542,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
537
542
|
private scheduleImageRefresh;
|
|
538
543
|
private updateBindingEnabledOnPointerMove;
|
|
539
544
|
private maybeSuggestBindingAtCursor;
|
|
540
|
-
private maybeSuggestBindingsForLinearElementAtCoords;
|
|
541
545
|
setSelection(elements: readonly NonDeletedExcalidrawElement[]): void;
|
|
542
546
|
private clearSelection;
|
|
543
547
|
private handleInteractiveCanvasRef;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
2
|
import type { Scene } from "@excalidraw/element";
|
|
3
|
+
import { useApp, useExcalidrawSetAppState } from "../App";
|
|
3
4
|
import "./DragInput.scss";
|
|
4
5
|
import type { StatsInputProperty } from "./utils";
|
|
5
6
|
import type { AppState } from "../../types";
|
|
@@ -15,6 +16,14 @@ export type DragInputCallbackType<P extends StatsInputProperty, E = ExcalidrawEl
|
|
|
15
16
|
property: P;
|
|
16
17
|
originalAppState: AppState;
|
|
17
18
|
setInputValue: (value: number) => void;
|
|
19
|
+
app: ReturnType<typeof useApp>;
|
|
20
|
+
setAppState: ReturnType<typeof useExcalidrawSetAppState>;
|
|
21
|
+
}) => void;
|
|
22
|
+
export type DragFinishedCallbackType<E = ExcalidrawElement> = (props: {
|
|
23
|
+
app: ReturnType<typeof useApp>;
|
|
24
|
+
setAppState: ReturnType<typeof useExcalidrawSetAppState>;
|
|
25
|
+
originalElements: readonly E[] | null;
|
|
26
|
+
originalAppState: AppState;
|
|
18
27
|
}) => void;
|
|
19
28
|
interface StatsDragInputProps<T extends StatsInputProperty, E = ExcalidrawElement> {
|
|
20
29
|
label: string | React.ReactNode;
|
|
@@ -29,6 +38,7 @@ interface StatsDragInputProps<T extends StatsInputProperty, E = ExcalidrawElemen
|
|
|
29
38
|
appState: AppState;
|
|
30
39
|
/** how many px you need to drag to get 1 unit change */
|
|
31
40
|
sensitivity?: number;
|
|
41
|
+
dragFinishedCallback?: DragFinishedCallbackType;
|
|
32
42
|
}
|
|
33
|
-
declare const StatsDragInput: <T extends StatsInputProperty, E extends ExcalidrawElement = ExcalidrawElement>({ label, icon, dragInputCallback, value, elements, editable, shouldKeepAspectRatio, property, scene, appState, sensitivity, }: StatsDragInputProps<T, E>) => import("react/jsx-runtime").JSX.Element | null;
|
|
43
|
+
declare const StatsDragInput: <T extends StatsInputProperty, E extends ExcalidrawElement = ExcalidrawElement>({ label, icon, dragInputCallback, value, elements, editable, shouldKeepAspectRatio, property, scene, appState, sensitivity, dragFinishedCallback, }: StatsDragInputProps<T, E>) => import("react/jsx-runtime").JSX.Element | null;
|
|
34
44
|
export default StatsDragInput;
|
|
@@ -3,4 +3,4 @@ export declare const DropdownMenuContentPropsContext: React.Context<{
|
|
|
3
3
|
onSelect?: ((event: Event) => void) | undefined;
|
|
4
4
|
}>;
|
|
5
5
|
export declare const getDropdownMenuItemClassName: (className?: string, selected?: boolean, hovered?: boolean) => string;
|
|
6
|
-
export declare const useHandleDropdownMenuItemClick: (origOnClick: React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement> | undefined, onSelect: ((event: Event) => void) | undefined) => (event: React.MouseEvent<
|
|
6
|
+
export declare const useHandleDropdownMenuItemClick: (origOnClick: React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement> | undefined, onSelect: ((event: Event) => void) | undefined) => (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement, MouseEvent>) => void;
|
|
@@ -59,4 +59,4 @@ export declare const SHAPES: readonly [{
|
|
|
59
59
|
readonly numericKey: "0";
|
|
60
60
|
readonly fillable: false;
|
|
61
61
|
}];
|
|
62
|
-
export declare const findShapeByKey: (key: string) => "
|
|
62
|
+
export declare const findShapeByKey: (key: string) => "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | null;
|
|
@@ -6,7 +6,7 @@ import type { FileSystemHandle } from "./filesystem";
|
|
|
6
6
|
import type { ImportedLibraryData } from "./types";
|
|
7
7
|
export declare const getMimeType: (blob: Blob | string) => string;
|
|
8
8
|
export declare const getFileHandleType: (handle: FileSystemHandle | null) => string | null;
|
|
9
|
-
export declare const isImageFileHandleType: (type: string | null) => type is "
|
|
9
|
+
export declare const isImageFileHandleType: (type: string | null) => type is "png" | "svg";
|
|
10
10
|
export declare const isImageFileHandle: (handle: FileSystemHandle | null) => boolean;
|
|
11
11
|
export declare const isSupportedImageFileType: (type: string | null | undefined) => boolean;
|
|
12
12
|
export declare const isSupportedImageFile: (blob: Blob | null | undefined) => blob is Blob & {
|
|
@@ -77,7 +77,7 @@ declare class Library {
|
|
|
77
77
|
merge?: boolean | undefined;
|
|
78
78
|
prompt?: boolean | undefined;
|
|
79
79
|
openLibraryMenu?: boolean | undefined;
|
|
80
|
-
defaultStatus?: "
|
|
80
|
+
defaultStatus?: "published" | "unpublished" | undefined;
|
|
81
81
|
}) => Promise<LibraryItems>;
|
|
82
82
|
setLibrary: (libraryItems: LibraryItems | Promise<LibraryItems> | ((latestLibraryItems: LibraryItems) => LibraryItems | Promise<LibraryItems>)) => Promise<LibraryItems>;
|
|
83
83
|
}
|
|
@@ -5,7 +5,7 @@ export declare const normalizeRadians: (angle: Radians) => Radians;
|
|
|
5
5
|
* (x, y) for the center point 0,0 where the first number returned is the radius,
|
|
6
6
|
* the second is the angle in radians.
|
|
7
7
|
*/
|
|
8
|
-
export declare const cartesian2Polar: <P extends
|
|
8
|
+
export declare const cartesian2Polar: <P extends GlobalPoint | LocalPoint>([x, y,]: P) => PolarCoords;
|
|
9
9
|
export declare function degreesToRadians(degrees: Degrees): Radians;
|
|
10
10
|
export declare function radiansToDegrees(degrees: Radians): Degrees;
|
|
11
11
|
/**
|
|
@@ -8,7 +8,7 @@ import type { Curve, GlobalPoint, LineSegment, LocalPoint } from "./types";
|
|
|
8
8
|
* @returns
|
|
9
9
|
*/
|
|
10
10
|
export declare function curve<Point extends GlobalPoint | LocalPoint>(a: Point, b: Point, c: Point, d: Point): Curve<Point>;
|
|
11
|
-
export declare const bezierEquation: <Point extends
|
|
11
|
+
export declare const bezierEquation: <Point extends GlobalPoint | LocalPoint>(c: Curve<Point>, t: number) => Point;
|
|
12
12
|
/**
|
|
13
13
|
* Computes the intersection between a cubic spline and a line segment.
|
|
14
14
|
*/
|
|
@@ -16,7 +16,7 @@ export declare function ellipse<Point extends GlobalPoint | LocalPoint>(center:
|
|
|
16
16
|
* @param ellipse The ellipse to compare against
|
|
17
17
|
* @returns TRUE if the point is inside or on the outline of the ellipse
|
|
18
18
|
*/
|
|
19
|
-
export declare const ellipseIncludesPoint: <Point extends
|
|
19
|
+
export declare const ellipseIncludesPoint: <Point extends GlobalPoint | LocalPoint>(p: Point, ellipse: Ellipse<Point>) => boolean;
|
|
20
20
|
/**
|
|
21
21
|
* Tests whether a point lies on the outline of the ellipse within a given
|
|
22
22
|
* tolerance
|
|
@@ -26,7 +26,7 @@ export declare const ellipseIncludesPoint: <Point extends LocalPoint | GlobalPoi
|
|
|
26
26
|
* @param threshold The distance to consider a point close enough to be "on" the outline
|
|
27
27
|
* @returns TRUE if the point is on the ellise outline
|
|
28
28
|
*/
|
|
29
|
-
export declare const ellipseTouchesPoint: <Point extends
|
|
29
|
+
export declare const ellipseTouchesPoint: <Point extends GlobalPoint | LocalPoint>(point: Point, ellipse: Ellipse<Point>, threshold?: number) => boolean;
|
|
30
30
|
/**
|
|
31
31
|
* Determine the shortest euclidean distance from a point to the
|
|
32
32
|
* outline of the ellipse
|
|
@@ -35,7 +35,7 @@ export declare const ellipseTouchesPoint: <Point extends LocalPoint | GlobalPoin
|
|
|
35
35
|
* @param ellipse The ellipse to calculate the distance to
|
|
36
36
|
* @returns The eucledian distance
|
|
37
37
|
*/
|
|
38
|
-
export declare const ellipseDistanceFromPoint: <Point extends
|
|
38
|
+
export declare const ellipseDistanceFromPoint: <Point extends GlobalPoint | LocalPoint>(p: Point, ellipse: Ellipse<Point>) => number;
|
|
39
39
|
/**
|
|
40
40
|
* Calculate a maximum of two intercept points for a line going throug an
|
|
41
41
|
* ellipse.
|
|
@@ -109,7 +109,7 @@ export declare function pointDistanceSq<P extends LocalPoint | GlobalPoint>(a: P
|
|
|
109
109
|
* @param multiplier The scaling factor
|
|
110
110
|
* @returns
|
|
111
111
|
*/
|
|
112
|
-
export declare const pointScaleFromOrigin: <P extends
|
|
112
|
+
export declare const pointScaleFromOrigin: <P extends GlobalPoint | LocalPoint>(p: P, mid: P, multiplier: number) => GlobalPoint | LocalPoint;
|
|
113
113
|
/**
|
|
114
114
|
* Returns whether `q` lies inside the segment/rectangle defined by `p` and `r`.
|
|
115
115
|
* This is an approximation to "does `q` lie on a segment `pr`" check.
|
|
@@ -119,4 +119,4 @@ export declare const pointScaleFromOrigin: <P extends LocalPoint | GlobalPoint>(
|
|
|
119
119
|
* @param r The other point to compare against
|
|
120
120
|
* @returns TRUE if q is indeed between p and r
|
|
121
121
|
*/
|
|
122
|
-
export declare const isPointWithinBounds: <P extends
|
|
122
|
+
export declare const isPointWithinBounds: <P extends GlobalPoint | LocalPoint>(p: P, q: P, r: P) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GlobalPoint, LocalPoint, Polygon } from "./types";
|
|
2
2
|
export declare function polygon<Point extends GlobalPoint | LocalPoint>(...points: Point[]): Polygon<Point>;
|
|
3
3
|
export declare function polygonFromPoints<Point extends GlobalPoint | LocalPoint>(points: Point[]): Polygon<Point>;
|
|
4
|
-
export declare const polygonIncludesPoint: <Point extends
|
|
4
|
+
export declare const polygonIncludesPoint: <Point extends GlobalPoint | LocalPoint>(point: Point, polygon: Polygon<Point>) => boolean;
|
|
5
5
|
export declare const polygonIncludesPointNonZero: <Point extends [number, number]>(point: Point, polygon: Point[]) => boolean;
|
|
6
|
-
export declare const pointOnPolygon: <Point extends
|
|
6
|
+
export declare const pointOnPolygon: <Point extends GlobalPoint | LocalPoint>(p: Point, poly: Polygon<Point>, threshold?: number) => boolean;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { GlobalPoint, LineSegment, LocalPoint, Rectangle } from "./types";
|
|
2
2
|
export declare function rectangle<P extends GlobalPoint | LocalPoint>(topLeft: P, bottomRight: P): Rectangle<P>;
|
|
3
|
+
export declare function rectangleFromNumberSequence<Point extends LocalPoint | GlobalPoint>(minX: number, minY: number, maxX: number, maxY: number): Rectangle<Point>;
|
|
3
4
|
export declare function rectangleIntersectLineSegment<Point extends LocalPoint | GlobalPoint>(r: Rectangle<Point>, l: LineSegment<Point>): Point[];
|
|
5
|
+
export declare function rectangleIntersectRectangle<Point extends LocalPoint | GlobalPoint>(rectangle1: Rectangle<Point>, rectangle2: Rectangle<Point>): boolean;
|
|
@@ -11,7 +11,7 @@ export declare function lineSegment<P extends GlobalPoint | LocalPoint>(a: P, b:
|
|
|
11
11
|
* @param segment
|
|
12
12
|
* @returns
|
|
13
13
|
*/
|
|
14
|
-
export declare const isLineSegment: <Point extends
|
|
14
|
+
export declare const isLineSegment: <Point extends GlobalPoint | LocalPoint>(segment: unknown) => segment is LineSegment<Point>;
|
|
15
15
|
/**
|
|
16
16
|
* Return the coordinates resulting from rotating the given line about an origin by an angle in radians
|
|
17
17
|
* note that when the origin is not given, the midpoint of the given line is used as the origin.
|
|
@@ -21,14 +21,14 @@ export declare const isLineSegment: <Point extends LocalPoint | GlobalPoint>(seg
|
|
|
21
21
|
* @param origin
|
|
22
22
|
* @returns
|
|
23
23
|
*/
|
|
24
|
-
export declare const lineSegmentRotate: <Point extends
|
|
24
|
+
export declare const lineSegmentRotate: <Point extends GlobalPoint | LocalPoint>(l: LineSegment<Point>, angle: Radians, origin?: Point | undefined) => LineSegment<Point>;
|
|
25
25
|
/**
|
|
26
26
|
* Calculates the point two line segments with a definite start and end point
|
|
27
27
|
* intersect at.
|
|
28
28
|
*/
|
|
29
|
-
export declare const segmentsIntersectAt: <Point extends
|
|
30
|
-
export declare const pointOnLineSegment: <Point extends
|
|
31
|
-
export declare const distanceToLineSegment: <Point extends
|
|
29
|
+
export declare const segmentsIntersectAt: <Point extends GlobalPoint | LocalPoint>(a: Readonly<LineSegment<Point>>, b: Readonly<LineSegment<Point>>) => Point | null;
|
|
30
|
+
export declare const pointOnLineSegment: <Point extends GlobalPoint | LocalPoint>(point: Point, line: LineSegment<Point>, threshold?: number) => boolean;
|
|
31
|
+
export declare const distanceToLineSegment: <Point extends GlobalPoint | LocalPoint>(point: Point, line: LineSegment<Point>) => number;
|
|
32
32
|
/**
|
|
33
33
|
* Returns the intersection point of a segment and a line
|
|
34
34
|
*
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type Bounds } from "@excalidraw/element";
|
|
2
1
|
export declare const PRECISION = 0.0001;
|
|
3
2
|
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
4
3
|
export declare const round: (value: number, precision: number, func?: "round" | "floor" | "ceil") => number;
|
|
@@ -6,4 +5,3 @@ export declare const roundToStep: (value: number, step: number, func?: "round" |
|
|
|
6
5
|
export declare const average: (a: number, b: number) => number;
|
|
7
6
|
export declare const isFiniteNumber: (value: any) => value is number;
|
|
8
7
|
export declare const isCloseTo: (a: number, b: number, precision?: number) => boolean;
|
|
9
|
-
export declare const doBoundsIntersect: (bounds1: Bounds | null, bounds2: Bounds | null) => boolean;
|