@zsviczian/excalidraw 0.18.0-53 → 0.18.0-55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/excalidraw.development.js +56 -56
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +2 -2
- package/types/common/src/commonObsidianUtils.d.ts +6 -0
- package/types/common/src/constants.d.ts +1 -0
- package/types/common/src/editorInterface.d.ts +1 -1
- package/types/common/src/index.d.ts +1 -0
- package/types/common/src/utils.d.ts +7 -2
- package/types/common/src/visualdebug.d.ts +1 -1
- package/types/element/src/binding.d.ts +55 -44
- package/types/element/src/collision.d.ts +6 -2
- package/types/element/src/index.d.ts +0 -3
- package/types/element/src/linearElementEditor.d.ts +15 -18
- package/types/element/src/renderElement.d.ts +1 -1
- package/types/element/src/typeChecks.d.ts +2 -3
- package/types/element/src/types.d.ts +7 -11
- package/types/element/src/utils.d.ts +2 -1
- package/types/element/src/zindex.d.ts +7 -1
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +16 -7
- package/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/types/excalidraw/actions/actionBoundText.d.ts +13 -7
- package/types/excalidraw/actions/actionCanvas.d.ts +91 -286
- package/types/excalidraw/actions/actionClipboard.d.ts +34 -941
- package/types/excalidraw/actions/actionCropEditor.d.ts +6 -3
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +23 -16
- package/types/excalidraw/actions/actionDistribute.d.ts +2 -2
- package/types/excalidraw/actions/actionDuplicateSelection.d.ts +1 -1
- package/types/excalidraw/actions/actionElementLink.d.ts +4 -3
- package/types/excalidraw/actions/actionElementLock.d.ts +11 -5
- package/types/excalidraw/actions/actionEmbeddable.d.ts +6 -3
- package/types/excalidraw/actions/actionExport.d.ts +43 -1149
- package/types/excalidraw/actions/actionFinalize.d.ts +10 -688
- package/types/excalidraw/actions/actionFlip.d.ts +2 -2
- package/types/excalidraw/actions/actionFrame.d.ts +26 -16
- package/types/excalidraw/actions/actionGroup.d.ts +12 -6
- package/types/excalidraw/actions/actionLinearEditor.d.ts +15 -16
- package/types/excalidraw/actions/actionLink.d.ts +5 -2
- package/types/excalidraw/actions/actionMenu.d.ts +3 -2
- package/types/excalidraw/actions/actionNavigate.d.ts +21 -445
- package/types/excalidraw/actions/actionProperties.d.ts +79 -2968
- package/types/excalidraw/actions/actionSelectAll.d.ts +6 -3
- package/types/excalidraw/actions/actionStyles.d.ts +7 -4
- package/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +5 -2
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +5 -2
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +3 -2
- package/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
- package/types/excalidraw/actions/actionToggleStats.d.ts +5 -2
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +6 -3
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +5 -2
- package/types/excalidraw/actions/actionTrayMenu.d.ts +5 -2
- package/types/excalidraw/actions/actionZindex.d.ts +2 -2
- package/types/excalidraw/actions/manager.d.ts +1 -1
- package/types/excalidraw/actions/register.d.ts +1 -1
- package/types/excalidraw/actions/types.d.ts +3 -3
- package/types/excalidraw/appState.d.ts +4 -3
- package/types/excalidraw/components/App.d.ts +7 -3
- package/types/excalidraw/components/CommandPalette/types.d.ts +1 -2
- package/types/excalidraw/components/Stats/utils.d.ts +1 -1
- package/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +1 -1
- package/types/excalidraw/data/restore.d.ts +3 -3
- package/types/excalidraw/index.d.ts +3 -3
- package/types/excalidraw/obsidianUtils.d.ts +0 -5
- package/types/excalidraw/renderer/helpers.d.ts +1 -5
- package/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
- package/types/excalidraw/scene/types.d.ts +4 -0
- package/types/excalidraw/types.d.ts +15 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zsviczian/excalidraw",
|
|
3
|
-
"version": "0.18.0-
|
|
3
|
+
"version": "0.18.0-55",
|
|
4
4
|
"main": "main.js",
|
|
5
5
|
"module": "./dist/prod/index.js",
|
|
6
6
|
"source": "./index.tsx",
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
"image-blob-reduce": "3.0.1",
|
|
96
96
|
"jotai": "2.11.0",
|
|
97
97
|
"jotai-scope": "0.7.2",
|
|
98
|
-
"lodash.throttle": "4.1.1",
|
|
99
98
|
"lodash.debounce": "4.0.8",
|
|
99
|
+
"lodash.throttle": "4.1.1",
|
|
100
100
|
"nanoid": "3.3.3",
|
|
101
101
|
"open-color": "1.9.1",
|
|
102
102
|
"pako": "2.0.3",
|
|
@@ -9,5 +9,11 @@ export type ObsidianDeviceType = {
|
|
|
9
9
|
isIOS: boolean;
|
|
10
10
|
isAndroid: boolean;
|
|
11
11
|
};
|
|
12
|
+
export declare let hostPlugin: any;
|
|
13
|
+
export declare function destroyObsidianUtils(): void;
|
|
14
|
+
export declare function initializeObsidianUtils(): void;
|
|
15
|
+
export declare function getHostPlugin(): any;
|
|
12
16
|
export declare const getObsidianDeviceInfo: () => ObsidianDeviceType | null;
|
|
13
17
|
export declare const getDesktopUIMode: () => any;
|
|
18
|
+
export declare function getAreaLimit(): any;
|
|
19
|
+
export declare function getWidthHeightLimit(): any;
|
|
@@ -354,6 +354,7 @@ export declare enum UserIdleState {
|
|
|
354
354
|
*/
|
|
355
355
|
export declare const LINE_POLYGON_POINT_MERGE_DISTANCE = 20;
|
|
356
356
|
export declare const DOUBLE_TAP_POSITION_THRESHOLD = 35;
|
|
357
|
+
export declare const BIND_MODE_TIMEOUT = 700;
|
|
357
358
|
export declare const MOBILE_ACTION_BUTTON_BG: {
|
|
358
359
|
readonly background: "var(--mobile-action-button-bg)";
|
|
359
360
|
};
|
|
@@ -32,4 +32,4 @@ export declare const getFormFactor: (editorWidth: number, editorHeight: number,
|
|
|
32
32
|
export declare const deriveStylesPanelMode: (editorInterface: EditorInterface) => StylesPanelMode;
|
|
33
33
|
export declare const createUserAgentDescriptor: (userAgentString: string) => EditorInterface["userAgent"];
|
|
34
34
|
export declare const loadDesktopUIModePreference: () => any;
|
|
35
|
-
export declare const setDesktopUIMode: (mode: EditorInterface["desktopUIMode"]) => "
|
|
35
|
+
export declare const setDesktopUIMode: (mode: EditorInterface["desktopUIMode"]) => "tray" | "full" | "compact" | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FontFamilyValues, FontString } from "@excalidraw/element/types";
|
|
2
2
|
import type { ActiveTool, AppState, ToolType, UnsubscribeCallback, Zoom } from "@excalidraw/excalidraw/types";
|
|
3
3
|
import type { MaybePromise } from "./utility-types";
|
|
4
4
|
import type { EVENT } from "./constants";
|
|
@@ -82,6 +82,7 @@ export declare const chunk: <T extends unknown>(array: readonly T[], size: numbe
|
|
|
82
82
|
export declare const selectNode: (node: Element) => void;
|
|
83
83
|
export declare const removeSelection: () => void;
|
|
84
84
|
export declare const distance: (x: number, y: number) => number;
|
|
85
|
+
export declare const isSelectionLikeTool: (type: ToolType | "custom") => boolean;
|
|
85
86
|
export declare const updateActiveTool: (appState: Pick<AppState, "activeTool">, data: (({
|
|
86
87
|
type: ToolType;
|
|
87
88
|
} | {
|
|
@@ -141,7 +142,6 @@ export declare const findLastIndex: <T>(array: readonly T[], cb: (element: T, in
|
|
|
141
142
|
/** returns the first non-null mapped value */
|
|
142
143
|
export declare const mapFind: <T, K>(collection: readonly T[], iteratee: (value: T, index: number) => K | null | undefined) => K | undefined;
|
|
143
144
|
export declare const isTransparent: (color: string) => boolean;
|
|
144
|
-
export declare const isBindingFallthroughEnabled: (el: ExcalidrawBindableElement) => boolean;
|
|
145
145
|
export type ResolvablePromise<T> = Promise<T> & {
|
|
146
146
|
resolve: [T] extends [undefined] ? (value?: MaybePromise<Awaited<T>>) => void : (value: MaybePromise<Awaited<T>>) => void;
|
|
147
147
|
reject: (error: Error) => void;
|
|
@@ -265,4 +265,9 @@ export declare const castArray: <T>(value: T | T[]) => T[];
|
|
|
265
265
|
export declare const isReadonlyArray: (value?: any) => value is readonly any[];
|
|
266
266
|
export declare const sizeOf: (value: readonly unknown[] | Readonly<Map<string, unknown>> | Readonly<Record<string, unknown>> | ReadonlySet<unknown>) => number;
|
|
267
267
|
export declare const reduceToCommonValue: <T, R = T>(collection: ReadonlySet<T> | readonly T[], getValue?: ((item: T) => R) | undefined) => R | null;
|
|
268
|
+
type FEATURE_FLAGS = {
|
|
269
|
+
COMPLEX_BINDINGS: boolean;
|
|
270
|
+
};
|
|
271
|
+
export declare const getFeatureFlag: <F extends "COMPLEX_BINDINGS">(flag: F) => FEATURE_FLAGS[F];
|
|
272
|
+
export declare const setFeatureFlag: <F extends "COMPLEX_BINDINGS">(flag: F, value: FEATURE_FLAGS[F]) => void;
|
|
268
273
|
export {};
|
|
@@ -35,7 +35,7 @@ export declare const debugDrawBounds: (box: Bounds | Bounds[], opts?: {
|
|
|
35
35
|
export declare const debugDrawPoints: ({ x, y, points, }: {
|
|
36
36
|
x: number;
|
|
37
37
|
y: number;
|
|
38
|
-
points: LocalPoint[];
|
|
38
|
+
points: readonly LocalPoint[];
|
|
39
39
|
}, options?: any) => void;
|
|
40
40
|
export declare const debugCloseFrame: () => void;
|
|
41
41
|
export declare const debugClear: () => void;
|
|
@@ -1,69 +1,80 @@
|
|
|
1
1
|
import { type GlobalPoint } from "@excalidraw/math";
|
|
2
|
-
import type { LocalPoint } from "@excalidraw/math";
|
|
2
|
+
import type { LineSegment, LocalPoint } from "@excalidraw/math";
|
|
3
3
|
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
4
4
|
import { type Heading } from "./heading";
|
|
5
5
|
import type { Scene } from "./Scene";
|
|
6
6
|
import type { Bounds } from "./bounds";
|
|
7
7
|
import type { ElementUpdate } from "./mutateElement";
|
|
8
|
-
import type { ExcalidrawBindableElement, ExcalidrawElement,
|
|
9
|
-
export type
|
|
10
|
-
|
|
11
|
-
NonDeleted<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
import type { BindMode, ElementsMap, ExcalidrawArrowElement, ExcalidrawBindableElement, ExcalidrawElbowArrowElement, ExcalidrawElement, FixedPoint, FixedPointBinding, NonDeleted, NonDeletedExcalidrawElement, NonDeletedSceneElementsMap, Ordered, PointsPositionUpdates } from "./types";
|
|
9
|
+
export type BindingStrategy = {
|
|
10
|
+
mode: BindMode;
|
|
11
|
+
element: NonDeleted<ExcalidrawBindableElement>;
|
|
12
|
+
focusPoint: GlobalPoint;
|
|
13
|
+
} | {
|
|
14
|
+
mode: null;
|
|
15
|
+
element?: undefined;
|
|
16
|
+
focusPoint?: undefined;
|
|
17
|
+
} | {
|
|
18
|
+
mode: undefined;
|
|
19
|
+
element?: undefined;
|
|
20
|
+
focusPoint?: undefined;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* gaps exclude element strokeWidth
|
|
24
|
+
*
|
|
25
|
+
* IMPORTANT: currently must be > 0 (this also applies to the computed gap)
|
|
26
|
+
*/
|
|
27
|
+
export declare const BASE_BINDING_GAP = 10;
|
|
28
|
+
export declare const BASE_BINDING_GAP_ELBOW = 5;
|
|
29
|
+
export declare const getBindingGap: (bindTarget: ExcalidrawBindableElement, opts: Pick<ExcalidrawArrowElement, "elbowed">) => number;
|
|
30
|
+
export declare const maxBindingDistance_simple: (zoom?: AppState["zoom"]) => number;
|
|
15
31
|
export declare const shouldEnableBindingForPointerEvent: (event: React.PointerEvent<HTMLElement>) => boolean;
|
|
16
32
|
export declare const isBindingEnabled: (appState: AppState) => boolean;
|
|
17
|
-
export declare const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
33
|
+
export declare const bindOrUnbindBindingElement: (arrow: NonDeleted<ExcalidrawArrowElement>, draggingPoints: PointsPositionUpdates, scene: Scene, appState: AppState, opts?: {
|
|
34
|
+
newArrow?: boolean;
|
|
35
|
+
altKey?: boolean;
|
|
36
|
+
initialBinding?: boolean;
|
|
37
|
+
}) => {
|
|
38
|
+
start: BindingStrategy;
|
|
39
|
+
end: BindingStrategy;
|
|
40
|
+
};
|
|
41
|
+
export declare const getBindingStrategyForDraggingBindingElementEndpoints: (arrow: NonDeleted<ExcalidrawArrowElement>, draggingPoints: PointsPositionUpdates, elementsMap: NonDeletedSceneElementsMap, elements: readonly Ordered<NonDeletedExcalidrawElement>[], appState: AppState, opts?: {
|
|
42
|
+
newArrow?: boolean;
|
|
43
|
+
shiftKey?: boolean;
|
|
44
|
+
altKey?: boolean;
|
|
45
|
+
finalize?: boolean;
|
|
46
|
+
initialBinding?: boolean;
|
|
47
|
+
zoom?: AppState["zoom"];
|
|
48
|
+
}) => {
|
|
49
|
+
start: BindingStrategy;
|
|
50
|
+
end: BindingStrategy;
|
|
51
|
+
};
|
|
52
|
+
export declare const bindOrUnbindBindingElements: (selectedArrows: NonDeleted<ExcalidrawArrowElement>[], scene: Scene, appState: AppState) => void;
|
|
53
|
+
export declare const bindBindingElement: (arrow: NonDeleted<ExcalidrawArrowElement>, hoveredElement: ExcalidrawBindableElement, mode: BindMode, startOrEnd: "start" | "end", scene: Scene, focusPoint?: GlobalPoint) => void;
|
|
54
|
+
export declare const unbindBindingElement: (arrow: NonDeleted<ExcalidrawArrowElement>, startOrEnd: "start" | "end", scene: Scene) => ExcalidrawBindableElement["id"] | null;
|
|
36
55
|
export declare const updateBoundElements: (changedElement: NonDeletedExcalidrawElement, scene: Scene, options?: {
|
|
37
56
|
simultaneouslyUpdated?: readonly ExcalidrawElement[];
|
|
38
|
-
newSize?: {
|
|
39
|
-
width: number;
|
|
40
|
-
height: number;
|
|
41
|
-
};
|
|
42
57
|
changedElements?: Map<string, ExcalidrawElement>;
|
|
43
58
|
}) => void;
|
|
44
|
-
export declare const updateBindings: (latestElement: ExcalidrawElement, scene: Scene, options?: {
|
|
59
|
+
export declare const updateBindings: (latestElement: ExcalidrawElement, scene: Scene, appState: AppState, options?: {
|
|
45
60
|
simultaneouslyUpdated?: readonly ExcalidrawElement[];
|
|
46
61
|
newSize?: {
|
|
47
62
|
width: number;
|
|
48
63
|
height: number;
|
|
49
64
|
};
|
|
50
|
-
zoom?: AppState["zoom"];
|
|
51
65
|
}) => void;
|
|
52
66
|
export declare const getHeadingForElbowArrowSnap: (p: Readonly<GlobalPoint>, otherPoint: Readonly<GlobalPoint>, bindableElement: ExcalidrawBindableElement | undefined | null, aabb: Bounds | undefined | null, origPoint: GlobalPoint, elementsMap: ElementsMap, zoom?: AppState["zoom"]) => Heading;
|
|
53
|
-
export declare const bindPointToSnapToElementOutline: (
|
|
54
|
-
export declare const avoidRectangularCorner: (
|
|
55
|
-
export declare const
|
|
67
|
+
export declare const bindPointToSnapToElementOutline: (arrowElement: ExcalidrawArrowElement, bindableElement: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap, customIntersector?: LineSegment<GlobalPoint>) => GlobalPoint;
|
|
68
|
+
export declare const avoidRectangularCorner: (arrowElement: ExcalidrawArrowElement, bindTarget: ExcalidrawBindableElement, elementsMap: ElementsMap, p: GlobalPoint) => GlobalPoint;
|
|
69
|
+
export declare const updateBoundPoint: (arrow: NonDeleted<ExcalidrawArrowElement>, startOrEnd: "startBinding" | "endBinding", binding: FixedPointBinding | null | undefined, bindableElement: ExcalidrawBindableElement, elementsMap: ElementsMap, customIntersector?: LineSegment<GlobalPoint>) => LocalPoint | null;
|
|
56
70
|
export declare const calculateFixedPointForElbowArrowBinding: (linearElement: NonDeleted<ExcalidrawElbowArrowElement>, hoveredElement: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap) => {
|
|
57
71
|
fixedPoint: FixedPoint;
|
|
58
72
|
};
|
|
73
|
+
export declare const calculateFixedPointForNonElbowArrowBinding: (linearElement: NonDeleted<ExcalidrawArrowElement>, hoveredElement: ExcalidrawBindableElement, startOrEnd: "start" | "end", elementsMap: ElementsMap, focusPoint?: GlobalPoint) => {
|
|
74
|
+
fixedPoint: FixedPoint;
|
|
75
|
+
};
|
|
59
76
|
export declare const fixDuplicatedBindingsAfterDuplication: (duplicatedElements: ExcalidrawElement[], origIdToDuplicateId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>, duplicateElementsMap: NonDeletedSceneElementsMap) => void;
|
|
60
77
|
export declare const fixBindingsAfterDeletion: (sceneElements: readonly ExcalidrawElement[], deletedElements: readonly ExcalidrawElement[]) => void;
|
|
61
|
-
export declare const bindingBorderTest: (element: NonDeleted<ExcalidrawBindableElement>, { x, y }: {
|
|
62
|
-
x: number;
|
|
63
|
-
y: number;
|
|
64
|
-
}, elementsMap: NonDeletedSceneElementsMap, zoom?: AppState["zoom"], fullShape?: boolean) => boolean;
|
|
65
|
-
export declare const maxBindingGap: (element: ExcalidrawElement, elementWidth: number, elementHeight: number, zoom?: AppState["zoom"]) => number;
|
|
66
|
-
export declare const determineFocusDistance: (element: ExcalidrawBindableElement, elementsMap: ElementsMap, a: GlobalPoint, b: GlobalPoint) => number;
|
|
67
78
|
export declare const bindingProperties: Set<BindableProp | BindingProp>;
|
|
68
79
|
export type BindableProp = "boundElements";
|
|
69
80
|
export type BindingProp = "frameId" | "containerId" | "startBinding" | "endBinding";
|
|
@@ -105,7 +116,7 @@ export declare class BindableElement {
|
|
|
105
116
|
*/
|
|
106
117
|
static rebindAffected: (elements: ElementsMap, bindableElement: ExcalidrawElement | undefined, updateElementWith: (affected: ExcalidrawElement, updates: ElementUpdate<ExcalidrawElement>) => void) => void;
|
|
107
118
|
}
|
|
108
|
-
export declare const getGlobalFixedPointForBindableElement: (fixedPointRatio:
|
|
109
|
-
export declare const getGlobalFixedPoints: (arrow:
|
|
119
|
+
export declare const getGlobalFixedPointForBindableElement: (fixedPointRatio: FixedPoint, element: ExcalidrawBindableElement, elementsMap: ElementsMap) => GlobalPoint;
|
|
120
|
+
export declare const getGlobalFixedPoints: (arrow: ExcalidrawArrowElement, elementsMap: ElementsMap) => [GlobalPoint, GlobalPoint];
|
|
110
121
|
export declare const getArrowLocalFixedPoints: (arrow: ExcalidrawElbowArrowElement, elementsMap: ElementsMap) => LocalPoint[];
|
|
111
122
|
export declare const normalizeFixedPoint: <T extends FixedPoint | null>(fixedPoint: T) => T extends null ? null : FixedPoint;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GlobalPoint, LineSegment } from "@excalidraw/math";
|
|
2
2
|
import type { FrameNameBounds } from "@excalidraw/excalidraw/types";
|
|
3
|
-
import type { ElementsMap, ExcalidrawElement } from "./types";
|
|
3
|
+
import type { ElementsMap, ExcalidrawBindableElement, ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, NonDeletedSceneElementsMap, Ordered } from "./types";
|
|
4
4
|
export declare const shouldTestInside: (element: ExcalidrawElement) => boolean;
|
|
5
5
|
export type HitTestArgs = {
|
|
6
6
|
point: GlobalPoint;
|
|
@@ -8,11 +8,14 @@ export type HitTestArgs = {
|
|
|
8
8
|
threshold: number;
|
|
9
9
|
elementsMap: ElementsMap;
|
|
10
10
|
frameNameBound?: FrameNameBounds | null;
|
|
11
|
+
overrideShouldTestInside?: boolean;
|
|
11
12
|
};
|
|
12
|
-
export declare const hitElementItself: ({ point, element, threshold, elementsMap, frameNameBound, }: HitTestArgs) => boolean;
|
|
13
|
+
export declare const hitElementItself: ({ point, element, threshold, elementsMap, frameNameBound, overrideShouldTestInside, }: HitTestArgs) => boolean;
|
|
13
14
|
export declare const hitElementBoundingBox: (point: GlobalPoint, element: ExcalidrawElement, elementsMap: ElementsMap, tolerance?: number) => boolean;
|
|
14
15
|
export declare const hitElementBoundingBoxOnly: (hitArgs: HitTestArgs, elementsMap: ElementsMap) => boolean;
|
|
15
16
|
export declare const hitElementBoundText: (point: GlobalPoint, element: ExcalidrawElement, elementsMap: ElementsMap) => boolean;
|
|
17
|
+
export declare const getAllHoveredElementAtPoint: (point: Readonly<GlobalPoint>, elements: readonly Ordered<NonDeletedExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap, toleranceFn?: ((element: ExcalidrawBindableElement) => number) | undefined) => NonDeleted<ExcalidrawBindableElement>[];
|
|
18
|
+
export declare const getHoveredElementForBinding: (point: Readonly<GlobalPoint>, elements: readonly Ordered<NonDeletedExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap, toleranceFn?: ((element: ExcalidrawBindableElement) => number) | undefined) => NonDeleted<ExcalidrawBindableElement> | null;
|
|
16
19
|
/**
|
|
17
20
|
* Intersect a line with an element for binding test
|
|
18
21
|
*
|
|
@@ -30,3 +33,4 @@ export declare const intersectElementWithLineSegment: (element: ExcalidrawElemen
|
|
|
30
33
|
* @returns
|
|
31
34
|
*/
|
|
32
35
|
export declare const isPointInElement: (point: GlobalPoint, element: ExcalidrawElement, elementsMap: ElementsMap) => boolean;
|
|
36
|
+
export declare const isBindableElementInsideOtherBindable: (innerElement: ExcalidrawBindableElement, outerElement: ExcalidrawBindableElement, elementsMap: ElementsMap) => boolean;
|
|
@@ -11,9 +11,6 @@ export declare const hashString: (s: string) => number;
|
|
|
11
11
|
export declare const getVisibleElements: (elements: readonly ExcalidrawElement[]) => readonly NonDeletedExcalidrawElement[];
|
|
12
12
|
export declare const getNonDeletedElements: <T extends ExcalidrawElement>(elements: readonly T[]) => readonly NonDeleted<T>[];
|
|
13
13
|
export declare const isNonDeletedElement: <T extends ExcalidrawElement>(element: T) => element is NonDeleted<T>;
|
|
14
|
-
export declare const clearElementsForDatabase: (elements: readonly ExcalidrawElement[]) => ExcalidrawElement[];
|
|
15
|
-
export declare const clearElementsForExport: (elements: readonly ExcalidrawElement[]) => ExcalidrawElement[];
|
|
16
|
-
export declare const clearElementsForLocalStorage: (elements: readonly ExcalidrawElement[]) => ExcalidrawElement[];
|
|
17
14
|
export * from "./align";
|
|
18
15
|
export * from "./binding";
|
|
19
16
|
export * from "./bounds";
|
|
@@ -3,42 +3,40 @@ import { type Store } from "@excalidraw/element";
|
|
|
3
3
|
import type { AppState, PointerCoords, InteractiveCanvasAppState, AppClassProperties, NullableGridSize, Zoom } from "@excalidraw/excalidraw/types";
|
|
4
4
|
import type { Scene } from "./Scene";
|
|
5
5
|
import type { Bounds } from "./bounds";
|
|
6
|
-
import type { NonDeleted, ExcalidrawLinearElement, ExcalidrawElement,
|
|
6
|
+
import type { NonDeleted, ExcalidrawLinearElement, ExcalidrawElement, ExcalidrawTextElementWithContainer, ElementsMap, NonDeletedSceneElementsMap, FixedPointBinding, ExcalidrawElbowArrowElement, PointsPositionUpdates } from "./types";
|
|
7
7
|
export declare class LinearElementEditor {
|
|
8
8
|
readonly elementId: ExcalidrawElement["id"] & {
|
|
9
9
|
_brand: "excalidrawLinearElementId";
|
|
10
10
|
};
|
|
11
11
|
/** indices */
|
|
12
12
|
readonly selectedPointsIndices: readonly number[] | null;
|
|
13
|
-
readonly
|
|
13
|
+
readonly initialState: Readonly<{
|
|
14
14
|
prevSelectedPointsIndices: readonly number[] | null;
|
|
15
15
|
/** index */
|
|
16
16
|
lastClickedPoint: number;
|
|
17
|
-
|
|
18
|
-
origin: Readonly<{
|
|
19
|
-
x: number;
|
|
20
|
-
y: number;
|
|
21
|
-
}> | null;
|
|
17
|
+
origin: Readonly<GlobalPoint> | null;
|
|
22
18
|
segmentMidpoint: {
|
|
23
19
|
value: GlobalPoint | null;
|
|
24
20
|
index: number | null;
|
|
25
21
|
added: boolean;
|
|
26
22
|
};
|
|
23
|
+
arrowStartIsInside: boolean;
|
|
24
|
+
altFocusPoint: Readonly<GlobalPoint> | null;
|
|
27
25
|
}>;
|
|
28
26
|
/** whether you're dragging a point */
|
|
29
27
|
readonly isDragging: boolean;
|
|
30
28
|
readonly lastUncommittedPoint: LocalPoint | null;
|
|
29
|
+
readonly lastCommittedPoint: LocalPoint | null;
|
|
31
30
|
readonly pointerOffset: Readonly<{
|
|
32
31
|
x: number;
|
|
33
32
|
y: number;
|
|
34
33
|
}>;
|
|
35
|
-
readonly startBindingElement: ExcalidrawBindableElement | null | "keep";
|
|
36
|
-
readonly endBindingElement: ExcalidrawBindableElement | null | "keep";
|
|
37
34
|
readonly hoverPointIndex: number;
|
|
38
35
|
readonly segmentMidPointHoveredCoords: GlobalPoint | null;
|
|
39
36
|
readonly elbowed: boolean;
|
|
40
37
|
readonly customLineAngle: number | null;
|
|
41
38
|
readonly isEditing: boolean;
|
|
39
|
+
readonly pointerDownState: never;
|
|
42
40
|
constructor(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, isEditing?: boolean);
|
|
43
41
|
static POINT_HANDLE_SIZE: number;
|
|
44
42
|
/**
|
|
@@ -47,10 +45,8 @@ export declare class LinearElementEditor {
|
|
|
47
45
|
*/
|
|
48
46
|
static getElement<T extends ExcalidrawLinearElement>(id: InstanceType<typeof LinearElementEditor>["elementId"], elementsMap: ElementsMap): T | null;
|
|
49
47
|
static handleBoxSelection(event: PointerEvent, appState: AppState, setState: React.Component<any, AppState>["setState"], elementsMap: NonDeletedSceneElementsMap): false | undefined;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
*/
|
|
53
|
-
static handlePointDragging(event: PointerEvent, app: AppClassProperties, scenePointerX: number, scenePointerY: number, linearElementEditor: LinearElementEditor): Pick<AppState, keyof AppState> | null;
|
|
48
|
+
static handlePointerMove(event: PointerEvent, app: AppClassProperties, scenePointerX: number, scenePointerY: number, linearElementEditor: LinearElementEditor): Pick<AppState, "suggestedBinding" | "selectedLinearElement"> | null;
|
|
49
|
+
static handlePointDragging(event: PointerEvent, app: AppClassProperties, scenePointerX: number, scenePointerY: number, linearElementEditor: LinearElementEditor): Pick<AppState, "suggestedBinding" | "selectedLinearElement"> | null;
|
|
54
50
|
static handlePointerUp(event: PointerEvent, editingLinearElement: LinearElementEditor, appState: AppState, scene: Scene): LinearElementEditor;
|
|
55
51
|
static getEditorMidPoints: (element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, appState: InteractiveCanvasAppState) => (GlobalPoint | null)[];
|
|
56
52
|
static getSegmentMidpointHitCoords: (linearElementEditor: LinearElementEditor, scenePointer: {
|
|
@@ -69,7 +65,7 @@ export declare class LinearElementEditor {
|
|
|
69
65
|
linearElementEditor: LinearElementEditor | null;
|
|
70
66
|
};
|
|
71
67
|
static arePointsEqual<Point extends LocalPoint | GlobalPoint>(point1: Point | null, point2: Point | null): boolean;
|
|
72
|
-
static
|
|
68
|
+
static handlePointerMoveInEditMode(event: React.PointerEvent<HTMLCanvasElement>, scenePointerX: number, scenePointerY: number, app: AppClassProperties): LinearElementEditor | null;
|
|
73
69
|
/** scene coords */
|
|
74
70
|
static getPointGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, p: LocalPoint, elementsMap: ElementsMap): GlobalPoint;
|
|
75
71
|
/** scene coords */
|
|
@@ -95,12 +91,13 @@ export declare class LinearElementEditor {
|
|
|
95
91
|
static deletePoints(element: NonDeleted<ExcalidrawLinearElement>, app: AppClassProperties, pointIndices: readonly number[]): void;
|
|
96
92
|
static addPoints(element: NonDeleted<ExcalidrawLinearElement>, scene: Scene, addedPoints: LocalPoint[]): void;
|
|
97
93
|
static movePoints(element: NonDeleted<ExcalidrawLinearElement>, scene: Scene, pointUpdates: PointsPositionUpdates, otherUpdates?: {
|
|
98
|
-
startBinding?:
|
|
99
|
-
endBinding?:
|
|
94
|
+
startBinding?: FixedPointBinding | null;
|
|
95
|
+
endBinding?: FixedPointBinding | null;
|
|
96
|
+
moveMidPointsWithElement?: boolean | null;
|
|
100
97
|
}): void;
|
|
101
98
|
static shouldAddMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, appState: AppState, elementsMap: ElementsMap): boolean;
|
|
102
99
|
static addMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, app: AppClassProperties, snapToGrid: boolean, scene: Scene): {
|
|
103
|
-
pointerDownState: LinearElementEditor["
|
|
100
|
+
pointerDownState: LinearElementEditor["initialState"];
|
|
104
101
|
selectedPointsIndices: LinearElementEditor["selectedPointsIndices"];
|
|
105
102
|
} | undefined;
|
|
106
103
|
private static _updatePoints;
|
|
@@ -111,6 +108,6 @@ export declare class LinearElementEditor {
|
|
|
111
108
|
};
|
|
112
109
|
static getMinMaxXYWithBoundText: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, elementBounds: Bounds, boundTextElement: ExcalidrawTextElementWithContainer) => [number, number, number, number, number, number];
|
|
113
110
|
static getElementAbsoluteCoords: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, includeBoundText?: boolean) => [number, number, number, number, number, number];
|
|
114
|
-
static moveFixedSegment(linearElement: LinearElementEditor, index: number, x: number, y: number, scene: Scene): LinearElementEditor
|
|
111
|
+
static moveFixedSegment(linearElement: LinearElementEditor, index: number, x: number, y: number, scene: Scene): Pick<LinearElementEditor, "segmentMidPointHoveredCoords" | "initialState">;
|
|
115
112
|
static deleteFixedSegment(element: ExcalidrawElbowArrowElement, scene: Scene, index: number): void;
|
|
116
113
|
}
|
|
@@ -22,7 +22,7 @@ export interface ExcalidrawElementWithCanvas {
|
|
|
22
22
|
export declare const DEFAULT_LINK_SIZE = 14;
|
|
23
23
|
export declare const elementWithCanvasCache: WeakMap<ExcalidrawElement, ExcalidrawElementWithCanvas>;
|
|
24
24
|
export declare const renderSelectionElement: (element: NonDeletedExcalidrawElement, context: CanvasRenderingContext2D, appState: InteractiveCanvasAppState, selectionColor: InteractiveCanvasRenderConfig["selectionColor"]) => void;
|
|
25
|
-
export declare const renderElement: (element: NonDeletedExcalidrawElement, elementsMap: RenderableElementsMap, allElementsMap: NonDeletedSceneElementsMap, rc: RoughCanvas, context: CanvasRenderingContext2D, renderConfig: StaticCanvasRenderConfig, appState: StaticCanvasAppState) => void;
|
|
25
|
+
export declare const renderElement: (element: NonDeletedExcalidrawElement, elementsMap: RenderableElementsMap, allElementsMap: NonDeletedSceneElementsMap, rc: RoughCanvas, context: CanvasRenderingContext2D, renderConfig: StaticCanvasRenderConfig, appState: StaticCanvasAppState | InteractiveCanvasAppState) => void;
|
|
26
26
|
export declare const pathsCache: WeakMap<ExcalidrawFreeDrawElement, Path2D>;
|
|
27
27
|
export declare function generateFreeDrawShape(element: ExcalidrawFreeDrawElement): Path2D;
|
|
28
28
|
export declare function getFreeDrawPath2D(element: ExcalidrawFreeDrawElement): Path2D | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ElementOrToolType } from "@excalidraw/excalidraw/types";
|
|
2
2
|
import type { MarkNonNullable } from "@excalidraw/common/utility-types";
|
|
3
3
|
import type { Bounds } from "./bounds";
|
|
4
|
-
import type { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawEmbeddableElement, ExcalidrawLinearElement, ExcalidrawBindableElement, ExcalidrawFreeDrawElement, InitializedExcalidrawImageElement, ExcalidrawImageElement, ExcalidrawTextElementWithContainer, ExcalidrawTextContainer, ExcalidrawFrameElement, RoundnessType, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeElement, ExcalidrawIframeLikeElement, ExcalidrawMagicFrameElement, ExcalidrawArrowElement, ExcalidrawElbowArrowElement, ExcalidrawLineElement,
|
|
4
|
+
import type { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawEmbeddableElement, ExcalidrawLinearElement, ExcalidrawBindableElement, ExcalidrawFreeDrawElement, InitializedExcalidrawImageElement, ExcalidrawImageElement, ExcalidrawTextElementWithContainer, ExcalidrawTextContainer, ExcalidrawFrameElement, RoundnessType, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeElement, ExcalidrawIframeLikeElement, ExcalidrawMagicFrameElement, ExcalidrawArrowElement, ExcalidrawElbowArrowElement, ExcalidrawLineElement, ExcalidrawFlowchartNodeElement, ExcalidrawLinearElementSubType } from "./types";
|
|
5
5
|
export declare const isInitializedImageElement: (element: ExcalidrawElement | null) => element is InitializedExcalidrawImageElement;
|
|
6
6
|
export declare const isImageElement: (element: ExcalidrawElement | null) => element is ExcalidrawImageElement;
|
|
7
7
|
export declare const isEmbeddableElement: (element: ExcalidrawElement | null | undefined) => element is ExcalidrawEmbeddableElement;
|
|
@@ -24,7 +24,7 @@ export declare const isSimpleArrow: (element?: ExcalidrawElement) => element is
|
|
|
24
24
|
export declare const isSharpArrow: (element?: ExcalidrawElement) => element is ExcalidrawArrowElement;
|
|
25
25
|
export declare const isCurvedArrow: (element?: ExcalidrawElement) => element is ExcalidrawArrowElement;
|
|
26
26
|
export declare const isLinearElementType: (elementType: ElementOrToolType) => boolean;
|
|
27
|
-
export declare const isBindingElement: (element?: ExcalidrawElement | null, includeLocked?: boolean) => element is
|
|
27
|
+
export declare const isBindingElement: (element?: ExcalidrawElement | null, includeLocked?: boolean) => element is ExcalidrawArrowElement;
|
|
28
28
|
export declare const isBindingElementType: (elementType: ElementOrToolType) => boolean;
|
|
29
29
|
export declare const isBindableElement: (element: ExcalidrawElement | null | undefined, includeLocked?: boolean) => element is ExcalidrawBindableElement;
|
|
30
30
|
export declare const isRectanguloidElement: (element?: ExcalidrawElement | null) => element is ExcalidrawBindableElement;
|
|
@@ -43,7 +43,6 @@ export declare const getDefaultRoundnessTypeForElement: (element: ExcalidrawElem
|
|
|
43
43
|
} | {
|
|
44
44
|
type: 3;
|
|
45
45
|
} | null;
|
|
46
|
-
export declare const isFixedPointBinding: (binding: PointBinding | FixedPointBinding) => binding is FixedPointBinding;
|
|
47
46
|
export declare const isBounds: (box: unknown) => box is Bounds;
|
|
48
47
|
export declare const getLinearElementSubType: (element: ExcalidrawLinearElement) => ExcalidrawLinearElementSubType;
|
|
49
48
|
/**
|
|
@@ -210,14 +210,12 @@ export type ExcalidrawTextElementWithContainer = {
|
|
|
210
210
|
containerId: ExcalidrawTextContainer["id"];
|
|
211
211
|
} & ExcalidrawTextElement;
|
|
212
212
|
export type FixedPoint = [number, number];
|
|
213
|
-
export type
|
|
213
|
+
export type BindMode = "inside" | "orbit" | "skip";
|
|
214
|
+
export type FixedPointBinding = {
|
|
214
215
|
elementId: ExcalidrawBindableElement["id"];
|
|
215
|
-
focus: number;
|
|
216
|
-
gap: number;
|
|
217
|
-
};
|
|
218
|
-
export type FixedPointBinding = Merge<PointBinding, {
|
|
219
216
|
fixedPoint: FixedPoint;
|
|
220
|
-
|
|
217
|
+
mode: BindMode;
|
|
218
|
+
};
|
|
221
219
|
type Index = number;
|
|
222
220
|
export type PointsPositionUpdates = Map<Index, {
|
|
223
221
|
point: LocalPoint;
|
|
@@ -227,9 +225,8 @@ export type Arrowhead = "arrow" | "bar" | "dot" | "circle" | "circle_outline" |
|
|
|
227
225
|
export type ExcalidrawLinearElement = _ExcalidrawElementBase & Readonly<{
|
|
228
226
|
type: "line" | "arrow";
|
|
229
227
|
points: readonly LocalPoint[];
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
endBinding: PointBinding | null;
|
|
228
|
+
startBinding: FixedPointBinding | null;
|
|
229
|
+
endBinding: FixedPointBinding | null;
|
|
233
230
|
startArrowhead: Arrowhead | null;
|
|
234
231
|
endArrowhead: Arrowhead | null;
|
|
235
232
|
}>;
|
|
@@ -248,9 +245,9 @@ export type ExcalidrawArrowElement = ExcalidrawLinearElement & Readonly<{
|
|
|
248
245
|
}>;
|
|
249
246
|
export type ExcalidrawElbowArrowElement = Merge<ExcalidrawArrowElement, {
|
|
250
247
|
elbowed: true;
|
|
248
|
+
fixedSegments: readonly FixedSegment[] | null;
|
|
251
249
|
startBinding: FixedPointBinding | null;
|
|
252
250
|
endBinding: FixedPointBinding | null;
|
|
253
|
-
fixedSegments: readonly FixedSegment[] | null;
|
|
254
251
|
/**
|
|
255
252
|
* Marks that the 3rd point should be used as the 2nd point of the arrow in
|
|
256
253
|
* order to temporarily hide the first segment of the arrow without losing
|
|
@@ -273,7 +270,6 @@ export type ExcalidrawFreeDrawElement = _ExcalidrawElementBase & Readonly<{
|
|
|
273
270
|
points: readonly LocalPoint[];
|
|
274
271
|
pressures: readonly number[];
|
|
275
272
|
simulatePressure: boolean;
|
|
276
|
-
lastCommittedPoint: LocalPoint | null;
|
|
277
273
|
}>;
|
|
278
274
|
export type FileId = string & {
|
|
279
275
|
_brand: "FileId";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type GlobalPoint } from "@excalidraw/math";
|
|
2
2
|
import type { Curve, LineSegment } from "@excalidraw/math";
|
|
3
3
|
import type { Zoom } from "@excalidraw/excalidraw/types";
|
|
4
|
-
import type { ExcalidrawDiamondElement, ExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawLinearElement, ExcalidrawRectanguloidElement } from "./types";
|
|
4
|
+
import type { ElementsMap, ExcalidrawArrowElement, ExcalidrawDiamondElement, ExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawLinearElement, ExcalidrawRectanguloidElement } from "./types";
|
|
5
5
|
/**
|
|
6
6
|
* Returns the **rotated** components of freedraw, line or arrow elements.
|
|
7
7
|
*
|
|
@@ -29,3 +29,4 @@ export declare function deconstructRectanguloidElement(element: ExcalidrawRectan
|
|
|
29
29
|
export declare function deconstructDiamondElement(element: ExcalidrawDiamondElement, offset?: number): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
|
|
30
30
|
export declare const isPathALoop: (points: ExcalidrawLinearElement["points"], zoomValue?: Zoom["value"]) => boolean;
|
|
31
31
|
export declare const getCornerRadius: (x: number, element: ExcalidrawElement) => number;
|
|
32
|
+
export declare const projectFixedPointOntoDiagonal: (arrow: ExcalidrawArrowElement, point: GlobalPoint, element: ExcalidrawElement, startOrEnd: "start" | "end", elementsMap: ElementsMap) => GlobalPoint | null;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
2
|
+
import type { GlobalPoint } from "@excalidraw/math";
|
|
2
3
|
import type { Scene } from "./Scene";
|
|
3
|
-
import type { ExcalidrawElement } from "./types";
|
|
4
|
+
import type { ExcalidrawArrowElement, ExcalidrawElement, NonDeletedExcalidrawElement, NonDeletedSceneElementsMap, Ordered, OrderedExcalidrawElement } from "./types";
|
|
5
|
+
/**
|
|
6
|
+
* Moves the arrow element above any bindable elements it intersects with or
|
|
7
|
+
* hovers over.
|
|
8
|
+
*/
|
|
9
|
+
export declare const moveArrowAboveBindable: (point: GlobalPoint, arrow: ExcalidrawArrowElement, elements: readonly Ordered<NonDeletedExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap, scene: Scene) => readonly OrderedExcalidrawElement[];
|
|
4
10
|
export declare const moveOneLeft: (allElements: readonly ExcalidrawElement[], appState: AppState, scene: Scene) => readonly ExcalidrawElement[];
|
|
5
11
|
export declare const moveOneRight: (allElements: readonly ExcalidrawElement[], appState: AppState, scene: Scene) => readonly ExcalidrawElement[];
|
|
6
12
|
export declare const moveAllLeft: (allElements: readonly ExcalidrawElement[], appState: AppState) => readonly ExcalidrawElement[] | ExcalidrawElement[];
|
|
@@ -3,7 +3,7 @@ export declare const actionAddToLibrary: {
|
|
|
3
3
|
trackEvent: {
|
|
4
4
|
category: "element";
|
|
5
5
|
};
|
|
6
|
-
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _:
|
|
6
|
+
perform: (elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties) => Promise<{
|
|
7
7
|
captureUpdate: "EVENTUALLY";
|
|
8
8
|
appState: {
|
|
9
9
|
toast: {
|
|
@@ -27,7 +27,7 @@ export declare const actionAddToLibrary: {
|
|
|
27
27
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
28
28
|
isBindingEnabled: boolean;
|
|
29
29
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
30
|
-
|
|
30
|
+
suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
31
31
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
32
32
|
frameRendering: {
|
|
33
33
|
enabled: boolean;
|
|
@@ -89,12 +89,14 @@ export declare const actionAddToLibrary: {
|
|
|
89
89
|
tab?: string | undefined;
|
|
90
90
|
} | null;
|
|
91
91
|
openDialog: {
|
|
92
|
-
name: "
|
|
92
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
93
93
|
} | {
|
|
94
94
|
name: "ttd";
|
|
95
95
|
tab: "mermaid" | "text-to-diagram";
|
|
96
96
|
} | {
|
|
97
97
|
name: "commandPalette";
|
|
98
|
+
} | {
|
|
99
|
+
name: "settings";
|
|
98
100
|
} | {
|
|
99
101
|
name: "elementLinkSelector";
|
|
100
102
|
sourceElementId: string;
|
|
@@ -215,6 +217,7 @@ export declare const actionAddToLibrary: {
|
|
|
215
217
|
lockedMultiSelections: {
|
|
216
218
|
[groupId: string]: true;
|
|
217
219
|
};
|
|
220
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
218
221
|
};
|
|
219
222
|
} | {
|
|
220
223
|
captureUpdate: "EVENTUALLY";
|
|
@@ -237,7 +240,7 @@ export declare const actionAddToLibrary: {
|
|
|
237
240
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
238
241
|
isBindingEnabled: boolean;
|
|
239
242
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
240
|
-
|
|
243
|
+
suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
241
244
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
242
245
|
frameRendering: {
|
|
243
246
|
enabled: boolean;
|
|
@@ -299,12 +302,14 @@ export declare const actionAddToLibrary: {
|
|
|
299
302
|
tab?: string | undefined;
|
|
300
303
|
} | null;
|
|
301
304
|
openDialog: {
|
|
302
|
-
name: "
|
|
305
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
303
306
|
} | {
|
|
304
307
|
name: "ttd";
|
|
305
308
|
tab: "mermaid" | "text-to-diagram";
|
|
306
309
|
} | {
|
|
307
310
|
name: "commandPalette";
|
|
311
|
+
} | {
|
|
312
|
+
name: "settings";
|
|
308
313
|
} | {
|
|
309
314
|
name: "elementLinkSelector";
|
|
310
315
|
sourceElementId: string;
|
|
@@ -430,6 +435,7 @@ export declare const actionAddToLibrary: {
|
|
|
430
435
|
lockedMultiSelections: {
|
|
431
436
|
[groupId: string]: true;
|
|
432
437
|
};
|
|
438
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
433
439
|
};
|
|
434
440
|
}> | {
|
|
435
441
|
captureUpdate: "EVENTUALLY";
|
|
@@ -452,7 +458,7 @@ export declare const actionAddToLibrary: {
|
|
|
452
458
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
453
459
|
isBindingEnabled: boolean;
|
|
454
460
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
455
|
-
|
|
461
|
+
suggestedBinding: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
456
462
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
457
463
|
frameRendering: {
|
|
458
464
|
enabled: boolean;
|
|
@@ -514,12 +520,14 @@ export declare const actionAddToLibrary: {
|
|
|
514
520
|
tab?: string | undefined;
|
|
515
521
|
} | null;
|
|
516
522
|
openDialog: {
|
|
517
|
-
name: "
|
|
523
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
518
524
|
} | {
|
|
519
525
|
name: "ttd";
|
|
520
526
|
tab: "mermaid" | "text-to-diagram";
|
|
521
527
|
} | {
|
|
522
528
|
name: "commandPalette";
|
|
529
|
+
} | {
|
|
530
|
+
name: "settings";
|
|
523
531
|
} | {
|
|
524
532
|
name: "elementLinkSelector";
|
|
525
533
|
sourceElementId: string;
|
|
@@ -645,6 +653,7 @@ export declare const actionAddToLibrary: {
|
|
|
645
653
|
lockedMultiSelections: {
|
|
646
654
|
[groupId: string]: true;
|
|
647
655
|
};
|
|
656
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
648
657
|
};
|
|
649
658
|
};
|
|
650
659
|
label: string;
|