@zsviczian/excalidraw 0.18.0-13 → 0.18.0-15
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 +153 -153
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/styles.development.css +38 -2
- package/dist/styles.production.css +2 -2
- package/package.json +1 -1
- package/types/common/src/constants.d.ts +1 -0
- package/types/{excalidraw → common/src}/emitter.d.ts +1 -1
- package/types/common/src/font-metadata.d.ts +4 -2
- package/types/common/src/index.d.ts +1 -0
- package/types/common/src/utility-types.d.ts +5 -0
- package/types/common/src/utils.d.ts +16 -4
- package/types/element/src/Scene.d.ts +4 -4
- package/types/element/src/ShapeCache.d.ts +1 -1
- package/types/element/src/align.d.ts +1 -1
- package/types/element/src/binding.d.ts +1 -1
- package/types/element/src/bounds.d.ts +1 -1
- package/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +40 -35
- package/types/element/src/dragElements.d.ts +1 -1
- package/types/element/src/flowchart.d.ts +1 -1
- package/types/element/src/frame.d.ts +3 -2
- package/types/element/src/index.d.ts +45 -2
- package/types/element/src/linearElementEditor.d.ts +4 -8
- package/types/element/src/newElement.d.ts +1 -1
- package/types/element/src/resizeElements.d.ts +1 -1
- package/types/element/src/selection.d.ts +1 -6
- package/types/element/src/store.d.ts +227 -0
- package/types/element/src/textElement.d.ts +1 -1
- package/types/element/src/transformHandles.d.ts +4 -4
- package/types/element/src/typeChecks.d.ts +2 -1
- package/types/element/src/types.d.ts +6 -1
- package/types/element/src/zindex.d.ts +3 -3
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +24 -42
- package/types/excalidraw/actions/actionAlign.d.ts +8 -8
- package/types/excalidraw/actions/actionBoundText.d.ts +16 -28
- package/types/excalidraw/actions/actionCanvas.d.ts +238 -328
- package/types/excalidraw/actions/actionClipboard.d.ts +50 -86
- package/types/excalidraw/actions/actionCropEditor.d.ts +8 -14
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +22 -40
- 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 +8 -14
- package/types/excalidraw/actions/actionElementLock.d.ts +18 -30
- package/types/excalidraw/actions/actionEmbeddable.d.ts +8 -14
- package/types/excalidraw/actions/actionExport.d.ts +173 -227
- package/types/excalidraw/actions/actionFinalize.d.ts +14 -26
- package/types/excalidraw/actions/actionFlip.d.ts +4 -4
- package/types/excalidraw/actions/actionFrame.d.ts +81 -105
- package/types/excalidraw/actions/actionGroup.d.ts +22 -34
- package/types/excalidraw/actions/actionHistory.d.ts +1 -2
- package/types/excalidraw/actions/actionLinearEditor.d.ts +7 -13
- package/types/excalidraw/actions/actionLink.d.ts +9 -15
- package/types/excalidraw/actions/actionMenu.d.ts +26 -44
- package/types/excalidraw/actions/actionNavigate.d.ts +16 -28
- package/types/excalidraw/actions/actionProperties.d.ts +106 -196
- package/types/excalidraw/actions/actionSelectAll.d.ts +10 -16
- package/types/excalidraw/actions/actionStyles.d.ts +12 -18
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +10 -16
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +10 -16
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +10 -225
- package/types/excalidraw/actions/actionToggleStats.d.ts +10 -16
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +10 -16
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +10 -16
- package/types/excalidraw/actions/actionZindex.d.ts +10 -10
- package/types/excalidraw/actions/types.d.ts +1 -1
- package/types/excalidraw/appState.d.ts +23 -23
- package/types/excalidraw/clipboard.d.ts +4 -4
- package/types/excalidraw/components/App.d.ts +8 -8
- package/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -1
- package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +5 -1
- package/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -3
- package/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -3
- package/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -2
- package/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
- package/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -28
- package/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
- package/types/excalidraw/components/Range.d.ts +3 -3
- package/types/excalidraw/components/Stats/Angle.d.ts +1 -1
- package/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
- package/types/excalidraw/components/Stats/CanvasGridSize.d.ts +1 -1
- package/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
- package/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
- package/types/excalidraw/components/Stats/DragInput.d.ts +1 -1
- package/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
- package/types/excalidraw/components/Stats/Position.d.ts +1 -1
- package/types/excalidraw/components/Stats/utils.d.ts +1 -1
- package/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
- package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +1 -1
- package/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
- package/types/excalidraw/components/icons.d.ts +1 -0
- 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/excalidraw/data/transform.d.ts +1 -1
- package/types/excalidraw/fonts/Fonts.d.ts +1 -1
- package/types/excalidraw/history.d.ts +14 -22
- package/types/excalidraw/hooks/useEmitter.d.ts +1 -1
- package/types/excalidraw/index.d.ts +9 -9
- package/types/excalidraw/renderer/helpers.d.ts +6 -1
- package/types/excalidraw/scene/Renderer.d.ts +1 -1
- package/types/excalidraw/scene/index.d.ts +2 -2
- package/types/excalidraw/snapping.d.ts +2 -2
- package/types/excalidraw/types.d.ts +13 -6
- package/types/excalidraw/visualdebug.d.ts +1 -1
- package/types/math/src/curve.d.ts +2 -0
- package/types/math/src/vector.d.ts +4 -0
- package/types/utils/src/bbox.d.ts +1 -1
- package/types/utils/src/index.d.ts +1 -1
- package/types/utils/src/withinBounds.d.ts +1 -1
- package/types/excalidraw/store.d.ts +0 -129
|
@@ -28,7 +28,7 @@ export declare const actionToggleViewMode: {
|
|
|
28
28
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
29
29
|
isBindingEnabled: boolean;
|
|
30
30
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
31
|
-
suggestedBindings: import("@excalidraw/element
|
|
31
|
+
suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
|
|
32
32
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
33
33
|
frameRendering: {
|
|
34
34
|
enabled: boolean;
|
|
@@ -39,7 +39,7 @@ export declare const actionToggleViewMode: {
|
|
|
39
39
|
editingFrame: string | null;
|
|
40
40
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
41
41
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
42
|
-
editingLinearElement: import("@excalidraw/element
|
|
42
|
+
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
43
43
|
activeTool: {
|
|
44
44
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
45
45
|
locked: boolean;
|
|
@@ -159,7 +159,7 @@ export declare const actionToggleViewMode: {
|
|
|
159
159
|
data: import("../charts").Spreadsheet;
|
|
160
160
|
};
|
|
161
161
|
pendingImageElementId: string | null;
|
|
162
|
-
showHyperlinkPopup: false | "
|
|
162
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
163
163
|
linkOpacity: number;
|
|
164
164
|
trayModeEnabled: boolean;
|
|
165
165
|
colorPalette?: {
|
|
@@ -196,7 +196,7 @@ export declare const actionToggleViewMode: {
|
|
|
196
196
|
nameColor: string;
|
|
197
197
|
};
|
|
198
198
|
invertBindingBehaviour: boolean;
|
|
199
|
-
selectedLinearElement: import("@excalidraw/element
|
|
199
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
200
200
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
201
201
|
originSnapOffset: {
|
|
202
202
|
x: number;
|
|
@@ -207,22 +207,16 @@ export declare const actionToggleViewMode: {
|
|
|
207
207
|
followedBy: Set<import("../types").SocketId>;
|
|
208
208
|
isCropping: boolean;
|
|
209
209
|
croppingElementId: string | null;
|
|
210
|
-
searchMatches:
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
offsetX: number;
|
|
215
|
-
offsetY: number;
|
|
216
|
-
width: number;
|
|
217
|
-
height: number;
|
|
218
|
-
}[];
|
|
219
|
-
}[];
|
|
210
|
+
searchMatches: Readonly<{
|
|
211
|
+
focusedId: string | null;
|
|
212
|
+
matches: readonly import("../types").SearchMatch[];
|
|
213
|
+
}> | null;
|
|
220
214
|
};
|
|
221
215
|
captureUpdate: "EVENTUALLY";
|
|
222
216
|
};
|
|
223
217
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
224
218
|
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
225
|
-
keyTest: (event:
|
|
219
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
226
220
|
} & {
|
|
227
|
-
keyTest?: ((event:
|
|
221
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
228
222
|
};
|
|
@@ -28,7 +28,7 @@ export declare const actionToggleZenMode: {
|
|
|
28
28
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
29
29
|
isBindingEnabled: boolean;
|
|
30
30
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
31
|
-
suggestedBindings: import("@excalidraw/element
|
|
31
|
+
suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
|
|
32
32
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
33
33
|
frameRendering: {
|
|
34
34
|
enabled: boolean;
|
|
@@ -39,7 +39,7 @@ export declare const actionToggleZenMode: {
|
|
|
39
39
|
editingFrame: string | null;
|
|
40
40
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
41
41
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
42
|
-
editingLinearElement: import("@excalidraw/element
|
|
42
|
+
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
43
43
|
activeTool: {
|
|
44
44
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
45
45
|
locked: boolean;
|
|
@@ -159,7 +159,7 @@ export declare const actionToggleZenMode: {
|
|
|
159
159
|
data: import("../charts").Spreadsheet;
|
|
160
160
|
};
|
|
161
161
|
pendingImageElementId: string | null;
|
|
162
|
-
showHyperlinkPopup: false | "
|
|
162
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
163
163
|
linkOpacity: number;
|
|
164
164
|
trayModeEnabled: boolean;
|
|
165
165
|
colorPalette?: {
|
|
@@ -196,7 +196,7 @@ export declare const actionToggleZenMode: {
|
|
|
196
196
|
nameColor: string;
|
|
197
197
|
};
|
|
198
198
|
invertBindingBehaviour: boolean;
|
|
199
|
-
selectedLinearElement: import("@excalidraw/element
|
|
199
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
200
200
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
201
201
|
originSnapOffset: {
|
|
202
202
|
x: number;
|
|
@@ -207,22 +207,16 @@ export declare const actionToggleZenMode: {
|
|
|
207
207
|
followedBy: Set<import("../types").SocketId>;
|
|
208
208
|
isCropping: boolean;
|
|
209
209
|
croppingElementId: string | null;
|
|
210
|
-
searchMatches:
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
offsetX: number;
|
|
215
|
-
offsetY: number;
|
|
216
|
-
width: number;
|
|
217
|
-
height: number;
|
|
218
|
-
}[];
|
|
219
|
-
}[];
|
|
210
|
+
searchMatches: Readonly<{
|
|
211
|
+
focusedId: string | null;
|
|
212
|
+
matches: readonly import("../types").SearchMatch[];
|
|
213
|
+
}> | null;
|
|
220
214
|
};
|
|
221
215
|
captureUpdate: "EVENTUALLY";
|
|
222
216
|
};
|
|
223
217
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
224
218
|
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
225
|
-
keyTest: (event:
|
|
219
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
226
220
|
} & {
|
|
227
|
-
keyTest?: ((event:
|
|
221
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
228
222
|
};
|
|
@@ -12,10 +12,10 @@ export declare const actionSendBackward: {
|
|
|
12
12
|
captureUpdate: "IMMEDIATELY";
|
|
13
13
|
};
|
|
14
14
|
keyPriority: number;
|
|
15
|
-
keyTest: (event:
|
|
15
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
16
16
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
} & {
|
|
18
|
-
keyTest?: ((event:
|
|
18
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => 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:
|
|
34
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
35
35
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
36
|
} & {
|
|
37
|
-
keyTest?: ((event:
|
|
37
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
38
38
|
};
|
|
39
39
|
export declare const actionSendToBack: {
|
|
40
40
|
name: "sendToBack";
|
|
@@ -45,14 +45,14 @@ export declare const actionSendToBack: {
|
|
|
45
45
|
category: "element";
|
|
46
46
|
};
|
|
47
47
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
48
|
-
elements: import("@excalidraw/element/types").ExcalidrawElement[] |
|
|
48
|
+
elements: readonly import("@excalidraw/element/types").ExcalidrawElement[] | import("@excalidraw/element/types").ExcalidrawElement[];
|
|
49
49
|
appState: Readonly<import("../types").AppState>;
|
|
50
50
|
captureUpdate: "IMMEDIATELY";
|
|
51
51
|
};
|
|
52
|
-
keyTest: (event:
|
|
52
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
53
53
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
54
54
|
} & {
|
|
55
|
-
keyTest?: ((event:
|
|
55
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
56
56
|
};
|
|
57
57
|
export declare const actionBringToFront: {
|
|
58
58
|
name: "bringToFront";
|
|
@@ -63,12 +63,12 @@ export declare const actionBringToFront: {
|
|
|
63
63
|
category: "element";
|
|
64
64
|
};
|
|
65
65
|
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
66
|
-
elements: import("@excalidraw/element/types").ExcalidrawElement[] |
|
|
66
|
+
elements: readonly import("@excalidraw/element/types").ExcalidrawElement[] | import("@excalidraw/element/types").ExcalidrawElement[];
|
|
67
67
|
appState: Readonly<import("../types").AppState>;
|
|
68
68
|
captureUpdate: "IMMEDIATELY";
|
|
69
69
|
};
|
|
70
|
-
keyTest: (event:
|
|
70
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
71
71
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
72
72
|
} & {
|
|
73
|
-
keyTest?: ((event:
|
|
73
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
74
74
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type { CaptureUpdateActionType } from "
|
|
2
|
+
import type { CaptureUpdateActionType } from "@excalidraw/element";
|
|
3
3
|
import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
|
|
4
4
|
import type React from "react";
|
|
5
5
|
export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api" | "commandPalette";
|
|
@@ -1,34 +1,24 @@
|
|
|
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
|
-
|
|
4
|
+
stats?: {
|
|
5
|
+
open: boolean;
|
|
6
|
+
panels: number;
|
|
7
|
+
} | undefined;
|
|
8
|
+
exportWithDarkMode?: boolean | undefined;
|
|
9
|
+
cursorButton?: "up" | "down" | undefined;
|
|
10
|
+
scrollX?: number | undefined;
|
|
11
|
+
scrollY?: number | undefined;
|
|
12
|
+
showWelcomeScreen?: boolean | undefined;
|
|
5
13
|
activeTool?: ({
|
|
6
14
|
lastActiveTool: import("./types").ActiveTool | null;
|
|
7
15
|
locked: boolean;
|
|
8
16
|
fromSelection: boolean;
|
|
9
17
|
} & import("./types").ActiveTool) | undefined;
|
|
10
|
-
zoom?: Readonly<{
|
|
11
|
-
value: NormalizedZoomValue;
|
|
12
|
-
}> | undefined;
|
|
13
|
-
scrollX?: number | undefined;
|
|
14
|
-
scrollY?: number | undefined;
|
|
15
|
-
viewBackgroundColor?: string | undefined;
|
|
16
|
-
editingGroupId?: string | null | undefined;
|
|
17
|
-
selectedElementIds?: Readonly<{
|
|
18
|
-
[id: string]: true;
|
|
19
|
-
}> | undefined;
|
|
20
|
-
theme?: import("@excalidraw/element/types").Theme | undefined;
|
|
21
|
-
selectedGroupIds?: {
|
|
22
|
-
[groupId: string]: boolean;
|
|
23
|
-
} | undefined;
|
|
24
|
-
selectedLinearElement?: import("@excalidraw/element/linearElementEditor").LinearElementEditor | null | undefined;
|
|
25
|
-
zenModeEnabled?: boolean | undefined;
|
|
26
|
-
showWelcomeScreen?: boolean | undefined;
|
|
27
18
|
penMode?: boolean | undefined;
|
|
28
19
|
penDetected?: boolean | undefined;
|
|
29
20
|
exportBackground?: boolean | undefined;
|
|
30
21
|
exportEmbedScene?: boolean | undefined;
|
|
31
|
-
exportWithDarkMode?: boolean | undefined;
|
|
32
22
|
exportScale?: number | undefined;
|
|
33
23
|
currentItemStrokeColor?: string | undefined;
|
|
34
24
|
currentItemBackgroundColor?: string | undefined;
|
|
@@ -44,8 +34,12 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
44
34
|
currentItemEndArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
|
|
45
35
|
currentItemRoundness?: import("@excalidraw/element/types").StrokeRoundness | undefined;
|
|
46
36
|
currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
|
|
47
|
-
|
|
37
|
+
viewBackgroundColor?: string | undefined;
|
|
48
38
|
scrolledOutside?: boolean | undefined;
|
|
39
|
+
name?: string | null | undefined;
|
|
40
|
+
zoom?: Readonly<{
|
|
41
|
+
value: NormalizedZoomValue;
|
|
42
|
+
}> | undefined;
|
|
49
43
|
openMenu?: "canvas" | "shape" | null | undefined;
|
|
50
44
|
openSidebar?: {
|
|
51
45
|
name: string;
|
|
@@ -53,18 +47,24 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
53
47
|
} | null | undefined;
|
|
54
48
|
defaultSidebarDockedPreference?: boolean | undefined;
|
|
55
49
|
lastPointerDownWith?: import("@excalidraw/element/types").PointerType | undefined;
|
|
50
|
+
selectedElementIds?: Readonly<{
|
|
51
|
+
[id: string]: true;
|
|
52
|
+
}> | undefined;
|
|
56
53
|
previousSelectedElementIds?: {
|
|
57
54
|
[id: string]: true;
|
|
58
55
|
} | undefined;
|
|
59
56
|
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
57
|
+
zenModeEnabled?: boolean | undefined;
|
|
58
|
+
theme?: import("@excalidraw/element/types").Theme | undefined;
|
|
60
59
|
gridSize?: number | undefined;
|
|
61
60
|
gridStep?: number | undefined;
|
|
62
61
|
gridModeEnabled?: boolean | undefined;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
panels: number;
|
|
62
|
+
selectedGroupIds?: {
|
|
63
|
+
[groupId: string]: boolean;
|
|
66
64
|
} | undefined;
|
|
65
|
+
editingGroupId?: string | null | undefined;
|
|
67
66
|
currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
|
|
67
|
+
selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
|
|
68
68
|
objectsSnapModeEnabled?: boolean | undefined;
|
|
69
69
|
};
|
|
70
70
|
export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
|
|
@@ -21,9 +21,9 @@ export declare const probablySupportsClipboardWriteText: boolean;
|
|
|
21
21
|
export declare const probablySupportsClipboardBlob: boolean;
|
|
22
22
|
export declare const createPasteEvent: ({ types, files, }: {
|
|
23
23
|
types?: {
|
|
24
|
-
"image/svg+xml"?: string | File | undefined;
|
|
25
|
-
"text/html"?: string | File | undefined;
|
|
26
24
|
"text/plain"?: string | File | undefined;
|
|
25
|
+
"text/html"?: string | File | undefined;
|
|
26
|
+
"image/svg+xml"?: string | File | undefined;
|
|
27
27
|
"image/png"?: string | File | undefined;
|
|
28
28
|
"image/jpeg"?: string | File | undefined;
|
|
29
29
|
"image/gif"?: string | File | undefined;
|
|
@@ -45,9 +45,9 @@ export declare const copyToClipboard: (elements: readonly NonDeletedExcalidrawEl
|
|
|
45
45
|
* Will prompt user for permission if not granted.
|
|
46
46
|
*/
|
|
47
47
|
export declare const readSystemClipboard: () => Promise<{
|
|
48
|
-
"image/svg+xml"?: string | File | undefined;
|
|
49
|
-
"text/html"?: string | File | undefined;
|
|
50
48
|
"text/plain"?: string | File | undefined;
|
|
49
|
+
"text/html"?: string | File | undefined;
|
|
50
|
+
"image/svg+xml"?: string | File | undefined;
|
|
51
51
|
"image/png"?: string | File | undefined;
|
|
52
52
|
"image/jpeg"?: string | File | undefined;
|
|
53
53
|
"image/gif"?: string | File | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { type EXPORT_IMAGE_TYPES } from "@excalidraw/common";
|
|
3
|
-
import { LinearElementEditor } from "@excalidraw/element
|
|
4
|
-
import { FlowChartCreator } from "@excalidraw/element
|
|
5
|
-
import Scene from "@excalidraw/element
|
|
6
|
-
import type { ElementUpdate } from "@excalidraw/element
|
|
2
|
+
import { type EXPORT_IMAGE_TYPES, Emitter } from "@excalidraw/common";
|
|
3
|
+
import { LinearElementEditor } from "@excalidraw/element";
|
|
4
|
+
import { FlowChartCreator } from "@excalidraw/element";
|
|
5
|
+
import { Scene } from "@excalidraw/element";
|
|
6
|
+
import type { ElementUpdate } from "@excalidraw/element";
|
|
7
7
|
import type { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted, InitializedExcalidrawImageElement, ExcalidrawImageElement, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "@excalidraw/element/types";
|
|
8
8
|
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
9
9
|
import { ActionManager } from "../actions/manager";
|
|
@@ -11,7 +11,6 @@ import { AnimationFrameHandler } from "../animation-frame-handler";
|
|
|
11
11
|
import { Fonts } from "../fonts";
|
|
12
12
|
import { type WritableAtom } from "../editor-jotai";
|
|
13
13
|
import { Renderer } from "../scene/Renderer";
|
|
14
|
-
import { Emitter } from "../emitter";
|
|
15
14
|
import { LaserTrails } from "../laser-trails";
|
|
16
15
|
import { LassoTrail } from "../lasso";
|
|
17
16
|
import { EraserTrail } from "../eraser";
|
|
@@ -127,7 +126,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
127
126
|
};
|
|
128
127
|
originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
|
|
129
128
|
resize: {
|
|
130
|
-
handleType: import("@excalidraw/element
|
|
129
|
+
handleType: import("@excalidraw/element").MaybeTransformHandleType;
|
|
131
130
|
isResizing: boolean;
|
|
132
131
|
offset: {
|
|
133
132
|
x: number;
|
|
@@ -196,7 +195,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
196
195
|
};
|
|
197
196
|
originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
|
|
198
197
|
resize: {
|
|
199
|
-
handleType: import("@excalidraw/element
|
|
198
|
+
handleType: import("@excalidraw/element").MaybeTransformHandleType;
|
|
200
199
|
isResizing: boolean;
|
|
201
200
|
offset: {
|
|
202
201
|
x: number;
|
|
@@ -270,6 +269,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
270
269
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
271
270
|
focusContainer: AppClassProperties["focusContainer"];
|
|
272
271
|
getSceneElementsIncludingDeleted: () => readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
272
|
+
getSceneElementsMapIncludingDeleted: () => Map<string, Ordered<ExcalidrawElement>> & import("@excalidraw/common/utility-types").MakeBrand<"SceneElementsMap">;
|
|
273
273
|
getSceneElements: () => readonly Ordered<NonDeletedExcalidrawElement>[];
|
|
274
274
|
onInsertElements: (elements: readonly ExcalidrawElement[]) => void;
|
|
275
275
|
onExportImage: (type: keyof typeof EXPORT_IMAGE_TYPES, elements: ExportedElements, opts: {
|
|
@@ -4,6 +4,7 @@ interface ColorInputProps {
|
|
|
4
4
|
onChange: (color: string) => void;
|
|
5
5
|
label: string;
|
|
6
6
|
colorPickerType: ColorPickerType;
|
|
7
|
+
placeholder?: string;
|
|
7
8
|
}
|
|
8
|
-
export declare const ColorInput: ({ color, onChange, label, colorPickerType, }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const ColorInput: ({ color, onChange, label, colorPickerType, placeholder, }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -6,7 +6,11 @@ import type { AppState } from "../../types";
|
|
|
6
6
|
export declare const getColor: (color: string) => string | null;
|
|
7
7
|
interface ColorPickerProps {
|
|
8
8
|
type: ColorPickerType;
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* null indicates no color should be displayed as active
|
|
11
|
+
* (e.g. when multiple shapes selected with different colors)
|
|
12
|
+
*/
|
|
13
|
+
color: string | null;
|
|
10
14
|
onChange: (color: string) => void;
|
|
11
15
|
label: string;
|
|
12
16
|
elements: readonly ExcalidrawElement[];
|
|
@@ -3,9 +3,8 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
|
3
3
|
import type { ColorPaletteCustom } from "@excalidraw/common";
|
|
4
4
|
import type { ColorPickerType } from "./colorPickerUtils";
|
|
5
5
|
interface PickerProps {
|
|
6
|
-
color: string;
|
|
6
|
+
color: string | null;
|
|
7
7
|
onChange: (color: string) => void;
|
|
8
|
-
label: string;
|
|
9
8
|
type: ColorPickerType;
|
|
10
9
|
elements: readonly ExcalidrawElement[];
|
|
11
10
|
palette: ColorPaletteCustom;
|
|
@@ -14,5 +13,5 @@ interface PickerProps {
|
|
|
14
13
|
onEyeDropperToggle: (force?: boolean) => void;
|
|
15
14
|
onEscape: (event: React.KeyboardEvent | KeyboardEvent) => void;
|
|
16
15
|
}
|
|
17
|
-
export declare const Picker:
|
|
16
|
+
export declare const Picker: React.ForwardRefExoticComponent<PickerProps & React.RefAttributes<unknown>>;
|
|
18
17
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { ColorPaletteCustom } from "@excalidraw/common";
|
|
2
2
|
interface PickerColorListProps {
|
|
3
3
|
palette: ColorPaletteCustom;
|
|
4
|
-
color: string;
|
|
4
|
+
color: string | null;
|
|
5
5
|
onChange: (color: string) => void;
|
|
6
|
-
label: string;
|
|
7
6
|
activeShade: number;
|
|
8
7
|
}
|
|
9
|
-
declare const PickerColorList: ({ palette, color, onChange,
|
|
8
|
+
declare const PickerColorList: ({ palette, color, onChange, activeShade, }: PickerColorListProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export default PickerColorList;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ColorPaletteCustom } from "@excalidraw/common";
|
|
2
2
|
interface ShadeListProps {
|
|
3
|
-
|
|
3
|
+
color: string | null;
|
|
4
4
|
onChange: (color: string) => void;
|
|
5
5
|
palette: ColorPaletteCustom;
|
|
6
6
|
}
|
|
7
|
-
export declare const ShadeList: ({
|
|
7
|
+
export declare const ShadeList: ({ color, onChange, palette }: ShadeListProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -2,7 +2,7 @@ import type { ColorPickerType } from "./colorPickerUtils";
|
|
|
2
2
|
interface TopPicksProps {
|
|
3
3
|
onChange: (color: string) => void;
|
|
4
4
|
type: ColorPickerType;
|
|
5
|
-
activeColor: string;
|
|
5
|
+
activeColor: string | null;
|
|
6
6
|
topPicks?: readonly string[];
|
|
7
7
|
}
|
|
8
8
|
export declare const TopPicks: ({ onChange, type, activeColor, topPicks, }: TopPicksProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -2,7 +2,7 @@ import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
|
2
2
|
import type { ColorPickerColor, ColorPaletteCustom } from "@excalidraw/common";
|
|
3
3
|
export declare const getColorNameAndShadeFromColor: ({ palette, color, }: {
|
|
4
4
|
palette: ColorPaletteCustom;
|
|
5
|
-
color: string;
|
|
5
|
+
color: string | null;
|
|
6
6
|
}) => {
|
|
7
7
|
colorName: ColorPickerColor;
|
|
8
8
|
shade: number | null;
|
|
@@ -4,7 +4,7 @@ interface ColorPickerKeyNavHandlerProps {
|
|
|
4
4
|
event: React.KeyboardEvent;
|
|
5
5
|
activeColorPickerSection: ActiveColorPickerSectionAtomType;
|
|
6
6
|
palette: ColorPaletteCustom;
|
|
7
|
-
color: string;
|
|
7
|
+
color: string | null;
|
|
8
8
|
onChange: (color: string) => void;
|
|
9
9
|
customColors: string[];
|
|
10
10
|
setActiveColorPickerSection: (update: React.SetStateAction<ActiveColorPickerSectionAtomType>) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type Scene from "@excalidraw/element
|
|
1
|
+
import type { ConvertibleTypes, ExcalidrawElement, ExcalidrawTextContainer, ExcalidrawTextElementWithContainer } from "@excalidraw/element/types";
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import "./ConvertElementTypePopup.scss";
|
|
4
4
|
import type App from "./App";
|
|
5
5
|
export declare const convertElementTypePopupAtom: import("jotai/vanilla/atom").PrimitiveAtom<{
|
|
@@ -9,32 +9,6 @@ export declare const convertElementTypePopupAtom: import("jotai/vanilla/atom").P
|
|
|
9
9
|
type: "panel";
|
|
10
10
|
} | null;
|
|
11
11
|
};
|
|
12
|
-
export declare const fontSize_conversionCacheAtom: import("jotai/vanilla/atom").PrimitiveAtom<{
|
|
13
|
-
[id: string]: {
|
|
14
|
-
fontSize: number;
|
|
15
|
-
elementType: ConvertibleGenericTypes;
|
|
16
|
-
};
|
|
17
|
-
} | null> & {
|
|
18
|
-
init: {
|
|
19
|
-
[id: string]: {
|
|
20
|
-
fontSize: number;
|
|
21
|
-
elementType: ConvertibleGenericTypes;
|
|
22
|
-
};
|
|
23
|
-
} | null;
|
|
24
|
-
};
|
|
25
|
-
export declare const linearElement_conversionCacheAtom: import("jotai/vanilla/atom").PrimitiveAtom<{
|
|
26
|
-
[id: string]: {
|
|
27
|
-
properties: Partial<ExcalidrawLinearElement> | Partial<ExcalidrawElbowArrowElement>;
|
|
28
|
-
initialType: ConvertibleLinearTypes;
|
|
29
|
-
};
|
|
30
|
-
} | null> & {
|
|
31
|
-
init: {
|
|
32
|
-
[id: string]: {
|
|
33
|
-
properties: Partial<ExcalidrawLinearElement> | Partial<ExcalidrawElbowArrowElement>;
|
|
34
|
-
initialType: ConvertibleLinearTypes;
|
|
35
|
-
};
|
|
36
|
-
} | null;
|
|
37
|
-
};
|
|
38
12
|
declare const ConvertElementTypePopup: ({ app }: {
|
|
39
13
|
app: App;
|
|
40
14
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "@excalidraw/element
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import "./ElementLinkDialog.scss";
|
|
4
4
|
import type { AppProps, UIAppState } from "../types";
|
|
5
5
|
declare const ElementLinkDialog: ({ sourceElementId, onClose, appState, scene, generateLinkForSelection, }: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./Range.scss";
|
|
2
|
+
import type { AppClassProperties } from "../types";
|
|
2
3
|
export type RangeProps = {
|
|
3
4
|
updateData: (value: number) => void;
|
|
4
|
-
|
|
5
|
-
elements: any;
|
|
5
|
+
app: AppClassProperties;
|
|
6
6
|
testId?: string;
|
|
7
7
|
};
|
|
8
|
-
export declare const Range: ({ updateData,
|
|
8
|
+
export declare const Range: ({ updateData, app, testId }: RangeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "@excalidraw/element
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import type { AppState } from "../../types";
|
|
4
4
|
interface AngleProps {
|
|
5
5
|
element: ExcalidrawElement;
|
|
@@ -4,6 +4,7 @@ interface CollapsibleProps {
|
|
|
4
4
|
openTrigger: () => void;
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
className?: string;
|
|
7
|
+
showCollapsedIcon?: boolean;
|
|
7
8
|
}
|
|
8
|
-
declare const Collapsible: ({ label, open, openTrigger, children, className, }: CollapsibleProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const Collapsible: ({ label, open, openTrigger, children, className, showCollapsedIcon, }: CollapsibleProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export default Collapsible;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "@excalidraw/element
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import type { AppState } from "../../types";
|
|
4
4
|
interface DimensionDragInputProps {
|
|
5
5
|
property: "width" | "height";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "@excalidraw/element
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import "./DragInput.scss";
|
|
4
4
|
import type { StatsInputProperty } from "./utils";
|
|
5
5
|
import type { AppState } from "../../types";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "@excalidraw/element
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import type { AppState } from "../../types";
|
|
4
4
|
interface FontSizeProps {
|
|
5
5
|
element: ExcalidrawElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "@excalidraw/element
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import type { AppState } from "../../types";
|
|
4
4
|
interface MultiAngleProps {
|
|
5
5
|
elements: readonly ExcalidrawElement[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement, NonDeletedSceneElementsMap } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "@excalidraw/element
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import type { AtomicUnit } from "./utils";
|
|
4
4
|
import type { AppState } from "../../types";
|
|
5
5
|
interface MultiDimensionProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement, NonDeletedSceneElementsMap } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "@excalidraw/element
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import type { AppState } from "../../types";
|
|
4
4
|
interface MultiFontSizeProps {
|
|
5
5
|
elements: readonly ExcalidrawElement[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "@excalidraw/element
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import type { AtomicUnit } from "./utils";
|
|
4
4
|
import type { AppState } from "../../types";
|
|
5
5
|
interface MultiPositionProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "@excalidraw/element
|
|
2
|
+
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import type { AppState } from "../../types";
|
|
4
4
|
interface PositionProps {
|
|
5
5
|
property: "x" | "y";
|