@excalidraw/excalidraw 0.17.1-7441-4e2c539 → 0.17.1-a38e82f
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 +52 -2
- package/dist/browser/dev/excalidraw-assets-dev/chunk-5VWQDKDR.js +20279 -0
- package/dist/browser/dev/excalidraw-assets-dev/chunk-5VWQDKDR.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{chunk-2W5GQUR4.js → chunk-IM4WTX2M.js} +12 -6
- package/dist/browser/dev/excalidraw-assets-dev/chunk-IM4WTX2M.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{en-OC6JWP3X.js → en-IOBA4CS2.js} +4 -2
- 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/{image-HYNUJ3XL.js → image-VKDAL6BQ.js} +2 -4
- 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 +34707 -26
- package/dist/browser/dev/index.js.map +4 -4
- package/dist/browser/prod/excalidraw-assets/chunk-LIG3S5TN.js +11 -0
- package/dist/browser/prod/excalidraw-assets/chunk-N2C5DK3B.js +55 -0
- package/dist/browser/prod/excalidraw-assets/en-WFZVQ7I6.js +1 -0
- package/dist/browser/prod/excalidraw-assets/image-4AT7LYMR.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-TDNWCAOT.json} +9 -5
- package/dist/dev/index.css +189 -129
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +38445 -39402
- package/dist/dev/index.js.map +4 -4
- package/dist/excalidraw/actions/actionAddToLibrary.d.ts +12 -12
- package/dist/excalidraw/actions/actionAlign.d.ts +6 -6
- package/dist/excalidraw/actions/actionAlign.js +2 -1
- package/dist/excalidraw/actions/actionBoundText.d.ts +8 -8
- package/dist/excalidraw/actions/actionBoundText.js +8 -8
- package/dist/excalidraw/actions/actionCanvas.d.ts +46 -46
- package/dist/excalidraw/actions/actionClipboard.d.ts +27 -27
- package/dist/excalidraw/actions/actionClipboard.js +9 -2
- package/dist/excalidraw/actions/actionDeleteSelected.d.ts +12 -12
- 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 +8 -8
- package/dist/excalidraw/actions/actionExport.d.ts +35 -35
- package/dist/excalidraw/actions/actionExport.js +4 -4
- package/dist/excalidraw/actions/actionFinalize.d.ts +7 -7
- 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 +13 -13
- package/dist/excalidraw/actions/actionFrame.js +1 -1
- package/dist/excalidraw/actions/actionGroup.d.ts +8 -8
- package/dist/excalidraw/actions/actionGroup.js +3 -2
- package/dist/excalidraw/actions/actionLinearEditor.d.ts +4 -4
- package/dist/excalidraw/actions/actionLinearEditor.js +1 -1
- package/dist/excalidraw/{element/Hyperlink.d.ts → actions/actionLink.d.ts} +28 -50
- package/dist/excalidraw/actions/actionLink.js +40 -0
- package/dist/excalidraw/actions/actionMenu.d.ts +11 -11
- package/dist/excalidraw/actions/actionNavigate.d.ts +8 -8
- package/dist/excalidraw/actions/actionNavigate.js +1 -1
- package/dist/excalidraw/actions/actionProperties.d.ts +64 -64
- package/dist/excalidraw/actions/actionProperties.js +32 -27
- package/dist/excalidraw/actions/actionSelectAll.d.ts +4 -4
- package/dist/excalidraw/actions/actionSelectAll.js +1 -1
- package/dist/excalidraw/actions/actionStyles.d.ts +6 -6
- package/dist/excalidraw/actions/actionStyles.js +4 -4
- package/dist/excalidraw/actions/actionToggleGridMode.d.ts +4 -4
- package/dist/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -4
- package/dist/excalidraw/actions/actionToggleStats.d.ts +4 -4
- package/dist/excalidraw/actions/actionToggleViewMode.d.ts +4 -4
- package/dist/excalidraw/actions/actionToggleZenMode.d.ts +4 -4
- 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 +32 -17
- package/dist/excalidraw/components/App.js +474 -339
- 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 +16 -12
- 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/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/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/dropdownMenu/common.d.ts +1 -1
- 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 +8 -0
- package/dist/excalidraw/constants.js +10 -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/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 +11 -12
- package/dist/excalidraw/element/embeddable.js +17 -27
- package/dist/excalidraw/element/image.js +1 -2
- package/dist/excalidraw/element/index.d.ts +0 -1
- package/dist/excalidraw/element/index.js +0 -1
- package/dist/excalidraw/element/linearElementEditor.d.ts +35 -35
- 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 +18 -20
- package/dist/excalidraw/element/textElement.js +80 -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/emitter.d.ts +5 -9
- package/dist/excalidraw/emitter.js +12 -12
- 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/index.d.ts +7 -3
- package/dist/excalidraw/index.js +14 -5
- package/dist/excalidraw/laser-trails.d.ts +19 -0
- package/dist/excalidraw/laser-trails.js +95 -0
- package/dist/excalidraw/locales/en.json +9 -5
- 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 +11 -12
- package/dist/excalidraw/utility-types.d.ts +5 -0
- package/dist/excalidraw/utils.d.ts +25 -16
- package/dist/excalidraw/utils.js +52 -45
- package/dist/{dev/en-RLIAOBCI.json → prod/en-TDNWCAOT.json} +9 -5
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +45 -45
- package/dist/utils/export.d.ts +0 -6
- package/dist/utils/export.js +0 -6
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/withinBounds.js +2 -1
- 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-SUHLFFEF.js +0 -53449
- package/dist/browser/dev/excalidraw-assets-dev/chunk-SUHLFFEF.js.map +0 -7
- package/dist/browser/dev/excalidraw-assets-dev/image-NOPDRTTM.css +0 -5797
- package/dist/browser/dev/excalidraw-assets-dev/image-NOPDRTTM.css.map +0 -7
- package/dist/browser/prod/excalidraw-assets/chunk-HE2P7BQ6.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-DZ6B4AID.js +0 -1
- package/dist/browser/prod/excalidraw-assets/image-J2QCCYAR.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-IOBA4CS2.js.map} +0 -0
- /package/dist/browser/dev/excalidraw-assets-dev/{image-HYNUJ3XL.js.map → image-VKDAL6BQ.js.map} +0 -0
|
@@ -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<{
|
|
@@ -89,7 +89,7 @@ export declare const actionDeleteSelected: {
|
|
|
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<{
|
|
@@ -267,7 +267,7 @@ export declare const actionDeleteSelected: {
|
|
|
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<{
|
|
@@ -416,7 +416,7 @@ export declare const actionDeleteSelected: {
|
|
|
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<{
|
|
@@ -88,7 +88,7 @@ export declare const actionToggleElementLock: {
|
|
|
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<{
|
|
@@ -253,7 +253,7 @@ export declare const actionUnlockAllElements: {
|
|
|
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: {
|
|
@@ -17,7 +17,7 @@ export declare const actionChangeProjectName: {
|
|
|
17
17
|
errorMessage: import("react").ReactNode;
|
|
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;
|
|
@@ -84,7 +84,7 @@ export declare const actionChangeProjectName: {
|
|
|
84
84
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
85
85
|
} | {
|
|
86
86
|
name: "ttd";
|
|
87
|
-
tab: "
|
|
87
|
+
tab: "text-to-diagram" | "mermaid";
|
|
88
88
|
} | null;
|
|
89
89
|
defaultSidebarDockedPreference: boolean;
|
|
90
90
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -141,7 +141,7 @@ export declare const actionChangeProjectName: {
|
|
|
141
141
|
data: import("../charts").Spreadsheet;
|
|
142
142
|
};
|
|
143
143
|
pendingImageElementId: string | null;
|
|
144
|
-
showHyperlinkPopup: false | "
|
|
144
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
145
145
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
146
146
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
147
147
|
originSnapOffset: {
|
|
@@ -154,7 +154,7 @@ export declare const actionChangeProjectName: {
|
|
|
154
154
|
};
|
|
155
155
|
commitToHistory: false;
|
|
156
156
|
};
|
|
157
|
-
PanelComponent: ({ appState, updateData, appProps, data }: import("./types").PanelComponentProps) => JSX.Element;
|
|
157
|
+
PanelComponent: ({ appState, updateData, appProps, data, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
158
158
|
} & {
|
|
159
159
|
keyTest?: undefined;
|
|
160
160
|
};
|
|
@@ -177,7 +177,7 @@ export declare const actionChangeExportScale: {
|
|
|
177
177
|
errorMessage: import("react").ReactNode;
|
|
178
178
|
activeEmbeddable: {
|
|
179
179
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
180
|
-
state: "
|
|
180
|
+
state: "hover" | "active";
|
|
181
181
|
} | null;
|
|
182
182
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
183
183
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -224,7 +224,7 @@ export declare const actionChangeExportScale: {
|
|
|
224
224
|
scrollY: number;
|
|
225
225
|
cursorButton: "up" | "down";
|
|
226
226
|
scrolledOutside: boolean;
|
|
227
|
-
name: string;
|
|
227
|
+
name: string | null;
|
|
228
228
|
isResizing: boolean;
|
|
229
229
|
isRotating: boolean;
|
|
230
230
|
zoom: Readonly<{
|
|
@@ -244,7 +244,7 @@ export declare const actionChangeExportScale: {
|
|
|
244
244
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
245
245
|
} | {
|
|
246
246
|
name: "ttd";
|
|
247
|
-
tab: "
|
|
247
|
+
tab: "text-to-diagram" | "mermaid";
|
|
248
248
|
} | null;
|
|
249
249
|
defaultSidebarDockedPreference: boolean;
|
|
250
250
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -301,7 +301,7 @@ export declare const actionChangeExportScale: {
|
|
|
301
301
|
data: import("../charts").Spreadsheet;
|
|
302
302
|
};
|
|
303
303
|
pendingImageElementId: string | null;
|
|
304
|
-
showHyperlinkPopup: false | "
|
|
304
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
305
305
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
306
306
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
307
307
|
originSnapOffset: {
|
|
@@ -337,7 +337,7 @@ export declare const actionChangeExportBackground: {
|
|
|
337
337
|
errorMessage: import("react").ReactNode;
|
|
338
338
|
activeEmbeddable: {
|
|
339
339
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
340
|
-
state: "
|
|
340
|
+
state: "hover" | "active";
|
|
341
341
|
} | null;
|
|
342
342
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
343
343
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -384,7 +384,7 @@ export declare const actionChangeExportBackground: {
|
|
|
384
384
|
scrollY: number;
|
|
385
385
|
cursorButton: "up" | "down";
|
|
386
386
|
scrolledOutside: boolean;
|
|
387
|
-
name: string;
|
|
387
|
+
name: string | null;
|
|
388
388
|
isResizing: boolean;
|
|
389
389
|
isRotating: boolean;
|
|
390
390
|
zoom: Readonly<{
|
|
@@ -404,7 +404,7 @@ export declare const actionChangeExportBackground: {
|
|
|
404
404
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
405
405
|
} | {
|
|
406
406
|
name: "ttd";
|
|
407
|
-
tab: "
|
|
407
|
+
tab: "text-to-diagram" | "mermaid";
|
|
408
408
|
} | null;
|
|
409
409
|
defaultSidebarDockedPreference: boolean;
|
|
410
410
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -461,7 +461,7 @@ export declare const actionChangeExportBackground: {
|
|
|
461
461
|
data: import("../charts").Spreadsheet;
|
|
462
462
|
};
|
|
463
463
|
pendingImageElementId: string | null;
|
|
464
|
-
showHyperlinkPopup: false | "
|
|
464
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
465
465
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
466
466
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
467
467
|
originSnapOffset: {
|
|
@@ -497,7 +497,7 @@ export declare const actionChangeExportEmbedScene: {
|
|
|
497
497
|
errorMessage: import("react").ReactNode;
|
|
498
498
|
activeEmbeddable: {
|
|
499
499
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
500
|
-
state: "
|
|
500
|
+
state: "hover" | "active";
|
|
501
501
|
} | null;
|
|
502
502
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
503
503
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -544,7 +544,7 @@ export declare const actionChangeExportEmbedScene: {
|
|
|
544
544
|
scrollY: number;
|
|
545
545
|
cursorButton: "up" | "down";
|
|
546
546
|
scrolledOutside: boolean;
|
|
547
|
-
name: string;
|
|
547
|
+
name: string | null;
|
|
548
548
|
isResizing: boolean;
|
|
549
549
|
isRotating: boolean;
|
|
550
550
|
zoom: Readonly<{
|
|
@@ -564,7 +564,7 @@ export declare const actionChangeExportEmbedScene: {
|
|
|
564
564
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
565
565
|
} | {
|
|
566
566
|
name: "ttd";
|
|
567
|
-
tab: "
|
|
567
|
+
tab: "text-to-diagram" | "mermaid";
|
|
568
568
|
} | null;
|
|
569
569
|
defaultSidebarDockedPreference: boolean;
|
|
570
570
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -621,7 +621,7 @@ export declare const actionChangeExportEmbedScene: {
|
|
|
621
621
|
data: import("../charts").Spreadsheet;
|
|
622
622
|
};
|
|
623
623
|
pendingImageElementId: string | null;
|
|
624
|
-
showHyperlinkPopup: false | "
|
|
624
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
625
625
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
626
626
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
627
627
|
originSnapOffset: {
|
|
@@ -661,7 +661,7 @@ export declare const actionSaveToActiveFile: {
|
|
|
661
661
|
errorMessage: import("react").ReactNode;
|
|
662
662
|
activeEmbeddable: {
|
|
663
663
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
664
|
-
state: "
|
|
664
|
+
state: "hover" | "active";
|
|
665
665
|
} | null;
|
|
666
666
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
667
667
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -709,7 +709,7 @@ export declare const actionSaveToActiveFile: {
|
|
|
709
709
|
scrollY: number;
|
|
710
710
|
cursorButton: "up" | "down";
|
|
711
711
|
scrolledOutside: boolean;
|
|
712
|
-
name: string;
|
|
712
|
+
name: string | null;
|
|
713
713
|
isResizing: boolean;
|
|
714
714
|
isRotating: boolean;
|
|
715
715
|
zoom: Readonly<{
|
|
@@ -729,7 +729,7 @@ export declare const actionSaveToActiveFile: {
|
|
|
729
729
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
730
730
|
} | {
|
|
731
731
|
name: "ttd";
|
|
732
|
-
tab: "
|
|
732
|
+
tab: "text-to-diagram" | "mermaid";
|
|
733
733
|
} | null;
|
|
734
734
|
defaultSidebarDockedPreference: boolean;
|
|
735
735
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -780,7 +780,7 @@ export declare const actionSaveToActiveFile: {
|
|
|
780
780
|
data: import("../charts").Spreadsheet;
|
|
781
781
|
};
|
|
782
782
|
pendingImageElementId: string | null;
|
|
783
|
-
showHyperlinkPopup: false | "
|
|
783
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
784
784
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
785
785
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
786
786
|
originSnapOffset: {
|
|
@@ -823,7 +823,7 @@ export declare const actionSaveFileToDisk: {
|
|
|
823
823
|
errorMessage: import("react").ReactNode;
|
|
824
824
|
activeEmbeddable: {
|
|
825
825
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
826
|
-
state: "
|
|
826
|
+
state: "hover" | "active";
|
|
827
827
|
} | null;
|
|
828
828
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
829
829
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -871,7 +871,7 @@ export declare const actionSaveFileToDisk: {
|
|
|
871
871
|
scrollY: number;
|
|
872
872
|
cursorButton: "up" | "down";
|
|
873
873
|
scrolledOutside: boolean;
|
|
874
|
-
name: string;
|
|
874
|
+
name: string | null;
|
|
875
875
|
isResizing: boolean;
|
|
876
876
|
isRotating: boolean;
|
|
877
877
|
zoom: Readonly<{
|
|
@@ -932,7 +932,7 @@ export declare const actionSaveFileToDisk: {
|
|
|
932
932
|
data: import("../charts").Spreadsheet;
|
|
933
933
|
};
|
|
934
934
|
pendingImageElementId: string | null;
|
|
935
|
-
showHyperlinkPopup: false | "
|
|
935
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
936
936
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
937
937
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
938
938
|
originSnapOffset: {
|
|
@@ -971,7 +971,7 @@ export declare const actionLoadScene: {
|
|
|
971
971
|
errorMessage: import("react").ReactNode;
|
|
972
972
|
activeEmbeddable: {
|
|
973
973
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
974
|
-
state: "
|
|
974
|
+
state: "hover" | "active";
|
|
975
975
|
} | null;
|
|
976
976
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
977
977
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -1019,7 +1019,7 @@ export declare const actionLoadScene: {
|
|
|
1019
1019
|
scrollY: number;
|
|
1020
1020
|
cursorButton: "up" | "down";
|
|
1021
1021
|
scrolledOutside: boolean;
|
|
1022
|
-
name: string;
|
|
1022
|
+
name: string | null;
|
|
1023
1023
|
isResizing: boolean;
|
|
1024
1024
|
isRotating: boolean;
|
|
1025
1025
|
zoom: Readonly<{
|
|
@@ -1039,7 +1039,7 @@ export declare const actionLoadScene: {
|
|
|
1039
1039
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
1040
1040
|
} | {
|
|
1041
1041
|
name: "ttd";
|
|
1042
|
-
tab: "
|
|
1042
|
+
tab: "text-to-diagram" | "mermaid";
|
|
1043
1043
|
} | null;
|
|
1044
1044
|
defaultSidebarDockedPreference: boolean;
|
|
1045
1045
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -1092,7 +1092,7 @@ export declare const actionLoadScene: {
|
|
|
1092
1092
|
data: import("../charts").Spreadsheet;
|
|
1093
1093
|
};
|
|
1094
1094
|
pendingImageElementId: string | null;
|
|
1095
|
-
showHyperlinkPopup: false | "
|
|
1095
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
1096
1096
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1097
1097
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
1098
1098
|
originSnapOffset: {
|
|
@@ -1118,7 +1118,7 @@ export declare const actionLoadScene: {
|
|
|
1118
1118
|
isLoading: boolean;
|
|
1119
1119
|
activeEmbeddable: {
|
|
1120
1120
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
1121
|
-
state: "
|
|
1121
|
+
state: "hover" | "active";
|
|
1122
1122
|
} | null;
|
|
1123
1123
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1124
1124
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -1166,7 +1166,7 @@ export declare const actionLoadScene: {
|
|
|
1166
1166
|
scrollY: number;
|
|
1167
1167
|
cursorButton: "up" | "down";
|
|
1168
1168
|
scrolledOutside: boolean;
|
|
1169
|
-
name: string;
|
|
1169
|
+
name: string | null;
|
|
1170
1170
|
isResizing: boolean;
|
|
1171
1171
|
isRotating: boolean;
|
|
1172
1172
|
zoom: Readonly<{
|
|
@@ -1186,7 +1186,7 @@ export declare const actionLoadScene: {
|
|
|
1186
1186
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
1187
1187
|
} | {
|
|
1188
1188
|
name: "ttd";
|
|
1189
|
-
tab: "
|
|
1189
|
+
tab: "text-to-diagram" | "mermaid";
|
|
1190
1190
|
} | null;
|
|
1191
1191
|
defaultSidebarDockedPreference: boolean;
|
|
1192
1192
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -1243,7 +1243,7 @@ export declare const actionLoadScene: {
|
|
|
1243
1243
|
data: import("../charts").Spreadsheet;
|
|
1244
1244
|
};
|
|
1245
1245
|
pendingImageElementId: string | null;
|
|
1246
|
-
showHyperlinkPopup: false | "
|
|
1246
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
1247
1247
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1248
1248
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
1249
1249
|
originSnapOffset: {
|
|
@@ -1280,7 +1280,7 @@ export declare const actionExportWithDarkMode: {
|
|
|
1280
1280
|
errorMessage: import("react").ReactNode;
|
|
1281
1281
|
activeEmbeddable: {
|
|
1282
1282
|
element: import("../element/types").NonDeletedExcalidrawElement;
|
|
1283
|
-
state: "
|
|
1283
|
+
state: "hover" | "active";
|
|
1284
1284
|
} | null;
|
|
1285
1285
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
1286
1286
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
@@ -1327,7 +1327,7 @@ export declare const actionExportWithDarkMode: {
|
|
|
1327
1327
|
scrollY: number;
|
|
1328
1328
|
cursorButton: "up" | "down";
|
|
1329
1329
|
scrolledOutside: boolean;
|
|
1330
|
-
name: string;
|
|
1330
|
+
name: string | null;
|
|
1331
1331
|
isResizing: boolean;
|
|
1332
1332
|
isRotating: boolean;
|
|
1333
1333
|
zoom: Readonly<{
|
|
@@ -1347,7 +1347,7 @@ export declare const actionExportWithDarkMode: {
|
|
|
1347
1347
|
tab: "text-to-diagram" | "diagram-to-code";
|
|
1348
1348
|
} | {
|
|
1349
1349
|
name: "ttd";
|
|
1350
|
-
tab: "
|
|
1350
|
+
tab: "text-to-diagram" | "mermaid";
|
|
1351
1351
|
} | null;
|
|
1352
1352
|
defaultSidebarDockedPreference: boolean;
|
|
1353
1353
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
@@ -1404,7 +1404,7 @@ export declare const actionExportWithDarkMode: {
|
|
|
1404
1404
|
data: import("../charts").Spreadsheet;
|
|
1405
1405
|
};
|
|
1406
1406
|
pendingImageElementId: string | null;
|
|
1407
|
-
showHyperlinkPopup: false | "
|
|
1407
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
1408
1408
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1409
1409
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
1410
1410
|
originSnapOffset: {
|
|
@@ -24,7 +24,7 @@ export const actionChangeProjectName = register({
|
|
|
24
24
|
perform: (_elements, appState, value) => {
|
|
25
25
|
return { appState: { ...appState, name: value }, commitToHistory: false };
|
|
26
26
|
},
|
|
27
|
-
PanelComponent: ({ appState, updateData, appProps, data }) => (_jsx(ProjectName, { label: t("labels.fileTitle"), value:
|
|
27
|
+
PanelComponent: ({ appState, updateData, appProps, data, app }) => (_jsx(ProjectName, { label: t("labels.fileTitle"), value: app.getName(), onChange: (name) => updateData(name), ignoreFocus: data?.ignoreFocus ?? false })),
|
|
28
28
|
});
|
|
29
29
|
export const actionChangeExportScale = register({
|
|
30
30
|
name: "changeExportScale",
|
|
@@ -82,8 +82,8 @@ export const actionSaveToActiveFile = register({
|
|
|
82
82
|
const fileHandleExists = !!appState.fileHandle;
|
|
83
83
|
try {
|
|
84
84
|
const { fileHandle } = isImageFileHandle(appState.fileHandle)
|
|
85
|
-
? await resaveAsImageWithScene(elements, appState, app.files)
|
|
86
|
-
: await saveAsJSON(elements, appState, app.files);
|
|
85
|
+
? await resaveAsImageWithScene(elements, appState, app.files, app.getName())
|
|
86
|
+
: await saveAsJSON(elements, appState, app.files, app.getName());
|
|
87
87
|
return {
|
|
88
88
|
commitToHistory: false,
|
|
89
89
|
appState: {
|
|
@@ -120,7 +120,7 @@ export const actionSaveFileToDisk = register({
|
|
|
120
120
|
const { fileHandle } = await saveAsJSON(elements, {
|
|
121
121
|
...appState,
|
|
122
122
|
fileHandle: null,
|
|
123
|
-
}, app.files);
|
|
123
|
+
}, app.files, app.getName());
|
|
124
124
|
return {
|
|
125
125
|
commitToHistory: false,
|
|
126
126
|
appState: {
|