@excalidraw/element 0.18.0-2874f9e → 0.18.0-2a82821
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 +5228 -4610
- package/dist/dev/index.js.map +4 -4
- package/dist/prod/index.js +19 -18
- package/dist/types/common/src/appEventBus.d.ts +27 -0
- package/dist/types/common/src/colors.d.ts +2 -2
- package/dist/types/common/src/constants.d.ts +9 -7
- package/dist/types/common/src/index.d.ts +2 -0
- package/dist/types/common/src/utils.d.ts +1 -3
- package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
- package/dist/types/element/src/Scene.d.ts +7 -3
- package/dist/types/element/src/arrowheads.d.ts +3 -0
- package/dist/types/element/src/binding.d.ts +3 -4
- package/dist/types/element/src/bounds.d.ts +22 -3
- package/dist/types/element/src/comparisons.d.ts +1 -0
- package/dist/types/element/src/duplicate.d.ts +1 -0
- package/dist/types/element/src/elbowArrow.d.ts +2 -0
- package/dist/types/element/src/frame.d.ts +7 -6
- package/dist/types/element/src/index.d.ts +1 -0
- package/dist/types/element/src/linearElementEditor.d.ts +5 -2
- package/dist/types/element/src/mutateElement.d.ts +2 -0
- package/dist/types/element/src/newElement.d.ts +1 -0
- package/dist/types/element/src/selection.d.ts +7 -3
- package/dist/types/element/src/shape.d.ts +1 -1
- package/dist/types/element/src/textElement.d.ts +1 -1
- package/dist/types/element/src/textWrapping.d.ts +26 -0
- package/dist/types/element/src/typeChecks.d.ts +1 -0
- package/dist/types/element/src/types.d.ts +11 -2
- package/dist/types/element/src/utils.d.ts +2 -2
- package/dist/types/element/src/visualdebug.d.ts +1 -2
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +35 -38
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +25 -27
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +144 -156
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +24 -26
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +36 -39
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +160 -0
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +8 -13
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +24 -26
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionExport.d.ts +67 -349
- package/dist/types/excalidraw/actions/actionFrame.d.ts +49 -52
- package/dist/types/excalidraw/actions/actionGroup.d.ts +25 -27
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +13 -13
- package/dist/types/excalidraw/actions/actionLink.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionMenu.d.ts +8 -13
- package/dist/types/excalidraw/actions/actionProperties.d.ts +36 -29
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionStyles.d.ts +12 -12
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +173 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +173 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +8 -13
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +12 -13
- package/dist/types/excalidraw/actions/index.d.ts +4 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
- package/dist/types/excalidraw/appState.d.ts +6 -2
- package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
- package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
- package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
- package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
- package/dist/types/excalidraw/charts/index.d.ts +7 -0
- package/dist/types/excalidraw/clipboard.d.ts +2 -5
- package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/App.d.ts +54 -14
- package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +1 -1
- package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
- package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
- package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
- package/dist/types/excalidraw/components/Range.d.ts +10 -4
- package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
- package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +4 -4
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +4 -1
- package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
- package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +3 -3
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
- package/dist/types/excalidraw/components/Toast.d.ts +8 -4
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -1
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
- package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
- package/dist/types/excalidraw/components/icons.d.ts +19 -8
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +9 -3
- package/dist/types/excalidraw/components/shapes.d.ts +7 -0
- package/dist/types/excalidraw/data/blob.d.ts +31 -34
- package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
- package/dist/types/excalidraw/data/index.d.ts +2 -3
- package/dist/types/excalidraw/data/json.d.ts +30 -23
- package/dist/types/excalidraw/data/library.d.ts +1 -1
- package/dist/types/excalidraw/data/resave.d.ts +7 -2
- package/dist/types/excalidraw/eraser/index.d.ts +2 -3
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
- package/dist/types/excalidraw/lasso/index.d.ts +2 -3
- package/dist/types/excalidraw/renderer/animation.d.ts +4 -1
- package/dist/types/excalidraw/scene/Renderer.d.ts +426 -19
- package/dist/types/excalidraw/scene/index.d.ts +1 -1
- package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
- package/dist/types/excalidraw/types.d.ts +110 -18
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
- package/dist/types/fractional-indexing/src/index.d.ts +29 -0
- package/dist/types/laser-pointer/src/index.d.ts +2 -0
- package/dist/types/laser-pointer/src/math.d.ts +16 -0
- package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
- package/dist/types/laser-pointer/src/state.d.ts +35 -0
- package/dist/types/math/src/constants.d.ts +0 -1
- package/dist/types/math/src/curve.d.ts +4 -1
- package/dist/types/math/src/point.d.ts +2 -1
- package/dist/types/utils/src/index.d.ts +1 -2
- package/package.json +4 -3
- package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
- package/dist/types/excalidraw/charts.d.ts +0 -27
- package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
- package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
- package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
- package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
- package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
- package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -84
- package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
- package/dist/types/excalidraw/index.d.ts +0 -47
- package/dist/types/excalidraw/polyfill.d.ts +0 -2
- package/dist/types/utils/src/bbox.d.ts +0 -9
- package/dist/types/utils/src/withinBounds.d.ts +0 -19
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
export declare const actionToggleMidpointSnapping: {
|
|
2
|
+
name: "midpointSnapping";
|
|
3
|
+
label: string;
|
|
4
|
+
viewMode: false;
|
|
5
|
+
trackEvent: {
|
|
6
|
+
category: "canvas";
|
|
7
|
+
predicate: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
8
|
+
};
|
|
9
|
+
perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
10
|
+
appState: {
|
|
11
|
+
isMidpointSnappingEnabled: boolean;
|
|
12
|
+
contextMenu: {
|
|
13
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
14
|
+
top: number;
|
|
15
|
+
left: number;
|
|
16
|
+
} | null;
|
|
17
|
+
showWelcomeScreen: boolean;
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
errorMessage: React.ReactNode;
|
|
20
|
+
activeEmbeddable: {
|
|
21
|
+
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
22
|
+
state: "hover" | "active";
|
|
23
|
+
} | null;
|
|
24
|
+
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
25
|
+
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
26
|
+
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
27
|
+
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
28
|
+
isBindingEnabled: boolean;
|
|
29
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
30
|
+
bindingPreference: "enabled" | "disabled";
|
|
31
|
+
suggestedBinding: {
|
|
32
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
33
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
34
|
+
} | null;
|
|
35
|
+
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
36
|
+
frameRendering: {
|
|
37
|
+
enabled: boolean;
|
|
38
|
+
name: boolean;
|
|
39
|
+
outline: boolean;
|
|
40
|
+
clip: boolean;
|
|
41
|
+
};
|
|
42
|
+
editingFrame: string | null;
|
|
43
|
+
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
44
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
45
|
+
activeTool: {
|
|
46
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
47
|
+
locked: boolean;
|
|
48
|
+
fromSelection: boolean;
|
|
49
|
+
} & import("../types").ActiveTool;
|
|
50
|
+
preferredSelectionTool: {
|
|
51
|
+
type: "selection" | "lasso";
|
|
52
|
+
initialized: boolean;
|
|
53
|
+
};
|
|
54
|
+
penMode: boolean;
|
|
55
|
+
penDetected: boolean;
|
|
56
|
+
exportBackground: boolean;
|
|
57
|
+
exportEmbedScene: boolean;
|
|
58
|
+
exportWithDarkMode: boolean;
|
|
59
|
+
exportScale: number;
|
|
60
|
+
currentItemStrokeColor: string;
|
|
61
|
+
currentItemBackgroundColor: string;
|
|
62
|
+
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
63
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
64
|
+
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
65
|
+
currentItemRoughness: number;
|
|
66
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
67
|
+
currentItemOpacity: number;
|
|
68
|
+
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
69
|
+
currentItemFontSize: number;
|
|
70
|
+
currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
|
|
71
|
+
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
72
|
+
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
73
|
+
currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
|
|
74
|
+
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
75
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
76
|
+
viewBackgroundColor: string;
|
|
77
|
+
scrollX: number;
|
|
78
|
+
scrollY: number;
|
|
79
|
+
cursorButton: "up" | "down";
|
|
80
|
+
scrolledOutside: boolean;
|
|
81
|
+
name: string | null;
|
|
82
|
+
isResizing: boolean;
|
|
83
|
+
isRotating: boolean;
|
|
84
|
+
zoom: import("../types").Zoom;
|
|
85
|
+
openMenu: "canvas" | null;
|
|
86
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
87
|
+
openSidebar: {
|
|
88
|
+
name: import("../types").SidebarName;
|
|
89
|
+
tab?: import("../types").SidebarTabName;
|
|
90
|
+
} | null;
|
|
91
|
+
openDialog: null | {
|
|
92
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
93
|
+
} | {
|
|
94
|
+
name: "ttd";
|
|
95
|
+
tab: "text-to-diagram" | "mermaid";
|
|
96
|
+
} | {
|
|
97
|
+
name: "commandPalette";
|
|
98
|
+
} | {
|
|
99
|
+
name: "settings";
|
|
100
|
+
} | {
|
|
101
|
+
name: "elementLinkSelector";
|
|
102
|
+
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
103
|
+
} | {
|
|
104
|
+
name: "charts";
|
|
105
|
+
data: import("../charts").Spreadsheet;
|
|
106
|
+
rawText: string;
|
|
107
|
+
};
|
|
108
|
+
defaultSidebarDockedPreference: boolean;
|
|
109
|
+
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
110
|
+
selectedElementIds: Readonly<{
|
|
111
|
+
[id: string]: true;
|
|
112
|
+
}>;
|
|
113
|
+
hoveredElementIds: Readonly<{
|
|
114
|
+
[id: string]: true;
|
|
115
|
+
}>;
|
|
116
|
+
previousSelectedElementIds: {
|
|
117
|
+
[id: string]: true;
|
|
118
|
+
};
|
|
119
|
+
selectedElementsAreBeingDragged: boolean;
|
|
120
|
+
shouldCacheIgnoreZoom: boolean;
|
|
121
|
+
toast: {
|
|
122
|
+
message: React.ReactNode;
|
|
123
|
+
closable?: boolean;
|
|
124
|
+
duration?: number;
|
|
125
|
+
} | null;
|
|
126
|
+
zenModeEnabled: boolean;
|
|
127
|
+
theme: import("@excalidraw/element/types").Theme;
|
|
128
|
+
gridSize: number;
|
|
129
|
+
gridStep: number;
|
|
130
|
+
gridModeEnabled: boolean;
|
|
131
|
+
viewModeEnabled: boolean;
|
|
132
|
+
selectedGroupIds: {
|
|
133
|
+
[groupId: string]: boolean;
|
|
134
|
+
};
|
|
135
|
+
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
136
|
+
width: number;
|
|
137
|
+
height: number;
|
|
138
|
+
offsetTop: number;
|
|
139
|
+
offsetLeft: number;
|
|
140
|
+
fileHandle: FileSystemFileHandle | null;
|
|
141
|
+
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
142
|
+
stats: {
|
|
143
|
+
open: boolean;
|
|
144
|
+
panels: number;
|
|
145
|
+
};
|
|
146
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
147
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
148
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
149
|
+
originSnapOffset: {
|
|
150
|
+
x: number;
|
|
151
|
+
y: number;
|
|
152
|
+
} | null;
|
|
153
|
+
objectsSnapModeEnabled: boolean;
|
|
154
|
+
userToFollow: import("../types").UserToFollow | null;
|
|
155
|
+
followedBy: Set<import("../types").SocketId>;
|
|
156
|
+
isCropping: boolean;
|
|
157
|
+
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
158
|
+
searchMatches: Readonly<{
|
|
159
|
+
focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
160
|
+
matches: readonly import("../types").SearchMatch[];
|
|
161
|
+
}> | null;
|
|
162
|
+
activeLockedId: string | null;
|
|
163
|
+
lockedMultiSelections: {
|
|
164
|
+
[groupId: string]: true;
|
|
165
|
+
};
|
|
166
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
167
|
+
};
|
|
168
|
+
captureUpdate: "NEVER";
|
|
169
|
+
};
|
|
170
|
+
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
171
|
+
} & {
|
|
172
|
+
keyTest?: undefined;
|
|
173
|
+
};
|
|
@@ -28,7 +28,9 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
28
28
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
29
29
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
30
30
|
isBindingEnabled: boolean;
|
|
31
|
-
|
|
31
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
32
|
+
bindingPreference: "enabled" | "disabled";
|
|
33
|
+
isMidpointSnappingEnabled: boolean;
|
|
32
34
|
suggestedBinding: {
|
|
33
35
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
34
36
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -42,7 +44,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
42
44
|
};
|
|
43
45
|
editingFrame: string | null;
|
|
44
46
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
45
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
47
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
46
48
|
activeTool: {
|
|
47
49
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
48
50
|
locked: boolean;
|
|
@@ -61,9 +63,10 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
61
63
|
currentItemStrokeColor: string;
|
|
62
64
|
currentItemBackgroundColor: string;
|
|
63
65
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
64
|
-
|
|
66
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
65
67
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
66
68
|
currentItemRoughness: number;
|
|
69
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
67
70
|
currentItemOpacity: number;
|
|
68
71
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
69
72
|
currentItemFontSize: number;
|
|
@@ -100,6 +103,10 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
100
103
|
} | {
|
|
101
104
|
name: "elementLinkSelector";
|
|
102
105
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
106
|
+
} | {
|
|
107
|
+
name: "charts";
|
|
108
|
+
data: import("../charts").Spreadsheet;
|
|
109
|
+
rawText: string;
|
|
103
110
|
};
|
|
104
111
|
defaultSidebarDockedPreference: boolean;
|
|
105
112
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -115,7 +122,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
115
122
|
selectedElementsAreBeingDragged: boolean;
|
|
116
123
|
shouldCacheIgnoreZoom: boolean;
|
|
117
124
|
toast: {
|
|
118
|
-
message:
|
|
125
|
+
message: React.ReactNode;
|
|
119
126
|
closable?: boolean;
|
|
120
127
|
duration?: number;
|
|
121
128
|
} | null;
|
|
@@ -132,20 +139,12 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
132
139
|
height: number;
|
|
133
140
|
offsetTop: number;
|
|
134
141
|
offsetLeft: number;
|
|
135
|
-
fileHandle:
|
|
142
|
+
fileHandle: FileSystemFileHandle | null;
|
|
136
143
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
137
144
|
stats: {
|
|
138
145
|
open: boolean;
|
|
139
146
|
panels: number;
|
|
140
147
|
};
|
|
141
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
142
|
-
pasteDialog: {
|
|
143
|
-
shown: false;
|
|
144
|
-
data: null;
|
|
145
|
-
} | {
|
|
146
|
-
shown: true;
|
|
147
|
-
data: import("../charts").Spreadsheet;
|
|
148
|
-
};
|
|
149
148
|
showHyperlinkPopup: false | "info" | "editor";
|
|
150
149
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
151
150
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -34,7 +34,9 @@ export declare const actionToggleSearchMenu: {
|
|
|
34
34
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
35
35
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
36
36
|
isBindingEnabled: boolean;
|
|
37
|
-
|
|
37
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
38
|
+
bindingPreference: "enabled" | "disabled";
|
|
39
|
+
isMidpointSnappingEnabled: boolean;
|
|
38
40
|
suggestedBinding: {
|
|
39
41
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
40
42
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -48,7 +50,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
48
50
|
};
|
|
49
51
|
editingFrame: string | null;
|
|
50
52
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
51
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
53
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
52
54
|
activeTool: {
|
|
53
55
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
54
56
|
locked: boolean;
|
|
@@ -67,9 +69,10 @@ export declare const actionToggleSearchMenu: {
|
|
|
67
69
|
currentItemStrokeColor: string;
|
|
68
70
|
currentItemBackgroundColor: string;
|
|
69
71
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
70
|
-
|
|
72
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
71
73
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
72
74
|
currentItemRoughness: number;
|
|
75
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
73
76
|
currentItemOpacity: number;
|
|
74
77
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
75
78
|
currentItemFontSize: number;
|
|
@@ -104,7 +107,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
104
107
|
selectedElementsAreBeingDragged: boolean;
|
|
105
108
|
shouldCacheIgnoreZoom: boolean;
|
|
106
109
|
toast: {
|
|
107
|
-
message:
|
|
110
|
+
message: React.ReactNode;
|
|
108
111
|
closable?: boolean;
|
|
109
112
|
duration?: number;
|
|
110
113
|
} | null;
|
|
@@ -122,20 +125,12 @@ export declare const actionToggleSearchMenu: {
|
|
|
122
125
|
height: number;
|
|
123
126
|
offsetTop: number;
|
|
124
127
|
offsetLeft: number;
|
|
125
|
-
fileHandle:
|
|
128
|
+
fileHandle: FileSystemFileHandle | null;
|
|
126
129
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
127
130
|
stats: {
|
|
128
131
|
open: boolean;
|
|
129
132
|
panels: number;
|
|
130
133
|
};
|
|
131
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
132
|
-
pasteDialog: {
|
|
133
|
-
shown: false;
|
|
134
|
-
data: null;
|
|
135
|
-
} | {
|
|
136
|
-
shown: true;
|
|
137
|
-
data: import("../charts").Spreadsheet;
|
|
138
|
-
};
|
|
139
134
|
showHyperlinkPopup: false | "info" | "editor";
|
|
140
135
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
141
136
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -30,7 +30,9 @@ export declare const actionToggleStats: {
|
|
|
30
30
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
31
31
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
32
32
|
isBindingEnabled: boolean;
|
|
33
|
-
|
|
33
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
34
|
+
bindingPreference: "enabled" | "disabled";
|
|
35
|
+
isMidpointSnappingEnabled: boolean;
|
|
34
36
|
suggestedBinding: {
|
|
35
37
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
36
38
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -44,7 +46,7 @@ export declare const actionToggleStats: {
|
|
|
44
46
|
};
|
|
45
47
|
editingFrame: string | null;
|
|
46
48
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
47
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
49
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
48
50
|
activeTool: {
|
|
49
51
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
50
52
|
locked: boolean;
|
|
@@ -63,9 +65,10 @@ export declare const actionToggleStats: {
|
|
|
63
65
|
currentItemStrokeColor: string;
|
|
64
66
|
currentItemBackgroundColor: string;
|
|
65
67
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
66
|
-
|
|
68
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
67
69
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
68
70
|
currentItemRoughness: number;
|
|
71
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
69
72
|
currentItemOpacity: number;
|
|
70
73
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
71
74
|
currentItemFontSize: number;
|
|
@@ -102,6 +105,10 @@ export declare const actionToggleStats: {
|
|
|
102
105
|
} | {
|
|
103
106
|
name: "elementLinkSelector";
|
|
104
107
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
108
|
+
} | {
|
|
109
|
+
name: "charts";
|
|
110
|
+
data: import("../charts").Spreadsheet;
|
|
111
|
+
rawText: string;
|
|
105
112
|
};
|
|
106
113
|
defaultSidebarDockedPreference: boolean;
|
|
107
114
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -117,7 +124,7 @@ export declare const actionToggleStats: {
|
|
|
117
124
|
selectedElementsAreBeingDragged: boolean;
|
|
118
125
|
shouldCacheIgnoreZoom: boolean;
|
|
119
126
|
toast: {
|
|
120
|
-
message:
|
|
127
|
+
message: React.ReactNode;
|
|
121
128
|
closable?: boolean;
|
|
122
129
|
duration?: number;
|
|
123
130
|
} | null;
|
|
@@ -135,16 +142,8 @@ export declare const actionToggleStats: {
|
|
|
135
142
|
height: number;
|
|
136
143
|
offsetTop: number;
|
|
137
144
|
offsetLeft: number;
|
|
138
|
-
fileHandle:
|
|
145
|
+
fileHandle: FileSystemFileHandle | null;
|
|
139
146
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
140
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
141
|
-
pasteDialog: {
|
|
142
|
-
shown: false;
|
|
143
|
-
data: null;
|
|
144
|
-
} | {
|
|
145
|
-
shown: true;
|
|
146
|
-
data: import("../charts").Spreadsheet;
|
|
147
|
-
};
|
|
148
147
|
showHyperlinkPopup: false | "info" | "editor";
|
|
149
148
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
150
149
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -27,7 +27,9 @@ export declare const actionToggleViewMode: {
|
|
|
27
27
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
28
28
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
29
29
|
isBindingEnabled: boolean;
|
|
30
|
-
|
|
30
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
31
|
+
bindingPreference: "enabled" | "disabled";
|
|
32
|
+
isMidpointSnappingEnabled: boolean;
|
|
31
33
|
suggestedBinding: {
|
|
32
34
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
33
35
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -41,7 +43,7 @@ export declare const actionToggleViewMode: {
|
|
|
41
43
|
};
|
|
42
44
|
editingFrame: string | null;
|
|
43
45
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
44
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
46
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
45
47
|
activeTool: {
|
|
46
48
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
47
49
|
locked: boolean;
|
|
@@ -60,9 +62,10 @@ export declare const actionToggleViewMode: {
|
|
|
60
62
|
currentItemStrokeColor: string;
|
|
61
63
|
currentItemBackgroundColor: string;
|
|
62
64
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
63
|
-
|
|
65
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
64
66
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
65
67
|
currentItemRoughness: number;
|
|
68
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
66
69
|
currentItemOpacity: number;
|
|
67
70
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
68
71
|
currentItemFontSize: number;
|
|
@@ -99,6 +102,10 @@ export declare const actionToggleViewMode: {
|
|
|
99
102
|
} | {
|
|
100
103
|
name: "elementLinkSelector";
|
|
101
104
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
105
|
+
} | {
|
|
106
|
+
name: "charts";
|
|
107
|
+
data: import("../charts").Spreadsheet;
|
|
108
|
+
rawText: string;
|
|
102
109
|
};
|
|
103
110
|
defaultSidebarDockedPreference: boolean;
|
|
104
111
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -114,7 +121,7 @@ export declare const actionToggleViewMode: {
|
|
|
114
121
|
selectedElementsAreBeingDragged: boolean;
|
|
115
122
|
shouldCacheIgnoreZoom: boolean;
|
|
116
123
|
toast: {
|
|
117
|
-
message:
|
|
124
|
+
message: React.ReactNode;
|
|
118
125
|
closable?: boolean;
|
|
119
126
|
duration?: number;
|
|
120
127
|
} | null;
|
|
@@ -131,20 +138,12 @@ export declare const actionToggleViewMode: {
|
|
|
131
138
|
height: number;
|
|
132
139
|
offsetTop: number;
|
|
133
140
|
offsetLeft: number;
|
|
134
|
-
fileHandle:
|
|
141
|
+
fileHandle: FileSystemFileHandle | null;
|
|
135
142
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
136
143
|
stats: {
|
|
137
144
|
open: boolean;
|
|
138
145
|
panels: number;
|
|
139
146
|
};
|
|
140
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
141
|
-
pasteDialog: {
|
|
142
|
-
shown: false;
|
|
143
|
-
data: null;
|
|
144
|
-
} | {
|
|
145
|
-
shown: true;
|
|
146
|
-
data: import("../charts").Spreadsheet;
|
|
147
|
-
};
|
|
148
147
|
showHyperlinkPopup: false | "info" | "editor";
|
|
149
148
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
150
149
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -27,7 +27,9 @@ export declare const actionToggleZenMode: {
|
|
|
27
27
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
28
28
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
29
29
|
isBindingEnabled: boolean;
|
|
30
|
-
|
|
30
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
31
|
+
bindingPreference: "enabled" | "disabled";
|
|
32
|
+
isMidpointSnappingEnabled: boolean;
|
|
31
33
|
suggestedBinding: {
|
|
32
34
|
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
33
35
|
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
@@ -41,7 +43,7 @@ export declare const actionToggleZenMode: {
|
|
|
41
43
|
};
|
|
42
44
|
editingFrame: string | null;
|
|
43
45
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
44
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
46
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
45
47
|
activeTool: {
|
|
46
48
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
47
49
|
locked: boolean;
|
|
@@ -60,9 +62,10 @@ export declare const actionToggleZenMode: {
|
|
|
60
62
|
currentItemStrokeColor: string;
|
|
61
63
|
currentItemBackgroundColor: string;
|
|
62
64
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
63
|
-
|
|
65
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
64
66
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
65
67
|
currentItemRoughness: number;
|
|
68
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
66
69
|
currentItemOpacity: number;
|
|
67
70
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
68
71
|
currentItemFontSize: number;
|
|
@@ -99,6 +102,10 @@ export declare const actionToggleZenMode: {
|
|
|
99
102
|
} | {
|
|
100
103
|
name: "elementLinkSelector";
|
|
101
104
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
105
|
+
} | {
|
|
106
|
+
name: "charts";
|
|
107
|
+
data: import("../charts").Spreadsheet;
|
|
108
|
+
rawText: string;
|
|
102
109
|
};
|
|
103
110
|
defaultSidebarDockedPreference: boolean;
|
|
104
111
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -114,7 +121,7 @@ export declare const actionToggleZenMode: {
|
|
|
114
121
|
selectedElementsAreBeingDragged: boolean;
|
|
115
122
|
shouldCacheIgnoreZoom: boolean;
|
|
116
123
|
toast: {
|
|
117
|
-
message:
|
|
124
|
+
message: React.ReactNode;
|
|
118
125
|
closable?: boolean;
|
|
119
126
|
duration?: number;
|
|
120
127
|
} | null;
|
|
@@ -131,20 +138,12 @@ export declare const actionToggleZenMode: {
|
|
|
131
138
|
height: number;
|
|
132
139
|
offsetTop: number;
|
|
133
140
|
offsetLeft: number;
|
|
134
|
-
fileHandle:
|
|
141
|
+
fileHandle: FileSystemFileHandle | null;
|
|
135
142
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
136
143
|
stats: {
|
|
137
144
|
open: boolean;
|
|
138
145
|
panels: number;
|
|
139
146
|
};
|
|
140
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
141
|
-
pasteDialog: {
|
|
142
|
-
shown: false;
|
|
143
|
-
data: null;
|
|
144
|
-
} | {
|
|
145
|
-
shown: true;
|
|
146
|
-
data: import("../charts").Spreadsheet;
|
|
147
|
-
};
|
|
148
147
|
showHyperlinkPopup: false | "info" | "editor";
|
|
149
148
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
150
149
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -2,10 +2,11 @@ export { actionDeleteSelected } from "./actionDeleteSelected";
|
|
|
2
2
|
export { actionBringForward, actionBringToFront, actionSendBackward, actionSendToBack, } from "./actionZindex";
|
|
3
3
|
export { actionSelectAll } from "./actionSelectAll";
|
|
4
4
|
export { actionDuplicateSelection } from "./actionDuplicateSelection";
|
|
5
|
-
export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, actionChangeArrowProperties, } from "./actionProperties";
|
|
5
|
+
export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeFreedrawMode, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, actionChangeArrowProperties, } from "./actionProperties";
|
|
6
6
|
export { actionChangeViewBackgroundColor, actionClearCanvas, actionZoomIn, actionZoomOut, actionResetZoom, actionZoomToFit, actionToggleTheme, } from "./actionCanvas";
|
|
7
7
|
export { actionSetEmbeddableAsActiveTool } from "./actionEmbeddable";
|
|
8
8
|
export { actionFinalize } from "./actionFinalize";
|
|
9
|
+
export { actionDeselect } from "./actionDeselect";
|
|
9
10
|
export { actionChangeProjectName, actionChangeExportBackground, actionSaveToActiveFile, actionSaveFileToDisk, actionLoadScene, } from "./actionExport";
|
|
10
11
|
export { actionCopyStyles, actionPasteStyles } from "./actionStyles";
|
|
11
12
|
export { actionShortcuts } from "./actionMenu";
|
|
@@ -19,6 +20,8 @@ export { actionCopy, actionCut, actionCopyAsPng, actionCopyAsSvg, copyText, } fr
|
|
|
19
20
|
export { actionToggleGridMode } from "./actionToggleGridMode";
|
|
20
21
|
export { actionToggleZenMode } from "./actionToggleZenMode";
|
|
21
22
|
export { actionToggleObjectsSnapMode } from "./actionToggleObjectsSnapMode";
|
|
23
|
+
export { actionToggleArrowBinding } from "./actionToggleArrowBinding";
|
|
24
|
+
export { actionToggleMidpointSnapping } from "./actionToggleMidpointSnapping";
|
|
22
25
|
export { actionToggleStats } from "./actionToggleStats";
|
|
23
26
|
export { actionUnbindText, actionBindText } from "./actionBoundText";
|
|
24
27
|
export { actionLink } from "./actionLink";
|
|
@@ -14,7 +14,7 @@ export type ActionResult = {
|
|
|
14
14
|
type ActionFn<TData = any> = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: TData | undefined, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
15
15
|
export type UpdaterFn = (res: ActionResult) => void;
|
|
16
16
|
export type ActionFilterFn = (action: Action) => void;
|
|
17
|
-
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
17
|
+
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeFreedrawMode" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "deselect" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
18
18
|
export type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: AppState;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { LaserPointer } from "@excalidraw/laser-pointer";
|
|
2
2
|
import type { LaserPointerOptions } from "@excalidraw/laser-pointer";
|
|
3
|
-
import type { AnimationFrameHandler } from "./animation-frame-handler";
|
|
4
3
|
import type App from "./components/App";
|
|
5
4
|
export interface Trail {
|
|
6
5
|
start(container: SVGSVGElement): void;
|
|
@@ -15,7 +14,6 @@ export interface AnimatedTrailOptions {
|
|
|
15
14
|
animateTrail?: boolean;
|
|
16
15
|
}
|
|
17
16
|
export declare class AnimatedTrail implements Trail {
|
|
18
|
-
private animationFrameHandler;
|
|
19
17
|
protected app: App;
|
|
20
18
|
private options;
|
|
21
19
|
private currentTrail?;
|
|
@@ -23,9 +21,12 @@ export declare class AnimatedTrail implements Trail {
|
|
|
23
21
|
private container?;
|
|
24
22
|
private trailElement;
|
|
25
23
|
private trailAnimation?;
|
|
26
|
-
|
|
24
|
+
private key;
|
|
25
|
+
private static counter;
|
|
26
|
+
constructor(app: App, options: Partial<LaserPointerOptions> & Partial<AnimatedTrailOptions>);
|
|
27
27
|
get hasCurrentTrail(): boolean;
|
|
28
28
|
hasLastPoint(x: number, y: number): boolean;
|
|
29
|
+
private cleanup;
|
|
29
30
|
start(container?: SVGSVGElement): void;
|
|
30
31
|
stop(): void;
|
|
31
32
|
startPath(x: number, y: number): void;
|
|
@@ -22,6 +22,8 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
22
22
|
[groupId: string]: boolean;
|
|
23
23
|
} | undefined;
|
|
24
24
|
selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
|
|
25
|
+
isBindingEnabled?: boolean | undefined;
|
|
26
|
+
isMidpointSnappingEnabled?: boolean | undefined;
|
|
25
27
|
zenModeEnabled?: boolean | undefined;
|
|
26
28
|
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
27
29
|
exportScale?: number | undefined;
|
|
@@ -29,6 +31,8 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
29
31
|
bindMode?: import("@excalidraw/element/types").BindMode | undefined;
|
|
30
32
|
gridSize?: number | undefined;
|
|
31
33
|
showWelcomeScreen?: boolean | undefined;
|
|
34
|
+
boxSelectionMode?: import("./types").BoxSelectionMode | undefined;
|
|
35
|
+
bindingPreference?: "enabled" | "disabled" | undefined;
|
|
32
36
|
preferredSelectionTool?: {
|
|
33
37
|
type: "selection" | "lasso";
|
|
34
38
|
initialized: boolean;
|
|
@@ -41,9 +45,10 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
41
45
|
currentItemStrokeColor?: string | undefined;
|
|
42
46
|
currentItemBackgroundColor?: string | undefined;
|
|
43
47
|
currentItemFillStyle?: import("@excalidraw/element/types").FillStyle | undefined;
|
|
44
|
-
|
|
48
|
+
currentItemStrokeWidthKey?: import("@excalidraw/common").StrokeWidthKey | undefined;
|
|
45
49
|
currentItemStrokeStyle?: import("@excalidraw/element/types").StrokeStyle | undefined;
|
|
46
50
|
currentItemRoughness?: number | undefined;
|
|
51
|
+
currentItemStrokeVariability?: import("@excalidraw/element/types").StrokeVariability | undefined;
|
|
47
52
|
currentItemOpacity?: number | undefined;
|
|
48
53
|
currentItemFontFamily?: number | undefined;
|
|
49
54
|
currentItemFontSize?: number | undefined;
|
|
@@ -69,7 +74,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
69
74
|
open: boolean;
|
|
70
75
|
panels: number;
|
|
71
76
|
} | undefined;
|
|
72
|
-
currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
|
|
73
77
|
objectsSnapModeEnabled?: boolean | undefined;
|
|
74
78
|
lockedMultiSelections?: {
|
|
75
79
|
[groupId: string]: true;
|