@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,24 +1,142 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { AppState } from "../types";
|
|
1
|
+
import { ExcalidrawElement, ExcalidrawFrameElement } from "../element/types";
|
|
2
|
+
import { AppClassProperties, AppState } from "../types";
|
|
4
3
|
export declare const actionGroup: {
|
|
5
4
|
name: "group";
|
|
6
5
|
trackEvent: {
|
|
7
6
|
category: "element";
|
|
8
7
|
};
|
|
9
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app:
|
|
8
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
10
9
|
appState: Readonly<AppState>;
|
|
11
10
|
elements: readonly ExcalidrawElement[];
|
|
12
11
|
commitToHistory: false;
|
|
13
12
|
} | {
|
|
14
|
-
appState:
|
|
13
|
+
appState: {
|
|
14
|
+
selectedElementIds: Readonly<{
|
|
15
|
+
[id: string]: true;
|
|
16
|
+
}>;
|
|
17
|
+
selectedGroupIds: {
|
|
18
|
+
[groupId: string]: boolean;
|
|
19
|
+
};
|
|
20
|
+
editingGroupId: string | null;
|
|
21
|
+
contextMenu: {
|
|
22
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
23
|
+
top: number;
|
|
24
|
+
left: number;
|
|
25
|
+
} | null;
|
|
26
|
+
showWelcomeScreen: boolean;
|
|
27
|
+
isLoading: boolean;
|
|
28
|
+
errorMessage: import("react").ReactNode;
|
|
29
|
+
activeEmbeddable: {
|
|
30
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
31
|
+
state: "active" | "hover";
|
|
32
|
+
} | null;
|
|
33
|
+
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
34
|
+
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
35
|
+
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
36
|
+
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
37
|
+
isBindingEnabled: boolean;
|
|
38
|
+
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
39
|
+
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
40
|
+
frameToHighlight: import("../element/types").NonDeleted<ExcalidrawFrameElement> | null;
|
|
41
|
+
frameRendering: {
|
|
42
|
+
enabled: boolean;
|
|
43
|
+
name: boolean;
|
|
44
|
+
outline: boolean;
|
|
45
|
+
clip: boolean;
|
|
46
|
+
};
|
|
47
|
+
editingFrame: string | null;
|
|
48
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
49
|
+
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
50
|
+
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
51
|
+
activeTool: {
|
|
52
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
53
|
+
locked: boolean;
|
|
54
|
+
} & ({
|
|
55
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
56
|
+
customType: null;
|
|
57
|
+
} | {
|
|
58
|
+
type: "custom";
|
|
59
|
+
customType: string;
|
|
60
|
+
});
|
|
61
|
+
penMode: boolean;
|
|
62
|
+
penDetected: boolean;
|
|
63
|
+
exportBackground: boolean;
|
|
64
|
+
exportEmbedScene: boolean;
|
|
65
|
+
exportWithDarkMode: boolean;
|
|
66
|
+
exportScale: number;
|
|
67
|
+
currentItemStrokeColor: string;
|
|
68
|
+
currentItemBackgroundColor: string;
|
|
69
|
+
currentItemFillStyle: import("../element/types").FillStyle;
|
|
70
|
+
currentItemStrokeWidth: number;
|
|
71
|
+
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
72
|
+
currentItemRoughness: number;
|
|
73
|
+
currentItemOpacity: number;
|
|
74
|
+
currentItemFontFamily: number;
|
|
75
|
+
currentItemFontSize: number;
|
|
76
|
+
currentItemTextAlign: string;
|
|
77
|
+
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
78
|
+
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
79
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
80
|
+
viewBackgroundColor: string;
|
|
81
|
+
scrollX: number;
|
|
82
|
+
scrollY: number;
|
|
83
|
+
cursorButton: "up" | "down";
|
|
84
|
+
scrolledOutside: boolean;
|
|
85
|
+
name: string;
|
|
86
|
+
isResizing: boolean;
|
|
87
|
+
isRotating: boolean;
|
|
88
|
+
zoom: Readonly<{
|
|
89
|
+
value: import("../types").NormalizedZoomValue;
|
|
90
|
+
}>;
|
|
91
|
+
openMenu: "canvas" | "shape" | null;
|
|
92
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
93
|
+
openSidebar: {
|
|
94
|
+
name: string;
|
|
95
|
+
tab?: string | undefined;
|
|
96
|
+
} | null;
|
|
97
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
98
|
+
defaultSidebarDockedPreference: boolean;
|
|
99
|
+
lastPointerDownWith: import("../element/types").PointerType;
|
|
100
|
+
previousSelectedElementIds: {
|
|
101
|
+
[id: string]: true;
|
|
102
|
+
};
|
|
103
|
+
selectedElementsAreBeingDragged: boolean;
|
|
104
|
+
shouldCacheIgnoreZoom: boolean;
|
|
105
|
+
toast: {
|
|
106
|
+
message: string;
|
|
107
|
+
closable?: boolean | undefined;
|
|
108
|
+
duration?: number | undefined;
|
|
109
|
+
} | null;
|
|
110
|
+
zenModeEnabled: boolean;
|
|
111
|
+
theme: import("../element/types").Theme;
|
|
112
|
+
gridSize: number | null;
|
|
113
|
+
viewModeEnabled: boolean;
|
|
114
|
+
width: number;
|
|
115
|
+
height: number;
|
|
116
|
+
offsetTop: number;
|
|
117
|
+
offsetLeft: number;
|
|
118
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
119
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
120
|
+
showStats: boolean;
|
|
121
|
+
currentChartType: import("../element/types").ChartType;
|
|
122
|
+
pasteDialog: {
|
|
123
|
+
shown: false;
|
|
124
|
+
data: null;
|
|
125
|
+
} | {
|
|
126
|
+
shown: true;
|
|
127
|
+
data: import("../charts").Spreadsheet;
|
|
128
|
+
};
|
|
129
|
+
pendingImageElementId: string | null;
|
|
130
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
131
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
132
|
+
};
|
|
15
133
|
elements: ExcalidrawElement[];
|
|
16
134
|
commitToHistory: true;
|
|
17
135
|
};
|
|
18
136
|
contextItemLabel: string;
|
|
19
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
137
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
20
138
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
21
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
139
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
22
140
|
} & {
|
|
23
141
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
24
142
|
};
|
|
@@ -27,12 +145,131 @@ export declare const actionUngroup: {
|
|
|
27
145
|
trackEvent: {
|
|
28
146
|
category: "element";
|
|
29
147
|
};
|
|
30
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app:
|
|
148
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
31
149
|
appState: Readonly<AppState>;
|
|
32
150
|
elements: readonly ExcalidrawElement[];
|
|
33
151
|
commitToHistory: false;
|
|
34
152
|
} | {
|
|
35
|
-
appState:
|
|
153
|
+
appState: {
|
|
154
|
+
selectedElementIds: Readonly<{
|
|
155
|
+
[id: string]: true;
|
|
156
|
+
}>;
|
|
157
|
+
selectedGroupIds: {
|
|
158
|
+
[groupId: string]: boolean;
|
|
159
|
+
};
|
|
160
|
+
editingGroupId: string | null;
|
|
161
|
+
contextMenu: {
|
|
162
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
163
|
+
top: number;
|
|
164
|
+
left: number;
|
|
165
|
+
} | null;
|
|
166
|
+
showWelcomeScreen: boolean;
|
|
167
|
+
isLoading: boolean;
|
|
168
|
+
errorMessage: import("react").ReactNode;
|
|
169
|
+
activeEmbeddable: {
|
|
170
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
171
|
+
state: "active" | "hover";
|
|
172
|
+
} | null;
|
|
173
|
+
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
174
|
+
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
175
|
+
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
176
|
+
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
177
|
+
isBindingEnabled: boolean;
|
|
178
|
+
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
179
|
+
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
180
|
+
frameToHighlight: import("../element/types").NonDeleted<ExcalidrawFrameElement> | null;
|
|
181
|
+
frameRendering: {
|
|
182
|
+
enabled: boolean;
|
|
183
|
+
name: boolean;
|
|
184
|
+
outline: boolean;
|
|
185
|
+
clip: boolean;
|
|
186
|
+
};
|
|
187
|
+
editingFrame: string | null;
|
|
188
|
+
elementsToHighlight: import("../element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
189
|
+
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
190
|
+
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
191
|
+
activeTool: {
|
|
192
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
193
|
+
locked: boolean;
|
|
194
|
+
} & ({
|
|
195
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
196
|
+
customType: null;
|
|
197
|
+
} | {
|
|
198
|
+
type: "custom";
|
|
199
|
+
customType: string;
|
|
200
|
+
});
|
|
201
|
+
penMode: boolean;
|
|
202
|
+
penDetected: boolean;
|
|
203
|
+
exportBackground: boolean;
|
|
204
|
+
exportEmbedScene: boolean;
|
|
205
|
+
exportWithDarkMode: boolean;
|
|
206
|
+
exportScale: number;
|
|
207
|
+
currentItemStrokeColor: string;
|
|
208
|
+
currentItemBackgroundColor: string;
|
|
209
|
+
currentItemFillStyle: import("../element/types").FillStyle;
|
|
210
|
+
currentItemStrokeWidth: number;
|
|
211
|
+
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
212
|
+
currentItemRoughness: number;
|
|
213
|
+
currentItemOpacity: number;
|
|
214
|
+
currentItemFontFamily: number;
|
|
215
|
+
currentItemFontSize: number;
|
|
216
|
+
currentItemTextAlign: string;
|
|
217
|
+
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
218
|
+
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
219
|
+
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
220
|
+
viewBackgroundColor: string;
|
|
221
|
+
scrollX: number;
|
|
222
|
+
scrollY: number;
|
|
223
|
+
cursorButton: "up" | "down";
|
|
224
|
+
scrolledOutside: boolean;
|
|
225
|
+
name: string;
|
|
226
|
+
isResizing: boolean;
|
|
227
|
+
isRotating: boolean;
|
|
228
|
+
zoom: Readonly<{
|
|
229
|
+
value: import("../types").NormalizedZoomValue;
|
|
230
|
+
}>;
|
|
231
|
+
openMenu: "canvas" | "shape" | null;
|
|
232
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
233
|
+
openSidebar: {
|
|
234
|
+
name: string;
|
|
235
|
+
tab?: string | undefined;
|
|
236
|
+
} | null;
|
|
237
|
+
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
238
|
+
defaultSidebarDockedPreference: boolean;
|
|
239
|
+
lastPointerDownWith: import("../element/types").PointerType;
|
|
240
|
+
previousSelectedElementIds: {
|
|
241
|
+
[id: string]: true;
|
|
242
|
+
};
|
|
243
|
+
selectedElementsAreBeingDragged: boolean;
|
|
244
|
+
shouldCacheIgnoreZoom: boolean;
|
|
245
|
+
toast: {
|
|
246
|
+
message: string;
|
|
247
|
+
closable?: boolean | undefined;
|
|
248
|
+
duration?: number | undefined;
|
|
249
|
+
} | null;
|
|
250
|
+
zenModeEnabled: boolean;
|
|
251
|
+
theme: import("../element/types").Theme;
|
|
252
|
+
gridSize: number | null;
|
|
253
|
+
viewModeEnabled: boolean;
|
|
254
|
+
width: number;
|
|
255
|
+
height: number;
|
|
256
|
+
offsetTop: number;
|
|
257
|
+
offsetLeft: number;
|
|
258
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
259
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
260
|
+
showStats: boolean;
|
|
261
|
+
currentChartType: import("../element/types").ChartType;
|
|
262
|
+
pasteDialog: {
|
|
263
|
+
shown: false;
|
|
264
|
+
data: null;
|
|
265
|
+
} | {
|
|
266
|
+
shown: true;
|
|
267
|
+
data: import("../charts").Spreadsheet;
|
|
268
|
+
};
|
|
269
|
+
pendingImageElementId: string | null;
|
|
270
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
271
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
272
|
+
};
|
|
36
273
|
elements: ExcalidrawElement[];
|
|
37
274
|
commitToHistory: true;
|
|
38
275
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
3
2
|
import { ExcalidrawLinearElement } from "../element/types";
|
|
4
3
|
export declare const actionToggleLinearEditor: {
|
|
@@ -6,7 +5,7 @@ export declare const actionToggleLinearEditor: {
|
|
|
6
5
|
trackEvent: {
|
|
7
6
|
category: "element";
|
|
8
7
|
};
|
|
9
|
-
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
8
|
+
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
10
9
|
perform(elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties): {
|
|
11
10
|
appState: {
|
|
12
11
|
editingLinearElement: LinearElementEditor | null;
|
|
@@ -18,6 +17,10 @@ export declare const actionToggleLinearEditor: {
|
|
|
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<ExcalidrawLinearElement> | null;
|
|
@@ -26,7 +29,12 @@ export declare const actionToggleLinearEditor: {
|
|
|
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;
|
|
@@ -34,7 +42,7 @@ export declare const actionToggleLinearEditor: {
|
|
|
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 actionToggleLinearEditor: {
|
|
|
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 actionToggleLinearEditor: {
|
|
|
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
|
viewModeEnabled: boolean;
|
|
99
107
|
selectedGroupIds: {
|
|
@@ -116,12 +124,12 @@ export declare const actionToggleLinearEditor: {
|
|
|
116
124
|
data: import("../charts").Spreadsheet;
|
|
117
125
|
};
|
|
118
126
|
pendingImageElementId: string | null;
|
|
119
|
-
showHyperlinkPopup: false | "
|
|
127
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
120
128
|
selectedLinearElement: LinearElementEditor | null;
|
|
121
129
|
};
|
|
122
130
|
commitToHistory: false;
|
|
123
131
|
};
|
|
124
|
-
contextItemLabel: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState
|
|
132
|
+
contextItemLabel: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, app: import("../types").AppClassProperties) => "labels.lineEditor.exit" | "labels.lineEditor.edit";
|
|
125
133
|
} & {
|
|
126
134
|
keyTest?: undefined;
|
|
127
135
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const actionToggleCanvasMenu: {
|
|
3
2
|
name: "toggleCanvasMenu";
|
|
4
3
|
trackEvent: {
|
|
@@ -15,6 +14,10 @@ export declare const actionToggleCanvasMenu: {
|
|
|
15
14
|
showWelcomeScreen: boolean;
|
|
16
15
|
isLoading: boolean;
|
|
17
16
|
errorMessage: import("react").ReactNode;
|
|
17
|
+
activeEmbeddable: {
|
|
18
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
19
|
+
state: "active" | "hover";
|
|
20
|
+
} | null;
|
|
18
21
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
19
22
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
20
23
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -23,7 +26,12 @@ export declare const actionToggleCanvasMenu: {
|
|
|
23
26
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
24
27
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
25
28
|
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
26
|
-
|
|
29
|
+
frameRendering: {
|
|
30
|
+
enabled: boolean;
|
|
31
|
+
name: boolean;
|
|
32
|
+
outline: boolean;
|
|
33
|
+
clip: boolean;
|
|
34
|
+
};
|
|
27
35
|
editingFrame: string | null;
|
|
28
36
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
29
37
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -32,7 +40,7 @@ export declare const actionToggleCanvasMenu: {
|
|
|
32
40
|
lastActiveTool: import("../types").LastActiveTool;
|
|
33
41
|
locked: boolean;
|
|
34
42
|
} & ({
|
|
35
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
43
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
36
44
|
customType: null;
|
|
37
45
|
} | {
|
|
38
46
|
type: "custom";
|
|
@@ -76,11 +84,11 @@ export declare const actionToggleCanvasMenu: {
|
|
|
76
84
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
77
85
|
defaultSidebarDockedPreference: boolean;
|
|
78
86
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
79
|
-
selectedElementIds: {
|
|
80
|
-
[id: string]:
|
|
81
|
-
}
|
|
87
|
+
selectedElementIds: Readonly<{
|
|
88
|
+
[id: string]: true;
|
|
89
|
+
}>;
|
|
82
90
|
previousSelectedElementIds: {
|
|
83
|
-
[id: string]:
|
|
91
|
+
[id: string]: true;
|
|
84
92
|
};
|
|
85
93
|
selectedElementsAreBeingDragged: boolean;
|
|
86
94
|
shouldCacheIgnoreZoom: boolean;
|
|
@@ -90,7 +98,7 @@ export declare const actionToggleCanvasMenu: {
|
|
|
90
98
|
duration?: number | undefined;
|
|
91
99
|
} | null;
|
|
92
100
|
zenModeEnabled: boolean;
|
|
93
|
-
theme:
|
|
101
|
+
theme: import("../element/types").Theme;
|
|
94
102
|
gridSize: number | null;
|
|
95
103
|
viewModeEnabled: boolean;
|
|
96
104
|
selectedGroupIds: {
|
|
@@ -113,7 +121,7 @@ export declare const actionToggleCanvasMenu: {
|
|
|
113
121
|
data: import("../charts").Spreadsheet;
|
|
114
122
|
};
|
|
115
123
|
pendingImageElementId: string | null;
|
|
116
|
-
showHyperlinkPopup: false | "
|
|
124
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
117
125
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
118
126
|
};
|
|
119
127
|
commitToHistory: false;
|
|
@@ -138,6 +146,10 @@ export declare const actionToggleEditMenu: {
|
|
|
138
146
|
showWelcomeScreen: boolean;
|
|
139
147
|
isLoading: boolean;
|
|
140
148
|
errorMessage: import("react").ReactNode;
|
|
149
|
+
activeEmbeddable: {
|
|
150
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
151
|
+
state: "active" | "hover";
|
|
152
|
+
} | null;
|
|
141
153
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
142
154
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
143
155
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -146,7 +158,12 @@ export declare const actionToggleEditMenu: {
|
|
|
146
158
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
147
159
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
148
160
|
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
149
|
-
|
|
161
|
+
frameRendering: {
|
|
162
|
+
enabled: boolean;
|
|
163
|
+
name: boolean;
|
|
164
|
+
outline: boolean;
|
|
165
|
+
clip: boolean;
|
|
166
|
+
};
|
|
150
167
|
editingFrame: string | null;
|
|
151
168
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
152
169
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -155,7 +172,7 @@ export declare const actionToggleEditMenu: {
|
|
|
155
172
|
lastActiveTool: import("../types").LastActiveTool;
|
|
156
173
|
locked: boolean;
|
|
157
174
|
} & ({
|
|
158
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
175
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
159
176
|
customType: null;
|
|
160
177
|
} | {
|
|
161
178
|
type: "custom";
|
|
@@ -199,11 +216,11 @@ export declare const actionToggleEditMenu: {
|
|
|
199
216
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
200
217
|
defaultSidebarDockedPreference: boolean;
|
|
201
218
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
202
|
-
selectedElementIds: {
|
|
203
|
-
[id: string]:
|
|
204
|
-
}
|
|
219
|
+
selectedElementIds: Readonly<{
|
|
220
|
+
[id: string]: true;
|
|
221
|
+
}>;
|
|
205
222
|
previousSelectedElementIds: {
|
|
206
|
-
[id: string]:
|
|
223
|
+
[id: string]: true;
|
|
207
224
|
};
|
|
208
225
|
selectedElementsAreBeingDragged: boolean;
|
|
209
226
|
shouldCacheIgnoreZoom: boolean;
|
|
@@ -213,7 +230,7 @@ export declare const actionToggleEditMenu: {
|
|
|
213
230
|
duration?: number | undefined;
|
|
214
231
|
} | null;
|
|
215
232
|
zenModeEnabled: boolean;
|
|
216
|
-
theme:
|
|
233
|
+
theme: import("../element/types").Theme;
|
|
217
234
|
gridSize: number | null;
|
|
218
235
|
viewModeEnabled: boolean;
|
|
219
236
|
selectedGroupIds: {
|
|
@@ -236,7 +253,7 @@ export declare const actionToggleEditMenu: {
|
|
|
236
253
|
data: import("../charts").Spreadsheet;
|
|
237
254
|
};
|
|
238
255
|
pendingImageElementId: string | null;
|
|
239
|
-
showHyperlinkPopup: false | "
|
|
256
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
240
257
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
241
258
|
};
|
|
242
259
|
commitToHistory: false;
|
|
@@ -276,6 +293,10 @@ export declare const actionShortcuts: {
|
|
|
276
293
|
showWelcomeScreen: boolean;
|
|
277
294
|
isLoading: boolean;
|
|
278
295
|
errorMessage: import("react").ReactNode;
|
|
296
|
+
activeEmbeddable: {
|
|
297
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
298
|
+
state: "active" | "hover";
|
|
299
|
+
} | null;
|
|
279
300
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
280
301
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
281
302
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -284,7 +305,12 @@ export declare const actionShortcuts: {
|
|
|
284
305
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
285
306
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
286
307
|
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
287
|
-
|
|
308
|
+
frameRendering: {
|
|
309
|
+
enabled: boolean;
|
|
310
|
+
name: boolean;
|
|
311
|
+
outline: boolean;
|
|
312
|
+
clip: boolean;
|
|
313
|
+
};
|
|
288
314
|
editingFrame: string | null;
|
|
289
315
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
290
316
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -293,7 +319,7 @@ export declare const actionShortcuts: {
|
|
|
293
319
|
lastActiveTool: import("../types").LastActiveTool;
|
|
294
320
|
locked: boolean;
|
|
295
321
|
} & ({
|
|
296
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
322
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
297
323
|
customType: null;
|
|
298
324
|
} | {
|
|
299
325
|
type: "custom";
|
|
@@ -337,11 +363,11 @@ export declare const actionShortcuts: {
|
|
|
337
363
|
} | null;
|
|
338
364
|
defaultSidebarDockedPreference: boolean;
|
|
339
365
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
340
|
-
selectedElementIds: {
|
|
341
|
-
[id: string]:
|
|
342
|
-
}
|
|
366
|
+
selectedElementIds: Readonly<{
|
|
367
|
+
[id: string]: true;
|
|
368
|
+
}>;
|
|
343
369
|
previousSelectedElementIds: {
|
|
344
|
-
[id: string]:
|
|
370
|
+
[id: string]: true;
|
|
345
371
|
};
|
|
346
372
|
selectedElementsAreBeingDragged: boolean;
|
|
347
373
|
shouldCacheIgnoreZoom: boolean;
|
|
@@ -351,7 +377,7 @@ export declare const actionShortcuts: {
|
|
|
351
377
|
duration?: number | undefined;
|
|
352
378
|
} | null;
|
|
353
379
|
zenModeEnabled: boolean;
|
|
354
|
-
theme:
|
|
380
|
+
theme: import("../element/types").Theme;
|
|
355
381
|
gridSize: number | null;
|
|
356
382
|
viewModeEnabled: boolean;
|
|
357
383
|
selectedGroupIds: {
|
|
@@ -374,7 +400,7 @@ export declare const actionShortcuts: {
|
|
|
374
400
|
data: import("../charts").Spreadsheet;
|
|
375
401
|
};
|
|
376
402
|
pendingImageElementId: string | null;
|
|
377
|
-
showHyperlinkPopup: false | "
|
|
403
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
378
404
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
379
405
|
};
|
|
380
406
|
commitToHistory: false;
|