@zsviczian/excalidraw 0.18.0-41 → 0.18.0-42
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 +138 -61
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +0 -2
- package/dist/styles.development.css +522 -205
- package/dist/styles.production.css +18 -16
- package/package.json +1 -1
- package/types/common/src/constants.d.ts +5 -1
- package/types/common/src/utils.d.ts +0 -1
- package/types/element/src/transformHandles.d.ts +1 -1
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +15 -3
- package/types/excalidraw/actions/actionBoundText.d.ts +10 -2
- package/types/excalidraw/actions/actionCanvas.d.ts +75 -15
- package/types/excalidraw/actions/actionClipboard.d.ts +30 -6
- package/types/excalidraw/actions/actionCropEditor.d.ts +5 -1
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +15 -3
- package/types/excalidraw/actions/actionElementLink.d.ts +5 -1
- package/types/excalidraw/actions/actionElementLock.d.ts +10 -2
- package/types/excalidraw/actions/actionEmbeddable.d.ts +5 -1
- package/types/excalidraw/actions/actionExport.d.ts +45 -9
- package/types/excalidraw/actions/actionFinalize.d.ts +15 -3
- package/types/excalidraw/actions/actionFrame.d.ts +20 -4
- package/types/excalidraw/actions/actionGroup.d.ts +10 -2
- package/types/excalidraw/actions/actionLinearEditor.d.ts +5 -1
- package/types/excalidraw/actions/actionLink.d.ts +5 -1
- package/types/excalidraw/actions/actionMenu.d.ts +7 -449
- package/types/excalidraw/actions/actionNavigate.d.ts +10 -2
- package/types/excalidraw/actions/actionProperties.d.ts +81 -17
- package/types/excalidraw/actions/actionSelectAll.d.ts +5 -1
- package/types/excalidraw/actions/actionStyles.d.ts +5 -1
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +5 -1
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +5 -1
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +5 -1
- package/types/excalidraw/actions/actionToggleStats.d.ts +5 -1
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +5 -1
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +5 -1
- package/types/excalidraw/actions/actionTrayMenu.d.ts +227 -0
- package/types/excalidraw/actions/index.d.ts +2 -1
- package/types/excalidraw/actions/types.d.ts +1 -1
- package/types/excalidraw/appState.d.ts +4 -1
- package/types/excalidraw/components/Actions.d.ts +9 -2
- package/types/excalidraw/components/App.d.ts +0 -1
- package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
- package/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
- package/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
- package/types/excalidraw/components/ExcalidrawLogo.d.ts +1 -1
- package/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +2 -1
- package/types/excalidraw/components/LayerUI.d.ts +2 -1
- package/types/excalidraw/components/MobileMenu.d.ts +3 -5
- package/types/excalidraw/components/MobileToolBar.d.ts +10 -0
- package/types/excalidraw/components/Popover.d.ts +2 -1
- package/types/excalidraw/components/Section.d.ts +1 -0
- package/types/excalidraw/components/ToolPopover.d.ts +25 -0
- package/types/excalidraw/components/TrayMenu.d.ts +25 -0
- package/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +4 -2
- package/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +2 -1
- package/types/excalidraw/components/icons.d.ts +0 -1
- package/types/excalidraw/obsidianUtils.d.ts +3 -2
- package/types/excalidraw/shortcut.d.ts +1 -0
- package/types/excalidraw/types.d.ts +7 -2
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
export declare const actionToggleTrayEditMenu: {
|
|
2
|
+
name: "toggleTrayEditMenu";
|
|
3
|
+
label: string;
|
|
4
|
+
trackEvent: {
|
|
5
|
+
category: "menu";
|
|
6
|
+
};
|
|
7
|
+
perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
8
|
+
appState: {
|
|
9
|
+
openMenu: "shape" | null;
|
|
10
|
+
contextMenu: {
|
|
11
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
12
|
+
top: number;
|
|
13
|
+
left: number;
|
|
14
|
+
} | null;
|
|
15
|
+
showWelcomeScreen: boolean;
|
|
16
|
+
isLoading: boolean;
|
|
17
|
+
errorMessage: import("react").ReactNode;
|
|
18
|
+
activeEmbeddable: {
|
|
19
|
+
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
20
|
+
state: "active" | "hover";
|
|
21
|
+
} | null;
|
|
22
|
+
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
23
|
+
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
24
|
+
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
25
|
+
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
26
|
+
isBindingEnabled: boolean;
|
|
27
|
+
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
28
|
+
suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
|
|
29
|
+
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
30
|
+
frameRendering: {
|
|
31
|
+
enabled: boolean;
|
|
32
|
+
name: boolean;
|
|
33
|
+
outline: boolean;
|
|
34
|
+
clip: boolean;
|
|
35
|
+
markerName: boolean;
|
|
36
|
+
markerEnabled: boolean;
|
|
37
|
+
};
|
|
38
|
+
editingFrame: string | null;
|
|
39
|
+
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
40
|
+
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
41
|
+
activeTool: {
|
|
42
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
43
|
+
locked: boolean;
|
|
44
|
+
fromSelection: boolean;
|
|
45
|
+
} & import("../types").ActiveTool;
|
|
46
|
+
preferredSelectionTool: {
|
|
47
|
+
type: "selection" | "lasso";
|
|
48
|
+
initialized: boolean;
|
|
49
|
+
};
|
|
50
|
+
penMode: boolean;
|
|
51
|
+
penDetected: boolean;
|
|
52
|
+
exportBackground: boolean;
|
|
53
|
+
exportEmbedScene: boolean;
|
|
54
|
+
exportWithDarkMode: boolean;
|
|
55
|
+
exportScale: number;
|
|
56
|
+
currentItemStrokeColor: string;
|
|
57
|
+
currentItemBackgroundColor: string;
|
|
58
|
+
currentItemFillStyle: import("@excalidraw/element/types").FillStyle;
|
|
59
|
+
currentItemStrokeWidth: number;
|
|
60
|
+
currentItemStrokeStyle: import("@excalidraw/element/types").StrokeStyle;
|
|
61
|
+
currentItemRoughness: number;
|
|
62
|
+
currentItemOpacity: number;
|
|
63
|
+
currentItemFontFamily: number;
|
|
64
|
+
currentItemFontSize: number;
|
|
65
|
+
currentItemTextAlign: string;
|
|
66
|
+
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
67
|
+
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
68
|
+
currentHoveredFontFamily: number | null;
|
|
69
|
+
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
70
|
+
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
71
|
+
currentItemFrameRole: ("marker" | null) | undefined;
|
|
72
|
+
viewBackgroundColor: string;
|
|
73
|
+
scrollX: number;
|
|
74
|
+
scrollY: number;
|
|
75
|
+
cursorButton: "up" | "down";
|
|
76
|
+
scrolledOutside: boolean;
|
|
77
|
+
name: string | null;
|
|
78
|
+
isResizing: boolean;
|
|
79
|
+
isRotating: boolean;
|
|
80
|
+
zoom: Readonly<{
|
|
81
|
+
value: import("../types").NormalizedZoomValue;
|
|
82
|
+
}>;
|
|
83
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
84
|
+
openSidebar: {
|
|
85
|
+
name: string;
|
|
86
|
+
tab?: string | undefined;
|
|
87
|
+
} | null;
|
|
88
|
+
openDialog: {
|
|
89
|
+
name: "help" | "imageExport" | "jsonExport";
|
|
90
|
+
} | {
|
|
91
|
+
name: "ttd";
|
|
92
|
+
tab: "mermaid" | "text-to-diagram";
|
|
93
|
+
} | {
|
|
94
|
+
name: "commandPalette";
|
|
95
|
+
} | {
|
|
96
|
+
name: "elementLinkSelector";
|
|
97
|
+
sourceElementId: string;
|
|
98
|
+
} | null;
|
|
99
|
+
defaultSidebarDockedPreference: boolean;
|
|
100
|
+
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
101
|
+
selectedElementIds: Readonly<{
|
|
102
|
+
[id: string]: true;
|
|
103
|
+
}>;
|
|
104
|
+
hoveredElementIds: Readonly<{
|
|
105
|
+
[id: string]: true;
|
|
106
|
+
}>;
|
|
107
|
+
previousSelectedElementIds: {
|
|
108
|
+
[id: string]: true;
|
|
109
|
+
};
|
|
110
|
+
selectedElementsAreBeingDragged: boolean;
|
|
111
|
+
shouldCacheIgnoreZoom: boolean;
|
|
112
|
+
toast: {
|
|
113
|
+
message: string;
|
|
114
|
+
closable?: boolean | undefined;
|
|
115
|
+
duration?: number | undefined;
|
|
116
|
+
} | null;
|
|
117
|
+
zenModeEnabled: boolean;
|
|
118
|
+
theme: import("@excalidraw/element/types").Theme;
|
|
119
|
+
gridSize: number;
|
|
120
|
+
gridStep: number;
|
|
121
|
+
gridModeEnabled: boolean;
|
|
122
|
+
viewModeEnabled: boolean;
|
|
123
|
+
selectedGroupIds: {
|
|
124
|
+
[groupId: string]: boolean;
|
|
125
|
+
};
|
|
126
|
+
editingGroupId: string | null;
|
|
127
|
+
width: number;
|
|
128
|
+
height: number;
|
|
129
|
+
offsetTop: number;
|
|
130
|
+
offsetLeft: number;
|
|
131
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
132
|
+
collaborators: Map<import("../types").SocketId, Readonly<{
|
|
133
|
+
pointer?: import("../types").CollaboratorPointer | undefined;
|
|
134
|
+
button?: "up" | "down" | undefined;
|
|
135
|
+
selectedElementIds?: Readonly<{
|
|
136
|
+
[id: string]: true;
|
|
137
|
+
}> | undefined;
|
|
138
|
+
username?: string | null | undefined;
|
|
139
|
+
userState?: import("@excalidraw/common").UserIdleState | undefined;
|
|
140
|
+
color?: {
|
|
141
|
+
background: string;
|
|
142
|
+
stroke: string;
|
|
143
|
+
} | undefined;
|
|
144
|
+
avatarUrl?: string | undefined;
|
|
145
|
+
id?: string | undefined;
|
|
146
|
+
socketId?: import("../types").SocketId | undefined;
|
|
147
|
+
isCurrentUser?: boolean | undefined;
|
|
148
|
+
isInCall?: boolean | undefined;
|
|
149
|
+
isSpeaking?: boolean | undefined;
|
|
150
|
+
isMuted?: boolean | undefined;
|
|
151
|
+
}>>;
|
|
152
|
+
stats: {
|
|
153
|
+
open: boolean;
|
|
154
|
+
panels: number;
|
|
155
|
+
};
|
|
156
|
+
currentChartType: import("@excalidraw/element/types").ChartType;
|
|
157
|
+
pasteDialog: {
|
|
158
|
+
shown: false;
|
|
159
|
+
data: null;
|
|
160
|
+
} | {
|
|
161
|
+
shown: true;
|
|
162
|
+
data: import("../charts").Spreadsheet;
|
|
163
|
+
};
|
|
164
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
165
|
+
linkOpacity: number;
|
|
166
|
+
trayModeEnabled: boolean;
|
|
167
|
+
colorPalette?: {
|
|
168
|
+
canvasBackground: import("@excalidraw/common").ColorPaletteCustom;
|
|
169
|
+
elementBackground: import("@excalidraw/common").ColorPaletteCustom;
|
|
170
|
+
elementStroke: import("@excalidraw/common").ColorPaletteCustom;
|
|
171
|
+
topPicks: {
|
|
172
|
+
canvasBackground: [string, string, string, string, string];
|
|
173
|
+
elementStroke: [string, string, string, string, string];
|
|
174
|
+
elementBackground: [string, string, string, string, string];
|
|
175
|
+
};
|
|
176
|
+
} | undefined;
|
|
177
|
+
allowWheelZoom?: boolean | undefined;
|
|
178
|
+
allowPinchZoom?: boolean | undefined;
|
|
179
|
+
pinnedScripts?: string[] | undefined;
|
|
180
|
+
customPens?: any[] | undefined;
|
|
181
|
+
currentStrokeOptions?: any;
|
|
182
|
+
resetCustomPen?: any;
|
|
183
|
+
gridColor: {
|
|
184
|
+
Bold: string;
|
|
185
|
+
Regular: string;
|
|
186
|
+
};
|
|
187
|
+
gridDirection: {
|
|
188
|
+
horizontal: boolean;
|
|
189
|
+
vertical: boolean;
|
|
190
|
+
};
|
|
191
|
+
highlightSearchResult: boolean;
|
|
192
|
+
dynamicStyle: {
|
|
193
|
+
[x: string]: string;
|
|
194
|
+
};
|
|
195
|
+
frameColor: {
|
|
196
|
+
stroke: string;
|
|
197
|
+
fill: string;
|
|
198
|
+
nameColor: string;
|
|
199
|
+
};
|
|
200
|
+
invertBindingBehaviour: boolean;
|
|
201
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
202
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
203
|
+
originSnapOffset: {
|
|
204
|
+
x: number;
|
|
205
|
+
y: number;
|
|
206
|
+
} | null;
|
|
207
|
+
objectsSnapModeEnabled: boolean;
|
|
208
|
+
userToFollow: import("../types").UserToFollow | null;
|
|
209
|
+
followedBy: Set<import("../types").SocketId>;
|
|
210
|
+
isCropping: boolean;
|
|
211
|
+
croppingElementId: string | null;
|
|
212
|
+
searchMatches: Readonly<{
|
|
213
|
+
focusedId: string | null;
|
|
214
|
+
matches: readonly import("../types").SearchMatch[];
|
|
215
|
+
}> | null;
|
|
216
|
+
activeLockedId: string | null;
|
|
217
|
+
lockedMultiSelections: {
|
|
218
|
+
[groupId: string]: true;
|
|
219
|
+
};
|
|
220
|
+
stylesPanelMode: "compact" | "full" | "mobile" | "tray";
|
|
221
|
+
};
|
|
222
|
+
captureUpdate: "EVENTUALLY";
|
|
223
|
+
};
|
|
224
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
225
|
+
} & {
|
|
226
|
+
keyTest?: undefined;
|
|
227
|
+
};
|
|
@@ -9,7 +9,8 @@ export { actionFinalize } from "./actionFinalize";
|
|
|
9
9
|
export { actionChangeProjectName, actionChangeExportBackground, actionSaveToActiveFile, actionSaveFileToDisk, actionLoadScene, } from "./actionExport";
|
|
10
10
|
export { actionToggleFrameRole } from "./actionProperties";
|
|
11
11
|
export { actionCopyStyles, actionPasteStyles } from "./actionStyles";
|
|
12
|
-
export {
|
|
12
|
+
export { actionToggleTrayEditMenu } from "./actionTrayMenu";
|
|
13
|
+
export { actionShortcuts } from "./actionMenu";
|
|
13
14
|
export { actionGroup, actionUngroup } from "./actionGroup";
|
|
14
15
|
export { actionGoToCollaborator } from "./actionNavigate";
|
|
15
16
|
export { actionAddToLibrary } from "./actionAddToLibrary";
|
|
@@ -14,7 +14,7 @@ export type ActionResult = {
|
|
|
14
14
|
type ActionFn = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, 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" | "
|
|
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" | "toggleTrayEditMenu" | "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" | "toggleLaserPointerTool" | "toggleFrameRole" | "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;
|
|
@@ -24,6 +24,10 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
24
24
|
locked: boolean;
|
|
25
25
|
fromSelection: boolean;
|
|
26
26
|
} & import("./types").ActiveTool) | undefined;
|
|
27
|
+
preferredSelectionTool?: {
|
|
28
|
+
type: "selection" | "lasso";
|
|
29
|
+
initialized: boolean;
|
|
30
|
+
} | undefined;
|
|
27
31
|
penMode?: boolean | undefined;
|
|
28
32
|
penDetected?: boolean | undefined;
|
|
29
33
|
exportBackground?: boolean | undefined;
|
|
@@ -70,7 +74,6 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
70
74
|
lockedMultiSelections?: {
|
|
71
75
|
[groupId: string]: true;
|
|
72
76
|
} | undefined;
|
|
73
|
-
stylesPanelMode?: "compact" | "full" | undefined;
|
|
74
77
|
};
|
|
75
78
|
export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
|
|
76
79
|
viewBackgroundColor?: string | undefined;
|
|
@@ -17,9 +17,16 @@ export declare const CompactShapeActions: ({ appState, elementsMap, renderAction
|
|
|
17
17
|
app: AppClassProperties;
|
|
18
18
|
setAppState: React.Component<any, AppState>["setState"];
|
|
19
19
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export declare const
|
|
21
|
-
activeTool: UIAppState["activeTool"];
|
|
20
|
+
export declare const MobileShapeActions: ({ appState, elementsMap, renderAction, app, setAppState, }: {
|
|
22
21
|
appState: UIAppState;
|
|
22
|
+
elementsMap: NonDeletedElementsMap | NonDeletedSceneElementsMap;
|
|
23
|
+
renderAction: ActionManager["renderAction"];
|
|
24
|
+
app: AppClassProperties;
|
|
25
|
+
setAppState: React.Component<any, AppState>["setState"];
|
|
26
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const ShapesSwitcher: ({ activeTool, setAppState, app, UIOptions, }: {
|
|
28
|
+
activeTool: UIAppState["activeTool"];
|
|
29
|
+
setAppState: React.Component<any, AppState>["setState"];
|
|
23
30
|
app: AppClassProperties;
|
|
24
31
|
UIOptions: AppProps["UIOptions"];
|
|
25
32
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -246,7 +246,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
246
246
|
}>]>;
|
|
247
247
|
missingPointerEventCleanupEmitter: Emitter<[event: PointerEvent | null]>;
|
|
248
248
|
onRemoveEventListenersEmitter: Emitter<[]>;
|
|
249
|
-
defaultSelectionTool: "selection" | "lasso";
|
|
250
249
|
constructor(props: AppProps);
|
|
251
250
|
updateEditorAtom: <Value, Args extends unknown[], Result>(atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
|
|
252
251
|
private onWindowMessage;
|
|
@@ -20,5 +20,5 @@ interface ColorPickerProps {
|
|
|
20
20
|
updateData: (formData?: any) => void;
|
|
21
21
|
compactMode?: boolean;
|
|
22
22
|
}
|
|
23
|
-
export declare const ColorPicker: ({ type, color, onChange, label, elements, palette, topPicks, updateData, appState,
|
|
23
|
+
export declare const ColorPicker: ({ type, color, onChange, label, elements, palette, topPicks, updateData, appState, }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
export {};
|
|
@@ -10,8 +10,10 @@ interface PickerProps {
|
|
|
10
10
|
palette: ColorPaletteCustom;
|
|
11
11
|
updateData: (formData?: any) => void;
|
|
12
12
|
children?: React.ReactNode;
|
|
13
|
+
showTitle?: boolean;
|
|
13
14
|
onEyeDropperToggle: (force?: boolean) => void;
|
|
14
15
|
onEscape: (event: React.KeyboardEvent | KeyboardEvent) => void;
|
|
16
|
+
showHotKey?: boolean;
|
|
15
17
|
}
|
|
16
18
|
export declare const Picker: React.ForwardRefExoticComponent<PickerProps & React.RefAttributes<unknown>>;
|
|
17
19
|
export {};
|
|
@@ -4,6 +4,7 @@ interface PickerColorListProps {
|
|
|
4
4
|
color: string | null;
|
|
5
5
|
onChange: (color: string) => void;
|
|
6
6
|
activeShade: number;
|
|
7
|
+
showHotKey?: boolean;
|
|
7
8
|
}
|
|
8
|
-
declare const PickerColorList: ({ palette, color, onChange, activeShade, }: PickerColorListProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const PickerColorList: ({ palette, color, onChange, activeShade, showHotKey, }: PickerColorListProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export default PickerColorList;
|
|
@@ -3,6 +3,7 @@ interface ShadeListProps {
|
|
|
3
3
|
color: string | null;
|
|
4
4
|
onChange: (color: string) => void;
|
|
5
5
|
palette: ColorPaletteCustom;
|
|
6
|
+
showHotKey?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare const ShadeList: ({ color, onChange, palette }: ShadeListProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const ShadeList: ({ color, onChange, palette, showHotKey, }: ShadeListProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -2,6 +2,7 @@ import type { FontFamilyValues } from "@excalidraw/element/types";
|
|
|
2
2
|
interface FontPickerTriggerProps {
|
|
3
3
|
selectedFontFamily: FontFamilyValues | null;
|
|
4
4
|
isOpened?: boolean;
|
|
5
|
+
compactMode?: boolean;
|
|
5
6
|
}
|
|
6
|
-
export declare const FontPickerTrigger: ({ selectedFontFamily, isOpened, }: FontPickerTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const FontPickerTrigger: ({ selectedFontFamily, isOpened, compactMode, }: FontPickerTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -17,6 +17,7 @@ interface LayerUIProps {
|
|
|
17
17
|
onPenModeToggle: AppClassProperties["togglePenMode"];
|
|
18
18
|
showExitZenModeBtn: boolean;
|
|
19
19
|
langCode: Language["code"];
|
|
20
|
+
renderTopLeftUI?: ExcalidrawProps["renderTopLeftUI"];
|
|
20
21
|
renderTopRightUI?: ExcalidrawProps["renderTopRightUI"];
|
|
21
22
|
renderCustomStats?: ExcalidrawProps["renderCustomStats"];
|
|
22
23
|
UIOptions: AppProps["UIOptions"];
|
|
@@ -27,5 +28,5 @@ interface LayerUIProps {
|
|
|
27
28
|
isCollaborating: boolean;
|
|
28
29
|
generateLinkForSelection?: AppProps["generateLinkForSelection"];
|
|
29
30
|
}
|
|
30
|
-
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, elements, canvas, onLockToggle, onHandToolToggle, onPenModeToggle, showExitZenModeBtn, renderTopRightUI, renderCustomStats, UIOptions, onExportImage, renderWelcomeScreen, children, app, isCollaborating, generateLinkForSelection, }: LayerUIProps) => import("react/jsx-runtime").JSX.Element>;
|
|
31
|
+
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, elements, canvas, onLockToggle, onHandToolToggle, onPenModeToggle, showExitZenModeBtn, renderTopLeftUI, renderTopRightUI, renderCustomStats, UIOptions, onExportImage, renderWelcomeScreen, children, app, isCollaborating, generateLinkForSelection, }: LayerUIProps) => import("react/jsx-runtime").JSX.Element>;
|
|
31
32
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
3
3
|
import type { ActionManager } from "../actions/manager";
|
|
4
|
-
import type { AppClassProperties, AppProps, AppState,
|
|
4
|
+
import type { AppClassProperties, AppProps, AppState, UIAppState } from "../types";
|
|
5
5
|
import type { JSX } from "react";
|
|
6
6
|
type MobileMenuProps = {
|
|
7
7
|
appState: UIAppState;
|
|
@@ -10,16 +10,14 @@ type MobileMenuProps = {
|
|
|
10
10
|
renderImageExportDialog: () => React.ReactNode;
|
|
11
11
|
setAppState: React.Component<any, AppState>["setState"];
|
|
12
12
|
elements: readonly NonDeletedExcalidrawElement[];
|
|
13
|
-
onLockToggle: () => void;
|
|
14
13
|
onHandToolToggle: () => void;
|
|
15
14
|
onPenModeToggle: AppClassProperties["togglePenMode"];
|
|
16
15
|
renderTopRightUI?: (isMobile: boolean, appState: UIAppState) => JSX.Element | null;
|
|
17
|
-
|
|
16
|
+
renderTopLeftUI?: (isMobile: boolean, appState: UIAppState) => JSX.Element | null;
|
|
18
17
|
renderSidebars: () => JSX.Element | null;
|
|
19
|
-
device: Device;
|
|
20
18
|
renderWelcomeScreen: boolean;
|
|
21
19
|
UIOptions: AppProps["UIOptions"];
|
|
22
20
|
app: AppClassProperties;
|
|
23
21
|
};
|
|
24
|
-
export declare const MobileMenu: ({ appState, elements, actionManager, setAppState,
|
|
22
|
+
export declare const MobileMenu: ({ appState, elements, actionManager, setAppState, onHandToolToggle, renderTopLeftUI, renderTopRightUI, renderSidebars, renderWelcomeScreen, UIOptions, app, }: MobileMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
23
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "./ToolIcon.scss";
|
|
2
|
+
import "./MobileToolBar.scss";
|
|
3
|
+
import type { AppClassProperties, UIAppState } from "../types";
|
|
4
|
+
type MobileToolBarProps = {
|
|
5
|
+
app: AppClassProperties;
|
|
6
|
+
onHandToolToggle: () => void;
|
|
7
|
+
setAppState: React.Component<any, UIAppState>["setState"];
|
|
8
|
+
};
|
|
9
|
+
export declare const MobileToolBar: ({ app, onHandToolToggle, setAppState, }: MobileToolBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -10,6 +10,7 @@ type Props = {
|
|
|
10
10
|
offsetTop?: number;
|
|
11
11
|
viewportWidth?: number;
|
|
12
12
|
viewportHeight?: number;
|
|
13
|
+
className?: string;
|
|
13
14
|
};
|
|
14
|
-
export declare const Popover: ({ children, left, top, onCloseRequest, fitInViewport, offsetLeft, offsetTop, viewportWidth, viewportHeight, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const Popover: ({ children, left, top, onCloseRequest, fitInViewport, offsetLeft, offsetTop, viewportWidth, viewportHeight, className, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./ToolPopover.scss";
|
|
3
|
+
import type { AppClassProperties } from "../types";
|
|
4
|
+
type ToolOption = {
|
|
5
|
+
type: string;
|
|
6
|
+
icon: React.ReactNode;
|
|
7
|
+
title?: string;
|
|
8
|
+
};
|
|
9
|
+
type ToolPopoverProps = {
|
|
10
|
+
app: AppClassProperties;
|
|
11
|
+
options: readonly ToolOption[];
|
|
12
|
+
activeTool: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
defaultOption: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
namePrefix: string;
|
|
18
|
+
title: string;
|
|
19
|
+
"data-testid": string;
|
|
20
|
+
onToolChange: (type: string) => void;
|
|
21
|
+
displayedOption: ToolOption;
|
|
22
|
+
fillable?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare const ToolPopover: ({ app, options, activeTool, defaultOption, className, namePrefix, title, "data-testid": dataTestId, onToolChange, displayedOption, fillable, }: ToolPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
3
|
+
import type { ActionManager } from "../actions/manager";
|
|
4
|
+
import type { AppClassProperties, AppProps, AppState, Device, ExcalidrawProps, UIAppState } from "../types";
|
|
5
|
+
import type { JSX } from "react";
|
|
6
|
+
type TrayMenuProps = {
|
|
7
|
+
appState: UIAppState;
|
|
8
|
+
actionManager: ActionManager;
|
|
9
|
+
renderJSONExportDialog: () => React.ReactNode;
|
|
10
|
+
renderImageExportDialog: () => React.ReactNode;
|
|
11
|
+
setAppState: React.Component<any, AppState>["setState"];
|
|
12
|
+
elements: readonly NonDeletedExcalidrawElement[];
|
|
13
|
+
onLockToggle: () => void;
|
|
14
|
+
onHandToolToggle: () => void;
|
|
15
|
+
onPenModeToggle: AppClassProperties["togglePenMode"];
|
|
16
|
+
renderTopRightUI?: (isMobile: boolean, appState: UIAppState) => JSX.Element | null;
|
|
17
|
+
renderCustomStats?: ExcalidrawProps["renderCustomStats"];
|
|
18
|
+
renderSidebars: () => JSX.Element | null;
|
|
19
|
+
device: Device;
|
|
20
|
+
renderWelcomeScreen: boolean;
|
|
21
|
+
UIOptions: AppProps["UIOptions"];
|
|
22
|
+
app: AppClassProperties;
|
|
23
|
+
};
|
|
24
|
+
export declare const TrayMenu: ({ appState, elements, actionManager, setAppState, onLockToggle, onHandToolToggle, onPenModeToggle, renderTopRightUI, renderCustomStats, renderSidebars, device, renderWelcomeScreen, UIOptions, app, }: TrayMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./DropdownMenu.scss";
|
|
3
3
|
declare const DropdownMenu: {
|
|
4
|
-
({ children, open, }: {
|
|
4
|
+
({ children, open, placement, }: {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
open: boolean;
|
|
7
|
+
placement?: "top" | "bottom" | undefined;
|
|
7
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
Trigger: {
|
|
9
10
|
({ className, children, onToggle, title, ...rest }: {
|
|
@@ -15,12 +16,13 @@ declare const DropdownMenu: {
|
|
|
15
16
|
displayName: string;
|
|
16
17
|
};
|
|
17
18
|
Content: {
|
|
18
|
-
({ children, onClickOutside, className, onSelect, style, }: {
|
|
19
|
+
({ children, onClickOutside, className, onSelect, style, placement, }: {
|
|
19
20
|
children?: React.ReactNode;
|
|
20
21
|
onClickOutside?: (() => void) | undefined;
|
|
21
22
|
className?: string | undefined;
|
|
22
23
|
onSelect?: ((event: Event) => void) | undefined;
|
|
23
24
|
style?: React.CSSProperties | undefined;
|
|
25
|
+
placement?: "top" | "bottom" | undefined;
|
|
24
26
|
}): import("react/jsx-runtime").JSX.Element;
|
|
25
27
|
displayName: string;
|
|
26
28
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
declare const MenuContent: {
|
|
3
|
-
({ children, onClickOutside, className, onSelect, style, }: {
|
|
3
|
+
({ children, onClickOutside, className, onSelect, style, placement, }: {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
onClickOutside?: (() => void) | undefined;
|
|
6
6
|
className?: string | undefined;
|
|
@@ -9,6 +9,7 @@ declare const MenuContent: {
|
|
|
9
9
|
*/
|
|
10
10
|
onSelect?: ((event: Event) => void) | undefined;
|
|
11
11
|
style?: React.CSSProperties | undefined;
|
|
12
|
+
placement?: "top" | "bottom" | undefined;
|
|
12
13
|
}): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
displayName: string;
|
|
14
15
|
};
|
|
@@ -232,6 +232,5 @@ export declare const InsertAnyFileIcon: import("react/jsx-runtime").JSX.Element;
|
|
|
232
232
|
export declare const Card: import("react/jsx-runtime").JSX.Element;
|
|
233
233
|
export declare const resizeIcon: import("react/jsx-runtime").JSX.Element;
|
|
234
234
|
export declare const adjustmentsIcon: import("react/jsx-runtime").JSX.Element;
|
|
235
|
-
export declare const backgroundIcon: import("react/jsx-runtime").JSX.Element;
|
|
236
235
|
export declare const strokeIcon: import("react/jsx-runtime").JSX.Element;
|
|
237
236
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type GlobalPoint } from "@excalidraw/math/types";
|
|
2
|
-
import type { MermaidToExcalidrawLibProps } from "./components/TTDDialog/common";
|
|
3
|
-
import type { ElementsMap, ExcalidrawElement, ExcalidrawTextElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
4
2
|
import type { FontMetadata } from "@excalidraw/common";
|
|
3
|
+
import type { ElementsMap, ExcalidrawElement, ExcalidrawTextElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
5
4
|
import type { AppState } from "./types";
|
|
5
|
+
import type { MermaidToExcalidrawLibProps } from "./components/TTDDialog/common";
|
|
6
6
|
export declare let hostPlugin: any;
|
|
7
7
|
export declare function destroyObsidianUtils(): void;
|
|
8
8
|
export declare function initializeObsidianUtils(): void;
|
|
@@ -42,3 +42,4 @@ export declare const getZoomMax: () => any;
|
|
|
42
42
|
export declare const runAction: (action: string) => void;
|
|
43
43
|
export declare const t2: (key: string) => string;
|
|
44
44
|
export declare const shouldDisableZoom: (appState: AppState) => boolean;
|
|
45
|
+
export declare const isFullPanelMode: (appState: AppState) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getShortcutKey: (shortcut: string) => string;
|
|
@@ -230,6 +230,10 @@ export interface AppState {
|
|
|
230
230
|
locked: boolean;
|
|
231
231
|
fromSelection: boolean;
|
|
232
232
|
} & ActiveTool;
|
|
233
|
+
preferredSelectionTool: {
|
|
234
|
+
type: "selection" | "lasso";
|
|
235
|
+
initialized: boolean;
|
|
236
|
+
};
|
|
233
237
|
penMode: boolean;
|
|
234
238
|
penDetected: boolean;
|
|
235
239
|
exportBackground: boolean;
|
|
@@ -398,7 +402,7 @@ export interface AppState {
|
|
|
398
402
|
[groupId: string]: true;
|
|
399
403
|
};
|
|
400
404
|
/** properties sidebar mode - determines whether to show compact or complete sidebar */
|
|
401
|
-
stylesPanelMode: "compact" | "full";
|
|
405
|
+
stylesPanelMode: "compact" | "full" | "mobile" | "tray";
|
|
402
406
|
}
|
|
403
407
|
export type SearchMatch = {
|
|
404
408
|
id: string;
|
|
@@ -490,6 +494,7 @@ export interface ExcalidrawProps {
|
|
|
490
494
|
onDuplicate?: (nextElements: readonly ExcalidrawElement[],
|
|
491
495
|
/** excludes the duplicated elements */
|
|
492
496
|
prevElements: readonly ExcalidrawElement[]) => ExcalidrawElement[] | void;
|
|
497
|
+
renderTopLeftUI?: (isMobile: boolean, appState: UIAppState) => JSX.Element | null;
|
|
493
498
|
renderTopRightUI?: (isMobile: boolean, appState: UIAppState) => JSX.Element | null;
|
|
494
499
|
langCode?: Language["code"];
|
|
495
500
|
viewModeEnabled?: boolean;
|
|
@@ -622,7 +627,7 @@ export type AppClassProperties = {
|
|
|
622
627
|
excalidrawContainerValue: App["excalidrawContainerValue"];
|
|
623
628
|
onPointerUpEmitter: App["onPointerUpEmitter"];
|
|
624
629
|
updateEditorAtom: App["updateEditorAtom"];
|
|
625
|
-
|
|
630
|
+
onPointerDownEmitter: App["onPointerDownEmitter"];
|
|
626
631
|
};
|
|
627
632
|
export type PointerDownState = Readonly<{
|
|
628
633
|
origin: Readonly<{
|