@excalidraw/math 0.18.0-1118751 → 0.18.0-17d8904
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/common/src/constants.d.ts +3 -0
- package/dist/types/common/src/utils.d.ts +5 -0
- package/dist/types/element/src/binding.d.ts +8 -0
- package/dist/types/element/src/bounds.d.ts +3 -1
- package/dist/types/element/src/collision.d.ts +6 -0
- package/dist/types/element/src/cropElement.d.ts +36 -4
- package/dist/types/element/src/groups.d.ts +1 -6
- package/dist/types/element/src/index.d.ts +1 -0
- package/dist/types/element/src/listMarker.d.ts +34 -0
- package/dist/types/element/src/newElement.d.ts +15 -1
- package/dist/types/element/src/resizeElements.d.ts +8 -1
- package/dist/types/element/src/selection.d.ts +1 -7
- package/dist/types/element/src/textElement.d.ts +7 -0
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +27 -3
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +55 -214
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +69 -13
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +18 -2
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +9 -1
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +4 -564
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +13 -2
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +9 -1
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +18 -2
- package/dist/types/excalidraw/actions/actionExport.d.ts +25 -9
- package/dist/types/excalidraw/actions/actionFrame.d.ts +68 -528
- package/dist/types/excalidraw/actions/actionGroup.d.ts +20 -4
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +9 -1
- package/dist/types/excalidraw/actions/actionLink.d.ts +9 -1
- package/dist/types/excalidraw/actions/actionMenu.d.ts +9 -1
- package/dist/types/excalidraw/actions/actionProperties.d.ts +18 -2
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +10 -2
- package/dist/types/excalidraw/actions/actionStyles.d.ts +9 -1
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +9 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +9 -1
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +9 -1
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +9 -1
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +9 -1
- package/dist/types/excalidraw/actions/actionToggleShowHints.d.ts +197 -0
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +9 -1
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +9 -1
- package/dist/types/excalidraw/actions/actionToggleWrap.d.ts +12 -0
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +9 -1
- package/dist/types/excalidraw/actions/index.d.ts +2 -0
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +8 -7
- package/dist/types/excalidraw/components/App.arrowText.d.ts +5 -39
- package/dist/types/excalidraw/components/App.clipboard.d.ts +31 -0
- package/dist/types/excalidraw/components/App.d.ts +70 -264
- package/dist/types/excalidraw/components/App.duplicate.d.ts +52 -2
- package/dist/types/excalidraw/components/App.modifiers.d.ts +38 -0
- package/dist/types/excalidraw/components/App.pan.d.ts +8 -0
- package/dist/types/excalidraw/components/App.selection.d.ts +265 -0
- package/dist/types/excalidraw/components/App.selectionTool.d.ts +93 -0
- package/dist/types/excalidraw/components/App.text.d.ts +146 -0
- package/dist/types/excalidraw/components/App.textTool.d.ts +140 -0
- package/dist/types/excalidraw/components/App.viewport.d.ts +41 -1
- package/dist/types/excalidraw/components/App.wrap.d.ts +31 -0
- package/dist/types/excalidraw/components/FileDropOverlay.d.ts +2 -0
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +6 -2
- package/dist/types/excalidraw/components/LibraryUnit.d.ts +7 -2
- package/dist/types/excalidraw/components/Tooltip.d.ts +15 -1
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -0
- package/dist/types/excalidraw/data/blob.d.ts +32 -16
- package/dist/types/excalidraw/data/index.d.ts +1 -3
- package/dist/types/excalidraw/data/json.d.ts +16 -8
- package/dist/types/excalidraw/scene/export.d.ts +308 -20
- package/dist/types/excalidraw/scene/types.d.ts +3 -1
- package/dist/types/excalidraw/types.d.ts +55 -13
- package/dist/types/excalidraw/viewport.d.ts +22 -1
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +12 -1
- package/dist/types/utils/src/index.d.ts +2 -1
- package/package.json +2 -2
- package/dist/types/utils/src/export.d.ts +0 -36
|
@@ -1,34 +1,26 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { Scene } from "@excalidraw/element";
|
|
2
|
+
import type { ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextContainer, ExcalidrawTextElement, ExcalidrawTextElementWithContainer, NonDeleted, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
3
|
+
import type { ActionResult } from "./types";
|
|
4
|
+
import type { AppClassProperties, AppState } from "../types";
|
|
5
|
+
/**
|
|
6
|
+
* Frees the container's text as it rendered: wrapped the same, at a fixed
|
|
7
|
+
* width.
|
|
8
|
+
*/
|
|
9
|
+
export declare const unbindTextFromContainer: (container: ExcalidrawElement, boundTextElement: ExcalidrawTextElementWithContainer, scene: Scene) => void;
|
|
4
10
|
export declare const actionUnbindText: {
|
|
5
11
|
name: "unbindText";
|
|
6
12
|
label: string;
|
|
7
13
|
trackEvent: {
|
|
8
14
|
category: "element";
|
|
9
15
|
};
|
|
10
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app:
|
|
11
|
-
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app:
|
|
16
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
17
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => {
|
|
12
18
|
elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
13
|
-
appState: Readonly<AppState>;
|
|
14
|
-
captureUpdate: "IMMEDIATELY";
|
|
15
|
-
};
|
|
16
|
-
} & {
|
|
17
|
-
keyTest?: undefined;
|
|
18
|
-
};
|
|
19
|
-
export declare const actionBindText: {
|
|
20
|
-
name: "bindText";
|
|
21
|
-
label: string;
|
|
22
|
-
trackEvent: {
|
|
23
|
-
category: "element";
|
|
24
|
-
};
|
|
25
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
26
|
-
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: import("../types").AppClassProperties) => {
|
|
27
|
-
elements: ExcalidrawElement[];
|
|
28
19
|
appState: {
|
|
29
|
-
selectedElementIds:
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
selectedElementIds: AppState["selectedElementIds"];
|
|
21
|
+
editingGroupId: AppState["editingGroupId"];
|
|
22
|
+
selectedGroupIds: AppState["selectedGroupIds"];
|
|
23
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
32
24
|
contextMenu: {
|
|
33
25
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
34
26
|
top: number;
|
|
@@ -38,27 +30,35 @@ export declare const actionBindText: {
|
|
|
38
30
|
isLoading: boolean;
|
|
39
31
|
errorMessage: React.ReactNode;
|
|
40
32
|
activeEmbeddable: {
|
|
41
|
-
element:
|
|
33
|
+
element: NonDeletedExcalidrawElement;
|
|
42
34
|
state: "hover" | "active";
|
|
43
35
|
} | null;
|
|
44
|
-
newElement:
|
|
45
|
-
resizingElement:
|
|
46
|
-
multiElement:
|
|
47
|
-
selectionElement:
|
|
36
|
+
newElement: NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
37
|
+
resizingElement: NonDeletedExcalidrawElement | null;
|
|
38
|
+
multiElement: NonDeleted<ExcalidrawLinearElement> | null;
|
|
39
|
+
selectionElement: NonDeletedExcalidrawElement | null;
|
|
48
40
|
isBindingEnabled: boolean;
|
|
49
41
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
50
42
|
bindingPreference: "enabled" | "disabled";
|
|
51
43
|
isMidpointSnappingEnabled: boolean;
|
|
44
|
+
showHints: boolean;
|
|
52
45
|
inputDevice: import("../types").InputDevice;
|
|
53
46
|
suggestedBinding: {
|
|
54
|
-
element:
|
|
47
|
+
element: NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
55
48
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
56
49
|
} | null;
|
|
57
|
-
|
|
50
|
+
textToolHover: {
|
|
51
|
+
type: "text";
|
|
52
|
+
elementId: ExcalidrawElement["id"];
|
|
53
|
+
} | {
|
|
54
|
+
type: "container";
|
|
55
|
+
elementId: ExcalidrawElement["id"];
|
|
56
|
+
} | {
|
|
57
|
+
type: "arrow";
|
|
58
58
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
59
59
|
anchor: "start" | "end" | "label";
|
|
60
60
|
} | null;
|
|
61
|
-
frameToHighlight:
|
|
61
|
+
frameToHighlight: NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
62
62
|
frameRendering: {
|
|
63
63
|
enabled: boolean;
|
|
64
64
|
name: boolean;
|
|
@@ -66,7 +66,7 @@ export declare const actionBindText: {
|
|
|
66
66
|
clip: boolean;
|
|
67
67
|
};
|
|
68
68
|
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
69
|
-
elementsToHighlight: readonly
|
|
69
|
+
elementsToHighlight: readonly NonDeletedExcalidrawElement[] | null;
|
|
70
70
|
editingTextElement: ExcalidrawTextElement | null;
|
|
71
71
|
activeTool: {
|
|
72
72
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
@@ -155,10 +155,6 @@ export declare const actionBindText: {
|
|
|
155
155
|
gridStep: number;
|
|
156
156
|
gridModeEnabled: boolean;
|
|
157
157
|
viewModeEnabled: boolean;
|
|
158
|
-
selectedGroupIds: {
|
|
159
|
-
[groupId: string]: boolean;
|
|
160
|
-
};
|
|
161
|
-
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
162
158
|
width: number;
|
|
163
159
|
height: number;
|
|
164
160
|
offsetTop: number;
|
|
@@ -170,7 +166,6 @@ export declare const actionBindText: {
|
|
|
170
166
|
panels: number;
|
|
171
167
|
};
|
|
172
168
|
showHyperlinkPopup: false | "info" | "editor";
|
|
173
|
-
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
174
169
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
175
170
|
originSnapOffset: {
|
|
176
171
|
x: number;
|
|
@@ -202,189 +197,35 @@ export declare const actionBindText: {
|
|
|
202
197
|
} & {
|
|
203
198
|
keyTest?: undefined;
|
|
204
199
|
};
|
|
200
|
+
export declare const actionBindText: {
|
|
201
|
+
name: "bindText";
|
|
202
|
+
label: string;
|
|
203
|
+
trackEvent: {
|
|
204
|
+
category: "element";
|
|
205
|
+
};
|
|
206
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
207
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => ActionResult;
|
|
208
|
+
} & {
|
|
209
|
+
keyTest?: undefined;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* A note and its label share one ink: the text the user styled wins, unless it
|
|
213
|
+
* is transparent (a note's label never is).
|
|
214
|
+
*/
|
|
215
|
+
export declare const getStickyNoteInk: (textElement: ExcalidrawTextElement, container: ExcalidrawElement) => string | null;
|
|
216
|
+
/** binds the text to the (label-less) container, selecting the container */
|
|
217
|
+
export declare const bindTextToContainer: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, textElement: ExcalidrawTextElement, container: NonDeleted<ExcalidrawTextContainer>, app: AppClassProperties) => ActionResult;
|
|
218
|
+
export declare const pushContainerBelowText: (elements: readonly ExcalidrawElement[], container: ExcalidrawElement, textElement: ExcalidrawTextElement) => ExcalidrawElement[];
|
|
205
219
|
export declare const actionWrapTextInContainer: {
|
|
206
220
|
name: "wrapTextInContainer";
|
|
207
221
|
label: string;
|
|
208
222
|
trackEvent: {
|
|
209
223
|
category: "element";
|
|
210
224
|
};
|
|
211
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app:
|
|
212
|
-
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app:
|
|
213
|
-
elements: readonly ExcalidrawElement[];
|
|
214
|
-
appState: {
|
|
215
|
-
selectedElementIds: Mutable<Readonly<{
|
|
216
|
-
[id: string]: true;
|
|
217
|
-
}>>;
|
|
218
|
-
contextMenu: {
|
|
219
|
-
items: import("../components/ContextMenu").ContextMenuItems;
|
|
220
|
-
top: number;
|
|
221
|
-
left: number;
|
|
222
|
-
} | null;
|
|
223
|
-
showWelcomeScreen: boolean;
|
|
224
|
-
isLoading: boolean;
|
|
225
|
-
errorMessage: React.ReactNode;
|
|
226
|
-
activeEmbeddable: {
|
|
227
|
-
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
228
|
-
state: "hover" | "active";
|
|
229
|
-
} | null;
|
|
230
|
-
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
231
|
-
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
232
|
-
multiElement: import("@excalidraw/element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
233
|
-
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
234
|
-
isBindingEnabled: boolean;
|
|
235
|
-
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
236
|
-
bindingPreference: "enabled" | "disabled";
|
|
237
|
-
isMidpointSnappingEnabled: boolean;
|
|
238
|
-
inputDevice: import("../types").InputDevice;
|
|
239
|
-
suggestedBinding: {
|
|
240
|
-
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
241
|
-
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
242
|
-
} | null;
|
|
243
|
-
hoveredArrowTextAnchor: {
|
|
244
|
-
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
245
|
-
anchor: "start" | "end" | "label";
|
|
246
|
-
} | null;
|
|
247
|
-
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
248
|
-
frameRendering: {
|
|
249
|
-
enabled: boolean;
|
|
250
|
-
name: boolean;
|
|
251
|
-
outline: boolean;
|
|
252
|
-
clip: boolean;
|
|
253
|
-
};
|
|
254
|
-
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
255
|
-
elementsToHighlight: readonly import("@excalidraw/element/types").NonDeletedExcalidrawElement[] | null;
|
|
256
|
-
editingTextElement: ExcalidrawTextElement | null;
|
|
257
|
-
activeTool: {
|
|
258
|
-
lastActiveTool: import("../types").ActiveTool | null;
|
|
259
|
-
locked: boolean;
|
|
260
|
-
fromSelection: boolean;
|
|
261
|
-
} & import("../types").ActiveTool;
|
|
262
|
-
preferredSelectionTool: {
|
|
263
|
-
type: "selection" | "lasso";
|
|
264
|
-
initialized: boolean;
|
|
265
|
-
};
|
|
266
|
-
penMode: boolean;
|
|
267
|
-
penDetected: boolean;
|
|
268
|
-
exportBackground: boolean;
|
|
269
|
-
exportEmbedScene: boolean;
|
|
270
|
-
exportWithDarkMode: boolean;
|
|
271
|
-
exportScale: number;
|
|
272
|
-
currentItemStrokeColor: string;
|
|
273
|
-
currentItemStickynoteStrokeColor: string;
|
|
274
|
-
currentItemStickynoteBackgroundColor: string;
|
|
275
|
-
currentItemBackgroundColor: string;
|
|
276
|
-
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
277
|
-
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
278
|
-
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
279
|
-
currentItemRoughness: number;
|
|
280
|
-
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
281
|
-
currentItemOpacity: number;
|
|
282
|
-
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
283
|
-
currentItemFontSize: number;
|
|
284
|
-
currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
|
|
285
|
-
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
286
|
-
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
287
|
-
currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
|
|
288
|
-
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
289
|
-
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
290
|
-
viewBackgroundColor: string;
|
|
291
|
-
scrollX: number;
|
|
292
|
-
scrollY: number;
|
|
293
|
-
scrollConstraints: import("../types").ScrollConstraints | null;
|
|
294
|
-
cursorButton: "up" | "down";
|
|
295
|
-
scrolledOutside: boolean;
|
|
296
|
-
name: string | null;
|
|
297
|
-
isResizing: boolean;
|
|
298
|
-
isRotating: boolean;
|
|
299
|
-
zoom: import("../types").Zoom;
|
|
300
|
-
openMenu: "canvas" | null;
|
|
301
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
302
|
-
openSidebar: {
|
|
303
|
-
name: import("../types").SidebarName;
|
|
304
|
-
tab?: import("../types").SidebarTabName;
|
|
305
|
-
} | null;
|
|
306
|
-
openDialog: null | {
|
|
307
|
-
name: "imageExport" | "help" | "jsonExport";
|
|
308
|
-
} | {
|
|
309
|
-
name: "ttd";
|
|
310
|
-
tab: "text-to-diagram" | "mermaid";
|
|
311
|
-
} | {
|
|
312
|
-
name: "commandPalette";
|
|
313
|
-
} | {
|
|
314
|
-
name: "settings";
|
|
315
|
-
} | {
|
|
316
|
-
name: "elementLinkSelector";
|
|
317
|
-
sourceElementId: ExcalidrawElement["id"];
|
|
318
|
-
} | {
|
|
319
|
-
name: "charts";
|
|
320
|
-
data: import("../charts").Spreadsheet;
|
|
321
|
-
rawText: string;
|
|
322
|
-
};
|
|
323
|
-
defaultSidebarDockedPreference: boolean;
|
|
324
|
-
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
325
|
-
hoveredElementIds: Readonly<{
|
|
326
|
-
[id: string]: true;
|
|
327
|
-
}>;
|
|
328
|
-
previousSelectedElementIds: {
|
|
329
|
-
[id: string]: true;
|
|
330
|
-
};
|
|
331
|
-
selectedElementsAreBeingDragged: boolean;
|
|
332
|
-
shouldCacheIgnoreZoom: boolean;
|
|
333
|
-
toast: {
|
|
334
|
-
message: React.ReactNode;
|
|
335
|
-
closable?: boolean;
|
|
336
|
-
duration?: number;
|
|
337
|
-
} | null;
|
|
338
|
-
zenModeEnabled: boolean;
|
|
339
|
-
theme: import("@excalidraw/element/types").Theme;
|
|
340
|
-
gridSize: number;
|
|
341
|
-
gridStep: number;
|
|
342
|
-
gridModeEnabled: boolean;
|
|
343
|
-
viewModeEnabled: boolean;
|
|
344
|
-
selectedGroupIds: {
|
|
345
|
-
[groupId: string]: boolean;
|
|
346
|
-
};
|
|
347
|
-
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
348
|
-
width: number;
|
|
349
|
-
height: number;
|
|
350
|
-
offsetTop: number;
|
|
351
|
-
offsetLeft: number;
|
|
352
|
-
fileHandle: FileSystemFileHandle | null;
|
|
353
|
-
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
354
|
-
stats: {
|
|
355
|
-
open: boolean;
|
|
356
|
-
panels: number;
|
|
357
|
-
};
|
|
358
|
-
showHyperlinkPopup: false | "info" | "editor";
|
|
359
|
-
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
360
|
-
snapLines: readonly import("../snapping").SnapLine[];
|
|
361
|
-
originSnapOffset: {
|
|
362
|
-
x: number;
|
|
363
|
-
y: number;
|
|
364
|
-
} | null;
|
|
365
|
-
objectsSnapModeEnabled: boolean;
|
|
366
|
-
isCropping: boolean;
|
|
367
|
-
croppingElementId: ExcalidrawElement["id"] | null;
|
|
368
|
-
searchMatches: Readonly<{
|
|
369
|
-
focusedId: ExcalidrawElement["id"] | null;
|
|
370
|
-
matches: readonly import("../types").SearchMatch[];
|
|
371
|
-
}> | null;
|
|
372
|
-
activeLockedId: string | null;
|
|
373
|
-
lockedMultiSelections: {
|
|
374
|
-
[groupId: string]: true;
|
|
375
|
-
};
|
|
376
|
-
bindMode: import("@excalidraw/element/types").BindMode;
|
|
377
|
-
colorTopPicks: {
|
|
378
|
-
elementStroke: readonly string[] | null;
|
|
379
|
-
elementBackground: readonly string[] | null;
|
|
380
|
-
bucketFill: readonly string[] | null;
|
|
381
|
-
stickyNoteStroke: readonly string[] | null;
|
|
382
|
-
stickyNoteBackground: readonly string[] | null;
|
|
383
|
-
};
|
|
384
|
-
fontTopPicks: readonly import("@excalidraw/element/types").FontFamilyValues[] | null;
|
|
385
|
-
};
|
|
386
|
-
captureUpdate: "IMMEDIATELY";
|
|
387
|
-
};
|
|
225
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
226
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => ActionResult;
|
|
388
227
|
} & {
|
|
389
228
|
keyTest?: undefined;
|
|
390
229
|
};
|
|
230
|
+
/** wraps each (unbound) text in a new container, selecting the containers */
|
|
231
|
+
export declare const wrapTextsInContainers: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, textElements: readonly ExcalidrawTextElement[], app: AppClassProperties) => ActionResult;
|
|
@@ -48,6 +48,11 @@ export declare const actionClearCanvas: {
|
|
|
48
48
|
};
|
|
49
49
|
name: string | null;
|
|
50
50
|
zoom: import("../types").Zoom;
|
|
51
|
+
isBindingEnabled: boolean;
|
|
52
|
+
isMidpointSnappingEnabled: boolean;
|
|
53
|
+
selectedElementIds: Readonly<{
|
|
54
|
+
[id: string]: true;
|
|
55
|
+
}>;
|
|
51
56
|
scrollX: number;
|
|
52
57
|
scrollY: number;
|
|
53
58
|
viewModeEnabled: boolean;
|
|
@@ -69,9 +74,6 @@ export declare const actionClearCanvas: {
|
|
|
69
74
|
rawText: string;
|
|
70
75
|
};
|
|
71
76
|
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
72
|
-
selectedElementIds: Readonly<{
|
|
73
|
-
[id: string]: true;
|
|
74
|
-
}>;
|
|
75
77
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
76
78
|
activeEmbeddable: {
|
|
77
79
|
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
@@ -84,13 +86,18 @@ export declare const actionClearCanvas: {
|
|
|
84
86
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
85
87
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
86
88
|
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
87
|
-
isBindingEnabled: boolean;
|
|
88
|
-
isMidpointSnappingEnabled: boolean;
|
|
89
89
|
suggestedBinding: {
|
|
90
90
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
91
91
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
92
92
|
} | null;
|
|
93
|
-
|
|
93
|
+
textToolHover: {
|
|
94
|
+
type: "text";
|
|
95
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
96
|
+
} | {
|
|
97
|
+
type: "container";
|
|
98
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
99
|
+
} | {
|
|
100
|
+
type: "arrow";
|
|
94
101
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
95
102
|
anchor: "start" | "end" | "label";
|
|
96
103
|
} | null;
|
|
@@ -113,7 +120,6 @@ export declare const actionClearCanvas: {
|
|
|
113
120
|
shouldCacheIgnoreZoom: boolean;
|
|
114
121
|
exportScale: number;
|
|
115
122
|
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
116
|
-
bindMode: import("@excalidraw/element/types").BindMode;
|
|
117
123
|
contextMenu: {
|
|
118
124
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
119
125
|
top: number;
|
|
@@ -125,6 +131,7 @@ export declare const actionClearCanvas: {
|
|
|
125
131
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
126
132
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
127
133
|
bindingPreference: "enabled" | "disabled";
|
|
134
|
+
showHints: boolean;
|
|
128
135
|
inputDevice: import("../types").InputDevice;
|
|
129
136
|
editingFrame: import("@excalidraw/element/types").ExcalidrawFrameLikeElement["id"] | null;
|
|
130
137
|
preferredSelectionTool: {
|
|
@@ -180,6 +187,7 @@ export declare const actionClearCanvas: {
|
|
|
180
187
|
lockedMultiSelections: {
|
|
181
188
|
[groupId: string]: true;
|
|
182
189
|
};
|
|
190
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
183
191
|
};
|
|
184
192
|
captureUpdate: "IMMEDIATELY";
|
|
185
193
|
};
|
|
@@ -221,12 +229,20 @@ export declare const actionZoomIn: {
|
|
|
221
229
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
222
230
|
bindingPreference: "enabled" | "disabled";
|
|
223
231
|
isMidpointSnappingEnabled: boolean;
|
|
232
|
+
showHints: boolean;
|
|
224
233
|
inputDevice: import("../types").InputDevice;
|
|
225
234
|
suggestedBinding: {
|
|
226
235
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
227
236
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
228
237
|
} | null;
|
|
229
|
-
|
|
238
|
+
textToolHover: {
|
|
239
|
+
type: "text";
|
|
240
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
241
|
+
} | {
|
|
242
|
+
type: "container";
|
|
243
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
244
|
+
} | {
|
|
245
|
+
type: "arrow";
|
|
230
246
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
231
247
|
anchor: "start" | "end" | "label";
|
|
232
248
|
} | null;
|
|
@@ -411,12 +427,20 @@ export declare const actionZoomOut: {
|
|
|
411
427
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
412
428
|
bindingPreference: "enabled" | "disabled";
|
|
413
429
|
isMidpointSnappingEnabled: boolean;
|
|
430
|
+
showHints: boolean;
|
|
414
431
|
inputDevice: import("../types").InputDevice;
|
|
415
432
|
suggestedBinding: {
|
|
416
433
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
417
434
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
418
435
|
} | null;
|
|
419
|
-
|
|
436
|
+
textToolHover: {
|
|
437
|
+
type: "text";
|
|
438
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
439
|
+
} | {
|
|
440
|
+
type: "container";
|
|
441
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
442
|
+
} | {
|
|
443
|
+
type: "arrow";
|
|
420
444
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
421
445
|
anchor: "start" | "end" | "label";
|
|
422
446
|
} | null;
|
|
@@ -601,12 +625,20 @@ export declare const actionResetZoom: {
|
|
|
601
625
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
602
626
|
bindingPreference: "enabled" | "disabled";
|
|
603
627
|
isMidpointSnappingEnabled: boolean;
|
|
628
|
+
showHints: boolean;
|
|
604
629
|
inputDevice: import("../types").InputDevice;
|
|
605
630
|
suggestedBinding: {
|
|
606
631
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
607
632
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
608
633
|
} | null;
|
|
609
|
-
|
|
634
|
+
textToolHover: {
|
|
635
|
+
type: "text";
|
|
636
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
637
|
+
} | {
|
|
638
|
+
type: "container";
|
|
639
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
640
|
+
} | {
|
|
641
|
+
type: "arrow";
|
|
610
642
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
611
643
|
anchor: "start" | "end" | "label";
|
|
612
644
|
} | null;
|
|
@@ -791,12 +823,20 @@ export declare const actionZoomToFitSelectionInViewport: {
|
|
|
791
823
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
792
824
|
bindingPreference: "enabled" | "disabled";
|
|
793
825
|
isMidpointSnappingEnabled: boolean;
|
|
826
|
+
showHints: boolean;
|
|
794
827
|
inputDevice: import("../types").InputDevice;
|
|
795
828
|
suggestedBinding: {
|
|
796
829
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
797
830
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
798
831
|
} | null;
|
|
799
|
-
|
|
832
|
+
textToolHover: {
|
|
833
|
+
type: "text";
|
|
834
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
835
|
+
} | {
|
|
836
|
+
type: "container";
|
|
837
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
838
|
+
} | {
|
|
839
|
+
type: "arrow";
|
|
800
840
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
801
841
|
anchor: "start" | "end" | "label";
|
|
802
842
|
} | null;
|
|
@@ -980,12 +1020,20 @@ export declare const actionZoomToFitSelection: {
|
|
|
980
1020
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
981
1021
|
bindingPreference: "enabled" | "disabled";
|
|
982
1022
|
isMidpointSnappingEnabled: boolean;
|
|
1023
|
+
showHints: boolean;
|
|
983
1024
|
inputDevice: import("../types").InputDevice;
|
|
984
1025
|
suggestedBinding: {
|
|
985
1026
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
986
1027
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
987
1028
|
} | null;
|
|
988
|
-
|
|
1029
|
+
textToolHover: {
|
|
1030
|
+
type: "text";
|
|
1031
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
1032
|
+
} | {
|
|
1033
|
+
type: "container";
|
|
1034
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
1035
|
+
} | {
|
|
1036
|
+
type: "arrow";
|
|
989
1037
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
990
1038
|
anchor: "start" | "end" | "label";
|
|
991
1039
|
} | null;
|
|
@@ -1169,12 +1217,20 @@ export declare const actionZoomToFit: {
|
|
|
1169
1217
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
1170
1218
|
bindingPreference: "enabled" | "disabled";
|
|
1171
1219
|
isMidpointSnappingEnabled: boolean;
|
|
1220
|
+
showHints: boolean;
|
|
1172
1221
|
inputDevice: import("../types").InputDevice;
|
|
1173
1222
|
suggestedBinding: {
|
|
1174
1223
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
1175
1224
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
1176
1225
|
} | null;
|
|
1177
|
-
|
|
1226
|
+
textToolHover: {
|
|
1227
|
+
type: "text";
|
|
1228
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
1229
|
+
} | {
|
|
1230
|
+
type: "container";
|
|
1231
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
1232
|
+
} | {
|
|
1233
|
+
type: "arrow";
|
|
1178
1234
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
1179
1235
|
anchor: "start" | "end" | "label";
|
|
1180
1236
|
} | null;
|
|
@@ -30,12 +30,20 @@ export declare const actionPaste: {
|
|
|
30
30
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
31
31
|
bindingPreference: "enabled" | "disabled";
|
|
32
32
|
isMidpointSnappingEnabled: boolean;
|
|
33
|
+
showHints: boolean;
|
|
33
34
|
inputDevice: import("../types").InputDevice;
|
|
34
35
|
suggestedBinding: {
|
|
35
36
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
36
37
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
37
38
|
} | null;
|
|
38
|
-
|
|
39
|
+
textToolHover: {
|
|
40
|
+
type: "text";
|
|
41
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
42
|
+
} | {
|
|
43
|
+
type: "container";
|
|
44
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
45
|
+
} | {
|
|
46
|
+
type: "arrow";
|
|
39
47
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
40
48
|
anchor: "start" | "end" | "label";
|
|
41
49
|
} | null;
|
|
@@ -254,12 +262,20 @@ export declare const actionCopyAsPng: {
|
|
|
254
262
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
255
263
|
bindingPreference: "enabled" | "disabled";
|
|
256
264
|
isMidpointSnappingEnabled: boolean;
|
|
265
|
+
showHints: boolean;
|
|
257
266
|
inputDevice: import("../types").InputDevice;
|
|
258
267
|
suggestedBinding: {
|
|
259
268
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
260
269
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
261
270
|
} | null;
|
|
262
|
-
|
|
271
|
+
textToolHover: {
|
|
272
|
+
type: "text";
|
|
273
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
274
|
+
} | {
|
|
275
|
+
type: "container";
|
|
276
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
277
|
+
} | {
|
|
278
|
+
type: "arrow";
|
|
263
279
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
264
280
|
anchor: "start" | "end" | "label";
|
|
265
281
|
} | null;
|
|
@@ -31,12 +31,20 @@ export declare const actionToggleCropEditor: {
|
|
|
31
31
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
32
32
|
bindingPreference: "enabled" | "disabled";
|
|
33
33
|
isMidpointSnappingEnabled: boolean;
|
|
34
|
+
showHints: boolean;
|
|
34
35
|
inputDevice: import("../types").InputDevice;
|
|
35
36
|
suggestedBinding: {
|
|
36
37
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
37
38
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
38
39
|
} | null;
|
|
39
|
-
|
|
40
|
+
textToolHover: {
|
|
41
|
+
type: "text";
|
|
42
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
43
|
+
} | {
|
|
44
|
+
type: "container";
|
|
45
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
46
|
+
} | {
|
|
47
|
+
type: "arrow";
|
|
40
48
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
41
49
|
anchor: "start" | "end" | "label";
|
|
42
50
|
} | null;
|