@excalidraw/common 0.18.0-1118751 → 0.18.0-1440f2d
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/dev/index.js +37 -18
- package/dist/dev/index.js.map +3 -3
- package/dist/prod/index.js +3 -3
- package/dist/types/common/src/constants.d.ts +4 -0
- package/dist/types/common/src/utils.d.ts +12 -1
- package/dist/types/element/src/align.d.ts +4 -1
- package/dist/types/element/src/binding.d.ts +70 -0
- package/dist/types/element/src/bounds.d.ts +10 -2
- package/dist/types/element/src/collision.d.ts +13 -0
- package/dist/types/element/src/cropElement.d.ts +36 -4
- package/dist/types/element/src/delta.d.ts +7 -1
- package/dist/types/element/src/distribute.d.ts +4 -1
- package/dist/types/element/src/dragElements.d.ts +8 -3
- package/dist/types/element/src/elbowArrow.d.ts +5 -0
- package/dist/types/element/src/embeddable.d.ts +2 -1
- package/dist/types/element/src/flowchart.d.ts +1 -7
- package/dist/types/element/src/frame.d.ts +19 -1
- package/dist/types/element/src/groups.d.ts +1 -6
- package/dist/types/element/src/image.d.ts +5 -2
- package/dist/types/element/src/index.d.ts +2 -0
- package/dist/types/element/src/linearElementEditor.d.ts +4 -1
- package/dist/types/element/src/listMarker.d.ts +39 -0
- package/dist/types/element/src/newElement.d.ts +17 -1
- package/dist/types/element/src/renderElement.d.ts +10 -0
- package/dist/types/element/src/renderEnvironment.d.ts +66 -0
- package/dist/types/element/src/resizeElements.d.ts +15 -5
- package/dist/types/element/src/selection.d.ts +1 -7
- package/dist/types/element/src/shape.d.ts +2 -0
- package/dist/types/element/src/stickyNote.d.ts +8 -0
- package/dist/types/element/src/textElement.d.ts +10 -2
- package/dist/types/element/src/textMeasurements.d.ts +15 -11
- package/dist/types/element/src/textWrapping.d.ts +3 -2
- package/dist/types/element/src/transform.d.ts +5 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +30 -3
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +56 -214
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +72 -12
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +20 -2
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +10 -1
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +4 -564
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +13 -1
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +10 -1
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +20 -2
- package/dist/types/excalidraw/actions/actionExport.d.ts +22 -4
- package/dist/types/excalidraw/actions/actionFrame.d.ts +71 -528
- package/dist/types/excalidraw/actions/actionGroup.d.ts +20 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +10 -1
- package/dist/types/excalidraw/actions/actionLink.d.ts +10 -1
- package/dist/types/excalidraw/actions/actionMenu.d.ts +10 -1
- package/dist/types/excalidraw/actions/actionProperties.d.ts +20 -2
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +10 -1
- package/dist/types/excalidraw/actions/actionStyles.d.ts +10 -1
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +10 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +10 -1
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +10 -1
- package/dist/types/excalidraw/actions/actionToggleMinimap.d.ts +201 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +10 -1
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +10 -1
- package/dist/types/excalidraw/actions/actionToggleShowHints.d.ts +198 -0
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +10 -1
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +10 -1
- package/dist/types/excalidraw/actions/actionToggleWrap.d.ts +12 -0
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +10 -1
- package/dist/types/excalidraw/actions/index.d.ts +3 -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 +4 -2
- package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -1
- package/dist/types/excalidraw/charts/charts.helpers.d.ts +6 -5
- package/dist/types/excalidraw/charts/charts.line.d.ts +2 -1
- package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -1
- package/dist/types/excalidraw/charts/index.d.ts +2 -1
- package/dist/types/excalidraw/components/Actions.d.ts +9 -2
- 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 +79 -264
- package/dist/types/excalidraw/components/App.duplicate.d.ts +52 -2
- package/dist/types/excalidraw/components/App.host.d.ts +102 -0
- 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 +64 -4
- package/dist/types/excalidraw/components/App.wheel.d.ts +6 -2
- package/dist/types/excalidraw/components/App.wrap.d.ts +31 -0
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -1
- 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/Minimap/Minimap.d.ts +15 -0
- package/dist/types/excalidraw/components/Minimap/MinimapAnnouncementDot.d.ts +10 -0
- package/dist/types/excalidraw/components/Minimap/minimap-controller.chunk.d.ts +90 -0
- package/dist/types/excalidraw/components/Minimap/minimap-shared.chunk.d.ts +122 -0
- package/dist/types/excalidraw/components/Minimap/minimap-worker.chunk.d.ts +12 -0
- package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -2
- package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +2 -1
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +5 -2
- package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +2 -1
- package/dist/types/excalidraw/components/TTDDialog/common.d.ts +4 -1
- package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +3 -2
- package/dist/types/excalidraw/components/TTDDialog/types.d.ts +14 -1
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +16 -0
- package/dist/types/excalidraw/components/Tooltip.d.ts +26 -2
- package/dist/types/excalidraw/components/TopPicksDnD/topPicksDnD.d.ts +1 -1
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +0 -1
- package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
- package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +13 -2
- package/dist/types/excalidraw/components/icons.d.ts +1 -0
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +2 -0
- package/dist/types/excalidraw/data/blob.d.ts +24 -6
- package/dist/types/excalidraw/data/index.d.ts +3 -3
- package/dist/types/excalidraw/data/json.d.ts +12 -3
- package/dist/types/excalidraw/fonts/Fonts.d.ts +9 -6
- package/dist/types/excalidraw/history.d.ts +10 -4
- package/dist/types/excalidraw/mermaid.d.ts +7 -0
- package/dist/types/excalidraw/reactUtils.d.ts +1 -1
- package/dist/types/excalidraw/renderer/animation.d.ts +11 -4
- package/dist/types/excalidraw/renderer/staticScene.d.ts +11 -6
- package/dist/types/excalidraw/scene/Renderer.d.ts +1 -1
- package/dist/types/excalidraw/scene/export.d.ts +343 -20
- package/dist/types/excalidraw/scene/types.d.ts +23 -1
- package/dist/types/excalidraw/types.d.ts +83 -14
- package/dist/types/excalidraw/viewport.d.ts +23 -1
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +12 -1
- package/dist/types/utils/src/index.d.ts +3 -1
- package/package.json +1 -1
- package/dist/types/utils/src/export.d.ts +0 -36
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { MarkOptional } from "@excalidraw/common/utility-types";
|
|
2
2
|
import { type ElementConstructorOpts } from "./newElement";
|
|
3
|
+
import type { RenderEnvironment } from "./renderEnvironment";
|
|
3
4
|
import type { ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawFrameElement, ExcalidrawFreeDrawElement, ExcalidrawGenericElement, ExcalidrawIframeLikeElement, ExcalidrawImageElement, ExcalidrawLinearElement, ExcalidrawMagicFrameElement, ExcalidrawSelectionElement, ExcalidrawTextElement, FileId, FontFamilyValues, NonDeletedExcalidrawElement, Ordered, TextAlign, VerticalAlign, ExcalidrawStickyNoteElement } from "./types";
|
|
4
5
|
/**
|
|
5
6
|
* Options for elements generated from a skeleton fragment (bound labels and
|
|
@@ -17,6 +18,8 @@ export type ValidLinearElement = {
|
|
|
17
18
|
fontFamily?: FontFamilyValues;
|
|
18
19
|
textAlign?: TextAlign;
|
|
19
20
|
verticalAlign?: VerticalAlign;
|
|
21
|
+
/** where along an arrow's path (0-1) the label is centered */
|
|
22
|
+
labelPosition?: ExcalidrawTextElement["labelPosition"];
|
|
20
23
|
} & FragmentConstructorOpts;
|
|
21
24
|
end?: (({
|
|
22
25
|
type: Exclude<ExcalidrawBindableElement["type"], "image" | "text" | "frame" | "magicframe" | "embeddable" | "iframe">;
|
|
@@ -95,6 +98,7 @@ export type ExcalidrawElementSkeleton = Extract<Exclude<ExcalidrawElement, Excal
|
|
|
95
98
|
name?: string;
|
|
96
99
|
} & Partial<ExcalidrawMagicFrameElement>);
|
|
97
100
|
export declare const convertToExcalidrawElements: (elementsSkeleton: ExcalidrawElementSkeleton[] | null, opts?: {
|
|
98
|
-
regenerateIds
|
|
101
|
+
regenerateIds?: boolean;
|
|
102
|
+
renderEnvironment?: RenderEnvironment;
|
|
99
103
|
}) => Ordered<NonDeletedExcalidrawElement>[];
|
|
100
104
|
export {};
|
|
@@ -29,12 +29,20 @@ export declare const actionAddToLibrary: {
|
|
|
29
29
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
30
30
|
bindingPreference: "enabled" | "disabled";
|
|
31
31
|
isMidpointSnappingEnabled: boolean;
|
|
32
|
+
showHints: boolean;
|
|
32
33
|
inputDevice: import("../types").InputDevice;
|
|
33
34
|
suggestedBinding: {
|
|
34
35
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
35
36
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
36
37
|
} | null;
|
|
37
|
-
|
|
38
|
+
textToolHover: {
|
|
39
|
+
type: "text";
|
|
40
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
41
|
+
} | {
|
|
42
|
+
type: "container";
|
|
43
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
44
|
+
} | {
|
|
45
|
+
type: "arrow";
|
|
38
46
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
39
47
|
anchor: "start" | "end" | "label";
|
|
40
48
|
} | null;
|
|
@@ -128,6 +136,7 @@ export declare const actionAddToLibrary: {
|
|
|
128
136
|
selectedElementsAreBeingDragged: boolean;
|
|
129
137
|
shouldCacheIgnoreZoom: boolean;
|
|
130
138
|
zenModeEnabled: boolean;
|
|
139
|
+
minimapEnabled: boolean;
|
|
131
140
|
theme: import("@excalidraw/element/types").Theme;
|
|
132
141
|
gridSize: number;
|
|
133
142
|
gridStep: number;
|
|
@@ -198,12 +207,20 @@ export declare const actionAddToLibrary: {
|
|
|
198
207
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
199
208
|
bindingPreference: "enabled" | "disabled";
|
|
200
209
|
isMidpointSnappingEnabled: boolean;
|
|
210
|
+
showHints: boolean;
|
|
201
211
|
inputDevice: import("../types").InputDevice;
|
|
202
212
|
suggestedBinding: {
|
|
203
213
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
204
214
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
205
215
|
} | null;
|
|
206
|
-
|
|
216
|
+
textToolHover: {
|
|
217
|
+
type: "text";
|
|
218
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
219
|
+
} | {
|
|
220
|
+
type: "container";
|
|
221
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
222
|
+
} | {
|
|
223
|
+
type: "arrow";
|
|
207
224
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
208
225
|
anchor: "start" | "end" | "label";
|
|
209
226
|
} | null;
|
|
@@ -302,6 +319,7 @@ export declare const actionAddToLibrary: {
|
|
|
302
319
|
duration?: number;
|
|
303
320
|
} | null;
|
|
304
321
|
zenModeEnabled: boolean;
|
|
322
|
+
minimapEnabled: boolean;
|
|
305
323
|
theme: import("@excalidraw/element/types").Theme;
|
|
306
324
|
gridSize: number;
|
|
307
325
|
gridStep: number;
|
|
@@ -372,12 +390,20 @@ export declare const actionAddToLibrary: {
|
|
|
372
390
|
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
373
391
|
bindingPreference: "enabled" | "disabled";
|
|
374
392
|
isMidpointSnappingEnabled: boolean;
|
|
393
|
+
showHints: boolean;
|
|
375
394
|
inputDevice: import("../types").InputDevice;
|
|
376
395
|
suggestedBinding: {
|
|
377
396
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
378
397
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
379
398
|
} | null;
|
|
380
|
-
|
|
399
|
+
textToolHover: {
|
|
400
|
+
type: "text";
|
|
401
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
402
|
+
} | {
|
|
403
|
+
type: "container";
|
|
404
|
+
elementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
405
|
+
} | {
|
|
406
|
+
type: "arrow";
|
|
381
407
|
elementId: import("@excalidraw/element/types").ExcalidrawArrowElement["id"];
|
|
382
408
|
anchor: "start" | "end" | "label";
|
|
383
409
|
} | null;
|
|
@@ -476,6 +502,7 @@ export declare const actionAddToLibrary: {
|
|
|
476
502
|
duration?: number;
|
|
477
503
|
} | null;
|
|
478
504
|
zenModeEnabled: boolean;
|
|
505
|
+
minimapEnabled: boolean;
|
|
479
506
|
theme: import("@excalidraw/element/types").Theme;
|
|
480
507
|
gridSize: number;
|
|
481
508
|
gridStep: number;
|
|
@@ -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
|
+
selectedGroupIds: AppState["selectedGroupIds"];
|
|
22
|
+
editingGroupId: AppState["editingGroupId"];
|
|
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;
|
|
@@ -150,15 +150,12 @@ export declare const actionBindText: {
|
|
|
150
150
|
duration?: number;
|
|
151
151
|
} | null;
|
|
152
152
|
zenModeEnabled: boolean;
|
|
153
|
+
minimapEnabled: boolean;
|
|
153
154
|
theme: import("@excalidraw/element/types").Theme;
|
|
154
155
|
gridSize: number;
|
|
155
156
|
gridStep: number;
|
|
156
157
|
gridModeEnabled: boolean;
|
|
157
158
|
viewModeEnabled: boolean;
|
|
158
|
-
selectedGroupIds: {
|
|
159
|
-
[groupId: string]: boolean;
|
|
160
|
-
};
|
|
161
|
-
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
162
159
|
width: number;
|
|
163
160
|
height: number;
|
|
164
161
|
offsetTop: number;
|
|
@@ -170,7 +167,6 @@ export declare const actionBindText: {
|
|
|
170
167
|
panels: number;
|
|
171
168
|
};
|
|
172
169
|
showHyperlinkPopup: false | "info" | "editor";
|
|
173
|
-
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
174
170
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
175
171
|
originSnapOffset: {
|
|
176
172
|
x: number;
|
|
@@ -202,189 +198,35 @@ export declare const actionBindText: {
|
|
|
202
198
|
} & {
|
|
203
199
|
keyTest?: undefined;
|
|
204
200
|
};
|
|
201
|
+
export declare const actionBindText: {
|
|
202
|
+
name: "bindText";
|
|
203
|
+
label: string;
|
|
204
|
+
trackEvent: {
|
|
205
|
+
category: "element";
|
|
206
|
+
};
|
|
207
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
208
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => ActionResult;
|
|
209
|
+
} & {
|
|
210
|
+
keyTest?: undefined;
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* A note and its label share one ink: the text the user styled wins, unless it
|
|
214
|
+
* is transparent (a note's label never is).
|
|
215
|
+
*/
|
|
216
|
+
export declare const getStickyNoteInk: (textElement: ExcalidrawTextElement, container: ExcalidrawElement) => string | null;
|
|
217
|
+
/** binds the text to the (label-less) container, selecting the container */
|
|
218
|
+
export declare const bindTextToContainer: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, textElement: ExcalidrawTextElement, container: NonDeleted<ExcalidrawTextContainer>, app: AppClassProperties) => ActionResult;
|
|
219
|
+
export declare const pushContainerBelowText: (elements: readonly ExcalidrawElement[], container: ExcalidrawElement, textElement: ExcalidrawTextElement) => ExcalidrawElement[];
|
|
205
220
|
export declare const actionWrapTextInContainer: {
|
|
206
221
|
name: "wrapTextInContainer";
|
|
207
222
|
label: string;
|
|
208
223
|
trackEvent: {
|
|
209
224
|
category: "element";
|
|
210
225
|
};
|
|
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
|
-
};
|
|
226
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
227
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: unknown, app: AppClassProperties) => ActionResult;
|
|
388
228
|
} & {
|
|
389
229
|
keyTest?: undefined;
|
|
390
230
|
};
|
|
231
|
+
/** wraps each (unbound) text in a new container, selecting the containers */
|
|
232
|
+
export declare const wrapTextsInContainers: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, textElements: readonly ExcalidrawTextElement[], app: AppClassProperties) => ActionResult;
|