@myoc/element 0.19.502-d9d5eeb32 → 0.19.503
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 +6129 -4939
- package/dist/dev/index.js.map +4 -4
- package/dist/prod/index.js +13 -12
- package/dist/types/common/debug.d.ts +21 -0
- package/dist/types/common/src/appEventBus.d.ts +27 -0
- package/dist/types/common/src/colors.d.ts +1 -1
- package/dist/types/common/src/constants.d.ts +3 -0
- package/dist/types/common/src/index.d.ts +3 -0
- package/dist/types/common/src/utils.d.ts +4 -7
- package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
- package/dist/types/element/src/Scene.d.ts +2 -0
- package/dist/types/element/src/arrowheads.d.ts +3 -0
- package/dist/types/element/src/arrows/focus.d.ts +27 -0
- package/dist/types/element/src/arrows/helpers.d.ts +5 -0
- package/dist/types/element/src/binding.d.ts +13 -8
- package/dist/types/element/src/bounds.d.ts +1 -1
- package/dist/types/element/src/collision.d.ts +4 -3
- package/dist/types/element/src/distribute.d.ts +2 -1
- package/dist/types/element/src/elbowArrow.d.ts +2 -0
- package/dist/types/element/src/index.d.ts +3 -0
- package/dist/types/element/src/linearElementEditor.d.ts +5 -0
- package/dist/types/element/src/mutateElement.d.ts +2 -0
- package/dist/types/element/src/selection.d.ts +5 -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/types.d.ts +5 -2
- package/dist/types/element/src/utils.d.ts +5 -3
- package/dist/types/element/src/zindex.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +38 -35
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +27 -25
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +143 -132
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +26 -24
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +41 -36
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +9 -12
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +26 -24
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionExport.d.ts +75 -368
- package/dist/types/excalidraw/actions/actionFrame.d.ts +52 -48
- package/dist/types/excalidraw/actions/actionGroup.d.ts +27 -25
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +15 -12
- package/dist/types/excalidraw/actions/actionLink.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionMenu.d.ts +9 -12
- package/dist/types/excalidraw/actions/actionProperties.d.ts +28 -26
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionStyles.d.ts +13 -11
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +181 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +181 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +9 -12
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +13 -12
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +13 -12
- package/dist/types/excalidraw/actions/index.d.ts +2 -0
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +9 -7
- 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 +6 -7
- package/dist/types/excalidraw/components/App.d.ts +55 -13
- package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
- package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -1
- package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
- package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
- package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
- package/dist/types/excalidraw/components/Range.d.ts +10 -4
- package/dist/types/excalidraw/components/Toast.d.ts +8 -4
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +30 -17
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +3 -2
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +11 -13
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
- package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
- package/dist/types/excalidraw/components/icons.d.ts +23 -9
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +17 -0
- package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +23 -13
- package/dist/types/excalidraw/data/blob.d.ts +45 -44
- 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 +37 -28
- package/dist/types/excalidraw/data/resave.d.ts +7 -2
- package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
- package/dist/types/excalidraw/index.d.ts +25 -3
- package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
- package/dist/types/excalidraw/types.d.ts +93 -16
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +5 -1
- package/dist/types/math/src/point.d.ts +7 -2
- package/dist/types/math/src/types.d.ts +25 -1
- package/package.json +3 -3
- package/dist/types/excalidraw/charts.d.ts +0 -27
|
@@ -0,0 +1,181 @@
|
|
|
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
|
+
myocSimplifiedMode: boolean;
|
|
20
|
+
dontResizeLimitMBs: number;
|
|
21
|
+
hideMainMenus: boolean;
|
|
22
|
+
wheelZoomsOnDefault?: boolean;
|
|
23
|
+
arrangeConfiguration: {
|
|
24
|
+
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
25
|
+
gap: number;
|
|
26
|
+
};
|
|
27
|
+
normaliseConfiguration: {
|
|
28
|
+
mode: import("../types").NormaliseMode;
|
|
29
|
+
metric: import("../types").NormaliseMetric;
|
|
30
|
+
};
|
|
31
|
+
errorMessage: React.ReactNode;
|
|
32
|
+
activeEmbeddable: {
|
|
33
|
+
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
34
|
+
state: "hover" | "active";
|
|
35
|
+
} | null;
|
|
36
|
+
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
37
|
+
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
38
|
+
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
39
|
+
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
40
|
+
isBindingEnabled: boolean;
|
|
41
|
+
bindingPreference: "enabled" | "disabled";
|
|
42
|
+
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
43
|
+
suggestedBinding: {
|
|
44
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
45
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
46
|
+
} | null;
|
|
47
|
+
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
48
|
+
frameRendering: {
|
|
49
|
+
enabled: boolean;
|
|
50
|
+
name: boolean;
|
|
51
|
+
outline: boolean;
|
|
52
|
+
clip: boolean;
|
|
53
|
+
};
|
|
54
|
+
editingFrame: string | null;
|
|
55
|
+
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
56
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
57
|
+
activeTool: {
|
|
58
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
59
|
+
locked: boolean;
|
|
60
|
+
fromSelection: boolean;
|
|
61
|
+
} & import("../types").ActiveTool;
|
|
62
|
+
preferredSelectionTool: {
|
|
63
|
+
type: "selection" | "lasso";
|
|
64
|
+
initialized: boolean;
|
|
65
|
+
};
|
|
66
|
+
penMode: boolean;
|
|
67
|
+
penDetected: boolean;
|
|
68
|
+
exportBackground: boolean;
|
|
69
|
+
exportEmbedScene: boolean;
|
|
70
|
+
exportWithDarkMode: boolean;
|
|
71
|
+
exportScale: number;
|
|
72
|
+
currentItemStrokeColor: string;
|
|
73
|
+
currentItemBackgroundColor: string;
|
|
74
|
+
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
75
|
+
currentItemStrokeWidth: number;
|
|
76
|
+
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
77
|
+
currentItemRoughness: number;
|
|
78
|
+
currentItemOpacity: number;
|
|
79
|
+
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
80
|
+
currentItemFontSize: number;
|
|
81
|
+
currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
|
|
82
|
+
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
83
|
+
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
84
|
+
currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
|
|
85
|
+
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
86
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
87
|
+
viewBackgroundColor: string;
|
|
88
|
+
scrollX: number;
|
|
89
|
+
scrollY: number;
|
|
90
|
+
cursorButton: "up" | "down";
|
|
91
|
+
scrolledOutside: boolean;
|
|
92
|
+
name: string | null;
|
|
93
|
+
isResizing: boolean;
|
|
94
|
+
isRotating: boolean;
|
|
95
|
+
zoom: import("../types").Zoom;
|
|
96
|
+
openMenu: "canvas" | null;
|
|
97
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
98
|
+
openSidebar: {
|
|
99
|
+
name: import("../types").SidebarName;
|
|
100
|
+
tab?: import("../types").SidebarTabName;
|
|
101
|
+
} | null;
|
|
102
|
+
openDialog: null | {
|
|
103
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
104
|
+
} | {
|
|
105
|
+
name: "commandPalette";
|
|
106
|
+
} | {
|
|
107
|
+
name: "settings";
|
|
108
|
+
} | {
|
|
109
|
+
name: "elementLinkSelector";
|
|
110
|
+
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
111
|
+
} | {
|
|
112
|
+
name: "charts";
|
|
113
|
+
data: import("../charts").Spreadsheet;
|
|
114
|
+
rawText: string;
|
|
115
|
+
};
|
|
116
|
+
defaultSidebarDockedPreference: boolean;
|
|
117
|
+
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
118
|
+
selectedElementIds: Readonly<{
|
|
119
|
+
[id: string]: true;
|
|
120
|
+
}>;
|
|
121
|
+
hoveredElementIds: Readonly<{
|
|
122
|
+
[id: string]: true;
|
|
123
|
+
}>;
|
|
124
|
+
previousSelectedElementIds: {
|
|
125
|
+
[id: string]: true;
|
|
126
|
+
};
|
|
127
|
+
selectedElementsAreBeingDragged: boolean;
|
|
128
|
+
shouldCacheIgnoreZoom: boolean;
|
|
129
|
+
toast: {
|
|
130
|
+
message: React.ReactNode;
|
|
131
|
+
closable?: boolean;
|
|
132
|
+
duration?: number;
|
|
133
|
+
} | null;
|
|
134
|
+
zenModeEnabled: boolean;
|
|
135
|
+
theme: import("@excalidraw/element/types").Theme;
|
|
136
|
+
gridSize: number;
|
|
137
|
+
gridStep: number;
|
|
138
|
+
gridModeEnabled: boolean;
|
|
139
|
+
viewModeEnabled: boolean;
|
|
140
|
+
selectedGroupIds: {
|
|
141
|
+
[groupId: string]: boolean;
|
|
142
|
+
};
|
|
143
|
+
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
144
|
+
width: number;
|
|
145
|
+
height: number;
|
|
146
|
+
offsetTop: number;
|
|
147
|
+
offsetLeft: number;
|
|
148
|
+
fileHandle: FileSystemFileHandle | null;
|
|
149
|
+
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
150
|
+
stats: {
|
|
151
|
+
open: boolean;
|
|
152
|
+
panels: number;
|
|
153
|
+
};
|
|
154
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
155
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
156
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
157
|
+
originSnapOffset: {
|
|
158
|
+
x: number;
|
|
159
|
+
y: number;
|
|
160
|
+
} | null;
|
|
161
|
+
objectsSnapModeEnabled: boolean;
|
|
162
|
+
userToFollow: import("../types").UserToFollow | null;
|
|
163
|
+
followedBy: Set<import("../types").SocketId>;
|
|
164
|
+
isCropping: boolean;
|
|
165
|
+
croppingElementId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
166
|
+
searchMatches: Readonly<{
|
|
167
|
+
focusedId: import("@excalidraw/element/types").ExcalidrawElement["id"] | null;
|
|
168
|
+
matches: readonly import("../types").SearchMatch[];
|
|
169
|
+
}> | null;
|
|
170
|
+
activeLockedId: string | null;
|
|
171
|
+
lockedMultiSelections: {
|
|
172
|
+
[groupId: string]: true;
|
|
173
|
+
};
|
|
174
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
175
|
+
};
|
|
176
|
+
captureUpdate: "NEVER";
|
|
177
|
+
};
|
|
178
|
+
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
179
|
+
} & {
|
|
180
|
+
keyTest?: undefined;
|
|
181
|
+
};
|
|
@@ -40,8 +40,13 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
40
40
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
41
41
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
42
42
|
isBindingEnabled: boolean;
|
|
43
|
+
bindingPreference: "enabled" | "disabled";
|
|
44
|
+
isMidpointSnappingEnabled: boolean;
|
|
43
45
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
44
|
-
suggestedBinding:
|
|
46
|
+
suggestedBinding: {
|
|
47
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
48
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
49
|
+
} | null;
|
|
45
50
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
46
51
|
frameRendering: {
|
|
47
52
|
enabled: boolean;
|
|
@@ -51,7 +56,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
51
56
|
};
|
|
52
57
|
editingFrame: string | null;
|
|
53
58
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
54
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
59
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
55
60
|
activeTool: {
|
|
56
61
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
57
62
|
locked: boolean;
|
|
@@ -106,6 +111,10 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
106
111
|
} | {
|
|
107
112
|
name: "elementLinkSelector";
|
|
108
113
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
114
|
+
} | {
|
|
115
|
+
name: "charts";
|
|
116
|
+
data: import("../charts").Spreadsheet;
|
|
117
|
+
rawText: string;
|
|
109
118
|
};
|
|
110
119
|
defaultSidebarDockedPreference: boolean;
|
|
111
120
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -121,7 +130,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
121
130
|
selectedElementsAreBeingDragged: boolean;
|
|
122
131
|
shouldCacheIgnoreZoom: boolean;
|
|
123
132
|
toast: {
|
|
124
|
-
message:
|
|
133
|
+
message: React.ReactNode;
|
|
125
134
|
closable?: boolean;
|
|
126
135
|
duration?: number;
|
|
127
136
|
} | null;
|
|
@@ -138,20 +147,12 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
138
147
|
height: number;
|
|
139
148
|
offsetTop: number;
|
|
140
149
|
offsetLeft: number;
|
|
141
|
-
fileHandle:
|
|
150
|
+
fileHandle: FileSystemFileHandle | null;
|
|
142
151
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
143
152
|
stats: {
|
|
144
153
|
open: boolean;
|
|
145
154
|
panels: number;
|
|
146
155
|
};
|
|
147
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
148
|
-
pasteDialog: {
|
|
149
|
-
shown: false;
|
|
150
|
-
data: null;
|
|
151
|
-
} | {
|
|
152
|
-
shown: true;
|
|
153
|
-
data: import("../charts").Spreadsheet;
|
|
154
|
-
};
|
|
155
156
|
showHyperlinkPopup: false | "info" | "editor";
|
|
156
157
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
157
158
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -46,8 +46,13 @@ export declare const actionToggleSearchMenu: {
|
|
|
46
46
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
47
47
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
48
48
|
isBindingEnabled: boolean;
|
|
49
|
+
bindingPreference: "enabled" | "disabled";
|
|
50
|
+
isMidpointSnappingEnabled: boolean;
|
|
49
51
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
50
|
-
suggestedBinding:
|
|
52
|
+
suggestedBinding: {
|
|
53
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
54
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
55
|
+
} | null;
|
|
51
56
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
52
57
|
frameRendering: {
|
|
53
58
|
enabled: boolean;
|
|
@@ -57,7 +62,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
57
62
|
};
|
|
58
63
|
editingFrame: string | null;
|
|
59
64
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
60
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
65
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
61
66
|
activeTool: {
|
|
62
67
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
63
68
|
locked: boolean;
|
|
@@ -113,7 +118,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
113
118
|
selectedElementsAreBeingDragged: boolean;
|
|
114
119
|
shouldCacheIgnoreZoom: boolean;
|
|
115
120
|
toast: {
|
|
116
|
-
message:
|
|
121
|
+
message: React.ReactNode;
|
|
117
122
|
closable?: boolean;
|
|
118
123
|
duration?: number;
|
|
119
124
|
} | null;
|
|
@@ -131,20 +136,12 @@ export declare const actionToggleSearchMenu: {
|
|
|
131
136
|
height: number;
|
|
132
137
|
offsetTop: number;
|
|
133
138
|
offsetLeft: number;
|
|
134
|
-
fileHandle:
|
|
139
|
+
fileHandle: FileSystemFileHandle | null;
|
|
135
140
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
136
141
|
stats: {
|
|
137
142
|
open: boolean;
|
|
138
143
|
panels: number;
|
|
139
144
|
};
|
|
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
145
|
showHyperlinkPopup: false | "info" | "editor";
|
|
149
146
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
150
147
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -42,8 +42,13 @@ export declare const actionToggleStats: {
|
|
|
42
42
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
43
43
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
44
44
|
isBindingEnabled: boolean;
|
|
45
|
+
bindingPreference: "enabled" | "disabled";
|
|
46
|
+
isMidpointSnappingEnabled: boolean;
|
|
45
47
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
46
|
-
suggestedBinding:
|
|
48
|
+
suggestedBinding: {
|
|
49
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
50
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
51
|
+
} | null;
|
|
47
52
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
48
53
|
frameRendering: {
|
|
49
54
|
enabled: boolean;
|
|
@@ -53,7 +58,7 @@ export declare const actionToggleStats: {
|
|
|
53
58
|
};
|
|
54
59
|
editingFrame: string | null;
|
|
55
60
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
56
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
61
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
57
62
|
activeTool: {
|
|
58
63
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
59
64
|
locked: boolean;
|
|
@@ -108,6 +113,10 @@ export declare const actionToggleStats: {
|
|
|
108
113
|
} | {
|
|
109
114
|
name: "elementLinkSelector";
|
|
110
115
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
116
|
+
} | {
|
|
117
|
+
name: "charts";
|
|
118
|
+
data: import("../charts").Spreadsheet;
|
|
119
|
+
rawText: string;
|
|
111
120
|
};
|
|
112
121
|
defaultSidebarDockedPreference: boolean;
|
|
113
122
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -123,7 +132,7 @@ export declare const actionToggleStats: {
|
|
|
123
132
|
selectedElementsAreBeingDragged: boolean;
|
|
124
133
|
shouldCacheIgnoreZoom: boolean;
|
|
125
134
|
toast: {
|
|
126
|
-
message:
|
|
135
|
+
message: React.ReactNode;
|
|
127
136
|
closable?: boolean;
|
|
128
137
|
duration?: number;
|
|
129
138
|
} | null;
|
|
@@ -141,16 +150,8 @@ export declare const actionToggleStats: {
|
|
|
141
150
|
height: number;
|
|
142
151
|
offsetTop: number;
|
|
143
152
|
offsetLeft: number;
|
|
144
|
-
fileHandle:
|
|
153
|
+
fileHandle: FileSystemFileHandle | null;
|
|
145
154
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
146
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
147
|
-
pasteDialog: {
|
|
148
|
-
shown: false;
|
|
149
|
-
data: null;
|
|
150
|
-
} | {
|
|
151
|
-
shown: true;
|
|
152
|
-
data: import("../charts").Spreadsheet;
|
|
153
|
-
};
|
|
154
155
|
showHyperlinkPopup: false | "info" | "editor";
|
|
155
156
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
156
157
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -39,8 +39,13 @@ export declare const actionToggleViewMode: {
|
|
|
39
39
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
40
40
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
41
41
|
isBindingEnabled: boolean;
|
|
42
|
+
bindingPreference: "enabled" | "disabled";
|
|
43
|
+
isMidpointSnappingEnabled: boolean;
|
|
42
44
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
43
|
-
suggestedBinding:
|
|
45
|
+
suggestedBinding: {
|
|
46
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
47
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
48
|
+
} | null;
|
|
44
49
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
45
50
|
frameRendering: {
|
|
46
51
|
enabled: boolean;
|
|
@@ -50,7 +55,7 @@ export declare const actionToggleViewMode: {
|
|
|
50
55
|
};
|
|
51
56
|
editingFrame: string | null;
|
|
52
57
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
53
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
58
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
54
59
|
activeTool: {
|
|
55
60
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
56
61
|
locked: boolean;
|
|
@@ -105,6 +110,10 @@ export declare const actionToggleViewMode: {
|
|
|
105
110
|
} | {
|
|
106
111
|
name: "elementLinkSelector";
|
|
107
112
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
113
|
+
} | {
|
|
114
|
+
name: "charts";
|
|
115
|
+
data: import("../charts").Spreadsheet;
|
|
116
|
+
rawText: string;
|
|
108
117
|
};
|
|
109
118
|
defaultSidebarDockedPreference: boolean;
|
|
110
119
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -120,7 +129,7 @@ export declare const actionToggleViewMode: {
|
|
|
120
129
|
selectedElementsAreBeingDragged: boolean;
|
|
121
130
|
shouldCacheIgnoreZoom: boolean;
|
|
122
131
|
toast: {
|
|
123
|
-
message:
|
|
132
|
+
message: React.ReactNode;
|
|
124
133
|
closable?: boolean;
|
|
125
134
|
duration?: number;
|
|
126
135
|
} | null;
|
|
@@ -137,20 +146,12 @@ export declare const actionToggleViewMode: {
|
|
|
137
146
|
height: number;
|
|
138
147
|
offsetTop: number;
|
|
139
148
|
offsetLeft: number;
|
|
140
|
-
fileHandle:
|
|
149
|
+
fileHandle: FileSystemFileHandle | null;
|
|
141
150
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
142
151
|
stats: {
|
|
143
152
|
open: boolean;
|
|
144
153
|
panels: number;
|
|
145
154
|
};
|
|
146
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
147
|
-
pasteDialog: {
|
|
148
|
-
shown: false;
|
|
149
|
-
data: null;
|
|
150
|
-
} | {
|
|
151
|
-
shown: true;
|
|
152
|
-
data: import("../charts").Spreadsheet;
|
|
153
|
-
};
|
|
154
155
|
showHyperlinkPopup: false | "info" | "editor";
|
|
155
156
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
156
157
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -39,8 +39,13 @@ export declare const actionToggleZenMode: {
|
|
|
39
39
|
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
40
40
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
41
41
|
isBindingEnabled: boolean;
|
|
42
|
+
bindingPreference: "enabled" | "disabled";
|
|
43
|
+
isMidpointSnappingEnabled: boolean;
|
|
42
44
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
43
|
-
suggestedBinding:
|
|
45
|
+
suggestedBinding: {
|
|
46
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
47
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
48
|
+
} | null;
|
|
44
49
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
45
50
|
frameRendering: {
|
|
46
51
|
enabled: boolean;
|
|
@@ -50,7 +55,7 @@ export declare const actionToggleZenMode: {
|
|
|
50
55
|
};
|
|
51
56
|
editingFrame: string | null;
|
|
52
57
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
53
|
-
editingTextElement: import("@excalidraw/element/types").
|
|
58
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
54
59
|
activeTool: {
|
|
55
60
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
56
61
|
locked: boolean;
|
|
@@ -105,6 +110,10 @@ export declare const actionToggleZenMode: {
|
|
|
105
110
|
} | {
|
|
106
111
|
name: "elementLinkSelector";
|
|
107
112
|
sourceElementId: import("@excalidraw/element/types").ExcalidrawElement["id"];
|
|
113
|
+
} | {
|
|
114
|
+
name: "charts";
|
|
115
|
+
data: import("../charts").Spreadsheet;
|
|
116
|
+
rawText: string;
|
|
108
117
|
};
|
|
109
118
|
defaultSidebarDockedPreference: boolean;
|
|
110
119
|
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
@@ -120,7 +129,7 @@ export declare const actionToggleZenMode: {
|
|
|
120
129
|
selectedElementsAreBeingDragged: boolean;
|
|
121
130
|
shouldCacheIgnoreZoom: boolean;
|
|
122
131
|
toast: {
|
|
123
|
-
message:
|
|
132
|
+
message: React.ReactNode;
|
|
124
133
|
closable?: boolean;
|
|
125
134
|
duration?: number;
|
|
126
135
|
} | null;
|
|
@@ -137,20 +146,12 @@ export declare const actionToggleZenMode: {
|
|
|
137
146
|
height: number;
|
|
138
147
|
offsetTop: number;
|
|
139
148
|
offsetLeft: number;
|
|
140
|
-
fileHandle:
|
|
149
|
+
fileHandle: FileSystemFileHandle | null;
|
|
141
150
|
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
142
151
|
stats: {
|
|
143
152
|
open: boolean;
|
|
144
153
|
panels: number;
|
|
145
154
|
};
|
|
146
|
-
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
147
|
-
pasteDialog: {
|
|
148
|
-
shown: false;
|
|
149
|
-
data: null;
|
|
150
|
-
} | {
|
|
151
|
-
shown: true;
|
|
152
|
-
data: import("../charts").Spreadsheet;
|
|
153
|
-
};
|
|
154
155
|
showHyperlinkPopup: false | "info" | "editor";
|
|
155
156
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
156
157
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
@@ -21,6 +21,8 @@ export { actionCopy, actionCut, actionCopyAsPng, actionCopyAsSvg, copyText, } fr
|
|
|
21
21
|
export { actionToggleGridMode } from "./actionToggleGridMode";
|
|
22
22
|
export { actionToggleZenMode } from "./actionToggleZenMode";
|
|
23
23
|
export { actionToggleObjectsSnapMode } from "./actionToggleObjectsSnapMode";
|
|
24
|
+
export { actionToggleArrowBinding } from "./actionToggleArrowBinding";
|
|
25
|
+
export { actionToggleMidpointSnapping } from "./actionToggleMidpointSnapping";
|
|
24
26
|
export { actionToggleStats } from "./actionToggleStats";
|
|
25
27
|
export { actionUnbindText, actionBindText } from "./actionBoundText";
|
|
26
28
|
export { actionLink } from "./actionLink";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SubtypeOf } from "@excalidraw/common/utility-types";
|
|
2
2
|
import type { ActionName } from "./types";
|
|
3
|
-
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame" | "arrangeElements"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu";
|
|
3
|
+
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame" | "arrangeElements"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu" | "toolLock";
|
|
4
4
|
export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
|
|
@@ -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" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "arrangeElements" | "normaliseElements" | "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" | "smartZoom" | "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" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "arrangeElements" | "normaliseElements" | "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" | "smartZoom" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
18
18
|
export type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: AppState;
|
|
@@ -13,13 +13,21 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
13
13
|
selectedElementIds?: Readonly<{
|
|
14
14
|
[id: string]: true;
|
|
15
15
|
}> | undefined;
|
|
16
|
+
activeTool?: ({
|
|
17
|
+
lastActiveTool: import("./types").ActiveTool | null;
|
|
18
|
+
locked: boolean;
|
|
19
|
+
fromSelection: boolean;
|
|
20
|
+
} & import("./types").ActiveTool) | undefined;
|
|
16
21
|
selectedGroupIds?: {
|
|
17
22
|
[groupId: string]: boolean;
|
|
18
23
|
} | undefined;
|
|
19
24
|
selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
|
|
25
|
+
isBindingEnabled?: boolean | undefined;
|
|
26
|
+
isMidpointSnappingEnabled?: boolean | undefined;
|
|
20
27
|
zenModeEnabled?: boolean | undefined;
|
|
21
28
|
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
22
29
|
exportScale?: number | undefined;
|
|
30
|
+
currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
|
|
23
31
|
bindMode?: import("@excalidraw/element/types").BindMode | undefined;
|
|
24
32
|
gridSize?: number | undefined;
|
|
25
33
|
showWelcomeScreen?: boolean | undefined;
|
|
@@ -35,11 +43,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
35
43
|
mode: import("./types").NormaliseMode;
|
|
36
44
|
metric: import("./types").NormaliseMetric;
|
|
37
45
|
} | undefined;
|
|
38
|
-
|
|
39
|
-
lastActiveTool: import("./types").ActiveTool | null;
|
|
40
|
-
locked: boolean;
|
|
41
|
-
fromSelection: boolean;
|
|
42
|
-
} & import("./types").ActiveTool) | undefined;
|
|
46
|
+
bindingPreference?: "enabled" | "disabled" | undefined;
|
|
43
47
|
preferredSelectionTool?: {
|
|
44
48
|
type: "selection" | "lasso";
|
|
45
49
|
initialized: boolean;
|
|
@@ -62,7 +66,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
62
66
|
currentItemStartArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
|
|
63
67
|
currentItemEndArrowhead?: import("@excalidraw/element/types").Arrowhead | null | undefined;
|
|
64
68
|
currentItemRoundness?: import("@excalidraw/element/types").StrokeRoundness | undefined;
|
|
65
|
-
currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
|
|
66
69
|
cursorButton?: "up" | "down" | undefined;
|
|
67
70
|
scrolledOutside?: boolean | undefined;
|
|
68
71
|
openMenu?: "canvas" | null | undefined;
|
|
@@ -81,7 +84,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
81
84
|
open: boolean;
|
|
82
85
|
panels: number;
|
|
83
86
|
} | undefined;
|
|
84
|
-
currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
|
|
85
87
|
objectsSnapModeEnabled?: boolean | undefined;
|
|
86
88
|
lockedMultiSelections?: {
|
|
87
89
|
[groupId: string]: true;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Radians } from "@excalidraw/math";
|
|
2
|
+
export declare const CARTESIAN_BASE_SLOT_WIDTH = 44;
|
|
3
|
+
export declare const CARTESIAN_BAR_SLOT_EXTRA_PER_SERIES = 22;
|
|
4
|
+
export declare const CARTESIAN_BAR_SLOT_EXTRA_MAX = 66;
|
|
5
|
+
export declare const CARTESIAN_LINE_SLOT_WIDTH = 48;
|
|
6
|
+
export declare const CARTESIAN_GAP = 14;
|
|
7
|
+
export declare const CARTESIAN_BAR_HEIGHT = 304;
|
|
8
|
+
export declare const CARTESIAN_LINE_HEIGHT = 320;
|
|
9
|
+
export declare const CARTESIAN_LABEL_ROTATION: Radians;
|
|
10
|
+
export declare const CARTESIAN_LABEL_MIN_WIDTH = 28;
|
|
11
|
+
export declare const CARTESIAN_LABEL_SLOT_PADDING = 4;
|
|
12
|
+
export declare const CARTESIAN_LABEL_AXIS_CLEARANCE = 2;
|
|
13
|
+
export declare const CARTESIAN_LABEL_MAX_WIDTH_BUFFER = 10;
|
|
14
|
+
export declare const CARTESIAN_LABEL_ROTATED_WIDTH_BUFFER = 10;
|
|
15
|
+
export declare const CARTESIAN_LABEL_OVERFLOW_PREFERENCE_BUFFER = 8;
|
|
16
|
+
export declare const BAR_GAP = 12;
|
|
17
|
+
export declare const BAR_HEIGHT = 256;
|
|
18
|
+
export declare const GRID_OPACITY = 10;
|
|
19
|
+
export declare const RADAR_GRID_LEVELS = 4;
|
|
20
|
+
export declare const RADAR_LABEL_OFFSET: number;
|
|
21
|
+
export declare const RADAR_PADDING: number;
|
|
22
|
+
export declare const RADAR_SINGLE_SERIES_LOG_SCALE_THRESHOLD = 100;
|
|
23
|
+
export declare const RADAR_AXIS_LABEL_MAX_WIDTH = 140;
|
|
24
|
+
export declare const RADAR_AXIS_LABEL_ALIGNMENT_THRESHOLD = 0.35;
|
|
25
|
+
export declare const RADAR_AXIS_LABEL_CLEARANCE: number;
|
|
26
|
+
export declare const RADAR_LEGEND_SWATCH_SIZE = 20;
|
|
27
|
+
export declare const RADAR_LEGEND_ITEM_GAP: number;
|
|
28
|
+
export declare const RADAR_LEGEND_TEXT_GAP = 12;
|
|
29
|
+
export declare const commonProps: {
|
|
30
|
+
readonly fillStyle: "hachure";
|
|
31
|
+
readonly fontFamily: number;
|
|
32
|
+
readonly fontSize: 20;
|
|
33
|
+
readonly opacity: 100;
|
|
34
|
+
readonly roughness: 1;
|
|
35
|
+
readonly strokeColor: "#1e1e1e";
|
|
36
|
+
readonly roundness: null;
|
|
37
|
+
readonly strokeStyle: "solid";
|
|
38
|
+
readonly strokeWidth: 1;
|
|
39
|
+
readonly verticalAlign: string;
|
|
40
|
+
readonly locked: false;
|
|
41
|
+
};
|
|
42
|
+
export type CartesianChartType = "bar" | "line";
|
|
43
|
+
export type CartesianChartLayout = {
|
|
44
|
+
slotWidth: number;
|
|
45
|
+
gap: number;
|
|
46
|
+
chartHeight: number;
|
|
47
|
+
xLabelMaxWidth: number;
|
|
48
|
+
};
|