@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 { AppClassProperties, AppState, Primitive } from "../types";
|
|
3
|
-
import { Arrowhead, ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
|
|
2
|
+
import type { AppClassProperties, AppState, Primitive } from "../types";
|
|
3
|
+
import type { Arrowhead, ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
|
|
4
4
|
export declare const changeProperty: (elements: readonly ExcalidrawElement[], appState: AppState, callback: (element: ExcalidrawElement) => ExcalidrawElement, includeBoundText?: boolean) => ExcalidrawElement[];
|
|
5
5
|
export declare const getFormValue: <T extends Primitive>(elements: readonly ExcalidrawElement[], appState: AppState, getAttribute: (element: ExcalidrawElement) => T, isRelevantElement: true | ((element: ExcalidrawElement) => boolean), defaultValue: T | ((isSomeElementSelected: boolean) => T)) => T;
|
|
6
6
|
export declare const actionChangeStrokeColor: {
|
|
@@ -158,7 +158,10 @@ export declare const actionChangeFillStyle: {
|
|
|
158
158
|
isSpeaking?: boolean | undefined;
|
|
159
159
|
isMuted?: boolean | undefined;
|
|
160
160
|
}>>;
|
|
161
|
-
|
|
161
|
+
stats: {
|
|
162
|
+
open: boolean;
|
|
163
|
+
panels: number;
|
|
164
|
+
};
|
|
162
165
|
currentChartType: import("../element/types").ChartType;
|
|
163
166
|
pasteDialog: {
|
|
164
167
|
shown: false;
|
|
@@ -179,7 +182,7 @@ export declare const actionChangeFillStyle: {
|
|
|
179
182
|
userToFollow: import("../types").UserToFollow | null;
|
|
180
183
|
followedBy: Set<import("../types").SocketId>;
|
|
181
184
|
};
|
|
182
|
-
storeAction:
|
|
185
|
+
storeAction: "capture";
|
|
183
186
|
};
|
|
184
187
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
185
188
|
} & {
|
|
@@ -322,7 +325,10 @@ export declare const actionChangeStrokeWidth: {
|
|
|
322
325
|
isSpeaking?: boolean | undefined;
|
|
323
326
|
isMuted?: boolean | undefined;
|
|
324
327
|
}>>;
|
|
325
|
-
|
|
328
|
+
stats: {
|
|
329
|
+
open: boolean;
|
|
330
|
+
panels: number;
|
|
331
|
+
};
|
|
326
332
|
currentChartType: import("../element/types").ChartType;
|
|
327
333
|
pasteDialog: {
|
|
328
334
|
shown: false;
|
|
@@ -343,7 +349,7 @@ export declare const actionChangeStrokeWidth: {
|
|
|
343
349
|
userToFollow: import("../types").UserToFollow | null;
|
|
344
350
|
followedBy: Set<import("../types").SocketId>;
|
|
345
351
|
};
|
|
346
|
-
storeAction:
|
|
352
|
+
storeAction: "capture";
|
|
347
353
|
};
|
|
348
354
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
349
355
|
} & {
|
|
@@ -486,7 +492,10 @@ export declare const actionChangeSloppiness: {
|
|
|
486
492
|
isSpeaking?: boolean | undefined;
|
|
487
493
|
isMuted?: boolean | undefined;
|
|
488
494
|
}>>;
|
|
489
|
-
|
|
495
|
+
stats: {
|
|
496
|
+
open: boolean;
|
|
497
|
+
panels: number;
|
|
498
|
+
};
|
|
490
499
|
currentChartType: import("../element/types").ChartType;
|
|
491
500
|
pasteDialog: {
|
|
492
501
|
shown: false;
|
|
@@ -507,7 +516,7 @@ export declare const actionChangeSloppiness: {
|
|
|
507
516
|
userToFollow: import("../types").UserToFollow | null;
|
|
508
517
|
followedBy: Set<import("../types").SocketId>;
|
|
509
518
|
};
|
|
510
|
-
storeAction:
|
|
519
|
+
storeAction: "capture";
|
|
511
520
|
};
|
|
512
521
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
513
522
|
} & {
|
|
@@ -650,7 +659,10 @@ export declare const actionChangeStrokeStyle: {
|
|
|
650
659
|
isSpeaking?: boolean | undefined;
|
|
651
660
|
isMuted?: boolean | undefined;
|
|
652
661
|
}>>;
|
|
653
|
-
|
|
662
|
+
stats: {
|
|
663
|
+
open: boolean;
|
|
664
|
+
panels: number;
|
|
665
|
+
};
|
|
654
666
|
currentChartType: import("../element/types").ChartType;
|
|
655
667
|
pasteDialog: {
|
|
656
668
|
shown: false;
|
|
@@ -671,7 +683,7 @@ export declare const actionChangeStrokeStyle: {
|
|
|
671
683
|
userToFollow: import("../types").UserToFollow | null;
|
|
672
684
|
followedBy: Set<import("../types").SocketId>;
|
|
673
685
|
};
|
|
674
|
-
storeAction:
|
|
686
|
+
storeAction: "capture";
|
|
675
687
|
};
|
|
676
688
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
677
689
|
} & {
|
|
@@ -814,7 +826,10 @@ export declare const actionChangeOpacity: {
|
|
|
814
826
|
isSpeaking?: boolean | undefined;
|
|
815
827
|
isMuted?: boolean | undefined;
|
|
816
828
|
}>>;
|
|
817
|
-
|
|
829
|
+
stats: {
|
|
830
|
+
open: boolean;
|
|
831
|
+
panels: number;
|
|
832
|
+
};
|
|
818
833
|
currentChartType: import("../element/types").ChartType;
|
|
819
834
|
pasteDialog: {
|
|
820
835
|
shown: false;
|
|
@@ -835,7 +850,7 @@ export declare const actionChangeOpacity: {
|
|
|
835
850
|
userToFollow: import("../types").UserToFollow | null;
|
|
836
851
|
followedBy: Set<import("../types").SocketId>;
|
|
837
852
|
};
|
|
838
|
-
storeAction:
|
|
853
|
+
storeAction: "capture";
|
|
839
854
|
};
|
|
840
855
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
841
856
|
} & {
|
|
@@ -978,7 +993,10 @@ export declare const actionChangeFontSize: {
|
|
|
978
993
|
isSpeaking?: boolean | undefined;
|
|
979
994
|
isMuted?: boolean | undefined;
|
|
980
995
|
}>>;
|
|
981
|
-
|
|
996
|
+
stats: {
|
|
997
|
+
open: boolean;
|
|
998
|
+
panels: number;
|
|
999
|
+
};
|
|
982
1000
|
currentChartType: import("../element/types").ChartType;
|
|
983
1001
|
pasteDialog: {
|
|
984
1002
|
shown: false;
|
|
@@ -999,7 +1017,7 @@ export declare const actionChangeFontSize: {
|
|
|
999
1017
|
userToFollow: import("../types").UserToFollow | null;
|
|
1000
1018
|
followedBy: Set<import("../types").SocketId>;
|
|
1001
1019
|
};
|
|
1002
|
-
storeAction:
|
|
1020
|
+
storeAction: "capture";
|
|
1003
1021
|
};
|
|
1004
1022
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
1005
1023
|
} & {
|
|
@@ -1143,7 +1161,10 @@ export declare const actionDecreaseFontSize: {
|
|
|
1143
1161
|
isSpeaking?: boolean | undefined;
|
|
1144
1162
|
isMuted?: boolean | undefined;
|
|
1145
1163
|
}>>;
|
|
1146
|
-
|
|
1164
|
+
stats: {
|
|
1165
|
+
open: boolean;
|
|
1166
|
+
panels: number;
|
|
1167
|
+
};
|
|
1147
1168
|
currentChartType: import("../element/types").ChartType;
|
|
1148
1169
|
pasteDialog: {
|
|
1149
1170
|
shown: false;
|
|
@@ -1164,7 +1185,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
1164
1185
|
userToFollow: import("../types").UserToFollow | null;
|
|
1165
1186
|
followedBy: Set<import("../types").SocketId>;
|
|
1166
1187
|
};
|
|
1167
|
-
storeAction:
|
|
1188
|
+
storeAction: "capture";
|
|
1168
1189
|
};
|
|
1169
1190
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
1170
1191
|
} & {
|
|
@@ -1308,7 +1329,10 @@ export declare const actionIncreaseFontSize: {
|
|
|
1308
1329
|
isSpeaking?: boolean | undefined;
|
|
1309
1330
|
isMuted?: boolean | undefined;
|
|
1310
1331
|
}>>;
|
|
1311
|
-
|
|
1332
|
+
stats: {
|
|
1333
|
+
open: boolean;
|
|
1334
|
+
panels: number;
|
|
1335
|
+
};
|
|
1312
1336
|
currentChartType: import("../element/types").ChartType;
|
|
1313
1337
|
pasteDialog: {
|
|
1314
1338
|
shown: false;
|
|
@@ -1329,7 +1353,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
1329
1353
|
userToFollow: import("../types").UserToFollow | null;
|
|
1330
1354
|
followedBy: Set<import("../types").SocketId>;
|
|
1331
1355
|
};
|
|
1332
|
-
storeAction:
|
|
1356
|
+
storeAction: "capture";
|
|
1333
1357
|
};
|
|
1334
1358
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
1335
1359
|
} & {
|
|
@@ -1472,7 +1496,10 @@ export declare const actionChangeFontFamily: {
|
|
|
1472
1496
|
isSpeaking?: boolean | undefined;
|
|
1473
1497
|
isMuted?: boolean | undefined;
|
|
1474
1498
|
}>>;
|
|
1475
|
-
|
|
1499
|
+
stats: {
|
|
1500
|
+
open: boolean;
|
|
1501
|
+
panels: number;
|
|
1502
|
+
};
|
|
1476
1503
|
currentChartType: import("../element/types").ChartType;
|
|
1477
1504
|
pasteDialog: {
|
|
1478
1505
|
shown: false;
|
|
@@ -1493,7 +1520,7 @@ export declare const actionChangeFontFamily: {
|
|
|
1493
1520
|
userToFollow: import("../types").UserToFollow | null;
|
|
1494
1521
|
followedBy: Set<import("../types").SocketId>;
|
|
1495
1522
|
};
|
|
1496
|
-
storeAction:
|
|
1523
|
+
storeAction: "capture";
|
|
1497
1524
|
};
|
|
1498
1525
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
1499
1526
|
} & {
|
|
@@ -1636,7 +1663,10 @@ export declare const actionChangeTextAlign: {
|
|
|
1636
1663
|
isSpeaking?: boolean | undefined;
|
|
1637
1664
|
isMuted?: boolean | undefined;
|
|
1638
1665
|
}>>;
|
|
1639
|
-
|
|
1666
|
+
stats: {
|
|
1667
|
+
open: boolean;
|
|
1668
|
+
panels: number;
|
|
1669
|
+
};
|
|
1640
1670
|
currentChartType: import("../element/types").ChartType;
|
|
1641
1671
|
pasteDialog: {
|
|
1642
1672
|
shown: false;
|
|
@@ -1657,7 +1687,7 @@ export declare const actionChangeTextAlign: {
|
|
|
1657
1687
|
userToFollow: import("../types").UserToFollow | null;
|
|
1658
1688
|
followedBy: Set<import("../types").SocketId>;
|
|
1659
1689
|
};
|
|
1660
|
-
storeAction:
|
|
1690
|
+
storeAction: "capture";
|
|
1661
1691
|
};
|
|
1662
1692
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
1663
1693
|
} & {
|
|
@@ -1802,7 +1832,10 @@ export declare const actionChangeVerticalAlign: {
|
|
|
1802
1832
|
isSpeaking?: boolean | undefined;
|
|
1803
1833
|
isMuted?: boolean | undefined;
|
|
1804
1834
|
}>>;
|
|
1805
|
-
|
|
1835
|
+
stats: {
|
|
1836
|
+
open: boolean;
|
|
1837
|
+
panels: number;
|
|
1838
|
+
};
|
|
1806
1839
|
currentChartType: import("../element/types").ChartType;
|
|
1807
1840
|
pasteDialog: {
|
|
1808
1841
|
shown: false;
|
|
@@ -1823,7 +1856,7 @@ export declare const actionChangeVerticalAlign: {
|
|
|
1823
1856
|
userToFollow: import("../types").UserToFollow | null;
|
|
1824
1857
|
followedBy: Set<import("../types").SocketId>;
|
|
1825
1858
|
};
|
|
1826
|
-
storeAction:
|
|
1859
|
+
storeAction: "capture";
|
|
1827
1860
|
};
|
|
1828
1861
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
1829
1862
|
} & {
|
|
@@ -1966,7 +1999,10 @@ export declare const actionChangeRoundness: {
|
|
|
1966
1999
|
isSpeaking?: boolean | undefined;
|
|
1967
2000
|
isMuted?: boolean | undefined;
|
|
1968
2001
|
}>>;
|
|
1969
|
-
|
|
2002
|
+
stats: {
|
|
2003
|
+
open: boolean;
|
|
2004
|
+
panels: number;
|
|
2005
|
+
};
|
|
1970
2006
|
currentChartType: import("../element/types").ChartType;
|
|
1971
2007
|
pasteDialog: {
|
|
1972
2008
|
shown: false;
|
|
@@ -1987,7 +2023,7 @@ export declare const actionChangeRoundness: {
|
|
|
1987
2023
|
userToFollow: import("../types").UserToFollow | null;
|
|
1988
2024
|
followedBy: Set<import("../types").SocketId>;
|
|
1989
2025
|
};
|
|
1990
|
-
storeAction:
|
|
2026
|
+
storeAction: "capture";
|
|
1991
2027
|
};
|
|
1992
2028
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
1993
2029
|
} & {
|
|
@@ -2133,7 +2169,10 @@ export declare const actionChangeArrowhead: {
|
|
|
2133
2169
|
isSpeaking?: boolean | undefined;
|
|
2134
2170
|
isMuted?: boolean | undefined;
|
|
2135
2171
|
}>>;
|
|
2136
|
-
|
|
2172
|
+
stats: {
|
|
2173
|
+
open: boolean;
|
|
2174
|
+
panels: number;
|
|
2175
|
+
};
|
|
2137
2176
|
currentChartType: import("../element/types").ChartType;
|
|
2138
2177
|
pasteDialog: {
|
|
2139
2178
|
shown: false;
|
|
@@ -2154,7 +2193,7 @@ export declare const actionChangeArrowhead: {
|
|
|
2154
2193
|
userToFollow: import("../types").UserToFollow | null;
|
|
2155
2194
|
followedBy: Set<import("../types").SocketId>;
|
|
2156
2195
|
};
|
|
2157
|
-
storeAction:
|
|
2196
|
+
storeAction: "capture";
|
|
2158
2197
|
};
|
|
2159
2198
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
2160
2199
|
} & {
|
|
@@ -60,7 +60,7 @@ export const getFormValue = function (elements, appState, getAttribute, isReleva
|
|
|
60
60
|
return ret;
|
|
61
61
|
};
|
|
62
62
|
const offsetElementAfterFontResize = (prevElement, nextElement) => {
|
|
63
|
-
if (isBoundToContainer(nextElement)) {
|
|
63
|
+
if (isBoundToContainer(nextElement) || !nextElement.autoResize) {
|
|
64
64
|
return nextElement;
|
|
65
65
|
}
|
|
66
66
|
return mutateElement(nextElement, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ExcalidrawElement } from "../element/types";
|
|
2
|
+
import type { ExcalidrawElement } from "../element/types";
|
|
3
3
|
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
4
4
|
export declare const actionSelectAll: {
|
|
5
5
|
name: "selectAll";
|
|
@@ -142,7 +142,10 @@ export declare const actionSelectAll: {
|
|
|
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 actionSelectAll: {
|
|
|
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>) => boolean;
|
|
168
171
|
} & {
|
|
@@ -137,7 +137,10 @@ export declare const actionCopyStyles: {
|
|
|
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 actionCopyStyles: {
|
|
|
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
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
164
167
|
} & {
|
|
@@ -173,7 +176,10 @@ export declare const actionPasteStyles: {
|
|
|
173
176
|
};
|
|
174
177
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, formData: any, app: import("../types").AppClassProperties) => {
|
|
175
178
|
elements: readonly import("../element/types").OrderedExcalidrawElement[];
|
|
176
|
-
storeAction:
|
|
179
|
+
storeAction: "none";
|
|
180
|
+
} | {
|
|
181
|
+
elements: import("../element/types").OrderedExcalidrawElement[];
|
|
182
|
+
storeAction: "capture";
|
|
177
183
|
};
|
|
178
184
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
179
185
|
} & {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AppClassProperties } from "../types";
|
|
2
|
+
export declare const actionTextAutoResize: {
|
|
3
|
+
name: "autoResize";
|
|
4
|
+
label: string;
|
|
5
|
+
icon: null;
|
|
6
|
+
trackEvent: {
|
|
7
|
+
category: "element";
|
|
8
|
+
};
|
|
9
|
+
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
10
|
+
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: AppClassProperties) => {
|
|
11
|
+
appState: Readonly<import("../types").AppState>;
|
|
12
|
+
elements: import("../element/types").OrderedExcalidrawElement[];
|
|
13
|
+
storeAction: "capture";
|
|
14
|
+
};
|
|
15
|
+
} & {
|
|
16
|
+
keyTest?: undefined;
|
|
17
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { isTextElement } from "../element";
|
|
2
|
+
import { newElementWith } from "../element/mutateElement";
|
|
3
|
+
import { measureText } from "../element/textElement";
|
|
4
|
+
import { getSelectedElements } from "../scene";
|
|
5
|
+
import { StoreAction } from "../store";
|
|
6
|
+
import { getFontString } from "../utils";
|
|
7
|
+
import { register } from "./register";
|
|
8
|
+
export const actionTextAutoResize = register({
|
|
9
|
+
name: "autoResize",
|
|
10
|
+
label: "labels.autoResize",
|
|
11
|
+
icon: null,
|
|
12
|
+
trackEvent: { category: "element" },
|
|
13
|
+
predicate: (elements, appState, _, app) => {
|
|
14
|
+
const selectedElements = getSelectedElements(elements, appState);
|
|
15
|
+
return (selectedElements.length === 1 &&
|
|
16
|
+
isTextElement(selectedElements[0]) &&
|
|
17
|
+
!selectedElements[0].autoResize);
|
|
18
|
+
},
|
|
19
|
+
perform: (elements, appState, _, app) => {
|
|
20
|
+
const selectedElements = getSelectedElements(elements, appState);
|
|
21
|
+
return {
|
|
22
|
+
appState,
|
|
23
|
+
elements: elements.map((element) => {
|
|
24
|
+
if (element.id === selectedElements[0].id && isTextElement(element)) {
|
|
25
|
+
const metrics = measureText(element.originalText, getFontString(element), element.lineHeight);
|
|
26
|
+
return newElementWith(element, {
|
|
27
|
+
autoResize: true,
|
|
28
|
+
width: metrics.width,
|
|
29
|
+
height: metrics.height,
|
|
30
|
+
text: element.originalText,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return element;
|
|
34
|
+
}),
|
|
35
|
+
storeAction: StoreAction.CAPTURE,
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AppState } from "../types";
|
|
2
|
+
import type { AppState } from "../types";
|
|
3
3
|
export declare const actionToggleGridMode: {
|
|
4
4
|
name: "gridMode";
|
|
5
5
|
icon: JSX.Element;
|
|
@@ -143,7 +143,10 @@ export declare const actionToggleGridMode: {
|
|
|
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;
|
|
@@ -163,7 +166,7 @@ export declare const actionToggleGridMode: {
|
|
|
163
166
|
userToFollow: import("../types").UserToFollow | null;
|
|
164
167
|
followedBy: Set<import("../types").SocketId>;
|
|
165
168
|
};
|
|
166
|
-
storeAction:
|
|
169
|
+
storeAction: "none";
|
|
167
170
|
};
|
|
168
171
|
checked: (appState: AppState) => boolean;
|
|
169
172
|
predicate: (element: readonly import("../element/types").ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps) => boolean;
|
|
@@ -141,7 +141,10 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
141
141
|
isSpeaking?: boolean | undefined;
|
|
142
142
|
isMuted?: boolean | undefined;
|
|
143
143
|
}>>;
|
|
144
|
-
|
|
144
|
+
stats: {
|
|
145
|
+
open: boolean;
|
|
146
|
+
panels: number;
|
|
147
|
+
};
|
|
145
148
|
currentChartType: import("../element/types").ChartType;
|
|
146
149
|
pasteDialog: {
|
|
147
150
|
shown: false;
|
|
@@ -161,7 +164,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
161
164
|
userToFollow: import("../types").UserToFollow | null;
|
|
162
165
|
followedBy: Set<import("../types").SocketId>;
|
|
163
166
|
};
|
|
164
|
-
storeAction:
|
|
167
|
+
storeAction: "none";
|
|
165
168
|
};
|
|
166
169
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
167
170
|
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
@@ -8,9 +8,13 @@ export declare const actionToggleStats: {
|
|
|
8
8
|
trackEvent: {
|
|
9
9
|
category: "menu";
|
|
10
10
|
};
|
|
11
|
+
keywords: string[];
|
|
11
12
|
perform(elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
12
13
|
appState: {
|
|
13
|
-
|
|
14
|
+
stats: {
|
|
15
|
+
open: boolean;
|
|
16
|
+
panels: number;
|
|
17
|
+
};
|
|
14
18
|
contextMenu: {
|
|
15
19
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
16
20
|
top: number;
|
|
@@ -161,7 +165,7 @@ export declare const actionToggleStats: {
|
|
|
161
165
|
userToFollow: import("../types").UserToFollow | null;
|
|
162
166
|
followedBy: Set<import("../types").SocketId>;
|
|
163
167
|
};
|
|
164
|
-
storeAction:
|
|
168
|
+
storeAction: "none";
|
|
165
169
|
};
|
|
166
170
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
167
171
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -4,20 +4,21 @@ import { abacusIcon } from "../components/icons";
|
|
|
4
4
|
import { StoreAction } from "../store";
|
|
5
5
|
export const actionToggleStats = register({
|
|
6
6
|
name: "stats",
|
|
7
|
-
label: "stats.
|
|
7
|
+
label: "stats.fullTitle",
|
|
8
8
|
icon: abacusIcon,
|
|
9
9
|
paletteName: "Toggle stats",
|
|
10
10
|
viewMode: true,
|
|
11
11
|
trackEvent: { category: "menu" },
|
|
12
|
+
keywords: ["edit", "attributes", "customize"],
|
|
12
13
|
perform(elements, appState) {
|
|
13
14
|
return {
|
|
14
15
|
appState: {
|
|
15
16
|
...appState,
|
|
16
|
-
|
|
17
|
+
stats: { ...appState.stats, open: !this.checked(appState) },
|
|
17
18
|
},
|
|
18
19
|
storeAction: StoreAction.NONE,
|
|
19
20
|
};
|
|
20
21
|
},
|
|
21
|
-
checked: (appState) => appState.
|
|
22
|
+
checked: (appState) => appState.stats.open,
|
|
22
23
|
keyTest: (event) => !event[KEYS.CTRL_OR_CMD] && event.altKey && event.code === CODES.SLASH,
|
|
23
24
|
});
|
|
@@ -141,7 +141,10 @@ export declare const actionToggleViewMode: {
|
|
|
141
141
|
isSpeaking?: boolean | undefined;
|
|
142
142
|
isMuted?: boolean | undefined;
|
|
143
143
|
}>>;
|
|
144
|
-
|
|
144
|
+
stats: {
|
|
145
|
+
open: boolean;
|
|
146
|
+
panels: number;
|
|
147
|
+
};
|
|
145
148
|
currentChartType: import("../element/types").ChartType;
|
|
146
149
|
pasteDialog: {
|
|
147
150
|
shown: false;
|
|
@@ -162,7 +165,7 @@ export declare const actionToggleViewMode: {
|
|
|
162
165
|
userToFollow: import("../types").UserToFollow | null;
|
|
163
166
|
followedBy: Set<import("../types").SocketId>;
|
|
164
167
|
};
|
|
165
|
-
storeAction:
|
|
168
|
+
storeAction: "none";
|
|
166
169
|
};
|
|
167
170
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
168
171
|
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
@@ -141,7 +141,10 @@ export declare const actionToggleZenMode: {
|
|
|
141
141
|
isSpeaking?: boolean | undefined;
|
|
142
142
|
isMuted?: boolean | undefined;
|
|
143
143
|
}>>;
|
|
144
|
-
|
|
144
|
+
stats: {
|
|
145
|
+
open: boolean;
|
|
146
|
+
panels: number;
|
|
147
|
+
};
|
|
145
148
|
currentChartType: import("../element/types").ChartType;
|
|
146
149
|
pasteDialog: {
|
|
147
150
|
shown: false;
|
|
@@ -162,7 +165,7 @@ export declare const actionToggleZenMode: {
|
|
|
162
165
|
userToFollow: import("../types").UserToFollow | null;
|
|
163
166
|
followedBy: Set<import("../types").SocketId>;
|
|
164
167
|
};
|
|
165
|
-
storeAction:
|
|
168
|
+
storeAction: "none";
|
|
166
169
|
};
|
|
167
170
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
168
171
|
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export declare const actionSendBackward: {
|
|
3
3
|
name: "sendBackward";
|
|
4
4
|
label: string;
|
|
5
|
+
keywords: string[];
|
|
5
6
|
icon: JSX.Element;
|
|
6
7
|
trackEvent: {
|
|
7
8
|
category: "element";
|
|
@@ -9,7 +10,7 @@ export declare const actionSendBackward: {
|
|
|
9
10
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
10
11
|
elements: readonly import("../element/types").ExcalidrawElement[];
|
|
11
12
|
appState: Readonly<import("../types").AppState>;
|
|
12
|
-
storeAction:
|
|
13
|
+
storeAction: "capture";
|
|
13
14
|
};
|
|
14
15
|
keyPriority: number;
|
|
15
16
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -20,6 +21,7 @@ export declare const actionSendBackward: {
|
|
|
20
21
|
export declare const actionBringForward: {
|
|
21
22
|
name: "bringForward";
|
|
22
23
|
label: string;
|
|
24
|
+
keywords: string[];
|
|
23
25
|
icon: JSX.Element;
|
|
24
26
|
trackEvent: {
|
|
25
27
|
category: "element";
|
|
@@ -27,7 +29,7 @@ export declare const actionBringForward: {
|
|
|
27
29
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
28
30
|
elements: readonly import("../element/types").ExcalidrawElement[];
|
|
29
31
|
appState: Readonly<import("../types").AppState>;
|
|
30
|
-
storeAction:
|
|
32
|
+
storeAction: "capture";
|
|
31
33
|
};
|
|
32
34
|
keyPriority: number;
|
|
33
35
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
@@ -38,6 +40,7 @@ export declare const actionBringForward: {
|
|
|
38
40
|
export declare const actionSendToBack: {
|
|
39
41
|
name: "sendToBack";
|
|
40
42
|
label: string;
|
|
43
|
+
keywords: string[];
|
|
41
44
|
icon: JSX.Element;
|
|
42
45
|
trackEvent: {
|
|
43
46
|
category: "element";
|
|
@@ -45,7 +48,7 @@ export declare const actionSendToBack: {
|
|
|
45
48
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
46
49
|
elements: readonly import("../element/types").ExcalidrawElement[] | import("../element/types").ExcalidrawElement[];
|
|
47
50
|
appState: Readonly<import("../types").AppState>;
|
|
48
|
-
storeAction:
|
|
51
|
+
storeAction: "capture";
|
|
49
52
|
};
|
|
50
53
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
51
54
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => JSX.Element;
|
|
@@ -55,6 +58,7 @@ export declare const actionSendToBack: {
|
|
|
55
58
|
export declare const actionBringToFront: {
|
|
56
59
|
name: "bringToFront";
|
|
57
60
|
label: string;
|
|
61
|
+
keywords: string[];
|
|
58
62
|
icon: JSX.Element;
|
|
59
63
|
trackEvent: {
|
|
60
64
|
category: "element";
|
|
@@ -62,7 +66,7 @@ export declare const actionBringToFront: {
|
|
|
62
66
|
perform: (elements: readonly import("../element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
63
67
|
elements: readonly import("../element/types").ExcalidrawElement[] | import("../element/types").ExcalidrawElement[];
|
|
64
68
|
appState: Readonly<import("../types").AppState>;
|
|
65
|
-
storeAction:
|
|
69
|
+
storeAction: "capture";
|
|
66
70
|
};
|
|
67
71
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
68
72
|
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => JSX.Element;
|
|
@@ -10,6 +10,7 @@ import { StoreAction } from "../store";
|
|
|
10
10
|
export const actionSendBackward = register({
|
|
11
11
|
name: "sendBackward",
|
|
12
12
|
label: "labels.sendBackward",
|
|
13
|
+
keywords: ["move down", "zindex", "layer"],
|
|
13
14
|
icon: SendBackwardIcon,
|
|
14
15
|
trackEvent: { category: "element" },
|
|
15
16
|
perform: (elements, appState) => {
|
|
@@ -28,6 +29,7 @@ export const actionSendBackward = register({
|
|
|
28
29
|
export const actionBringForward = register({
|
|
29
30
|
name: "bringForward",
|
|
30
31
|
label: "labels.bringForward",
|
|
32
|
+
keywords: ["move up", "zindex", "layer"],
|
|
31
33
|
icon: BringForwardIcon,
|
|
32
34
|
trackEvent: { category: "element" },
|
|
33
35
|
perform: (elements, appState) => {
|
|
@@ -46,6 +48,7 @@ export const actionBringForward = register({
|
|
|
46
48
|
export const actionSendToBack = register({
|
|
47
49
|
name: "sendToBack",
|
|
48
50
|
label: "labels.sendToBack",
|
|
51
|
+
keywords: ["move down", "zindex", "layer"],
|
|
49
52
|
icon: SendToBackIcon,
|
|
50
53
|
trackEvent: { category: "element" },
|
|
51
54
|
perform: (elements, appState) => {
|
|
@@ -69,6 +72,7 @@ export const actionSendToBack = register({
|
|
|
69
72
|
export const actionBringToFront = register({
|
|
70
73
|
name: "bringToFront",
|
|
71
74
|
label: "labels.bringToFront",
|
|
75
|
+
keywords: ["move up", "zindex", "layer"],
|
|
72
76
|
icon: BringToFrontIcon,
|
|
73
77
|
trackEvent: { category: "element" },
|
|
74
78
|
perform: (elements, appState) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Action, UpdaterFn, ActionName, ActionResult, PanelComponentProps, ActionSource } from "./types";
|
|
3
|
-
import { OrderedExcalidrawElement } from "../element/types";
|
|
4
|
-
import { AppClassProperties, AppState } from "../types";
|
|
2
|
+
import type { Action, UpdaterFn, ActionName, ActionResult, PanelComponentProps, ActionSource } from "./types";
|
|
3
|
+
import type { OrderedExcalidrawElement } from "../element/types";
|
|
4
|
+
import type { AppClassProperties, AppState } from "../types";
|
|
5
5
|
export declare class ActionManager {
|
|
6
6
|
actions: Record<ActionName, Action>;
|
|
7
7
|
updater: (actionResult: ActionResult | Promise<ActionResult>) => void;
|