@excalidraw/excalidraw 0.17.1-d9bbf1e → 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-XOM7LNOU.js → chunk-IT7T3AIK.js} +49 -8
- package/dist/browser/dev/excalidraw-assets-dev/chunk-IT7T3AIK.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{chunk-BLEB3M62.js → chunk-RNHSD5AR.js} +7668 -2142
- package/dist/browser/dev/excalidraw-assets-dev/chunk-RNHSD5AR.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{dist-ITJNUBZF.js → dist-DNSPZDOZ.js} +66 -32
- package/dist/browser/dev/excalidraw-assets-dev/dist-DNSPZDOZ.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{en-TR4QLF5E.js → en-XV7OZCPP.js} +8 -2
- package/dist/browser/dev/excalidraw-assets-dev/{image-ZGDDRBEN.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 +610 -180
- package/dist/browser/dev/index.css.map +3 -3
- package/dist/browser/dev/index.js +13306 -8006
- 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-5SYIAZGL.js → chunk-PDYFZJMS.js} +5 -5
- 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 +70 -51
- 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-XW4JO6VX.json → en-YNVBSAIL.json} +42 -7
- package/dist/dev/index.css +610 -180
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +22165 -16833
- package/dist/dev/index.js.map +4 -4
- package/dist/excalidraw/actions/actionAddToLibrary.d.ts +24 -9
- package/dist/excalidraw/actions/actionAlign.d.ts +8 -8
- package/dist/excalidraw/actions/actionBoundText.d.ts +20 -10
- package/dist/excalidraw/actions/actionBoundText.js +3 -1
- package/dist/excalidraw/actions/actionCanvas.d.ts +100 -40
- package/dist/excalidraw/actions/actionCanvas.js +1 -1
- package/dist/excalidraw/actions/actionClipboard.d.ts +62 -26
- package/dist/excalidraw/actions/actionDeleteSelected.d.ts +28 -12
- package/dist/excalidraw/actions/actionDeleteSelected.js +24 -5
- package/dist/excalidraw/actions/actionDistribute.d.ts +4 -4
- package/dist/excalidraw/actions/actionDuplicateSelection.d.ts +3 -3
- package/dist/excalidraw/actions/actionDuplicateSelection.js +1 -2
- package/dist/excalidraw/actions/actionElementLock.d.ts +17 -7
- package/dist/excalidraw/actions/actionExport.d.ts +75 -30
- package/dist/excalidraw/actions/actionFinalize.d.ts +17 -7
- package/dist/excalidraw/actions/actionFinalize.js +2 -2
- package/dist/excalidraw/actions/actionFlip.d.ts +4 -4
- package/dist/excalidraw/actions/actionFlip.js +2 -2
- package/dist/excalidraw/actions/actionFrame.d.ts +338 -10
- package/dist/excalidraw/actions/actionGroup.d.ts +324 -4
- package/dist/excalidraw/actions/actionHistory.d.ts +3 -3
- package/dist/excalidraw/actions/actionHistory.js +8 -8
- package/dist/excalidraw/actions/actionLinearEditor.d.ts +12 -5
- package/dist/excalidraw/actions/actionLinearEditor.js +21 -5
- package/dist/excalidraw/actions/actionLink.d.ts +8 -3
- package/dist/excalidraw/actions/actionMenu.d.ts +24 -9
- package/dist/excalidraw/actions/actionNavigate.d.ts +17 -7
- package/dist/excalidraw/actions/actionProperties.d.ts +476 -82
- package/dist/excalidraw/actions/actionProperties.js +384 -59
- package/dist/excalidraw/actions/actionSelectAll.d.ts +9 -4
- package/dist/excalidraw/actions/actionStyles.d.ts +12 -4
- package/dist/excalidraw/actions/actionStyles.js +3 -2
- package/dist/excalidraw/actions/actionTextAutoResize.d.ts +17 -0
- package/dist/excalidraw/actions/actionTextAutoResize.js +38 -0
- package/dist/excalidraw/actions/actionToggleGridMode.d.ts +9 -4
- package/dist/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +8 -3
- package/dist/excalidraw/actions/actionToggleStats.d.ts +9 -3
- package/dist/excalidraw/actions/actionToggleStats.js +4 -3
- package/dist/excalidraw/actions/actionToggleViewMode.d.ts +8 -3
- package/dist/excalidraw/actions/actionToggleZenMode.d.ts +8 -3
- package/dist/excalidraw/actions/actionZindex.d.ts +8 -4
- package/dist/excalidraw/actions/actionZindex.js +4 -0
- package/dist/excalidraw/actions/manager.d.ts +3 -3
- package/dist/excalidraw/actions/register.d.ts +1 -1
- package/dist/excalidraw/actions/shortcuts.d.ts +2 -2
- package/dist/excalidraw/actions/types.d.ts +6 -6
- package/dist/excalidraw/align.d.ts +1 -1
- package/dist/excalidraw/analytics.js +9 -7
- package/dist/excalidraw/animated-trail.d.ts +2 -2
- package/dist/excalidraw/appState.d.ts +6 -2
- package/dist/excalidraw/appState.js +14 -3
- package/dist/excalidraw/binaryheap.d.ts +12 -0
- package/dist/excalidraw/binaryheap.js +93 -0
- package/dist/excalidraw/change.d.ts +6 -5
- package/dist/excalidraw/change.js +20 -11
- package/dist/excalidraw/charts.d.ts +1 -1
- package/dist/excalidraw/charts.js +0 -10
- package/dist/excalidraw/clients.d.ts +2 -2
- package/dist/excalidraw/clients.js +1 -1
- package/dist/excalidraw/clipboard.d.ts +3 -3
- package/dist/excalidraw/colors.d.ts +1 -1
- package/dist/excalidraw/components/Actions.d.ts +3 -3
- package/dist/excalidraw/components/Actions.js +14 -9
- package/dist/excalidraw/components/App.d.ts +14 -17
- package/dist/excalidraw/components/App.js +356 -217
- 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/CheckboxItem.js +1 -1
- package/dist/excalidraw/components/ColorPicker/ColorInput.d.ts +1 -1
- package/dist/excalidraw/components/ColorPicker/ColorInput.js +1 -1
- package/dist/excalidraw/components/ColorPicker/ColorPicker.d.ts +4 -4
- package/dist/excalidraw/components/ColorPicker/ColorPicker.js +48 -80
- package/dist/excalidraw/components/ColorPicker/Picker.d.ts +3 -3
- package/dist/excalidraw/components/ColorPicker/Picker.js +1 -1
- package/dist/excalidraw/components/ColorPicker/PickerColorList.d.ts +1 -1
- package/dist/excalidraw/components/ColorPicker/PickerHeading.d.ts +1 -1
- package/dist/excalidraw/components/ColorPicker/ShadeList.d.ts +1 -1
- package/dist/excalidraw/components/ColorPicker/TopPicks.d.ts +1 -1
- package/dist/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +2 -2
- package/dist/excalidraw/components/ColorPicker/colorPickerUtils.js +1 -1
- package/dist/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -2
- package/dist/excalidraw/components/ColorPicker/keyboardNavHandlers.js +1 -1
- package/dist/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -1
- package/dist/excalidraw/components/CommandPalette/CommandPalette.js +5 -5
- package/dist/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -1
- package/dist/excalidraw/components/CommandPalette/types.d.ts +3 -3
- package/dist/excalidraw/components/ConfirmDialog.d.ts +1 -1
- package/dist/excalidraw/components/ContextMenu.d.ts +2 -2
- package/dist/excalidraw/components/ContextMenu.js +2 -2
- package/dist/excalidraw/components/DarkModeToggle.d.ts +1 -1
- package/dist/excalidraw/components/DefaultSidebar.d.ts +2 -2
- package/dist/excalidraw/components/Dialog.js +1 -1
- package/dist/excalidraw/components/DialogActionButton.d.ts +1 -1
- package/dist/excalidraw/components/EyeDropper.d.ts +2 -2
- package/dist/excalidraw/components/FollowMode/FollowMode.d.ts +1 -1
- package/dist/excalidraw/components/FollowMode/FollowMode.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 +2 -2
- package/dist/excalidraw/components/HintViewer.d.ts +1 -1
- package/dist/excalidraw/components/HintViewer.js +6 -3
- package/dist/excalidraw/components/IconPicker.js +2 -2
- package/dist/excalidraw/components/ImageExportDialog.d.ts +1 -1
- package/dist/excalidraw/components/InitializeApp.d.ts +2 -2
- package/dist/excalidraw/components/JSONExportDialog.d.ts +3 -3
- package/dist/excalidraw/components/LayerUI.d.ts +4 -4
- package/dist/excalidraw/components/LayerUI.js +10 -7
- package/dist/excalidraw/components/LibraryMenu.d.ts +2 -2
- package/dist/excalidraw/components/LibraryMenuBrowseButton.d.ts +1 -1
- package/dist/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
- package/dist/excalidraw/components/LibraryMenuHeaderContent.d.ts +2 -2
- package/dist/excalidraw/components/LibraryMenuItems.d.ts +1 -1
- package/dist/excalidraw/components/LibraryMenuSection.d.ts +5 -4
- package/dist/excalidraw/components/LibraryUnit.d.ts +2 -2
- package/dist/excalidraw/components/LoadingMessage.d.ts +1 -1
- package/dist/excalidraw/components/MagicSettings.js +2 -2
- package/dist/excalidraw/components/MobileMenu.d.ts +3 -3
- package/dist/excalidraw/components/MobileMenu.js +2 -6
- package/dist/excalidraw/components/Modal.d.ts +1 -1
- package/dist/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
- package/dist/excalidraw/components/PasteChartDialog.d.ts +1 -1
- package/dist/excalidraw/components/PasteChartDialog.js +1 -1
- package/dist/excalidraw/components/PropertiesPopover.d.ts +15 -0
- package/dist/excalidraw/components/PropertiesPopover.js +31 -0
- package/dist/excalidraw/components/PublishLibrary.d.ts +1 -1
- package/dist/excalidraw/components/QuickSearch.d.ts +9 -0
- package/dist/excalidraw/components/QuickSearch.js +8 -0
- package/dist/excalidraw/components/SVGLayer.d.ts +1 -1
- package/dist/excalidraw/components/ScrollableList.d.ts +9 -0
- package/dist/excalidraw/components/ScrollableList.js +8 -0
- package/dist/excalidraw/components/Sidebar/Sidebar.js +1 -1
- package/dist/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -1
- package/dist/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -1
- package/dist/excalidraw/components/Sidebar/SidebarTrigger.d.ts +1 -1
- package/dist/excalidraw/components/Sidebar/common.d.ts +1 -1
- package/dist/excalidraw/components/Stats/Angle.d.ts +12 -0
- package/dist/excalidraw/components/Stats/Angle.js +53 -0
- package/dist/excalidraw/components/Stats/Collapsible.d.ts +9 -0
- package/dist/excalidraw/components/Stats/Collapsible.js +12 -0
- package/dist/excalidraw/components/Stats/Dimension.d.ts +12 -0
- package/dist/excalidraw/components/Stats/Dimension.js +68 -0
- package/dist/excalidraw/components/Stats/DragInput.d.ts +32 -0
- package/dist/excalidraw/components/Stats/DragInput.js +174 -0
- package/dist/excalidraw/components/Stats/FontSize.d.ts +12 -0
- package/dist/excalidraw/components/Stats/FontSize.js +50 -0
- package/dist/excalidraw/components/Stats/MultiAngle.d.ts +12 -0
- package/dist/excalidraw/components/Stats/MultiAngle.js +66 -0
- package/dist/excalidraw/components/Stats/MultiDimension.d.ts +15 -0
- package/dist/excalidraw/components/Stats/MultiDimension.js +199 -0
- package/dist/excalidraw/components/Stats/MultiFontSize.d.ts +13 -0
- package/dist/excalidraw/components/Stats/MultiFontSize.js +72 -0
- package/dist/excalidraw/components/Stats/MultiPosition.d.ts +15 -0
- package/dist/excalidraw/components/Stats/MultiPosition.js +101 -0
- package/dist/excalidraw/components/Stats/Position.d.ts +13 -0
- package/dist/excalidraw/components/Stats/Position.js +40 -0
- package/dist/excalidraw/components/Stats/index.d.ts +16 -0
- package/dist/excalidraw/components/Stats/index.js +79 -0
- package/dist/excalidraw/components/Stats/utils.d.ts +26 -0
- package/dist/excalidraw/components/Stats/utils.js +162 -0
- package/dist/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +1 -1
- package/dist/excalidraw/components/TTDDialog/TTDDialog.js +2 -2
- package/dist/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +1 -1
- package/dist/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +1 -1
- package/dist/excalidraw/components/TTDDialog/TTDDialogPanels.d.ts +1 -1
- package/dist/excalidraw/components/TTDDialog/TTDDialogTabs.d.ts +1 -1
- package/dist/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -1
- package/dist/excalidraw/components/TTDDialog/common.d.ts +5 -5
- package/dist/excalidraw/components/TTDDialog/common.js +3 -7
- package/dist/excalidraw/components/TextField.d.ts +1 -1
- package/dist/excalidraw/components/Toast.d.ts +1 -1
- package/dist/excalidraw/components/ToolButton.d.ts +3 -2
- package/dist/excalidraw/components/Trans.d.ts +1 -1
- package/dist/excalidraw/components/UserList.d.ts +1 -1
- package/dist/excalidraw/components/UserList.js +22 -22
- package/dist/excalidraw/components/canvases/InteractiveCanvas.d.ts +3 -2
- package/dist/excalidraw/components/canvases/InteractiveCanvas.js +4 -2
- package/dist/excalidraw/components/canvases/StaticCanvas.d.ts +2 -2
- package/dist/excalidraw/components/canvases/StaticCanvas.js +3 -2
- 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/footer/Footer.d.ts +2 -2
- package/dist/excalidraw/components/hyperlink/Hyperlink.d.ts +2 -2
- package/dist/excalidraw/components/hyperlink/helpers.d.ts +3 -3
- package/dist/excalidraw/components/icons.d.ts +10 -2
- package/dist/excalidraw/components/icons.js +29 -6
- 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 +24 -3
- package/dist/excalidraw/constants.js +28 -4
- package/dist/excalidraw/context/ui-appState.d.ts +1 -1
- package/dist/excalidraw/cursor.d.ts +1 -1
- package/dist/excalidraw/data/EditorLocalStorage.d.ts +2 -2
- package/dist/excalidraw/data/blob.d.ts +5 -5
- package/dist/excalidraw/data/filesystem.d.ts +2 -1
- package/dist/excalidraw/data/index.d.ts +4 -4
- package/dist/excalidraw/data/json.d.ts +3 -3
- package/dist/excalidraw/data/library.d.ts +3 -3
- package/dist/excalidraw/data/magic.d.ts +3 -3
- package/dist/excalidraw/data/reconcile.d.ts +3 -3
- package/dist/excalidraw/data/reconcile.js +18 -1
- package/dist/excalidraw/data/resave.d.ts +2 -2
- package/dist/excalidraw/data/restore.d.ts +3 -3
- package/dist/excalidraw/data/restore.js +58 -9
- package/dist/excalidraw/data/transform.d.ts +3 -3
- package/dist/excalidraw/data/transform.js +8 -5
- package/dist/excalidraw/data/types.d.ts +3 -3
- package/dist/excalidraw/element/ElementCanvasButtons.d.ts +1 -1
- package/dist/excalidraw/element/binding.d.ts +29 -10
- package/dist/excalidraw/element/binding.js +303 -71
- package/dist/excalidraw/element/bounds.d.ts +3 -3
- package/dist/excalidraw/element/collision.d.ts +4 -4
- package/dist/excalidraw/element/collision.js +5 -2
- package/dist/excalidraw/element/containerCache.d.ts +1 -1
- package/dist/excalidraw/element/dragElements.d.ts +6 -6
- package/dist/excalidraw/element/dragElements.js +39 -5
- package/dist/excalidraw/element/embeddable.d.ts +11 -6
- package/dist/excalidraw/element/heading.d.ts +11 -0
- package/dist/excalidraw/element/heading.js +81 -0
- package/dist/excalidraw/element/image.d.ts +2 -2
- package/dist/excalidraw/element/index.d.ts +2 -2
- package/dist/excalidraw/element/index.js +1 -1
- package/dist/excalidraw/element/linearElementEditor.d.ts +27 -16
- package/dist/excalidraw/element/linearElementEditor.js +133 -56
- package/dist/excalidraw/element/mutateElement.d.ts +3 -3
- package/dist/excalidraw/element/mutateElement.js +5 -3
- package/dist/excalidraw/element/newElement.d.ts +12 -10
- package/dist/excalidraw/element/newElement.js +31 -16
- package/dist/excalidraw/element/resizeElements.d.ts +15 -6
- package/dist/excalidraw/element/resizeElements.js +122 -46
- package/dist/excalidraw/element/resizeTest.d.ts +4 -4
- package/dist/excalidraw/element/resizeTest.js +2 -4
- package/dist/excalidraw/element/routing.d.ts +13 -0
- package/dist/excalidraw/element/routing.js +641 -0
- package/dist/excalidraw/element/showSelectedShapeActions.d.ts +2 -2
- package/dist/excalidraw/element/sizeHelpers.d.ts +2 -2
- package/dist/excalidraw/element/sortElements.d.ts +1 -1
- package/dist/excalidraw/element/textElement.d.ts +6 -28
- package/dist/excalidraw/element/textElement.js +64 -112
- package/dist/excalidraw/element/textWysiwyg.d.ts +12 -6
- package/dist/excalidraw/element/textWysiwyg.js +75 -62
- package/dist/excalidraw/element/transformHandles.d.ts +3 -3
- package/dist/excalidraw/element/transformHandles.js +7 -12
- package/dist/excalidraw/element/typeChecks.d.ts +7 -4
- package/dist/excalidraw/element/typeChecks.js +17 -0
- package/dist/excalidraw/element/types.d.ts +22 -4
- package/dist/excalidraw/emitter.d.ts +1 -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 +12 -5
- package/dist/excalidraw/fractionalIndex.js +40 -10
- package/dist/excalidraw/frame.d.ts +4 -4
- package/dist/excalidraw/frame.js +3 -3
- package/dist/excalidraw/gatransforms.d.ts +1 -1
- package/dist/excalidraw/gesture.d.ts +1 -1
- package/dist/excalidraw/groups.d.ts +4 -4
- package/dist/excalidraw/history.d.ts +8 -7
- package/dist/excalidraw/history.js +8 -8
- package/dist/excalidraw/hooks/useEmitter.d.ts +1 -1
- package/dist/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/excalidraw/i18n.d.ts +1 -1
- package/dist/excalidraw/index.d.ts +2 -2
- package/dist/excalidraw/index.js +3 -3
- package/dist/excalidraw/jotai.d.ts +1 -1
- package/dist/excalidraw/laser-trails.d.ts +3 -2
- package/dist/excalidraw/locales/en.json +42 -7
- package/dist/excalidraw/math.d.ts +47 -2
- package/dist/excalidraw/math.js +116 -0
- package/dist/excalidraw/mermaid.d.ts +2 -0
- package/dist/excalidraw/mermaid.js +29 -0
- package/dist/excalidraw/points.d.ts +1 -1
- package/dist/excalidraw/queue.d.ts +1 -1
- package/dist/excalidraw/renderer/helpers.d.ts +2 -2
- package/dist/excalidraw/renderer/interactiveScene.d.ts +2 -2
- package/dist/excalidraw/renderer/interactiveScene.js +64 -22
- package/dist/excalidraw/renderer/renderElement.d.ts +6 -4
- package/dist/excalidraw/renderer/renderElement.js +78 -58
- package/dist/excalidraw/renderer/renderSnaps.d.ts +1 -1
- package/dist/excalidraw/renderer/staticScene.d.ts +1 -1
- package/dist/excalidraw/renderer/staticSvgScene.d.ts +4 -4
- package/dist/excalidraw/renderer/staticSvgScene.js +2 -1
- package/dist/excalidraw/scene/Renderer.d.ts +4 -4
- package/dist/excalidraw/scene/Renderer.js +2 -3
- package/dist/excalidraw/scene/Scene.d.ts +16 -7
- package/dist/excalidraw/scene/Scene.js +26 -11
- package/dist/excalidraw/scene/Shape.d.ts +1 -1
- package/dist/excalidraw/scene/Shape.js +56 -5
- package/dist/excalidraw/scene/ShapeCache.d.ts +4 -4
- package/dist/excalidraw/scene/comparisons.d.ts +3 -2
- package/dist/excalidraw/scene/comparisons.js +1 -1
- package/dist/excalidraw/scene/export.d.ts +4 -3
- package/dist/excalidraw/scene/export.js +34 -36
- package/dist/excalidraw/scene/scroll.d.ts +2 -2
- package/dist/excalidraw/scene/scrollbars.d.ts +3 -3
- package/dist/excalidraw/scene/selection.d.ts +2 -2
- package/dist/excalidraw/scene/types.d.ts +6 -8
- package/dist/excalidraw/scene/zoom.d.ts +1 -1
- package/dist/excalidraw/shapes.d.ts +8 -0
- package/dist/excalidraw/shapes.js +57 -0
- package/dist/excalidraw/snapping.d.ts +4 -4
- package/dist/excalidraw/snapping.js +2 -1
- package/dist/excalidraw/store.d.ts +34 -4
- package/dist/excalidraw/store.js +27 -0
- package/dist/excalidraw/types.d.ts +32 -21
- package/dist/excalidraw/utils.d.ts +15 -5
- package/dist/excalidraw/utils.js +22 -0
- package/dist/excalidraw/zindex.d.ts +2 -2
- 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-XW4JO6VX.json → en-YNVBSAIL.json} +42 -7
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +49 -53
- package/dist/utils/bbox.d.ts +2 -2
- package/dist/utils/collision.d.ts +1 -1
- package/dist/utils/export.d.ts +4 -3
- package/dist/utils/export.js +2 -1
- package/dist/utils/geometry/geometry.d.ts +3 -2
- package/dist/utils/geometry/geometry.js +5 -1
- package/dist/utils/geometry/shape.d.ts +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/withinBounds.d.ts +1 -1
- package/history.ts +13 -6
- 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-BLEB3M62.js.map +0 -7
- package/dist/browser/dev/excalidraw-assets-dev/chunk-XOM7LNOU.js.map +0 -7
- package/dist/browser/dev/excalidraw-assets-dev/dist-ITJNUBZF.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-UWBW5SR2.js +0 -55
- package/dist/browser/prod/excalidraw-assets/dist-54276HPL.js +0 -6
- package/dist/browser/prod/excalidraw-assets/en-7GPZE2Y2.js +0 -1
- package/dist/browser/prod/excalidraw-assets/image-35KQQ5EN.js +0 -1
- package/dist/dev/Cascadia-CYPE3OJC.woff2 +0 -0
- package/dist/dev/Virgil-UZN6MUT6.woff2 +0 -0
- package/dist/excalidraw/components/Stats.d.ts +0 -11
- package/dist/excalidraw/components/Stats.js +0 -13
- package/dist/excalidraw/scene/Fonts.d.ts +0 -21
- package/dist/excalidraw/scene/Fonts.js +0 -72
- 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-TR4QLF5E.js.map → en-XV7OZCPP.js.map} +0 -0
- /package/dist/browser/dev/excalidraw-assets-dev/{image-ZGDDRBEN.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
|
@@ -7,7 +7,7 @@ export declare const actionCopy: {
|
|
|
7
7
|
category: "element";
|
|
8
8
|
};
|
|
9
9
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, event: ClipboardEvent | null, app: import("../types").AppClassProperties) => Promise<{
|
|
10
|
-
storeAction:
|
|
10
|
+
storeAction: "none";
|
|
11
11
|
appState: {
|
|
12
12
|
errorMessage: any;
|
|
13
13
|
contextMenu: {
|
|
@@ -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;
|
|
@@ -139,7 +141,10 @@ export declare const actionCopy: {
|
|
|
139
141
|
isSpeaking?: boolean | undefined;
|
|
140
142
|
isMuted?: boolean | undefined;
|
|
141
143
|
}>>;
|
|
142
|
-
|
|
144
|
+
stats: {
|
|
145
|
+
open: boolean;
|
|
146
|
+
panels: number;
|
|
147
|
+
};
|
|
143
148
|
currentChartType: import("../element/types").ChartType;
|
|
144
149
|
pasteDialog: {
|
|
145
150
|
shown: false;
|
|
@@ -161,7 +166,7 @@ export declare const actionCopy: {
|
|
|
161
166
|
followedBy: Set<import("../types").SocketId>;
|
|
162
167
|
};
|
|
163
168
|
} | {
|
|
164
|
-
storeAction:
|
|
169
|
+
storeAction: "none";
|
|
165
170
|
appState?: undefined;
|
|
166
171
|
}>;
|
|
167
172
|
keyTest: undefined;
|
|
@@ -175,7 +180,7 @@ export declare const actionPaste: {
|
|
|
175
180
|
category: "element";
|
|
176
181
|
};
|
|
177
182
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, data: any, app: import("../types").AppClassProperties) => Promise<false | {
|
|
178
|
-
storeAction:
|
|
183
|
+
storeAction: "none";
|
|
179
184
|
appState: {
|
|
180
185
|
errorMessage: string;
|
|
181
186
|
contextMenu: {
|
|
@@ -229,7 +234,9 @@ export declare const actionPaste: {
|
|
|
229
234
|
currentItemTextAlign: string;
|
|
230
235
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
231
236
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
237
|
+
currentHoveredFontFamily: number | null;
|
|
232
238
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
239
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
233
240
|
viewBackgroundColor: string;
|
|
234
241
|
scrollX: number;
|
|
235
242
|
scrollY: number;
|
|
@@ -242,7 +249,7 @@ export declare const actionPaste: {
|
|
|
242
249
|
value: import("../types").NormalizedZoomValue;
|
|
243
250
|
}>;
|
|
244
251
|
openMenu: "canvas" | "shape" | null;
|
|
245
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
252
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
246
253
|
openSidebar: {
|
|
247
254
|
name: string;
|
|
248
255
|
tab?: string | undefined;
|
|
@@ -307,7 +314,10 @@ export declare const actionPaste: {
|
|
|
307
314
|
isSpeaking?: boolean | undefined;
|
|
308
315
|
isMuted?: boolean | undefined;
|
|
309
316
|
}>>;
|
|
310
|
-
|
|
317
|
+
stats: {
|
|
318
|
+
open: boolean;
|
|
319
|
+
panels: number;
|
|
320
|
+
};
|
|
311
321
|
currentChartType: import("../element/types").ChartType;
|
|
312
322
|
pasteDialog: {
|
|
313
323
|
shown: false;
|
|
@@ -329,7 +339,7 @@ export declare const actionPaste: {
|
|
|
329
339
|
followedBy: Set<import("../types").SocketId>;
|
|
330
340
|
};
|
|
331
341
|
} | {
|
|
332
|
-
storeAction:
|
|
342
|
+
storeAction: "none";
|
|
333
343
|
appState?: undefined;
|
|
334
344
|
}>;
|
|
335
345
|
keyTest: undefined;
|
|
@@ -398,7 +408,9 @@ export declare const actionCut: {
|
|
|
398
408
|
currentItemTextAlign: string;
|
|
399
409
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
400
410
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
411
|
+
currentHoveredFontFamily: number | null;
|
|
401
412
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
413
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
402
414
|
viewBackgroundColor: string;
|
|
403
415
|
scrollX: number;
|
|
404
416
|
scrollY: number;
|
|
@@ -411,7 +423,7 @@ export declare const actionCut: {
|
|
|
411
423
|
value: import("../types").NormalizedZoomValue;
|
|
412
424
|
}>;
|
|
413
425
|
openMenu: "canvas" | "shape" | null;
|
|
414
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
426
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
415
427
|
openSidebar: {
|
|
416
428
|
name: string;
|
|
417
429
|
tab?: string | undefined;
|
|
@@ -476,7 +488,10 @@ export declare const actionCut: {
|
|
|
476
488
|
isSpeaking?: boolean | undefined;
|
|
477
489
|
isMuted?: boolean | undefined;
|
|
478
490
|
}>>;
|
|
479
|
-
|
|
491
|
+
stats: {
|
|
492
|
+
open: boolean;
|
|
493
|
+
panels: number;
|
|
494
|
+
};
|
|
480
495
|
currentChartType: import("../element/types").ChartType;
|
|
481
496
|
pasteDialog: {
|
|
482
497
|
shown: false;
|
|
@@ -497,7 +512,7 @@ export declare const actionCut: {
|
|
|
497
512
|
userToFollow: import("../types").UserToFollow | null;
|
|
498
513
|
followedBy: Set<import("../types").SocketId>;
|
|
499
514
|
};
|
|
500
|
-
storeAction:
|
|
515
|
+
storeAction: "capture";
|
|
501
516
|
} | {
|
|
502
517
|
elements: readonly import("../element/types").OrderedExcalidrawElement[];
|
|
503
518
|
appState: {
|
|
@@ -511,6 +526,7 @@ export declare const actionCut: {
|
|
|
511
526
|
pointerDownState: Readonly<{
|
|
512
527
|
prevSelectedPointsIndices: readonly number[] | null;
|
|
513
528
|
lastClickedPoint: number;
|
|
529
|
+
lastClickedIsEndPoint: boolean;
|
|
514
530
|
origin: Readonly<{
|
|
515
531
|
x: number;
|
|
516
532
|
y: number;
|
|
@@ -581,7 +597,9 @@ export declare const actionCut: {
|
|
|
581
597
|
currentItemTextAlign: string;
|
|
582
598
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
583
599
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
600
|
+
currentHoveredFontFamily: number | null;
|
|
584
601
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
602
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
585
603
|
viewBackgroundColor: string;
|
|
586
604
|
scrollX: number;
|
|
587
605
|
scrollY: number;
|
|
@@ -594,7 +612,7 @@ export declare const actionCut: {
|
|
|
594
612
|
value: import("../types").NormalizedZoomValue;
|
|
595
613
|
}>;
|
|
596
614
|
openMenu: "canvas" | "shape" | null;
|
|
597
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
615
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
598
616
|
openSidebar: {
|
|
599
617
|
name: string;
|
|
600
618
|
tab?: string | undefined;
|
|
@@ -659,7 +677,10 @@ export declare const actionCut: {
|
|
|
659
677
|
isSpeaking?: boolean | undefined;
|
|
660
678
|
isMuted?: boolean | undefined;
|
|
661
679
|
}>>;
|
|
662
|
-
|
|
680
|
+
stats: {
|
|
681
|
+
open: boolean;
|
|
682
|
+
panels: number;
|
|
683
|
+
};
|
|
663
684
|
currentChartType: import("../element/types").ChartType;
|
|
664
685
|
pasteDialog: {
|
|
665
686
|
shown: false;
|
|
@@ -680,7 +701,7 @@ export declare const actionCut: {
|
|
|
680
701
|
userToFollow: import("../types").UserToFollow | null;
|
|
681
702
|
followedBy: Set<import("../types").SocketId>;
|
|
682
703
|
};
|
|
683
|
-
storeAction:
|
|
704
|
+
storeAction: "capture";
|
|
684
705
|
} | {
|
|
685
706
|
elements: import("../element/types").ExcalidrawElement[];
|
|
686
707
|
appState: {
|
|
@@ -735,7 +756,9 @@ export declare const actionCut: {
|
|
|
735
756
|
currentItemTextAlign: string;
|
|
736
757
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
737
758
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
759
|
+
currentHoveredFontFamily: number | null;
|
|
738
760
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
761
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
739
762
|
viewBackgroundColor: string;
|
|
740
763
|
scrollX: number;
|
|
741
764
|
scrollY: number;
|
|
@@ -748,7 +771,7 @@ export declare const actionCut: {
|
|
|
748
771
|
value: import("../types").NormalizedZoomValue;
|
|
749
772
|
}>;
|
|
750
773
|
openMenu: "canvas" | "shape" | null;
|
|
751
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
774
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
752
775
|
openSidebar: {
|
|
753
776
|
name: string;
|
|
754
777
|
tab?: string | undefined;
|
|
@@ -807,7 +830,10 @@ export declare const actionCut: {
|
|
|
807
830
|
isSpeaking?: boolean | undefined;
|
|
808
831
|
isMuted?: boolean | undefined;
|
|
809
832
|
}>>;
|
|
810
|
-
|
|
833
|
+
stats: {
|
|
834
|
+
open: boolean;
|
|
835
|
+
panels: number;
|
|
836
|
+
};
|
|
811
837
|
currentChartType: import("../element/types").ChartType;
|
|
812
838
|
pasteDialog: {
|
|
813
839
|
shown: false;
|
|
@@ -828,7 +854,7 @@ export declare const actionCut: {
|
|
|
828
854
|
userToFollow: import("../types").UserToFollow | null;
|
|
829
855
|
followedBy: Set<import("../types").SocketId>;
|
|
830
856
|
};
|
|
831
|
-
storeAction:
|
|
857
|
+
storeAction: "none" | "capture";
|
|
832
858
|
};
|
|
833
859
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
834
860
|
} & {
|
|
@@ -842,7 +868,7 @@ export declare const actionCopyAsSvg: {
|
|
|
842
868
|
category: "element";
|
|
843
869
|
};
|
|
844
870
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _data: any, app: import("../types").AppClassProperties) => Promise<{
|
|
845
|
-
storeAction:
|
|
871
|
+
storeAction: "none";
|
|
846
872
|
appState?: undefined;
|
|
847
873
|
} | {
|
|
848
874
|
appState: {
|
|
@@ -898,7 +924,9 @@ export declare const actionCopyAsSvg: {
|
|
|
898
924
|
currentItemTextAlign: string;
|
|
899
925
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
900
926
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
927
|
+
currentHoveredFontFamily: number | null;
|
|
901
928
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
929
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
902
930
|
viewBackgroundColor: string;
|
|
903
931
|
scrollX: number;
|
|
904
932
|
scrollY: number;
|
|
@@ -911,7 +939,7 @@ export declare const actionCopyAsSvg: {
|
|
|
911
939
|
value: import("../types").NormalizedZoomValue;
|
|
912
940
|
}>;
|
|
913
941
|
openMenu: "canvas" | "shape" | null;
|
|
914
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
942
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
915
943
|
openSidebar: {
|
|
916
944
|
name: string;
|
|
917
945
|
tab?: string | undefined;
|
|
@@ -976,7 +1004,10 @@ export declare const actionCopyAsSvg: {
|
|
|
976
1004
|
isSpeaking?: boolean | undefined;
|
|
977
1005
|
isMuted?: boolean | undefined;
|
|
978
1006
|
}>>;
|
|
979
|
-
|
|
1007
|
+
stats: {
|
|
1008
|
+
open: boolean;
|
|
1009
|
+
panels: number;
|
|
1010
|
+
};
|
|
980
1011
|
currentChartType: import("../element/types").ChartType;
|
|
981
1012
|
pasteDialog: {
|
|
982
1013
|
shown: false;
|
|
@@ -997,7 +1028,7 @@ export declare const actionCopyAsSvg: {
|
|
|
997
1028
|
userToFollow: import("../types").UserToFollow | null;
|
|
998
1029
|
followedBy: Set<import("../types").SocketId>;
|
|
999
1030
|
};
|
|
1000
|
-
storeAction:
|
|
1031
|
+
storeAction: "none";
|
|
1001
1032
|
}>;
|
|
1002
1033
|
predicate: (elements: readonly import("../element/types").ExcalidrawElement[]) => boolean;
|
|
1003
1034
|
keywords: string[];
|
|
@@ -1012,7 +1043,7 @@ export declare const actionCopyAsPng: {
|
|
|
1012
1043
|
category: "element";
|
|
1013
1044
|
};
|
|
1014
1045
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _data: any, app: import("../types").AppClassProperties) => Promise<{
|
|
1015
|
-
storeAction:
|
|
1046
|
+
storeAction: "none";
|
|
1016
1047
|
appState?: undefined;
|
|
1017
1048
|
} | {
|
|
1018
1049
|
appState: {
|
|
@@ -1068,7 +1099,9 @@ export declare const actionCopyAsPng: {
|
|
|
1068
1099
|
currentItemTextAlign: string;
|
|
1069
1100
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
1070
1101
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
1102
|
+
currentHoveredFontFamily: number | null;
|
|
1071
1103
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
1104
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
1072
1105
|
viewBackgroundColor: string;
|
|
1073
1106
|
scrollX: number;
|
|
1074
1107
|
scrollY: number;
|
|
@@ -1081,7 +1114,7 @@ export declare const actionCopyAsPng: {
|
|
|
1081
1114
|
value: import("../types").NormalizedZoomValue;
|
|
1082
1115
|
}>;
|
|
1083
1116
|
openMenu: "canvas" | "shape" | null;
|
|
1084
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1117
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
1085
1118
|
openSidebar: {
|
|
1086
1119
|
name: string;
|
|
1087
1120
|
tab?: string | undefined;
|
|
@@ -1146,7 +1179,10 @@ export declare const actionCopyAsPng: {
|
|
|
1146
1179
|
isSpeaking?: boolean | undefined;
|
|
1147
1180
|
isMuted?: boolean | undefined;
|
|
1148
1181
|
}>>;
|
|
1149
|
-
|
|
1182
|
+
stats: {
|
|
1183
|
+
open: boolean;
|
|
1184
|
+
panels: number;
|
|
1185
|
+
};
|
|
1150
1186
|
currentChartType: import("../element/types").ChartType;
|
|
1151
1187
|
pasteDialog: {
|
|
1152
1188
|
shown: false;
|
|
@@ -1167,7 +1203,7 @@ export declare const actionCopyAsPng: {
|
|
|
1167
1203
|
userToFollow: import("../types").UserToFollow | null;
|
|
1168
1204
|
followedBy: Set<import("../types").SocketId>;
|
|
1169
1205
|
};
|
|
1170
|
-
storeAction:
|
|
1206
|
+
storeAction: "none";
|
|
1171
1207
|
}>;
|
|
1172
1208
|
predicate: (elements: readonly import("../element/types").ExcalidrawElement[]) => boolean;
|
|
1173
1209
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -1182,7 +1218,7 @@ export declare const copyText: {
|
|
|
1182
1218
|
category: "element";
|
|
1183
1219
|
};
|
|
1184
1220
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
1185
|
-
storeAction:
|
|
1221
|
+
storeAction: "none";
|
|
1186
1222
|
};
|
|
1187
1223
|
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
1188
1224
|
keywords: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ExcalidrawElement } from "../element/types";
|
|
3
|
-
import { AppState } from "../types";
|
|
2
|
+
import type { ExcalidrawElement } from "../element/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;
|
|
@@ -143,7 +145,10 @@ export declare const actionDeleteSelected: {
|
|
|
143
145
|
isSpeaking?: boolean | undefined;
|
|
144
146
|
isMuted?: boolean | undefined;
|
|
145
147
|
}>>;
|
|
146
|
-
|
|
148
|
+
stats: {
|
|
149
|
+
open: boolean;
|
|
150
|
+
panels: number;
|
|
151
|
+
};
|
|
147
152
|
currentChartType: import("../element/types").ChartType;
|
|
148
153
|
pasteDialog: {
|
|
149
154
|
shown: false;
|
|
@@ -164,7 +169,7 @@ export declare const actionDeleteSelected: {
|
|
|
164
169
|
userToFollow: import("../types").UserToFollow | null;
|
|
165
170
|
followedBy: Set<import("../types").SocketId>;
|
|
166
171
|
};
|
|
167
|
-
storeAction:
|
|
172
|
+
storeAction: "capture";
|
|
168
173
|
} | {
|
|
169
174
|
elements: readonly import("../element/types").OrderedExcalidrawElement[];
|
|
170
175
|
appState: {
|
|
@@ -178,6 +183,7 @@ export declare const actionDeleteSelected: {
|
|
|
178
183
|
pointerDownState: Readonly<{
|
|
179
184
|
prevSelectedPointsIndices: readonly number[] | null;
|
|
180
185
|
lastClickedPoint: number;
|
|
186
|
+
lastClickedIsEndPoint: boolean;
|
|
181
187
|
origin: Readonly<{
|
|
182
188
|
x: number;
|
|
183
189
|
y: number;
|
|
@@ -248,7 +254,9 @@ export declare const actionDeleteSelected: {
|
|
|
248
254
|
currentItemTextAlign: string;
|
|
249
255
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
250
256
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
257
|
+
currentHoveredFontFamily: number | null;
|
|
251
258
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
259
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
252
260
|
viewBackgroundColor: string;
|
|
253
261
|
scrollX: number;
|
|
254
262
|
scrollY: number;
|
|
@@ -261,7 +269,7 @@ export declare const actionDeleteSelected: {
|
|
|
261
269
|
value: import("../types").NormalizedZoomValue;
|
|
262
270
|
}>;
|
|
263
271
|
openMenu: "canvas" | "shape" | null;
|
|
264
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
272
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
265
273
|
openSidebar: {
|
|
266
274
|
name: string;
|
|
267
275
|
tab?: string | undefined;
|
|
@@ -326,7 +334,10 @@ export declare const actionDeleteSelected: {
|
|
|
326
334
|
isSpeaking?: boolean | undefined;
|
|
327
335
|
isMuted?: boolean | undefined;
|
|
328
336
|
}>>;
|
|
329
|
-
|
|
337
|
+
stats: {
|
|
338
|
+
open: boolean;
|
|
339
|
+
panels: number;
|
|
340
|
+
};
|
|
330
341
|
currentChartType: import("../element/types").ChartType;
|
|
331
342
|
pasteDialog: {
|
|
332
343
|
shown: false;
|
|
@@ -347,7 +358,7 @@ export declare const actionDeleteSelected: {
|
|
|
347
358
|
userToFollow: import("../types").UserToFollow | null;
|
|
348
359
|
followedBy: Set<import("../types").SocketId>;
|
|
349
360
|
};
|
|
350
|
-
storeAction:
|
|
361
|
+
storeAction: "capture";
|
|
351
362
|
} | {
|
|
352
363
|
elements: ExcalidrawElement[];
|
|
353
364
|
appState: {
|
|
@@ -402,7 +413,9 @@ export declare const actionDeleteSelected: {
|
|
|
402
413
|
currentItemTextAlign: string;
|
|
403
414
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
404
415
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
416
|
+
currentHoveredFontFamily: number | null;
|
|
405
417
|
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
418
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
406
419
|
viewBackgroundColor: string;
|
|
407
420
|
scrollX: number;
|
|
408
421
|
scrollY: number;
|
|
@@ -415,7 +428,7 @@ export declare const actionDeleteSelected: {
|
|
|
415
428
|
value: import("../types").NormalizedZoomValue;
|
|
416
429
|
}>;
|
|
417
430
|
openMenu: "canvas" | "shape" | null;
|
|
418
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
431
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
419
432
|
openSidebar: {
|
|
420
433
|
name: string;
|
|
421
434
|
tab?: string | undefined;
|
|
@@ -474,7 +487,10 @@ export declare const actionDeleteSelected: {
|
|
|
474
487
|
isSpeaking?: boolean | undefined;
|
|
475
488
|
isMuted?: boolean | undefined;
|
|
476
489
|
}>>;
|
|
477
|
-
|
|
490
|
+
stats: {
|
|
491
|
+
open: boolean;
|
|
492
|
+
panels: number;
|
|
493
|
+
};
|
|
478
494
|
currentChartType: import("../element/types").ChartType;
|
|
479
495
|
pasteDialog: {
|
|
480
496
|
shown: false;
|
|
@@ -495,7 +511,7 @@ export declare const actionDeleteSelected: {
|
|
|
495
511
|
userToFollow: import("../types").UserToFollow | null;
|
|
496
512
|
followedBy: Set<import("../types").SocketId>;
|
|
497
513
|
};
|
|
498
|
-
storeAction:
|
|
514
|
+
storeAction: "none" | "capture";
|
|
499
515
|
};
|
|
500
516
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean;
|
|
501
517
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
@@ -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 {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ExcalidrawElement } from "../element/types";
|
|
3
|
-
import { AppClassProperties, AppState } from "../types";
|
|
2
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
3
|
+
import type { AppClassProperties, AppState } from "../types";
|
|
4
4
|
export declare const distributeHorizontally: {
|
|
5
5
|
name: "distributeHorizontally";
|
|
6
6
|
label: string;
|
|
@@ -10,7 +10,7 @@ export declare const distributeHorizontally: {
|
|
|
10
10
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
11
11
|
appState: Readonly<AppState>;
|
|
12
12
|
elements: ExcalidrawElement[];
|
|
13
|
-
storeAction:
|
|
13
|
+
storeAction: "capture";
|
|
14
14
|
};
|
|
15
15
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
16
16
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
@@ -26,7 +26,7 @@ export declare const distributeVertically: {
|
|
|
26
26
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
27
27
|
appState: Readonly<AppState>;
|
|
28
28
|
elements: ExcalidrawElement[];
|
|
29
|
-
storeAction:
|
|
29
|
+
storeAction: "capture";
|
|
30
30
|
};
|
|
31
31
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
32
32
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ExcalidrawElement } from "../element/types";
|
|
3
|
-
import { AppState } from "../types";
|
|
2
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
3
|
+
import type { AppState } from "../types";
|
|
4
4
|
export declare const actionDuplicateSelection: {
|
|
5
5
|
name: "duplicateSelection";
|
|
6
6
|
label: string;
|
|
@@ -9,7 +9,7 @@ export declare const actionDuplicateSelection: {
|
|
|
9
9
|
category: "element";
|
|
10
10
|
};
|
|
11
11
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: import("../types").AppClassProperties) => false | {
|
|
12
|
-
storeAction:
|
|
12
|
+
storeAction: "capture";
|
|
13
13
|
elements?: readonly ExcalidrawElement[] | null | undefined;
|
|
14
14
|
appState?: import("../utility-types").MarkOptional<AppState, "width" | "height" | "offsetTop" | "offsetLeft"> | null | undefined;
|
|
15
15
|
files?: import("../types").BinaryFiles | null | undefined;
|
|
@@ -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
|
}
|