@excalidraw/excalidraw 0.18.0-58f7d33 → 0.18.0-5fffc47
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/chunk-CP5DND7P.js +7 -0
- package/dist/dev/chunk-CP5DND7P.js.map +7 -0
- package/dist/dev/{chunk-X3RYHLJU.js → chunk-PWQMCSHA.js} +26 -8
- package/dist/dev/chunk-PWQMCSHA.js.map +7 -0
- package/dist/dev/chunk-YMRX7R7U.js +5671 -0
- package/dist/dev/chunk-YMRX7R7U.js.map +7 -0
- package/dist/dev/data/{image-U2IPNUKJ.js → image-L23D26XS.js} +3 -3
- package/dist/dev/index.css +964 -501
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +11915 -10771
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/locales/{en-CKWC2GMK.js → en-V3NQTBPG.js} +2 -2
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/chunk-A66AFZZU.js +7 -0
- package/dist/prod/chunk-GF46JCB3.js +12 -0
- package/dist/prod/chunk-HT4FKTIQ.js +4 -0
- package/dist/prod/data/image-NWF7UX55.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +25 -17
- package/dist/prod/locales/{en-SBO6ZHT2.js → en-LQE6K457.js} +1 -1
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/common/src/constants.d.ts +44 -7
- package/dist/types/{excalidraw → common/src}/emitter.d.ts +1 -1
- package/dist/types/common/src/font-metadata.d.ts +4 -2
- package/dist/types/common/src/index.d.ts +1 -0
- package/dist/types/common/src/utility-types.d.ts +5 -0
- package/dist/types/common/src/utils.d.ts +20 -4
- package/dist/types/{excalidraw/scene → element/src}/Scene.d.ts +16 -15
- package/dist/types/element/src/align.d.ts +4 -3
- package/dist/types/element/src/binding.d.ts +26 -16
- package/dist/types/element/src/bounds.d.ts +14 -6
- package/dist/types/element/src/collision.d.ts +18 -12
- package/dist/types/element/src/cropElement.d.ts +1 -1
- package/dist/types/{excalidraw/change.d.ts → element/src/delta.d.ts} +77 -40
- package/dist/types/element/src/distance.d.ts +2 -2
- package/dist/types/element/src/distribute.d.ts +2 -1
- package/dist/types/element/src/dragElements.d.ts +3 -2
- package/dist/types/element/src/duplicate.d.ts +10 -13
- package/dist/types/element/src/elbowArrow.d.ts +1 -1
- package/dist/types/element/src/flowchart.d.ts +3 -2
- package/dist/types/element/src/fractionalIndex.d.ts +9 -3
- package/dist/types/element/src/frame.d.ts +5 -4
- package/dist/types/element/src/groups.d.ts +1 -0
- package/dist/types/element/src/index.d.ts +44 -2
- package/dist/types/element/src/linearElementEditor.d.ts +23 -36
- package/dist/types/element/src/mutateElement.d.ts +11 -3
- package/dist/types/element/src/newElement.d.ts +4 -3
- 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/resizeElements.d.ts +5 -4
- package/dist/types/element/src/selection.d.ts +11 -5
- package/dist/types/element/src/shape.d.ts +42 -0
- package/dist/types/element/src/sizeHelpers.d.ts +2 -2
- package/dist/types/element/src/store.d.ts +237 -0
- package/dist/types/element/src/textElement.d.ts +4 -3
- package/dist/types/element/src/typeChecks.d.ts +19 -1
- package/dist/types/element/src/types.d.ts +15 -2
- package/dist/types/element/src/utils.d.ts +16 -6
- package/dist/types/element/src/zindex.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +57 -54
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +38 -36
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +256 -242
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +114 -106
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +19 -18
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +57 -53
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +18 -17
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +53 -52
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +19 -18
- package/dist/types/excalidraw/actions/actionExport.d.ts +181 -172
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +85 -42
- package/dist/types/excalidraw/actions/actionFrame.d.ts +123 -119
- package/dist/types/excalidraw/actions/actionGroup.d.ts +38 -36
- package/dist/types/excalidraw/actions/actionHistory.d.ts +1 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +545 -20
- package/dist/types/excalidraw/actions/actionLink.d.ts +18 -17
- package/dist/types/excalidraw/actions/actionMenu.d.ts +18 -391
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +38 -36
- package/dist/types/excalidraw/actions/actionProperties.d.ts +305 -273
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +19 -18
- package/dist/types/excalidraw/actions/actionStyles.d.ts +19 -18
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +19 -18
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +19 -18
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +18 -190
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +19 -18
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +19 -18
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +19 -18
- package/dist/types/excalidraw/actions/index.d.ts +2 -2
- package/dist/types/excalidraw/actions/types.d.ts +4 -3
- package/dist/types/excalidraw/appState.d.ts +23 -10
- package/dist/types/excalidraw/clipboard.d.ts +64 -1
- package/dist/types/excalidraw/components/Actions.d.ts +17 -7
- package/dist/types/excalidraw/components/App.d.ts +35 -22
- package/dist/types/excalidraw/components/ButtonIcon.d.ts +1 -0
- package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -1
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +6 -1
- package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +4 -3
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +3 -3
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +3 -2
- package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +1 -1
- package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +23 -0
- package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +4 -3
- 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/FontPicker/FontPicker.d.ts +2 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
- 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/PropertiesPopover.d.ts +1 -0
- package/dist/types/excalidraw/components/{ButtonIconSelect.d.ts → RadioSelection.d.ts} +1 -1
- package/dist/types/excalidraw/components/Range.d.ts +3 -3
- package/dist/types/excalidraw/components/Stats/Angle.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +2 -1
- package/dist/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/DragInput.d.ts +12 -2
- package/dist/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/Position.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/utils.d.ts +4 -11
- 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/UnlockPopup.d.ts +8 -0
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +1 -0
- 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/hyperlink/Hyperlink.d.ts +3 -2
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +2 -1
- package/dist/types/excalidraw/components/icons.d.ts +8 -0
- 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/transform.d.ts +1 -1
- package/dist/types/excalidraw/data/types.d.ts +4 -1
- package/dist/types/excalidraw/editor-jotai.d.ts +6 -6
- package/dist/types/excalidraw/eraser/index.d.ts +0 -2
- package/dist/types/excalidraw/fonts/Fonts.d.ts +1 -1
- package/dist/types/excalidraw/history.d.ts +30 -22
- package/dist/types/excalidraw/hooks/useEmitter.d.ts +1 -1
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
- package/dist/types/excalidraw/index.d.ts +11 -10
- package/dist/types/excalidraw/lasso/index.d.ts +1 -0
- package/dist/types/excalidraw/lasso/utils.d.ts +2 -1
- package/dist/types/excalidraw/renderer/helpers.d.ts +7 -2
- package/dist/types/excalidraw/renderer/staticScene.d.ts +4 -1
- package/dist/types/excalidraw/scene/Renderer.d.ts +1 -2
- package/dist/types/excalidraw/scene/index.d.ts +2 -2
- package/dist/types/excalidraw/scene/scrollbars.d.ts +2 -3
- package/dist/types/excalidraw/scene/types.d.ts +2 -0
- package/dist/types/excalidraw/snapping.d.ts +2 -2
- package/dist/types/excalidraw/types.d.ts +46 -16
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +3 -1
- package/dist/types/math/src/angle.d.ts +2 -0
- package/dist/types/math/src/constants.d.ts +3 -0
- package/dist/types/math/src/curve.d.ts +34 -0
- package/dist/types/math/src/index.d.ts +1 -0
- package/dist/types/math/src/point.d.ts +1 -1
- package/dist/types/math/src/rectangle.d.ts +2 -0
- package/dist/types/math/src/segment.d.ts +1 -0
- package/dist/types/math/src/vector.d.ts +8 -2
- package/dist/types/utils/src/bbox.d.ts +1 -1
- package/dist/types/utils/src/index.d.ts +1 -1
- package/dist/types/utils/src/withinBounds.d.ts +1 -1
- package/history.ts +146 -109
- package/package.json +13 -10
- package/dist/dev/chunk-KKJLIRJU.js +0 -7
- package/dist/dev/chunk-KKJLIRJU.js.map +0 -7
- package/dist/dev/chunk-LEJJ2YZY.js +0 -18711
- package/dist/dev/chunk-LEJJ2YZY.js.map +0 -7
- package/dist/dev/chunk-X3RYHLJU.js.map +0 -7
- package/dist/prod/chunk-IUH5AXLB.js +0 -12
- package/dist/prod/chunk-QUX7WTVH.js +0 -7
- package/dist/prod/chunk-RQK6WG4F.js +0 -33
- package/dist/prod/data/image-UQDATCXC.js +0 -1
- package/dist/types/element/src/Shape.d.ts +0 -17
- package/dist/types/element/src/ShapeCache.d.ts +0 -25
- package/dist/types/element/src/shapes.d.ts +0 -23
- package/dist/types/excalidraw/components/ButtonSelect.d.ts +0 -9
- package/dist/types/excalidraw/store.d.ts +0 -129
- package/dist/types/excalidraw/visualdebug.d.ts +0 -41
- package/dist/types/utils/src/collision.d.ts +0 -8
- /package/dist/dev/data/{image-U2IPNUKJ.js.map → image-L23D26XS.js.map} +0 -0
- /package/dist/dev/locales/{en-CKWC2GMK.js.map → en-V3NQTBPG.js.map} +0 -0
|
@@ -24,7 +24,7 @@ export declare const actionToggleStats: {
|
|
|
24
24
|
errorMessage: import("react").ReactNode;
|
|
25
25
|
activeEmbeddable: {
|
|
26
26
|
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
27
|
-
state: "
|
|
27
|
+
state: "active" | "hover";
|
|
28
28
|
} | null;
|
|
29
29
|
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
30
30
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -32,7 +32,7 @@ export declare const actionToggleStats: {
|
|
|
32
32
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
33
33
|
isBindingEnabled: boolean;
|
|
34
34
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
35
|
-
suggestedBindings: import("@excalidraw/element
|
|
35
|
+
suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
|
|
36
36
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
37
37
|
frameRendering: {
|
|
38
38
|
enabled: boolean;
|
|
@@ -43,12 +43,15 @@ export declare const actionToggleStats: {
|
|
|
43
43
|
editingFrame: string | null;
|
|
44
44
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
45
45
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
46
|
-
editingLinearElement: import("@excalidraw/element/linearElementEditor").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: "
|
|
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;
|
|
@@ -91,7 +94,7 @@ export declare const actionToggleStats: {
|
|
|
91
94
|
name: "imageExport" | "help" | "jsonExport";
|
|
92
95
|
} | {
|
|
93
96
|
name: "ttd";
|
|
94
|
-
tab: "text-to-diagram"
|
|
97
|
+
tab: "mermaid" | "text-to-diagram";
|
|
95
98
|
} | {
|
|
96
99
|
name: "commandPalette";
|
|
97
100
|
} | {
|
|
@@ -159,9 +162,8 @@ export declare const actionToggleStats: {
|
|
|
159
162
|
shown: true;
|
|
160
163
|
data: import("../charts").Spreadsheet;
|
|
161
164
|
};
|
|
162
|
-
pendingImageElementId: string | null;
|
|
163
165
|
showHyperlinkPopup: false | "editor" | "info";
|
|
164
|
-
selectedLinearElement: import("@excalidraw/element
|
|
166
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
165
167
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
166
168
|
originSnapOffset: {
|
|
167
169
|
x: number;
|
|
@@ -172,16 +174,15 @@ export declare const actionToggleStats: {
|
|
|
172
174
|
followedBy: Set<import("../types").SocketId>;
|
|
173
175
|
isCropping: boolean;
|
|
174
176
|
croppingElementId: string | null;
|
|
175
|
-
searchMatches:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}[];
|
|
177
|
+
searchMatches: Readonly<{
|
|
178
|
+
focusedId: string | null;
|
|
179
|
+
matches: readonly import("../types").SearchMatch[];
|
|
180
|
+
}> | null;
|
|
181
|
+
activeLockedId: string | null;
|
|
182
|
+
lockedMultiSelections: {
|
|
183
|
+
[groupId: string]: true;
|
|
184
|
+
};
|
|
185
|
+
stylesPanelMode: "compact" | "full" | "mobile";
|
|
185
186
|
};
|
|
186
187
|
captureUpdate: "EVENTUALLY";
|
|
187
188
|
};
|
|
@@ -21,7 +21,7 @@ export declare const actionToggleViewMode: {
|
|
|
21
21
|
errorMessage: import("react").ReactNode;
|
|
22
22
|
activeEmbeddable: {
|
|
23
23
|
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
24
|
-
state: "
|
|
24
|
+
state: "active" | "hover";
|
|
25
25
|
} | null;
|
|
26
26
|
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
27
27
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -29,7 +29,7 @@ export declare const actionToggleViewMode: {
|
|
|
29
29
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
30
30
|
isBindingEnabled: boolean;
|
|
31
31
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
32
|
-
suggestedBindings: import("@excalidraw/element
|
|
32
|
+
suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
|
|
33
33
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
34
34
|
frameRendering: {
|
|
35
35
|
enabled: boolean;
|
|
@@ -40,12 +40,15 @@ export declare const actionToggleViewMode: {
|
|
|
40
40
|
editingFrame: string | null;
|
|
41
41
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
42
42
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
43
|
-
editingLinearElement: import("@excalidraw/element/linearElementEditor").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: "
|
|
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;
|
|
@@ -88,7 +91,7 @@ export declare const actionToggleViewMode: {
|
|
|
88
91
|
name: "imageExport" | "help" | "jsonExport";
|
|
89
92
|
} | {
|
|
90
93
|
name: "ttd";
|
|
91
|
-
tab: "text-to-diagram"
|
|
94
|
+
tab: "mermaid" | "text-to-diagram";
|
|
92
95
|
} | {
|
|
93
96
|
name: "commandPalette";
|
|
94
97
|
} | {
|
|
@@ -159,9 +162,8 @@ export declare const actionToggleViewMode: {
|
|
|
159
162
|
shown: true;
|
|
160
163
|
data: import("../charts").Spreadsheet;
|
|
161
164
|
};
|
|
162
|
-
pendingImageElementId: string | null;
|
|
163
165
|
showHyperlinkPopup: false | "editor" | "info";
|
|
164
|
-
selectedLinearElement: import("@excalidraw/element
|
|
166
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
165
167
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
166
168
|
originSnapOffset: {
|
|
167
169
|
x: number;
|
|
@@ -172,16 +174,15 @@ export declare const actionToggleViewMode: {
|
|
|
172
174
|
followedBy: Set<import("../types").SocketId>;
|
|
173
175
|
isCropping: boolean;
|
|
174
176
|
croppingElementId: string | null;
|
|
175
|
-
searchMatches:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}[];
|
|
177
|
+
searchMatches: Readonly<{
|
|
178
|
+
focusedId: string | null;
|
|
179
|
+
matches: readonly import("../types").SearchMatch[];
|
|
180
|
+
}> | null;
|
|
181
|
+
activeLockedId: string | null;
|
|
182
|
+
lockedMultiSelections: {
|
|
183
|
+
[groupId: string]: true;
|
|
184
|
+
};
|
|
185
|
+
stylesPanelMode: "compact" | "full" | "mobile";
|
|
185
186
|
};
|
|
186
187
|
captureUpdate: "EVENTUALLY";
|
|
187
188
|
};
|
|
@@ -21,7 +21,7 @@ export declare const actionToggleZenMode: {
|
|
|
21
21
|
errorMessage: import("react").ReactNode;
|
|
22
22
|
activeEmbeddable: {
|
|
23
23
|
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
24
|
-
state: "
|
|
24
|
+
state: "active" | "hover";
|
|
25
25
|
} | null;
|
|
26
26
|
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
27
27
|
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -29,7 +29,7 @@ export declare const actionToggleZenMode: {
|
|
|
29
29
|
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
30
30
|
isBindingEnabled: boolean;
|
|
31
31
|
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
32
|
-
suggestedBindings: import("@excalidraw/element
|
|
32
|
+
suggestedBindings: import("@excalidraw/element").SuggestedBinding[];
|
|
33
33
|
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
34
34
|
frameRendering: {
|
|
35
35
|
enabled: boolean;
|
|
@@ -40,12 +40,15 @@ export declare const actionToggleZenMode: {
|
|
|
40
40
|
editingFrame: string | null;
|
|
41
41
|
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawElement>[] | null;
|
|
42
42
|
editingTextElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
43
|
-
editingLinearElement: import("@excalidraw/element/linearElementEditor").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: "
|
|
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;
|
|
@@ -88,7 +91,7 @@ export declare const actionToggleZenMode: {
|
|
|
88
91
|
name: "imageExport" | "help" | "jsonExport";
|
|
89
92
|
} | {
|
|
90
93
|
name: "ttd";
|
|
91
|
-
tab: "text-to-diagram"
|
|
94
|
+
tab: "mermaid" | "text-to-diagram";
|
|
92
95
|
} | {
|
|
93
96
|
name: "commandPalette";
|
|
94
97
|
} | {
|
|
@@ -159,9 +162,8 @@ export declare const actionToggleZenMode: {
|
|
|
159
162
|
shown: true;
|
|
160
163
|
data: import("../charts").Spreadsheet;
|
|
161
164
|
};
|
|
162
|
-
pendingImageElementId: string | null;
|
|
163
165
|
showHyperlinkPopup: false | "editor" | "info";
|
|
164
|
-
selectedLinearElement: import("@excalidraw/element
|
|
166
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
165
167
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
166
168
|
originSnapOffset: {
|
|
167
169
|
x: number;
|
|
@@ -172,16 +174,15 @@ export declare const actionToggleZenMode: {
|
|
|
172
174
|
followedBy: Set<import("../types").SocketId>;
|
|
173
175
|
isCropping: boolean;
|
|
174
176
|
croppingElementId: string | null;
|
|
175
|
-
searchMatches:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}[];
|
|
177
|
+
searchMatches: Readonly<{
|
|
178
|
+
focusedId: string | null;
|
|
179
|
+
matches: readonly import("../types").SearchMatch[];
|
|
180
|
+
}> | null;
|
|
181
|
+
activeLockedId: string | null;
|
|
182
|
+
lockedMultiSelections: {
|
|
183
|
+
[groupId: string]: true;
|
|
184
|
+
};
|
|
185
|
+
stylesPanelMode: "compact" | "full" | "mobile";
|
|
185
186
|
};
|
|
186
187
|
captureUpdate: "EVENTUALLY";
|
|
187
188
|
};
|
|
@@ -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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement, OrderedExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type { CaptureUpdateActionType } from "
|
|
2
|
+
import type { CaptureUpdateActionType } from "@excalidraw/element";
|
|
3
3
|
import type { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles, UIAppState } from "../types";
|
|
4
4
|
import type React from "react";
|
|
5
5
|
export type ActionSource = "ui" | "keyboard" | "contextMenu" | "api" | "commandPalette";
|
|
@@ -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;
|
|
@@ -22,6 +22,7 @@ export type PanelComponentProps = {
|
|
|
22
22
|
appProps: ExcalidrawProps;
|
|
23
23
|
data?: Record<string, any>;
|
|
24
24
|
app: AppClassProperties;
|
|
25
|
+
renderAction: (name: ActionName, data?: PanelComponentProps["data"]) => React.JSX.Element | null;
|
|
25
26
|
};
|
|
26
27
|
export interface Action {
|
|
27
28
|
name: ActionName;
|
|
@@ -35,7 +36,7 @@ export interface Action {
|
|
|
35
36
|
predicate?: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
36
37
|
checked?: (appState: Readonly<AppState>) => boolean;
|
|
37
38
|
trackEvent: false | {
|
|
38
|
-
category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink" | "search_menu";
|
|
39
|
+
category: "toolbar" | "element" | "canvas" | "export" | "history" | "menu" | "collab" | "hyperlink" | "search_menu" | "shape_switch";
|
|
39
40
|
action?: string;
|
|
40
41
|
predicate?: (appState: Readonly<AppState>, elements: readonly ExcalidrawElement[], value: any) => boolean;
|
|
41
42
|
};
|
|
@@ -16,25 +16,24 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
16
16
|
selectedGroupIds?: {
|
|
17
17
|
[groupId: string]: boolean;
|
|
18
18
|
} | undefined;
|
|
19
|
-
selectedLinearElement?: import("@excalidraw/element
|
|
19
|
+
selectedLinearElement?: import("@excalidraw/element").LinearElementEditor | null | undefined;
|
|
20
20
|
zenModeEnabled?: boolean | undefined;
|
|
21
|
-
gridModeEnabled?: boolean | undefined;
|
|
22
|
-
objectsSnapModeEnabled?: boolean | undefined;
|
|
23
|
-
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
24
|
-
exportScale?: number | undefined;
|
|
25
|
-
gridSize?: number | undefined;
|
|
26
|
-
gridStep?: number | undefined;
|
|
27
21
|
showWelcomeScreen?: boolean | undefined;
|
|
28
22
|
activeTool?: ({
|
|
29
23
|
lastActiveTool: import("./types").ActiveTool | null;
|
|
30
24
|
locked: boolean;
|
|
31
25
|
fromSelection: boolean;
|
|
32
26
|
} & import("./types").ActiveTool) | undefined;
|
|
27
|
+
preferredSelectionTool?: {
|
|
28
|
+
type: "selection" | "lasso";
|
|
29
|
+
initialized: boolean;
|
|
30
|
+
} | undefined;
|
|
33
31
|
penMode?: boolean | undefined;
|
|
34
32
|
penDetected?: boolean | undefined;
|
|
35
33
|
exportBackground?: boolean | undefined;
|
|
36
34
|
exportEmbedScene?: boolean | undefined;
|
|
37
35
|
exportWithDarkMode?: boolean | undefined;
|
|
36
|
+
exportScale?: number | undefined;
|
|
38
37
|
currentItemStrokeColor?: string | undefined;
|
|
39
38
|
currentItemBackgroundColor?: string | undefined;
|
|
40
39
|
currentItemFillStyle?: import("@excalidraw/element/types").FillStyle | undefined;
|
|
@@ -51,7 +50,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
51
50
|
currentItemArrowType?: "round" | "sharp" | "elbow" | undefined;
|
|
52
51
|
cursorButton?: "up" | "down" | undefined;
|
|
53
52
|
scrolledOutside?: boolean | undefined;
|
|
54
|
-
openMenu?: "
|
|
53
|
+
openMenu?: "canvas" | null | undefined;
|
|
55
54
|
openSidebar?: {
|
|
56
55
|
name: string;
|
|
57
56
|
tab?: string | undefined;
|
|
@@ -61,23 +60,37 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
61
60
|
previousSelectedElementIds?: {
|
|
62
61
|
[id: string]: true;
|
|
63
62
|
} | undefined;
|
|
63
|
+
shouldCacheIgnoreZoom?: boolean | undefined;
|
|
64
|
+
gridSize?: number | undefined;
|
|
65
|
+
gridStep?: number | undefined;
|
|
66
|
+
gridModeEnabled?: boolean | undefined;
|
|
64
67
|
stats?: {
|
|
65
68
|
open: boolean;
|
|
66
69
|
panels: number;
|
|
67
70
|
} | undefined;
|
|
68
71
|
currentChartType?: import("@excalidraw/element/types").ChartType | undefined;
|
|
72
|
+
objectsSnapModeEnabled?: boolean | undefined;
|
|
73
|
+
lockedMultiSelections?: {
|
|
74
|
+
[groupId: string]: true;
|
|
75
|
+
} | undefined;
|
|
69
76
|
};
|
|
70
77
|
export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
|
|
71
78
|
viewBackgroundColor?: string | undefined;
|
|
72
|
-
gridModeEnabled?: boolean | undefined;
|
|
73
79
|
gridSize?: number | undefined;
|
|
74
80
|
gridStep?: number | undefined;
|
|
81
|
+
gridModeEnabled?: boolean | undefined;
|
|
82
|
+
lockedMultiSelections?: {
|
|
83
|
+
[groupId: string]: true;
|
|
84
|
+
} | undefined;
|
|
75
85
|
};
|
|
76
86
|
export declare const clearAppStateForDatabase: (appState: Partial<AppState>) => {
|
|
77
87
|
viewBackgroundColor?: string | undefined;
|
|
78
|
-
gridModeEnabled?: boolean | undefined;
|
|
79
88
|
gridSize?: number | undefined;
|
|
80
89
|
gridStep?: number | undefined;
|
|
90
|
+
gridModeEnabled?: boolean | undefined;
|
|
91
|
+
lockedMultiSelections?: {
|
|
92
|
+
[groupId: string]: true;
|
|
93
|
+
} | undefined;
|
|
81
94
|
};
|
|
82
95
|
export declare const isEraserActive: ({ activeTool, }: {
|
|
83
96
|
activeTool: AppState["activeTool"];
|
|
@@ -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;
|
|
@@ -28,7 +42,3 @@ export declare const ExitZenModeAction: ({ actionManager, showExitZenModeBtn, }:
|
|
|
28
42
|
actionManager: ActionManager;
|
|
29
43
|
showExitZenModeBtn: boolean;
|
|
30
44
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
export declare const FinalizeAction: ({ renderAction, className, }: {
|
|
32
|
-
renderAction: ActionManager["renderAction"];
|
|
33
|
-
className?: string | undefined;
|
|
34
|
-
}) => import("react/jsx-runtime").JSX.Element;
|