@zsviczian/excalidraw 0.17.1-obsidian-45 → 0.17.1-obsidian-47
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 +152 -76
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +66 -0
- package/dist/styles.development.css +1 -1
- package/dist/styles.production.css +1 -1
- package/package.json +3 -1
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +575 -575
- package/types/excalidraw/actions/actionAlign.d.ts +108 -108
- package/types/excalidraw/actions/actionBoundText.d.ts +420 -420
- package/types/excalidraw/actions/actionCanvas.d.ts +2802 -2802
- package/types/excalidraw/actions/actionClipboard.d.ts +1436 -1436
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +609 -609
- package/types/excalidraw/actions/actionDistribute.d.ts +34 -34
- package/types/excalidraw/actions/actionDuplicateSelection.d.ts +21 -21
- package/types/excalidraw/actions/actionElementLock.d.ts +408 -408
- package/types/excalidraw/actions/actionExport.d.ts +1794 -1794
- package/types/excalidraw/actions/actionFinalize.d.ts +389 -389
- package/types/excalidraw/actions/actionFlip.d.ts +34 -34
- package/types/excalidraw/actions/actionFrame.d.ts +815 -815
- package/types/excalidraw/actions/actionGroup.d.ts +418 -418
- package/types/excalidraw/actions/actionHistory.d.ts +7 -7
- package/types/excalidraw/actions/actionLinearEditor.d.ts +205 -205
- package/types/excalidraw/actions/actionLink.d.ts +205 -205
- package/types/excalidraw/actions/actionMenu.d.ts +598 -598
- package/types/excalidraw/actions/actionNavigate.d.ts +394 -394
- package/types/excalidraw/actions/actionProperties.d.ts +3006 -3006
- package/types/excalidraw/actions/actionSelectAll.d.ts +204 -204
- package/types/excalidraw/actions/actionStyles.d.ts +218 -218
- package/types/excalidraw/actions/actionTextAutoResize.d.ts +17 -17
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +207 -207
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +205 -205
- package/types/excalidraw/actions/actionToggleStats.d.ts +205 -205
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +206 -206
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +206 -206
- package/types/excalidraw/actions/actionZindex.d.ts +74 -74
- package/types/excalidraw/actions/index.d.ts +25 -25
- 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/align.d.ts +6 -6
- package/types/excalidraw/analytics.d.ts +1 -1
- package/types/excalidraw/animated-trail.d.ts +33 -33
- package/types/excalidraw/animation-frame-handler.d.ts +16 -16
- package/types/excalidraw/appState.d.ts +89 -89
- package/types/excalidraw/binaryheap.d.ts +12 -12
- package/types/excalidraw/change.d.ts +191 -191
- package/types/excalidraw/charts.d.ts +27 -27
- package/types/excalidraw/clients.d.ts +14 -14
- package/types/excalidraw/clipboard.d.ts +44 -44
- package/types/excalidraw/colors.d.ts +61 -61
- package/types/excalidraw/components/Actions.d.ts +34 -34
- package/types/excalidraw/components/ActiveConfirmDialog.d.ts +4 -4
- package/types/excalidraw/components/App.d.ts +526 -527
- 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 +14 -14
- package/types/excalidraw/components/ButtonIconCycle.d.ts +10 -10
- package/types/excalidraw/components/ButtonIconSelect.d.ts +19 -19
- package/types/excalidraw/components/ButtonSelect.d.ts +9 -9
- 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 +9 -9
- package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +19 -19
- package/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +8 -8
- package/types/excalidraw/components/ColorPicker/HotkeyLabel.d.ts +8 -8
- package/types/excalidraw/components/ColorPicker/Picker.d.ts +18 -18
- 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 +8 -8
- 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 +18 -18
- package/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +2 -2
- package/types/excalidraw/components/CommandPalette/types.d.ts +25 -25
- package/types/excalidraw/components/ConfirmDialog.d.ts +10 -10
- package/types/excalidraw/components/ContextMenu.d.ts +16 -16
- package/types/excalidraw/components/DarkModeToggle.d.ts +7 -7
- package/types/excalidraw/components/DefaultSidebar.d.ts +29 -29
- 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/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 +9 -9
- package/types/excalidraw/components/FollowMode/FollowMode.d.ts +10 -10
- package/types/excalidraw/components/FontPicker/FontPicker.d.ts +21 -21
- package/types/excalidraw/components/FontPicker/FontPickerList.d.ts +25 -25
- package/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +6 -6
- 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 +10 -10
- package/types/excalidraw/components/IconPicker.d.ts +14 -14
- 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 +3 -3
- 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 +30 -30
- package/types/excalidraw/components/LibraryMenu.d.ts +24 -24
- 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/LoadingMessage.d.ts +5 -5
- package/types/excalidraw/components/LockButton.d.ts +10 -10
- package/types/excalidraw/components/MagicButton.d.ts +9 -9
- package/types/excalidraw/components/MobileMenu.d.ts +24 -24
- 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 +15 -15
- package/types/excalidraw/components/ProjectName.d.ts +10 -10
- package/types/excalidraw/components/PropertiesPopover.d.ts +15 -15
- 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/SVGLayer.d.ts +7 -7
- package/types/excalidraw/components/ScrollableList.d.ts +8 -8
- package/types/excalidraw/components/Section.d.ts +6 -6
- package/types/excalidraw/components/ShareableLinkDialog.d.ts +7 -7
- package/types/excalidraw/components/Sidebar/Sidebar.d.ts +76 -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 +33 -33
- package/types/excalidraw/components/Spinner.d.ts +8 -8
- package/types/excalidraw/components/Stack.d.ts +16 -16
- 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 +8 -8
- package/types/excalidraw/components/Stats/Dimension.d.ts +11 -11
- package/types/excalidraw/components/Stats/DragInput.d.ts +34 -34
- 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 +26 -26
- package/types/excalidraw/components/Switch.d.ts +9 -9
- package/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +14 -14
- 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 +19 -19
- package/types/excalidraw/components/Toast.d.ts +9 -9
- package/types/excalidraw/components/ToolButton.d.ts +49 -49
- package/types/excalidraw/components/Tooltip.d.ts +18 -18
- package/types/excalidraw/components/Trans.d.ts +9 -9
- package/types/excalidraw/components/UserList.d.ts +18 -18
- package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +29 -29
- 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 +86 -86
- package/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +15 -15
- package/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -11
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +45 -45
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +7 -7
- 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 +15 -15
- 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 +18 -18
- package/types/excalidraw/components/hyperlink/helpers.d.ts +7 -7
- package/types/excalidraw/components/icons.d.ts +211 -211
- package/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +9 -9
- package/types/excalidraw/components/main-menu/DefaultItems.d.ts +58 -58
- package/types/excalidraw/components/main-menu/MainMenu.d.ts +80 -80
- package/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +59 -59
- 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/constants.d.ts +314 -314
- package/types/excalidraw/context/tunnels.d.ts +20 -20
- 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 +49 -49
- package/types/excalidraw/data/encode.d.ts +53 -53
- package/types/excalidraw/data/encryption.d.ts +9 -9
- package/types/excalidraw/data/filesystem.d.ts +20 -20
- package/types/excalidraw/data/image.d.ts +15 -15
- package/types/excalidraw/data/index.d.ts +22 -22
- package/types/excalidraw/data/json.d.ts +16 -16
- package/types/excalidraw/data/library.d.ts +106 -106
- package/types/excalidraw/data/reconcile.d.ts +6 -6
- package/types/excalidraw/data/resave.d.ts +5 -5
- package/types/excalidraw/data/restore.d.ts +21 -21
- package/types/excalidraw/data/transform.d.ts +81 -81
- package/types/excalidraw/data/types.d.ts +45 -45
- package/types/excalidraw/data/url.d.ts +8 -8
- 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 +1 -1
- package/types/excalidraw/distribute.d.ts +6 -6
- package/types/excalidraw/element/ElementCanvasButtons.d.ts +7 -7
- package/types/excalidraw/element/binding.d.ts +97 -97
- package/types/excalidraw/element/bounds.d.ts +74 -74
- package/types/excalidraw/element/collision.d.ts +16 -16
- package/types/excalidraw/element/containerCache.d.ts +11 -11
- package/types/excalidraw/element/dragElements.d.ts +32 -32
- package/types/excalidraw/element/embeddable.d.ts +211 -211
- package/types/excalidraw/element/flowchart.d.ts +25 -25
- package/types/excalidraw/element/heading.d.ts +11 -11
- package/types/excalidraw/element/image.d.ts +32 -32
- package/types/excalidraw/element/index.d.ts +26 -26
- package/types/excalidraw/element/linearElementEditor.d.ts +344 -344
- package/types/excalidraw/element/mutateElement.d.ts +11 -11
- package/types/excalidraw/element/newElement.d.ts +106 -106
- package/types/excalidraw/element/resizeElements.d.ts +17 -17
- package/types/excalidraw/element/resizeTest.d.ts +14 -14
- package/types/excalidraw/element/routing.d.ts +10 -10
- package/types/excalidraw/element/showSelectedShapeActions.d.ts +3 -3
- package/types/excalidraw/element/sizeHelpers.d.ts +40 -40
- package/types/excalidraw/element/sortElements.d.ts +2 -2
- package/types/excalidraw/element/textElement.d.ts +70 -70
- package/types/excalidraw/element/textWysiwyg.d.ts +22 -22
- package/types/excalidraw/element/transformHandles.d.ts +54 -54
- package/types/excalidraw/element/typeChecks.d.ts +42 -42
- package/types/excalidraw/element/types.d.ts +253 -253
- package/types/excalidraw/emitter.d.ts +16 -16
- 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/errors.d.ts +16 -16
- package/types/excalidraw/fonts/ExcalidrawFont.d.ts +37 -21
- package/types/excalidraw/fonts/index.d.ts +83 -83
- package/types/excalidraw/fonts/metadata.d.ts +35 -35
- package/types/excalidraw/fonts/wasm/hb-subset.bindings.d.ts +45 -0
- package/types/excalidraw/fonts/wasm/hb-subset.loader.d.ts +5 -0
- package/types/excalidraw/fonts/wasm/hb-subset.wasm.d.ts +2 -0
- package/types/excalidraw/fonts/wasm/woff2.bindings.d.ts +31 -0
- package/types/excalidraw/fonts/wasm/woff2.loader.d.ts +6 -0
- package/types/excalidraw/fonts/wasm/woff2.wasm.d.ts +2 -0
- package/types/excalidraw/fractionalIndex.d.ts +48 -48
- package/types/excalidraw/frame.d.ts +63 -63
- package/types/excalidraw/ga.d.ts +63 -63
- package/types/excalidraw/gadirections.d.ts +8 -8
- package/types/excalidraw/galines.d.ts +22 -22
- package/types/excalidraw/gapoints.d.ts +7 -7
- package/types/excalidraw/gatransforms.d.ts +10 -10
- package/types/excalidraw/gesture.d.ts +6 -6
- package/types/excalidraw/groups.d.ts +33 -33
- package/types/excalidraw/history.d.ts +40 -40
- 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 +19 -19
- 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/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 +61 -61
- package/types/excalidraw/jotai.d.ts +34 -34
- package/types/excalidraw/keys.d.ts +82 -82
- package/types/excalidraw/laser-trails.d.ts +20 -20
- package/types/excalidraw/main.d.ts +2 -2
- package/types/excalidraw/math.d.ts +79 -79
- package/types/excalidraw/mermaid.d.ts +2 -2
- package/types/excalidraw/obsidianUtils.d.ts +17 -17
- package/types/excalidraw/points.d.ts +7 -7
- package/types/excalidraw/polyfill.d.ts +2 -2
- package/types/excalidraw/publicPath.d.ts +1 -1
- package/types/excalidraw/queue.d.ts +9 -9
- package/types/excalidraw/random.d.ts +4 -4
- package/types/excalidraw/reactUtils.d.ts +14 -14
- package/types/excalidraw/renderer/easingFunctions.d.ts +6 -6
- package/types/excalidraw/renderer/helpers.d.ts +13 -13
- package/types/excalidraw/renderer/interactiveScene.d.ts +20 -20
- package/types/excalidraw/renderer/renderElement.d.ts +27 -27
- 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 +11 -11
- package/types/excalidraw/renderer/staticSvgScene.d.ts +5 -5
- package/types/excalidraw/scene/Renderer.d.ts +28 -28
- package/types/excalidraw/scene/Scene.d.ts +78 -78
- package/types/excalidraw/scene/Shape.d.ts +17 -17
- package/types/excalidraw/scene/ShapeCache.d.ts +25 -25
- package/types/excalidraw/scene/comparisons.d.ts +11 -11
- package/types/excalidraw/scene/export.d.ts +29 -29
- 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 +17 -17
- package/types/excalidraw/scene/scrollbars.d.ts +12 -12
- package/types/excalidraw/scene/selection.d.ts +32 -32
- package/types/excalidraw/scene/types.d.ts +112 -112
- package/types/excalidraw/scene/zoom.d.ts +12 -12
- package/types/excalidraw/shapes.d.ts +70 -70
- package/types/excalidraw/snapping.d.ts +109 -109
- package/types/excalidraw/store.d.ts +129 -129
- package/types/excalidraw/types.d.ts +700 -700
- package/types/excalidraw/utility-types.d.ts +31 -31
- package/types/excalidraw/utils.d.ts +243 -243
- package/types/excalidraw/visualdebug.d.ts +34 -34
- package/types/excalidraw/webpack.dev.config.d.ts +81 -81
- package/types/excalidraw/webpack.prod.config.d.ts +97 -97
- package/types/excalidraw/zindex.d.ts +6 -6
- package/types/utils/bbox.d.ts +11 -11
- package/types/utils/collision.d.ts +4 -4
- package/types/utils/export.d.ts +44 -44
- package/types/utils/geometry/geometry.d.ts +89 -89
- package/types/utils/geometry/shape.d.ts +56 -56
- package/types/utils/index.d.ts +4 -4
- package/types/utils/withinBounds.d.ts +19 -19
- package/types/excalidraw/components/MagicSettings.d.ts +0 -8
- package/types/excalidraw/components/Stats.d.ts +0 -11
- package/types/excalidraw/data/magic.d.ts +0 -23
- package/types/excalidraw/scene/Fonts.d.ts +0 -19
|
@@ -1,344 +1,344 @@
|
|
|
1
|
-
import type { NonDeleted, ExcalidrawLinearElement, ExcalidrawElement, PointBinding, ExcalidrawBindableElement, ExcalidrawTextElementWithContainer, ElementsMap, NonDeletedSceneElementsMap, OrderedExcalidrawElement, SceneElementsMap } from "./types";
|
|
2
|
-
import type { Bounds } from "./bounds";
|
|
3
|
-
import type { Point, AppState, PointerCoords, InteractiveCanvasAppState, AppClassProperties, NullableGridSize } from "../types";
|
|
4
|
-
import type { Store } from "../store";
|
|
5
|
-
import type Scene from "../scene/Scene";
|
|
6
|
-
declare const editorMidPointsCache: {
|
|
7
|
-
version: number | null;
|
|
8
|
-
points: (Point | null)[];
|
|
9
|
-
zoom: number | null;
|
|
10
|
-
};
|
|
11
|
-
export declare class LinearElementEditor {
|
|
12
|
-
readonly elementId: ExcalidrawElement["id"] & {
|
|
13
|
-
_brand: "excalidrawLinearElementId";
|
|
14
|
-
};
|
|
15
|
-
/** indices */
|
|
16
|
-
readonly selectedPointsIndices: readonly number[] | null;
|
|
17
|
-
readonly pointerDownState: Readonly<{
|
|
18
|
-
prevSelectedPointsIndices: readonly number[] | null;
|
|
19
|
-
/** index */
|
|
20
|
-
lastClickedPoint: number;
|
|
21
|
-
lastClickedIsEndPoint: boolean;
|
|
22
|
-
origin: Readonly<{
|
|
23
|
-
x: number;
|
|
24
|
-
y: number;
|
|
25
|
-
}> | null;
|
|
26
|
-
segmentMidpoint: {
|
|
27
|
-
value: Point | null;
|
|
28
|
-
index: number | null;
|
|
29
|
-
added: boolean;
|
|
30
|
-
};
|
|
31
|
-
}>;
|
|
32
|
-
/** whether you're dragging a point */
|
|
33
|
-
readonly isDragging: boolean;
|
|
34
|
-
readonly lastUncommittedPoint: Point | null;
|
|
35
|
-
readonly pointerOffset: Readonly<{
|
|
36
|
-
x: number;
|
|
37
|
-
y: number;
|
|
38
|
-
}>;
|
|
39
|
-
readonly startBindingElement: ExcalidrawBindableElement | null | "keep";
|
|
40
|
-
readonly endBindingElement: ExcalidrawBindableElement | null | "keep";
|
|
41
|
-
readonly hoverPointIndex: number;
|
|
42
|
-
readonly segmentMidPointHoveredCoords: Point | null;
|
|
43
|
-
constructor(element: NonDeleted<ExcalidrawLinearElement>);
|
|
44
|
-
static POINT_HANDLE_SIZE: number;
|
|
45
|
-
/**
|
|
46
|
-
* @param id the `elementId` from the instance of this class (so that we can
|
|
47
|
-
* statically guarantee this method returns an ExcalidrawLinearElement)
|
|
48
|
-
*/
|
|
49
|
-
static getElement(id: InstanceType<typeof LinearElementEditor>["elementId"], elementsMap: ElementsMap): NonDeleted<ExcalidrawLinearElement> | null;
|
|
50
|
-
static handleBoxSelection(event: PointerEvent, appState: AppState, setState: React.Component<any, AppState>["setState"], elementsMap: NonDeletedSceneElementsMap): false | undefined;
|
|
51
|
-
/** @returns whether point was dragged */
|
|
52
|
-
static handlePointDragging(event: PointerEvent, app: AppClassProperties, scenePointerX: number, scenePointerY: number, maybeSuggestBinding: (element: NonDeleted<ExcalidrawLinearElement>, pointSceneCoords: {
|
|
53
|
-
x: number;
|
|
54
|
-
y: number;
|
|
55
|
-
}[]) => void, linearElementEditor: LinearElementEditor, scene: Scene): boolean;
|
|
56
|
-
static handlePointerUp(event: PointerEvent, editingLinearElement: LinearElementEditor, appState: AppState, scene: Scene): LinearElementEditor;
|
|
57
|
-
static getEditorMidPoints: (element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, appState: InteractiveCanvasAppState) => (typeof editorMidPointsCache)["points"];
|
|
58
|
-
static updateEditorMidPointsCache: (element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, appState: InteractiveCanvasAppState) => void;
|
|
59
|
-
static getSegmentMidpointHitCoords: (linearElementEditor: LinearElementEditor, scenePointer: {
|
|
60
|
-
x: number;
|
|
61
|
-
y: number;
|
|
62
|
-
}, appState: AppState, elementsMap: ElementsMap) => readonly [number, number] | null;
|
|
63
|
-
static isSegmentTooShort(element: NonDeleted<ExcalidrawLinearElement>, startPoint: Point, endPoint: Point, zoom: AppState["zoom"]): boolean;
|
|
64
|
-
static getSegmentMidPoint(element: NonDeleted<ExcalidrawLinearElement>, startPoint: Point, endPoint: Point, endPointIndex: number, elementsMap: ElementsMap): readonly [number, number];
|
|
65
|
-
static getSegmentMidPointIndex(linearElementEditor: LinearElementEditor, appState: AppState, midPoint: Point, elementsMap: ElementsMap): number;
|
|
66
|
-
static handlePointerDown(event: React.PointerEvent<HTMLElement>, app: AppClassProperties, store: Store, scenePointer: {
|
|
67
|
-
x: number;
|
|
68
|
-
y: number;
|
|
69
|
-
}, linearElementEditor: LinearElementEditor, scene: Scene): {
|
|
70
|
-
didAddPoint: boolean;
|
|
71
|
-
hitElement: NonDeleted<ExcalidrawElement> | null;
|
|
72
|
-
linearElementEditor: LinearElementEditor | null;
|
|
73
|
-
};
|
|
74
|
-
static arePointsEqual(point1: Point | null, point2: Point | null): boolean;
|
|
75
|
-
static handlePointerMove(event: React.PointerEvent<HTMLCanvasElement>, scenePointerX: number, scenePointerY: number, app: AppClassProperties, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): LinearElementEditor | null;
|
|
76
|
-
/** scene coords */
|
|
77
|
-
static getPointGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, point: Point, elementsMap: ElementsMap): readonly [number, number];
|
|
78
|
-
/** scene coords */
|
|
79
|
-
static getPointsGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap): Point[];
|
|
80
|
-
static getPointAtIndexGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, indexMaybeFromEnd: number, // -1 for last element
|
|
81
|
-
elementsMap: ElementsMap): Point;
|
|
82
|
-
static pointFromAbsoluteCoords(element: NonDeleted<ExcalidrawLinearElement>, absoluteCoords: Point, elementsMap: ElementsMap): Point;
|
|
83
|
-
static getPointIndexUnderCursor(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, zoom: AppState["zoom"], x: number, y: number): number;
|
|
84
|
-
static createPointAt(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, scenePointerX: number, scenePointerY: number, gridSize: NullableGridSize): Point;
|
|
85
|
-
/**
|
|
86
|
-
* Normalizes line points so that the start point is at [0,0]. This is
|
|
87
|
-
* expected in various parts of the codebase. Also returns new x/y to account
|
|
88
|
-
* for the potential normalization.
|
|
89
|
-
*/
|
|
90
|
-
static getNormalizedPoints(element: ExcalidrawLinearElement): {
|
|
91
|
-
points: (readonly [number, number])[];
|
|
92
|
-
x: number;
|
|
93
|
-
y: number;
|
|
94
|
-
};
|
|
95
|
-
static normalizePoints(element: NonDeleted<ExcalidrawLinearElement>): void;
|
|
96
|
-
static duplicateSelectedPoints(appState: AppState, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): false | {
|
|
97
|
-
appState: {
|
|
98
|
-
editingLinearElement: {
|
|
99
|
-
selectedPointsIndices: number[];
|
|
100
|
-
elementId: string & {
|
|
101
|
-
_brand: "excalidrawLinearElementId";
|
|
102
|
-
};
|
|
103
|
-
pointerDownState: Readonly<{
|
|
104
|
-
prevSelectedPointsIndices: readonly number[] | null;
|
|
105
|
-
/** index */
|
|
106
|
-
lastClickedPoint: number;
|
|
107
|
-
lastClickedIsEndPoint: boolean;
|
|
108
|
-
origin: Readonly<{
|
|
109
|
-
x: number;
|
|
110
|
-
y: number;
|
|
111
|
-
}> | null;
|
|
112
|
-
segmentMidpoint: {
|
|
113
|
-
value: readonly [number, number] | null;
|
|
114
|
-
index: number | null;
|
|
115
|
-
added: boolean;
|
|
116
|
-
};
|
|
117
|
-
}>;
|
|
118
|
-
isDragging: boolean;
|
|
119
|
-
lastUncommittedPoint: readonly [number, number] | null;
|
|
120
|
-
pointerOffset: Readonly<{
|
|
121
|
-
x: number;
|
|
122
|
-
y: number;
|
|
123
|
-
}>;
|
|
124
|
-
startBindingElement: ExcalidrawBindableElement | "keep" | null;
|
|
125
|
-
endBindingElement: ExcalidrawBindableElement | "keep" | null;
|
|
126
|
-
hoverPointIndex: number;
|
|
127
|
-
segmentMidPointHoveredCoords: readonly [number, number] | null;
|
|
128
|
-
};
|
|
129
|
-
contextMenu: {
|
|
130
|
-
items: import("../components/ContextMenu").ContextMenuItems;
|
|
131
|
-
top: number;
|
|
132
|
-
left: number;
|
|
133
|
-
} | null;
|
|
134
|
-
showWelcomeScreen: boolean;
|
|
135
|
-
isLoading: boolean;
|
|
136
|
-
errorMessage: import("react").ReactNode;
|
|
137
|
-
activeEmbeddable: {
|
|
138
|
-
element: import("./types").NonDeletedExcalidrawElement;
|
|
139
|
-
state: "active" | "hover";
|
|
140
|
-
} | null;
|
|
141
|
-
newElement: NonDeleted<import("./types").ExcalidrawNonSelectionElement> | null;
|
|
142
|
-
resizingElement: import("./types").NonDeletedExcalidrawElement | null;
|
|
143
|
-
multiElement: NonDeleted<ExcalidrawLinearElement> | null;
|
|
144
|
-
selectionElement: import("./types").NonDeletedExcalidrawElement | null;
|
|
145
|
-
isBindingEnabled: boolean;
|
|
146
|
-
startBoundElement: NonDeleted<ExcalidrawBindableElement> | null;
|
|
147
|
-
suggestedBindings: import("./binding").SuggestedBinding[];
|
|
148
|
-
frameToHighlight: NonDeleted<import("./types").ExcalidrawFrameLikeElement> | null;
|
|
149
|
-
frameRendering: {
|
|
150
|
-
enabled: boolean;
|
|
151
|
-
name: boolean;
|
|
152
|
-
outline: boolean;
|
|
153
|
-
clip: boolean;
|
|
154
|
-
};
|
|
155
|
-
editingFrame: string | null;
|
|
156
|
-
elementsToHighlight: NonDeleted<ExcalidrawElement>[] | null;
|
|
157
|
-
editingTextElement: import("./types").NonDeletedExcalidrawElement | null;
|
|
158
|
-
activeTool: {
|
|
159
|
-
lastActiveTool: import("../types").ActiveTool | null;
|
|
160
|
-
locked: boolean;
|
|
161
|
-
} & import("../types").ActiveTool;
|
|
162
|
-
penMode: boolean;
|
|
163
|
-
penDetected: boolean;
|
|
164
|
-
exportBackground: boolean;
|
|
165
|
-
exportEmbedScene: boolean;
|
|
166
|
-
exportWithDarkMode: boolean;
|
|
167
|
-
exportScale: number;
|
|
168
|
-
currentItemStrokeColor: string;
|
|
169
|
-
currentItemBackgroundColor: string;
|
|
170
|
-
currentItemFillStyle: import("./types").FillStyle;
|
|
171
|
-
currentItemStrokeWidth: number;
|
|
172
|
-
currentItemStrokeStyle: import("./types").StrokeStyle;
|
|
173
|
-
currentItemRoughness: number;
|
|
174
|
-
currentItemOpacity: number;
|
|
175
|
-
currentItemFontFamily: number;
|
|
176
|
-
currentItemFontSize: number;
|
|
177
|
-
currentItemTextAlign: string;
|
|
178
|
-
currentItemStartArrowhead: import("./types").Arrowhead | null;
|
|
179
|
-
currentItemEndArrowhead: import("./types").Arrowhead | null;
|
|
180
|
-
currentHoveredFontFamily: number | null;
|
|
181
|
-
currentItemRoundness: import("./types").StrokeRoundness;
|
|
182
|
-
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
183
|
-
viewBackgroundColor: string;
|
|
184
|
-
scrollX: number;
|
|
185
|
-
scrollY: number;
|
|
186
|
-
cursorButton: "up" | "down";
|
|
187
|
-
scrolledOutside: boolean;
|
|
188
|
-
name: string | null;
|
|
189
|
-
isResizing: boolean;
|
|
190
|
-
isRotating: boolean;
|
|
191
|
-
zoom: Readonly<{
|
|
192
|
-
value: import("../types").NormalizedZoomValue;
|
|
193
|
-
}>;
|
|
194
|
-
openMenu: "canvas" | "shape" | null;
|
|
195
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
196
|
-
openSidebar: {
|
|
197
|
-
name: string;
|
|
198
|
-
tab?: string | undefined;
|
|
199
|
-
} | null;
|
|
200
|
-
openDialog: {
|
|
201
|
-
name: "imageExport" | "help" | "jsonExport";
|
|
202
|
-
} | {
|
|
203
|
-
name: "ttd";
|
|
204
|
-
tab: "mermaid" | "text-to-diagram";
|
|
205
|
-
} | {
|
|
206
|
-
name: "commandPalette";
|
|
207
|
-
} | null;
|
|
208
|
-
defaultSidebarDockedPreference: boolean;
|
|
209
|
-
lastPointerDownWith: import("./types").PointerType;
|
|
210
|
-
selectedElementIds: Readonly<{
|
|
211
|
-
[id: string]: true;
|
|
212
|
-
}>;
|
|
213
|
-
previousSelectedElementIds: {
|
|
214
|
-
[id: string]: true;
|
|
215
|
-
};
|
|
216
|
-
selectedElementsAreBeingDragged: boolean;
|
|
217
|
-
shouldCacheIgnoreZoom: boolean;
|
|
218
|
-
toast: {
|
|
219
|
-
message: string;
|
|
220
|
-
closable?: boolean | undefined;
|
|
221
|
-
duration?: number | undefined;
|
|
222
|
-
} | null;
|
|
223
|
-
zenModeEnabled: boolean;
|
|
224
|
-
theme: import("./types").Theme;
|
|
225
|
-
gridSize: number;
|
|
226
|
-
gridStep: number;
|
|
227
|
-
gridModeEnabled: boolean;
|
|
228
|
-
viewModeEnabled: boolean;
|
|
229
|
-
selectedGroupIds: {
|
|
230
|
-
[groupId: string]: boolean;
|
|
231
|
-
};
|
|
232
|
-
editingGroupId: string | null;
|
|
233
|
-
width: number;
|
|
234
|
-
height: number;
|
|
235
|
-
offsetTop: number;
|
|
236
|
-
offsetLeft: number;
|
|
237
|
-
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
238
|
-
collaborators: Map<import("../types").SocketId, Readonly<{
|
|
239
|
-
pointer?: import("../types").CollaboratorPointer | undefined;
|
|
240
|
-
button?: "up" | "down" | undefined;
|
|
241
|
-
selectedElementIds?: Readonly<{
|
|
242
|
-
[id: string]: true;
|
|
243
|
-
}> | undefined;
|
|
244
|
-
username?: string | null | undefined;
|
|
245
|
-
userState?: import("../types").UserIdleState | undefined;
|
|
246
|
-
color?: {
|
|
247
|
-
background: string;
|
|
248
|
-
stroke: string;
|
|
249
|
-
} | undefined;
|
|
250
|
-
avatarUrl?: string | undefined;
|
|
251
|
-
id?: string | undefined;
|
|
252
|
-
socketId?: import("../types").SocketId | undefined;
|
|
253
|
-
isCurrentUser?: boolean | undefined; /** whether you're dragging a point */
|
|
254
|
-
isInCall?: boolean | undefined;
|
|
255
|
-
isSpeaking?: boolean | undefined;
|
|
256
|
-
isMuted?: boolean | undefined;
|
|
257
|
-
}>>;
|
|
258
|
-
stats: {
|
|
259
|
-
open: boolean;
|
|
260
|
-
panels: number;
|
|
261
|
-
};
|
|
262
|
-
currentChartType: import("./types").ChartType;
|
|
263
|
-
pasteDialog: {
|
|
264
|
-
shown: false;
|
|
265
|
-
data: null;
|
|
266
|
-
} | {
|
|
267
|
-
shown: true;
|
|
268
|
-
data: import("../charts").Spreadsheet;
|
|
269
|
-
};
|
|
270
|
-
pendingImageElementId: string | null;
|
|
271
|
-
showHyperlinkPopup: false | "info" | "editor";
|
|
272
|
-
linkOpacity: number;
|
|
273
|
-
trayModeEnabled: boolean;
|
|
274
|
-
colorPalette?: {
|
|
275
|
-
canvasBackground: import("../colors").ColorPaletteCustom;
|
|
276
|
-
elementBackground: import("../colors").ColorPaletteCustom;
|
|
277
|
-
elementStroke: import("../colors").ColorPaletteCustom;
|
|
278
|
-
topPicks: {
|
|
279
|
-
canvasBackground: [string, string, string, string, string];
|
|
280
|
-
elementStroke: [string, string, string, string, string];
|
|
281
|
-
elementBackground: [string, string, string, string, string];
|
|
282
|
-
};
|
|
283
|
-
} | undefined;
|
|
284
|
-
allowWheelZoom?: boolean | undefined;
|
|
285
|
-
allowPinchZoom?: boolean | undefined;
|
|
286
|
-
pinnedScripts?: string[] | undefined;
|
|
287
|
-
customPens?: any[] | undefined;
|
|
288
|
-
currentStrokeOptions?: any;
|
|
289
|
-
resetCustomPen?: any;
|
|
290
|
-
gridColor: {
|
|
291
|
-
Bold: string;
|
|
292
|
-
Regular: string;
|
|
293
|
-
};
|
|
294
|
-
highlightSearchResult: boolean;
|
|
295
|
-
dynamicStyle: {
|
|
296
|
-
[x: string]: string;
|
|
297
|
-
};
|
|
298
|
-
frameColor: {
|
|
299
|
-
stroke: string;
|
|
300
|
-
fill: string;
|
|
301
|
-
nameColor: string;
|
|
302
|
-
};
|
|
303
|
-
invertBindingBehaviour: boolean;
|
|
304
|
-
selectedLinearElement: LinearElementEditor | null;
|
|
305
|
-
snapLines: readonly import("../snapping").SnapLine[];
|
|
306
|
-
originSnapOffset: {
|
|
307
|
-
x: number;
|
|
308
|
-
y: number;
|
|
309
|
-
} | null;
|
|
310
|
-
objectsSnapModeEnabled: boolean;
|
|
311
|
-
userToFollow: import("../types").UserToFollow | null;
|
|
312
|
-
followedBy: Set<import("../types").SocketId>;
|
|
313
|
-
};
|
|
314
|
-
};
|
|
315
|
-
static deletePoints(element: NonDeleted<ExcalidrawLinearElement>, pointIndices: readonly number[], elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): void;
|
|
316
|
-
static addPoints(element: NonDeleted<ExcalidrawLinearElement>, targetPoints: {
|
|
317
|
-
point: Point;
|
|
318
|
-
}[], elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): void;
|
|
319
|
-
static movePoints(element: NonDeleted<ExcalidrawLinearElement>, targetPoints: {
|
|
320
|
-
index: number;
|
|
321
|
-
point: Point;
|
|
322
|
-
isDragging?: boolean;
|
|
323
|
-
}[], elementsMap: NonDeletedSceneElementsMap | SceneElementsMap, otherUpdates?: {
|
|
324
|
-
startBinding?: PointBinding | null;
|
|
325
|
-
endBinding?: PointBinding | null;
|
|
326
|
-
}, options?: {
|
|
327
|
-
changedElements?: Map<string, OrderedExcalidrawElement>;
|
|
328
|
-
isDragging?: boolean;
|
|
329
|
-
}): void;
|
|
330
|
-
static shouldAddMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, appState: AppState, elementsMap: ElementsMap): boolean;
|
|
331
|
-
static addMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, app: AppClassProperties, snapToGrid: boolean, elementsMap: ElementsMap): {
|
|
332
|
-
pointerDownState: LinearElementEditor["pointerDownState"];
|
|
333
|
-
selectedPointsIndices: LinearElementEditor["selectedPointsIndices"];
|
|
334
|
-
} | undefined;
|
|
335
|
-
private static _updatePoints;
|
|
336
|
-
private static _getShiftLockedDelta;
|
|
337
|
-
static getBoundTextElementPosition: (element: ExcalidrawLinearElement, boundTextElement: ExcalidrawTextElementWithContainer, elementsMap: ElementsMap) => {
|
|
338
|
-
x: number;
|
|
339
|
-
y: number;
|
|
340
|
-
};
|
|
341
|
-
static getMinMaxXYWithBoundText: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, elementBounds: Bounds, boundTextElement: ExcalidrawTextElementWithContainer) => [number, number, number, number, number, number];
|
|
342
|
-
static getElementAbsoluteCoords: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, includeBoundText?: boolean) => [number, number, number, number, number, number];
|
|
343
|
-
}
|
|
344
|
-
export {};
|
|
1
|
+
import type { NonDeleted, ExcalidrawLinearElement, ExcalidrawElement, PointBinding, ExcalidrawBindableElement, ExcalidrawTextElementWithContainer, ElementsMap, NonDeletedSceneElementsMap, OrderedExcalidrawElement, SceneElementsMap } from "./types";
|
|
2
|
+
import type { Bounds } from "./bounds";
|
|
3
|
+
import type { Point, AppState, PointerCoords, InteractiveCanvasAppState, AppClassProperties, NullableGridSize } from "../types";
|
|
4
|
+
import type { Store } from "../store";
|
|
5
|
+
import type Scene from "../scene/Scene";
|
|
6
|
+
declare const editorMidPointsCache: {
|
|
7
|
+
version: number | null;
|
|
8
|
+
points: (Point | null)[];
|
|
9
|
+
zoom: number | null;
|
|
10
|
+
};
|
|
11
|
+
export declare class LinearElementEditor {
|
|
12
|
+
readonly elementId: ExcalidrawElement["id"] & {
|
|
13
|
+
_brand: "excalidrawLinearElementId";
|
|
14
|
+
};
|
|
15
|
+
/** indices */
|
|
16
|
+
readonly selectedPointsIndices: readonly number[] | null;
|
|
17
|
+
readonly pointerDownState: Readonly<{
|
|
18
|
+
prevSelectedPointsIndices: readonly number[] | null;
|
|
19
|
+
/** index */
|
|
20
|
+
lastClickedPoint: number;
|
|
21
|
+
lastClickedIsEndPoint: boolean;
|
|
22
|
+
origin: Readonly<{
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
}> | null;
|
|
26
|
+
segmentMidpoint: {
|
|
27
|
+
value: Point | null;
|
|
28
|
+
index: number | null;
|
|
29
|
+
added: boolean;
|
|
30
|
+
};
|
|
31
|
+
}>;
|
|
32
|
+
/** whether you're dragging a point */
|
|
33
|
+
readonly isDragging: boolean;
|
|
34
|
+
readonly lastUncommittedPoint: Point | null;
|
|
35
|
+
readonly pointerOffset: Readonly<{
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
}>;
|
|
39
|
+
readonly startBindingElement: ExcalidrawBindableElement | null | "keep";
|
|
40
|
+
readonly endBindingElement: ExcalidrawBindableElement | null | "keep";
|
|
41
|
+
readonly hoverPointIndex: number;
|
|
42
|
+
readonly segmentMidPointHoveredCoords: Point | null;
|
|
43
|
+
constructor(element: NonDeleted<ExcalidrawLinearElement>);
|
|
44
|
+
static POINT_HANDLE_SIZE: number;
|
|
45
|
+
/**
|
|
46
|
+
* @param id the `elementId` from the instance of this class (so that we can
|
|
47
|
+
* statically guarantee this method returns an ExcalidrawLinearElement)
|
|
48
|
+
*/
|
|
49
|
+
static getElement(id: InstanceType<typeof LinearElementEditor>["elementId"], elementsMap: ElementsMap): NonDeleted<ExcalidrawLinearElement> | null;
|
|
50
|
+
static handleBoxSelection(event: PointerEvent, appState: AppState, setState: React.Component<any, AppState>["setState"], elementsMap: NonDeletedSceneElementsMap): false | undefined;
|
|
51
|
+
/** @returns whether point was dragged */
|
|
52
|
+
static handlePointDragging(event: PointerEvent, app: AppClassProperties, scenePointerX: number, scenePointerY: number, maybeSuggestBinding: (element: NonDeleted<ExcalidrawLinearElement>, pointSceneCoords: {
|
|
53
|
+
x: number;
|
|
54
|
+
y: number;
|
|
55
|
+
}[]) => void, linearElementEditor: LinearElementEditor, scene: Scene): boolean;
|
|
56
|
+
static handlePointerUp(event: PointerEvent, editingLinearElement: LinearElementEditor, appState: AppState, scene: Scene): LinearElementEditor;
|
|
57
|
+
static getEditorMidPoints: (element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, appState: InteractiveCanvasAppState) => (typeof editorMidPointsCache)["points"];
|
|
58
|
+
static updateEditorMidPointsCache: (element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, appState: InteractiveCanvasAppState) => void;
|
|
59
|
+
static getSegmentMidpointHitCoords: (linearElementEditor: LinearElementEditor, scenePointer: {
|
|
60
|
+
x: number;
|
|
61
|
+
y: number;
|
|
62
|
+
}, appState: AppState, elementsMap: ElementsMap) => readonly [number, number] | null;
|
|
63
|
+
static isSegmentTooShort(element: NonDeleted<ExcalidrawLinearElement>, startPoint: Point, endPoint: Point, zoom: AppState["zoom"]): boolean;
|
|
64
|
+
static getSegmentMidPoint(element: NonDeleted<ExcalidrawLinearElement>, startPoint: Point, endPoint: Point, endPointIndex: number, elementsMap: ElementsMap): readonly [number, number];
|
|
65
|
+
static getSegmentMidPointIndex(linearElementEditor: LinearElementEditor, appState: AppState, midPoint: Point, elementsMap: ElementsMap): number;
|
|
66
|
+
static handlePointerDown(event: React.PointerEvent<HTMLElement>, app: AppClassProperties, store: Store, scenePointer: {
|
|
67
|
+
x: number;
|
|
68
|
+
y: number;
|
|
69
|
+
}, linearElementEditor: LinearElementEditor, scene: Scene): {
|
|
70
|
+
didAddPoint: boolean;
|
|
71
|
+
hitElement: NonDeleted<ExcalidrawElement> | null;
|
|
72
|
+
linearElementEditor: LinearElementEditor | null;
|
|
73
|
+
};
|
|
74
|
+
static arePointsEqual(point1: Point | null, point2: Point | null): boolean;
|
|
75
|
+
static handlePointerMove(event: React.PointerEvent<HTMLCanvasElement>, scenePointerX: number, scenePointerY: number, app: AppClassProperties, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): LinearElementEditor | null;
|
|
76
|
+
/** scene coords */
|
|
77
|
+
static getPointGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, point: Point, elementsMap: ElementsMap): readonly [number, number];
|
|
78
|
+
/** scene coords */
|
|
79
|
+
static getPointsGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap): Point[];
|
|
80
|
+
static getPointAtIndexGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, indexMaybeFromEnd: number, // -1 for last element
|
|
81
|
+
elementsMap: ElementsMap): Point;
|
|
82
|
+
static pointFromAbsoluteCoords(element: NonDeleted<ExcalidrawLinearElement>, absoluteCoords: Point, elementsMap: ElementsMap): Point;
|
|
83
|
+
static getPointIndexUnderCursor(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, zoom: AppState["zoom"], x: number, y: number): number;
|
|
84
|
+
static createPointAt(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, scenePointerX: number, scenePointerY: number, gridSize: NullableGridSize): Point;
|
|
85
|
+
/**
|
|
86
|
+
* Normalizes line points so that the start point is at [0,0]. This is
|
|
87
|
+
* expected in various parts of the codebase. Also returns new x/y to account
|
|
88
|
+
* for the potential normalization.
|
|
89
|
+
*/
|
|
90
|
+
static getNormalizedPoints(element: ExcalidrawLinearElement): {
|
|
91
|
+
points: (readonly [number, number])[];
|
|
92
|
+
x: number;
|
|
93
|
+
y: number;
|
|
94
|
+
};
|
|
95
|
+
static normalizePoints(element: NonDeleted<ExcalidrawLinearElement>): void;
|
|
96
|
+
static duplicateSelectedPoints(appState: AppState, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): false | {
|
|
97
|
+
appState: {
|
|
98
|
+
editingLinearElement: {
|
|
99
|
+
selectedPointsIndices: number[];
|
|
100
|
+
elementId: string & {
|
|
101
|
+
_brand: "excalidrawLinearElementId";
|
|
102
|
+
};
|
|
103
|
+
pointerDownState: Readonly<{
|
|
104
|
+
prevSelectedPointsIndices: readonly number[] | null;
|
|
105
|
+
/** index */
|
|
106
|
+
lastClickedPoint: number;
|
|
107
|
+
lastClickedIsEndPoint: boolean;
|
|
108
|
+
origin: Readonly<{
|
|
109
|
+
x: number;
|
|
110
|
+
y: number;
|
|
111
|
+
}> | null;
|
|
112
|
+
segmentMidpoint: {
|
|
113
|
+
value: readonly [number, number] | null;
|
|
114
|
+
index: number | null;
|
|
115
|
+
added: boolean;
|
|
116
|
+
};
|
|
117
|
+
}>;
|
|
118
|
+
isDragging: boolean;
|
|
119
|
+
lastUncommittedPoint: readonly [number, number] | null;
|
|
120
|
+
pointerOffset: Readonly<{
|
|
121
|
+
x: number;
|
|
122
|
+
y: number;
|
|
123
|
+
}>;
|
|
124
|
+
startBindingElement: ExcalidrawBindableElement | "keep" | null;
|
|
125
|
+
endBindingElement: ExcalidrawBindableElement | "keep" | null;
|
|
126
|
+
hoverPointIndex: number;
|
|
127
|
+
segmentMidPointHoveredCoords: readonly [number, number] | null;
|
|
128
|
+
};
|
|
129
|
+
contextMenu: {
|
|
130
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
131
|
+
top: number;
|
|
132
|
+
left: number;
|
|
133
|
+
} | null;
|
|
134
|
+
showWelcomeScreen: boolean;
|
|
135
|
+
isLoading: boolean;
|
|
136
|
+
errorMessage: import("react").ReactNode;
|
|
137
|
+
activeEmbeddable: {
|
|
138
|
+
element: import("./types").NonDeletedExcalidrawElement;
|
|
139
|
+
state: "active" | "hover";
|
|
140
|
+
} | null;
|
|
141
|
+
newElement: NonDeleted<import("./types").ExcalidrawNonSelectionElement> | null;
|
|
142
|
+
resizingElement: import("./types").NonDeletedExcalidrawElement | null;
|
|
143
|
+
multiElement: NonDeleted<ExcalidrawLinearElement> | null;
|
|
144
|
+
selectionElement: import("./types").NonDeletedExcalidrawElement | null;
|
|
145
|
+
isBindingEnabled: boolean;
|
|
146
|
+
startBoundElement: NonDeleted<ExcalidrawBindableElement> | null;
|
|
147
|
+
suggestedBindings: import("./binding").SuggestedBinding[];
|
|
148
|
+
frameToHighlight: NonDeleted<import("./types").ExcalidrawFrameLikeElement> | null;
|
|
149
|
+
frameRendering: {
|
|
150
|
+
enabled: boolean;
|
|
151
|
+
name: boolean;
|
|
152
|
+
outline: boolean;
|
|
153
|
+
clip: boolean;
|
|
154
|
+
};
|
|
155
|
+
editingFrame: string | null;
|
|
156
|
+
elementsToHighlight: NonDeleted<ExcalidrawElement>[] | null;
|
|
157
|
+
editingTextElement: import("./types").NonDeletedExcalidrawElement | null;
|
|
158
|
+
activeTool: {
|
|
159
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
160
|
+
locked: boolean;
|
|
161
|
+
} & import("../types").ActiveTool;
|
|
162
|
+
penMode: boolean;
|
|
163
|
+
penDetected: boolean;
|
|
164
|
+
exportBackground: boolean;
|
|
165
|
+
exportEmbedScene: boolean;
|
|
166
|
+
exportWithDarkMode: boolean;
|
|
167
|
+
exportScale: number;
|
|
168
|
+
currentItemStrokeColor: string;
|
|
169
|
+
currentItemBackgroundColor: string;
|
|
170
|
+
currentItemFillStyle: import("./types").FillStyle;
|
|
171
|
+
currentItemStrokeWidth: number;
|
|
172
|
+
currentItemStrokeStyle: import("./types").StrokeStyle;
|
|
173
|
+
currentItemRoughness: number;
|
|
174
|
+
currentItemOpacity: number;
|
|
175
|
+
currentItemFontFamily: number;
|
|
176
|
+
currentItemFontSize: number;
|
|
177
|
+
currentItemTextAlign: string;
|
|
178
|
+
currentItemStartArrowhead: import("./types").Arrowhead | null;
|
|
179
|
+
currentItemEndArrowhead: import("./types").Arrowhead | null;
|
|
180
|
+
currentHoveredFontFamily: number | null;
|
|
181
|
+
currentItemRoundness: import("./types").StrokeRoundness;
|
|
182
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
183
|
+
viewBackgroundColor: string;
|
|
184
|
+
scrollX: number;
|
|
185
|
+
scrollY: number;
|
|
186
|
+
cursorButton: "up" | "down";
|
|
187
|
+
scrolledOutside: boolean;
|
|
188
|
+
name: string | null;
|
|
189
|
+
isResizing: boolean;
|
|
190
|
+
isRotating: boolean;
|
|
191
|
+
zoom: Readonly<{
|
|
192
|
+
value: import("../types").NormalizedZoomValue;
|
|
193
|
+
}>;
|
|
194
|
+
openMenu: "canvas" | "shape" | null;
|
|
195
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
196
|
+
openSidebar: {
|
|
197
|
+
name: string;
|
|
198
|
+
tab?: string | undefined;
|
|
199
|
+
} | null;
|
|
200
|
+
openDialog: {
|
|
201
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
202
|
+
} | {
|
|
203
|
+
name: "ttd";
|
|
204
|
+
tab: "mermaid" | "text-to-diagram";
|
|
205
|
+
} | {
|
|
206
|
+
name: "commandPalette";
|
|
207
|
+
} | null;
|
|
208
|
+
defaultSidebarDockedPreference: boolean;
|
|
209
|
+
lastPointerDownWith: import("./types").PointerType;
|
|
210
|
+
selectedElementIds: Readonly<{
|
|
211
|
+
[id: string]: true;
|
|
212
|
+
}>;
|
|
213
|
+
previousSelectedElementIds: {
|
|
214
|
+
[id: string]: true;
|
|
215
|
+
};
|
|
216
|
+
selectedElementsAreBeingDragged: boolean;
|
|
217
|
+
shouldCacheIgnoreZoom: boolean;
|
|
218
|
+
toast: {
|
|
219
|
+
message: string;
|
|
220
|
+
closable?: boolean | undefined;
|
|
221
|
+
duration?: number | undefined;
|
|
222
|
+
} | null;
|
|
223
|
+
zenModeEnabled: boolean;
|
|
224
|
+
theme: import("./types").Theme;
|
|
225
|
+
gridSize: number;
|
|
226
|
+
gridStep: number;
|
|
227
|
+
gridModeEnabled: boolean;
|
|
228
|
+
viewModeEnabled: boolean;
|
|
229
|
+
selectedGroupIds: {
|
|
230
|
+
[groupId: string]: boolean;
|
|
231
|
+
};
|
|
232
|
+
editingGroupId: string | null;
|
|
233
|
+
width: number;
|
|
234
|
+
height: number;
|
|
235
|
+
offsetTop: number;
|
|
236
|
+
offsetLeft: number;
|
|
237
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
238
|
+
collaborators: Map<import("../types").SocketId, Readonly<{
|
|
239
|
+
pointer?: import("../types").CollaboratorPointer | undefined;
|
|
240
|
+
button?: "up" | "down" | undefined;
|
|
241
|
+
selectedElementIds?: Readonly<{
|
|
242
|
+
[id: string]: true;
|
|
243
|
+
}> | undefined;
|
|
244
|
+
username?: string | null | undefined;
|
|
245
|
+
userState?: import("../types").UserIdleState | undefined;
|
|
246
|
+
color?: {
|
|
247
|
+
background: string;
|
|
248
|
+
stroke: string;
|
|
249
|
+
} | undefined;
|
|
250
|
+
avatarUrl?: string | undefined;
|
|
251
|
+
id?: string | undefined;
|
|
252
|
+
socketId?: import("../types").SocketId | undefined;
|
|
253
|
+
isCurrentUser?: boolean | undefined; /** whether you're dragging a point */
|
|
254
|
+
isInCall?: boolean | undefined;
|
|
255
|
+
isSpeaking?: boolean | undefined;
|
|
256
|
+
isMuted?: boolean | undefined;
|
|
257
|
+
}>>;
|
|
258
|
+
stats: {
|
|
259
|
+
open: boolean;
|
|
260
|
+
panels: number;
|
|
261
|
+
};
|
|
262
|
+
currentChartType: import("./types").ChartType;
|
|
263
|
+
pasteDialog: {
|
|
264
|
+
shown: false;
|
|
265
|
+
data: null;
|
|
266
|
+
} | {
|
|
267
|
+
shown: true;
|
|
268
|
+
data: import("../charts").Spreadsheet;
|
|
269
|
+
};
|
|
270
|
+
pendingImageElementId: string | null;
|
|
271
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
272
|
+
linkOpacity: number;
|
|
273
|
+
trayModeEnabled: boolean;
|
|
274
|
+
colorPalette?: {
|
|
275
|
+
canvasBackground: import("../colors").ColorPaletteCustom;
|
|
276
|
+
elementBackground: import("../colors").ColorPaletteCustom;
|
|
277
|
+
elementStroke: import("../colors").ColorPaletteCustom;
|
|
278
|
+
topPicks: {
|
|
279
|
+
canvasBackground: [string, string, string, string, string];
|
|
280
|
+
elementStroke: [string, string, string, string, string];
|
|
281
|
+
elementBackground: [string, string, string, string, string];
|
|
282
|
+
};
|
|
283
|
+
} | undefined;
|
|
284
|
+
allowWheelZoom?: boolean | undefined;
|
|
285
|
+
allowPinchZoom?: boolean | undefined;
|
|
286
|
+
pinnedScripts?: string[] | undefined;
|
|
287
|
+
customPens?: any[] | undefined;
|
|
288
|
+
currentStrokeOptions?: any;
|
|
289
|
+
resetCustomPen?: any;
|
|
290
|
+
gridColor: {
|
|
291
|
+
Bold: string;
|
|
292
|
+
Regular: string;
|
|
293
|
+
};
|
|
294
|
+
highlightSearchResult: boolean;
|
|
295
|
+
dynamicStyle: {
|
|
296
|
+
[x: string]: string;
|
|
297
|
+
};
|
|
298
|
+
frameColor: {
|
|
299
|
+
stroke: string;
|
|
300
|
+
fill: string;
|
|
301
|
+
nameColor: string;
|
|
302
|
+
};
|
|
303
|
+
invertBindingBehaviour: boolean;
|
|
304
|
+
selectedLinearElement: LinearElementEditor | null;
|
|
305
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
306
|
+
originSnapOffset: {
|
|
307
|
+
x: number;
|
|
308
|
+
y: number;
|
|
309
|
+
} | null;
|
|
310
|
+
objectsSnapModeEnabled: boolean;
|
|
311
|
+
userToFollow: import("../types").UserToFollow | null;
|
|
312
|
+
followedBy: Set<import("../types").SocketId>;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
static deletePoints(element: NonDeleted<ExcalidrawLinearElement>, pointIndices: readonly number[], elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): void;
|
|
316
|
+
static addPoints(element: NonDeleted<ExcalidrawLinearElement>, targetPoints: {
|
|
317
|
+
point: Point;
|
|
318
|
+
}[], elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): void;
|
|
319
|
+
static movePoints(element: NonDeleted<ExcalidrawLinearElement>, targetPoints: {
|
|
320
|
+
index: number;
|
|
321
|
+
point: Point;
|
|
322
|
+
isDragging?: boolean;
|
|
323
|
+
}[], elementsMap: NonDeletedSceneElementsMap | SceneElementsMap, otherUpdates?: {
|
|
324
|
+
startBinding?: PointBinding | null;
|
|
325
|
+
endBinding?: PointBinding | null;
|
|
326
|
+
}, options?: {
|
|
327
|
+
changedElements?: Map<string, OrderedExcalidrawElement>;
|
|
328
|
+
isDragging?: boolean;
|
|
329
|
+
}): void;
|
|
330
|
+
static shouldAddMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, appState: AppState, elementsMap: ElementsMap): boolean;
|
|
331
|
+
static addMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, app: AppClassProperties, snapToGrid: boolean, elementsMap: ElementsMap): {
|
|
332
|
+
pointerDownState: LinearElementEditor["pointerDownState"];
|
|
333
|
+
selectedPointsIndices: LinearElementEditor["selectedPointsIndices"];
|
|
334
|
+
} | undefined;
|
|
335
|
+
private static _updatePoints;
|
|
336
|
+
private static _getShiftLockedDelta;
|
|
337
|
+
static getBoundTextElementPosition: (element: ExcalidrawLinearElement, boundTextElement: ExcalidrawTextElementWithContainer, elementsMap: ElementsMap) => {
|
|
338
|
+
x: number;
|
|
339
|
+
y: number;
|
|
340
|
+
};
|
|
341
|
+
static getMinMaxXYWithBoundText: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, elementBounds: Bounds, boundTextElement: ExcalidrawTextElementWithContainer) => [number, number, number, number, number, number];
|
|
342
|
+
static getElementAbsoluteCoords: (element: ExcalidrawLinearElement, elementsMap: ElementsMap, includeBoundText?: boolean) => [number, number, number, number, number, number];
|
|
343
|
+
}
|
|
344
|
+
export {};
|