@excalidraw/common 0.18.0-f0063e113 → 0.18.0-f2600fe
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 +180 -44
- package/dist/dev/index.js.map +3 -3
- package/dist/prod/index.js +3 -3
- package/dist/types/common/src/constants.d.ts +19 -15
- package/dist/types/common/src/editorInterface.d.ts +34 -0
- package/dist/types/common/src/index.d.ts +1 -0
- package/dist/types/common/src/utils.d.ts +2 -1
- package/dist/types/element/src/Scene.d.ts +6 -2
- package/dist/types/element/src/align.d.ts +2 -1
- package/dist/types/element/src/bounds.d.ts +1 -1
- package/dist/types/element/src/delta.d.ts +16 -4
- package/dist/types/element/src/distribute.d.ts +2 -1
- package/dist/types/element/src/groups.d.ts +1 -0
- package/dist/types/element/src/index.d.ts +1 -0
- package/dist/types/element/src/linearElementEditor.d.ts +2 -1
- package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
- package/dist/types/element/src/renderElement.d.ts +4 -1
- package/dist/types/element/src/resizeTest.d.ts +5 -4
- package/dist/types/element/src/store.d.ts +8 -2
- package/dist/types/element/src/textElement.d.ts +1 -1
- package/dist/types/element/src/transformHandles.d.ts +5 -4
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +21 -12
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +14 -8
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +94 -54
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +45 -26
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +7 -4
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +25 -16
- package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +7 -4
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +14 -8
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +7 -4
- package/dist/types/excalidraw/actions/actionExport.d.ts +63 -36
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +16 -9
- package/dist/types/excalidraw/actions/actionFrame.d.ts +28 -16
- package/dist/types/excalidraw/actions/actionGroup.d.ts +14 -8
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +41 -7
- package/dist/types/excalidraw/actions/actionLink.d.ts +5 -2
- package/dist/types/excalidraw/actions/actionMenu.d.ts +7 -372
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +14 -8
- package/dist/types/excalidraw/actions/actionProperties.d.ts +122 -68
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +7 -4
- package/dist/types/excalidraw/actions/actionStyles.d.ts +7 -4
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +7 -4
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +7 -4
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +7 -4
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +7 -4
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +7 -4
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +8 -5
- package/dist/types/excalidraw/actions/index.d.ts +2 -2
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +5 -1
- package/dist/types/excalidraw/clipboard.d.ts +64 -1
- package/dist/types/excalidraw/components/Actions.d.ts +20 -7
- package/dist/types/excalidraw/components/App.d.ts +29 -23
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
- package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
- package/dist/types/excalidraw/components/Ellipsify.d.ts +4 -0
- package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +1 -1
- package/dist/types/excalidraw/components/FilledButton.d.ts +1 -1
- package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
- package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
- package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
- package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
- package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
- package/dist/types/excalidraw/components/MobileToolBar.d.ts +11 -0
- package/dist/types/excalidraw/components/Popover.d.ts +2 -1
- package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -2
- package/dist/types/excalidraw/components/TextField.d.ts +1 -0
- package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +3 -2
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +4 -2
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +2 -1
- package/dist/types/excalidraw/components/icons.d.ts +10 -0
- package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +13 -1
- package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +0 -3
- package/dist/types/excalidraw/components/shapes.d.ts +129 -1
- package/dist/types/excalidraw/data/blob.d.ts +3 -7
- package/dist/types/excalidraw/data/reconcile.d.ts +1 -0
- package/dist/types/excalidraw/data/restore.d.ts +6 -1
- package/dist/types/excalidraw/data/types.d.ts +4 -1
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +3 -1
- package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
- package/dist/types/excalidraw/index.d.ts +4 -4
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +1 -1
- package/dist/types/excalidraw/renderer/staticScene.d.ts +4 -1
- package/dist/types/excalidraw/scene/types.d.ts +3 -3
- package/dist/types/excalidraw/shortcut.d.ts +1 -0
- package/dist/types/excalidraw/types.d.ts +23 -19
- package/dist/types/math/src/segment.d.ts +1 -0
- package/package.json +5 -2
|
@@ -48,12 +48,15 @@ export declare const actionSelectAll: {
|
|
|
48
48
|
editingFrame: string | null;
|
|
49
49
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
50
50
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
51
|
-
editingLinearElement: LinearElementEditor | null;
|
|
52
51
|
activeTool: {
|
|
53
52
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
54
53
|
locked: boolean;
|
|
55
54
|
fromSelection: boolean;
|
|
56
55
|
} & import("../types").ActiveTool;
|
|
56
|
+
preferredSelectionTool: {
|
|
57
|
+
type: "selection" | "lasso";
|
|
58
|
+
initialized: boolean;
|
|
59
|
+
};
|
|
57
60
|
penMode: boolean;
|
|
58
61
|
penDetected: boolean;
|
|
59
62
|
exportBackground: boolean;
|
|
@@ -86,8 +89,8 @@ export declare const actionSelectAll: {
|
|
|
86
89
|
zoom: Readonly<{
|
|
87
90
|
value: import("../types").NormalizedZoomValue;
|
|
88
91
|
}>;
|
|
89
|
-
openMenu: "canvas" |
|
|
90
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
92
|
+
openMenu: "canvas" | null;
|
|
93
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
91
94
|
openSidebar: {
|
|
92
95
|
name: string;
|
|
93
96
|
tab?: string | undefined;
|
|
@@ -161,7 +164,7 @@ export declare const actionSelectAll: {
|
|
|
161
164
|
shown: true;
|
|
162
165
|
data: import("../charts").Spreadsheet;
|
|
163
166
|
};
|
|
164
|
-
showHyperlinkPopup: false | "
|
|
167
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
165
168
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
166
169
|
originSnapOffset: {
|
|
167
170
|
x: number;
|
|
@@ -41,12 +41,15 @@ export declare const actionCopyStyles: {
|
|
|
41
41
|
editingFrame: string | null;
|
|
42
42
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
43
43
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
44
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
45
44
|
activeTool: {
|
|
46
45
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
47
46
|
locked: boolean;
|
|
48
47
|
fromSelection: boolean;
|
|
49
48
|
} & import("../types").ActiveTool;
|
|
49
|
+
preferredSelectionTool: {
|
|
50
|
+
type: "selection" | "lasso";
|
|
51
|
+
initialized: boolean;
|
|
52
|
+
};
|
|
50
53
|
penMode: boolean;
|
|
51
54
|
penDetected: boolean;
|
|
52
55
|
exportBackground: boolean;
|
|
@@ -79,8 +82,8 @@ export declare const actionCopyStyles: {
|
|
|
79
82
|
zoom: Readonly<{
|
|
80
83
|
value: import("../types").NormalizedZoomValue;
|
|
81
84
|
}>;
|
|
82
|
-
openMenu: "canvas" |
|
|
83
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
85
|
+
openMenu: "canvas" | null;
|
|
86
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
84
87
|
openSidebar: {
|
|
85
88
|
name: string;
|
|
86
89
|
tab?: string | undefined;
|
|
@@ -156,7 +159,7 @@ export declare const actionCopyStyles: {
|
|
|
156
159
|
shown: true;
|
|
157
160
|
data: import("../charts").Spreadsheet;
|
|
158
161
|
};
|
|
159
|
-
showHyperlinkPopup: false | "
|
|
162
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
160
163
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
161
164
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
162
165
|
originSnapOffset: {
|
|
@@ -43,12 +43,15 @@ export declare const actionToggleGridMode: {
|
|
|
43
43
|
editingFrame: string | null;
|
|
44
44
|
elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
|
|
45
45
|
editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
|
|
46
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
47
46
|
activeTool: {
|
|
48
47
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
49
48
|
locked: boolean;
|
|
50
49
|
fromSelection: boolean;
|
|
51
50
|
} & import("../types").ActiveTool;
|
|
51
|
+
preferredSelectionTool: {
|
|
52
|
+
type: "selection" | "lasso";
|
|
53
|
+
initialized: boolean;
|
|
54
|
+
};
|
|
52
55
|
penMode: boolean;
|
|
53
56
|
penDetected: boolean;
|
|
54
57
|
exportBackground: boolean;
|
|
@@ -81,8 +84,8 @@ export declare const actionToggleGridMode: {
|
|
|
81
84
|
zoom: Readonly<{
|
|
82
85
|
value: import("../types").NormalizedZoomValue;
|
|
83
86
|
}>;
|
|
84
|
-
openMenu: "canvas" |
|
|
85
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
87
|
+
openMenu: "canvas" | null;
|
|
88
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
86
89
|
openSidebar: {
|
|
87
90
|
name: string;
|
|
88
91
|
tab?: string | undefined;
|
|
@@ -162,7 +165,7 @@ export declare const actionToggleGridMode: {
|
|
|
162
165
|
shown: true;
|
|
163
166
|
data: import("../charts").Spreadsheet;
|
|
164
167
|
};
|
|
165
|
-
showHyperlinkPopup: false | "
|
|
168
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
166
169
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
167
170
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
168
171
|
originSnapOffset: {
|
|
@@ -41,12 +41,15 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
41
41
|
editingFrame: string | null;
|
|
42
42
|
elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
|
|
43
43
|
editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
|
|
44
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
45
44
|
activeTool: {
|
|
46
45
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
47
46
|
locked: boolean;
|
|
48
47
|
fromSelection: boolean;
|
|
49
48
|
} & import("../types").ActiveTool;
|
|
49
|
+
preferredSelectionTool: {
|
|
50
|
+
type: "selection" | "lasso";
|
|
51
|
+
initialized: boolean;
|
|
52
|
+
};
|
|
50
53
|
penMode: boolean;
|
|
51
54
|
penDetected: boolean;
|
|
52
55
|
exportBackground: boolean;
|
|
@@ -79,8 +82,8 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
79
82
|
zoom: Readonly<{
|
|
80
83
|
value: import("../types").NormalizedZoomValue;
|
|
81
84
|
}>;
|
|
82
|
-
openMenu: "canvas" |
|
|
83
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
85
|
+
openMenu: "canvas" | null;
|
|
86
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
84
87
|
openSidebar: {
|
|
85
88
|
name: string;
|
|
86
89
|
tab?: string | undefined;
|
|
@@ -160,7 +163,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
160
163
|
shown: true;
|
|
161
164
|
data: import("../charts").Spreadsheet;
|
|
162
165
|
};
|
|
163
|
-
showHyperlinkPopup: false | "
|
|
166
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
164
167
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
165
168
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
166
169
|
originSnapOffset: {
|
|
@@ -47,12 +47,15 @@ export declare const actionToggleSearchMenu: {
|
|
|
47
47
|
editingFrame: string | null;
|
|
48
48
|
elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
|
|
49
49
|
editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
|
|
50
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
51
50
|
activeTool: {
|
|
52
51
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
53
52
|
locked: boolean;
|
|
54
53
|
fromSelection: boolean;
|
|
55
54
|
} & import("../types").ActiveTool;
|
|
55
|
+
preferredSelectionTool: {
|
|
56
|
+
type: "selection" | "lasso";
|
|
57
|
+
initialized: boolean;
|
|
58
|
+
};
|
|
56
59
|
penMode: boolean;
|
|
57
60
|
penDetected: boolean;
|
|
58
61
|
exportBackground: boolean;
|
|
@@ -85,8 +88,8 @@ export declare const actionToggleSearchMenu: {
|
|
|
85
88
|
zoom: Readonly<{
|
|
86
89
|
value: import("../types").NormalizedZoomValue;
|
|
87
90
|
}>;
|
|
88
|
-
openMenu: "canvas" |
|
|
89
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
91
|
+
openMenu: "canvas" | null;
|
|
92
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
90
93
|
defaultSidebarDockedPreference: boolean;
|
|
91
94
|
lastPointerDownWith: import("../../element/src/types").PointerType;
|
|
92
95
|
selectedElementIds: Readonly<{
|
|
@@ -152,7 +155,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
152
155
|
shown: true;
|
|
153
156
|
data: import("../charts").Spreadsheet;
|
|
154
157
|
};
|
|
155
|
-
showHyperlinkPopup: false | "
|
|
158
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
156
159
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
157
160
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
158
161
|
originSnapOffset: {
|
|
@@ -43,12 +43,15 @@ export declare const actionToggleStats: {
|
|
|
43
43
|
editingFrame: string | null;
|
|
44
44
|
elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
|
|
45
45
|
editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
|
|
46
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
47
46
|
activeTool: {
|
|
48
47
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
49
48
|
locked: boolean;
|
|
50
49
|
fromSelection: boolean;
|
|
51
50
|
} & import("../types").ActiveTool;
|
|
51
|
+
preferredSelectionTool: {
|
|
52
|
+
type: "selection" | "lasso";
|
|
53
|
+
initialized: boolean;
|
|
54
|
+
};
|
|
52
55
|
penMode: boolean;
|
|
53
56
|
penDetected: boolean;
|
|
54
57
|
exportBackground: boolean;
|
|
@@ -81,8 +84,8 @@ export declare const actionToggleStats: {
|
|
|
81
84
|
zoom: Readonly<{
|
|
82
85
|
value: import("../types").NormalizedZoomValue;
|
|
83
86
|
}>;
|
|
84
|
-
openMenu: "canvas" |
|
|
85
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
87
|
+
openMenu: "canvas" | null;
|
|
88
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
86
89
|
openSidebar: {
|
|
87
90
|
name: string;
|
|
88
91
|
tab?: string | undefined;
|
|
@@ -159,7 +162,7 @@ export declare const actionToggleStats: {
|
|
|
159
162
|
shown: true;
|
|
160
163
|
data: import("../charts").Spreadsheet;
|
|
161
164
|
};
|
|
162
|
-
showHyperlinkPopup: false | "
|
|
165
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
163
166
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
164
167
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
165
168
|
originSnapOffset: {
|
|
@@ -40,12 +40,15 @@ export declare const actionToggleViewMode: {
|
|
|
40
40
|
editingFrame: string | null;
|
|
41
41
|
elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
|
|
42
42
|
editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
|
|
43
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
44
43
|
activeTool: {
|
|
45
44
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
46
45
|
locked: boolean;
|
|
47
46
|
fromSelection: boolean;
|
|
48
47
|
} & import("../types").ActiveTool;
|
|
48
|
+
preferredSelectionTool: {
|
|
49
|
+
type: "selection" | "lasso";
|
|
50
|
+
initialized: boolean;
|
|
51
|
+
};
|
|
49
52
|
penMode: boolean;
|
|
50
53
|
penDetected: boolean;
|
|
51
54
|
exportBackground: boolean;
|
|
@@ -78,8 +81,8 @@ export declare const actionToggleViewMode: {
|
|
|
78
81
|
zoom: Readonly<{
|
|
79
82
|
value: import("../types").NormalizedZoomValue;
|
|
80
83
|
}>;
|
|
81
|
-
openMenu: "canvas" |
|
|
82
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
84
|
+
openMenu: "canvas" | null;
|
|
85
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
83
86
|
openSidebar: {
|
|
84
87
|
name: string;
|
|
85
88
|
tab?: string | undefined;
|
|
@@ -159,7 +162,7 @@ export declare const actionToggleViewMode: {
|
|
|
159
162
|
shown: true;
|
|
160
163
|
data: import("../charts").Spreadsheet;
|
|
161
164
|
};
|
|
162
|
-
showHyperlinkPopup: false | "
|
|
165
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
163
166
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
164
167
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
165
168
|
originSnapOffset: {
|
|
@@ -40,12 +40,15 @@ export declare const actionToggleZenMode: {
|
|
|
40
40
|
editingFrame: string | null;
|
|
41
41
|
elementsToHighlight: import("../../element/src/types").NonDeleted<import("../../element/src/types").ExcalidrawElement>[] | null;
|
|
42
42
|
editingTextElement: import("../../element/src/types").NonDeletedExcalidrawElement | null;
|
|
43
|
-
editingLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
44
43
|
activeTool: {
|
|
45
44
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
46
45
|
locked: boolean;
|
|
47
46
|
fromSelection: boolean;
|
|
48
47
|
} & import("../types").ActiveTool;
|
|
48
|
+
preferredSelectionTool: {
|
|
49
|
+
type: "selection" | "lasso";
|
|
50
|
+
initialized: boolean;
|
|
51
|
+
};
|
|
49
52
|
penMode: boolean;
|
|
50
53
|
penDetected: boolean;
|
|
51
54
|
exportBackground: boolean;
|
|
@@ -78,8 +81,8 @@ export declare const actionToggleZenMode: {
|
|
|
78
81
|
zoom: Readonly<{
|
|
79
82
|
value: import("../types").NormalizedZoomValue;
|
|
80
83
|
}>;
|
|
81
|
-
openMenu: "canvas" |
|
|
82
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
84
|
+
openMenu: "canvas" | null;
|
|
85
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
83
86
|
openSidebar: {
|
|
84
87
|
name: string;
|
|
85
88
|
tab?: string | undefined;
|
|
@@ -159,7 +162,7 @@ export declare const actionToggleZenMode: {
|
|
|
159
162
|
shown: true;
|
|
160
163
|
data: import("../charts").Spreadsheet;
|
|
161
164
|
};
|
|
162
|
-
showHyperlinkPopup: false | "
|
|
165
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
163
166
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
164
167
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
165
168
|
originSnapOffset: {
|
|
@@ -183,7 +186,7 @@ export declare const actionToggleZenMode: {
|
|
|
183
186
|
captureUpdate: "EVENTUALLY";
|
|
184
187
|
};
|
|
185
188
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
186
|
-
predicate: (elements: readonly import("../../element/src/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
189
|
+
predicate: (elements: readonly import("../../element/src/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
187
190
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
188
191
|
} & {
|
|
189
192
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
@@ -2,13 +2,13 @@ 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, } from "./actionProperties";
|
|
5
|
+
export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, 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
9
|
export { actionChangeProjectName, actionChangeExportBackground, actionSaveToActiveFile, actionSaveFileToDisk, actionLoadScene, } from "./actionExport";
|
|
10
10
|
export { actionCopyStyles, actionPasteStyles } from "./actionStyles";
|
|
11
|
-
export {
|
|
11
|
+
export { actionShortcuts } from "./actionMenu";
|
|
12
12
|
export { actionGroup, actionUngroup } from "./actionGroup";
|
|
13
13
|
export { actionGoToCollaborator } from "./actionNavigate";
|
|
14
14
|
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" | "
|
|
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";
|
|
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;
|
|
@@ -46,7 +50,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
46
50
|
currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
|
|
47
51
|
cursorButton?: "up" | "down" | undefined;
|
|
48
52
|
scrolledOutside?: boolean | undefined;
|
|
49
|
-
openMenu?: "canvas" |
|
|
53
|
+
openMenu?: "canvas" | null | undefined;
|
|
50
54
|
openSidebar?: {
|
|
51
55
|
name: string;
|
|
52
56
|
tab?: string | undefined;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ALLOWED_PASTE_MIME_TYPES } from "@excalidraw/common";
|
|
2
|
+
import type { ValueOf } from "@excalidraw/common/utility-types";
|
|
3
|
+
import type { IMAGE_MIME_TYPES, STRING_MIME_TYPES } from "@excalidraw/common";
|
|
2
4
|
import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
5
|
+
import type { FileSystemHandle } from "./data/filesystem";
|
|
3
6
|
import type { Spreadsheet } from "./charts";
|
|
4
7
|
import type { BinaryFiles } from "./types";
|
|
5
8
|
export type PastedMixedContent = {
|
|
@@ -57,10 +60,70 @@ export declare const readSystemClipboard: () => Promise<{
|
|
|
57
60
|
"image/avif"?: string | File | undefined;
|
|
58
61
|
"image/jfif"?: string | File | undefined;
|
|
59
62
|
}>;
|
|
63
|
+
type AllowedParsedDataTransferItem = {
|
|
64
|
+
type: ValueOf<typeof IMAGE_MIME_TYPES>;
|
|
65
|
+
kind: "file";
|
|
66
|
+
file: File;
|
|
67
|
+
fileHandle: FileSystemHandle | null;
|
|
68
|
+
} | {
|
|
69
|
+
type: ValueOf<typeof STRING_MIME_TYPES>;
|
|
70
|
+
kind: "string";
|
|
71
|
+
value: string;
|
|
72
|
+
};
|
|
73
|
+
type ParsedDataTransferItem = {
|
|
74
|
+
type: string;
|
|
75
|
+
kind: "file";
|
|
76
|
+
file: File;
|
|
77
|
+
fileHandle: FileSystemHandle | null;
|
|
78
|
+
} | {
|
|
79
|
+
type: string;
|
|
80
|
+
kind: "string";
|
|
81
|
+
value: string;
|
|
82
|
+
};
|
|
83
|
+
type ParsedDataTransferItemType<T extends AllowedParsedDataTransferItem["type"]> = AllowedParsedDataTransferItem & {
|
|
84
|
+
type: T;
|
|
85
|
+
};
|
|
86
|
+
export type ParsedDataTransferFile = Extract<AllowedParsedDataTransferItem, {
|
|
87
|
+
kind: "file";
|
|
88
|
+
}>;
|
|
89
|
+
type ParsedDataTranferList = ParsedDataTransferItem[] & {
|
|
90
|
+
/**
|
|
91
|
+
* Only allows filtering by known `string` data types, since `file`
|
|
92
|
+
* types can have multiple items of the same type (e.g. multiple image files)
|
|
93
|
+
* unlike `string` data transfer items.
|
|
94
|
+
*/
|
|
95
|
+
findByType: typeof findDataTransferItemType;
|
|
96
|
+
/**
|
|
97
|
+
* Only allows filtering by known `string` data types, since `file`
|
|
98
|
+
* types can have multiple items of the same type (e.g. multiple image files)
|
|
99
|
+
* unlike `string` data transfer items.
|
|
100
|
+
*/
|
|
101
|
+
getData: typeof getDataTransferItemData;
|
|
102
|
+
getFiles: typeof getDataTransferFiles;
|
|
103
|
+
};
|
|
104
|
+
declare const findDataTransferItemType: <T extends ValueOf<{
|
|
105
|
+
readonly text: "text/plain";
|
|
106
|
+
readonly html: "text/html";
|
|
107
|
+
readonly json: "application/json";
|
|
108
|
+
readonly excalidraw: "application/vnd.excalidraw+json";
|
|
109
|
+
readonly excalidrawlib: "application/vnd.excalidrawlib+json";
|
|
110
|
+
readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
|
|
111
|
+
}>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<T> | null;
|
|
112
|
+
declare const getDataTransferItemData: <T extends ValueOf<{
|
|
113
|
+
readonly text: "text/plain";
|
|
114
|
+
readonly html: "text/html";
|
|
115
|
+
readonly json: "application/json";
|
|
116
|
+
readonly excalidraw: "application/vnd.excalidraw+json";
|
|
117
|
+
readonly excalidrawlib: "application/vnd.excalidrawlib+json";
|
|
118
|
+
readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
|
|
119
|
+
}>>(this: ParsedDataTranferList, type: T) => ParsedDataTransferItemType<ValueOf<typeof STRING_MIME_TYPES>>["value"] | null;
|
|
120
|
+
declare const getDataTransferFiles: (this: ParsedDataTranferList) => ParsedDataTransferFile[];
|
|
121
|
+
export declare const parseDataTransferEvent: (event: ClipboardEvent | DragEvent | React.DragEvent<HTMLDivElement>) => Promise<ParsedDataTranferList>;
|
|
60
122
|
/**
|
|
61
123
|
* Attempts to parse clipboard event.
|
|
62
124
|
*/
|
|
63
|
-
export declare const parseClipboard: (
|
|
125
|
+
export declare const parseClipboard: (dataList: ParsedDataTranferList, isPlainPaste?: boolean) => Promise<ClipboardData>;
|
|
64
126
|
export declare const copyBlobToClipboardAsPng: (blob: Blob | Promise<Blob>) => Promise<void>;
|
|
65
127
|
export declare const copyTextToSystemClipboard: (text: string | null, clipboardEvent?: ClipboardEvent | null) => Promise<void>;
|
|
128
|
+
export declare const isClipboardEvent: (event: React.SyntheticEvent | Event) => event is ClipboardEvent;
|
|
66
129
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExcalidrawElement, NonDeletedElementsMap, NonDeletedSceneElementsMap } from "@excalidraw/element/types";
|
|
2
2
|
import "./Actions.scss";
|
|
3
|
-
import type { AppClassProperties, AppProps, UIAppState, Zoom } from "../types";
|
|
3
|
+
import type { AppClassProperties, AppProps, UIAppState, Zoom, AppState } from "../types";
|
|
4
4
|
import type { ActionManager } from "../actions/manager";
|
|
5
5
|
export declare const canChangeStrokeColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
|
|
6
6
|
export declare const canChangeBackgroundColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
|
|
@@ -10,9 +10,23 @@ export declare const SelectedShapeActions: ({ appState, elementsMap, renderActio
|
|
|
10
10
|
renderAction: ActionManager["renderAction"];
|
|
11
11
|
app: AppClassProperties;
|
|
12
12
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export declare const
|
|
14
|
-
activeTool: UIAppState["activeTool"];
|
|
13
|
+
export declare const CompactShapeActions: ({ appState, elementsMap, renderAction, app, setAppState, }: {
|
|
15
14
|
appState: UIAppState;
|
|
15
|
+
elementsMap: NonDeletedElementsMap | NonDeletedSceneElementsMap;
|
|
16
|
+
renderAction: ActionManager["renderAction"];
|
|
17
|
+
app: AppClassProperties;
|
|
18
|
+
setAppState: React.Component<any, AppState>["setState"];
|
|
19
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const MobileShapeActions: ({ appState, elementsMap, renderAction, app, setAppState, }: {
|
|
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"];
|
|
16
30
|
app: AppClassProperties;
|
|
17
31
|
UIOptions: AppProps["UIOptions"];
|
|
18
32
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -24,11 +38,10 @@ export declare const UndoRedoActions: ({ renderAction, className, }: {
|
|
|
24
38
|
renderAction: ActionManager["renderAction"];
|
|
25
39
|
className?: string | undefined;
|
|
26
40
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export declare const
|
|
41
|
+
export declare const ExitZenModeButton: ({ actionManager, showExitZenModeBtn, }: {
|
|
28
42
|
actionManager: ActionManager;
|
|
29
43
|
showExitZenModeBtn: boolean;
|
|
30
44
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
export declare const
|
|
32
|
-
|
|
33
|
-
className?: string | undefined;
|
|
45
|
+
export declare const ExitViewModeButton: ({ actionManager, }: {
|
|
46
|
+
actionManager: ActionManager;
|
|
34
47
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { type EXPORT_IMAGE_TYPES, Emitter } from "@excalidraw/common";
|
|
3
|
-
import { LinearElementEditor, FlowChartCreator, Scene, Store, type ElementUpdate } from "@excalidraw/element";
|
|
4
|
-
import type { ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered } from "@excalidraw/element/types";
|
|
2
|
+
import { type EXPORT_IMAGE_TYPES, Emitter, type EditorInterface, type StylesPanelMode } from "@excalidraw/common";
|
|
3
|
+
import { LinearElementEditor, FlowChartCreator, Scene, Store, type ElementUpdate, StoreDelta, type ApplyToOptions } from "@excalidraw/element";
|
|
4
|
+
import type { ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered, SceneElementsMap } from "@excalidraw/element/types";
|
|
5
5
|
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
6
6
|
import { ActionManager } from "../actions/manager";
|
|
7
7
|
import { AnimationFrameHandler } from "../animation-frame-handler";
|
|
@@ -14,7 +14,7 @@ import { LassoTrail } from "../lasso";
|
|
|
14
14
|
import { EraserTrail } from "../eraser";
|
|
15
15
|
import type { ExportedElements } from "../data";
|
|
16
16
|
import type { FileSystemHandle } from "../data/filesystem";
|
|
17
|
-
import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData,
|
|
17
|
+
import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, GenerateDiagramToCode, NullableGridSize, Offsets } from "../types";
|
|
18
18
|
import type { RoughCanvas } from "roughjs/bin/canvas";
|
|
19
19
|
import type { ActionResult } from "../actions/types";
|
|
20
20
|
export declare const ExcalidrawContainerContext: React.Context<{
|
|
@@ -23,17 +23,18 @@ export declare const ExcalidrawContainerContext: React.Context<{
|
|
|
23
23
|
}>;
|
|
24
24
|
export declare const useApp: () => AppClassProperties;
|
|
25
25
|
export declare const useAppProps: () => AppProps;
|
|
26
|
-
export declare const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
canFitSidebar: boolean;
|
|
34
|
-
};
|
|
26
|
+
export declare const useEditorInterface: () => Readonly<{
|
|
27
|
+
formFactor: "phone" | "tablet" | "desktop";
|
|
28
|
+
desktopUIMode: "compact" | "full";
|
|
29
|
+
userAgent: Readonly<{
|
|
30
|
+
isMobileDevice: boolean;
|
|
31
|
+
platform: "ios" | "android" | "other" | "unknown";
|
|
32
|
+
}>;
|
|
35
33
|
isTouchScreen: boolean;
|
|
34
|
+
canFitSidebar: boolean;
|
|
35
|
+
isLandscape: boolean;
|
|
36
36
|
}>;
|
|
37
|
+
export declare const useStylesPanelMode: () => StylesPanelMode;
|
|
37
38
|
export declare const useExcalidrawContainer: () => {
|
|
38
39
|
container: HTMLDivElement | null;
|
|
39
40
|
id: string | null;
|
|
@@ -48,7 +49,8 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
48
49
|
rc: RoughCanvas;
|
|
49
50
|
unmounted: boolean;
|
|
50
51
|
actionManager: ActionManager;
|
|
51
|
-
|
|
52
|
+
editorInterface: EditorInterface;
|
|
53
|
+
private stylesPanelMode;
|
|
52
54
|
private excalidrawContainerRef;
|
|
53
55
|
scene: Scene;
|
|
54
56
|
fonts: Fonts;
|
|
@@ -78,6 +80,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
78
80
|
/** embeds that have been inserted to DOM (as a perf optim, we don't want to
|
|
79
81
|
* insert to DOM before user initially scrolls to them) */
|
|
80
82
|
private initializedEmbeds;
|
|
83
|
+
private handleToastClose;
|
|
81
84
|
private elementsPendingErasure;
|
|
82
85
|
flowChartCreator: FlowChartCreator;
|
|
83
86
|
private flowChartNavigator;
|
|
@@ -152,6 +155,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
152
155
|
x: number;
|
|
153
156
|
y: number;
|
|
154
157
|
};
|
|
158
|
+
blockDragging: boolean;
|
|
155
159
|
};
|
|
156
160
|
eventListeners: {
|
|
157
161
|
onMove: {
|
|
@@ -221,6 +225,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
221
225
|
x: number;
|
|
222
226
|
y: number;
|
|
223
227
|
};
|
|
228
|
+
blockDragging: boolean;
|
|
224
229
|
};
|
|
225
230
|
eventListeners: {
|
|
226
231
|
onMove: {
|
|
@@ -296,9 +301,11 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
296
301
|
*/
|
|
297
302
|
private resetScene;
|
|
298
303
|
private initializeScene;
|
|
299
|
-
private
|
|
300
|
-
|
|
301
|
-
private
|
|
304
|
+
private getFormFactor;
|
|
305
|
+
refreshEditorInterface: () => void;
|
|
306
|
+
private reconcileStylesPanelMode;
|
|
307
|
+
/** TO BE USED LATER */
|
|
308
|
+
private setDesktopUIMode;
|
|
302
309
|
private clearImageShapeCache;
|
|
303
310
|
componentDidMount(): Promise<void>;
|
|
304
311
|
componentWillUnmount(): void;
|
|
@@ -315,6 +322,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
315
322
|
private static resetTapTwice;
|
|
316
323
|
private onTouchStart;
|
|
317
324
|
private onTouchEnd;
|
|
325
|
+
private insertClipboardContent;
|
|
318
326
|
pasteFromClipboard: (event: ClipboardEvent) => Promise<void>;
|
|
319
327
|
addElementsFromPasteOrLibrary: (opts: {
|
|
320
328
|
elements: readonly ExcalidrawElement[];
|
|
@@ -396,6 +404,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
396
404
|
*/
|
|
397
405
|
captureUpdate?: SceneData["captureUpdate"];
|
|
398
406
|
}) => void;
|
|
407
|
+
applyDeltas: (deltas: StoreDelta[], options?: ApplyToOptions) => [SceneElementsMap, AppState, boolean];
|
|
399
408
|
mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, updates: ElementUpdate<TElement>, informMutation?: boolean) => TElement;
|
|
400
409
|
private triggerRender;
|
|
401
410
|
/**
|
|
@@ -487,7 +496,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
487
496
|
sceneY: number;
|
|
488
497
|
link: string;
|
|
489
498
|
}) => NonDeleted<ExcalidrawEmbeddableElement> | undefined;
|
|
490
|
-
private
|
|
499
|
+
private newImagePlaceholder;
|
|
491
500
|
private handleLinearElementOnPointerDown;
|
|
492
501
|
private getCurrentItemRoundness;
|
|
493
502
|
private createGenericElementOnPointerDown;
|
|
@@ -508,11 +517,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
508
517
|
* and when you don't want to loose those modifications
|
|
509
518
|
*/
|
|
510
519
|
private getLatestInitializedImageElement;
|
|
511
|
-
|
|
512
|
-
* inserts image into elements array and rerenders
|
|
513
|
-
*/
|
|
514
|
-
private insertImageElement;
|
|
515
|
-
private onImageAction;
|
|
520
|
+
private onImageToolbarButtonClick;
|
|
516
521
|
private getImageNaturalDimensions;
|
|
517
522
|
/** updates image cache, refreshing updated elements and/or setting status
|
|
518
523
|
to error for images that fail during <img> element creation */
|
|
@@ -526,6 +531,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
526
531
|
private maybeSuggestBindingAtCursor;
|
|
527
532
|
private clearSelection;
|
|
528
533
|
private handleInteractiveCanvasRef;
|
|
534
|
+
private insertImages;
|
|
529
535
|
private handleAppOnDrop;
|
|
530
536
|
loadFileToCanvas: (file: File, fileHandle: FileSystemHandle | null) => Promise<void>;
|
|
531
537
|
private handleCanvasContextMenu;
|