@excalidraw/excalidraw 0.17.1-7500-ac247a0 → 0.17.1-b7babe5
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 +56 -2
- package/dist/browser/dev/excalidraw-assets-dev/{chunk-2W5GQUR4.js → chunk-6NMK7JTV.js} +13 -6
- package/dist/browser/dev/excalidraw-assets-dev/chunk-6NMK7JTV.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/chunk-CX3RATXT.js +20324 -0
- package/dist/browser/dev/excalidraw-assets-dev/chunk-CX3RATXT.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{en-OC6JWP3X.js → en-BZY7JRTM.js} +4 -2
- package/dist/browser/dev/excalidraw-assets-dev/{image-5TVMINCA.js → image-CVN3YKRW.js} +2 -4
- package/dist/browser/dev/excalidraw-assets-dev/image-LK4UNFRZ.css +6 -0
- package/dist/browser/dev/excalidraw-assets-dev/image-LK4UNFRZ.css.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/roundRect-T5BX56ZF.js +161 -0
- package/dist/browser/dev/excalidraw-assets-dev/roundRect-T5BX56ZF.js.map +7 -0
- package/dist/browser/dev/index.css +189 -129
- package/dist/browser/dev/index.css.map +3 -3
- package/dist/browser/dev/index.js +34964 -37
- package/dist/browser/dev/index.js.map +4 -4
- package/dist/browser/prod/excalidraw-assets/chunk-VJAIK3AX.js +55 -0
- package/dist/browser/prod/excalidraw-assets/chunk-YYO5DFUW.js +11 -0
- package/dist/browser/prod/excalidraw-assets/en-O2YCQM2W.js +1 -0
- package/dist/browser/prod/excalidraw-assets/image-6FKY54X5.js +1 -0
- package/dist/browser/prod/excalidraw-assets/image-X66R2EM5.css +1 -0
- package/dist/browser/prod/excalidraw-assets/roundRect-2ACQK4DA.js +1 -0
- package/dist/browser/prod/index.css +1 -1
- package/dist/browser/prod/index.js +203 -1
- package/dist/{prod/en-RLIAOBCI.json → dev/en-EY7E2L5O.json} +10 -5
- package/dist/dev/index.css +189 -129
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +38702 -39409
- package/dist/dev/index.js.map +4 -4
- package/dist/excalidraw/actions/actionAddToLibrary.d.ts +15 -15
- package/dist/excalidraw/actions/actionAlign.d.ts +6 -6
- package/dist/excalidraw/actions/actionAlign.js +2 -1
- package/dist/excalidraw/actions/actionBoundText.d.ts +10 -10
- package/dist/excalidraw/actions/actionBoundText.js +8 -8
- package/dist/excalidraw/actions/actionCanvas.d.ts +58 -58
- package/dist/excalidraw/actions/actionClipboard.d.ts +34 -34
- package/dist/excalidraw/actions/actionClipboard.js +9 -2
- package/dist/excalidraw/actions/actionDeleteSelected.d.ts +15 -15
- package/dist/excalidraw/actions/actionDeleteSelected.js +3 -2
- package/dist/excalidraw/actions/actionDistribute.d.ts +2 -2
- package/dist/excalidraw/actions/actionDistribute.js +1 -1
- package/dist/excalidraw/actions/actionDuplicateSelection.d.ts +1 -1
- package/dist/excalidraw/actions/actionDuplicateSelection.js +4 -3
- package/dist/excalidraw/actions/actionElementLock.d.ts +10 -10
- package/dist/excalidraw/actions/actionExport.d.ts +43 -43
- package/dist/excalidraw/actions/actionExport.js +4 -4
- package/dist/excalidraw/actions/actionFinalize.d.ts +9 -9
- package/dist/excalidraw/actions/actionFinalize.js +7 -6
- package/dist/excalidraw/actions/actionFlip.d.ts +2 -2
- package/dist/excalidraw/actions/actionFlip.js +11 -11
- package/dist/excalidraw/actions/actionFrame.d.ts +16 -16
- package/dist/excalidraw/actions/actionFrame.js +1 -1
- package/dist/excalidraw/actions/actionGroup.d.ts +10 -10
- package/dist/excalidraw/actions/actionGroup.js +3 -2
- package/dist/excalidraw/actions/actionLinearEditor.d.ts +5 -5
- package/dist/excalidraw/actions/actionLinearEditor.js +1 -1
- package/dist/excalidraw/{element/Hyperlink.d.ts → actions/actionLink.d.ts} +29 -51
- package/dist/excalidraw/actions/actionLink.js +40 -0
- package/dist/excalidraw/actions/actionMenu.d.ts +13 -13
- package/dist/excalidraw/actions/actionNavigate.d.ts +10 -10
- package/dist/excalidraw/actions/actionNavigate.js +1 -1
- package/dist/excalidraw/actions/actionProperties.d.ts +77 -77
- package/dist/excalidraw/actions/actionProperties.js +32 -27
- package/dist/excalidraw/actions/actionSelectAll.d.ts +5 -5
- package/dist/excalidraw/actions/actionSelectAll.js +1 -1
- package/dist/excalidraw/actions/actionStyles.d.ts +7 -7
- package/dist/excalidraw/actions/actionStyles.js +4 -4
- package/dist/excalidraw/actions/actionToggleGridMode.d.ts +5 -5
- package/dist/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +5 -5
- package/dist/excalidraw/actions/actionToggleStats.d.ts +5 -5
- package/dist/excalidraw/actions/actionToggleViewMode.d.ts +5 -5
- package/dist/excalidraw/actions/actionToggleZenMode.d.ts +5 -5
- package/dist/excalidraw/actions/index.d.ts +1 -1
- package/dist/excalidraw/actions/index.js +1 -1
- package/dist/excalidraw/actions/manager.js +2 -1
- package/dist/excalidraw/align.d.ts +2 -2
- package/dist/excalidraw/align.js +2 -2
- package/dist/excalidraw/animated-trail.d.ts +33 -0
- package/dist/excalidraw/animated-trail.js +96 -0
- package/dist/excalidraw/animation-frame-handler.d.ts +16 -0
- package/dist/excalidraw/animation-frame-handler.js +55 -0
- package/dist/excalidraw/appState.d.ts +1 -1
- package/dist/excalidraw/appState.js +1 -3
- package/dist/excalidraw/clipboard.js +5 -5
- package/dist/excalidraw/components/Actions.d.ts +3 -3
- package/dist/excalidraw/components/Actions.js +18 -7
- package/dist/excalidraw/components/App.d.ts +23 -16
- package/dist/excalidraw/components/App.js +387 -272
- package/dist/excalidraw/components/Button.d.ts +1 -1
- package/dist/excalidraw/components/FilledButton.d.ts +2 -2
- package/dist/excalidraw/components/FilledButton.js +27 -3
- package/dist/excalidraw/components/FollowMode/FollowMode.js +1 -1
- package/dist/excalidraw/components/ImageExportDialog.d.ts +2 -1
- package/dist/excalidraw/components/ImageExportDialog.js +17 -13
- package/dist/excalidraw/components/JSONExportDialog.js +1 -1
- package/dist/excalidraw/components/{LaserTool/LaserPointerButton.d.ts → LaserPointerButton.d.ts} +1 -1
- package/dist/excalidraw/components/{LaserTool/LaserPointerButton.js → LaserPointerButton.js} +2 -2
- package/dist/excalidraw/components/LayerUI.js +3 -3
- package/dist/excalidraw/components/MobileMenu.js +1 -1
- package/dist/excalidraw/components/ProjectName.d.ts +0 -1
- package/dist/excalidraw/components/ProjectName.js +1 -1
- package/dist/excalidraw/components/PublishLibrary.js +1 -1
- package/dist/excalidraw/components/SVGLayer.d.ts +8 -0
- package/dist/excalidraw/components/SVGLayer.js +20 -0
- package/dist/excalidraw/components/ShareableLinkDialog.js +10 -10
- package/dist/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/excalidraw/components/Stack.d.ts +2 -2
- package/dist/excalidraw/components/TTDDialog/common.js +10 -1
- package/dist/excalidraw/components/TextField.d.ts +5 -2
- package/dist/excalidraw/components/TextField.js +6 -3
- package/dist/excalidraw/components/Toast.d.ts +3 -2
- package/dist/excalidraw/components/Toast.js +2 -2
- package/dist/excalidraw/components/ToolButton.js +2 -1
- package/dist/excalidraw/components/canvases/InteractiveCanvas.d.ts +2 -2
- package/dist/excalidraw/components/canvases/InteractiveCanvas.js +6 -5
- package/dist/excalidraw/components/canvases/StaticCanvas.d.ts +4 -3
- package/dist/excalidraw/components/canvases/StaticCanvas.js +7 -5
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuContent.js +22 -2
- package/dist/excalidraw/components/hyperlink/Hyperlink.d.ts +19 -0
- package/dist/excalidraw/{element → components/hyperlink}/Hyperlink.js +40 -115
- package/dist/excalidraw/components/hyperlink/helpers.d.ts +7 -0
- package/dist/excalidraw/components/hyperlink/helpers.js +49 -0
- package/dist/excalidraw/components/icons.d.ts +2 -1
- package/dist/excalidraw/components/icons.js +2 -1
- package/dist/excalidraw/components/live-collaboration/LiveCollaborationTrigger.js +3 -2
- package/dist/excalidraw/components/main-menu/DefaultItems.js +5 -2
- package/dist/excalidraw/constants.d.ts +6 -0
- package/dist/excalidraw/constants.js +6 -0
- package/dist/excalidraw/data/blob.js +13 -14
- package/dist/excalidraw/data/filesystem.d.ts +1 -1
- package/dist/excalidraw/data/index.d.ts +2 -1
- package/dist/excalidraw/data/index.js +20 -16
- package/dist/excalidraw/data/json.d.ts +1 -1
- package/dist/excalidraw/data/json.js +5 -3
- package/dist/excalidraw/data/library.d.ts +60 -8
- package/dist/excalidraw/data/library.js +302 -33
- package/dist/excalidraw/data/resave.d.ts +1 -1
- package/dist/excalidraw/data/resave.js +2 -2
- package/dist/excalidraw/data/restore.js +8 -13
- package/dist/excalidraw/data/transform.js +13 -9
- package/dist/excalidraw/distribute.d.ts +2 -2
- package/dist/excalidraw/distribute.js +2 -2
- package/dist/excalidraw/element/ElementCanvasButtons.d.ts +3 -2
- package/dist/excalidraw/element/ElementCanvasButtons.js +4 -4
- package/dist/excalidraw/element/binding.d.ts +9 -9
- package/dist/excalidraw/element/binding.js +61 -59
- package/dist/excalidraw/element/bounds.d.ts +5 -5
- package/dist/excalidraw/element/bounds.js +29 -32
- package/dist/excalidraw/element/collision.d.ts +11 -11
- package/dist/excalidraw/element/collision.js +49 -46
- package/dist/excalidraw/element/containerCache.d.ts +11 -0
- package/dist/excalidraw/element/containerCache.js +14 -0
- package/dist/excalidraw/element/dragElements.js +10 -19
- package/dist/excalidraw/element/embeddable.d.ts +12 -13
- package/dist/excalidraw/element/embeddable.js +17 -27
- package/dist/excalidraw/element/image.js +1 -2
- package/dist/excalidraw/element/index.d.ts +8 -1
- package/dist/excalidraw/element/index.js +23 -1
- package/dist/excalidraw/element/linearElementEditor.d.ts +36 -36
- package/dist/excalidraw/element/linearElementEditor.js +79 -80
- package/dist/excalidraw/element/newElement.d.ts +4 -6
- package/dist/excalidraw/element/newElement.js +11 -16
- package/dist/excalidraw/element/resizeElements.d.ts +6 -6
- package/dist/excalidraw/element/resizeElements.js +40 -46
- package/dist/excalidraw/element/resizeTest.d.ts +3 -3
- package/dist/excalidraw/element/resizeTest.js +4 -4
- package/dist/excalidraw/element/sizeHelpers.d.ts +2 -2
- package/dist/excalidraw/element/sizeHelpers.js +2 -2
- package/dist/excalidraw/element/textElement.d.ts +34 -21
- package/dist/excalidraw/element/textElement.js +87 -111
- package/dist/excalidraw/element/textWysiwyg.d.ts +1 -6
- package/dist/excalidraw/element/textWysiwyg.js +15 -37
- package/dist/excalidraw/element/transformHandles.d.ts +4 -4
- package/dist/excalidraw/element/transformHandles.js +6 -6
- package/dist/excalidraw/element/typeChecks.js +4 -1
- package/dist/excalidraw/element/types.d.ts +24 -11
- package/dist/excalidraw/frame.d.ts +26 -20
- package/dist/excalidraw/frame.js +157 -84
- package/dist/excalidraw/groups.d.ts +3 -3
- package/dist/excalidraw/groups.js +11 -3
- package/dist/excalidraw/history.d.ts +1 -1
- package/dist/excalidraw/hooks/useLibraryItemSvg.js +1 -1
- package/dist/excalidraw/index.d.ts +9 -10
- package/dist/excalidraw/index.js +16 -12
- package/dist/excalidraw/laser-trails.d.ts +19 -0
- package/dist/excalidraw/laser-trails.js +95 -0
- package/dist/excalidraw/locales/en.json +10 -5
- package/dist/excalidraw/queue.d.ts +9 -0
- package/dist/excalidraw/queue.js +27 -0
- package/dist/excalidraw/reactUtils.d.ts +14 -0
- package/dist/excalidraw/reactUtils.js +45 -0
- package/dist/excalidraw/renderer/helpers.d.ts +13 -0
- package/dist/excalidraw/renderer/helpers.js +39 -0
- package/dist/excalidraw/renderer/interactiveScene.d.ts +20 -0
- package/dist/excalidraw/renderer/{renderScene.js → interactiveScene.js} +199 -474
- package/dist/excalidraw/renderer/renderElement.d.ts +6 -6
- package/dist/excalidraw/renderer/renderElement.js +54 -366
- package/dist/excalidraw/renderer/staticScene.d.ts +11 -0
- package/dist/excalidraw/renderer/staticScene.js +205 -0
- package/dist/excalidraw/renderer/staticSvgScene.d.ts +5 -0
- package/dist/excalidraw/renderer/staticSvgScene.js +385 -0
- package/dist/excalidraw/scene/Fonts.js +2 -1
- package/dist/excalidraw/scene/Renderer.d.ts +1 -1
- package/dist/excalidraw/scene/Renderer.js +32 -20
- package/dist/excalidraw/scene/Scene.d.ts +10 -9
- package/dist/excalidraw/scene/Scene.js +45 -21
- package/dist/excalidraw/scene/Shape.d.ts +3 -1
- package/dist/excalidraw/scene/Shape.js +7 -5
- package/dist/excalidraw/scene/ShapeCache.d.ts +2 -1
- package/dist/excalidraw/scene/ShapeCache.js +1 -0
- package/dist/excalidraw/scene/comparisons.js +2 -1
- package/dist/excalidraw/scene/export.d.ts +3 -0
- package/dist/excalidraw/scene/export.js +20 -40
- package/dist/excalidraw/scene/index.d.ts +0 -1
- package/dist/excalidraw/scene/index.js +0 -1
- package/dist/excalidraw/scene/scrollbars.d.ts +1 -1
- package/dist/excalidraw/scene/scrollbars.js +1 -1
- package/dist/excalidraw/scene/selection.d.ts +5 -5
- package/dist/excalidraw/scene/selection.js +16 -14
- package/dist/excalidraw/scene/types.d.ts +11 -5
- package/dist/excalidraw/snapping.d.ts +7 -7
- package/dist/excalidraw/snapping.js +21 -20
- package/dist/excalidraw/types.d.ts +16 -17
- package/dist/excalidraw/utility-types.d.ts +7 -0
- package/dist/excalidraw/utils.d.ts +21 -16
- package/dist/excalidraw/utils.js +43 -45
- package/dist/{dev/en-RLIAOBCI.json → prod/en-EY7E2L5O.json} +10 -5
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +42 -42
- package/dist/utils/bbox.d.ts +2 -2
- package/dist/utils/export.d.ts +3 -3
- package/dist/utils/export.js +3 -13
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +2 -2
- package/dist/utils/withinBounds.d.ts +1 -1
- package/dist/utils/withinBounds.js +5 -2
- package/package.json +4 -4
- package/dist/browser/dev/excalidraw-assets-dev/chunk-2W5GQUR4.js.map +0 -7
- package/dist/browser/dev/excalidraw-assets-dev/chunk-KGZXLFLR.js +0 -53497
- package/dist/browser/dev/excalidraw-assets-dev/chunk-KGZXLFLR.js.map +0 -7
- package/dist/browser/dev/excalidraw-assets-dev/image-3MFRCKYM.css +0 -5797
- package/dist/browser/dev/excalidraw-assets-dev/image-3MFRCKYM.css.map +0 -7
- package/dist/browser/prod/excalidraw-assets/chunk-4YN2HN3S.js +0 -257
- package/dist/browser/prod/excalidraw-assets/chunk-OWLL6VOG.js +0 -11
- package/dist/browser/prod/excalidraw-assets/en-ERQOR3OC.js +0 -1
- package/dist/browser/prod/excalidraw-assets/image-LTLHTTSE.js +0 -1
- package/dist/browser/prod/excalidraw-assets/image-QBL334OA.css +0 -1
- package/dist/excalidraw/components/LaserTool/LaserPathManager.d.ts +0 -28
- package/dist/excalidraw/components/LaserTool/LaserPathManager.js +0 -225
- package/dist/excalidraw/components/LaserTool/LaserTool.d.ts +0 -8
- package/dist/excalidraw/components/LaserTool/LaserTool.js +0 -15
- package/dist/excalidraw/renderer/renderScene.d.ts +0 -25
- package/dist/excalidraw/vite.config.d.mts +0 -2
- package/dist/excalidraw/vite.config.mjs +0 -13
- /package/dist/browser/dev/excalidraw-assets-dev/{en-OC6JWP3X.js.map → en-BZY7JRTM.js.map} +0 -0
- /package/dist/browser/dev/excalidraw-assets-dev/{image-5TVMINCA.js.map → image-CVN3YKRW.js.map} +0 -0
|
@@ -17,7 +17,7 @@ export declare const actionCopy: {
|
|
|
17
17
|
isLoading: boolean;
|
|
18
18
|
activeEmbeddable: {
|
|
19
19
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
20
|
-
state: "
|
|
20
|
+
state: "hover" | "active";
|
|
21
21
|
} | null;
|
|
22
22
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
23
23
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -65,7 +65,7 @@ export declare const actionCopy: {
|
|
|
65
65
|
scrollY: number;
|
|
66
66
|
cursorButton: "up" | "down";
|
|
67
67
|
scrolledOutside: boolean;
|
|
68
|
-
name: string;
|
|
68
|
+
name: string | null;
|
|
69
69
|
isResizing: boolean;
|
|
70
70
|
isRotating: boolean;
|
|
71
71
|
zoom: Readonly<{
|
|
@@ -78,14 +78,14 @@ export declare const actionCopy: {
|
|
|
78
78
|
tab?: string | undefined;
|
|
79
79
|
} | null;
|
|
80
80
|
openDialog: {
|
|
81
|
-
name: "
|
|
81
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
82
82
|
} | {
|
|
83
83
|
name: "settings";
|
|
84
84
|
source: "settings" | "tool" | "generation";
|
|
85
85
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
86
86
|
} | {
|
|
87
87
|
name: "ttd";
|
|
88
|
-
tab: "
|
|
88
|
+
tab: "text-to-diagram" | "mermaid";
|
|
89
89
|
} | null;
|
|
90
90
|
defaultSidebarDockedPreference: boolean;
|
|
91
91
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -142,7 +142,7 @@ export declare const actionCopy: {
|
|
|
142
142
|
data: import("../charts").Spreadsheet;
|
|
143
143
|
};
|
|
144
144
|
pendingImageElementId: string | null;
|
|
145
|
-
showHyperlinkPopup: false | "
|
|
145
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
146
146
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
147
147
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
148
148
|
originSnapOffset: {
|
|
@@ -180,7 +180,7 @@ export declare const actionPaste: {
|
|
|
180
180
|
isLoading: boolean;
|
|
181
181
|
activeEmbeddable: {
|
|
182
182
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
183
|
-
state: "
|
|
183
|
+
state: "hover" | "active";
|
|
184
184
|
} | null;
|
|
185
185
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
186
186
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -228,7 +228,7 @@ export declare const actionPaste: {
|
|
|
228
228
|
scrollY: number;
|
|
229
229
|
cursorButton: "up" | "down";
|
|
230
230
|
scrolledOutside: boolean;
|
|
231
|
-
name: string;
|
|
231
|
+
name: string | null;
|
|
232
232
|
isResizing: boolean;
|
|
233
233
|
isRotating: boolean;
|
|
234
234
|
zoom: Readonly<{
|
|
@@ -241,14 +241,14 @@ export declare const actionPaste: {
|
|
|
241
241
|
tab?: string | undefined;
|
|
242
242
|
} | null;
|
|
243
243
|
openDialog: {
|
|
244
|
-
name: "
|
|
244
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
245
245
|
} | {
|
|
246
246
|
name: "settings";
|
|
247
247
|
source: "settings" | "tool" | "generation";
|
|
248
248
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
249
249
|
} | {
|
|
250
250
|
name: "ttd";
|
|
251
|
-
tab: "
|
|
251
|
+
tab: "text-to-diagram" | "mermaid";
|
|
252
252
|
} | null;
|
|
253
253
|
defaultSidebarDockedPreference: boolean;
|
|
254
254
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -305,7 +305,7 @@ export declare const actionPaste: {
|
|
|
305
305
|
data: import("../charts").Spreadsheet;
|
|
306
306
|
};
|
|
307
307
|
pendingImageElementId: string | null;
|
|
308
|
-
showHyperlinkPopup: false | "
|
|
308
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
309
309
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
310
310
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
311
311
|
originSnapOffset: {
|
|
@@ -344,7 +344,7 @@ export declare const actionCut: {
|
|
|
344
344
|
errorMessage: import("react").ReactNode;
|
|
345
345
|
activeEmbeddable: {
|
|
346
346
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
347
|
-
state: "
|
|
347
|
+
state: "hover" | "active";
|
|
348
348
|
} | null;
|
|
349
349
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
350
350
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -391,7 +391,7 @@ export declare const actionCut: {
|
|
|
391
391
|
scrollY: number;
|
|
392
392
|
cursorButton: "up" | "down";
|
|
393
393
|
scrolledOutside: boolean;
|
|
394
|
-
name: string;
|
|
394
|
+
name: string | null;
|
|
395
395
|
isResizing: boolean;
|
|
396
396
|
isRotating: boolean;
|
|
397
397
|
zoom: Readonly<{
|
|
@@ -404,14 +404,14 @@ export declare const actionCut: {
|
|
|
404
404
|
tab?: string | undefined;
|
|
405
405
|
} | null;
|
|
406
406
|
openDialog: {
|
|
407
|
-
name: "
|
|
407
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
408
408
|
} | {
|
|
409
409
|
name: "settings";
|
|
410
410
|
source: "settings" | "tool" | "generation";
|
|
411
411
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
412
412
|
} | {
|
|
413
413
|
name: "ttd";
|
|
414
|
-
tab: "
|
|
414
|
+
tab: "text-to-diagram" | "mermaid";
|
|
415
415
|
} | null;
|
|
416
416
|
defaultSidebarDockedPreference: boolean;
|
|
417
417
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -468,7 +468,7 @@ export declare const actionCut: {
|
|
|
468
468
|
data: import("../charts").Spreadsheet;
|
|
469
469
|
};
|
|
470
470
|
pendingImageElementId: string | null;
|
|
471
|
-
showHyperlinkPopup: false | "
|
|
471
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
472
472
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
473
473
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
474
474
|
originSnapOffset: {
|
|
@@ -522,7 +522,7 @@ export declare const actionCut: {
|
|
|
522
522
|
errorMessage: import("react").ReactNode;
|
|
523
523
|
activeEmbeddable: {
|
|
524
524
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
525
|
-
state: "
|
|
525
|
+
state: "hover" | "active";
|
|
526
526
|
} | null;
|
|
527
527
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
528
528
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -569,7 +569,7 @@ export declare const actionCut: {
|
|
|
569
569
|
scrollY: number;
|
|
570
570
|
cursorButton: "up" | "down";
|
|
571
571
|
scrolledOutside: boolean;
|
|
572
|
-
name: string;
|
|
572
|
+
name: string | null;
|
|
573
573
|
isResizing: boolean;
|
|
574
574
|
isRotating: boolean;
|
|
575
575
|
zoom: Readonly<{
|
|
@@ -582,14 +582,14 @@ export declare const actionCut: {
|
|
|
582
582
|
tab?: string | undefined;
|
|
583
583
|
} | null;
|
|
584
584
|
openDialog: {
|
|
585
|
-
name: "
|
|
585
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
586
586
|
} | {
|
|
587
587
|
name: "settings";
|
|
588
588
|
source: "settings" | "tool" | "generation";
|
|
589
589
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
590
590
|
} | {
|
|
591
591
|
name: "ttd";
|
|
592
|
-
tab: "
|
|
592
|
+
tab: "text-to-diagram" | "mermaid";
|
|
593
593
|
} | null;
|
|
594
594
|
defaultSidebarDockedPreference: boolean;
|
|
595
595
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -646,7 +646,7 @@ export declare const actionCut: {
|
|
|
646
646
|
data: import("../charts").Spreadsheet;
|
|
647
647
|
};
|
|
648
648
|
pendingImageElementId: string | null;
|
|
649
|
-
showHyperlinkPopup: false | "
|
|
649
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
650
650
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
651
651
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
652
652
|
originSnapOffset: {
|
|
@@ -718,7 +718,7 @@ export declare const actionCut: {
|
|
|
718
718
|
scrollY: number;
|
|
719
719
|
cursorButton: "up" | "down";
|
|
720
720
|
scrolledOutside: boolean;
|
|
721
|
-
name: string;
|
|
721
|
+
name: string | null;
|
|
722
722
|
isResizing: boolean;
|
|
723
723
|
isRotating: boolean;
|
|
724
724
|
zoom: Readonly<{
|
|
@@ -731,14 +731,14 @@ export declare const actionCut: {
|
|
|
731
731
|
tab?: string | undefined;
|
|
732
732
|
} | null;
|
|
733
733
|
openDialog: {
|
|
734
|
-
name: "
|
|
734
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
735
735
|
} | {
|
|
736
736
|
name: "settings";
|
|
737
737
|
source: "settings" | "tool" | "generation";
|
|
738
738
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
739
739
|
} | {
|
|
740
740
|
name: "ttd";
|
|
741
|
-
tab: "
|
|
741
|
+
tab: "text-to-diagram" | "mermaid";
|
|
742
742
|
} | null;
|
|
743
743
|
defaultSidebarDockedPreference: boolean;
|
|
744
744
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -789,7 +789,7 @@ export declare const actionCut: {
|
|
|
789
789
|
data: import("../charts").Spreadsheet;
|
|
790
790
|
};
|
|
791
791
|
pendingImageElementId: string | null;
|
|
792
|
-
showHyperlinkPopup: false | "
|
|
792
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
793
793
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
794
794
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
795
795
|
originSnapOffset: {
|
|
@@ -827,7 +827,7 @@ export declare const actionCopyAsSvg: {
|
|
|
827
827
|
isLoading: boolean;
|
|
828
828
|
activeEmbeddable: {
|
|
829
829
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
830
|
-
state: "
|
|
830
|
+
state: "hover" | "active";
|
|
831
831
|
} | null;
|
|
832
832
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
833
833
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -875,7 +875,7 @@ export declare const actionCopyAsSvg: {
|
|
|
875
875
|
scrollY: number;
|
|
876
876
|
cursorButton: "up" | "down";
|
|
877
877
|
scrolledOutside: boolean;
|
|
878
|
-
name: string;
|
|
878
|
+
name: string | null;
|
|
879
879
|
isResizing: boolean;
|
|
880
880
|
isRotating: boolean;
|
|
881
881
|
zoom: Readonly<{
|
|
@@ -888,14 +888,14 @@ export declare const actionCopyAsSvg: {
|
|
|
888
888
|
tab?: string | undefined;
|
|
889
889
|
} | null;
|
|
890
890
|
openDialog: {
|
|
891
|
-
name: "
|
|
891
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
892
892
|
} | {
|
|
893
893
|
name: "settings";
|
|
894
894
|
source: "settings" | "tool" | "generation";
|
|
895
895
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
896
896
|
} | {
|
|
897
897
|
name: "ttd";
|
|
898
|
-
tab: "
|
|
898
|
+
tab: "text-to-diagram" | "mermaid";
|
|
899
899
|
} | null;
|
|
900
900
|
defaultSidebarDockedPreference: boolean;
|
|
901
901
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -952,7 +952,7 @@ export declare const actionCopyAsSvg: {
|
|
|
952
952
|
data: import("../charts").Spreadsheet;
|
|
953
953
|
};
|
|
954
954
|
pendingImageElementId: string | null;
|
|
955
|
-
showHyperlinkPopup: false | "
|
|
955
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
956
956
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
957
957
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
958
958
|
originSnapOffset: {
|
|
@@ -990,7 +990,7 @@ export declare const actionCopyAsPng: {
|
|
|
990
990
|
isLoading: boolean;
|
|
991
991
|
activeEmbeddable: {
|
|
992
992
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
993
|
-
state: "
|
|
993
|
+
state: "hover" | "active";
|
|
994
994
|
} | null;
|
|
995
995
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
996
996
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -1038,7 +1038,7 @@ export declare const actionCopyAsPng: {
|
|
|
1038
1038
|
scrollY: number;
|
|
1039
1039
|
cursorButton: "up" | "down";
|
|
1040
1040
|
scrolledOutside: boolean;
|
|
1041
|
-
name: string;
|
|
1041
|
+
name: string | null;
|
|
1042
1042
|
isResizing: boolean;
|
|
1043
1043
|
isRotating: boolean;
|
|
1044
1044
|
zoom: Readonly<{
|
|
@@ -1051,14 +1051,14 @@ export declare const actionCopyAsPng: {
|
|
|
1051
1051
|
tab?: string | undefined;
|
|
1052
1052
|
} | null;
|
|
1053
1053
|
openDialog: {
|
|
1054
|
-
name: "
|
|
1054
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
1055
1055
|
} | {
|
|
1056
1056
|
name: "settings";
|
|
1057
1057
|
source: "settings" | "tool" | "generation";
|
|
1058
1058
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
1059
1059
|
} | {
|
|
1060
1060
|
name: "ttd";
|
|
1061
|
-
tab: "
|
|
1061
|
+
tab: "text-to-diagram" | "mermaid";
|
|
1062
1062
|
} | null;
|
|
1063
1063
|
defaultSidebarDockedPreference: boolean;
|
|
1064
1064
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -1115,7 +1115,7 @@ export declare const actionCopyAsPng: {
|
|
|
1115
1115
|
data: import("../charts").Spreadsheet;
|
|
1116
1116
|
};
|
|
1117
1117
|
pendingImageElementId: string | null;
|
|
1118
|
-
showHyperlinkPopup: false | "
|
|
1118
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
1119
1119
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1120
1120
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
1121
1121
|
originSnapOffset: {
|
|
@@ -93,7 +93,7 @@ export const actionCut = register({
|
|
|
93
93
|
trackEvent: { category: "element" },
|
|
94
94
|
perform: (elements, appState, event, app) => {
|
|
95
95
|
actionCopy.perform(elements, appState, event, app);
|
|
96
|
-
return actionDeleteSelected.perform(elements, appState);
|
|
96
|
+
return actionDeleteSelected.perform(elements, appState, null, app);
|
|
97
97
|
},
|
|
98
98
|
contextItemLabel: "labels.cut",
|
|
99
99
|
keyTest: (event) => event[KEYS.CTRL_OR_CMD] && event.key === KEYS.X,
|
|
@@ -112,6 +112,7 @@ export const actionCopyAsSvg = register({
|
|
|
112
112
|
await exportCanvas("clipboard-svg", exportedElements, appState, app.files, {
|
|
113
113
|
...appState,
|
|
114
114
|
exportingFrame,
|
|
115
|
+
name: app.getName(),
|
|
115
116
|
});
|
|
116
117
|
return {
|
|
117
118
|
commitToHistory: false,
|
|
@@ -152,6 +153,7 @@ export const actionCopyAsPng = register({
|
|
|
152
153
|
await exportCanvas("clipboard", exportedElements, appState, app.files, {
|
|
153
154
|
...appState,
|
|
154
155
|
exportingFrame,
|
|
156
|
+
name: app.getName(),
|
|
155
157
|
});
|
|
156
158
|
return {
|
|
157
159
|
appState: {
|
|
@@ -203,7 +205,12 @@ export const copyText = register({
|
|
|
203
205
|
return acc;
|
|
204
206
|
}, [])
|
|
205
207
|
.join("\n\n");
|
|
206
|
-
|
|
208
|
+
try {
|
|
209
|
+
copyTextToSystemClipboard(text);
|
|
210
|
+
}
|
|
211
|
+
catch (e) {
|
|
212
|
+
throw new Error(t("errors.copyToSystemClipboardFailed"));
|
|
213
|
+
}
|
|
207
214
|
return {
|
|
208
215
|
commitToHistory: false,
|
|
209
216
|
};
|
|
@@ -8,7 +8,7 @@ export declare const actionDeleteSelected: {
|
|
|
8
8
|
category: "element";
|
|
9
9
|
action: string;
|
|
10
10
|
};
|
|
11
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
11
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: import("../types").AppClassProperties) => false | {
|
|
12
12
|
elements: ExcalidrawElement[];
|
|
13
13
|
appState: {
|
|
14
14
|
editingLinearElement: null;
|
|
@@ -22,7 +22,7 @@ export declare const actionDeleteSelected: {
|
|
|
22
22
|
errorMessage: import("react").ReactNode;
|
|
23
23
|
activeEmbeddable: {
|
|
24
24
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
25
|
-
state: "
|
|
25
|
+
state: "hover" | "active";
|
|
26
26
|
} | null;
|
|
27
27
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
28
28
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -69,7 +69,7 @@ export declare const actionDeleteSelected: {
|
|
|
69
69
|
scrollY: number;
|
|
70
70
|
cursorButton: "up" | "down";
|
|
71
71
|
scrolledOutside: boolean;
|
|
72
|
-
name: string;
|
|
72
|
+
name: string | null;
|
|
73
73
|
isResizing: boolean;
|
|
74
74
|
isRotating: boolean;
|
|
75
75
|
zoom: Readonly<{
|
|
@@ -82,14 +82,14 @@ export declare const actionDeleteSelected: {
|
|
|
82
82
|
tab?: string | undefined;
|
|
83
83
|
} | null;
|
|
84
84
|
openDialog: {
|
|
85
|
-
name: "
|
|
85
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
86
86
|
} | {
|
|
87
87
|
name: "settings";
|
|
88
88
|
source: "settings" | "tool" | "generation";
|
|
89
89
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
90
90
|
} | {
|
|
91
91
|
name: "ttd";
|
|
92
|
-
tab: "
|
|
92
|
+
tab: "text-to-diagram" | "mermaid";
|
|
93
93
|
} | null;
|
|
94
94
|
defaultSidebarDockedPreference: boolean;
|
|
95
95
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -146,7 +146,7 @@ export declare const actionDeleteSelected: {
|
|
|
146
146
|
data: import("../charts").Spreadsheet;
|
|
147
147
|
};
|
|
148
148
|
pendingImageElementId: string | null;
|
|
149
|
-
showHyperlinkPopup: false | "
|
|
149
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
150
150
|
selectedLinearElement: LinearElementEditor | null;
|
|
151
151
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
152
152
|
originSnapOffset: {
|
|
@@ -200,7 +200,7 @@ export declare const actionDeleteSelected: {
|
|
|
200
200
|
errorMessage: import("react").ReactNode;
|
|
201
201
|
activeEmbeddable: {
|
|
202
202
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
203
|
-
state: "
|
|
203
|
+
state: "hover" | "active";
|
|
204
204
|
} | null;
|
|
205
205
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
206
206
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -247,7 +247,7 @@ export declare const actionDeleteSelected: {
|
|
|
247
247
|
scrollY: number;
|
|
248
248
|
cursorButton: "up" | "down";
|
|
249
249
|
scrolledOutside: boolean;
|
|
250
|
-
name: string;
|
|
250
|
+
name: string | null;
|
|
251
251
|
isResizing: boolean;
|
|
252
252
|
isRotating: boolean;
|
|
253
253
|
zoom: Readonly<{
|
|
@@ -260,14 +260,14 @@ export declare const actionDeleteSelected: {
|
|
|
260
260
|
tab?: string | undefined;
|
|
261
261
|
} | null;
|
|
262
262
|
openDialog: {
|
|
263
|
-
name: "
|
|
263
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
264
264
|
} | {
|
|
265
265
|
name: "settings";
|
|
266
266
|
source: "settings" | "tool" | "generation";
|
|
267
267
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
268
268
|
} | {
|
|
269
269
|
name: "ttd";
|
|
270
|
-
tab: "
|
|
270
|
+
tab: "text-to-diagram" | "mermaid";
|
|
271
271
|
} | null;
|
|
272
272
|
defaultSidebarDockedPreference: boolean;
|
|
273
273
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -324,7 +324,7 @@ export declare const actionDeleteSelected: {
|
|
|
324
324
|
data: import("../charts").Spreadsheet;
|
|
325
325
|
};
|
|
326
326
|
pendingImageElementId: string | null;
|
|
327
|
-
showHyperlinkPopup: false | "
|
|
327
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
328
328
|
selectedLinearElement: LinearElementEditor | null;
|
|
329
329
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
330
330
|
originSnapOffset: {
|
|
@@ -396,7 +396,7 @@ export declare const actionDeleteSelected: {
|
|
|
396
396
|
scrollY: number;
|
|
397
397
|
cursorButton: "up" | "down";
|
|
398
398
|
scrolledOutside: boolean;
|
|
399
|
-
name: string;
|
|
399
|
+
name: string | null;
|
|
400
400
|
isResizing: boolean;
|
|
401
401
|
isRotating: boolean;
|
|
402
402
|
zoom: Readonly<{
|
|
@@ -409,14 +409,14 @@ export declare const actionDeleteSelected: {
|
|
|
409
409
|
tab?: string | undefined;
|
|
410
410
|
} | null;
|
|
411
411
|
openDialog: {
|
|
412
|
-
name: "
|
|
412
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
413
413
|
} | {
|
|
414
414
|
name: "settings";
|
|
415
415
|
source: "settings" | "tool" | "generation";
|
|
416
416
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
417
417
|
} | {
|
|
418
418
|
name: "ttd";
|
|
419
|
-
tab: "
|
|
419
|
+
tab: "text-to-diagram" | "mermaid";
|
|
420
420
|
} | null;
|
|
421
421
|
defaultSidebarDockedPreference: boolean;
|
|
422
422
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -467,7 +467,7 @@ export declare const actionDeleteSelected: {
|
|
|
467
467
|
data: import("../charts").Spreadsheet;
|
|
468
468
|
};
|
|
469
469
|
pendingImageElementId: string | null;
|
|
470
|
-
showHyperlinkPopup: false | "
|
|
470
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
471
471
|
selectedLinearElement: LinearElementEditor | null;
|
|
472
472
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
473
473
|
originSnapOffset: {
|
|
@@ -50,10 +50,11 @@ const handleGroupEditingState = (appState, elements) => {
|
|
|
50
50
|
export const actionDeleteSelected = register({
|
|
51
51
|
name: "deleteSelectedElements",
|
|
52
52
|
trackEvent: { category: "element", action: "delete" },
|
|
53
|
-
perform: (elements, appState) => {
|
|
53
|
+
perform: (elements, appState, formData, app) => {
|
|
54
54
|
if (appState.editingLinearElement) {
|
|
55
55
|
const { elementId, selectedPointsIndices, startBindingElement, endBindingElement, } = appState.editingLinearElement;
|
|
56
|
-
const
|
|
56
|
+
const elementsMap = app.scene.getNonDeletedElementsMap();
|
|
57
|
+
const element = LinearElementEditor.getElement(elementId, elementsMap);
|
|
57
58
|
if (!element) {
|
|
58
59
|
return false;
|
|
59
60
|
}
|
|
@@ -8,7 +8,7 @@ export declare const distributeHorizontally: {
|
|
|
8
8
|
};
|
|
9
9
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
10
10
|
appState: Readonly<AppState>;
|
|
11
|
-
elements:
|
|
11
|
+
elements: ExcalidrawElement[];
|
|
12
12
|
commitToHistory: true;
|
|
13
13
|
};
|
|
14
14
|
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
@@ -23,7 +23,7 @@ export declare const distributeVertically: {
|
|
|
23
23
|
};
|
|
24
24
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
25
25
|
appState: Readonly<AppState>;
|
|
26
|
-
elements:
|
|
26
|
+
elements: ExcalidrawElement[];
|
|
27
27
|
commitToHistory: true;
|
|
28
28
|
};
|
|
29
29
|
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
@@ -18,7 +18,7 @@ const enableActionGroup = (appState, app) => {
|
|
|
18
18
|
};
|
|
19
19
|
const distributeSelectedElements = (elements, appState, app, distribution) => {
|
|
20
20
|
const selectedElements = app.scene.getSelectedElements(appState);
|
|
21
|
-
const updatedElements = distributeElements(selectedElements, distribution);
|
|
21
|
+
const updatedElements = distributeElements(selectedElements, app.scene.getNonDeletedElementsMap(), distribution);
|
|
22
22
|
const updatedElementsMap = arrayToMap(updatedElements);
|
|
23
23
|
return updateFrameMembershipOfSelectedElements(elements.map((element) => updatedElementsMap.get(element.id) || element), appState, app);
|
|
24
24
|
};
|
|
@@ -6,7 +6,7 @@ export declare const actionDuplicateSelection: {
|
|
|
6
6
|
trackEvent: {
|
|
7
7
|
category: "element";
|
|
8
8
|
};
|
|
9
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
9
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: import("../types").AppClassProperties) => false | {
|
|
10
10
|
commitToHistory: true;
|
|
11
11
|
elements?: readonly ExcalidrawElement[] | null | undefined;
|
|
12
12
|
appState?: import("../utility-types").MarkOptional<AppState, "offsetTop" | "offsetLeft" | "width" | "height"> | null | undefined;
|
|
@@ -19,10 +19,11 @@ import { excludeElementsInFramesFromSelection, getSelectedElements, } from "../s
|
|
|
19
19
|
export const actionDuplicateSelection = register({
|
|
20
20
|
name: "duplicateSelection",
|
|
21
21
|
trackEvent: { category: "element" },
|
|
22
|
-
perform: (elements, appState) => {
|
|
22
|
+
perform: (elements, appState, formData, app) => {
|
|
23
|
+
const elementsMap = app.scene.getNonDeletedElementsMap();
|
|
23
24
|
// duplicate selected point(s) if editing a line
|
|
24
25
|
if (appState.editingLinearElement) {
|
|
25
|
-
const ret = LinearElementEditor.duplicateSelectedPoints(appState);
|
|
26
|
+
const ret = LinearElementEditor.duplicateSelectedPoints(appState, elementsMap);
|
|
26
27
|
if (!ret) {
|
|
27
28
|
return false;
|
|
28
29
|
}
|
|
@@ -87,7 +88,7 @@ const duplicateElements = (elements, appState) => {
|
|
|
87
88
|
if (processedIds.get(element.id)) {
|
|
88
89
|
continue;
|
|
89
90
|
}
|
|
90
|
-
const boundTextElement = getBoundTextElement(element);
|
|
91
|
+
const boundTextElement = getBoundTextElement(element, arrayToMap(elements));
|
|
91
92
|
const isElementAFrameLike = isFrameLikeElement(element);
|
|
92
93
|
if (idsOfElementsToDuplicate.get(element.id)) {
|
|
93
94
|
// if a group or a container/bound-text or frame, duplicate atomically
|
|
@@ -20,7 +20,7 @@ export declare const actionToggleElementLock: {
|
|
|
20
20
|
errorMessage: import("react").ReactNode;
|
|
21
21
|
activeEmbeddable: {
|
|
22
22
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
23
|
-
state: "
|
|
23
|
+
state: "hover" | "active";
|
|
24
24
|
} | null;
|
|
25
25
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
26
26
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -68,7 +68,7 @@ export declare const actionToggleElementLock: {
|
|
|
68
68
|
scrollY: number;
|
|
69
69
|
cursorButton: "up" | "down";
|
|
70
70
|
scrolledOutside: boolean;
|
|
71
|
-
name: string;
|
|
71
|
+
name: string | null;
|
|
72
72
|
isResizing: boolean;
|
|
73
73
|
isRotating: boolean;
|
|
74
74
|
zoom: Readonly<{
|
|
@@ -81,14 +81,14 @@ export declare const actionToggleElementLock: {
|
|
|
81
81
|
tab?: string | undefined;
|
|
82
82
|
} | null;
|
|
83
83
|
openDialog: {
|
|
84
|
-
name: "
|
|
84
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
85
85
|
} | {
|
|
86
86
|
name: "settings";
|
|
87
87
|
source: "settings" | "tool" | "generation";
|
|
88
88
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
89
89
|
} | {
|
|
90
90
|
name: "ttd";
|
|
91
|
-
tab: "
|
|
91
|
+
tab: "text-to-diagram" | "mermaid";
|
|
92
92
|
} | null;
|
|
93
93
|
defaultSidebarDockedPreference: boolean;
|
|
94
94
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -145,7 +145,7 @@ export declare const actionToggleElementLock: {
|
|
|
145
145
|
data: import("../charts").Spreadsheet;
|
|
146
146
|
};
|
|
147
147
|
pendingImageElementId: string | null;
|
|
148
|
-
showHyperlinkPopup: false | "
|
|
148
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
149
149
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
150
150
|
originSnapOffset: {
|
|
151
151
|
x: number;
|
|
@@ -185,7 +185,7 @@ export declare const actionUnlockAllElements: {
|
|
|
185
185
|
errorMessage: import("react").ReactNode;
|
|
186
186
|
activeEmbeddable: {
|
|
187
187
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
188
|
-
state: "
|
|
188
|
+
state: "hover" | "active";
|
|
189
189
|
} | null;
|
|
190
190
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
191
191
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -233,7 +233,7 @@ export declare const actionUnlockAllElements: {
|
|
|
233
233
|
scrollY: number;
|
|
234
234
|
cursorButton: "up" | "down";
|
|
235
235
|
scrolledOutside: boolean;
|
|
236
|
-
name: string;
|
|
236
|
+
name: string | null;
|
|
237
237
|
isResizing: boolean;
|
|
238
238
|
isRotating: boolean;
|
|
239
239
|
zoom: Readonly<{
|
|
@@ -246,14 +246,14 @@ export declare const actionUnlockAllElements: {
|
|
|
246
246
|
tab?: string | undefined;
|
|
247
247
|
} | null;
|
|
248
248
|
openDialog: {
|
|
249
|
-
name: "
|
|
249
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
250
250
|
} | {
|
|
251
251
|
name: "settings";
|
|
252
252
|
source: "settings" | "tool" | "generation";
|
|
253
253
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
254
254
|
} | {
|
|
255
255
|
name: "ttd";
|
|
256
|
-
tab: "
|
|
256
|
+
tab: "text-to-diagram" | "mermaid";
|
|
257
257
|
} | null;
|
|
258
258
|
defaultSidebarDockedPreference: boolean;
|
|
259
259
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -307,7 +307,7 @@ export declare const actionUnlockAllElements: {
|
|
|
307
307
|
data: import("../charts").Spreadsheet;
|
|
308
308
|
};
|
|
309
309
|
pendingImageElementId: string | null;
|
|
310
|
-
showHyperlinkPopup: false | "
|
|
310
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
311
311
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
312
312
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
313
313
|
originSnapOffset: {
|