@dwelle/excalidraw 0.4.0-c86851b → 0.4.0-c8d325d
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/CHANGELOG.md +284 -0
- package/README.md +18 -1820
- package/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.js → vendor-d415b28e9024dee4bb1b.js} +2 -2
- package/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.js → vendor-a14cd58fa2db417e42b2.js} +6 -6
- package/dist/excalidraw.development.js +2864 -1579
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +35 -0
- package/package.json +9 -4
- package/types/actions/actionAddToLibrary.d.ts +82 -31
- package/types/actions/actionAlign.d.ts +25 -20
- package/types/actions/actionBoundText.d.ts +170 -16
- package/types/actions/actionCanvas.d.ts +513 -105
- package/types/actions/actionClipboard.d.ts +134 -53
- package/types/actions/actionDeleteSelected.d.ts +80 -33
- package/types/actions/actionDistribute.d.ts +7 -8
- package/types/actions/actionDuplicateSelection.d.ts +1 -2
- package/types/actions/actionElementLock.d.ts +271 -0
- package/types/actions/actionExport.d.ts +260 -107
- package/types/actions/actionFinalize.d.ts +54 -24
- package/types/actions/actionFlip.d.ts +4 -7
- package/types/actions/actionFrame.d.ts +423 -0
- package/types/actions/actionGroup.d.ts +246 -9
- package/types/actions/actionHistory.d.ts +1 -1
- package/types/actions/actionLinearEditor.d.ts +30 -13
- package/types/actions/actionMenu.d.ts +85 -36
- package/types/actions/actionNavigate.d.ts +1 -1
- package/types/actions/actionProperties.d.ts +367 -147
- package/types/actions/actionSelectAll.d.ts +121 -2
- package/types/actions/actionStyles.d.ts +28 -12
- package/types/actions/actionToggleGridMode.d.ts +28 -12
- package/types/actions/actionToggleStats.d.ts +28 -12
- package/types/actions/actionToggleViewMode.d.ts +28 -12
- package/types/actions/actionToggleZenMode.d.ts +28 -12
- package/types/actions/actionZindex.d.ts +4 -4
- package/types/actions/index.d.ts +1 -1
- package/types/actions/manager.d.ts +1 -1
- package/types/actions/shortcuts.d.ts +2 -1
- package/types/actions/types.d.ts +11 -9
- package/types/appState.d.ts +12 -9
- package/types/charts.d.ts +2 -2
- package/types/clients.d.ts +5 -6
- package/types/clipboard.d.ts +3 -2
- package/types/colors.d.ts +60 -5
- package/types/components/Actions.d.ts +7 -7
- package/types/components/ActiveConfirmDialog.d.ts +1 -21
- package/types/components/App.d.ts +72 -16
- package/types/components/Avatar.d.ts +1 -2
- package/types/components/BraveMeasureTextError.d.ts +2 -0
- package/types/components/Button.d.ts +3 -2
- package/types/components/ButtonIconSelect.d.ts +11 -3
- package/types/components/Card.d.ts +0 -1
- package/types/components/ColorPicker/ColorInput.d.ts +7 -0
- package/types/components/ColorPicker/ColorPicker.d.ts +19 -0
- package/types/components/ColorPicker/CustomColorList.d.ts +8 -0
- package/types/components/ColorPicker/HotkeyLabel.d.ts +8 -0
- package/types/components/ColorPicker/Picker.d.ts +18 -0
- package/types/components/ColorPicker/PickerColorList.d.ts +10 -0
- package/types/components/ColorPicker/PickerHeading.d.ts +5 -0
- package/types/components/ColorPicker/ShadeList.d.ts +8 -0
- package/types/components/ColorPicker/TopPicks.d.ts +9 -0
- package/types/components/ColorPicker/colorPickerUtils.d.ts +21 -0
- package/types/components/ColorPicker/keyboardNavHandlers.d.ts +20 -0
- package/types/components/ContextMenu.d.ts +3 -3
- package/types/components/DefaultSidebar.d.ts +29 -0
- package/types/components/Dialog.d.ts +3 -4
- package/types/components/ErrorDialog.d.ts +3 -2
- package/types/components/EyeDropper.d.ts +17 -0
- package/types/components/FilledButton.d.ts +17 -0
- package/types/components/FixedSideContainer.d.ts +1 -1
- package/types/components/HandButton.d.ts +1 -1
- package/types/components/HelpButton.d.ts +1 -2
- package/types/components/HintViewer.d.ts +4 -5
- package/types/components/HomeButton.d.ts +1 -1
- package/types/components/ImageExportDialog.d.ts +8 -13
- package/types/components/Island.d.ts +1 -1
- package/types/components/JSONExportDialog.d.ts +5 -5
- package/types/components/LayerUI.d.ts +7 -12
- package/types/components/LibraryMenu.d.ts +13 -14
- package/types/components/LibraryMenuBrowseButton.d.ts +2 -2
- package/types/components/LibraryMenuControlButtons.d.ts +9 -0
- package/types/components/LibraryMenuHeaderContent.d.ts +10 -28
- package/types/components/LibraryMenuItems.d.ts +6 -7
- package/types/components/LibraryMenuSection.d.ts +22 -0
- package/types/components/LibraryUnit.d.ts +6 -3
- package/types/components/LoadingMessage.d.ts +0 -1
- package/types/components/LockButton.d.ts +1 -1
- package/types/components/MobileMenu.d.ts +8 -8
- package/types/components/OverwriteConfirm/OverwriteConfirm.d.ts +17 -0
- package/types/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +17 -0
- package/types/components/OverwriteConfirm/OverwriteConfirmState.d.ts +22 -0
- package/types/components/PasteChartDialog.d.ts +4 -5
- package/types/components/PenModeButton.d.ts +1 -1
- package/types/components/Popover.d.ts +1 -1
- package/types/components/ProjectName.d.ts +2 -1
- package/types/components/PublishLibrary.d.ts +2 -2
- package/types/components/RadioGroup.d.ts +12 -0
- package/types/components/Section.d.ts +1 -1
- package/types/components/Sidebar/Sidebar.d.ts +66 -63
- package/types/components/Sidebar/SidebarHeader.d.ts +6 -19
- package/types/components/Sidebar/SidebarTab.d.ts +8 -0
- package/types/components/Sidebar/SidebarTabTrigger.d.ts +9 -0
- package/types/components/Sidebar/SidebarTabTriggers.d.ts +6 -0
- package/types/components/Sidebar/SidebarTabs.d.ts +6 -0
- package/types/components/Sidebar/SidebarTrigger.d.ts +6 -0
- package/types/components/Sidebar/common.d.ts +24 -7
- package/types/components/Spinner.d.ts +2 -1
- package/types/components/Stack.d.ts +4 -3
- package/types/components/Stats.d.ts +3 -3
- package/types/components/Switch.d.ts +9 -0
- package/types/components/ToolButton.d.ts +5 -4
- package/types/components/Tooltip.d.ts +1 -1
- package/types/components/Trans.d.ts +9 -0
- package/types/components/canvases/InteractiveCanvas.d.ts +26 -0
- package/types/components/canvases/StaticCanvas.d.ts +18 -0
- package/types/components/canvases/index.d.ts +3 -0
- package/types/components/dropdownMenu/DropdownMenu.d.ts +3 -2
- package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -2
- package/types/components/dropdownMenu/common.d.ts +1 -1
- package/types/components/footer/Footer.d.ts +4 -5
- package/types/components/hoc/withInternalFallback.d.ts +4 -0
- package/types/components/icons.d.ts +13 -1
- package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -1
- package/types/components/main-menu/MainMenu.d.ts +12 -11
- package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -1
- package/types/components/welcome-screen/WelcomeScreen.d.ts +2 -3
- package/types/constants.d.ts +73 -10
- package/types/context/tunnels.d.ts +19 -0
- package/types/context/ui-appState.d.ts +4 -0
- package/types/data/blob.d.ts +3 -2
- package/types/data/encode.d.ts +1 -1
- package/types/data/filesystem.d.ts +2 -1
- package/types/data/library.d.ts +3 -45
- package/types/data/restore.d.ts +10 -4
- package/types/data/transform.d.ts +71 -0
- package/types/data/types.d.ts +3 -5
- package/types/data/url.d.ts +7 -0
- package/types/element/Hyperlink.d.ts +39 -19
- package/types/element/binding.d.ts +4 -3
- package/types/element/bounds.d.ts +31 -6
- package/types/element/collision.d.ts +7 -7
- package/types/element/dragElements.d.ts +2 -1
- package/types/element/embeddable.d.ts +153 -0
- package/types/element/image.d.ts +11 -1
- package/types/element/index.d.ts +3 -2
- package/types/element/linearElementEditor.d.ts +32 -16
- package/types/element/mutateElement.d.ts +2 -1
- package/types/element/newElement.d.ts +48 -15
- package/types/element/resizeElements.d.ts +1 -0
- package/types/element/showSelectedShapeActions.d.ts +2 -2
- package/types/element/sizeHelpers.d.ts +8 -1
- package/types/element/sortElements.d.ts +2 -0
- package/types/element/textElement.d.ts +43 -17
- package/types/element/textWysiwyg.d.ts +1 -1
- package/types/element/transformHandles.d.ts +15 -8
- package/types/element/typeChecks.d.ts +5 -2
- package/types/element/types.d.ts +59 -35
- package/types/emitter.d.ts +1 -1
- package/types/errors.d.ts +1 -1
- package/types/frame.d.ts +40 -0
- package/types/ga.d.ts +5 -5
- package/types/groups.d.ts +14 -11
- package/types/history.d.ts +3 -3
- package/types/hooks/useCreatePortalContainer.d.ts +4 -0
- package/types/hooks/useLibraryItemSvg.d.ts +11 -0
- package/types/hooks/useOutsideClick.d.ts +19 -2
- package/types/hooks/useScrollPosition.d.ts +1 -0
- package/types/hooks/useTransition.d.ts +2 -0
- package/types/i18n.d.ts +11 -2
- package/types/jotai.d.ts +20 -108
- package/types/keys.d.ts +4 -1
- package/types/math.d.ts +2 -0
- package/types/packages/excalidraw/example/App.d.ts +7 -1
- package/types/packages/excalidraw/example/initialData.d.ts +182 -64
- package/types/packages/excalidraw/index.d.ts +6 -2
- package/types/packages/excalidraw/webpack.dev.config.d.ts +5 -2
- package/types/packages/excalidraw/webpack.prod.config.d.ts +3 -0
- package/types/packages/utils.d.ts +3 -2
- package/types/renderer/renderElement.d.ts +16 -19
- package/types/renderer/renderScene.d.ts +19 -29
- package/types/renderer/roundRect.d.ts +1 -1
- package/types/scene/Renderer.d.ts +25 -0
- package/types/scene/Scene.d.ts +27 -5
- package/types/scene/ShapeCache.d.ts +24 -0
- package/types/scene/export.d.ts +6 -1
- package/types/scene/scroll.d.ts +1 -1
- package/types/scene/scrollbars.d.ts +2 -6
- package/types/scene/selection.d.ts +26 -6
- package/types/scene/types.d.ts +46 -27
- package/types/types.d.ts +149 -71
- package/types/utility-types.d.ts +24 -0
- package/types/utils.d.ts +73 -27
- package/types/zindex.d.ts +4 -4
- package/types/actions/actionToggleLock.d.ts +0 -119
- package/types/components/ColorPicker.d.ts +0 -14
- package/types/components/LibraryButton.d.ts +0 -8
- package/types/components/SingleLibraryItem.d.ts +0 -10
- package/types/components/hoc/withUpstreamOverride.d.ts +0 -10
- /package/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.js.LICENSE.txt → vendor-d415b28e9024dee4bb1b.js.LICENSE.txt} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.d.ts → vendor-d415b28e9024dee4bb1b.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.d.ts → vendor-a14cd58fa2db417e42b2.d.ts} +0 -0
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
1
7
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
2
8
|
|
|
3
9
|
/**
|
|
@@ -9,3 +15,32 @@
|
|
|
9
15
|
* This source code is licensed under the MIT license found in the
|
|
10
16
|
* LICENSE file in the root directory of this source tree.
|
|
11
17
|
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @license React
|
|
21
|
+
* use-sync-external-store-shim.production.min.js
|
|
22
|
+
*
|
|
23
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
24
|
+
*
|
|
25
|
+
* This source code is licensed under the MIT license found in the
|
|
26
|
+
* LICENSE file in the root directory of this source tree.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @license React
|
|
31
|
+
* use-sync-external-store-shim/with-selector.production.min.js
|
|
32
|
+
*
|
|
33
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
34
|
+
*
|
|
35
|
+
* This source code is licensed under the MIT license found in the
|
|
36
|
+
* LICENSE file in the root directory of this source tree.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/** @license React v17.0.2
|
|
40
|
+
* react-jsx-runtime.production.min.js
|
|
41
|
+
*
|
|
42
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the MIT license found in the
|
|
45
|
+
* LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dwelle/excalidraw",
|
|
3
|
-
"version": "0.4.0-
|
|
3
|
+
"version": "0.4.0-c8d325d",
|
|
4
4
|
"main": "main.js",
|
|
5
5
|
"types": "types/packages/excalidraw/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -45,19 +45,23 @@
|
|
|
45
45
|
"@babel/preset-env": "7.18.6",
|
|
46
46
|
"@babel/preset-react": "7.18.6",
|
|
47
47
|
"@babel/preset-typescript": "7.18.6",
|
|
48
|
+
"@size-limit/preset-big-lib": "8.2.6",
|
|
48
49
|
"autoprefixer": "10.4.7",
|
|
49
50
|
"babel-loader": "8.2.5",
|
|
50
51
|
"babel-plugin-transform-class-properties": "6.24.1",
|
|
51
52
|
"cross-env": "7.0.3",
|
|
52
53
|
"css-loader": "6.7.1",
|
|
53
54
|
"dotenv": "16.0.1",
|
|
55
|
+
"import-meta-loader": "1.1.0",
|
|
54
56
|
"mini-css-extract-plugin": "2.6.1",
|
|
55
57
|
"postcss-loader": "7.0.1",
|
|
56
58
|
"sass-loader": "13.0.2",
|
|
59
|
+
"size-limit": "8.2.4",
|
|
60
|
+
"style-loader": "3.3.3",
|
|
57
61
|
"terser-webpack-plugin": "5.3.3",
|
|
58
62
|
"ts-loader": "9.3.1",
|
|
59
|
-
"typescript": "4.
|
|
60
|
-
"webpack": "5.
|
|
63
|
+
"typescript": "4.9.4",
|
|
64
|
+
"webpack": "5.76.0",
|
|
61
65
|
"webpack-bundle-analyzer": "4.5.0",
|
|
62
66
|
"webpack-cli": "4.10.0",
|
|
63
67
|
"webpack-dev-server": "4.9.3",
|
|
@@ -72,6 +76,7 @@
|
|
|
72
76
|
"pack": "yarn build:umd && yarn pack",
|
|
73
77
|
"start": "webpack serve --config webpack.dev-server.config.js",
|
|
74
78
|
"install:deps": "yarn install --frozen-lockfile && yarn --cwd ../../../",
|
|
75
|
-
"build:example": "EXAMPLE=true webpack --config webpack.dev-server.config.js && yarn gen:types"
|
|
79
|
+
"build:example": "EXAMPLE=true webpack --config webpack.dev-server.config.js && yarn gen:types",
|
|
80
|
+
"size": "yarn build:umd && size-limit"
|
|
76
81
|
}
|
|
77
82
|
}
|
|
@@ -16,7 +16,11 @@ export declare const actionAddToLibrary: {
|
|
|
16
16
|
} | null;
|
|
17
17
|
showWelcomeScreen: boolean;
|
|
18
18
|
isLoading: boolean;
|
|
19
|
-
errorMessage:
|
|
19
|
+
errorMessage: import("react").ReactNode;
|
|
20
|
+
activeEmbeddable: {
|
|
21
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
22
|
+
state: "active" | "hover";
|
|
23
|
+
} | null;
|
|
20
24
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
21
25
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
26
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -24,13 +28,22 @@ export declare const actionAddToLibrary: {
|
|
|
24
28
|
isBindingEnabled: boolean;
|
|
25
29
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
26
30
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
31
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
32
|
+
frameRendering: {
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
name: boolean;
|
|
35
|
+
outline: boolean;
|
|
36
|
+
clip: boolean;
|
|
37
|
+
};
|
|
38
|
+
editingFrame: string | null;
|
|
39
|
+
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
27
40
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
28
41
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
29
42
|
activeTool: {
|
|
30
43
|
lastActiveTool: import("../types").LastActiveTool;
|
|
31
44
|
locked: boolean;
|
|
32
45
|
} & ({
|
|
33
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
46
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
34
47
|
customType: null;
|
|
35
48
|
} | {
|
|
36
49
|
type: "custom";
|
|
@@ -67,20 +80,24 @@ export declare const actionAddToLibrary: {
|
|
|
67
80
|
value: import("../types").NormalizedZoomValue;
|
|
68
81
|
}>;
|
|
69
82
|
openMenu: "canvas" | "shape" | null;
|
|
70
|
-
openPopup: "
|
|
71
|
-
openSidebar:
|
|
83
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
84
|
+
openSidebar: {
|
|
85
|
+
name: string;
|
|
86
|
+
tab?: string | undefined;
|
|
87
|
+
} | null;
|
|
72
88
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
73
|
-
|
|
89
|
+
defaultSidebarDockedPreference: boolean;
|
|
74
90
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
75
|
-
selectedElementIds: {
|
|
76
|
-
[id: string]:
|
|
77
|
-
}
|
|
91
|
+
selectedElementIds: Readonly<{
|
|
92
|
+
[id: string]: true;
|
|
93
|
+
}>;
|
|
78
94
|
previousSelectedElementIds: {
|
|
79
|
-
[id: string]:
|
|
95
|
+
[id: string]: true;
|
|
80
96
|
};
|
|
97
|
+
selectedElementsAreBeingDragged: boolean;
|
|
81
98
|
shouldCacheIgnoreZoom: boolean;
|
|
82
99
|
zenModeEnabled: boolean;
|
|
83
|
-
theme:
|
|
100
|
+
theme: import("../element/types").Theme;
|
|
84
101
|
gridSize: number | null;
|
|
85
102
|
viewModeEnabled: boolean;
|
|
86
103
|
selectedGroupIds: {
|
|
@@ -103,7 +120,7 @@ export declare const actionAddToLibrary: {
|
|
|
103
120
|
data: import("../charts").Spreadsheet;
|
|
104
121
|
};
|
|
105
122
|
pendingImageElementId: string | null;
|
|
106
|
-
showHyperlinkPopup: false | "
|
|
123
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
107
124
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
108
125
|
};
|
|
109
126
|
} | {
|
|
@@ -117,6 +134,10 @@ export declare const actionAddToLibrary: {
|
|
|
117
134
|
} | null;
|
|
118
135
|
showWelcomeScreen: boolean;
|
|
119
136
|
isLoading: boolean;
|
|
137
|
+
activeEmbeddable: {
|
|
138
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
139
|
+
state: "active" | "hover";
|
|
140
|
+
} | null;
|
|
120
141
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
121
142
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
122
143
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -124,13 +145,22 @@ export declare const actionAddToLibrary: {
|
|
|
124
145
|
isBindingEnabled: boolean;
|
|
125
146
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
126
147
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
148
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
149
|
+
frameRendering: {
|
|
150
|
+
enabled: boolean;
|
|
151
|
+
name: boolean;
|
|
152
|
+
outline: boolean;
|
|
153
|
+
clip: boolean;
|
|
154
|
+
};
|
|
155
|
+
editingFrame: string | null;
|
|
156
|
+
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
127
157
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
128
158
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
129
159
|
activeTool: {
|
|
130
160
|
lastActiveTool: import("../types").LastActiveTool;
|
|
131
161
|
locked: boolean;
|
|
132
162
|
} & ({
|
|
133
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
163
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
134
164
|
customType: null;
|
|
135
165
|
} | {
|
|
136
166
|
type: "custom";
|
|
@@ -167,17 +197,21 @@ export declare const actionAddToLibrary: {
|
|
|
167
197
|
value: import("../types").NormalizedZoomValue;
|
|
168
198
|
}>;
|
|
169
199
|
openMenu: "canvas" | "shape" | null;
|
|
170
|
-
openPopup: "
|
|
171
|
-
openSidebar:
|
|
200
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
201
|
+
openSidebar: {
|
|
202
|
+
name: string;
|
|
203
|
+
tab?: string | undefined;
|
|
204
|
+
} | null;
|
|
172
205
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
173
|
-
|
|
206
|
+
defaultSidebarDockedPreference: boolean;
|
|
174
207
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
175
|
-
selectedElementIds: {
|
|
176
|
-
[id: string]:
|
|
177
|
-
}
|
|
208
|
+
selectedElementIds: Readonly<{
|
|
209
|
+
[id: string]: true;
|
|
210
|
+
}>;
|
|
178
211
|
previousSelectedElementIds: {
|
|
179
|
-
[id: string]:
|
|
212
|
+
[id: string]: true;
|
|
180
213
|
};
|
|
214
|
+
selectedElementsAreBeingDragged: boolean;
|
|
181
215
|
shouldCacheIgnoreZoom: boolean;
|
|
182
216
|
toast: {
|
|
183
217
|
message: string;
|
|
@@ -185,7 +219,7 @@ export declare const actionAddToLibrary: {
|
|
|
185
219
|
duration?: number | undefined;
|
|
186
220
|
} | null;
|
|
187
221
|
zenModeEnabled: boolean;
|
|
188
|
-
theme:
|
|
222
|
+
theme: import("../element/types").Theme;
|
|
189
223
|
gridSize: number | null;
|
|
190
224
|
viewModeEnabled: boolean;
|
|
191
225
|
selectedGroupIds: {
|
|
@@ -208,7 +242,7 @@ export declare const actionAddToLibrary: {
|
|
|
208
242
|
data: import("../charts").Spreadsheet;
|
|
209
243
|
};
|
|
210
244
|
pendingImageElementId: string | null;
|
|
211
|
-
showHyperlinkPopup: false | "
|
|
245
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
212
246
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
213
247
|
};
|
|
214
248
|
}> | {
|
|
@@ -222,6 +256,10 @@ export declare const actionAddToLibrary: {
|
|
|
222
256
|
} | null;
|
|
223
257
|
showWelcomeScreen: boolean;
|
|
224
258
|
isLoading: boolean;
|
|
259
|
+
activeEmbeddable: {
|
|
260
|
+
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
261
|
+
state: "active" | "hover";
|
|
262
|
+
} | null;
|
|
225
263
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
226
264
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
227
265
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
@@ -229,13 +267,22 @@ export declare const actionAddToLibrary: {
|
|
|
229
267
|
isBindingEnabled: boolean;
|
|
230
268
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
231
269
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
270
|
+
frameToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawFrameElement> | null;
|
|
271
|
+
frameRendering: {
|
|
272
|
+
enabled: boolean;
|
|
273
|
+
name: boolean;
|
|
274
|
+
outline: boolean;
|
|
275
|
+
clip: boolean;
|
|
276
|
+
};
|
|
277
|
+
editingFrame: string | null;
|
|
278
|
+
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
232
279
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
233
280
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
234
281
|
activeTool: {
|
|
235
282
|
lastActiveTool: import("../types").LastActiveTool;
|
|
236
283
|
locked: boolean;
|
|
237
284
|
} & ({
|
|
238
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
285
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
239
286
|
customType: null;
|
|
240
287
|
} | {
|
|
241
288
|
type: "custom";
|
|
@@ -272,17 +319,21 @@ export declare const actionAddToLibrary: {
|
|
|
272
319
|
value: import("../types").NormalizedZoomValue;
|
|
273
320
|
}>;
|
|
274
321
|
openMenu: "canvas" | "shape" | null;
|
|
275
|
-
openPopup: "
|
|
276
|
-
openSidebar:
|
|
322
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
323
|
+
openSidebar: {
|
|
324
|
+
name: string;
|
|
325
|
+
tab?: string | undefined;
|
|
326
|
+
} | null;
|
|
277
327
|
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
278
|
-
|
|
328
|
+
defaultSidebarDockedPreference: boolean;
|
|
279
329
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
280
|
-
selectedElementIds: {
|
|
281
|
-
[id: string]:
|
|
282
|
-
}
|
|
330
|
+
selectedElementIds: Readonly<{
|
|
331
|
+
[id: string]: true;
|
|
332
|
+
}>;
|
|
283
333
|
previousSelectedElementIds: {
|
|
284
|
-
[id: string]:
|
|
334
|
+
[id: string]: true;
|
|
285
335
|
};
|
|
336
|
+
selectedElementsAreBeingDragged: boolean;
|
|
286
337
|
shouldCacheIgnoreZoom: boolean;
|
|
287
338
|
toast: {
|
|
288
339
|
message: string;
|
|
@@ -290,7 +341,7 @@ export declare const actionAddToLibrary: {
|
|
|
290
341
|
duration?: number | undefined;
|
|
291
342
|
} | null;
|
|
292
343
|
zenModeEnabled: boolean;
|
|
293
|
-
theme:
|
|
344
|
+
theme: import("../element/types").Theme;
|
|
294
345
|
gridSize: number | null;
|
|
295
346
|
viewModeEnabled: boolean;
|
|
296
347
|
selectedGroupIds: {
|
|
@@ -313,7 +364,7 @@ export declare const actionAddToLibrary: {
|
|
|
313
364
|
data: import("../charts").Spreadsheet;
|
|
314
365
|
};
|
|
315
366
|
pendingImageElementId: string | null;
|
|
316
|
-
showHyperlinkPopup: false | "
|
|
367
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
317
368
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
318
369
|
};
|
|
319
370
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ExcalidrawElement } from "../element/types";
|
|
3
|
-
import { AppState } from "../types";
|
|
2
|
+
import { AppClassProperties, AppState } from "../types";
|
|
4
3
|
export declare const actionAlignTop: {
|
|
5
4
|
name: "alignTop";
|
|
6
5
|
trackEvent: {
|
|
7
6
|
category: "element";
|
|
8
7
|
};
|
|
9
|
-
|
|
8
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
9
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
10
10
|
appState: Readonly<AppState>;
|
|
11
|
-
elements:
|
|
11
|
+
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
12
12
|
commitToHistory: true;
|
|
13
13
|
};
|
|
14
14
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
15
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
15
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
16
16
|
} & {
|
|
17
17
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
18
18
|
};
|
|
@@ -21,13 +21,14 @@ export declare const actionAlignBottom: {
|
|
|
21
21
|
trackEvent: {
|
|
22
22
|
category: "element";
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
25
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
25
26
|
appState: Readonly<AppState>;
|
|
26
|
-
elements:
|
|
27
|
+
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
27
28
|
commitToHistory: true;
|
|
28
29
|
};
|
|
29
30
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
30
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
31
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
31
32
|
} & {
|
|
32
33
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
33
34
|
};
|
|
@@ -36,13 +37,14 @@ export declare const actionAlignLeft: {
|
|
|
36
37
|
trackEvent: {
|
|
37
38
|
category: "element";
|
|
38
39
|
};
|
|
39
|
-
|
|
40
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
41
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
40
42
|
appState: Readonly<AppState>;
|
|
41
|
-
elements:
|
|
43
|
+
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
42
44
|
commitToHistory: true;
|
|
43
45
|
};
|
|
44
46
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
45
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
47
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
46
48
|
} & {
|
|
47
49
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
48
50
|
};
|
|
@@ -51,13 +53,14 @@ export declare const actionAlignRight: {
|
|
|
51
53
|
trackEvent: {
|
|
52
54
|
category: "element";
|
|
53
55
|
};
|
|
54
|
-
|
|
56
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
57
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
55
58
|
appState: Readonly<AppState>;
|
|
56
|
-
elements:
|
|
59
|
+
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
57
60
|
commitToHistory: true;
|
|
58
61
|
};
|
|
59
62
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
60
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
63
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
61
64
|
} & {
|
|
62
65
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
63
66
|
};
|
|
@@ -66,12 +69,13 @@ export declare const actionAlignVerticallyCentered: {
|
|
|
66
69
|
trackEvent: {
|
|
67
70
|
category: "element";
|
|
68
71
|
};
|
|
69
|
-
|
|
72
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
73
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
70
74
|
appState: Readonly<AppState>;
|
|
71
|
-
elements:
|
|
75
|
+
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
72
76
|
commitToHistory: true;
|
|
73
77
|
};
|
|
74
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
78
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
75
79
|
} & {
|
|
76
80
|
keyTest?: undefined;
|
|
77
81
|
};
|
|
@@ -80,12 +84,13 @@ export declare const actionAlignHorizontallyCentered: {
|
|
|
80
84
|
trackEvent: {
|
|
81
85
|
category: "element";
|
|
82
86
|
};
|
|
83
|
-
|
|
87
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
88
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
84
89
|
appState: Readonly<AppState>;
|
|
85
|
-
elements:
|
|
90
|
+
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
86
91
|
commitToHistory: true;
|
|
87
92
|
};
|
|
88
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
93
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
89
94
|
} & {
|
|
90
95
|
keyTest?: undefined;
|
|
91
96
|
};
|