@excalidraw/excalidraw 0.17.1-88812e0 → 0.17.1-96eeec5
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 +2 -0
- package/dist/browser/dev/excalidraw-assets-dev/{chunk-47LVF2XL.js → chunk-DEYXWPUO.js} +4933 -1520
- package/dist/browser/dev/excalidraw-assets-dev/chunk-DEYXWPUO.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{chunk-XOM7LNOU.js → chunk-EM6LVGFW.js} +27 -4
- package/dist/browser/dev/excalidraw-assets-dev/chunk-EM6LVGFW.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{dist-ITJNUBZF.js → dist-6QVAH5JA.js} +36 -14
- package/dist/browser/dev/excalidraw-assets-dev/dist-6QVAH5JA.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{en-TR4QLF5E.js → en-AZFA5HJJ.js} +4 -2
- package/dist/browser/dev/excalidraw-assets-dev/{image-LHMGJWTI.js → image-5XCR4WHS.js} +2 -2
- package/dist/browser/dev/index.css +157 -62
- package/dist/browser/dev/index.css.map +3 -3
- package/dist/browser/dev/index.js +12016 -7663
- package/dist/browser/dev/index.js.map +4 -4
- package/dist/browser/prod/excalidraw-assets/{chunk-5SYIAZGL.js → chunk-7DXALCB2.js} +5 -5
- package/dist/browser/prod/excalidraw-assets/chunk-ODWTVSS7.js +68 -0
- package/dist/browser/prod/excalidraw-assets/dist-567JAXHK.js +7 -0
- package/dist/browser/prod/excalidraw-assets/en-6E7MYLWO.js +1 -0
- package/dist/browser/prod/excalidraw-assets/image-LQAMCFQI.js +1 -0
- package/dist/browser/prod/index.css +1 -1
- package/dist/browser/prod/index.js +69 -51
- package/dist/dev/{en-XW4JO6VX.json → en-EB2MBPAV.json} +24 -3
- package/dist/dev/index.css +157 -62
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +18250 -16114
- package/dist/dev/index.js.map +4 -4
- package/dist/excalidraw/actions/actionAddToLibrary.d.ts +15 -6
- package/dist/excalidraw/actions/actionAlign.d.ts +8 -8
- package/dist/excalidraw/actions/actionBoundText.d.ts +14 -8
- package/dist/excalidraw/actions/actionBoundText.js +3 -1
- package/dist/excalidraw/actions/actionCanvas.d.ts +64 -28
- package/dist/excalidraw/actions/actionCanvas.js +1 -1
- package/dist/excalidraw/actions/actionClipboard.d.ts +40 -19
- package/dist/excalidraw/actions/actionDeleteSelected.d.ts +17 -8
- package/dist/excalidraw/actions/actionDistribute.d.ts +4 -4
- package/dist/excalidraw/actions/actionDuplicateSelection.d.ts +3 -3
- package/dist/excalidraw/actions/actionElementLock.d.ts +11 -5
- package/dist/excalidraw/actions/actionExport.d.ts +48 -21
- package/dist/excalidraw/actions/actionFinalize.d.ts +11 -5
- package/dist/excalidraw/actions/actionFinalize.js +1 -1
- package/dist/excalidraw/actions/actionFlip.d.ts +4 -4
- package/dist/excalidraw/actions/actionFlip.js +5 -6
- package/dist/excalidraw/actions/actionFrame.d.ts +328 -8
- package/dist/excalidraw/actions/actionGroup.d.ts +320 -4
- package/dist/excalidraw/actions/actionHistory.d.ts +3 -3
- package/dist/excalidraw/actions/actionHistory.js +4 -4
- package/dist/excalidraw/actions/actionLinearEditor.d.ts +9 -4
- package/dist/excalidraw/actions/actionLinearEditor.js +19 -4
- package/dist/excalidraw/actions/actionLink.d.ts +5 -2
- package/dist/excalidraw/actions/actionMenu.d.ts +15 -6
- package/dist/excalidraw/actions/actionNavigate.d.ts +11 -5
- package/dist/excalidraw/actions/actionProperties.d.ts +67 -28
- package/dist/excalidraw/actions/actionProperties.js +1 -1
- package/dist/excalidraw/actions/actionSelectAll.d.ts +6 -3
- package/dist/excalidraw/actions/actionStyles.d.ts +9 -3
- package/dist/excalidraw/actions/actionTextAutoResize.d.ts +17 -0
- package/dist/excalidraw/actions/actionTextAutoResize.js +38 -0
- package/dist/excalidraw/actions/actionToggleGridMode.d.ts +6 -3
- package/dist/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +5 -2
- package/dist/excalidraw/actions/actionToggleStats.d.ts +6 -2
- package/dist/excalidraw/actions/actionToggleStats.js +4 -3
- package/dist/excalidraw/actions/actionToggleViewMode.d.ts +5 -2
- package/dist/excalidraw/actions/actionToggleZenMode.d.ts +5 -2
- 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/animated-trail.d.ts +2 -2
- package/dist/excalidraw/appState.d.ts +5 -2
- package/dist/excalidraw/appState.js +6 -3
- package/dist/excalidraw/change.d.ts +4 -4
- package/dist/excalidraw/change.js +14 -7
- package/dist/excalidraw/charts.d.ts +1 -1
- 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 +9 -6
- package/dist/excalidraw/components/App.d.ts +10 -16
- package/dist/excalidraw/components/App.js +190 -142
- package/dist/excalidraw/components/ButtonIconSelect.js +1 -1
- 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 +1 -1
- package/dist/excalidraw/components/ColorPicker/Picker.d.ts +3 -3
- 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/HelpDialog.js +1 -1
- package/dist/excalidraw/components/HintViewer.d.ts +1 -1
- 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/PublishLibrary.d.ts +1 -1
- package/dist/excalidraw/components/SVGLayer.d.ts +1 -1
- 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 +52 -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 +67 -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 +197 -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 +100 -0
- package/dist/excalidraw/components/Stats/Position.d.ts +13 -0
- package/dist/excalidraw/components/Stats/Position.js +39 -0
- package/dist/excalidraw/components/Stats/index.d.ts +16 -0
- package/dist/excalidraw/components/Stats/index.js +78 -0
- package/dist/excalidraw/components/Stats/utils.d.ts +25 -0
- package/dist/excalidraw/components/Stats/utils.js +158 -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 +4 -4
- 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/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 +2 -2
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuItem.js +2 -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 +6 -2
- package/dist/excalidraw/components/icons.js +22 -6
- package/dist/excalidraw/constants.d.ts +8 -2
- package/dist/excalidraw/constants.js +8 -1
- 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/resave.d.ts +2 -2
- package/dist/excalidraw/data/restore.d.ts +3 -3
- package/dist/excalidraw/data/restore.js +16 -1
- package/dist/excalidraw/data/transform.d.ts +3 -3
- 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 +7 -21
- package/dist/excalidraw/element/binding.js +127 -102
- package/dist/excalidraw/element/bounds.d.ts +3 -3
- package/dist/excalidraw/element/collision.d.ts +3 -3
- package/dist/excalidraw/element/collision.js +1 -1
- package/dist/excalidraw/element/containerCache.d.ts +1 -1
- package/dist/excalidraw/element/dragElements.d.ts +4 -4
- package/dist/excalidraw/element/dragElements.js +27 -3
- package/dist/excalidraw/element/embeddable.d.ts +8 -5
- 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 +8 -5
- package/dist/excalidraw/element/linearElementEditor.js +7 -4
- package/dist/excalidraw/element/mutateElement.d.ts +2 -2
- package/dist/excalidraw/element/mutateElement.js +1 -1
- package/dist/excalidraw/element/newElement.d.ts +5 -8
- package/dist/excalidraw/element/newElement.js +16 -14
- package/dist/excalidraw/element/resizeElements.d.ts +11 -3
- package/dist/excalidraw/element/resizeElements.js +75 -23
- package/dist/excalidraw/element/resizeTest.d.ts +4 -4
- package/dist/excalidraw/element/resizeTest.js +2 -4
- 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 +5 -4
- package/dist/excalidraw/element/textElement.js +11 -3
- package/dist/excalidraw/element/textWysiwyg.d.ts +12 -6
- package/dist/excalidraw/element/textWysiwyg.js +38 -17
- package/dist/excalidraw/element/transformHandles.d.ts +3 -3
- package/dist/excalidraw/element/transformHandles.js +0 -10
- package/dist/excalidraw/element/typeChecks.d.ts +4 -4
- package/dist/excalidraw/element/types.d.ts +11 -4
- package/dist/excalidraw/emitter.d.ts +1 -1
- package/dist/excalidraw/fractionalIndex.d.ts +1 -1
- package/dist/excalidraw/fractionalIndex.js +2 -4
- package/dist/excalidraw/frame.d.ts +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 +4 -4
- 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 +1 -1
- package/dist/excalidraw/jotai.d.ts +1 -1
- package/dist/excalidraw/laser-trails.d.ts +3 -2
- package/dist/excalidraw/locales/en.json +24 -3
- package/dist/excalidraw/math.d.ts +4 -2
- package/dist/excalidraw/math.js +6 -0
- package/dist/excalidraw/mermaid.d.ts +2 -0
- package/dist/excalidraw/mermaid.js +28 -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 +32 -6
- package/dist/excalidraw/renderer/renderElement.d.ts +4 -4
- package/dist/excalidraw/renderer/renderElement.js +5 -5
- 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/scene/Fonts.d.ts +2 -4
- package/dist/excalidraw/scene/Fonts.js +12 -15
- 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 +17 -8
- package/dist/excalidraw/scene/Shape.d.ts +1 -1
- package/dist/excalidraw/scene/ShapeCache.d.ts +4 -4
- package/dist/excalidraw/scene/comparisons.d.ts +2 -2
- package/dist/excalidraw/scene/export.d.ts +2 -2
- package/dist/excalidraw/scene/export.js +2 -2
- 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 +7 -0
- package/dist/excalidraw/shapes.js +40 -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 +25 -20
- package/dist/excalidraw/utils.d.ts +4 -4
- package/dist/excalidraw/zindex.d.ts +2 -2
- package/dist/prod/{en-XW4JO6VX.json → en-EB2MBPAV.json} +24 -3
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +39 -39
- package/dist/utils/bbox.d.ts +2 -2
- package/dist/utils/collision.d.ts +1 -1
- package/dist/utils/export.d.ts +2 -2
- package/dist/utils/geometry/geometry.d.ts +1 -1
- package/dist/utils/geometry/shape.d.ts +1 -1
- package/dist/utils/withinBounds.d.ts +1 -1
- package/history.ts +4 -4
- package/package.json +2 -2
- package/dist/browser/dev/excalidraw-assets-dev/chunk-47LVF2XL.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/excalidraw-assets/chunk-4SNEEDZH.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-ISQJGWLB.js +0 -1
- package/dist/excalidraw/components/Stats.d.ts +0 -11
- package/dist/excalidraw/components/Stats.js +0 -13
- /package/dist/browser/dev/excalidraw-assets-dev/{en-TR4QLF5E.js.map → en-AZFA5HJJ.js.map} +0 -0
- /package/dist/browser/dev/excalidraw-assets-dev/{image-LHMGJWTI.js.map → image-5XCR4WHS.js.map} +0 -0
|
@@ -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
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
5
5
|
export declare const actionDeleteSelected: {
|
|
6
6
|
name: "deleteSelectedElements";
|
|
@@ -143,7 +143,10 @@ export declare const actionDeleteSelected: {
|
|
|
143
143
|
isSpeaking?: boolean | undefined;
|
|
144
144
|
isMuted?: boolean | undefined;
|
|
145
145
|
}>>;
|
|
146
|
-
|
|
146
|
+
stats: {
|
|
147
|
+
open: boolean;
|
|
148
|
+
panels: number;
|
|
149
|
+
};
|
|
147
150
|
currentChartType: import("../element/types").ChartType;
|
|
148
151
|
pasteDialog: {
|
|
149
152
|
shown: false;
|
|
@@ -164,7 +167,7 @@ export declare const actionDeleteSelected: {
|
|
|
164
167
|
userToFollow: import("../types").UserToFollow | null;
|
|
165
168
|
followedBy: Set<import("../types").SocketId>;
|
|
166
169
|
};
|
|
167
|
-
storeAction:
|
|
170
|
+
storeAction: "capture";
|
|
168
171
|
} | {
|
|
169
172
|
elements: readonly import("../element/types").OrderedExcalidrawElement[];
|
|
170
173
|
appState: {
|
|
@@ -326,7 +329,10 @@ export declare const actionDeleteSelected: {
|
|
|
326
329
|
isSpeaking?: boolean | undefined;
|
|
327
330
|
isMuted?: boolean | undefined;
|
|
328
331
|
}>>;
|
|
329
|
-
|
|
332
|
+
stats: {
|
|
333
|
+
open: boolean;
|
|
334
|
+
panels: number;
|
|
335
|
+
};
|
|
330
336
|
currentChartType: import("../element/types").ChartType;
|
|
331
337
|
pasteDialog: {
|
|
332
338
|
shown: false;
|
|
@@ -347,7 +353,7 @@ export declare const actionDeleteSelected: {
|
|
|
347
353
|
userToFollow: import("../types").UserToFollow | null;
|
|
348
354
|
followedBy: Set<import("../types").SocketId>;
|
|
349
355
|
};
|
|
350
|
-
storeAction:
|
|
356
|
+
storeAction: "capture";
|
|
351
357
|
} | {
|
|
352
358
|
elements: ExcalidrawElement[];
|
|
353
359
|
appState: {
|
|
@@ -474,7 +480,10 @@ export declare const actionDeleteSelected: {
|
|
|
474
480
|
isSpeaking?: boolean | undefined;
|
|
475
481
|
isMuted?: boolean | undefined;
|
|
476
482
|
}>>;
|
|
477
|
-
|
|
483
|
+
stats: {
|
|
484
|
+
open: boolean;
|
|
485
|
+
panels: number;
|
|
486
|
+
};
|
|
478
487
|
currentChartType: import("../element/types").ChartType;
|
|
479
488
|
pasteDialog: {
|
|
480
489
|
shown: false;
|
|
@@ -495,7 +504,7 @@ export declare const actionDeleteSelected: {
|
|
|
495
504
|
userToFollow: import("../types").UserToFollow | null;
|
|
496
505
|
followedBy: Set<import("../types").SocketId>;
|
|
497
506
|
};
|
|
498
|
-
storeAction:
|
|
507
|
+
storeAction: "none" | "capture";
|
|
499
508
|
};
|
|
500
509
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean;
|
|
501
510
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
@@ -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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
3
3
|
export declare const actionToggleElementLock: {
|
|
4
4
|
name: "toggleElementLock";
|
|
5
5
|
label: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>, app: import("../types").AppClassProperties) => "labels.elementLock.unlock" | "labels.elementLock.lock" | "labels.elementLock.lockAll" | "labels.elementLock.unlockAll";
|
|
@@ -142,7 +142,10 @@ export declare const actionToggleElementLock: {
|
|
|
142
142
|
isSpeaking?: boolean | undefined;
|
|
143
143
|
isMuted?: boolean | undefined;
|
|
144
144
|
}>>;
|
|
145
|
-
|
|
145
|
+
stats: {
|
|
146
|
+
open: boolean;
|
|
147
|
+
panels: number;
|
|
148
|
+
};
|
|
146
149
|
currentChartType: import("../element/types").ChartType;
|
|
147
150
|
pasteDialog: {
|
|
148
151
|
shown: false;
|
|
@@ -162,7 +165,7 @@ export declare const actionToggleElementLock: {
|
|
|
162
165
|
userToFollow: import("../types").UserToFollow | null;
|
|
163
166
|
followedBy: Set<import("../types").SocketId>;
|
|
164
167
|
};
|
|
165
|
-
storeAction:
|
|
168
|
+
storeAction: "capture";
|
|
166
169
|
};
|
|
167
170
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
|
|
168
171
|
} & {
|
|
@@ -310,7 +313,10 @@ export declare const actionUnlockAllElements: {
|
|
|
310
313
|
isSpeaking?: boolean | undefined;
|
|
311
314
|
isMuted?: boolean | undefined;
|
|
312
315
|
}>>;
|
|
313
|
-
|
|
316
|
+
stats: {
|
|
317
|
+
open: boolean;
|
|
318
|
+
panels: number;
|
|
319
|
+
};
|
|
314
320
|
currentChartType: import("../element/types").ChartType;
|
|
315
321
|
pasteDialog: {
|
|
316
322
|
shown: false;
|
|
@@ -331,7 +337,7 @@ export declare const actionUnlockAllElements: {
|
|
|
331
337
|
userToFollow: import("../types").UserToFollow | null;
|
|
332
338
|
followedBy: Set<import("../types").SocketId>;
|
|
333
339
|
};
|
|
334
|
-
storeAction:
|
|
340
|
+
storeAction: "capture";
|
|
335
341
|
};
|
|
336
342
|
label: string;
|
|
337
343
|
} & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Theme } from "../element/types";
|
|
2
|
+
import type { Theme } from "../element/types";
|
|
3
3
|
import "../components/ToolIcon.scss";
|
|
4
4
|
export declare const actionChangeProjectName: {
|
|
5
5
|
name: "changeProjectName";
|
|
@@ -137,7 +137,10 @@ export declare const actionChangeProjectName: {
|
|
|
137
137
|
isSpeaking?: boolean | undefined;
|
|
138
138
|
isMuted?: boolean | undefined;
|
|
139
139
|
}>>;
|
|
140
|
-
|
|
140
|
+
stats: {
|
|
141
|
+
open: boolean;
|
|
142
|
+
panels: number;
|
|
143
|
+
};
|
|
141
144
|
currentChartType: import("../element/types").ChartType;
|
|
142
145
|
pasteDialog: {
|
|
143
146
|
shown: false;
|
|
@@ -158,7 +161,7 @@ export declare const actionChangeProjectName: {
|
|
|
158
161
|
userToFollow: import("../types").UserToFollow | null;
|
|
159
162
|
followedBy: Set<import("../types").SocketId>;
|
|
160
163
|
};
|
|
161
|
-
storeAction:
|
|
164
|
+
storeAction: "none";
|
|
162
165
|
};
|
|
163
166
|
PanelComponent: ({ appState, updateData, appProps, data, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
164
167
|
} & {
|
|
@@ -303,7 +306,10 @@ export declare const actionChangeExportScale: {
|
|
|
303
306
|
isSpeaking?: boolean | undefined;
|
|
304
307
|
isMuted?: boolean | undefined;
|
|
305
308
|
}>>;
|
|
306
|
-
|
|
309
|
+
stats: {
|
|
310
|
+
open: boolean;
|
|
311
|
+
panels: number;
|
|
312
|
+
};
|
|
307
313
|
currentChartType: import("../element/types").ChartType;
|
|
308
314
|
pasteDialog: {
|
|
309
315
|
shown: false;
|
|
@@ -324,7 +330,7 @@ export declare const actionChangeExportScale: {
|
|
|
324
330
|
userToFollow: import("../types").UserToFollow | null;
|
|
325
331
|
followedBy: Set<import("../types").SocketId>;
|
|
326
332
|
};
|
|
327
|
-
storeAction:
|
|
333
|
+
storeAction: "none";
|
|
328
334
|
};
|
|
329
335
|
PanelComponent: ({ elements: allElements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
330
336
|
} & {
|
|
@@ -469,7 +475,10 @@ export declare const actionChangeExportBackground: {
|
|
|
469
475
|
isSpeaking?: boolean | undefined;
|
|
470
476
|
isMuted?: boolean | undefined;
|
|
471
477
|
}>>;
|
|
472
|
-
|
|
478
|
+
stats: {
|
|
479
|
+
open: boolean;
|
|
480
|
+
panels: number;
|
|
481
|
+
};
|
|
473
482
|
currentChartType: import("../element/types").ChartType;
|
|
474
483
|
pasteDialog: {
|
|
475
484
|
shown: false;
|
|
@@ -490,7 +499,7 @@ export declare const actionChangeExportBackground: {
|
|
|
490
499
|
userToFollow: import("../types").UserToFollow | null;
|
|
491
500
|
followedBy: Set<import("../types").SocketId>;
|
|
492
501
|
};
|
|
493
|
-
storeAction:
|
|
502
|
+
storeAction: "none";
|
|
494
503
|
};
|
|
495
504
|
PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
496
505
|
} & {
|
|
@@ -635,7 +644,10 @@ export declare const actionChangeExportEmbedScene: {
|
|
|
635
644
|
isSpeaking?: boolean | undefined;
|
|
636
645
|
isMuted?: boolean | undefined;
|
|
637
646
|
}>>;
|
|
638
|
-
|
|
647
|
+
stats: {
|
|
648
|
+
open: boolean;
|
|
649
|
+
panels: number;
|
|
650
|
+
};
|
|
639
651
|
currentChartType: import("../element/types").ChartType;
|
|
640
652
|
pasteDialog: {
|
|
641
653
|
shown: false;
|
|
@@ -656,7 +668,7 @@ export declare const actionChangeExportEmbedScene: {
|
|
|
656
668
|
userToFollow: import("../types").UserToFollow | null;
|
|
657
669
|
followedBy: Set<import("../types").SocketId>;
|
|
658
670
|
};
|
|
659
|
-
storeAction:
|
|
671
|
+
storeAction: "none";
|
|
660
672
|
};
|
|
661
673
|
PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
662
674
|
} & {
|
|
@@ -671,7 +683,7 @@ export declare const actionSaveToActiveFile: {
|
|
|
671
683
|
};
|
|
672
684
|
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, props: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
673
685
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => Promise<{
|
|
674
|
-
storeAction:
|
|
686
|
+
storeAction: "none";
|
|
675
687
|
appState: {
|
|
676
688
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
677
689
|
toast: {
|
|
@@ -801,7 +813,10 @@ export declare const actionSaveToActiveFile: {
|
|
|
801
813
|
isSpeaking?: boolean | undefined;
|
|
802
814
|
isMuted?: boolean | undefined;
|
|
803
815
|
}>>;
|
|
804
|
-
|
|
816
|
+
stats: {
|
|
817
|
+
open: boolean;
|
|
818
|
+
panels: number;
|
|
819
|
+
};
|
|
805
820
|
currentChartType: import("../element/types").ChartType;
|
|
806
821
|
pasteDialog: {
|
|
807
822
|
shown: false;
|
|
@@ -823,7 +838,7 @@ export declare const actionSaveToActiveFile: {
|
|
|
823
838
|
followedBy: Set<import("../types").SocketId>;
|
|
824
839
|
};
|
|
825
840
|
} | {
|
|
826
|
-
storeAction:
|
|
841
|
+
storeAction: "none";
|
|
827
842
|
appState?: undefined;
|
|
828
843
|
}>;
|
|
829
844
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -839,7 +854,7 @@ export declare const actionSaveFileToDisk: {
|
|
|
839
854
|
category: "export";
|
|
840
855
|
};
|
|
841
856
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => Promise<{
|
|
842
|
-
storeAction:
|
|
857
|
+
storeAction: "none";
|
|
843
858
|
appState: {
|
|
844
859
|
openDialog: null;
|
|
845
860
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
@@ -958,7 +973,10 @@ export declare const actionSaveFileToDisk: {
|
|
|
958
973
|
isSpeaking?: boolean | undefined;
|
|
959
974
|
isMuted?: boolean | undefined;
|
|
960
975
|
}>>;
|
|
961
|
-
|
|
976
|
+
stats: {
|
|
977
|
+
open: boolean;
|
|
978
|
+
panels: number;
|
|
979
|
+
};
|
|
962
980
|
currentChartType: import("../element/types").ChartType;
|
|
963
981
|
pasteDialog: {
|
|
964
982
|
shown: false;
|
|
@@ -980,7 +998,7 @@ export declare const actionSaveFileToDisk: {
|
|
|
980
998
|
followedBy: Set<import("../types").SocketId>;
|
|
981
999
|
};
|
|
982
1000
|
} | {
|
|
983
|
-
storeAction:
|
|
1001
|
+
storeAction: "none";
|
|
984
1002
|
appState?: undefined;
|
|
985
1003
|
}>;
|
|
986
1004
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -1125,7 +1143,10 @@ export declare const actionLoadScene: {
|
|
|
1125
1143
|
isSpeaking?: boolean | undefined;
|
|
1126
1144
|
isMuted?: boolean | undefined;
|
|
1127
1145
|
}>>;
|
|
1128
|
-
|
|
1146
|
+
stats: {
|
|
1147
|
+
open: boolean;
|
|
1148
|
+
panels: number;
|
|
1149
|
+
};
|
|
1129
1150
|
currentChartType: import("../element/types").ChartType;
|
|
1130
1151
|
pasteDialog: {
|
|
1131
1152
|
shown: false;
|
|
@@ -1146,7 +1167,7 @@ export declare const actionLoadScene: {
|
|
|
1146
1167
|
followedBy: Set<import("../types").SocketId>;
|
|
1147
1168
|
};
|
|
1148
1169
|
files: import("../types").BinaryFiles;
|
|
1149
|
-
storeAction:
|
|
1170
|
+
storeAction: "capture";
|
|
1150
1171
|
} | {
|
|
1151
1172
|
elements: readonly import("../element/types").OrderedExcalidrawElement[];
|
|
1152
1173
|
appState: {
|
|
@@ -1280,7 +1301,10 @@ export declare const actionLoadScene: {
|
|
|
1280
1301
|
isSpeaking?: boolean | undefined;
|
|
1281
1302
|
isMuted?: boolean | undefined;
|
|
1282
1303
|
}>>;
|
|
1283
|
-
|
|
1304
|
+
stats: {
|
|
1305
|
+
open: boolean;
|
|
1306
|
+
panels: number;
|
|
1307
|
+
};
|
|
1284
1308
|
currentChartType: import("../element/types").ChartType;
|
|
1285
1309
|
pasteDialog: {
|
|
1286
1310
|
shown: false;
|
|
@@ -1302,7 +1326,7 @@ export declare const actionLoadScene: {
|
|
|
1302
1326
|
followedBy: Set<import("../types").SocketId>;
|
|
1303
1327
|
};
|
|
1304
1328
|
files: import("../types").BinaryFiles;
|
|
1305
|
-
storeAction:
|
|
1329
|
+
storeAction: "none";
|
|
1306
1330
|
}>;
|
|
1307
1331
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
1308
1332
|
} & {
|
|
@@ -1447,7 +1471,10 @@ export declare const actionExportWithDarkMode: {
|
|
|
1447
1471
|
isSpeaking?: boolean | undefined;
|
|
1448
1472
|
isMuted?: boolean | undefined;
|
|
1449
1473
|
}>>;
|
|
1450
|
-
|
|
1474
|
+
stats: {
|
|
1475
|
+
open: boolean;
|
|
1476
|
+
panels: number;
|
|
1477
|
+
};
|
|
1451
1478
|
currentChartType: import("../element/types").ChartType;
|
|
1452
1479
|
pasteDialog: {
|
|
1453
1480
|
shown: false;
|
|
@@ -1468,7 +1495,7 @@ export declare const actionExportWithDarkMode: {
|
|
|
1468
1495
|
userToFollow: import("../types").UserToFollow | null;
|
|
1469
1496
|
followedBy: Set<import("../types").SocketId>;
|
|
1470
1497
|
};
|
|
1471
|
-
storeAction:
|
|
1498
|
+
storeAction: "none";
|
|
1472
1499
|
};
|
|
1473
1500
|
PanelComponent: ({ appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
1474
1501
|
} & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
3
|
-
import { AppState } from "../types";
|
|
3
|
+
import type { AppState } from "../types";
|
|
4
4
|
export declare const actionFinalize: {
|
|
5
5
|
name: "finalize";
|
|
6
6
|
label: string;
|
|
@@ -139,7 +139,10 @@ export declare const actionFinalize: {
|
|
|
139
139
|
isSpeaking?: boolean | undefined;
|
|
140
140
|
isMuted?: boolean | undefined;
|
|
141
141
|
}>>;
|
|
142
|
-
|
|
142
|
+
stats: {
|
|
143
|
+
open: boolean;
|
|
144
|
+
panels: number;
|
|
145
|
+
};
|
|
143
146
|
currentChartType: import("../element/types").ChartType;
|
|
144
147
|
pasteDialog: {
|
|
145
148
|
shown: false;
|
|
@@ -159,7 +162,7 @@ export declare const actionFinalize: {
|
|
|
159
162
|
userToFollow: import("../types").UserToFollow | null;
|
|
160
163
|
followedBy: Set<import("../types").SocketId>;
|
|
161
164
|
};
|
|
162
|
-
storeAction:
|
|
165
|
+
storeAction: "capture";
|
|
163
166
|
} | {
|
|
164
167
|
elements: readonly import("../element/types").OrderedExcalidrawElement[];
|
|
165
168
|
appState: {
|
|
@@ -292,7 +295,10 @@ export declare const actionFinalize: {
|
|
|
292
295
|
isSpeaking?: boolean | undefined;
|
|
293
296
|
isMuted?: boolean | undefined;
|
|
294
297
|
}>>;
|
|
295
|
-
|
|
298
|
+
stats: {
|
|
299
|
+
open: boolean;
|
|
300
|
+
panels: number;
|
|
301
|
+
};
|
|
296
302
|
currentChartType: import("../element/types").ChartType;
|
|
297
303
|
pasteDialog: {
|
|
298
304
|
shown: false;
|
|
@@ -311,7 +317,7 @@ export declare const actionFinalize: {
|
|
|
311
317
|
userToFollow: import("../types").UserToFollow | null;
|
|
312
318
|
followedBy: Set<import("../types").SocketId>;
|
|
313
319
|
};
|
|
314
|
-
storeAction:
|
|
320
|
+
storeAction: "capture";
|
|
315
321
|
};
|
|
316
322
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState) => boolean;
|
|
317
323
|
PanelComponent: ({ appState, updateData, data }: import("./types").PanelComponentProps) => JSX.Element;
|
|
@@ -91,7 +91,7 @@ export const actionFinalize = register({
|
|
|
91
91
|
!isLoop &&
|
|
92
92
|
multiPointElement.points.length > 1) {
|
|
93
93
|
const [x, y] = LinearElementEditor.getPointAtIndexGlobalCoordinates(multiPointElement, -1, arrayToMap(elements));
|
|
94
|
-
maybeBindLinearElement(multiPointElement, appState, { x, y },
|
|
94
|
+
maybeBindLinearElement(multiPointElement, appState, { x, y }, elementsMap);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
if ((!appState.activeTool.locked &&
|
|
@@ -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 actionFlipHorizontal: {
|
|
5
5
|
name: "flipHorizontal";
|
|
6
6
|
label: string;
|
|
@@ -11,7 +11,7 @@ export declare const actionFlipHorizontal: {
|
|
|
11
11
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
12
12
|
elements: ExcalidrawElement[];
|
|
13
13
|
appState: Readonly<AppState>;
|
|
14
|
-
storeAction:
|
|
14
|
+
storeAction: "capture";
|
|
15
15
|
};
|
|
16
16
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
17
17
|
} & {
|
|
@@ -27,7 +27,7 @@ export declare const actionFlipVertical: {
|
|
|
27
27
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
28
28
|
elements: ExcalidrawElement[];
|
|
29
29
|
appState: Readonly<AppState>;
|
|
30
|
-
storeAction:
|
|
30
|
+
storeAction: "capture";
|
|
31
31
|
};
|
|
32
32
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
33
33
|
} & {
|
|
@@ -5,10 +5,11 @@ import { resizeMultipleElements } from "../element/resizeElements";
|
|
|
5
5
|
import { arrayToMap } from "../utils";
|
|
6
6
|
import { CODES, KEYS } from "../keys";
|
|
7
7
|
import { getCommonBoundingBox } from "../element/bounds";
|
|
8
|
-
import {
|
|
8
|
+
import { bindOrUnbindLinearElements, isBindingEnabled, } from "../element/binding";
|
|
9
9
|
import { updateFrameMembershipOfSelectedElements } from "../frame";
|
|
10
10
|
import { flipHorizontal, flipVertical } from "../components/icons";
|
|
11
11
|
import { StoreAction } from "../store";
|
|
12
|
+
import { isLinearElement } from "../element/typeChecks";
|
|
12
13
|
export const actionFlipHorizontal = register({
|
|
13
14
|
name: "flipHorizontal",
|
|
14
15
|
label: "labels.flipHorizontal",
|
|
@@ -42,15 +43,13 @@ const flipSelectedElements = (elements, elementsMap, appState, flipDirection, ap
|
|
|
42
43
|
includeBoundTextElement: true,
|
|
43
44
|
includeElementsInFrames: true,
|
|
44
45
|
});
|
|
45
|
-
const updatedElements = flipElements(selectedElements,
|
|
46
|
+
const updatedElements = flipElements(selectedElements, elementsMap, appState, flipDirection, app);
|
|
46
47
|
const updatedElementsMap = arrayToMap(updatedElements);
|
|
47
48
|
return elements.map((element) => updatedElementsMap.get(element.id) || element);
|
|
48
49
|
};
|
|
49
|
-
const flipElements = (selectedElements,
|
|
50
|
+
const flipElements = (selectedElements, elementsMap, appState, flipDirection, app) => {
|
|
50
51
|
const { minX, minY, maxX, maxY } = getCommonBoundingBox(selectedElements);
|
|
51
52
|
resizeMultipleElements(elementsMap, selectedElements, elementsMap, "nw", true, true, flipDirection === "horizontal" ? maxX : minX, flipDirection === "horizontal" ? minY : maxY);
|
|
52
|
-
isBindingEnabled(appState)
|
|
53
|
-
? bindOrUnbindSelectedElements(selectedElements, app)
|
|
54
|
-
: unbindLinearElements(selectedElements, elementsMap);
|
|
53
|
+
bindOrUnbindLinearElements(selectedElements.filter(isLinearElement), elementsMap, isBindingEnabled(appState), []);
|
|
55
54
|
return selectedElements;
|
|
56
55
|
};
|