@zsviczian/excalidraw 0.18.0-60 → 0.18.0-62
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/dist/excalidraw.development.js +113 -113
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +2 -2
- package/types/common/src/binary-heap.d.ts +12 -12
- package/types/common/src/colors.d.ts +62 -62
- package/types/common/src/commonObsidianUtils.d.ts +20 -20
- package/types/common/src/constants.d.ts +357 -360
- package/types/common/src/editorInterface.d.ts +35 -35
- package/types/common/src/emitter.d.ts +16 -16
- package/types/common/src/font-metadata.d.ts +46 -48
- package/types/common/src/index.d.ts +15 -15
- package/types/common/src/keys.d.ts +189 -189
- package/types/common/src/points.d.ts +9 -9
- package/types/common/src/promise-pool.d.ts +6 -6
- package/types/common/src/queue.d.ts +9 -9
- package/types/common/src/random.d.ts +4 -4
- package/types/common/src/url.d.ts +7 -7
- package/types/common/src/utility-types.d.ts +37 -37
- package/types/common/src/utils.d.ts +279 -273
- package/types/common/src/visualdebug.d.ts +41 -41
- package/types/element/src/Scene.d.ts +80 -80
- package/types/element/src/align.d.ts +8 -8
- package/types/element/src/binding.d.ts +123 -122
- package/types/element/src/bounds.d.ts +89 -89
- package/types/element/src/collision.d.ts +36 -36
- package/types/element/src/comparisons.d.ts +8 -8
- package/types/element/src/containerCache.d.ts +11 -11
- package/types/element/src/cropElement.d.ts +19 -19
- package/types/element/src/delta.d.ts +228 -228
- package/types/element/src/distance.d.ts +3 -3
- package/types/element/src/distribute.d.ts +7 -7
- package/types/element/src/dragElements.d.ts +33 -33
- package/types/element/src/duplicate.d.ts +63 -63
- package/types/element/src/easingFunctions.d.ts +6 -6
- package/types/element/src/elbowArrow.d.ts +17 -17
- package/types/element/src/elementLink.d.ts +13 -13
- package/types/element/src/embeddable.d.ts +10 -10
- package/types/element/src/flowchart.d.ts +26 -26
- package/types/element/src/fractionalIndex.d.ts +57 -57
- package/types/element/src/frame.d.ts +74 -70
- package/types/element/src/groups.d.ts +34 -34
- package/types/element/src/heading.d.ts +16 -15
- package/types/element/src/image.d.ts +22 -32
- package/types/element/src/index.d.ts +55 -55
- package/types/element/src/linearElementEditor.d.ts +113 -113
- package/types/element/src/mutateElement.d.ts +23 -21
- package/types/element/src/newElement.d.ts +64 -64
- package/types/element/src/positionElementsOnGrid.d.ts +2 -2
- package/types/element/src/renderElement.d.ts +31 -31
- package/types/element/src/resizeElements.d.ts +39 -39
- package/types/element/src/resizeTest.d.ts +16 -16
- package/types/element/src/selection.d.ts +34 -38
- package/types/element/src/shape.d.ts +42 -42
- package/types/element/src/showSelectedShapeActions.d.ts +3 -3
- package/types/element/src/sizeHelpers.d.ts +35 -35
- package/types/element/src/sortElements.d.ts +2 -2
- package/types/element/src/store.d.ts +237 -237
- package/types/element/src/textElement.d.ts +40 -40
- package/types/element/src/textMeasurements.d.ts +39 -41
- package/types/element/src/textWrapping.d.ts +13 -13
- package/types/element/src/transformHandles.d.ts +36 -56
- package/types/element/src/typeChecks.d.ts +56 -56
- package/types/element/src/types.d.ts +304 -304
- package/types/element/src/utils.d.ts +34 -32
- package/types/element/src/zindex.d.ts +13 -13
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +599 -662
- package/types/excalidraw/actions/actionAlign.d.ts +109 -109
- package/types/excalidraw/actions/actionBoundText.d.ts +436 -478
- package/types/excalidraw/actions/actionCanvas.d.ts +2920 -3204
- package/types/excalidraw/actions/actionClipboard.d.ts +475 -517
- package/types/excalidraw/actions/actionCropEditor.d.ts +212 -233
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +633 -700
- package/types/excalidraw/actions/actionDistribute.d.ts +34 -34
- package/types/excalidraw/actions/actionDuplicateSelection.d.ts +17 -17
- package/types/excalidraw/actions/actionElementLink.d.ts +232 -253
- package/types/excalidraw/actions/actionElementLock.d.ts +422 -464
- package/types/excalidraw/actions/actionEmbeddable.d.ts +209 -230
- package/types/excalidraw/actions/actionExport.d.ts +835 -919
- package/types/excalidraw/actions/actionFinalize.d.ts +13 -13
- package/types/excalidraw/actions/actionFlip.d.ts +34 -34
- package/types/excalidraw/actions/actionFrame.d.ts +1315 -1435
- package/types/excalidraw/actions/actionGroup.d.ts +426 -476
- package/types/excalidraw/actions/actionHistory.d.ts +6 -6
- package/types/excalidraw/actions/actionLinearEditor.d.ts +709 -766
- package/types/excalidraw/actions/actionLink.d.ts +213 -234
- package/types/excalidraw/actions/actionMenu.d.ts +201 -222
- package/types/excalidraw/actions/actionNavigate.d.ts +20 -22
- package/types/excalidraw/actions/actionProperties.d.ts +695 -758
- package/types/excalidraw/actions/actionSelectAll.d.ts +208 -233
- package/types/excalidraw/actions/actionStyles.d.ts +226 -247
- package/types/excalidraw/actions/actionTextAutoResize.d.ts +17 -17
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +215 -236
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +213 -234
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +204 -225
- package/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -19
- package/types/excalidraw/actions/actionToggleStats.d.ts +212 -233
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +213 -234
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +213 -234
- package/types/excalidraw/actions/actionTrayMenu.d.ts +208 -229
- package/types/excalidraw/actions/actionZindex.d.ts +74 -74
- package/types/excalidraw/actions/index.d.ts +30 -30
- package/types/excalidraw/actions/manager.d.ts +21 -21
- package/types/excalidraw/actions/register.d.ts +5 -5
- package/types/excalidraw/actions/shortcuts.d.ts +4 -4
- package/types/excalidraw/actions/types.d.ts +47 -47
- package/types/excalidraw/analytics.d.ts +1 -1
- package/types/excalidraw/animated-trail.d.ts +39 -39
- package/types/excalidraw/animation-frame-handler.d.ts +16 -16
- package/types/excalidraw/appState.d.ts +105 -105
- package/types/excalidraw/charts.d.ts +27 -27
- package/types/excalidraw/clients.d.ts +14 -14
- package/types/excalidraw/clipboard.d.ts +105 -129
- package/types/excalidraw/components/Actions.d.ts +48 -48
- package/types/excalidraw/components/ActiveConfirmDialog.d.ts +4 -4
- package/types/excalidraw/components/App.d.ts +572 -581
- package/types/excalidraw/components/Avatar.d.ts +11 -11
- package/types/excalidraw/components/BraveMeasureTextError.d.ts +2 -2
- package/types/excalidraw/components/Button.d.ts +17 -17
- package/types/excalidraw/components/ButtonIcon.d.ts +16 -16
- package/types/excalidraw/components/ButtonIconCycle.d.ts +11 -11
- package/types/excalidraw/components/ButtonSeparator.d.ts +1 -1
- package/types/excalidraw/components/Card.d.ts +6 -6
- package/types/excalidraw/components/CheckboxItem.d.ts +8 -8
- package/types/excalidraw/components/ColorPicker/ColorInput.d.ts +10 -10
- package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +23 -23
- package/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +8 -8
- package/types/excalidraw/components/ColorPicker/HotkeyLabel.d.ts +7 -7
- package/types/excalidraw/components/ColorPicker/Picker.d.ts +19 -19
- package/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +10 -10
- package/types/excalidraw/components/ColorPicker/PickerHeading.d.ts +5 -5
- package/types/excalidraw/components/ColorPicker/ShadeList.d.ts +9 -9
- package/types/excalidraw/components/ColorPicker/TopPicks.d.ts +9 -9
- package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +21 -21
- package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +20 -20
- package/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +19 -19
- package/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +2 -2
- package/types/excalidraw/components/CommandPalette/types.d.ts +24 -24
- package/types/excalidraw/components/ConfirmDialog.d.ts +10 -10
- package/types/excalidraw/components/ContextMenu.d.ts +16 -16
- package/types/excalidraw/components/ConvertElementTypePopup.d.ts +23 -23
- package/types/excalidraw/components/DarkModeToggle.d.ts +7 -7
- package/types/excalidraw/components/DefaultSidebar.d.ts +27 -30
- package/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +4 -4
- package/types/excalidraw/components/Dialog.d.ts +13 -13
- package/types/excalidraw/components/DialogActionButton.d.ts +10 -10
- package/types/excalidraw/components/ElementCanvasButtons.d.ts +7 -7
- package/types/excalidraw/components/ElementLinkDialog.d.ts +12 -12
- package/types/excalidraw/components/Ellipsify.d.ts +3 -3
- package/types/excalidraw/components/ErrorDialog.d.ts +5 -5
- package/types/excalidraw/components/ExcalidrawLogo.d.ts +15 -15
- package/types/excalidraw/components/EyeDropper.d.ts +27 -27
- package/types/excalidraw/components/FilledButton.d.ts +18 -18
- package/types/excalidraw/components/FixedSideContainer.d.ts +10 -10
- package/types/excalidraw/components/FollowMode/FollowMode.d.ts +10 -10
- package/types/excalidraw/components/FontPicker/FontPicker.d.ts +22 -22
- package/types/excalidraw/components/FontPicker/FontPickerList.d.ts +26 -26
- package/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +8 -8
- package/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +13 -13
- package/types/excalidraw/components/HandButton.d.ts +10 -10
- package/types/excalidraw/components/HelpButton.d.ts +7 -7
- package/types/excalidraw/components/HelpDialog.d.ts +4 -4
- package/types/excalidraw/components/HintViewer.d.ts +11 -11
- package/types/excalidraw/components/IconPicker.d.ts +15 -15
- package/types/excalidraw/components/ImageExportDialog.d.ts +14 -14
- package/types/excalidraw/components/InitializeApp.d.ts +10 -10
- package/types/excalidraw/components/InlineIcon.d.ts +5 -5
- package/types/excalidraw/components/Island.d.ts +10 -10
- package/types/excalidraw/components/JSONExportDialog.d.ts +15 -15
- package/types/excalidraw/components/LaserPointerButton.d.ts +10 -10
- package/types/excalidraw/components/LayerUI.d.ts +32 -32
- package/types/excalidraw/components/LibraryMenu.d.ts +10 -10
- package/types/excalidraw/components/LibraryMenuBrowseButton.d.ts +7 -7
- package/types/excalidraw/components/LibraryMenuControlButtons.d.ts +9 -9
- package/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +17 -17
- package/types/excalidraw/components/LibraryMenuItems.d.ts +14 -14
- package/types/excalidraw/components/LibraryMenuSection.d.ts +23 -23
- package/types/excalidraw/components/LibraryUnit.d.ts +14 -14
- package/types/excalidraw/components/LinkButton.d.ts +4 -4
- package/types/excalidraw/components/LoadingMessage.d.ts +5 -5
- package/types/excalidraw/components/LockButton.d.ts +10 -10
- package/types/excalidraw/components/MagicButton.d.ts +10 -10
- package/types/excalidraw/components/MobileMenu.d.ts +24 -24
- package/types/excalidraw/components/MobileToolBar.d.ts +10 -10
- package/types/excalidraw/components/Modal.d.ts +14 -14
- package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +17 -17
- package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +17 -17
- package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +22 -22
- package/types/excalidraw/components/Paragraph.d.ts +4 -4
- package/types/excalidraw/components/PasteChartDialog.d.ts +8 -8
- package/types/excalidraw/components/PenModeButton.d.ts +12 -12
- package/types/excalidraw/components/Popover.d.ts +16 -16
- package/types/excalidraw/components/ProjectName.d.ts +10 -10
- package/types/excalidraw/components/PropertiesPopover.d.ts +16 -16
- package/types/excalidraw/components/PublishLibrary.d.ts +16 -16
- package/types/excalidraw/components/QuickSearch.d.ts +9 -9
- package/types/excalidraw/components/RadioGroup.d.ts +13 -13
- package/types/excalidraw/components/RadioSelection.d.ts +20 -20
- package/types/excalidraw/components/Range.d.ts +8 -8
- package/types/excalidraw/components/SVGLayer.d.ts +7 -7
- package/types/excalidraw/components/ScrollableList.d.ts +8 -8
- package/types/excalidraw/components/SearchMenu.d.ts +5 -5
- package/types/excalidraw/components/Section.d.ts +7 -7
- package/types/excalidraw/components/ShareableLinkDialog.d.ts +7 -7
- package/types/excalidraw/components/Sidebar/Sidebar.d.ts +70 -76
- package/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +7 -7
- package/types/excalidraw/components/Sidebar/SidebarTab.d.ts +8 -8
- package/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +9 -9
- package/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +6 -6
- package/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +6 -6
- package/types/excalidraw/components/Sidebar/SidebarTrigger.d.ts +6 -6
- package/types/excalidraw/components/Sidebar/common.d.ts +34 -34
- package/types/excalidraw/components/Spinner.d.ts +8 -8
- package/types/excalidraw/components/Stack.d.ts +15 -15
- package/types/excalidraw/components/Stats/Angle.d.ts +11 -11
- package/types/excalidraw/components/Stats/CanvasGrid.d.ts +10 -10
- package/types/excalidraw/components/Stats/CanvasGridSize.d.ts +10 -10
- package/types/excalidraw/components/Stats/Collapsible.d.ts +10 -10
- package/types/excalidraw/components/Stats/Dimension.d.ts +11 -11
- package/types/excalidraw/components/Stats/DragInput.d.ts +44 -44
- package/types/excalidraw/components/Stats/FontSize.d.ts +11 -11
- package/types/excalidraw/components/Stats/MultiAngle.d.ts +11 -11
- package/types/excalidraw/components/Stats/MultiDimension.d.ts +14 -14
- package/types/excalidraw/components/Stats/MultiFontSize.d.ts +12 -12
- package/types/excalidraw/components/Stats/MultiPosition.d.ts +14 -14
- package/types/excalidraw/components/Stats/Position.d.ts +12 -12
- package/types/excalidraw/components/Stats/index.d.ts +35 -35
- package/types/excalidraw/components/Stats/utils.d.ts +19 -19
- package/types/excalidraw/components/Switch.d.ts +9 -9
- package/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +8 -8
- package/types/excalidraw/components/TTDDialog/MermaidToExcalidrawLib.d.ts +10 -10
- package/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +29 -29
- package/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +9 -9
- package/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +7 -7
- package/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +17 -17
- package/types/excalidraw/components/TTDDialog/TTDDialogPanels.d.ts +4 -4
- package/types/excalidraw/components/TTDDialog/TTDDialogSubmitShortcut.d.ts +1 -1
- package/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +7 -7
- package/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +8 -8
- package/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +6 -6
- package/types/excalidraw/components/TTDDialog/TTDDialogTabs.d.ts +11 -11
- package/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +8 -8
- package/types/excalidraw/components/TTDDialog/common.d.ts +32 -32
- package/types/excalidraw/components/TextField.d.ts +22 -22
- package/types/excalidraw/components/Toast.d.ts +9 -9
- package/types/excalidraw/components/ToolButton.d.ts +49 -49
- package/types/excalidraw/components/ToolPopover.d.ts +25 -25
- package/types/excalidraw/components/Tooltip.d.ts +18 -18
- package/types/excalidraw/components/Trans.d.ts +9 -9
- package/types/excalidraw/components/TrayMenu.d.ts +26 -26
- package/types/excalidraw/components/UnlockPopup.d.ts +8 -8
- package/types/excalidraw/components/UserList.d.ts +18 -18
- package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +33 -33
- package/types/excalidraw/components/canvases/NewElementCanvas.d.ts +14 -14
- package/types/excalidraw/components/canvases/StaticCanvas.d.ts +19 -19
- package/types/excalidraw/components/canvases/index.d.ts +3 -3
- package/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +84 -88
- package/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +16 -16
- package/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -11
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +38 -46
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +8 -8
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +17 -17
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +7 -7
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +16 -16
- package/types/excalidraw/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -5
- package/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +10 -10
- package/types/excalidraw/components/dropdownMenu/common.d.ts +6 -6
- package/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +3 -3
- package/types/excalidraw/components/footer/Footer.d.ts +12 -12
- package/types/excalidraw/components/footer/FooterCenter.d.ts +8 -8
- package/types/excalidraw/components/hoc/withInternalFallback.d.ts +4 -4
- package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +19 -19
- package/types/excalidraw/components/hyperlink/helpers.d.ts +10 -10
- package/types/excalidraw/components/icons.d.ts +241 -241
- package/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +11 -22
- package/types/excalidraw/components/main-menu/DefaultItems.d.ts +64 -64
- package/types/excalidraw/components/main-menu/MainMenu.d.ts +78 -80
- package/types/excalidraw/components/shapes.d.ts +172 -172
- package/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +60 -60
- package/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +19 -19
- package/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +86 -86
- package/types/excalidraw/context/tunnels.d.ts +21 -21
- package/types/excalidraw/context/ui-appState.d.ts +4 -4
- package/types/excalidraw/cursor.d.ts +6 -6
- package/types/excalidraw/data/EditorLocalStorage.d.ts +8 -8
- package/types/excalidraw/data/ai/types.d.ts +242 -242
- package/types/excalidraw/data/blob.d.ts +57 -49
- package/types/excalidraw/data/encode.d.ts +55 -55
- package/types/excalidraw/data/encryption.d.ts +9 -9
- package/types/excalidraw/data/filesystem.d.ts +21 -21
- package/types/excalidraw/data/image.d.ts +9 -9
- package/types/excalidraw/data/index.d.ts +22 -22
- package/types/excalidraw/data/json.d.ts +18 -16
- package/types/excalidraw/data/library.d.ts +127 -112
- package/types/excalidraw/data/reconcile.d.ts +7 -7
- package/types/excalidraw/data/resave.d.ts +5 -5
- package/types/excalidraw/data/restore.d.ts +35 -26
- package/types/excalidraw/data/transform.d.ts +81 -81
- package/types/excalidraw/data/types.d.ts +48 -48
- package/types/excalidraw/deburr.d.ts +1 -1
- package/types/excalidraw/dist/excalidraw.development.d.ts +2 -2
- package/types/excalidraw/dist/excalidraw.production.min.d.ts +2 -3
- package/types/excalidraw/editor-jotai.d.ts +56 -56
- package/types/excalidraw/entry.d.ts +1 -1
- package/types/excalidraw/env.d.cts +1 -1
- package/types/excalidraw/env.d.ts +1 -1
- package/types/excalidraw/eraser/index.d.ts +12 -12
- package/types/excalidraw/errors.d.ts +29 -29
- package/types/excalidraw/fonts/Cascadia/index.d.ts +2 -2
- package/types/excalidraw/fonts/ComicShanns/index.d.ts +2 -2
- package/types/excalidraw/fonts/Emoji/index.d.ts +2 -2
- package/types/excalidraw/fonts/ExcalidrawFontFace.d.ts +29 -29
- package/types/excalidraw/fonts/Excalifont/index.d.ts +2 -2
- package/types/excalidraw/fonts/Fonts.d.ts +90 -90
- package/types/excalidraw/fonts/Helvetica/index.d.ts +2 -2
- package/types/excalidraw/fonts/Liberation/index.d.ts +2 -2
- package/types/excalidraw/fonts/Lilita/index.d.ts +2 -2
- package/types/excalidraw/fonts/Nunito/index.d.ts +2 -2
- package/types/excalidraw/fonts/Virgil/index.d.ts +2 -2
- package/types/excalidraw/fonts/Xiaolai/index.d.ts +8 -8
- package/types/excalidraw/fonts/index.d.ts +1 -1
- package/types/excalidraw/gesture.d.ts +6 -6
- package/types/excalidraw/history.d.ts +48 -48
- package/types/excalidraw/hooks/useCallbackRefState.d.ts +1 -1
- package/types/excalidraw/hooks/useCopiedIndicator.d.ts +5 -5
- package/types/excalidraw/hooks/useCreatePortalContainer.d.ts +7 -7
- package/types/excalidraw/hooks/useEmitter.d.ts +2 -2
- package/types/excalidraw/hooks/useLibraryItemSvg.d.ts +11 -11
- package/types/excalidraw/hooks/useOutsideClick.d.ts +21 -21
- package/types/excalidraw/hooks/useScrollPosition.d.ts +1 -1
- package/types/excalidraw/hooks/useStable.d.ts +1 -1
- package/types/excalidraw/hooks/useStableCallback.d.ts +4 -4
- package/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -14
- package/types/excalidraw/hooks/useTransition.d.ts +2 -2
- package/types/excalidraw/i18n.d.ts +24 -24
- package/types/excalidraw/index-node.d.ts +1 -1
- package/types/excalidraw/index.d.ts +60 -60
- package/types/excalidraw/laser-trails.d.ts +20 -20
- package/types/excalidraw/lasso/index.d.ts +16 -16
- package/types/excalidraw/lasso/utils.d.ts +13 -13
- package/types/excalidraw/main.d.ts +2 -2
- package/types/excalidraw/mermaid.d.ts +2 -2
- package/types/excalidraw/obsidianUtils.d.ts +41 -41
- package/types/excalidraw/polyfill.d.ts +2 -2
- package/types/excalidraw/publicPath.d.ts +1 -1
- package/types/excalidraw/reactUtils.d.ts +14 -14
- package/types/excalidraw/renderer/animation.d.ts +12 -12
- package/types/excalidraw/renderer/helpers.d.ts +16 -14
- package/types/excalidraw/renderer/interactiveScene.d.ts +14 -12
- package/types/excalidraw/renderer/renderNewElementScene.d.ts +7 -7
- package/types/excalidraw/renderer/renderSnaps.d.ts +2 -2
- package/types/excalidraw/renderer/roundRect.d.ts +11 -11
- package/types/excalidraw/renderer/staticScene.d.ts +14 -14
- package/types/excalidraw/renderer/staticSvgScene.d.ts +5 -5
- package/types/excalidraw/scene/Renderer.d.ts +29 -27
- package/types/excalidraw/scene/export.d.ts +37 -37
- package/types/excalidraw/scene/index.d.ts +4 -4
- package/types/excalidraw/scene/normalize.d.ts +4 -4
- package/types/excalidraw/scene/scroll.d.ts +18 -23
- package/types/excalidraw/scene/scrollbars.d.ts +11 -11
- package/types/excalidraw/scene/types.d.ts +134 -134
- package/types/excalidraw/scene/zoom.d.ts +12 -12
- package/types/excalidraw/shortcut.d.ts +1 -1
- package/types/excalidraw/snapping.d.ts +111 -111
- package/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +45 -45
- package/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +13 -13
- package/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +2 -2
- package/types/excalidraw/subset/subset-main.d.ts +12 -12
- package/types/excalidraw/subset/subset-shared.chunk.d.ts +32 -32
- package/types/excalidraw/subset/subset-worker.chunk.d.ts +15 -15
- package/types/excalidraw/subset/woff2/woff2-bindings.d.ts +31 -31
- package/types/excalidraw/subset/woff2/woff2-loader.d.ts +14 -14
- package/types/excalidraw/subset/woff2/woff2-wasm.d.ts +2 -2
- package/types/excalidraw/types.d.ts +801 -801
- package/types/excalidraw/webpack.dev.config.d.ts +116 -116
- package/types/excalidraw/webpack.prod.config.d.ts +130 -130
- package/types/excalidraw/workers.d.ts +36 -36
- package/types/excalidraw/wysiwyg/textWysiwyg.d.ts +24 -24
- package/types/math/src/angle.d.ts +19 -19
- package/types/math/src/constants.d.ts +3 -3
- package/types/math/src/curve.d.ts +74 -74
- package/types/math/src/ellipse.d.ts +44 -44
- package/types/math/src/index.d.ts +13 -13
- package/types/math/src/line.d.ts +17 -17
- package/types/math/src/point.d.ts +122 -122
- package/types/math/src/polygon.d.ts +6 -6
- package/types/math/src/range.d.ts +44 -44
- package/types/math/src/rectangle.d.ts +5 -5
- package/types/math/src/segment.d.ts +40 -40
- package/types/math/src/triangle.d.ts +11 -11
- package/types/math/src/types.d.ts +106 -106
- package/types/math/src/utils.d.ts +7 -7
- package/types/math/src/vector.d.ts +94 -94
- package/types/utils/src/bbox.d.ts +9 -9
- package/types/utils/src/export.d.ts +35 -35
- package/types/utils/src/index.d.ts +4 -4
- package/types/utils/src/shape.d.ts +58 -58
- package/types/utils/src/withinBounds.d.ts +19 -19
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import type { AppClassProperties, AppState, InteractiveCanvasAppState } from "@excalidraw/excalidraw/types";
|
|
2
|
-
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
3
|
-
import type { GroupId, ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ElementsMapOrArray, ElementsMap } from "./types";
|
|
4
|
-
export declare const selectGroup: (groupId: GroupId, appState: InteractiveCanvasAppState, elements: readonly NonDeleted<ExcalidrawElement>[]) => Pick<InteractiveCanvasAppState, "selectedGroupIds" | "selectedElementIds" | "editingGroupId">;
|
|
5
|
-
export declare const selectGroupsForSelectedElements: {
|
|
6
|
-
(appState: Pick<AppState, "selectedElementIds" | "editingGroupId">, elements: readonly NonDeletedExcalidrawElement[], prevAppState: InteractiveCanvasAppState, app: AppClassProperties | null): Mutable<Pick<InteractiveCanvasAppState, "selectedGroupIds" | "editingGroupId" | "selectedElementIds">>;
|
|
7
|
-
clearCache(): void;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* If the element's group is selected, don't render an individual
|
|
11
|
-
* selection border around it.
|
|
12
|
-
*/
|
|
13
|
-
export declare const isSelectedViaGroup: (appState: InteractiveCanvasAppState, element: ExcalidrawElement) => boolean;
|
|
14
|
-
export declare const getSelectedGroupForElement: (appState: Pick<InteractiveCanvasAppState, "editingGroupId" | "selectedGroupIds">, element: ExcalidrawElement) => string | undefined;
|
|
15
|
-
export declare const getSelectedGroupIds: (appState: InteractiveCanvasAppState) => GroupId[];
|
|
16
|
-
export declare const selectGroupsFromGivenElements: (elements: readonly NonDeleted<ExcalidrawElement>[], appState: InteractiveCanvasAppState) => {
|
|
17
|
-
[groupId: string]: boolean;
|
|
18
|
-
};
|
|
19
|
-
export declare const editGroupForSelectedElement: (appState: AppState, element: NonDeleted<ExcalidrawElement>) => AppState;
|
|
20
|
-
export declare const isElementInGroup: (element: ExcalidrawElement, groupId: string) => boolean;
|
|
21
|
-
export declare const getElementsInGroup: (elements: ElementsMapOrArray, groupId: string) => ExcalidrawElement[];
|
|
22
|
-
export declare const getSelectedGroupIdForElement: (element: ExcalidrawElement, selectedGroupIds: {
|
|
23
|
-
[groupId: string]: boolean;
|
|
24
|
-
}) => string | undefined;
|
|
25
|
-
export declare const addToGroup: (prevGroupIds: ExcalidrawElement["groupIds"], newGroupId: GroupId, editingGroupId: AppState["editingGroupId"]) => string[];
|
|
26
|
-
export declare const removeFromSelectedGroups: (groupIds: ExcalidrawElement["groupIds"], selectedGroupIds: {
|
|
27
|
-
[groupId: string]: boolean;
|
|
28
|
-
}) => string[];
|
|
29
|
-
export declare const getMaximumGroups: (elements: ExcalidrawElement[], elementsMap: ElementsMap) => ExcalidrawElement[][];
|
|
30
|
-
export declare const getNonDeletedGroupIds: (elements: ElementsMap) => Set<string>;
|
|
31
|
-
export declare const elementsAreInSameGroup: (elements: readonly ExcalidrawElement[]) => boolean;
|
|
32
|
-
export declare const isInGroup: (element: NonDeletedExcalidrawElement) => boolean;
|
|
33
|
-
export declare const getNewGroupIdsForDuplication: (groupIds: ExcalidrawElement["groupIds"], editingGroupId: AppState["editingGroupId"], mapper: (groupId: GroupId) => GroupId) => string[];
|
|
34
|
-
export declare const getSelectedElementsByGroup: (selectedElements: ExcalidrawElement[], elementsMap: ElementsMap, appState: Readonly<AppState>) => ExcalidrawElement[][];
|
|
1
|
+
import type { AppClassProperties, AppState, InteractiveCanvasAppState } from "@excalidraw/excalidraw/types";
|
|
2
|
+
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
3
|
+
import type { GroupId, ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ElementsMapOrArray, ElementsMap } from "./types";
|
|
4
|
+
export declare const selectGroup: (groupId: GroupId, appState: InteractiveCanvasAppState, elements: readonly NonDeleted<ExcalidrawElement>[]) => Pick<InteractiveCanvasAppState, "selectedGroupIds" | "selectedElementIds" | "editingGroupId">;
|
|
5
|
+
export declare const selectGroupsForSelectedElements: {
|
|
6
|
+
(appState: Pick<AppState, "selectedElementIds" | "editingGroupId">, elements: readonly NonDeletedExcalidrawElement[], prevAppState: InteractiveCanvasAppState, app: AppClassProperties | null): Mutable<Pick<InteractiveCanvasAppState, "selectedGroupIds" | "editingGroupId" | "selectedElementIds">>;
|
|
7
|
+
clearCache(): void;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* If the element's group is selected, don't render an individual
|
|
11
|
+
* selection border around it.
|
|
12
|
+
*/
|
|
13
|
+
export declare const isSelectedViaGroup: (appState: InteractiveCanvasAppState, element: ExcalidrawElement) => boolean;
|
|
14
|
+
export declare const getSelectedGroupForElement: (appState: Pick<InteractiveCanvasAppState, "editingGroupId" | "selectedGroupIds">, element: ExcalidrawElement) => string | undefined;
|
|
15
|
+
export declare const getSelectedGroupIds: (appState: InteractiveCanvasAppState) => GroupId[];
|
|
16
|
+
export declare const selectGroupsFromGivenElements: (elements: readonly NonDeleted<ExcalidrawElement>[], appState: InteractiveCanvasAppState) => {
|
|
17
|
+
[groupId: string]: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare const editGroupForSelectedElement: (appState: AppState, element: NonDeleted<ExcalidrawElement>) => AppState;
|
|
20
|
+
export declare const isElementInGroup: (element: ExcalidrawElement, groupId: string) => boolean;
|
|
21
|
+
export declare const getElementsInGroup: (elements: ElementsMapOrArray, groupId: string) => ExcalidrawElement[];
|
|
22
|
+
export declare const getSelectedGroupIdForElement: (element: ExcalidrawElement, selectedGroupIds: {
|
|
23
|
+
[groupId: string]: boolean;
|
|
24
|
+
}) => string | undefined;
|
|
25
|
+
export declare const addToGroup: (prevGroupIds: ExcalidrawElement["groupIds"], newGroupId: GroupId, editingGroupId: AppState["editingGroupId"]) => string[];
|
|
26
|
+
export declare const removeFromSelectedGroups: (groupIds: ExcalidrawElement["groupIds"], selectedGroupIds: {
|
|
27
|
+
[groupId: string]: boolean;
|
|
28
|
+
}) => string[];
|
|
29
|
+
export declare const getMaximumGroups: (elements: ExcalidrawElement[], elementsMap: ElementsMap) => ExcalidrawElement[][];
|
|
30
|
+
export declare const getNonDeletedGroupIds: (elements: ElementsMap) => Set<string>;
|
|
31
|
+
export declare const elementsAreInSameGroup: (elements: readonly ExcalidrawElement[]) => boolean;
|
|
32
|
+
export declare const isInGroup: (element: NonDeletedExcalidrawElement) => boolean;
|
|
33
|
+
export declare const getNewGroupIdsForDuplication: (groupIds: ExcalidrawElement["groupIds"], editingGroupId: AppState["editingGroupId"], mapper: (groupId: GroupId) => GroupId) => string[];
|
|
34
|
+
export declare const getSelectedElementsByGroup: (selectedElements: ExcalidrawElement[], elementsMap: ElementsMap, appState: Readonly<AppState>) => ExcalidrawElement[][];
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import type { LocalPoint, GlobalPoint, Vector } from "@excalidraw/math";
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
1
|
+
import type { LocalPoint, GlobalPoint, Vector } from "@excalidraw/math";
|
|
2
|
+
import { type Bounds } from "./bounds";
|
|
3
|
+
import type { ExcalidrawBindableElement } from "./types";
|
|
4
|
+
export declare const HEADING_RIGHT: Heading;
|
|
5
|
+
export declare const HEADING_DOWN: Heading;
|
|
6
|
+
export declare const HEADING_LEFT: Heading;
|
|
7
|
+
export declare const HEADING_UP: Heading;
|
|
8
|
+
export type Heading = [1, 0] | [0, 1] | [-1, 0] | [0, -1];
|
|
9
|
+
export declare const vectorToHeading: (vec: Vector) => Heading;
|
|
10
|
+
export declare const headingForPoint: <P extends GlobalPoint | LocalPoint>(p: P, o: P) => Heading;
|
|
11
|
+
export declare const headingForPointIsHorizontal: <P extends GlobalPoint | LocalPoint>(p: P, o: P) => boolean;
|
|
12
|
+
export declare const compareHeading: (a: Heading, b: Heading) => boolean;
|
|
13
|
+
export declare const headingIsHorizontal: (a: Heading) => boolean;
|
|
14
|
+
export declare const headingIsVertical: (a: Heading) => boolean;
|
|
15
|
+
export declare const headingForPointFromElement: <Point extends GlobalPoint>(element: Readonly<ExcalidrawBindableElement>, aabb: Readonly<Bounds>, p: Readonly<Point>) => Heading;
|
|
16
|
+
export declare const flipHeading: (h: Heading) => Heading;
|
|
@@ -1,32 +1,22 @@
|
|
|
1
|
-
import type { AppClassProperties, DataURL, BinaryFiles } from "@excalidraw/excalidraw/types";
|
|
2
|
-
import type { ExcalidrawElement, FileId, InitializedExcalidrawImageElement } from "./types";
|
|
3
|
-
export declare const loadHTMLImageElement: (dataURL: DataURL) => Promise<HTMLImageElement>;
|
|
4
|
-
/** NOTE: updates cache even if already populated with given image. Thus,
|
|
5
|
-
* you should filter out the images upstream if you want to optimize this. */
|
|
6
|
-
export declare const updateImageCache: ({ fileIds, files, imageCache, }: {
|
|
7
|
-
fileIds: FileId[];
|
|
8
|
-
files: BinaryFiles;
|
|
9
|
-
imageCache: AppClassProperties["imageCache"];
|
|
10
|
-
}) => Promise<{
|
|
11
|
-
imageCache: Map<FileId, {
|
|
12
|
-
image: HTMLImageElement | Promise<HTMLImageElement>;
|
|
13
|
-
mimeType: import("
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}>;
|
|
24
|
-
}>;
|
|
25
|
-
/** includes errored files because they cache was updated nonetheless */
|
|
26
|
-
updatedFiles: Map<FileId, true>;
|
|
27
|
-
/** files that failed when creating HTMLImageElement */
|
|
28
|
-
erroredFiles: Map<FileId, true>;
|
|
29
|
-
}>;
|
|
30
|
-
export declare const getInitializedImageElements: (elements: readonly ExcalidrawElement[]) => InitializedExcalidrawImageElement[];
|
|
31
|
-
export declare const isHTMLSVGElement: (node: Node | null) => node is SVGElement;
|
|
32
|
-
export declare const normalizeSVG: (SVGString: string) => string;
|
|
1
|
+
import type { AppClassProperties, DataURL, BinaryFiles } from "@excalidraw/excalidraw/types";
|
|
2
|
+
import type { ExcalidrawElement, FileId, InitializedExcalidrawImageElement } from "./types";
|
|
3
|
+
export declare const loadHTMLImageElement: (dataURL: DataURL) => Promise<HTMLImageElement>;
|
|
4
|
+
/** NOTE: updates cache even if already populated with given image. Thus,
|
|
5
|
+
* you should filter out the images upstream if you want to optimize this. */
|
|
6
|
+
export declare const updateImageCache: ({ fileIds, files, imageCache, }: {
|
|
7
|
+
fileIds: FileId[];
|
|
8
|
+
files: BinaryFiles;
|
|
9
|
+
imageCache: AppClassProperties["imageCache"];
|
|
10
|
+
}) => Promise<{
|
|
11
|
+
imageCache: Map<FileId, {
|
|
12
|
+
image: HTMLImageElement | Promise<HTMLImageElement>;
|
|
13
|
+
mimeType: import("@excalidraw/common/utility-types").ValueOf<typeof import("@excalidraw/common").IMAGE_MIME_TYPES>;
|
|
14
|
+
}>;
|
|
15
|
+
/** includes errored files because they cache was updated nonetheless */
|
|
16
|
+
updatedFiles: Map<FileId, true>;
|
|
17
|
+
/** files that failed when creating HTMLImageElement */
|
|
18
|
+
erroredFiles: Map<FileId, true>;
|
|
19
|
+
}>;
|
|
20
|
+
export declare const getInitializedImageElements: (elements: readonly ExcalidrawElement[]) => InitializedExcalidrawImageElement[];
|
|
21
|
+
export declare const isHTMLSVGElement: (node: Node | null) => node is SVGElement;
|
|
22
|
+
export declare const normalizeSVG: (SVGString: string) => string;
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import type { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeleted, ElementsMapOrArray } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated unsafe, use hashElementsVersion instead
|
|
4
|
-
*/
|
|
5
|
-
export declare const getSceneVersion: (elements: readonly ExcalidrawElement[]) => number;
|
|
6
|
-
/**
|
|
7
|
-
* Hashes elements' versionNonce (using djb2 algo). Order of elements matters.
|
|
8
|
-
*/
|
|
9
|
-
export declare const hashElementsVersion: (elements: ElementsMapOrArray) => number;
|
|
10
|
-
export declare const hashString: (s: string) => number;
|
|
11
|
-
export declare const getVisibleElements: (elements: readonly ExcalidrawElement[]) => readonly NonDeletedExcalidrawElement[];
|
|
12
|
-
export declare const getNonDeletedElements: <T extends ExcalidrawElement>(elements: readonly T[]) => readonly NonDeleted<T>[];
|
|
13
|
-
export declare const isNonDeletedElement: <T extends ExcalidrawElement>(element: T) => element is NonDeleted<T>;
|
|
14
|
-
export * from "./align";
|
|
15
|
-
export * from "./binding";
|
|
16
|
-
export * from "./bounds";
|
|
17
|
-
export * from "./collision";
|
|
18
|
-
export * from "./comparisons";
|
|
19
|
-
export * from "./containerCache";
|
|
20
|
-
export * from "./cropElement";
|
|
21
|
-
export * from "./delta";
|
|
22
|
-
export * from "./distance";
|
|
23
|
-
export * from "./distribute";
|
|
24
|
-
export * from "./dragElements";
|
|
25
|
-
export * from "./duplicate";
|
|
26
|
-
export * from "./elbowArrow";
|
|
27
|
-
export * from "./elementLink";
|
|
28
|
-
export * from "./embeddable";
|
|
29
|
-
export * from "./flowchart";
|
|
30
|
-
export * from "./fractionalIndex";
|
|
31
|
-
export * from "./frame";
|
|
32
|
-
export * from "./groups";
|
|
33
|
-
export * from "./heading";
|
|
34
|
-
export * from "./image";
|
|
35
|
-
export * from "./linearElementEditor";
|
|
36
|
-
export * from "./mutateElement";
|
|
37
|
-
export * from "./newElement";
|
|
38
|
-
export * from "./positionElementsOnGrid";
|
|
39
|
-
export * from "./renderElement";
|
|
40
|
-
export * from "./resizeElements";
|
|
41
|
-
export * from "./resizeTest";
|
|
42
|
-
export * from "./Scene";
|
|
43
|
-
export * from "./selection";
|
|
44
|
-
export * from "./shape";
|
|
45
|
-
export * from "./showSelectedShapeActions";
|
|
46
|
-
export * from "./sizeHelpers";
|
|
47
|
-
export * from "./sortElements";
|
|
48
|
-
export * from "./store";
|
|
49
|
-
export * from "./textElement";
|
|
50
|
-
export * from "./textMeasurements";
|
|
51
|
-
export * from "./textWrapping";
|
|
52
|
-
export * from "./transformHandles";
|
|
53
|
-
export * from "./typeChecks";
|
|
54
|
-
export * from "./utils";
|
|
55
|
-
export * from "./zindex";
|
|
1
|
+
import type { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeleted, ElementsMapOrArray } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated unsafe, use hashElementsVersion instead
|
|
4
|
+
*/
|
|
5
|
+
export declare const getSceneVersion: (elements: readonly ExcalidrawElement[]) => number;
|
|
6
|
+
/**
|
|
7
|
+
* Hashes elements' versionNonce (using djb2 algo). Order of elements matters.
|
|
8
|
+
*/
|
|
9
|
+
export declare const hashElementsVersion: (elements: ElementsMapOrArray) => number;
|
|
10
|
+
export declare const hashString: (s: string) => number;
|
|
11
|
+
export declare const getVisibleElements: (elements: readonly ExcalidrawElement[]) => readonly NonDeletedExcalidrawElement[];
|
|
12
|
+
export declare const getNonDeletedElements: <T extends ExcalidrawElement>(elements: readonly T[]) => readonly NonDeleted<T>[];
|
|
13
|
+
export declare const isNonDeletedElement: <T extends ExcalidrawElement>(element: T) => element is NonDeleted<T>;
|
|
14
|
+
export * from "./align";
|
|
15
|
+
export * from "./binding";
|
|
16
|
+
export * from "./bounds";
|
|
17
|
+
export * from "./collision";
|
|
18
|
+
export * from "./comparisons";
|
|
19
|
+
export * from "./containerCache";
|
|
20
|
+
export * from "./cropElement";
|
|
21
|
+
export * from "./delta";
|
|
22
|
+
export * from "./distance";
|
|
23
|
+
export * from "./distribute";
|
|
24
|
+
export * from "./dragElements";
|
|
25
|
+
export * from "./duplicate";
|
|
26
|
+
export * from "./elbowArrow";
|
|
27
|
+
export * from "./elementLink";
|
|
28
|
+
export * from "./embeddable";
|
|
29
|
+
export * from "./flowchart";
|
|
30
|
+
export * from "./fractionalIndex";
|
|
31
|
+
export * from "./frame";
|
|
32
|
+
export * from "./groups";
|
|
33
|
+
export * from "./heading";
|
|
34
|
+
export * from "./image";
|
|
35
|
+
export * from "./linearElementEditor";
|
|
36
|
+
export * from "./mutateElement";
|
|
37
|
+
export * from "./newElement";
|
|
38
|
+
export * from "./positionElementsOnGrid";
|
|
39
|
+
export * from "./renderElement";
|
|
40
|
+
export * from "./resizeElements";
|
|
41
|
+
export * from "./resizeTest";
|
|
42
|
+
export * from "./Scene";
|
|
43
|
+
export * from "./selection";
|
|
44
|
+
export * from "./shape";
|
|
45
|
+
export * from "./showSelectedShapeActions";
|
|
46
|
+
export * from "./sizeHelpers";
|
|
47
|
+
export * from "./sortElements";
|
|
48
|
+
export * from "./store";
|
|
49
|
+
export * from "./textElement";
|
|
50
|
+
export * from "./textMeasurements";
|
|
51
|
+
export * from "./textWrapping";
|
|
52
|
+
export * from "./transformHandles";
|
|
53
|
+
export * from "./typeChecks";
|
|
54
|
+
export * from "./utils";
|
|
55
|
+
export * from "./zindex";
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
|
|
2
|
-
import { type Store } from "@excalidraw/element";
|
|
3
|
-
import type { AppState, PointerCoords, InteractiveCanvasAppState, AppClassProperties, NullableGridSize, Zoom } from "@excalidraw/excalidraw/types";
|
|
4
|
-
import type { Scene } from "./Scene";
|
|
5
|
-
import type { Bounds } from "./bounds";
|
|
6
|
-
import type { NonDeleted, ExcalidrawLinearElement, ExcalidrawElement, ExcalidrawTextElementWithContainer, ElementsMap, NonDeletedSceneElementsMap, FixedPointBinding, ExcalidrawElbowArrowElement, PointsPositionUpdates } from "./types";
|
|
7
|
-
export declare class LinearElementEditor {
|
|
8
|
-
readonly elementId: ExcalidrawElement["id"] & {
|
|
9
|
-
_brand: "excalidrawLinearElementId";
|
|
10
|
-
};
|
|
11
|
-
/** indices */
|
|
12
|
-
readonly selectedPointsIndices: readonly number[] | null;
|
|
13
|
-
readonly initialState: Readonly<{
|
|
14
|
-
prevSelectedPointsIndices: readonly number[] | null;
|
|
15
|
-
/** index */
|
|
16
|
-
lastClickedPoint: number;
|
|
17
|
-
origin: Readonly<GlobalPoint> | null;
|
|
18
|
-
segmentMidpoint: {
|
|
19
|
-
value: GlobalPoint | null;
|
|
20
|
-
index: number | null;
|
|
21
|
-
added: boolean;
|
|
22
|
-
};
|
|
23
|
-
arrowStartIsInside: boolean;
|
|
24
|
-
altFocusPoint: Readonly<GlobalPoint> | null;
|
|
25
|
-
}>;
|
|
26
|
-
/** whether you're dragging a point */
|
|
27
|
-
readonly isDragging: boolean;
|
|
28
|
-
readonly lastUncommittedPoint: LocalPoint | null;
|
|
29
|
-
readonly lastCommittedPoint: LocalPoint | null;
|
|
30
|
-
readonly pointerOffset: Readonly<{
|
|
31
|
-
x: number;
|
|
32
|
-
y: number;
|
|
33
|
-
}>;
|
|
34
|
-
readonly hoverPointIndex: number;
|
|
35
|
-
readonly segmentMidPointHoveredCoords: GlobalPoint | null;
|
|
36
|
-
readonly elbowed: boolean;
|
|
37
|
-
readonly customLineAngle: number | null;
|
|
38
|
-
readonly isEditing: boolean;
|
|
39
|
-
readonly pointerDownState: never;
|
|
40
|
-
constructor(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, isEditing?: boolean);
|
|
41
|
-
static POINT_HANDLE_SIZE: number;
|
|
42
|
-
/**
|
|
43
|
-
* @param id the `elementId` from the instance of this class (so that we can
|
|
44
|
-
* statically guarantee this method returns an ExcalidrawLinearElement)
|
|
45
|
-
*/
|
|
46
|
-
static getElement<T extends ExcalidrawLinearElement>(id: InstanceType<typeof LinearElementEditor>["elementId"], elementsMap: ElementsMap): T | null;
|
|
47
|
-
static handleBoxSelection(event: PointerEvent, appState: AppState, setState: React.Component<any, AppState>["setState"], elementsMap: NonDeletedSceneElementsMap): false | undefined;
|
|
48
|
-
static handlePointerMove(event: PointerEvent, app: AppClassProperties, scenePointerX: number, scenePointerY: number, linearElementEditor: LinearElementEditor): Pick<AppState, "suggestedBinding" | "selectedLinearElement"> | null;
|
|
49
|
-
static handlePointDragging(event: PointerEvent, app: AppClassProperties, scenePointerX: number, scenePointerY: number, linearElementEditor: LinearElementEditor): Pick<AppState, "suggestedBinding" | "selectedLinearElement"> | null;
|
|
50
|
-
static handlePointerUp(event: PointerEvent, editingLinearElement: LinearElementEditor, appState: AppState, scene: Scene): LinearElementEditor;
|
|
51
|
-
static getEditorMidPoints: (element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, appState: InteractiveCanvasAppState) => (GlobalPoint | null)[];
|
|
52
|
-
static getSegmentMidpointHitCoords: (linearElementEditor: LinearElementEditor, scenePointer: {
|
|
53
|
-
x: number;
|
|
54
|
-
y: number;
|
|
55
|
-
}, appState: AppState, elementsMap: ElementsMap) => GlobalPoint | null;
|
|
56
|
-
static isSegmentTooShort<P extends GlobalPoint | LocalPoint>(element: NonDeleted<ExcalidrawLinearElement>, startPoint: P, endPoint: P, index: number, zoom: Zoom): boolean;
|
|
57
|
-
static getSegmentMidPoint(element: NonDeleted<ExcalidrawLinearElement>, index: number): GlobalPoint;
|
|
58
|
-
static getSegmentMidPointIndex(linearElementEditor: LinearElementEditor, appState: AppState, midPoint: GlobalPoint, elementsMap: ElementsMap): number;
|
|
59
|
-
static handlePointerDown(event: React.PointerEvent<HTMLElement>, app: AppClassProperties, store: Store, scenePointer: {
|
|
60
|
-
x: number;
|
|
61
|
-
y: number;
|
|
62
|
-
}, linearElementEditor: LinearElementEditor, scene: Scene): {
|
|
63
|
-
didAddPoint: boolean;
|
|
64
|
-
hitElement: NonDeleted<ExcalidrawElement> | null;
|
|
65
|
-
linearElementEditor: LinearElementEditor | null;
|
|
66
|
-
};
|
|
67
|
-
static arePointsEqual<Point extends LocalPoint | GlobalPoint>(point1: Point | null, point2: Point | null): boolean;
|
|
68
|
-
static handlePointerMoveInEditMode(event: React.PointerEvent<HTMLCanvasElement>, scenePointerX: number, scenePointerY: number, app: AppClassProperties): LinearElementEditor | null;
|
|
69
|
-
/** scene coords */
|
|
70
|
-
static getPointGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, p: LocalPoint, elementsMap: ElementsMap): GlobalPoint;
|
|
71
|
-
/** scene coords */
|
|
72
|
-
static getPointsGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap): GlobalPoint[];
|
|
73
|
-
static getPointAtIndexGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, indexMaybeFromEnd: number, // -1 for last element
|
|
74
|
-
elementsMap: ElementsMap): GlobalPoint;
|
|
75
|
-
static pointFromAbsoluteCoords(element: NonDeleted<ExcalidrawLinearElement>, absoluteCoords: GlobalPoint, elementsMap: ElementsMap): LocalPoint;
|
|
76
|
-
static getPointIndexUnderCursor(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, zoom: AppState["zoom"], x: number, y: number): number;
|
|
77
|
-
static createPointAt(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, scenePointerX: number, scenePointerY: number, gridSize: NullableGridSize): LocalPoint;
|
|
78
|
-
/**
|
|
79
|
-
* Normalizes line points so that the start point is at [0,0]. This is
|
|
80
|
-
* expected in various parts of the codebase.
|
|
81
|
-
*
|
|
82
|
-
* Also returns normalized x and y coords to account for the normalization
|
|
83
|
-
* of the points.
|
|
84
|
-
*/
|
|
85
|
-
static getNormalizeElementPointsAndCoords(element: ExcalidrawLinearElement): {
|
|
86
|
-
points: LocalPoint[];
|
|
87
|
-
x: number;
|
|
88
|
-
y: number;
|
|
89
|
-
};
|
|
90
|
-
static duplicateSelectedPoints(appState: AppState, scene: Scene): AppState;
|
|
91
|
-
static deletePoints(element: NonDeleted<ExcalidrawLinearElement>, app: AppClassProperties, pointIndices: readonly number[]): void;
|
|
92
|
-
static addPoints(element: NonDeleted<ExcalidrawLinearElement>, scene: Scene, addedPoints: LocalPoint[]): void;
|
|
93
|
-
static movePoints(element: NonDeleted<ExcalidrawLinearElement>, scene: Scene, pointUpdates: PointsPositionUpdates, otherUpdates?: {
|
|
94
|
-
startBinding?: FixedPointBinding | null;
|
|
95
|
-
endBinding?: FixedPointBinding | null;
|
|
96
|
-
moveMidPointsWithElement?: boolean | null;
|
|
97
|
-
}): void;
|
|
98
|
-
static shouldAddMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, appState: AppState, elementsMap: ElementsMap): boolean;
|
|
99
|
-
static addMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, app: AppClassProperties, snapToGrid: boolean, scene: Scene): {
|
|
100
|
-
pointerDownState: LinearElementEditor["initialState"];
|
|
101
|
-
selectedPointsIndices: LinearElementEditor["selectedPointsIndices"];
|
|
102
|
-
} | undefined;
|
|
103
|
-
private static _updatePoints;
|
|
104
|
-
private static _getShiftLockedDelta;
|
|
105
|
-
static getBoundTextElementPosition: (element: ExcalidrawLinearElement, boundTextElement: ExcalidrawTextElementWithContainer, elementsMap: ElementsMap) => {
|
|
106
|
-
x: number;
|
|
107
|
-
y: number;
|
|
108
|
-
};
|
|
109
|
-
static getMinMaxXYWithBoundText: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, elementBounds: Bounds, boundTextElement: ExcalidrawTextElementWithContainer) => [number, number, number, number, number, number];
|
|
110
|
-
static getElementAbsoluteCoords: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, includeBoundText?: boolean) => [number, number, number, number, number, number];
|
|
111
|
-
static moveFixedSegment(linearElement: LinearElementEditor, index: number, x: number, y: number, scene: Scene): Pick<LinearElementEditor, "segmentMidPointHoveredCoords" | "initialState">;
|
|
112
|
-
static deleteFixedSegment(element: ExcalidrawElbowArrowElement, scene: Scene, index: number): void;
|
|
113
|
-
}
|
|
1
|
+
import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
|
|
2
|
+
import { type Store } from "@excalidraw/element";
|
|
3
|
+
import type { AppState, PointerCoords, InteractiveCanvasAppState, AppClassProperties, NullableGridSize, Zoom } from "@excalidraw/excalidraw/types";
|
|
4
|
+
import type { Scene } from "./Scene";
|
|
5
|
+
import type { Bounds } from "./bounds";
|
|
6
|
+
import type { NonDeleted, ExcalidrawLinearElement, ExcalidrawElement, ExcalidrawTextElementWithContainer, ElementsMap, NonDeletedSceneElementsMap, FixedPointBinding, ExcalidrawElbowArrowElement, PointsPositionUpdates } from "./types";
|
|
7
|
+
export declare class LinearElementEditor {
|
|
8
|
+
readonly elementId: ExcalidrawElement["id"] & {
|
|
9
|
+
_brand: "excalidrawLinearElementId";
|
|
10
|
+
};
|
|
11
|
+
/** indices */
|
|
12
|
+
readonly selectedPointsIndices: readonly number[] | null;
|
|
13
|
+
readonly initialState: Readonly<{
|
|
14
|
+
prevSelectedPointsIndices: readonly number[] | null;
|
|
15
|
+
/** index */
|
|
16
|
+
lastClickedPoint: number;
|
|
17
|
+
origin: Readonly<GlobalPoint> | null;
|
|
18
|
+
segmentMidpoint: {
|
|
19
|
+
value: GlobalPoint | null;
|
|
20
|
+
index: number | null;
|
|
21
|
+
added: boolean;
|
|
22
|
+
};
|
|
23
|
+
arrowStartIsInside: boolean;
|
|
24
|
+
altFocusPoint: Readonly<GlobalPoint> | null;
|
|
25
|
+
}>;
|
|
26
|
+
/** whether you're dragging a point */
|
|
27
|
+
readonly isDragging: boolean;
|
|
28
|
+
readonly lastUncommittedPoint: LocalPoint | null;
|
|
29
|
+
readonly lastCommittedPoint: LocalPoint | null;
|
|
30
|
+
readonly pointerOffset: Readonly<{
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
}>;
|
|
34
|
+
readonly hoverPointIndex: number;
|
|
35
|
+
readonly segmentMidPointHoveredCoords: GlobalPoint | null;
|
|
36
|
+
readonly elbowed: boolean;
|
|
37
|
+
readonly customLineAngle: number | null;
|
|
38
|
+
readonly isEditing: boolean;
|
|
39
|
+
readonly pointerDownState: never;
|
|
40
|
+
constructor(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, isEditing?: boolean);
|
|
41
|
+
static POINT_HANDLE_SIZE: number;
|
|
42
|
+
/**
|
|
43
|
+
* @param id the `elementId` from the instance of this class (so that we can
|
|
44
|
+
* statically guarantee this method returns an ExcalidrawLinearElement)
|
|
45
|
+
*/
|
|
46
|
+
static getElement<T extends ExcalidrawLinearElement>(id: InstanceType<typeof LinearElementEditor>["elementId"], elementsMap: ElementsMap): T | null;
|
|
47
|
+
static handleBoxSelection(event: PointerEvent, appState: AppState, setState: React.Component<any, AppState>["setState"], elementsMap: NonDeletedSceneElementsMap): false | undefined;
|
|
48
|
+
static handlePointerMove(event: PointerEvent, app: AppClassProperties, scenePointerX: number, scenePointerY: number, linearElementEditor: LinearElementEditor): Pick<AppState, "suggestedBinding" | "selectedLinearElement"> | null;
|
|
49
|
+
static handlePointDragging(event: PointerEvent, app: AppClassProperties, scenePointerX: number, scenePointerY: number, linearElementEditor: LinearElementEditor): Pick<AppState, "suggestedBinding" | "selectedLinearElement"> | null;
|
|
50
|
+
static handlePointerUp(event: PointerEvent, editingLinearElement: LinearElementEditor, appState: AppState, scene: Scene): LinearElementEditor;
|
|
51
|
+
static getEditorMidPoints: (element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, appState: InteractiveCanvasAppState) => (GlobalPoint | null)[];
|
|
52
|
+
static getSegmentMidpointHitCoords: (linearElementEditor: LinearElementEditor, scenePointer: {
|
|
53
|
+
x: number;
|
|
54
|
+
y: number;
|
|
55
|
+
}, appState: AppState, elementsMap: ElementsMap) => GlobalPoint | null;
|
|
56
|
+
static isSegmentTooShort<P extends GlobalPoint | LocalPoint>(element: NonDeleted<ExcalidrawLinearElement>, startPoint: P, endPoint: P, index: number, zoom: Zoom): boolean;
|
|
57
|
+
static getSegmentMidPoint(element: NonDeleted<ExcalidrawLinearElement>, index: number): GlobalPoint;
|
|
58
|
+
static getSegmentMidPointIndex(linearElementEditor: LinearElementEditor, appState: AppState, midPoint: GlobalPoint, elementsMap: ElementsMap): number;
|
|
59
|
+
static handlePointerDown(event: React.PointerEvent<HTMLElement>, app: AppClassProperties, store: Store, scenePointer: {
|
|
60
|
+
x: number;
|
|
61
|
+
y: number;
|
|
62
|
+
}, linearElementEditor: LinearElementEditor, scene: Scene): {
|
|
63
|
+
didAddPoint: boolean;
|
|
64
|
+
hitElement: NonDeleted<ExcalidrawElement> | null;
|
|
65
|
+
linearElementEditor: LinearElementEditor | null;
|
|
66
|
+
};
|
|
67
|
+
static arePointsEqual<Point extends LocalPoint | GlobalPoint>(point1: Point | null, point2: Point | null): boolean;
|
|
68
|
+
static handlePointerMoveInEditMode(event: React.PointerEvent<HTMLCanvasElement>, scenePointerX: number, scenePointerY: number, app: AppClassProperties): LinearElementEditor | null;
|
|
69
|
+
/** scene coords */
|
|
70
|
+
static getPointGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, p: LocalPoint, elementsMap: ElementsMap): GlobalPoint;
|
|
71
|
+
/** scene coords */
|
|
72
|
+
static getPointsGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap): GlobalPoint[];
|
|
73
|
+
static getPointAtIndexGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, indexMaybeFromEnd: number, // -1 for last element
|
|
74
|
+
elementsMap: ElementsMap): GlobalPoint;
|
|
75
|
+
static pointFromAbsoluteCoords(element: NonDeleted<ExcalidrawLinearElement>, absoluteCoords: GlobalPoint, elementsMap: ElementsMap): LocalPoint;
|
|
76
|
+
static getPointIndexUnderCursor(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, zoom: AppState["zoom"], x: number, y: number): number;
|
|
77
|
+
static createPointAt(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, scenePointerX: number, scenePointerY: number, gridSize: NullableGridSize): LocalPoint;
|
|
78
|
+
/**
|
|
79
|
+
* Normalizes line points so that the start point is at [0,0]. This is
|
|
80
|
+
* expected in various parts of the codebase.
|
|
81
|
+
*
|
|
82
|
+
* Also returns normalized x and y coords to account for the normalization
|
|
83
|
+
* of the points.
|
|
84
|
+
*/
|
|
85
|
+
static getNormalizeElementPointsAndCoords(element: ExcalidrawLinearElement): {
|
|
86
|
+
points: LocalPoint[];
|
|
87
|
+
x: number;
|
|
88
|
+
y: number;
|
|
89
|
+
};
|
|
90
|
+
static duplicateSelectedPoints(appState: AppState, scene: Scene): AppState;
|
|
91
|
+
static deletePoints(element: NonDeleted<ExcalidrawLinearElement>, app: AppClassProperties, pointIndices: readonly number[]): void;
|
|
92
|
+
static addPoints(element: NonDeleted<ExcalidrawLinearElement>, scene: Scene, addedPoints: LocalPoint[]): void;
|
|
93
|
+
static movePoints(element: NonDeleted<ExcalidrawLinearElement>, scene: Scene, pointUpdates: PointsPositionUpdates, otherUpdates?: {
|
|
94
|
+
startBinding?: FixedPointBinding | null;
|
|
95
|
+
endBinding?: FixedPointBinding | null;
|
|
96
|
+
moveMidPointsWithElement?: boolean | null;
|
|
97
|
+
}): void;
|
|
98
|
+
static shouldAddMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, appState: AppState, elementsMap: ElementsMap): boolean;
|
|
99
|
+
static addMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, app: AppClassProperties, snapToGrid: boolean, scene: Scene): {
|
|
100
|
+
pointerDownState: LinearElementEditor["initialState"];
|
|
101
|
+
selectedPointsIndices: LinearElementEditor["selectedPointsIndices"];
|
|
102
|
+
} | undefined;
|
|
103
|
+
private static _updatePoints;
|
|
104
|
+
private static _getShiftLockedDelta;
|
|
105
|
+
static getBoundTextElementPosition: (element: ExcalidrawLinearElement, boundTextElement: ExcalidrawTextElementWithContainer, elementsMap: ElementsMap) => {
|
|
106
|
+
x: number;
|
|
107
|
+
y: number;
|
|
108
|
+
};
|
|
109
|
+
static getMinMaxXYWithBoundText: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, elementBounds: Bounds, boundTextElement: ExcalidrawTextElementWithContainer) => [number, number, number, number, number, number];
|
|
110
|
+
static getElementAbsoluteCoords: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, includeBoundText?: boolean) => [number, number, number, number, number, number];
|
|
111
|
+
static moveFixedSegment(linearElement: LinearElementEditor, index: number, x: number, y: number, scene: Scene): Pick<LinearElementEditor, "segmentMidPointHoveredCoords" | "initialState">;
|
|
112
|
+
static deleteFixedSegment(element: ExcalidrawElbowArrowElement, scene: Scene, index: number): void;
|
|
113
|
+
}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
2
|
-
import type { ElementsMap, ExcalidrawElement } from "./types";
|
|
3
|
-
export type ElementUpdate<TElement extends ExcalidrawElement> = Omit<Partial<TElement>, "id" | "updated">;
|
|
4
|
-
/**
|
|
5
|
-
* This function tracks updates of text elements for the purposes for collaboration.
|
|
6
|
-
* The version is used to compare updates when more than one user is working in
|
|
7
|
-
* the same drawing.
|
|
8
|
-
*
|
|
9
|
-
* WARNING: this won't trigger the component to update, so if you need to trigger component update,
|
|
10
|
-
* use `scene.mutateElement` or `ExcalidrawImperativeAPI.mutateElement` instead.
|
|
11
|
-
*/
|
|
12
|
-
export declare const mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, elementsMap: ElementsMap, updates: ElementUpdate<TElement>, options?: {
|
|
13
|
-
isDragging?: boolean;
|
|
14
|
-
}) => TElement;
|
|
15
|
-
export declare const newElementWith: <TElement extends ExcalidrawElement>(element: TElement, updates: ElementUpdate<TElement>,
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
2
|
+
import type { ElementsMap, ExcalidrawElement } from "./types";
|
|
3
|
+
export type ElementUpdate<TElement extends ExcalidrawElement> = Omit<Partial<TElement>, "id" | "updated">;
|
|
4
|
+
/**
|
|
5
|
+
* This function tracks updates of text elements for the purposes for collaboration.
|
|
6
|
+
* The version is used to compare updates when more than one user is working in
|
|
7
|
+
* the same drawing.
|
|
8
|
+
*
|
|
9
|
+
* WARNING: this won't trigger the component to update, so if you need to trigger component update,
|
|
10
|
+
* use `scene.mutateElement` or `ExcalidrawImperativeAPI.mutateElement` instead.
|
|
11
|
+
*/
|
|
12
|
+
export declare const mutateElement: <TElement extends Mutable<ExcalidrawElement>>(element: TElement, elementsMap: ElementsMap, updates: ElementUpdate<TElement>, options?: {
|
|
13
|
+
isDragging?: boolean;
|
|
14
|
+
}) => TElement;
|
|
15
|
+
export declare const newElementWith: <TElement extends ExcalidrawElement>(element: TElement, updates: ElementUpdate<TElement>,
|
|
16
|
+
/** pass `true` to always regenerate */
|
|
17
|
+
force?: boolean) => TElement;
|
|
18
|
+
/**
|
|
19
|
+
* Mutates element, bumping `version`, `versionNonce`, and `updated`.
|
|
20
|
+
*
|
|
21
|
+
* NOTE: does not trigger re-render.
|
|
22
|
+
*/
|
|
23
|
+
export declare const bumpVersion: <T extends Mutable<ExcalidrawElement>>(element: T, version?: ExcalidrawElement["version"]) => T;
|