@excalidraw/excalidraw 0.15.2-3ddcc48 → 0.15.2-5302490
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/CHANGELOG.md +19 -0
- package/dist/excalidraw-assets/locales/{es-ES-json-f2467c6a875a9e288756.js → es-ES-json-4f3da97feff33cb00e6d.js} +1 -1
- package/dist/excalidraw-assets/locales/{hi-IN-json-e22f4ad73126c2971850.js → hi-IN-json-3898c9c1216b44476529.js} +1 -1
- package/dist/excalidraw-assets/locales/{id-ID-json-0e69caf5d919807ed234.js → id-ID-json-43d505d7071a0e359681.js} +1 -1
- package/dist/excalidraw-assets/locales/{kk-KZ-json-106d2a41c68f69765668.js → kk-KZ-json-f648362328b839e9313f.js} +1 -1
- package/dist/excalidraw-assets/locales/{pa-IN-json-0fd029451b07248c5194.js → pa-IN-json-d9ee09801ed220840b2b.js} +1 -1
- package/dist/excalidraw-assets/{vendor-53d1c69ef585b6dd219b.js → vendor-ef3c5d81a00ef582b871.js} +2 -2
- package/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.js → vendor-a14cd58fa2db417e42b2.js} +6 -6
- package/dist/excalidraw.development.js +2237 -2116
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +7 -2
- package/types/actions/actionAddToLibrary.d.ts +51 -25
- package/types/actions/actionAlign.d.ts +19 -20
- package/types/actions/actionBoundText.d.ts +38 -20
- package/types/actions/actionCanvas.d.ts +182 -90
- package/types/actions/actionClipboard.d.ts +81 -40
- package/types/actions/actionDeleteSelected.d.ts +45 -22
- package/types/actions/actionDistribute.d.ts +5 -6
- package/types/actions/actionDuplicateSelection.d.ts +0 -1
- package/types/actions/actionElementLock.d.ts +36 -19
- package/types/actions/actionExport.d.ts +161 -80
- package/types/actions/actionFinalize.d.ts +32 -18
- package/types/actions/actionFlip.d.ts +2 -3
- package/types/actions/actionFrame.d.ts +56 -30
- package/types/actions/actionGroup.d.ts +246 -9
- package/types/actions/actionLinearEditor.d.ts +19 -11
- package/types/actions/actionMenu.d.ts +51 -25
- package/types/actions/actionProperties.d.ts +223 -105
- package/types/actions/actionSelectAll.d.ts +121 -2
- package/types/actions/actionStyles.d.ts +17 -9
- package/types/actions/actionToggleGridMode.d.ts +17 -9
- package/types/actions/actionToggleStats.d.ts +17 -9
- package/types/actions/actionToggleViewMode.d.ts +17 -9
- package/types/actions/actionToggleZenMode.d.ts +17 -9
- package/types/actions/types.d.ts +4 -3
- package/types/appState.d.ts +7 -7
- package/types/clipboard.d.ts +1 -0
- package/types/colors.d.ts +9 -9
- package/types/components/Actions.d.ts +2 -2
- package/types/components/App.d.ts +24 -7
- package/types/components/Button.d.ts +0 -1
- package/types/components/Card.d.ts +0 -1
- package/types/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
- package/types/components/DefaultSidebar.d.ts +0 -1
- package/types/components/ExcalidrawLogo.d.ts +15 -0
- package/types/components/EyeDropper.d.ts +0 -1
- package/types/components/HintViewer.d.ts +3 -4
- package/types/components/JSONExportDialog.d.ts +1 -1
- package/types/components/LayerUI.d.ts +4 -2
- package/types/components/LibraryMenuHeaderContent.d.ts +0 -1
- package/types/components/LibraryUnit.d.ts +0 -1
- package/types/components/LoadingMessage.d.ts +0 -1
- package/types/components/MobileMenu.d.ts +4 -3
- package/types/components/Section.d.ts +1 -1
- package/types/components/Sidebar/SidebarTab.d.ts +0 -1
- package/types/components/Sidebar/SidebarTabTrigger.d.ts +0 -1
- package/types/components/Sidebar/SidebarTabTriggers.d.ts +0 -1
- package/types/components/Sidebar/SidebarTabs.d.ts +0 -1
- package/types/components/Stack.d.ts +2 -2
- package/types/components/Trans.d.ts +2 -1
- package/types/components/canvases/InteractiveCanvas.d.ts +27 -0
- package/types/components/canvases/StaticCanvas.d.ts +18 -0
- package/types/components/canvases/index.d.ts +3 -0
- package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +0 -1
- package/types/components/icons.d.ts +1 -0
- package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -1
- package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -1
- package/types/components/welcome-screen/WelcomeScreen.d.ts +0 -1
- package/types/constants.d.ts +17 -3
- package/types/data/transform.d.ts +71 -0
- package/types/data/url.d.ts +5 -0
- package/types/element/Hyperlink.d.ts +27 -13
- package/types/element/binding.d.ts +1 -0
- package/types/element/collision.d.ts +2 -2
- package/types/element/embeddable.d.ts +153 -0
- package/types/element/linearElementEditor.d.ts +20 -12
- package/types/element/newElement.d.ts +14 -7
- package/types/element/sizeHelpers.d.ts +8 -1
- package/types/element/textElement.d.ts +5 -7
- package/types/element/textWysiwyg.d.ts +1 -1
- package/types/element/transformHandles.d.ts +3 -3
- package/types/element/typeChecks.d.ts +2 -1
- package/types/element/types.d.ts +13 -2
- package/types/frame.d.ts +5 -5
- package/types/groups.d.ts +12 -12
- package/types/history.d.ts +3 -3
- package/types/hooks/useOutsideClick.d.ts +0 -1
- package/types/hooks/useScrollPosition.d.ts +0 -1
- package/types/i18n.d.ts +5 -2
- package/types/keys.d.ts +1 -0
- package/types/packages/excalidraw/example/initialData.d.ts +182 -70
- package/types/packages/excalidraw/index.d.ts +1 -0
- package/types/packages/excalidraw/webpack.dev.config.d.ts +5 -2
- package/types/packages/excalidraw/webpack.prod.config.d.ts +3 -0
- package/types/packages/utils.d.ts +2 -1
- package/types/renderer/renderElement.d.ts +10 -22
- package/types/renderer/renderScene.d.ts +18 -37
- package/types/scene/Renderer.d.ts +25 -0
- package/types/scene/Scene.d.ts +15 -0
- package/types/scene/Shape.d.ts +12 -0
- package/types/scene/ShapeCache.d.ts +20 -0
- package/types/scene/export.d.ts +1 -0
- package/types/scene/scroll.d.ts +1 -1
- package/types/scene/scrollbars.d.ts +2 -6
- package/types/scene/selection.d.ts +13 -3
- package/types/scene/types.d.ts +57 -24
- package/types/types.d.ts +63 -12
- package/types/utility-types.d.ts +3 -1
- package/types/utils.d.ts +13 -5
- /package/dist/excalidraw-assets/{vendor-53d1c69ef585b6dd219b.js.LICENSE.txt → vendor-ef3c5d81a00ef582b871.js.LICENSE.txt} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{es-ES-json-f2467c6a875a9e288756.d.ts → es-ES-json-4f3da97feff33cb00e6d.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{hi-IN-json-e22f4ad73126c2971850.d.ts → hi-IN-json-3898c9c1216b44476529.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{id-ID-json-0e69caf5d919807ed234.d.ts → id-ID-json-43d505d7071a0e359681.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{kk-KZ-json-106d2a41c68f69765668.d.ts → kk-KZ-json-f648362328b839e9313f.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/locales/{pa-IN-json-0fd029451b07248c5194.d.ts → pa-IN-json-d9ee09801ed220840b2b.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-53d1c69ef585b6dd219b.d.ts → vendor-ef3c5d81a00ef582b871.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.d.ts → vendor-a14cd58fa2db417e42b2.d.ts} +0 -0
|
@@ -1,12 +1,131 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ExcalidrawElement } from "../element/types";
|
|
2
|
+
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
3
3
|
export declare const actionSelectAll: {
|
|
4
4
|
name: "selectAll";
|
|
5
5
|
trackEvent: {
|
|
6
6
|
category: "canvas";
|
|
7
7
|
};
|
|
8
8
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => false | {
|
|
9
|
-
appState:
|
|
9
|
+
appState: {
|
|
10
|
+
selectedLinearElement: LinearElementEditor | null;
|
|
11
|
+
selectedElementIds: Readonly<{
|
|
12
|
+
[id: string]: true;
|
|
13
|
+
}>;
|
|
14
|
+
selectedGroupIds: {
|
|
15
|
+
[groupId: string]: boolean;
|
|
16
|
+
};
|
|
17
|
+
editingGroupId: string | null;
|
|
18
|
+
contextMenu: {
|
|
19
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
20
|
+
top: number;
|
|
21
|
+
left: number;
|
|
22
|
+
} | null;
|
|
23
|
+
showWelcomeScreen: boolean;
|
|
24
|
+
isLoading: boolean;
|
|
25
|
+
errorMessage: import("react").ReactNode;
|
|
26
|
+
activeEmbeddable: {
|
|
27
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
28
|
+
state: "active" | "hover";
|
|
29
|
+
} | null;
|
|
30
|
+
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
31
|
+
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
32
|
+
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
33
|
+
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
34
|
+
isBindingEnabled: boolean;
|
|
35
|
+
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
36
|
+
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
37
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
38
|
+
frameRendering: {
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
name: boolean;
|
|
41
|
+
outline: boolean;
|
|
42
|
+
clip: boolean;
|
|
43
|
+
};
|
|
44
|
+
editingFrame: string | null;
|
|
45
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
46
|
+
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
47
|
+
editingLinearElement: LinearElementEditor | null;
|
|
48
|
+
activeTool: {
|
|
49
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
50
|
+
locked: boolean;
|
|
51
|
+
} & ({
|
|
52
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
53
|
+
customType: null;
|
|
54
|
+
} | {
|
|
55
|
+
type: "custom";
|
|
56
|
+
customType: string;
|
|
57
|
+
});
|
|
58
|
+
penMode: boolean;
|
|
59
|
+
penDetected: boolean;
|
|
60
|
+
exportBackground: boolean;
|
|
61
|
+
exportEmbedScene: boolean;
|
|
62
|
+
exportWithDarkMode: boolean;
|
|
63
|
+
exportScale: number;
|
|
64
|
+
currentItemStrokeColor: string;
|
|
65
|
+
currentItemBackgroundColor: string;
|
|
66
|
+
currentItemFillStyle: import("../element/types").FillStyle;
|
|
67
|
+
currentItemStrokeWidth: number;
|
|
68
|
+
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
69
|
+
currentItemRoughness: number;
|
|
70
|
+
currentItemOpacity: number;
|
|
71
|
+
currentItemFontFamily: number;
|
|
72
|
+
currentItemFontSize: number;
|
|
73
|
+
currentItemTextAlign: string;
|
|
74
|
+
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
75
|
+
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
76
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
77
|
+
viewBackgroundColor: string;
|
|
78
|
+
scrollX: number;
|
|
79
|
+
scrollY: number;
|
|
80
|
+
cursorButton: "up" | "down";
|
|
81
|
+
scrolledOutside: boolean;
|
|
82
|
+
name: string;
|
|
83
|
+
isResizing: boolean;
|
|
84
|
+
isRotating: boolean;
|
|
85
|
+
zoom: Readonly<{
|
|
86
|
+
value: import("../types").NormalizedZoomValue;
|
|
87
|
+
}>;
|
|
88
|
+
openMenu: "canvas" | "shape" | null;
|
|
89
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
90
|
+
openSidebar: {
|
|
91
|
+
name: string;
|
|
92
|
+
tab?: string | undefined;
|
|
93
|
+
} | null;
|
|
94
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
95
|
+
defaultSidebarDockedPreference: boolean;
|
|
96
|
+
lastPointerDownWith: import("../element/types").PointerType;
|
|
97
|
+
previousSelectedElementIds: {
|
|
98
|
+
[id: string]: true;
|
|
99
|
+
};
|
|
100
|
+
selectedElementsAreBeingDragged: boolean;
|
|
101
|
+
shouldCacheIgnoreZoom: boolean;
|
|
102
|
+
toast: {
|
|
103
|
+
message: string;
|
|
104
|
+
closable?: boolean | undefined;
|
|
105
|
+
duration?: number | undefined;
|
|
106
|
+
} | null;
|
|
107
|
+
zenModeEnabled: boolean;
|
|
108
|
+
theme: import("../element/types").Theme;
|
|
109
|
+
gridSize: number | null;
|
|
110
|
+
viewModeEnabled: boolean;
|
|
111
|
+
width: number;
|
|
112
|
+
height: number;
|
|
113
|
+
offsetTop: number;
|
|
114
|
+
offsetLeft: number;
|
|
115
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
116
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
117
|
+
showStats: boolean;
|
|
118
|
+
currentChartType: import("../element/types").ChartType;
|
|
119
|
+
pasteDialog: {
|
|
120
|
+
shown: false;
|
|
121
|
+
data: null;
|
|
122
|
+
} | {
|
|
123
|
+
shown: true;
|
|
124
|
+
data: import("../charts").Spreadsheet;
|
|
125
|
+
};
|
|
126
|
+
pendingImageElementId: string | null;
|
|
127
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
128
|
+
};
|
|
10
129
|
commitToHistory: true;
|
|
11
130
|
};
|
|
12
131
|
contextItemLabel: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare let copiedStyles: string;
|
|
3
2
|
export declare const actionCopyStyles: {
|
|
4
3
|
name: "copyStyles";
|
|
@@ -18,6 +17,10 @@ export declare const actionCopyStyles: {
|
|
|
18
17
|
showWelcomeScreen: boolean;
|
|
19
18
|
isLoading: boolean;
|
|
20
19
|
errorMessage: import("react").ReactNode;
|
|
20
|
+
activeEmbeddable: {
|
|
21
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
22
|
+
state: "active" | "hover";
|
|
23
|
+
} | null;
|
|
21
24
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
25
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
23
26
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -26,7 +29,12 @@ export declare const actionCopyStyles: {
|
|
|
26
29
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
27
30
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
28
31
|
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
29
|
-
|
|
32
|
+
frameRendering: {
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
name: boolean;
|
|
35
|
+
outline: boolean;
|
|
36
|
+
clip: boolean;
|
|
37
|
+
};
|
|
30
38
|
editingFrame: string | null;
|
|
31
39
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
32
40
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -35,7 +43,7 @@ export declare const actionCopyStyles: {
|
|
|
35
43
|
lastActiveTool: import("../types").LastActiveTool;
|
|
36
44
|
locked: boolean;
|
|
37
45
|
} & ({
|
|
38
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
46
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
39
47
|
customType: null;
|
|
40
48
|
} | {
|
|
41
49
|
type: "custom";
|
|
@@ -80,16 +88,16 @@ export declare const actionCopyStyles: {
|
|
|
80
88
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
81
89
|
defaultSidebarDockedPreference: boolean;
|
|
82
90
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
83
|
-
selectedElementIds: {
|
|
84
|
-
[id: string]:
|
|
85
|
-
}
|
|
91
|
+
selectedElementIds: Readonly<{
|
|
92
|
+
[id: string]: true;
|
|
93
|
+
}>;
|
|
86
94
|
previousSelectedElementIds: {
|
|
87
|
-
[id: string]:
|
|
95
|
+
[id: string]: true;
|
|
88
96
|
};
|
|
89
97
|
selectedElementsAreBeingDragged: boolean;
|
|
90
98
|
shouldCacheIgnoreZoom: boolean;
|
|
91
99
|
zenModeEnabled: boolean;
|
|
92
|
-
theme:
|
|
100
|
+
theme: import("../element/types").Theme;
|
|
93
101
|
gridSize: number | null;
|
|
94
102
|
viewModeEnabled: boolean;
|
|
95
103
|
selectedGroupIds: {
|
|
@@ -112,7 +120,7 @@ export declare const actionCopyStyles: {
|
|
|
112
120
|
data: import("../charts").Spreadsheet;
|
|
113
121
|
};
|
|
114
122
|
pendingImageElementId: string | null;
|
|
115
|
-
showHyperlinkPopup: false | "
|
|
123
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
116
124
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
117
125
|
};
|
|
118
126
|
commitToHistory: false;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { AppState } from "../types";
|
|
3
2
|
export declare const actionToggleGridMode: {
|
|
4
3
|
name: "gridMode";
|
|
@@ -18,6 +17,10 @@ export declare const actionToggleGridMode: {
|
|
|
18
17
|
showWelcomeScreen: boolean;
|
|
19
18
|
isLoading: boolean;
|
|
20
19
|
errorMessage: import("react").ReactNode;
|
|
20
|
+
activeEmbeddable: {
|
|
21
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
22
|
+
state: "active" | "hover";
|
|
23
|
+
} | null;
|
|
21
24
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
25
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
23
26
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -26,7 +29,12 @@ export declare const actionToggleGridMode: {
|
|
|
26
29
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
27
30
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
28
31
|
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
29
|
-
|
|
32
|
+
frameRendering: {
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
name: boolean;
|
|
35
|
+
outline: boolean;
|
|
36
|
+
clip: boolean;
|
|
37
|
+
};
|
|
30
38
|
editingFrame: string | null;
|
|
31
39
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
32
40
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -35,7 +43,7 @@ export declare const actionToggleGridMode: {
|
|
|
35
43
|
lastActiveTool: import("../types").LastActiveTool;
|
|
36
44
|
locked: boolean;
|
|
37
45
|
} & ({
|
|
38
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
46
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
39
47
|
customType: null;
|
|
40
48
|
} | {
|
|
41
49
|
type: "custom";
|
|
@@ -80,11 +88,11 @@ export declare const actionToggleGridMode: {
|
|
|
80
88
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
81
89
|
defaultSidebarDockedPreference: boolean;
|
|
82
90
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
83
|
-
selectedElementIds: {
|
|
84
|
-
[id: string]:
|
|
85
|
-
}
|
|
91
|
+
selectedElementIds: Readonly<{
|
|
92
|
+
[id: string]: true;
|
|
93
|
+
}>;
|
|
86
94
|
previousSelectedElementIds: {
|
|
87
|
-
[id: string]:
|
|
95
|
+
[id: string]: true;
|
|
88
96
|
};
|
|
89
97
|
selectedElementsAreBeingDragged: boolean;
|
|
90
98
|
shouldCacheIgnoreZoom: boolean;
|
|
@@ -94,7 +102,7 @@ export declare const actionToggleGridMode: {
|
|
|
94
102
|
duration?: number | undefined;
|
|
95
103
|
} | null;
|
|
96
104
|
zenModeEnabled: boolean;
|
|
97
|
-
theme:
|
|
105
|
+
theme: import("../element/types").Theme;
|
|
98
106
|
viewModeEnabled: boolean;
|
|
99
107
|
selectedGroupIds: {
|
|
100
108
|
[groupId: string]: boolean;
|
|
@@ -116,7 +124,7 @@ export declare const actionToggleGridMode: {
|
|
|
116
124
|
data: import("../charts").Spreadsheet;
|
|
117
125
|
};
|
|
118
126
|
pendingImageElementId: string | null;
|
|
119
|
-
showHyperlinkPopup: false | "
|
|
127
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
120
128
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
121
129
|
};
|
|
122
130
|
commitToHistory: false;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const actionToggleStats: {
|
|
3
2
|
name: "stats";
|
|
4
3
|
viewMode: true;
|
|
@@ -16,6 +15,10 @@ export declare const actionToggleStats: {
|
|
|
16
15
|
showWelcomeScreen: boolean;
|
|
17
16
|
isLoading: boolean;
|
|
18
17
|
errorMessage: import("react").ReactNode;
|
|
18
|
+
activeEmbeddable: {
|
|
19
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
20
|
+
state: "active" | "hover";
|
|
21
|
+
} | null;
|
|
19
22
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
20
23
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
21
24
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -24,7 +27,12 @@ export declare const actionToggleStats: {
|
|
|
24
27
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
25
28
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
26
29
|
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
27
|
-
|
|
30
|
+
frameRendering: {
|
|
31
|
+
enabled: boolean;
|
|
32
|
+
name: boolean;
|
|
33
|
+
outline: boolean;
|
|
34
|
+
clip: boolean;
|
|
35
|
+
};
|
|
28
36
|
editingFrame: string | null;
|
|
29
37
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
30
38
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -33,7 +41,7 @@ export declare const actionToggleStats: {
|
|
|
33
41
|
lastActiveTool: import("../types").LastActiveTool;
|
|
34
42
|
locked: boolean;
|
|
35
43
|
} & ({
|
|
36
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
44
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
37
45
|
customType: null;
|
|
38
46
|
} | {
|
|
39
47
|
type: "custom";
|
|
@@ -78,11 +86,11 @@ export declare const actionToggleStats: {
|
|
|
78
86
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
79
87
|
defaultSidebarDockedPreference: boolean;
|
|
80
88
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
81
|
-
selectedElementIds: {
|
|
82
|
-
[id: string]:
|
|
83
|
-
}
|
|
89
|
+
selectedElementIds: Readonly<{
|
|
90
|
+
[id: string]: true;
|
|
91
|
+
}>;
|
|
84
92
|
previousSelectedElementIds: {
|
|
85
|
-
[id: string]:
|
|
93
|
+
[id: string]: true;
|
|
86
94
|
};
|
|
87
95
|
selectedElementsAreBeingDragged: boolean;
|
|
88
96
|
shouldCacheIgnoreZoom: boolean;
|
|
@@ -92,7 +100,7 @@ export declare const actionToggleStats: {
|
|
|
92
100
|
duration?: number | undefined;
|
|
93
101
|
} | null;
|
|
94
102
|
zenModeEnabled: boolean;
|
|
95
|
-
theme:
|
|
103
|
+
theme: import("../element/types").Theme;
|
|
96
104
|
gridSize: number | null;
|
|
97
105
|
viewModeEnabled: boolean;
|
|
98
106
|
selectedGroupIds: {
|
|
@@ -114,7 +122,7 @@ export declare const actionToggleStats: {
|
|
|
114
122
|
data: import("../charts").Spreadsheet;
|
|
115
123
|
};
|
|
116
124
|
pendingImageElementId: string | null;
|
|
117
|
-
showHyperlinkPopup: false | "
|
|
125
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
118
126
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
119
127
|
};
|
|
120
128
|
commitToHistory: false;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const actionToggleViewMode: {
|
|
3
2
|
name: "viewMode";
|
|
4
3
|
viewMode: true;
|
|
@@ -17,6 +16,10 @@ export declare const actionToggleViewMode: {
|
|
|
17
16
|
showWelcomeScreen: boolean;
|
|
18
17
|
isLoading: boolean;
|
|
19
18
|
errorMessage: import("react").ReactNode;
|
|
19
|
+
activeEmbeddable: {
|
|
20
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
21
|
+
state: "active" | "hover";
|
|
22
|
+
} | null;
|
|
20
23
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
21
24
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
25
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -25,7 +28,12 @@ export declare const actionToggleViewMode: {
|
|
|
25
28
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
26
29
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
27
30
|
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
28
|
-
|
|
31
|
+
frameRendering: {
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
name: boolean;
|
|
34
|
+
outline: boolean;
|
|
35
|
+
clip: boolean;
|
|
36
|
+
};
|
|
29
37
|
editingFrame: string | null;
|
|
30
38
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
31
39
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -34,7 +42,7 @@ export declare const actionToggleViewMode: {
|
|
|
34
42
|
lastActiveTool: import("../types").LastActiveTool;
|
|
35
43
|
locked: boolean;
|
|
36
44
|
} & ({
|
|
37
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
45
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
38
46
|
customType: null;
|
|
39
47
|
} | {
|
|
40
48
|
type: "custom";
|
|
@@ -79,11 +87,11 @@ export declare const actionToggleViewMode: {
|
|
|
79
87
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
80
88
|
defaultSidebarDockedPreference: boolean;
|
|
81
89
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
82
|
-
selectedElementIds: {
|
|
83
|
-
[id: string]:
|
|
84
|
-
}
|
|
90
|
+
selectedElementIds: Readonly<{
|
|
91
|
+
[id: string]: true;
|
|
92
|
+
}>;
|
|
85
93
|
previousSelectedElementIds: {
|
|
86
|
-
[id: string]:
|
|
94
|
+
[id: string]: true;
|
|
87
95
|
};
|
|
88
96
|
selectedElementsAreBeingDragged: boolean;
|
|
89
97
|
shouldCacheIgnoreZoom: boolean;
|
|
@@ -93,7 +101,7 @@ export declare const actionToggleViewMode: {
|
|
|
93
101
|
duration?: number | undefined;
|
|
94
102
|
} | null;
|
|
95
103
|
zenModeEnabled: boolean;
|
|
96
|
-
theme:
|
|
104
|
+
theme: import("../element/types").Theme;
|
|
97
105
|
gridSize: number | null;
|
|
98
106
|
selectedGroupIds: {
|
|
99
107
|
[groupId: string]: boolean;
|
|
@@ -115,7 +123,7 @@ export declare const actionToggleViewMode: {
|
|
|
115
123
|
data: import("../charts").Spreadsheet;
|
|
116
124
|
};
|
|
117
125
|
pendingImageElementId: string | null;
|
|
118
|
-
showHyperlinkPopup: false | "
|
|
126
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
119
127
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
120
128
|
};
|
|
121
129
|
commitToHistory: false;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const actionToggleZenMode: {
|
|
3
2
|
name: "zenMode";
|
|
4
3
|
viewMode: true;
|
|
@@ -17,6 +16,10 @@ export declare const actionToggleZenMode: {
|
|
|
17
16
|
showWelcomeScreen: boolean;
|
|
18
17
|
isLoading: boolean;
|
|
19
18
|
errorMessage: import("react").ReactNode;
|
|
19
|
+
activeEmbeddable: {
|
|
20
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
21
|
+
state: "active" | "hover";
|
|
22
|
+
} | null;
|
|
20
23
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
21
24
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
25
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -25,7 +28,12 @@ export declare const actionToggleZenMode: {
|
|
|
25
28
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
26
29
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
27
30
|
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
28
|
-
|
|
31
|
+
frameRendering: {
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
name: boolean;
|
|
34
|
+
outline: boolean;
|
|
35
|
+
clip: boolean;
|
|
36
|
+
};
|
|
29
37
|
editingFrame: string | null;
|
|
30
38
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
31
39
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -34,7 +42,7 @@ export declare const actionToggleZenMode: {
|
|
|
34
42
|
lastActiveTool: import("../types").LastActiveTool;
|
|
35
43
|
locked: boolean;
|
|
36
44
|
} & ({
|
|
37
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
45
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
38
46
|
customType: null;
|
|
39
47
|
} | {
|
|
40
48
|
type: "custom";
|
|
@@ -79,11 +87,11 @@ export declare const actionToggleZenMode: {
|
|
|
79
87
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
80
88
|
defaultSidebarDockedPreference: boolean;
|
|
81
89
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
82
|
-
selectedElementIds: {
|
|
83
|
-
[id: string]:
|
|
84
|
-
}
|
|
90
|
+
selectedElementIds: Readonly<{
|
|
91
|
+
[id: string]: true;
|
|
92
|
+
}>;
|
|
85
93
|
previousSelectedElementIds: {
|
|
86
|
-
[id: string]:
|
|
94
|
+
[id: string]: true;
|
|
87
95
|
};
|
|
88
96
|
selectedElementsAreBeingDragged: boolean;
|
|
89
97
|
shouldCacheIgnoreZoom: boolean;
|
|
@@ -92,7 +100,7 @@ export declare const actionToggleZenMode: {
|
|
|
92
100
|
closable?: boolean | undefined;
|
|
93
101
|
duration?: number | undefined;
|
|
94
102
|
} | null;
|
|
95
|
-
theme:
|
|
103
|
+
theme: import("../element/types").Theme;
|
|
96
104
|
gridSize: number | null;
|
|
97
105
|
viewModeEnabled: boolean;
|
|
98
106
|
selectedGroupIds: {
|
|
@@ -115,7 +123,7 @@ export declare const actionToggleZenMode: {
|
|
|
115
123
|
data: import("../charts").Spreadsheet;
|
|
116
124
|
};
|
|
117
125
|
pendingImageElementId: string | null;
|
|
118
|
-
showHyperlinkPopup: false | "
|
|
126
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
119
127
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
120
128
|
};
|
|
121
129
|
commitToHistory: false;
|
package/types/actions/types.d.ts
CHANGED
|
@@ -15,21 +15,22 @@ export type ActionResult = {
|
|
|
15
15
|
type ActionFn = (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
16
16
|
export type UpdaterFn = (res: ActionResult) => void;
|
|
17
17
|
export type ActionFilterFn = (action: Action) => void;
|
|
18
|
-
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "
|
|
18
|
+
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer";
|
|
19
19
|
export type PanelComponentProps = {
|
|
20
20
|
elements: readonly ExcalidrawElement[];
|
|
21
21
|
appState: AppState;
|
|
22
22
|
updateData: (formData?: any) => void;
|
|
23
23
|
appProps: ExcalidrawProps;
|
|
24
24
|
data?: Record<string, any>;
|
|
25
|
+
app: AppClassProperties;
|
|
25
26
|
};
|
|
26
27
|
export interface Action {
|
|
27
28
|
name: ActionName;
|
|
28
29
|
PanelComponent?: React.FC<PanelComponentProps>;
|
|
29
30
|
perform: ActionFn;
|
|
30
31
|
keyPriority?: number;
|
|
31
|
-
keyTest?: (event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean;
|
|
32
|
-
contextItemLabel?: string | ((elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
32
|
+
keyTest?: (event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean;
|
|
33
|
+
contextItemLabel?: string | ((elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, app: AppClassProperties) => string);
|
|
33
34
|
predicate?: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
34
35
|
checked?: (appState: Readonly<AppState>) => boolean;
|
|
35
36
|
trackEvent: false | {
|
package/types/appState.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { 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
|
-
theme?:
|
|
4
|
+
theme?: import("./element/types").Theme | undefined;
|
|
5
5
|
name?: string | undefined;
|
|
6
6
|
activeTool?: ({
|
|
7
7
|
lastActiveTool: import("./types").LastActiveTool;
|
|
8
8
|
locked: boolean;
|
|
9
9
|
} & ({
|
|
10
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
10
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
11
11
|
customType: null;
|
|
12
12
|
} | {
|
|
13
13
|
type: "custom";
|
|
14
14
|
customType: string;
|
|
15
15
|
})) | undefined;
|
|
16
|
-
showWelcomeScreen?: boolean | undefined;
|
|
17
16
|
penMode?: boolean | undefined;
|
|
17
|
+
showWelcomeScreen?: boolean | undefined;
|
|
18
18
|
penDetected?: boolean | undefined;
|
|
19
19
|
exportBackground?: boolean | undefined;
|
|
20
20
|
exportEmbedScene?: boolean | undefined;
|
|
@@ -48,11 +48,11 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
48
48
|
} | null | undefined;
|
|
49
49
|
defaultSidebarDockedPreference?: boolean | undefined;
|
|
50
50
|
lastPointerDownWith?: import("./element/types").PointerType | undefined;
|
|
51
|
-
selectedElementIds?: {
|
|
52
|
-
[id: string]:
|
|
53
|
-
} | undefined;
|
|
51
|
+
selectedElementIds?: Readonly<{
|
|
52
|
+
[id: string]: true;
|
|
53
|
+
}> | undefined;
|
|
54
54
|
previousSelectedElementIds?: {
|
|
55
|
-
[id: string]:
|
|
55
|
+
[id: string]: true;
|
|
56
56
|
} | undefined;
|
|
57
57
|
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
58
58
|
zenModeEnabled?: boolean | undefined;
|
package/types/clipboard.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface ClipboardData {
|
|
|
7
7
|
files?: BinaryFiles;
|
|
8
8
|
text?: string;
|
|
9
9
|
errorMessage?: string;
|
|
10
|
+
programmaticAPI?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export declare const probablySupportsClipboardReadText: boolean;
|
|
12
13
|
export declare const probablySupportsClipboardWriteText: boolean;
|
package/types/colors.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ import { Merge } from "./utility-types";
|
|
|
3
3
|
export type ColorPickerColor = Exclude<keyof oc, "indigo" | "lime"> | "transparent" | "bronze";
|
|
4
4
|
export type ColorTuple = readonly [string, string, string, string, string];
|
|
5
5
|
export type ColorPalette = Merge<Record<ColorPickerColor, ColorTuple>, {
|
|
6
|
-
black:
|
|
7
|
-
white:
|
|
8
|
-
transparent:
|
|
6
|
+
black: "#1e1e1e";
|
|
7
|
+
white: "#ffffff";
|
|
8
|
+
transparent: "transparent";
|
|
9
9
|
}>;
|
|
10
10
|
export type ColorPaletteCustom = {
|
|
11
11
|
[key: string]: ColorTuple | string;
|
|
@@ -34,10 +34,10 @@ export declare const DEFAULT_ELEMENT_STROKE_COLOR_PALETTE: {
|
|
|
34
34
|
readonly green: ColorTuple;
|
|
35
35
|
readonly yellow: ColorTuple;
|
|
36
36
|
readonly orange: ColorTuple;
|
|
37
|
-
readonly transparent:
|
|
38
|
-
readonly white:
|
|
37
|
+
readonly transparent: "transparent";
|
|
38
|
+
readonly white: "#ffffff";
|
|
39
39
|
readonly gray: ColorTuple;
|
|
40
|
-
readonly black:
|
|
40
|
+
readonly black: "#1e1e1e";
|
|
41
41
|
readonly bronze: ColorTuple;
|
|
42
42
|
};
|
|
43
43
|
export declare const DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE: {
|
|
@@ -51,10 +51,10 @@ export declare const DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE: {
|
|
|
51
51
|
readonly green: ColorTuple;
|
|
52
52
|
readonly yellow: ColorTuple;
|
|
53
53
|
readonly orange: ColorTuple;
|
|
54
|
-
readonly transparent:
|
|
55
|
-
readonly white:
|
|
54
|
+
readonly transparent: "transparent";
|
|
55
|
+
readonly white: "#ffffff";
|
|
56
56
|
readonly gray: ColorTuple;
|
|
57
|
-
readonly black:
|
|
57
|
+
readonly black: "#1e1e1e";
|
|
58
58
|
readonly bronze: ColorTuple;
|
|
59
59
|
};
|
|
60
60
|
export declare const getAllColorsSpecificShade: (index: 0 | 1 | 2 | 3 | 4) => readonly [string, string, string, string, string, string, string, string, string, string];
|
|
@@ -8,8 +8,8 @@ export declare const SelectedShapeActions: ({ appState, elements, renderAction,
|
|
|
8
8
|
elements: readonly ExcalidrawElement[];
|
|
9
9
|
renderAction: ActionManager["renderAction"];
|
|
10
10
|
}) => JSX.Element;
|
|
11
|
-
export declare const ShapesSwitcher: ({
|
|
12
|
-
|
|
11
|
+
export declare const ShapesSwitcher: ({ interactiveCanvas, activeTool, setAppState, onImageAction, appState, }: {
|
|
12
|
+
interactiveCanvas: HTMLCanvasElement | null;
|
|
13
13
|
activeTool: UIAppState["activeTool"];
|
|
14
14
|
setAppState: React.Component<any, UIAppState>["setState"];
|
|
15
15
|
onImageAction: (data: {
|