@excalidraw/excalidraw 0.17.1-d2f67e6 → 0.17.1-e63dd02
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 +4 -0
- package/dist/browser/dev/excalidraw-assets-dev/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/{chunk-EM6LVGFW.js → chunk-IT7T3AIK.js} +23 -5
- package/dist/browser/dev/excalidraw-assets-dev/chunk-IT7T3AIK.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{chunk-B4UMSLQQ.js → chunk-RNHSD5AR.js} +7451 -2098
- package/dist/browser/dev/excalidraw-assets-dev/chunk-RNHSD5AR.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{dist-6QVAH5JA.js → dist-DNSPZDOZ.js} +31 -19
- package/dist/browser/dev/excalidraw-assets-dev/dist-DNSPZDOZ.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{en-AZFA5HJJ.js → en-XV7OZCPP.js} +6 -2
- package/dist/browser/dev/excalidraw-assets-dev/{image-V7E6IT6R.js → image-77HZYGLG.js} +2 -2
- package/dist/browser/dev/excalidraw-assets-dev/{image-O66MQ7WQ.css → image-WDHYGKKP.css} +1 -1
- package/dist/browser/dev/excalidraw-assets-dev/{image-O66MQ7WQ.css.map → image-WDHYGKKP.css.map} +2 -2
- package/dist/browser/dev/index.css +449 -114
- package/dist/browser/dev/index.css.map +3 -3
- package/dist/browser/dev/index.js +4143 -5956
- package/dist/browser/dev/index.js.map +4 -4
- package/dist/browser/prod/excalidraw-assets/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/chunk-OYEADJSR.js +63 -0
- package/dist/browser/prod/excalidraw-assets/{chunk-7DXALCB2.js → chunk-PDYFZJMS.js} +3 -3
- package/dist/browser/prod/excalidraw-assets/dist-NLUQPPQQ.js +7 -0
- package/dist/browser/prod/excalidraw-assets/en-YVAVVILW.js +1 -0
- package/dist/browser/prod/excalidraw-assets/image-X3GFZHNN.js +1 -0
- package/dist/browser/prod/index.css +1 -1
- package/dist/browser/prod/index.js +40 -50
- package/dist/dev/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
- package/dist/dev/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
- package/dist/dev/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
- package/dist/dev/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
- package/dist/dev/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
- package/dist/dev/{en-EB2MBPAV.json → en-YNVBSAIL.json} +18 -4
- package/dist/dev/index.css +449 -114
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +21626 -18122
- package/dist/dev/index.js.map +4 -4
- package/dist/excalidraw/actions/actionAddToLibrary.d.ts +9 -3
- package/dist/excalidraw/actions/actionBoundText.d.ts +6 -2
- package/dist/excalidraw/actions/actionCanvas.d.ts +36 -12
- package/dist/excalidraw/actions/actionClipboard.d.ts +22 -7
- package/dist/excalidraw/actions/actionDeleteSelected.d.ts +12 -5
- package/dist/excalidraw/actions/actionDeleteSelected.js +24 -5
- package/dist/excalidraw/actions/actionDuplicateSelection.js +1 -2
- package/dist/excalidraw/actions/actionElementLock.d.ts +6 -2
- package/dist/excalidraw/actions/actionExport.d.ts +27 -9
- package/dist/excalidraw/actions/actionFinalize.d.ts +6 -2
- package/dist/excalidraw/actions/actionFinalize.js +2 -2
- package/dist/excalidraw/actions/actionFlip.js +2 -2
- package/dist/excalidraw/actions/actionFrame.d.ts +12 -4
- package/dist/excalidraw/actions/actionGroup.d.ts +6 -2
- package/dist/excalidraw/actions/actionHistory.js +4 -4
- package/dist/excalidraw/actions/actionLinearEditor.d.ts +3 -1
- package/dist/excalidraw/actions/actionLinearEditor.js +3 -2
- package/dist/excalidraw/actions/actionLink.d.ts +3 -1
- package/dist/excalidraw/actions/actionMenu.d.ts +9 -3
- package/dist/excalidraw/actions/actionNavigate.d.ts +6 -2
- package/dist/excalidraw/actions/actionProperties.d.ts +411 -56
- package/dist/excalidraw/actions/actionProperties.js +383 -58
- package/dist/excalidraw/actions/actionSelectAll.d.ts +3 -1
- package/dist/excalidraw/actions/actionStyles.d.ts +3 -1
- package/dist/excalidraw/actions/actionStyles.js +3 -2
- package/dist/excalidraw/actions/actionToggleGridMode.d.ts +3 -1
- package/dist/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +3 -1
- package/dist/excalidraw/actions/actionToggleStats.d.ts +3 -1
- package/dist/excalidraw/actions/actionToggleViewMode.d.ts +3 -1
- package/dist/excalidraw/actions/actionToggleZenMode.d.ts +3 -1
- package/dist/excalidraw/actions/types.d.ts +1 -1
- package/dist/excalidraw/analytics.js +9 -7
- package/dist/excalidraw/appState.d.ts +1 -0
- package/dist/excalidraw/appState.js +9 -1
- package/dist/excalidraw/binaryheap.d.ts +12 -0
- package/dist/excalidraw/binaryheap.js +93 -0
- package/dist/excalidraw/change.d.ts +2 -1
- package/dist/excalidraw/change.js +6 -4
- package/dist/excalidraw/charts.js +0 -10
- package/dist/excalidraw/components/Actions.js +7 -5
- package/dist/excalidraw/components/App.d.ts +5 -9
- package/dist/excalidraw/components/App.js +218 -161
- package/dist/excalidraw/components/ButtonIcon.d.ts +15 -0
- package/dist/excalidraw/components/ButtonIcon.js +8 -0
- package/dist/excalidraw/components/ButtonIconSelect.js +2 -3
- package/dist/excalidraw/components/ButtonSeparator.d.ts +2 -0
- package/dist/excalidraw/components/ButtonSeparator.js +7 -0
- package/dist/excalidraw/components/ColorPicker/ColorPicker.js +47 -79
- package/dist/excalidraw/components/ColorPicker/Picker.js +1 -1
- package/dist/excalidraw/components/FontPicker/FontPicker.d.ts +21 -0
- package/dist/excalidraw/components/FontPicker/FontPicker.js +49 -0
- package/dist/excalidraw/components/FontPicker/FontPickerList.d.ts +25 -0
- package/dist/excalidraw/components/FontPicker/FontPickerList.js +119 -0
- package/dist/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +7 -0
- package/dist/excalidraw/components/FontPicker/FontPickerTrigger.js +13 -0
- package/dist/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +14 -0
- package/dist/excalidraw/components/FontPicker/keyboardNavHandlers.js +38 -0
- package/dist/excalidraw/components/HelpDialog.js +1 -1
- package/dist/excalidraw/components/HintViewer.js +6 -3
- package/dist/excalidraw/components/PropertiesPopover.d.ts +15 -0
- package/dist/excalidraw/components/PropertiesPopover.js +31 -0
- package/dist/excalidraw/components/QuickSearch.d.ts +9 -0
- package/dist/excalidraw/components/QuickSearch.js +8 -0
- package/dist/excalidraw/components/ScrollableList.d.ts +9 -0
- package/dist/excalidraw/components/ScrollableList.js +8 -0
- package/dist/excalidraw/components/Stats/Angle.d.ts +7 -3
- package/dist/excalidraw/components/Stats/Angle.js +39 -31
- package/dist/excalidraw/components/Stats/Dimension.d.ts +6 -3
- package/dist/excalidraw/components/Stats/Dimension.js +51 -49
- package/dist/excalidraw/components/Stats/DragInput.d.ts +15 -6
- package/dist/excalidraw/components/Stats/DragInput.js +59 -26
- package/dist/excalidraw/components/Stats/FontSize.d.ts +8 -4
- package/dist/excalidraw/components/Stats/FontSize.js +39 -36
- package/dist/excalidraw/components/Stats/MultiAngle.d.ts +5 -3
- package/dist/excalidraw/components/Stats/MultiAngle.js +43 -34
- package/dist/excalidraw/components/Stats/MultiDimension.d.ts +5 -3
- package/dist/excalidraw/components/Stats/MultiDimension.js +101 -99
- package/dist/excalidraw/components/Stats/MultiFontSize.d.ts +6 -3
- package/dist/excalidraw/components/Stats/MultiFontSize.js +47 -32
- package/dist/excalidraw/components/Stats/MultiPosition.d.ts +3 -1
- package/dist/excalidraw/components/Stats/MultiPosition.js +52 -48
- package/dist/excalidraw/components/Stats/Position.d.ts +5 -1
- package/dist/excalidraw/components/Stats/Position.js +31 -29
- package/dist/excalidraw/components/Stats/index.js +5 -17
- package/dist/excalidraw/components/Stats/utils.d.ts +14 -3
- package/dist/excalidraw/components/Stats/utils.js +48 -9
- package/dist/excalidraw/components/TTDDialog/common.d.ts +2 -2
- package/dist/excalidraw/components/TTDDialog/common.js +3 -7
- package/dist/excalidraw/components/UserList.js +22 -22
- package/dist/excalidraw/components/canvases/StaticCanvas.js +1 -0
- package/dist/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +12 -3
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +24 -4
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuItem.js +55 -14
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +2 -1
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuItemContent.js +2 -2
- package/dist/excalidraw/components/dropdownMenu/common.d.ts +1 -1
- package/dist/excalidraw/components/dropdownMenu/common.js +3 -2
- package/dist/excalidraw/components/icons.d.ts +4 -0
- package/dist/excalidraw/components/icons.js +7 -0
- package/dist/excalidraw/components/main-menu/MainMenu.d.ts +12 -3
- package/dist/excalidraw/components/welcome-screen/WelcomeScreen.Center.js +2 -2
- package/dist/excalidraw/components/welcome-screen/WelcomeScreen.Hints.js +3 -3
- package/dist/excalidraw/constants.d.ts +17 -2
- package/dist/excalidraw/constants.js +21 -4
- package/dist/excalidraw/data/reconcile.js +18 -1
- package/dist/excalidraw/data/restore.js +55 -9
- package/dist/excalidraw/data/transform.js +8 -5
- package/dist/excalidraw/element/binding.d.ts +28 -9
- package/dist/excalidraw/element/binding.js +303 -71
- package/dist/excalidraw/element/collision.d.ts +1 -1
- package/dist/excalidraw/element/collision.js +4 -1
- package/dist/excalidraw/element/dragElements.d.ts +2 -2
- package/dist/excalidraw/element/dragElements.js +13 -3
- package/dist/excalidraw/element/embeddable.d.ts +3 -1
- package/dist/excalidraw/element/heading.d.ts +11 -0
- package/dist/excalidraw/element/heading.js +81 -0
- package/dist/excalidraw/element/index.d.ts +1 -1
- package/dist/excalidraw/element/index.js +1 -1
- package/dist/excalidraw/element/linearElementEditor.d.ts +21 -13
- package/dist/excalidraw/element/linearElementEditor.js +133 -56
- package/dist/excalidraw/element/newElement.d.ts +8 -3
- package/dist/excalidraw/element/newElement.js +15 -2
- package/dist/excalidraw/element/resizeElements.d.ts +4 -3
- package/dist/excalidraw/element/resizeElements.js +47 -23
- package/dist/excalidraw/element/routing.d.ts +13 -0
- package/dist/excalidraw/element/routing.js +641 -0
- package/dist/excalidraw/element/textElement.d.ts +3 -26
- package/dist/excalidraw/element/textElement.js +54 -110
- package/dist/excalidraw/element/textWysiwyg.js +39 -47
- package/dist/excalidraw/element/transformHandles.js +7 -2
- package/dist/excalidraw/element/typeChecks.d.ts +5 -2
- package/dist/excalidraw/element/typeChecks.js +17 -0
- package/dist/excalidraw/element/types.d.ts +12 -1
- package/dist/excalidraw/fonts/ExcalidrawFont.d.ts +21 -0
- package/dist/excalidraw/fonts/ExcalidrawFont.js +112 -0
- package/dist/excalidraw/fonts/index.d.ts +58 -0
- package/dist/excalidraw/fonts/index.js +240 -0
- package/dist/excalidraw/fonts/metadata.d.ts +36 -0
- package/dist/excalidraw/fonts/metadata.js +91 -0
- package/dist/excalidraw/fractionalIndex.d.ts +11 -4
- package/dist/excalidraw/fractionalIndex.js +38 -6
- package/dist/excalidraw/frame.d.ts +1 -1
- package/dist/excalidraw/frame.js +3 -3
- package/dist/excalidraw/history.d.ts +4 -3
- package/dist/excalidraw/history.js +8 -8
- package/dist/excalidraw/index.d.ts +1 -1
- package/dist/excalidraw/index.js +3 -3
- package/dist/excalidraw/locales/en.json +18 -4
- package/dist/excalidraw/math.d.ts +43 -0
- package/dist/excalidraw/math.js +110 -0
- package/dist/excalidraw/mermaid.js +4 -3
- package/dist/excalidraw/renderer/interactiveScene.js +33 -17
- package/dist/excalidraw/renderer/renderElement.d.ts +2 -0
- package/dist/excalidraw/renderer/renderElement.js +74 -54
- package/dist/excalidraw/renderer/staticSvgScene.js +2 -1
- package/dist/excalidraw/scene/Scene.js +9 -3
- package/dist/excalidraw/scene/Shape.js +56 -5
- package/dist/excalidraw/scene/comparisons.d.ts +1 -0
- package/dist/excalidraw/scene/comparisons.js +1 -1
- package/dist/excalidraw/scene/export.d.ts +2 -1
- package/dist/excalidraw/scene/export.js +33 -35
- package/dist/excalidraw/scene/types.d.ts +1 -4
- package/dist/excalidraw/shapes.d.ts +8 -0
- package/dist/excalidraw/shapes.js +57 -0
- package/dist/excalidraw/types.d.ts +8 -3
- package/dist/excalidraw/utils.d.ts +11 -1
- package/dist/excalidraw/utils.js +22 -0
- package/dist/prod/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
- package/dist/prod/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
- package/dist/prod/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
- package/dist/prod/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
- package/dist/prod/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
- package/dist/prod/{en-EB2MBPAV.json → en-YNVBSAIL.json} +18 -4
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +49 -53
- package/dist/utils/export.d.ts +2 -1
- package/dist/utils/export.js +2 -1
- package/dist/utils/geometry/geometry.d.ts +2 -1
- package/dist/utils/geometry/geometry.js +5 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/history.ts +9 -2
- package/package.json +2 -2
- package/dist/browser/dev/Cascadia-CYPE3OJC.woff2 +0 -0
- package/dist/browser/dev/Virgil-UZN6MUT6.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/chunk-B4UMSLQQ.js.map +0 -7
- package/dist/browser/dev/excalidraw-assets-dev/chunk-EM6LVGFW.js.map +0 -7
- package/dist/browser/dev/excalidraw-assets-dev/dist-6QVAH5JA.js.map +0 -7
- package/dist/browser/prod/Cascadia-CYPE3OJC.woff2 +0 -0
- package/dist/browser/prod/Virgil-UZN6MUT6.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/chunk-EGOLGOLD.js +0 -55
- package/dist/browser/prod/excalidraw-assets/dist-567JAXHK.js +0 -7
- package/dist/browser/prod/excalidraw-assets/en-6E7MYLWO.js +0 -1
- package/dist/browser/prod/excalidraw-assets/image-SI7BKULC.js +0 -1
- package/dist/dev/Cascadia-CYPE3OJC.woff2 +0 -0
- package/dist/dev/Virgil-UZN6MUT6.woff2 +0 -0
- package/dist/excalidraw/scene/Fonts.d.ts +0 -19
- package/dist/excalidraw/scene/Fonts.js +0 -66
- package/dist/prod/Cascadia-CYPE3OJC.woff2 +0 -0
- package/dist/prod/Virgil-UZN6MUT6.woff2 +0 -0
- /package/dist/browser/dev/{Assistant-Bold-ZDZZ6JHA.woff2 → excalidraw-assets-dev/Assistant-Bold-ZDZZ6JHA.woff2} +0 -0
- /package/dist/browser/dev/{Assistant-Medium-DZ25RZU3.woff2 → excalidraw-assets-dev/Assistant-Medium-DZ25RZU3.woff2} +0 -0
- /package/dist/browser/dev/{Assistant-Regular-PLF2XOGW.woff2 → excalidraw-assets-dev/Assistant-Regular-PLF2XOGW.woff2} +0 -0
- /package/dist/browser/dev/{Assistant-SemiBold-CZ5MX6FK.woff2 → excalidraw-assets-dev/Assistant-SemiBold-CZ5MX6FK.woff2} +0 -0
- /package/dist/browser/dev/excalidraw-assets-dev/{en-AZFA5HJJ.js.map → en-XV7OZCPP.js.map} +0 -0
- /package/dist/browser/dev/excalidraw-assets-dev/{image-V7E6IT6R.js.map → image-77HZYGLG.js.map} +0 -0
- /package/dist/browser/prod/{Assistant-Bold-ZDZZ6JHA.woff2 → excalidraw-assets/Assistant-Bold-ZDZZ6JHA.woff2} +0 -0
- /package/dist/browser/prod/{Assistant-Medium-DZ25RZU3.woff2 → excalidraw-assets/Assistant-Medium-DZ25RZU3.woff2} +0 -0
- /package/dist/browser/prod/{Assistant-Regular-PLF2XOGW.woff2 → excalidraw-assets/Assistant-Regular-PLF2XOGW.woff2} +0 -0
- /package/dist/browser/prod/{Assistant-SemiBold-CZ5MX6FK.woff2 → excalidraw-assets/Assistant-SemiBold-CZ5MX6FK.woff2} +0 -0
|
@@ -62,7 +62,9 @@ export declare const actionAddToLibrary: {
|
|
|
62
62
|
currentItemTextAlign: string;
|
|
63
63
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
64
64
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
65
|
+
currentHoveredFontFamily: number | null;
|
|
65
66
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
67
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
66
68
|
viewBackgroundColor: string;
|
|
67
69
|
scrollX: number;
|
|
68
70
|
scrollY: number;
|
|
@@ -75,7 +77,7 @@ export declare const actionAddToLibrary: {
|
|
|
75
77
|
value: import("../types").NormalizedZoomValue;
|
|
76
78
|
}>;
|
|
77
79
|
openMenu: "canvas" | "shape" | null;
|
|
78
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
80
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
79
81
|
openSidebar: {
|
|
80
82
|
name: string;
|
|
81
83
|
tab?: string | undefined;
|
|
@@ -214,7 +216,9 @@ export declare const actionAddToLibrary: {
|
|
|
214
216
|
currentItemTextAlign: string;
|
|
215
217
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
216
218
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
219
|
+
currentHoveredFontFamily: number | null;
|
|
217
220
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
221
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
218
222
|
viewBackgroundColor: string;
|
|
219
223
|
scrollX: number;
|
|
220
224
|
scrollY: number;
|
|
@@ -227,7 +231,7 @@ export declare const actionAddToLibrary: {
|
|
|
227
231
|
value: import("../types").NormalizedZoomValue;
|
|
228
232
|
}>;
|
|
229
233
|
openMenu: "canvas" | "shape" | null;
|
|
230
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
234
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
231
235
|
openSidebar: {
|
|
232
236
|
name: string;
|
|
233
237
|
tab?: string | undefined;
|
|
@@ -371,7 +375,9 @@ export declare const actionAddToLibrary: {
|
|
|
371
375
|
currentItemTextAlign: string;
|
|
372
376
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
373
377
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
378
|
+
currentHoveredFontFamily: number | null;
|
|
374
379
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
380
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
375
381
|
viewBackgroundColor: string;
|
|
376
382
|
scrollX: number;
|
|
377
383
|
scrollY: number;
|
|
@@ -384,7 +390,7 @@ export declare const actionAddToLibrary: {
|
|
|
384
390
|
value: import("../types").NormalizedZoomValue;
|
|
385
391
|
}>;
|
|
386
392
|
openMenu: "canvas" | "shape" | null;
|
|
387
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
393
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
388
394
|
openSidebar: {
|
|
389
395
|
name: string;
|
|
390
396
|
tab?: string | undefined;
|
|
@@ -82,7 +82,9 @@ export declare const actionBindText: {
|
|
|
82
82
|
currentItemTextAlign: string;
|
|
83
83
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
84
84
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
85
|
+
currentHoveredFontFamily: number | null;
|
|
85
86
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
87
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
86
88
|
viewBackgroundColor: string;
|
|
87
89
|
scrollX: number;
|
|
88
90
|
scrollY: number;
|
|
@@ -95,7 +97,7 @@ export declare const actionBindText: {
|
|
|
95
97
|
value: import("../types").NormalizedZoomValue;
|
|
96
98
|
}>;
|
|
97
99
|
openMenu: "canvas" | "shape" | null;
|
|
98
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
100
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
99
101
|
openSidebar: {
|
|
100
102
|
name: string;
|
|
101
103
|
tab?: string | undefined;
|
|
@@ -251,7 +253,9 @@ export declare const actionWrapTextInContainer: {
|
|
|
251
253
|
currentItemTextAlign: string;
|
|
252
254
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
253
255
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
256
|
+
currentHoveredFontFamily: number | null;
|
|
254
257
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
258
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
255
259
|
viewBackgroundColor: string;
|
|
256
260
|
scrollX: number;
|
|
257
261
|
scrollY: number;
|
|
@@ -264,7 +268,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
264
268
|
value: import("../types").NormalizedZoomValue;
|
|
265
269
|
}>;
|
|
266
270
|
openMenu: "canvas" | "shape" | null;
|
|
267
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
271
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
268
272
|
openSidebar: {
|
|
269
273
|
name: string;
|
|
270
274
|
tab?: string | undefined;
|
|
@@ -54,6 +54,7 @@ export declare const actionClearCanvas: {
|
|
|
54
54
|
zenModeEnabled: boolean;
|
|
55
55
|
objectsSnapModeEnabled: boolean;
|
|
56
56
|
name: string | null;
|
|
57
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
57
58
|
contextMenu: {
|
|
58
59
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
59
60
|
top: number;
|
|
@@ -98,6 +99,7 @@ export declare const actionClearCanvas: {
|
|
|
98
99
|
currentItemTextAlign: string;
|
|
99
100
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
100
101
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
102
|
+
currentHoveredFontFamily: number | null;
|
|
101
103
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
102
104
|
viewBackgroundColor: string;
|
|
103
105
|
scrollX: number;
|
|
@@ -110,7 +112,7 @@ export declare const actionClearCanvas: {
|
|
|
110
112
|
value: NormalizedZoomValue;
|
|
111
113
|
}>;
|
|
112
114
|
openMenu: "canvas" | "shape" | null;
|
|
113
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
115
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
114
116
|
openSidebar: {
|
|
115
117
|
name: string;
|
|
116
118
|
tab?: string | undefined;
|
|
@@ -252,7 +254,9 @@ export declare const actionZoomIn: {
|
|
|
252
254
|
currentItemTextAlign: string;
|
|
253
255
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
254
256
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
257
|
+
currentHoveredFontFamily: number | null;
|
|
255
258
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
259
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
256
260
|
viewBackgroundColor: string;
|
|
257
261
|
cursorButton: "up" | "down";
|
|
258
262
|
scrolledOutside: boolean;
|
|
@@ -260,7 +264,7 @@ export declare const actionZoomIn: {
|
|
|
260
264
|
isResizing: boolean;
|
|
261
265
|
isRotating: boolean;
|
|
262
266
|
openMenu: "canvas" | "shape" | null;
|
|
263
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
267
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
264
268
|
openSidebar: {
|
|
265
269
|
name: string;
|
|
266
270
|
tab?: string | undefined;
|
|
@@ -423,7 +427,9 @@ export declare const actionZoomOut: {
|
|
|
423
427
|
currentItemTextAlign: string;
|
|
424
428
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
425
429
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
430
|
+
currentHoveredFontFamily: number | null;
|
|
426
431
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
432
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
427
433
|
viewBackgroundColor: string;
|
|
428
434
|
cursorButton: "up" | "down";
|
|
429
435
|
scrolledOutside: boolean;
|
|
@@ -431,7 +437,7 @@ export declare const actionZoomOut: {
|
|
|
431
437
|
isResizing: boolean;
|
|
432
438
|
isRotating: boolean;
|
|
433
439
|
openMenu: "canvas" | "shape" | null;
|
|
434
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
440
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
435
441
|
openSidebar: {
|
|
436
442
|
name: string;
|
|
437
443
|
tab?: string | undefined;
|
|
@@ -594,7 +600,9 @@ export declare const actionResetZoom: {
|
|
|
594
600
|
currentItemTextAlign: string;
|
|
595
601
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
596
602
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
603
|
+
currentHoveredFontFamily: number | null;
|
|
597
604
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
605
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
598
606
|
viewBackgroundColor: string;
|
|
599
607
|
cursorButton: "up" | "down";
|
|
600
608
|
scrolledOutside: boolean;
|
|
@@ -602,7 +610,7 @@ export declare const actionResetZoom: {
|
|
|
602
610
|
isResizing: boolean;
|
|
603
611
|
isRotating: boolean;
|
|
604
612
|
openMenu: "canvas" | "shape" | null;
|
|
605
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
613
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
606
614
|
openSidebar: {
|
|
607
615
|
name: string;
|
|
608
616
|
tab?: string | undefined;
|
|
@@ -763,7 +771,9 @@ export declare const zoomToFitBounds: ({ bounds, appState, fitToViewport, viewpo
|
|
|
763
771
|
currentItemTextAlign: string;
|
|
764
772
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
765
773
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
774
|
+
currentHoveredFontFamily: number | null;
|
|
766
775
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
776
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
767
777
|
viewBackgroundColor: string;
|
|
768
778
|
cursorButton: "up" | "down";
|
|
769
779
|
scrolledOutside: boolean;
|
|
@@ -771,7 +781,7 @@ export declare const zoomToFitBounds: ({ bounds, appState, fitToViewport, viewpo
|
|
|
771
781
|
isResizing: boolean;
|
|
772
782
|
isRotating: boolean;
|
|
773
783
|
openMenu: "canvas" | "shape" | null;
|
|
774
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
784
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
775
785
|
openSidebar: {
|
|
776
786
|
name: string;
|
|
777
787
|
tab?: string | undefined;
|
|
@@ -928,7 +938,9 @@ export declare const zoomToFit: ({ targetElements, appState, fitToViewport, view
|
|
|
928
938
|
currentItemTextAlign: string;
|
|
929
939
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
930
940
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
941
|
+
currentHoveredFontFamily: number | null;
|
|
931
942
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
943
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
932
944
|
viewBackgroundColor: string;
|
|
933
945
|
cursorButton: "up" | "down";
|
|
934
946
|
scrolledOutside: boolean;
|
|
@@ -936,7 +948,7 @@ export declare const zoomToFit: ({ targetElements, appState, fitToViewport, view
|
|
|
936
948
|
isResizing: boolean;
|
|
937
949
|
isRotating: boolean;
|
|
938
950
|
openMenu: "canvas" | "shape" | null;
|
|
939
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
951
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
940
952
|
openSidebar: {
|
|
941
953
|
name: string;
|
|
942
954
|
tab?: string | undefined;
|
|
@@ -1093,7 +1105,9 @@ export declare const actionZoomToFitSelectionInViewport: {
|
|
|
1093
1105
|
currentItemTextAlign: string;
|
|
1094
1106
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
1095
1107
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
1108
|
+
currentHoveredFontFamily: number | null;
|
|
1096
1109
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
1110
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
1097
1111
|
viewBackgroundColor: string;
|
|
1098
1112
|
cursorButton: "up" | "down";
|
|
1099
1113
|
scrolledOutside: boolean;
|
|
@@ -1101,7 +1115,7 @@ export declare const actionZoomToFitSelectionInViewport: {
|
|
|
1101
1115
|
isResizing: boolean;
|
|
1102
1116
|
isRotating: boolean;
|
|
1103
1117
|
openMenu: "canvas" | "shape" | null;
|
|
1104
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1118
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1105
1119
|
openSidebar: {
|
|
1106
1120
|
name: string;
|
|
1107
1121
|
tab?: string | undefined;
|
|
@@ -1262,7 +1276,9 @@ export declare const actionZoomToFitSelection: {
|
|
|
1262
1276
|
currentItemTextAlign: string;
|
|
1263
1277
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
1264
1278
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
1279
|
+
currentHoveredFontFamily: number | null;
|
|
1265
1280
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
1281
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
1266
1282
|
viewBackgroundColor: string;
|
|
1267
1283
|
cursorButton: "up" | "down";
|
|
1268
1284
|
scrolledOutside: boolean;
|
|
@@ -1270,7 +1286,7 @@ export declare const actionZoomToFitSelection: {
|
|
|
1270
1286
|
isResizing: boolean;
|
|
1271
1287
|
isRotating: boolean;
|
|
1272
1288
|
openMenu: "canvas" | "shape" | null;
|
|
1273
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1289
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1274
1290
|
openSidebar: {
|
|
1275
1291
|
name: string;
|
|
1276
1292
|
tab?: string | undefined;
|
|
@@ -1432,7 +1448,9 @@ export declare const actionZoomToFit: {
|
|
|
1432
1448
|
currentItemTextAlign: string;
|
|
1433
1449
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
1434
1450
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
1451
|
+
currentHoveredFontFamily: number | null;
|
|
1435
1452
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
1453
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
1436
1454
|
viewBackgroundColor: string;
|
|
1437
1455
|
cursorButton: "up" | "down";
|
|
1438
1456
|
scrolledOutside: boolean;
|
|
@@ -1440,7 +1458,7 @@ export declare const actionZoomToFit: {
|
|
|
1440
1458
|
isResizing: boolean;
|
|
1441
1459
|
isRotating: boolean;
|
|
1442
1460
|
openMenu: "canvas" | "shape" | null;
|
|
1443
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1461
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1444
1462
|
openSidebar: {
|
|
1445
1463
|
name: string;
|
|
1446
1464
|
tab?: string | undefined;
|
|
@@ -1599,7 +1617,9 @@ export declare const actionToggleTheme: {
|
|
|
1599
1617
|
currentItemTextAlign: string;
|
|
1600
1618
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
1601
1619
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
1620
|
+
currentHoveredFontFamily: number | null;
|
|
1602
1621
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
1622
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
1603
1623
|
viewBackgroundColor: string;
|
|
1604
1624
|
scrollX: number;
|
|
1605
1625
|
scrollY: number;
|
|
@@ -1612,7 +1632,7 @@ export declare const actionToggleTheme: {
|
|
|
1612
1632
|
value: NormalizedZoomValue;
|
|
1613
1633
|
}>;
|
|
1614
1634
|
openMenu: "canvas" | "shape" | null;
|
|
1615
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1635
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1616
1636
|
openSidebar: {
|
|
1617
1637
|
name: string;
|
|
1618
1638
|
tab?: string | undefined;
|
|
@@ -1766,7 +1786,9 @@ export declare const actionToggleEraserTool: {
|
|
|
1766
1786
|
currentItemTextAlign: string;
|
|
1767
1787
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
1768
1788
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
1789
|
+
currentHoveredFontFamily: number | null;
|
|
1769
1790
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
1791
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
1770
1792
|
viewBackgroundColor: string;
|
|
1771
1793
|
scrollX: number;
|
|
1772
1794
|
scrollY: number;
|
|
@@ -1779,7 +1801,7 @@ export declare const actionToggleEraserTool: {
|
|
|
1779
1801
|
value: NormalizedZoomValue;
|
|
1780
1802
|
}>;
|
|
1781
1803
|
openMenu: "canvas" | "shape" | null;
|
|
1782
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1804
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1783
1805
|
openSidebar: {
|
|
1784
1806
|
name: string;
|
|
1785
1807
|
tab?: string | undefined;
|
|
@@ -1930,7 +1952,9 @@ export declare const actionToggleHandTool: {
|
|
|
1930
1952
|
currentItemTextAlign: string;
|
|
1931
1953
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
1932
1954
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
1955
|
+
currentHoveredFontFamily: number | null;
|
|
1933
1956
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
1957
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
1934
1958
|
viewBackgroundColor: string;
|
|
1935
1959
|
scrollX: number;
|
|
1936
1960
|
scrollY: number;
|
|
@@ -1943,7 +1967,7 @@ export declare const actionToggleHandTool: {
|
|
|
1943
1967
|
value: NormalizedZoomValue;
|
|
1944
1968
|
}>;
|
|
1945
1969
|
openMenu: "canvas" | "shape" | null;
|
|
1946
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1970
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1947
1971
|
openSidebar: {
|
|
1948
1972
|
name: string;
|
|
1949
1973
|
tab?: string | undefined;
|
|
@@ -61,7 +61,9 @@ export declare const actionCopy: {
|
|
|
61
61
|
currentItemTextAlign: string;
|
|
62
62
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
63
63
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
64
|
+
currentHoveredFontFamily: number | null;
|
|
64
65
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
66
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
65
67
|
viewBackgroundColor: string;
|
|
66
68
|
scrollX: number;
|
|
67
69
|
scrollY: number;
|
|
@@ -74,7 +76,7 @@ export declare const actionCopy: {
|
|
|
74
76
|
value: import("../types").NormalizedZoomValue;
|
|
75
77
|
}>;
|
|
76
78
|
openMenu: "canvas" | "shape" | null;
|
|
77
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
79
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
78
80
|
openSidebar: {
|
|
79
81
|
name: string;
|
|
80
82
|
tab?: string | undefined;
|
|
@@ -232,7 +234,9 @@ export declare const actionPaste: {
|
|
|
232
234
|
currentItemTextAlign: string;
|
|
233
235
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
234
236
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
237
|
+
currentHoveredFontFamily: number | null;
|
|
235
238
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
239
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
236
240
|
viewBackgroundColor: string;
|
|
237
241
|
scrollX: number;
|
|
238
242
|
scrollY: number;
|
|
@@ -245,7 +249,7 @@ export declare const actionPaste: {
|
|
|
245
249
|
value: import("../types").NormalizedZoomValue;
|
|
246
250
|
}>;
|
|
247
251
|
openMenu: "canvas" | "shape" | null;
|
|
248
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
252
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
249
253
|
openSidebar: {
|
|
250
254
|
name: string;
|
|
251
255
|
tab?: string | undefined;
|
|
@@ -404,7 +408,9 @@ export declare const actionCut: {
|
|
|
404
408
|
currentItemTextAlign: string;
|
|
405
409
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
406
410
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
411
|
+
currentHoveredFontFamily: number | null;
|
|
407
412
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
413
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
408
414
|
viewBackgroundColor: string;
|
|
409
415
|
scrollX: number;
|
|
410
416
|
scrollY: number;
|
|
@@ -417,7 +423,7 @@ export declare const actionCut: {
|
|
|
417
423
|
value: import("../types").NormalizedZoomValue;
|
|
418
424
|
}>;
|
|
419
425
|
openMenu: "canvas" | "shape" | null;
|
|
420
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
426
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
421
427
|
openSidebar: {
|
|
422
428
|
name: string;
|
|
423
429
|
tab?: string | undefined;
|
|
@@ -520,6 +526,7 @@ export declare const actionCut: {
|
|
|
520
526
|
pointerDownState: Readonly<{
|
|
521
527
|
prevSelectedPointsIndices: readonly number[] | null;
|
|
522
528
|
lastClickedPoint: number;
|
|
529
|
+
lastClickedIsEndPoint: boolean;
|
|
523
530
|
origin: Readonly<{
|
|
524
531
|
x: number;
|
|
525
532
|
y: number;
|
|
@@ -590,7 +597,9 @@ export declare const actionCut: {
|
|
|
590
597
|
currentItemTextAlign: string;
|
|
591
598
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
592
599
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
600
|
+
currentHoveredFontFamily: number | null;
|
|
593
601
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
602
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
594
603
|
viewBackgroundColor: string;
|
|
595
604
|
scrollX: number;
|
|
596
605
|
scrollY: number;
|
|
@@ -603,7 +612,7 @@ export declare const actionCut: {
|
|
|
603
612
|
value: import("../types").NormalizedZoomValue;
|
|
604
613
|
}>;
|
|
605
614
|
openMenu: "canvas" | "shape" | null;
|
|
606
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
615
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
607
616
|
openSidebar: {
|
|
608
617
|
name: string;
|
|
609
618
|
tab?: string | undefined;
|
|
@@ -747,7 +756,9 @@ export declare const actionCut: {
|
|
|
747
756
|
currentItemTextAlign: string;
|
|
748
757
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
749
758
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
759
|
+
currentHoveredFontFamily: number | null;
|
|
750
760
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
761
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
751
762
|
viewBackgroundColor: string;
|
|
752
763
|
scrollX: number;
|
|
753
764
|
scrollY: number;
|
|
@@ -760,7 +771,7 @@ export declare const actionCut: {
|
|
|
760
771
|
value: import("../types").NormalizedZoomValue;
|
|
761
772
|
}>;
|
|
762
773
|
openMenu: "canvas" | "shape" | null;
|
|
763
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
774
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
764
775
|
openSidebar: {
|
|
765
776
|
name: string;
|
|
766
777
|
tab?: string | undefined;
|
|
@@ -913,7 +924,9 @@ export declare const actionCopyAsSvg: {
|
|
|
913
924
|
currentItemTextAlign: string;
|
|
914
925
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
915
926
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
927
|
+
currentHoveredFontFamily: number | null;
|
|
916
928
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
929
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
917
930
|
viewBackgroundColor: string;
|
|
918
931
|
scrollX: number;
|
|
919
932
|
scrollY: number;
|
|
@@ -926,7 +939,7 @@ export declare const actionCopyAsSvg: {
|
|
|
926
939
|
value: import("../types").NormalizedZoomValue;
|
|
927
940
|
}>;
|
|
928
941
|
openMenu: "canvas" | "shape" | null;
|
|
929
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
942
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
930
943
|
openSidebar: {
|
|
931
944
|
name: string;
|
|
932
945
|
tab?: string | undefined;
|
|
@@ -1086,7 +1099,9 @@ export declare const actionCopyAsPng: {
|
|
|
1086
1099
|
currentItemTextAlign: string;
|
|
1087
1100
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
1088
1101
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
1102
|
+
currentHoveredFontFamily: number | null;
|
|
1089
1103
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
1104
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
1090
1105
|
viewBackgroundColor: string;
|
|
1091
1106
|
scrollX: number;
|
|
1092
1107
|
scrollY: number;
|
|
@@ -1099,7 +1114,7 @@ export declare const actionCopyAsPng: {
|
|
|
1099
1114
|
value: import("../types").NormalizedZoomValue;
|
|
1100
1115
|
}>;
|
|
1101
1116
|
openMenu: "canvas" | "shape" | null;
|
|
1102
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1117
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1103
1118
|
openSidebar: {
|
|
1104
1119
|
name: string;
|
|
1105
1120
|
tab?: string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ExcalidrawElement } from "../element/types";
|
|
3
|
-
import type { AppState } from "../types";
|
|
3
|
+
import type { AppClassProperties, AppState } from "../types";
|
|
4
4
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
5
5
|
export declare const actionDeleteSelected: {
|
|
6
6
|
name: "deleteSelectedElements";
|
|
@@ -10,7 +10,7 @@ export declare const actionDeleteSelected: {
|
|
|
10
10
|
category: "element";
|
|
11
11
|
action: string;
|
|
12
12
|
};
|
|
13
|
-
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app:
|
|
13
|
+
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => false | {
|
|
14
14
|
elements: import("../element/types").OrderedExcalidrawElement[];
|
|
15
15
|
appState: {
|
|
16
16
|
editingLinearElement: null;
|
|
@@ -65,7 +65,9 @@ export declare const actionDeleteSelected: {
|
|
|
65
65
|
currentItemTextAlign: string;
|
|
66
66
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
67
67
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
68
|
+
currentHoveredFontFamily: number | null;
|
|
68
69
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
70
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
69
71
|
viewBackgroundColor: string;
|
|
70
72
|
scrollX: number;
|
|
71
73
|
scrollY: number;
|
|
@@ -78,7 +80,7 @@ export declare const actionDeleteSelected: {
|
|
|
78
80
|
value: import("../types").NormalizedZoomValue;
|
|
79
81
|
}>;
|
|
80
82
|
openMenu: "canvas" | "shape" | null;
|
|
81
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
83
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
82
84
|
openSidebar: {
|
|
83
85
|
name: string;
|
|
84
86
|
tab?: string | undefined;
|
|
@@ -181,6 +183,7 @@ export declare const actionDeleteSelected: {
|
|
|
181
183
|
pointerDownState: Readonly<{
|
|
182
184
|
prevSelectedPointsIndices: readonly number[] | null;
|
|
183
185
|
lastClickedPoint: number;
|
|
186
|
+
lastClickedIsEndPoint: boolean;
|
|
184
187
|
origin: Readonly<{
|
|
185
188
|
x: number;
|
|
186
189
|
y: number;
|
|
@@ -251,7 +254,9 @@ export declare const actionDeleteSelected: {
|
|
|
251
254
|
currentItemTextAlign: string;
|
|
252
255
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
253
256
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
257
|
+
currentHoveredFontFamily: number | null;
|
|
254
258
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
259
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
255
260
|
viewBackgroundColor: string;
|
|
256
261
|
scrollX: number;
|
|
257
262
|
scrollY: number;
|
|
@@ -264,7 +269,7 @@ export declare const actionDeleteSelected: {
|
|
|
264
269
|
value: import("../types").NormalizedZoomValue;
|
|
265
270
|
}>;
|
|
266
271
|
openMenu: "canvas" | "shape" | null;
|
|
267
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
272
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
268
273
|
openSidebar: {
|
|
269
274
|
name: string;
|
|
270
275
|
tab?: string | undefined;
|
|
@@ -408,7 +413,9 @@ export declare const actionDeleteSelected: {
|
|
|
408
413
|
currentItemTextAlign: string;
|
|
409
414
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
410
415
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
416
|
+
currentHoveredFontFamily: number | null;
|
|
411
417
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
418
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
412
419
|
viewBackgroundColor: string;
|
|
413
420
|
scrollX: number;
|
|
414
421
|
scrollY: number;
|
|
@@ -421,7 +428,7 @@ export declare const actionDeleteSelected: {
|
|
|
421
428
|
value: import("../types").NormalizedZoomValue;
|
|
422
429
|
}>;
|
|
423
430
|
openMenu: "canvas" | "shape" | null;
|
|
424
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
431
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
425
432
|
openSidebar: {
|
|
426
433
|
name: string;
|
|
427
434
|
tab?: string | undefined;
|
|
@@ -5,19 +5,38 @@ import { ToolButton } from "../components/ToolButton";
|
|
|
5
5
|
import { t } from "../i18n";
|
|
6
6
|
import { register } from "./register";
|
|
7
7
|
import { getNonDeletedElements } from "../element";
|
|
8
|
-
import { newElementWith } from "../element/mutateElement";
|
|
8
|
+
import { mutateElement, newElementWith } from "../element/mutateElement";
|
|
9
9
|
import { getElementsInGroup } from "../groups";
|
|
10
10
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
11
11
|
import { fixBindingsAfterDeletion } from "../element/binding";
|
|
12
|
-
import { isBoundToContainer, isFrameLikeElement } from "../element/typeChecks";
|
|
12
|
+
import { isBoundToContainer, isElbowArrow, isFrameLikeElement, } from "../element/typeChecks";
|
|
13
13
|
import { updateActiveTool } from "../utils";
|
|
14
14
|
import { TrashIcon } from "../components/icons";
|
|
15
15
|
import { StoreAction } from "../store";
|
|
16
|
-
|
|
16
|
+
import { mutateElbowArrow } from "../element/routing";
|
|
17
|
+
const deleteSelectedElements = (elements, appState, app) => {
|
|
17
18
|
const framesToBeDeleted = new Set(getSelectedElements(elements.filter((el) => isFrameLikeElement(el)), appState).map((el) => el.id));
|
|
18
19
|
return {
|
|
19
20
|
elements: elements.map((el) => {
|
|
20
21
|
if (appState.selectedElementIds[el.id]) {
|
|
22
|
+
if (el.boundElements) {
|
|
23
|
+
el.boundElements.forEach((candidate) => {
|
|
24
|
+
const bound = app.scene
|
|
25
|
+
.getNonDeletedElementsMap()
|
|
26
|
+
.get(candidate.id);
|
|
27
|
+
if (bound && isElbowArrow(bound)) {
|
|
28
|
+
mutateElement(bound, {
|
|
29
|
+
startBinding: el.id === bound.startBinding?.elementId
|
|
30
|
+
? null
|
|
31
|
+
: bound.startBinding,
|
|
32
|
+
endBinding: el.id === bound.endBinding?.elementId
|
|
33
|
+
? null
|
|
34
|
+
: bound.endBinding,
|
|
35
|
+
});
|
|
36
|
+
mutateElbowArrow(bound, app.scene, bound.points);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
21
40
|
return newElementWith(el, { isDeleted: true });
|
|
22
41
|
}
|
|
23
42
|
if (el.frameId && framesToBeDeleted.has(el.frameId)) {
|
|
@@ -96,7 +115,7 @@ export const actionDeleteSelected = register({
|
|
|
96
115
|
? null
|
|
97
116
|
: endBindingElement,
|
|
98
117
|
};
|
|
99
|
-
LinearElementEditor.deletePoints(element, selectedPointsIndices);
|
|
118
|
+
LinearElementEditor.deletePoints(element, selectedPointsIndices, app.scene);
|
|
100
119
|
return {
|
|
101
120
|
elements,
|
|
102
121
|
appState: {
|
|
@@ -112,7 +131,7 @@ export const actionDeleteSelected = register({
|
|
|
112
131
|
storeAction: StoreAction.CAPTURE,
|
|
113
132
|
};
|
|
114
133
|
}
|
|
115
|
-
let { elements: nextElements, appState: nextAppState } = deleteSelectedElements(elements, appState);
|
|
134
|
+
let { elements: nextElements, appState: nextAppState } = deleteSelectedElements(elements, appState, app);
|
|
116
135
|
fixBindingsAfterDeletion(nextElements, elements.filter(({ id }) => appState.selectedElementIds[id]));
|
|
117
136
|
nextAppState = handleGroupEditingState(nextAppState, nextElements);
|
|
118
137
|
return {
|
|
@@ -24,10 +24,9 @@ export const actionDuplicateSelection = register({
|
|
|
24
24
|
icon: DuplicateIcon,
|
|
25
25
|
trackEvent: { category: "element" },
|
|
26
26
|
perform: (elements, appState, formData, app) => {
|
|
27
|
-
const elementsMap = app.scene.getNonDeletedElementsMap();
|
|
28
27
|
// duplicate selected point(s) if editing a line
|
|
29
28
|
if (appState.editingLinearElement) {
|
|
30
|
-
const ret = LinearElementEditor.duplicateSelectedPoints(appState,
|
|
29
|
+
const ret = LinearElementEditor.duplicateSelectedPoints(appState, app.scene);
|
|
31
30
|
if (!ret) {
|
|
32
31
|
return false;
|
|
33
32
|
}
|
|
@@ -64,7 +64,9 @@ export declare const actionToggleElementLock: {
|
|
|
64
64
|
currentItemTextAlign: string;
|
|
65
65
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
66
66
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
67
|
+
currentHoveredFontFamily: number | null;
|
|
67
68
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
69
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
68
70
|
viewBackgroundColor: string;
|
|
69
71
|
scrollX: number;
|
|
70
72
|
scrollY: number;
|
|
@@ -77,7 +79,7 @@ export declare const actionToggleElementLock: {
|
|
|
77
79
|
value: import("../types").NormalizedZoomValue;
|
|
78
80
|
}>;
|
|
79
81
|
openMenu: "canvas" | "shape" | null;
|
|
80
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
82
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
81
83
|
openSidebar: {
|
|
82
84
|
name: string;
|
|
83
85
|
tab?: string | undefined;
|
|
@@ -238,7 +240,9 @@ export declare const actionUnlockAllElements: {
|
|
|
238
240
|
currentItemTextAlign: string;
|
|
239
241
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
240
242
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
243
|
+
currentHoveredFontFamily: number | null;
|
|
241
244
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
245
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
242
246
|
viewBackgroundColor: string;
|
|
243
247
|
scrollX: number;
|
|
244
248
|
scrollY: number;
|
|
@@ -251,7 +255,7 @@ export declare const actionUnlockAllElements: {
|
|
|
251
255
|
value: import("../types").NormalizedZoomValue;
|
|
252
256
|
}>;
|
|
253
257
|
openMenu: "canvas" | "shape" | null;
|
|
254
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
258
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
255
259
|
openSidebar: {
|
|
256
260
|
name: string;
|
|
257
261
|
tab?: string | undefined;
|