@zsviczian/excalidraw 0.17.6-3 → 0.17.6-30
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 +13100 -1540
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +21 -1
- package/dist/styles.development.css +490 -376
- package/dist/styles.production.css +10 -8
- package/package.json +5 -4
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +0 -605
- package/types/excalidraw/actions/actionAlign.d.ts +0 -108
- package/types/excalidraw/actions/actionBoundText.d.ts +0 -440
- package/types/excalidraw/actions/actionCanvas.d.ts +0 -2958
- package/types/excalidraw/actions/actionClipboard.d.ts +0 -1322
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +0 -640
- package/types/excalidraw/actions/actionDistribute.d.ts +0 -34
- package/types/excalidraw/actions/actionDuplicateSelection.d.ts +0 -21
- package/types/excalidraw/actions/actionElementLock.d.ts +0 -428
- package/types/excalidraw/actions/actionExport.d.ts +0 -1884
- package/types/excalidraw/actions/actionFinalize.d.ts +0 -409
- package/types/excalidraw/actions/actionFlip.d.ts +0 -34
- package/types/excalidraw/actions/actionFrame.d.ts +0 -855
- package/types/excalidraw/actions/actionGroup.d.ts +0 -438
- package/types/excalidraw/actions/actionHistory.d.ts +0 -7
- package/types/excalidraw/actions/actionLinearEditor.d.ts +0 -215
- package/types/excalidraw/actions/actionLink.d.ts +0 -215
- package/types/excalidraw/actions/actionMenu.d.ts +0 -628
- package/types/excalidraw/actions/actionNavigate.d.ts +0 -414
- package/types/excalidraw/actions/actionProperties.d.ts +0 -3156
- package/types/excalidraw/actions/actionSelectAll.d.ts +0 -214
- package/types/excalidraw/actions/actionStyles.d.ts +0 -228
- package/types/excalidraw/actions/actionTextAutoResize.d.ts +0 -17
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +0 -217
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +0 -215
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +0 -407
- package/types/excalidraw/actions/actionToggleStats.d.ts +0 -215
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +0 -216
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +0 -216
- package/types/excalidraw/actions/actionZindex.d.ts +0 -74
- package/types/excalidraw/actions/index.d.ts +0 -26
- package/types/excalidraw/actions/manager.d.ts +0 -21
- package/types/excalidraw/actions/register.d.ts +0 -5
- package/types/excalidraw/actions/shortcuts.d.ts +0 -4
- package/types/excalidraw/actions/types.d.ts +0 -46
- package/types/excalidraw/align.d.ts +0 -6
- package/types/excalidraw/analytics.d.ts +0 -1
- package/types/excalidraw/animated-trail.d.ts +0 -33
- package/types/excalidraw/animation-frame-handler.d.ts +0 -16
- package/types/excalidraw/appState.d.ts +0 -89
- package/types/excalidraw/binaryheap.d.ts +0 -12
- package/types/excalidraw/change.d.ts +0 -191
- package/types/excalidraw/charts.d.ts +0 -27
- package/types/excalidraw/clients.d.ts +0 -14
- package/types/excalidraw/clipboard.d.ts +0 -44
- package/types/excalidraw/colors.d.ts +0 -61
- package/types/excalidraw/components/Actions.d.ts +0 -34
- package/types/excalidraw/components/ActiveConfirmDialog.d.ts +0 -4
- package/types/excalidraw/components/App.d.ts +0 -535
- package/types/excalidraw/components/Avatar.d.ts +0 -11
- package/types/excalidraw/components/BraveMeasureTextError.d.ts +0 -2
- package/types/excalidraw/components/Button.d.ts +0 -17
- package/types/excalidraw/components/ButtonIcon.d.ts +0 -14
- package/types/excalidraw/components/ButtonIconCycle.d.ts +0 -10
- package/types/excalidraw/components/ButtonIconSelect.d.ts +0 -19
- package/types/excalidraw/components/ButtonSelect.d.ts +0 -9
- package/types/excalidraw/components/ButtonSeparator.d.ts +0 -1
- package/types/excalidraw/components/Card.d.ts +0 -6
- package/types/excalidraw/components/CheckboxItem.d.ts +0 -8
- package/types/excalidraw/components/ColorPicker/ColorInput.d.ts +0 -9
- package/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -19
- package/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +0 -8
- package/types/excalidraw/components/ColorPicker/HotkeyLabel.d.ts +0 -8
- package/types/excalidraw/components/ColorPicker/Picker.d.ts +0 -18
- package/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +0 -10
- package/types/excalidraw/components/ColorPicker/PickerHeading.d.ts +0 -5
- package/types/excalidraw/components/ColorPicker/ShadeList.d.ts +0 -8
- package/types/excalidraw/components/ColorPicker/TopPicks.d.ts +0 -9
- package/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +0 -21
- package/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -20
- package/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +0 -18
- package/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +0 -2
- package/types/excalidraw/components/CommandPalette/types.d.ts +0 -25
- package/types/excalidraw/components/ConfirmDialog.d.ts +0 -10
- package/types/excalidraw/components/ContextMenu.d.ts +0 -16
- package/types/excalidraw/components/DarkModeToggle.d.ts +0 -7
- package/types/excalidraw/components/DefaultSidebar.d.ts +0 -30
- package/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
- package/types/excalidraw/components/Dialog.d.ts +0 -13
- package/types/excalidraw/components/DialogActionButton.d.ts +0 -10
- package/types/excalidraw/components/ErrorDialog.d.ts +0 -5
- package/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -15
- package/types/excalidraw/components/EyeDropper.d.ts +0 -27
- package/types/excalidraw/components/FilledButton.d.ts +0 -18
- package/types/excalidraw/components/FixedSideContainer.d.ts +0 -9
- package/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
- package/types/excalidraw/components/FontPicker/FontPicker.d.ts +0 -21
- package/types/excalidraw/components/FontPicker/FontPickerList.d.ts +0 -25
- package/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +0 -6
- package/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -13
- package/types/excalidraw/components/HandButton.d.ts +0 -10
- package/types/excalidraw/components/HelpButton.d.ts +0 -7
- package/types/excalidraw/components/HelpDialog.d.ts +0 -4
- package/types/excalidraw/components/HintViewer.d.ts +0 -10
- package/types/excalidraw/components/IconPicker.d.ts +0 -14
- package/types/excalidraw/components/ImageExportDialog.d.ts +0 -14
- package/types/excalidraw/components/InitializeApp.d.ts +0 -10
- package/types/excalidraw/components/InlineIcon.d.ts +0 -3
- package/types/excalidraw/components/Island.d.ts +0 -10
- package/types/excalidraw/components/JSONExportDialog.d.ts +0 -15
- package/types/excalidraw/components/LaserPointerButton.d.ts +0 -10
- package/types/excalidraw/components/LayerUI.d.ts +0 -30
- package/types/excalidraw/components/LibraryMenu.d.ts +0 -24
- package/types/excalidraw/components/LibraryMenuBrowseButton.d.ts +0 -7
- package/types/excalidraw/components/LibraryMenuControlButtons.d.ts +0 -9
- package/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +0 -17
- package/types/excalidraw/components/LibraryMenuItems.d.ts +0 -14
- package/types/excalidraw/components/LibraryMenuSection.d.ts +0 -23
- package/types/excalidraw/components/LibraryUnit.d.ts +0 -14
- package/types/excalidraw/components/LoadingMessage.d.ts +0 -5
- package/types/excalidraw/components/LockButton.d.ts +0 -10
- package/types/excalidraw/components/MagicButton.d.ts +0 -9
- package/types/excalidraw/components/MagicSettings.d.ts +0 -8
- package/types/excalidraw/components/MobileMenu.d.ts +0 -24
- package/types/excalidraw/components/Modal.d.ts +0 -14
- package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +0 -17
- package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +0 -17
- package/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +0 -22
- package/types/excalidraw/components/Paragraph.d.ts +0 -4
- package/types/excalidraw/components/PasteChartDialog.d.ts +0 -8
- package/types/excalidraw/components/PenModeButton.d.ts +0 -12
- package/types/excalidraw/components/Popover.d.ts +0 -15
- package/types/excalidraw/components/ProjectName.d.ts +0 -10
- package/types/excalidraw/components/PropertiesPopover.d.ts +0 -15
- package/types/excalidraw/components/PublishLibrary.d.ts +0 -16
- package/types/excalidraw/components/QuickSearch.d.ts +0 -9
- package/types/excalidraw/components/RadioGroup.d.ts +0 -13
- package/types/excalidraw/components/SVGLayer.d.ts +0 -7
- package/types/excalidraw/components/ScrollableList.d.ts +0 -8
- package/types/excalidraw/components/SearchMenu.d.ts +0 -5
- package/types/excalidraw/components/Section.d.ts +0 -6
- package/types/excalidraw/components/ShareableLinkDialog.d.ts +0 -7
- package/types/excalidraw/components/Sidebar/Sidebar.d.ts +0 -76
- package/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +0 -7
- package/types/excalidraw/components/Sidebar/SidebarTab.d.ts +0 -8
- package/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +0 -9
- package/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +0 -6
- package/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +0 -6
- package/types/excalidraw/components/Sidebar/SidebarTrigger.d.ts +0 -6
- package/types/excalidraw/components/Sidebar/common.d.ts +0 -33
- package/types/excalidraw/components/Spinner.d.ts +0 -8
- package/types/excalidraw/components/Stack.d.ts +0 -16
- package/types/excalidraw/components/Stats/Angle.d.ts +0 -11
- package/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -10
- package/types/excalidraw/components/Stats/CanvasGridSize.d.ts +0 -10
- package/types/excalidraw/components/Stats/Collapsible.d.ts +0 -8
- package/types/excalidraw/components/Stats/Dimension.d.ts +0 -11
- package/types/excalidraw/components/Stats/DragInput.d.ts +0 -34
- package/types/excalidraw/components/Stats/FontSize.d.ts +0 -11
- package/types/excalidraw/components/Stats/MultiAngle.d.ts +0 -11
- package/types/excalidraw/components/Stats/MultiDimension.d.ts +0 -14
- package/types/excalidraw/components/Stats/MultiFontSize.d.ts +0 -12
- package/types/excalidraw/components/Stats/MultiPosition.d.ts +0 -14
- package/types/excalidraw/components/Stats/Position.d.ts +0 -12
- package/types/excalidraw/components/Stats/index.d.ts +0 -35
- package/types/excalidraw/components/Stats/utils.d.ts +0 -26
- package/types/excalidraw/components/Stats.d.ts +0 -11
- package/types/excalidraw/components/Switch.d.ts +0 -9
- package/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +0 -14
- package/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +0 -29
- package/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +0 -9
- package/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +0 -7
- package/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +0 -17
- package/types/excalidraw/components/TTDDialog/TTDDialogPanels.d.ts +0 -4
- package/types/excalidraw/components/TTDDialog/TTDDialogSubmitShortcut.d.ts +0 -1
- package/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +0 -7
- package/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +0 -8
- package/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +0 -6
- package/types/excalidraw/components/TTDDialog/TTDDialogTabs.d.ts +0 -11
- package/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
- package/types/excalidraw/components/TTDDialog/common.d.ts +0 -32
- package/types/excalidraw/components/TextField.d.ts +0 -21
- package/types/excalidraw/components/Toast.d.ts +0 -9
- package/types/excalidraw/components/ToolButton.d.ts +0 -49
- package/types/excalidraw/components/Tooltip.d.ts +0 -18
- package/types/excalidraw/components/Trans.d.ts +0 -9
- package/types/excalidraw/components/UserList.d.ts +0 -18
- package/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +0 -29
- package/types/excalidraw/components/canvases/NewElementCanvas.d.ts +0 -14
- package/types/excalidraw/components/canvases/StaticCanvas.d.ts +0 -19
- package/types/excalidraw/components/canvases/index.d.ts +0 -3
- package/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +0 -86
- package/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +0 -15
- package/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +0 -11
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +0 -45
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +0 -7
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +0 -17
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +0 -7
- package/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +0 -15
- package/types/excalidraw/components/dropdownMenu/DropdownMenuSeparator.d.ts +0 -5
- package/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +0 -10
- package/types/excalidraw/components/dropdownMenu/common.d.ts +0 -6
- package/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +0 -3
- package/types/excalidraw/components/footer/Footer.d.ts +0 -12
- package/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
- package/types/excalidraw/components/hoc/withInternalFallback.d.ts +0 -4
- package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +0 -18
- package/types/excalidraw/components/hyperlink/helpers.d.ts +0 -8
- package/types/excalidraw/components/icons.d.ts +0 -212
- package/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -9
- package/types/excalidraw/components/main-menu/DefaultItems.d.ts +0 -64
- package/types/excalidraw/components/main-menu/MainMenu.d.ts +0 -80
- package/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -59
- package/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
- package/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -86
- package/types/excalidraw/constants.d.ts +0 -322
- package/types/excalidraw/context/tunnels.d.ts +0 -20
- package/types/excalidraw/context/ui-appState.d.ts +0 -4
- package/types/excalidraw/cursor.d.ts +0 -6
- package/types/excalidraw/data/EditorLocalStorage.d.ts +0 -8
- package/types/excalidraw/data/ai/types.d.ts +0 -242
- package/types/excalidraw/data/blob.d.ts +0 -49
- package/types/excalidraw/data/encode.d.ts +0 -54
- package/types/excalidraw/data/encryption.d.ts +0 -9
- package/types/excalidraw/data/filesystem.d.ts +0 -20
- package/types/excalidraw/data/image.d.ts +0 -15
- package/types/excalidraw/data/index.d.ts +0 -22
- package/types/excalidraw/data/json.d.ts +0 -16
- package/types/excalidraw/data/library.d.ts +0 -106
- package/types/excalidraw/data/magic.d.ts +0 -23
- package/types/excalidraw/data/reconcile.d.ts +0 -6
- package/types/excalidraw/data/resave.d.ts +0 -5
- package/types/excalidraw/data/restore.d.ts +0 -21
- package/types/excalidraw/data/transform.d.ts +0 -81
- package/types/excalidraw/data/types.d.ts +0 -45
- package/types/excalidraw/data/url.d.ts +0 -8
- package/types/excalidraw/deburr.d.ts +0 -1
- package/types/excalidraw/dist/excalidraw.development.d.ts +0 -2
- package/types/excalidraw/dist/excalidraw.production.min.d.ts +0 -1
- package/types/excalidraw/distribute.d.ts +0 -6
- package/types/excalidraw/element/ElementCanvasButtons.d.ts +0 -7
- package/types/excalidraw/element/binding.d.ts +0 -99
- package/types/excalidraw/element/bounds.d.ts +0 -76
- package/types/excalidraw/element/collision.d.ts +0 -17
- package/types/excalidraw/element/containerCache.d.ts +0 -11
- package/types/excalidraw/element/dragElements.d.ts +0 -32
- package/types/excalidraw/element/embeddable.d.ts +0 -221
- package/types/excalidraw/element/flowchart.d.ts +0 -25
- package/types/excalidraw/element/heading.d.ts +0 -12
- package/types/excalidraw/element/image.d.ts +0 -32
- package/types/excalidraw/element/index.d.ts +0 -26
- package/types/excalidraw/element/linearElementEditor.d.ts +0 -128
- package/types/excalidraw/element/mutateElement.d.ts +0 -11
- package/types/excalidraw/element/newElement.d.ts +0 -105
- package/types/excalidraw/element/resizeElements.d.ts +0 -16
- package/types/excalidraw/element/resizeTest.d.ts +0 -15
- package/types/excalidraw/element/routing.d.ts +0 -12
- package/types/excalidraw/element/showSelectedShapeActions.d.ts +0 -3
- package/types/excalidraw/element/sizeHelpers.d.ts +0 -35
- package/types/excalidraw/element/sortElements.d.ts +0 -2
- package/types/excalidraw/element/textElement.d.ts +0 -73
- package/types/excalidraw/element/textWysiwyg.d.ts +0 -22
- package/types/excalidraw/element/transformHandles.d.ts +0 -55
- package/types/excalidraw/element/typeChecks.d.ts +0 -39
- package/types/excalidraw/element/types.d.ts +0 -253
- package/types/excalidraw/emitter.d.ts +0 -16
- package/types/excalidraw/entry.d.ts +0 -1
- package/types/excalidraw/env.d.cts +0 -1
- package/types/excalidraw/env.d.ts +0 -1
- package/types/excalidraw/errors.d.ts +0 -25
- package/types/excalidraw/fonts/ExcalidrawFont.d.ts +0 -37
- package/types/excalidraw/fonts/ExcalidrawFontFace.d.ts +0 -35
- package/types/excalidraw/fonts/index.d.ts +0 -87
- package/types/excalidraw/fonts/metadata.d.ts +0 -37
- package/types/excalidraw/fonts/subset/subset-main.d.ts +0 -12
- package/types/excalidraw/fonts/subset/subset-shared.chunk.d.ts +0 -32
- package/types/excalidraw/fonts/subset/subset-worker.chunk.d.ts +0 -15
- package/types/excalidraw/fonts/wasm/hb-subset-bindings.d.ts +0 -45
- package/types/excalidraw/fonts/wasm/hb-subset-loader.d.ts +0 -13
- package/types/excalidraw/fonts/wasm/hb-subset-wasm.d.ts +0 -2
- package/types/excalidraw/fonts/wasm/hb-subset.bindings.d.ts +0 -45
- package/types/excalidraw/fonts/wasm/hb-subset.loader.d.ts +0 -5
- package/types/excalidraw/fonts/wasm/hb-subset.wasm.d.ts +0 -2
- package/types/excalidraw/fonts/wasm/woff2-bindings.d.ts +0 -31
- package/types/excalidraw/fonts/wasm/woff2-loader.d.ts +0 -14
- package/types/excalidraw/fonts/wasm/woff2-wasm.d.ts +0 -2
- package/types/excalidraw/fonts/wasm/woff2.bindings.d.ts +0 -31
- package/types/excalidraw/fonts/wasm/woff2.loader.d.ts +0 -6
- package/types/excalidraw/fonts/wasm/woff2.wasm.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Cascadia/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Comic/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Emoji/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Excalifont/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Helvetica/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Liberation/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Lilita/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Nunito/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Virgil/index.d.ts +0 -2
- package/types/excalidraw/fonts/woff2/Xiaolai/index.d.ts +0 -8
- package/types/excalidraw/fractionalIndex.d.ts +0 -48
- package/types/excalidraw/frame.d.ts +0 -63
- package/types/excalidraw/ga.d.ts +0 -63
- package/types/excalidraw/gadirections.d.ts +0 -8
- package/types/excalidraw/galines.d.ts +0 -22
- package/types/excalidraw/gapoints.d.ts +0 -7
- package/types/excalidraw/gatransforms.d.ts +0 -10
- package/types/excalidraw/gesture.d.ts +0 -6
- package/types/excalidraw/groups.d.ts +0 -33
- package/types/excalidraw/history.d.ts +0 -40
- package/types/excalidraw/hooks/useCallbackRefState.d.ts +0 -1
- package/types/excalidraw/hooks/useCopiedIndicator.d.ts +0 -5
- package/types/excalidraw/hooks/useCreatePortalContainer.d.ts +0 -7
- package/types/excalidraw/hooks/useEmitter.d.ts +0 -2
- package/types/excalidraw/hooks/useLibraryItemSvg.d.ts +0 -11
- package/types/excalidraw/hooks/useOutsideClick.d.ts +0 -19
- package/types/excalidraw/hooks/useScrollPosition.d.ts +0 -1
- package/types/excalidraw/hooks/useStable.d.ts +0 -1
- package/types/excalidraw/hooks/useStableCallback.d.ts +0 -4
- package/types/excalidraw/hooks/useTransition.d.ts +0 -2
- package/types/excalidraw/i18n.d.ts +0 -24
- package/types/excalidraw/index-node.d.ts +0 -1
- package/types/excalidraw/index.d.ts +0 -63
- package/types/excalidraw/jotai.d.ts +0 -34
- package/types/excalidraw/keys.d.ts +0 -82
- package/types/excalidraw/laser-trails.d.ts +0 -20
- package/types/excalidraw/main.d.ts +0 -2
- package/types/excalidraw/math.d.ts +0 -79
- package/types/excalidraw/mermaid.d.ts +0 -2
- package/types/excalidraw/obsidianUtils.d.ts +0 -21
- package/types/excalidraw/points.d.ts +0 -7
- package/types/excalidraw/polyfill.d.ts +0 -2
- package/types/excalidraw/publicPath.d.ts +0 -1
- package/types/excalidraw/queue.d.ts +0 -9
- package/types/excalidraw/random.d.ts +0 -4
- package/types/excalidraw/reactUtils.d.ts +0 -14
- package/types/excalidraw/renderer/easingFunctions.d.ts +0 -6
- package/types/excalidraw/renderer/helpers.d.ts +0 -13
- package/types/excalidraw/renderer/interactiveScene.d.ts +0 -20
- package/types/excalidraw/renderer/renderElement.d.ts +0 -27
- package/types/excalidraw/renderer/renderNewElementScene.d.ts +0 -7
- package/types/excalidraw/renderer/renderSnaps.d.ts +0 -2
- package/types/excalidraw/renderer/roundRect.d.ts +0 -11
- package/types/excalidraw/renderer/staticScene.d.ts +0 -11
- package/types/excalidraw/renderer/staticSvgScene.d.ts +0 -5
- package/types/excalidraw/scene/Fonts.d.ts +0 -19
- package/types/excalidraw/scene/Renderer.d.ts +0 -28
- package/types/excalidraw/scene/Scene.d.ts +0 -78
- package/types/excalidraw/scene/Shape.d.ts +0 -17
- package/types/excalidraw/scene/ShapeCache.d.ts +0 -25
- package/types/excalidraw/scene/comparisons.d.ts +0 -487
- package/types/excalidraw/scene/export.d.ts +0 -29
- package/types/excalidraw/scene/index.d.ts +0 -4
- package/types/excalidraw/scene/normalize.d.ts +0 -4
- package/types/excalidraw/scene/scroll.d.ts +0 -23
- package/types/excalidraw/scene/scrollbars.d.ts +0 -12
- package/types/excalidraw/scene/selection.d.ts +0 -32
- package/types/excalidraw/scene/types.d.ts +0 -112
- package/types/excalidraw/scene/zoom.d.ts +0 -12
- package/types/excalidraw/shapes.d.ts +0 -85
- package/types/excalidraw/snapping.d.ts +0 -112
- package/types/excalidraw/store.d.ts +0 -129
- package/types/excalidraw/types.d.ts +0 -718
- package/types/excalidraw/utility-types.d.ts +0 -31
- package/types/excalidraw/utils.d.ts +0 -249
- package/types/excalidraw/visualdebug.d.ts +0 -35
- package/types/excalidraw/webpack.dev.config.d.ts +0 -81
- package/types/excalidraw/webpack.prod.config.d.ts +0 -97
- package/types/excalidraw/workers.d.ts +0 -36
- package/types/excalidraw/zindex.d.ts +0 -6
- package/types/math/angle.d.ts +0 -17
- package/types/math/arc.d.ts +0 -6
- package/types/math/curve.d.ts +0 -32
- package/types/math/ga/ga.d.ts +0 -63
- package/types/math/ga/gadirections.d.ts +0 -8
- package/types/math/ga/galines.d.ts +0 -22
- package/types/math/ga/gapoints.d.ts +0 -7
- package/types/math/ga/gatransforms.d.ts +0 -10
- package/types/math/index.d.ts +0 -12
- package/types/math/line.d.ts +0 -26
- package/types/math/point.d.ts +0 -140
- package/types/math/polygon.d.ts +0 -5
- package/types/math/range.d.ts +0 -44
- package/types/math/segment.d.ts +0 -32
- package/types/math/triangle.d.ts +0 -11
- package/types/math/types.d.ts +0 -96
- package/types/math/utils.d.ts +0 -6
- package/types/math/vector.d.ts +0 -88
- package/types/utils/bbox.d.ts +0 -9
- package/types/utils/collision.d.ts +0 -9
- package/types/utils/export.d.ts +0 -44
- package/types/utils/geometry/geometry.d.ts +0 -89
- package/types/utils/geometry/shape.d.ts +0 -71
- package/types/utils/index.d.ts +0 -4
- package/types/utils/withinBounds.d.ts +0 -19
|
@@ -1,718 +0,0 @@
|
|
|
1
|
-
import type React from "react";
|
|
2
|
-
import type { PointerType, ExcalidrawLinearElement, NonDeletedExcalidrawElement, NonDeleted, TextAlign, ExcalidrawElement, GroupId, ExcalidrawBindableElement, Arrowhead, ChartType, FontFamilyValues, ExcalidrawTextElement, FileId, ExcalidrawImageElement, Theme, StrokeRoundness, ExcalidrawEmbeddableElement, ExcalidrawMagicFrameElement, ExcalidrawFrameLikeElement, ExcalidrawElementType, ExcalidrawIframeLikeElement, OrderedExcalidrawElement, ExcalidrawNonSelectionElement } from "./element/types";
|
|
3
|
-
import type { Action } from "./actions/types";
|
|
4
|
-
import type { LinearElementEditor } from "./element/linearElementEditor";
|
|
5
|
-
import type { SuggestedBinding } from "./element/binding";
|
|
6
|
-
import type { ImportedDataState } from "./data/types";
|
|
7
|
-
import type App from "./components/App";
|
|
8
|
-
import type { throttleRAF } from "./utils";
|
|
9
|
-
import type { Spreadsheet } from "./charts";
|
|
10
|
-
import type { Language } from "./i18n";
|
|
11
|
-
import type { ClipboardData } from "./clipboard";
|
|
12
|
-
import type { isOverScrollBars } from "./scene/scrollbars";
|
|
13
|
-
import type { MaybeTransformHandleType } from "./element/transformHandles";
|
|
14
|
-
import type Library from "./data/library";
|
|
15
|
-
import type { FileSystemHandle } from "./data/filesystem";
|
|
16
|
-
import type { IMAGE_MIME_TYPES, MIME_TYPES } from "./constants";
|
|
17
|
-
import type { ContextMenuItems } from "./components/ContextMenu";
|
|
18
|
-
import type { SnapLine } from "./snapping";
|
|
19
|
-
import type { Merge, MaybePromise, ValueOf, MakeBrand } from "./utility-types";
|
|
20
|
-
import type { ColorPaletteCustom } from "./colors";
|
|
21
|
-
import type { StoreActionType } from "./store";
|
|
22
|
-
export type SocketId = string & {
|
|
23
|
-
_brand: "SocketId";
|
|
24
|
-
};
|
|
25
|
-
export type Collaborator = Readonly<{
|
|
26
|
-
pointer?: CollaboratorPointer;
|
|
27
|
-
button?: "up" | "down";
|
|
28
|
-
selectedElementIds?: AppState["selectedElementIds"];
|
|
29
|
-
username?: string | null;
|
|
30
|
-
userState?: UserIdleState;
|
|
31
|
-
color?: {
|
|
32
|
-
background: string;
|
|
33
|
-
stroke: string;
|
|
34
|
-
};
|
|
35
|
-
avatarUrl?: string;
|
|
36
|
-
id?: string;
|
|
37
|
-
socketId?: SocketId;
|
|
38
|
-
isCurrentUser?: boolean;
|
|
39
|
-
isInCall?: boolean;
|
|
40
|
-
isSpeaking?: boolean;
|
|
41
|
-
isMuted?: boolean;
|
|
42
|
-
}>;
|
|
43
|
-
export type CollaboratorPointer = {
|
|
44
|
-
x: number;
|
|
45
|
-
y: number;
|
|
46
|
-
tool: "pointer" | "laser";
|
|
47
|
-
/**
|
|
48
|
-
* Whether to render cursor + username. Useful when you only want to render
|
|
49
|
-
* laser trail.
|
|
50
|
-
*
|
|
51
|
-
* @default true
|
|
52
|
-
*/
|
|
53
|
-
renderCursor?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Explicit laser color.
|
|
56
|
-
*
|
|
57
|
-
* @default string collaborator's cursor color
|
|
58
|
-
*/
|
|
59
|
-
laserColor?: string;
|
|
60
|
-
};
|
|
61
|
-
export type DataURL = string & {
|
|
62
|
-
_brand: "DataURL";
|
|
63
|
-
};
|
|
64
|
-
export type BinaryFileData = {
|
|
65
|
-
mimeType: ValueOf<typeof IMAGE_MIME_TYPES> | typeof MIME_TYPES.binary;
|
|
66
|
-
id: FileId;
|
|
67
|
-
dataURL: DataURL;
|
|
68
|
-
/**
|
|
69
|
-
* Epoch timestamp in milliseconds
|
|
70
|
-
*/
|
|
71
|
-
created: number;
|
|
72
|
-
/**
|
|
73
|
-
* Indicates when the file was last retrieved from storage to be loaded
|
|
74
|
-
* onto the scene. We use this flag to determine whether to delete unused
|
|
75
|
-
* files from storage.
|
|
76
|
-
*
|
|
77
|
-
* Epoch timestamp in milliseconds.
|
|
78
|
-
*/
|
|
79
|
-
lastRetrieved?: number;
|
|
80
|
-
};
|
|
81
|
-
export type BinaryFileMetadata = Omit<BinaryFileData, "dataURL">;
|
|
82
|
-
export type BinaryFiles = Record<ExcalidrawElement["id"], BinaryFileData>;
|
|
83
|
-
export type ToolType = "selection" | "rectangle" | "diamond" | "ellipse" | "arrow" | "line" | "freedraw" | "text" | "image" | "eraser" | "hand" | "frame" | "magicframe" | "embeddable" | "laser" | "mermaid";
|
|
84
|
-
export type ElementOrToolType = ExcalidrawElementType | ToolType | "custom";
|
|
85
|
-
export type ActiveTool = {
|
|
86
|
-
type: ToolType;
|
|
87
|
-
customType: null;
|
|
88
|
-
} | {
|
|
89
|
-
type: "custom";
|
|
90
|
-
customType: string;
|
|
91
|
-
};
|
|
92
|
-
export type SidebarName = string;
|
|
93
|
-
export type SidebarTabName = string;
|
|
94
|
-
export type UserToFollow = {
|
|
95
|
-
socketId: SocketId;
|
|
96
|
-
username: string;
|
|
97
|
-
};
|
|
98
|
-
type _CommonCanvasAppState = {
|
|
99
|
-
zoom: AppState["zoom"];
|
|
100
|
-
scrollX: AppState["scrollX"];
|
|
101
|
-
scrollY: AppState["scrollY"];
|
|
102
|
-
width: AppState["width"];
|
|
103
|
-
height: AppState["height"];
|
|
104
|
-
viewModeEnabled: AppState["viewModeEnabled"];
|
|
105
|
-
editingGroupId: AppState["editingGroupId"];
|
|
106
|
-
selectedElementIds: AppState["selectedElementIds"];
|
|
107
|
-
frameToHighlight: AppState["frameToHighlight"];
|
|
108
|
-
offsetLeft: AppState["offsetLeft"];
|
|
109
|
-
offsetTop: AppState["offsetTop"];
|
|
110
|
-
theme: AppState["theme"];
|
|
111
|
-
pendingImageElementId: AppState["pendingImageElementId"];
|
|
112
|
-
};
|
|
113
|
-
export type StaticCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
114
|
-
shouldCacheIgnoreZoom: AppState["shouldCacheIgnoreZoom"];
|
|
115
|
-
/** null indicates transparent bg */
|
|
116
|
-
viewBackgroundColor: AppState["viewBackgroundColor"] | null;
|
|
117
|
-
exportScale: AppState["exportScale"];
|
|
118
|
-
selectedElementsAreBeingDragged: AppState["selectedElementsAreBeingDragged"];
|
|
119
|
-
gridSize: AppState["gridSize"];
|
|
120
|
-
gridStep: AppState["gridStep"];
|
|
121
|
-
frameRendering: AppState["frameRendering"];
|
|
122
|
-
linkOpacity: AppState["linkOpacity"];
|
|
123
|
-
gridColor: AppState["gridColor"];
|
|
124
|
-
frameColor: AppState["frameColor"];
|
|
125
|
-
currentHoveredFontFamily: AppState["currentHoveredFontFamily"];
|
|
126
|
-
}>;
|
|
127
|
-
export type InteractiveCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
128
|
-
activeEmbeddable: AppState["activeEmbeddable"];
|
|
129
|
-
editingLinearElement: AppState["editingLinearElement"];
|
|
130
|
-
selectionElement: AppState["selectionElement"];
|
|
131
|
-
selectedGroupIds: AppState["selectedGroupIds"];
|
|
132
|
-
selectedLinearElement: AppState["selectedLinearElement"];
|
|
133
|
-
multiElement: AppState["multiElement"];
|
|
134
|
-
isBindingEnabled: AppState["isBindingEnabled"];
|
|
135
|
-
suggestedBindings: AppState["suggestedBindings"];
|
|
136
|
-
isRotating: AppState["isRotating"];
|
|
137
|
-
elementsToHighlight: AppState["elementsToHighlight"];
|
|
138
|
-
collaborators: AppState["collaborators"];
|
|
139
|
-
snapLines: AppState["snapLines"];
|
|
140
|
-
zenModeEnabled: AppState["zenModeEnabled"];
|
|
141
|
-
editingTextElement: AppState["editingTextElement"];
|
|
142
|
-
gridColor: AppState["gridColor"];
|
|
143
|
-
highlightSearchResult: AppState["highlightSearchResult"];
|
|
144
|
-
searchMatches: AppState["searchMatches"];
|
|
145
|
-
}>;
|
|
146
|
-
export type ObservedAppState = ObservedStandaloneAppState & ObservedElementsAppState;
|
|
147
|
-
export type ObservedStandaloneAppState = {
|
|
148
|
-
name: AppState["name"];
|
|
149
|
-
viewBackgroundColor: AppState["viewBackgroundColor"];
|
|
150
|
-
};
|
|
151
|
-
export type ObservedElementsAppState = {
|
|
152
|
-
editingGroupId: AppState["editingGroupId"];
|
|
153
|
-
selectedElementIds: AppState["selectedElementIds"];
|
|
154
|
-
selectedGroupIds: AppState["selectedGroupIds"];
|
|
155
|
-
editingLinearElementId: LinearElementEditor["elementId"] | null;
|
|
156
|
-
selectedLinearElementId: LinearElementEditor["elementId"] | null;
|
|
157
|
-
};
|
|
158
|
-
export interface AppState {
|
|
159
|
-
contextMenu: {
|
|
160
|
-
items: ContextMenuItems;
|
|
161
|
-
top: number;
|
|
162
|
-
left: number;
|
|
163
|
-
} | null;
|
|
164
|
-
showWelcomeScreen: boolean;
|
|
165
|
-
isLoading: boolean;
|
|
166
|
-
errorMessage: React.ReactNode;
|
|
167
|
-
activeEmbeddable: {
|
|
168
|
-
element: NonDeletedExcalidrawElement;
|
|
169
|
-
state: "hover" | "active";
|
|
170
|
-
} | null;
|
|
171
|
-
/**
|
|
172
|
-
* for a newly created element
|
|
173
|
-
* - set on pointer down, updated during pointer move, used on pointer up
|
|
174
|
-
*/
|
|
175
|
-
newElement: NonDeleted<ExcalidrawNonSelectionElement> | null;
|
|
176
|
-
/**
|
|
177
|
-
* for a single element that's being resized
|
|
178
|
-
* - set on pointer down when it's selected and the active tool is selection
|
|
179
|
-
*/
|
|
180
|
-
resizingElement: NonDeletedExcalidrawElement | null;
|
|
181
|
-
/**
|
|
182
|
-
* multiElement is for multi-point linear element that's created by clicking as opposed to dragging
|
|
183
|
-
* - when set and present, the editor will handle linear element creation logic accordingly
|
|
184
|
-
*/
|
|
185
|
-
multiElement: NonDeleted<ExcalidrawLinearElement> | null;
|
|
186
|
-
/**
|
|
187
|
-
* decoupled from newElement, dragging selection only creates selectionElement
|
|
188
|
-
* - set on pointer down, updated during pointer move
|
|
189
|
-
*/
|
|
190
|
-
selectionElement: NonDeletedExcalidrawElement | null;
|
|
191
|
-
isBindingEnabled: boolean;
|
|
192
|
-
startBoundElement: NonDeleted<ExcalidrawBindableElement> | null;
|
|
193
|
-
suggestedBindings: SuggestedBinding[];
|
|
194
|
-
frameToHighlight: NonDeleted<ExcalidrawFrameLikeElement> | null;
|
|
195
|
-
frameRendering: {
|
|
196
|
-
enabled: boolean;
|
|
197
|
-
name: boolean;
|
|
198
|
-
outline: boolean;
|
|
199
|
-
clip: boolean;
|
|
200
|
-
};
|
|
201
|
-
editingFrame: string | null;
|
|
202
|
-
elementsToHighlight: NonDeleted<ExcalidrawElement>[] | null;
|
|
203
|
-
/**
|
|
204
|
-
* set when a new text is created or when an existing text is being edited
|
|
205
|
-
*/
|
|
206
|
-
editingTextElement: NonDeletedExcalidrawElement | null;
|
|
207
|
-
editingLinearElement: LinearElementEditor | null;
|
|
208
|
-
activeTool: {
|
|
209
|
-
/**
|
|
210
|
-
* indicates a previous tool we should revert back to if we deselect the
|
|
211
|
-
* currently active tool. At the moment applies to `eraser` and `hand` tool.
|
|
212
|
-
*/
|
|
213
|
-
lastActiveTool: ActiveTool | null;
|
|
214
|
-
locked: boolean;
|
|
215
|
-
} & ActiveTool;
|
|
216
|
-
penMode: boolean;
|
|
217
|
-
penDetected: boolean;
|
|
218
|
-
exportBackground: boolean;
|
|
219
|
-
exportEmbedScene: boolean;
|
|
220
|
-
exportWithDarkMode: boolean;
|
|
221
|
-
exportScale: number;
|
|
222
|
-
currentItemStrokeColor: string;
|
|
223
|
-
currentItemBackgroundColor: string;
|
|
224
|
-
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
225
|
-
currentItemStrokeWidth: number;
|
|
226
|
-
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
227
|
-
currentItemRoughness: number;
|
|
228
|
-
currentItemOpacity: number;
|
|
229
|
-
currentItemFontFamily: FontFamilyValues;
|
|
230
|
-
currentItemFontSize: number;
|
|
231
|
-
currentItemTextAlign: TextAlign;
|
|
232
|
-
currentItemStartArrowhead: Arrowhead | null;
|
|
233
|
-
currentItemEndArrowhead: Arrowhead | null;
|
|
234
|
-
currentHoveredFontFamily: FontFamilyValues | null;
|
|
235
|
-
currentItemRoundness: StrokeRoundness;
|
|
236
|
-
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
237
|
-
viewBackgroundColor: string;
|
|
238
|
-
scrollX: number;
|
|
239
|
-
scrollY: number;
|
|
240
|
-
cursorButton: "up" | "down";
|
|
241
|
-
scrolledOutside: boolean;
|
|
242
|
-
name: string | null;
|
|
243
|
-
isResizing: boolean;
|
|
244
|
-
isRotating: boolean;
|
|
245
|
-
zoom: Zoom;
|
|
246
|
-
openMenu: "canvas" | "shape" | null;
|
|
247
|
-
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | null;
|
|
248
|
-
openSidebar: {
|
|
249
|
-
name: SidebarName;
|
|
250
|
-
tab?: SidebarTabName;
|
|
251
|
-
} | null;
|
|
252
|
-
openDialog: null | {
|
|
253
|
-
name: "imageExport" | "help" | "jsonExport";
|
|
254
|
-
} | {
|
|
255
|
-
name: "ttd";
|
|
256
|
-
tab: "text-to-diagram" | "mermaid";
|
|
257
|
-
} | {
|
|
258
|
-
name: "commandPalette";
|
|
259
|
-
};
|
|
260
|
-
/**
|
|
261
|
-
* Reflects user preference for whether the default sidebar should be docked.
|
|
262
|
-
*
|
|
263
|
-
* NOTE this is only a user preference and does not reflect the actual docked
|
|
264
|
-
* state of the sidebar, because the host apps can override this through
|
|
265
|
-
* a DefaultSidebar prop, which is not reflected back to the appState.
|
|
266
|
-
*/
|
|
267
|
-
defaultSidebarDockedPreference: boolean;
|
|
268
|
-
lastPointerDownWith: PointerType;
|
|
269
|
-
selectedElementIds: Readonly<{
|
|
270
|
-
[id: string]: true;
|
|
271
|
-
}>;
|
|
272
|
-
previousSelectedElementIds: {
|
|
273
|
-
[id: string]: true;
|
|
274
|
-
};
|
|
275
|
-
selectedElementsAreBeingDragged: boolean;
|
|
276
|
-
shouldCacheIgnoreZoom: boolean;
|
|
277
|
-
toast: {
|
|
278
|
-
message: string;
|
|
279
|
-
closable?: boolean;
|
|
280
|
-
duration?: number;
|
|
281
|
-
} | null;
|
|
282
|
-
zenModeEnabled: boolean;
|
|
283
|
-
theme: Theme;
|
|
284
|
-
/** grid cell px size */
|
|
285
|
-
gridSize: number;
|
|
286
|
-
gridStep: number;
|
|
287
|
-
gridModeEnabled: boolean;
|
|
288
|
-
viewModeEnabled: boolean;
|
|
289
|
-
/** top-most selected groups (i.e. does not include nested groups) */
|
|
290
|
-
selectedGroupIds: {
|
|
291
|
-
[groupId: string]: boolean;
|
|
292
|
-
};
|
|
293
|
-
/** group being edited when you drill down to its constituent element
|
|
294
|
-
(e.g. when you double-click on a group's element) */
|
|
295
|
-
editingGroupId: GroupId | null;
|
|
296
|
-
width: number;
|
|
297
|
-
height: number;
|
|
298
|
-
offsetTop: number;
|
|
299
|
-
offsetLeft: number;
|
|
300
|
-
fileHandle: FileSystemHandle | null;
|
|
301
|
-
collaborators: Map<SocketId, Collaborator>;
|
|
302
|
-
stats: {
|
|
303
|
-
open: boolean;
|
|
304
|
-
/** bitmap. Use `STATS_PANELS` bit values */
|
|
305
|
-
panels: number;
|
|
306
|
-
};
|
|
307
|
-
currentChartType: ChartType;
|
|
308
|
-
pasteDialog: {
|
|
309
|
-
shown: false;
|
|
310
|
-
data: null;
|
|
311
|
-
} | {
|
|
312
|
-
shown: true;
|
|
313
|
-
data: Spreadsheet;
|
|
314
|
-
};
|
|
315
|
-
/** imageElement waiting to be placed on canvas */
|
|
316
|
-
pendingImageElementId: ExcalidrawImageElement["id"] | null;
|
|
317
|
-
showHyperlinkPopup: false | "info" | "editor";
|
|
318
|
-
linkOpacity: number;
|
|
319
|
-
trayModeEnabled: boolean;
|
|
320
|
-
colorPalette?: {
|
|
321
|
-
canvasBackground: ColorPaletteCustom;
|
|
322
|
-
elementBackground: ColorPaletteCustom;
|
|
323
|
-
elementStroke: ColorPaletteCustom;
|
|
324
|
-
topPicks: {
|
|
325
|
-
canvasBackground: [string, string, string, string, string];
|
|
326
|
-
elementStroke: [string, string, string, string, string];
|
|
327
|
-
elementBackground: [string, string, string, string, string];
|
|
328
|
-
};
|
|
329
|
-
};
|
|
330
|
-
allowWheelZoom?: boolean;
|
|
331
|
-
allowPinchZoom?: boolean;
|
|
332
|
-
pinnedScripts?: string[];
|
|
333
|
-
customPens?: any[];
|
|
334
|
-
currentStrokeOptions?: any;
|
|
335
|
-
resetCustomPen?: any;
|
|
336
|
-
gridColor: {
|
|
337
|
-
Bold: string;
|
|
338
|
-
Regular: string;
|
|
339
|
-
};
|
|
340
|
-
highlightSearchResult: boolean;
|
|
341
|
-
dynamicStyle: {
|
|
342
|
-
[x: string]: string;
|
|
343
|
-
};
|
|
344
|
-
frameColor: {
|
|
345
|
-
stroke: string;
|
|
346
|
-
fill: string;
|
|
347
|
-
nameColor: string;
|
|
348
|
-
};
|
|
349
|
-
invertBindingBehaviour: boolean;
|
|
350
|
-
selectedLinearElement: LinearElementEditor | null;
|
|
351
|
-
snapLines: readonly SnapLine[];
|
|
352
|
-
originSnapOffset: {
|
|
353
|
-
x: number;
|
|
354
|
-
y: number;
|
|
355
|
-
} | null;
|
|
356
|
-
objectsSnapModeEnabled: boolean;
|
|
357
|
-
/** the user's socket id & username who is being followed on the canvas */
|
|
358
|
-
userToFollow: UserToFollow | null;
|
|
359
|
-
/** the socket ids of the users following the current user */
|
|
360
|
-
followedBy: Set<SocketId>;
|
|
361
|
-
searchMatches: readonly SearchMatch[];
|
|
362
|
-
}
|
|
363
|
-
type SearchMatch = {
|
|
364
|
-
id: string;
|
|
365
|
-
focus: boolean;
|
|
366
|
-
matchedLines: {
|
|
367
|
-
offsetX: number;
|
|
368
|
-
offsetY: number;
|
|
369
|
-
width: number;
|
|
370
|
-
height: number;
|
|
371
|
-
}[];
|
|
372
|
-
};
|
|
373
|
-
export type UIAppState = Omit<AppState, "suggestedBindings" | "startBoundElement" | "cursorButton" | "scrollX" | "scrollY">;
|
|
374
|
-
export type NormalizedZoomValue = number & {
|
|
375
|
-
_brand: "normalizedZoom";
|
|
376
|
-
};
|
|
377
|
-
export type Zoom = Readonly<{
|
|
378
|
-
value: NormalizedZoomValue;
|
|
379
|
-
}>;
|
|
380
|
-
export type PointerCoords = Readonly<{
|
|
381
|
-
x: number;
|
|
382
|
-
y: number;
|
|
383
|
-
}>;
|
|
384
|
-
export type Gesture = {
|
|
385
|
-
pointers: Map<number, PointerCoords>;
|
|
386
|
-
lastCenter: {
|
|
387
|
-
x: number;
|
|
388
|
-
y: number;
|
|
389
|
-
} | null;
|
|
390
|
-
initialDistance: number | null;
|
|
391
|
-
initialScale: number | null;
|
|
392
|
-
};
|
|
393
|
-
export declare class GestureEvent extends UIEvent {
|
|
394
|
-
readonly rotation: number;
|
|
395
|
-
readonly scale: number;
|
|
396
|
-
}
|
|
397
|
-
/** @deprecated legacy: do not use outside of migration paths */
|
|
398
|
-
export type LibraryItem_v1 = readonly NonDeleted<ExcalidrawElement>[];
|
|
399
|
-
/** @deprecated legacy: do not use outside of migration paths */
|
|
400
|
-
type LibraryItems_v1 = readonly LibraryItem_v1[];
|
|
401
|
-
/** v2 library item */
|
|
402
|
-
export type LibraryItem = {
|
|
403
|
-
id: string;
|
|
404
|
-
status: "published" | "unpublished";
|
|
405
|
-
elements: readonly NonDeleted<ExcalidrawElement>[];
|
|
406
|
-
/** timestamp in epoch (ms) */
|
|
407
|
-
created: number;
|
|
408
|
-
name?: string;
|
|
409
|
-
error?: string;
|
|
410
|
-
};
|
|
411
|
-
export type LibraryItems = readonly LibraryItem[];
|
|
412
|
-
export type LibraryItems_anyVersion = LibraryItems | LibraryItems_v1;
|
|
413
|
-
export type LibraryItemsSource = ((currentLibraryItems: LibraryItems) => MaybePromise<LibraryItems_anyVersion | Blob>) | MaybePromise<LibraryItems_anyVersion | Blob>;
|
|
414
|
-
export type ExcalidrawInitialDataState = Merge<ImportedDataState, {
|
|
415
|
-
libraryItems?: MaybePromise<Required<ImportedDataState>["libraryItems"]>;
|
|
416
|
-
}>;
|
|
417
|
-
export type OnUserFollowedPayload = {
|
|
418
|
-
userToFollow: UserToFollow;
|
|
419
|
-
action: "FOLLOW" | "UNFOLLOW";
|
|
420
|
-
};
|
|
421
|
-
export interface ExcalidrawProps {
|
|
422
|
-
onChange?: (elements: readonly OrderedExcalidrawElement[], appState: AppState, files: BinaryFiles) => void;
|
|
423
|
-
initialData?: (() => MaybePromise<ExcalidrawInitialDataState | null>) | MaybePromise<ExcalidrawInitialDataState | null>;
|
|
424
|
-
excalidrawAPI?: (api: ExcalidrawImperativeAPI) => void;
|
|
425
|
-
isCollaborating?: boolean;
|
|
426
|
-
onPointerUpdate?: (payload: {
|
|
427
|
-
pointer: {
|
|
428
|
-
x: number;
|
|
429
|
-
y: number;
|
|
430
|
-
tool: "pointer" | "laser";
|
|
431
|
-
};
|
|
432
|
-
button: "down" | "up";
|
|
433
|
-
pointersMap: Gesture["pointers"];
|
|
434
|
-
}) => void;
|
|
435
|
-
onPaste?: (data: ClipboardData, event: ClipboardEvent | null) => Promise<boolean> | boolean;
|
|
436
|
-
onDrop?: (event: React.DragEvent<HTMLDivElement>) => Promise<boolean> | boolean;
|
|
437
|
-
renderTopRightUI?: (isMobile: boolean, appState: UIAppState) => JSX.Element | null;
|
|
438
|
-
langCode?: Language["code"];
|
|
439
|
-
viewModeEnabled?: boolean;
|
|
440
|
-
zenModeEnabled?: boolean;
|
|
441
|
-
gridModeEnabled?: boolean;
|
|
442
|
-
objectsSnapModeEnabled?: boolean;
|
|
443
|
-
libraryReturnUrl?: string;
|
|
444
|
-
initState?: AppState;
|
|
445
|
-
theme?: Theme;
|
|
446
|
-
name?: string;
|
|
447
|
-
renderCustomStats?: (elements: readonly NonDeletedExcalidrawElement[], appState: UIAppState) => JSX.Element;
|
|
448
|
-
UIOptions?: Partial<UIOptions>;
|
|
449
|
-
detectScroll?: boolean;
|
|
450
|
-
handleKeyboardGlobally?: boolean;
|
|
451
|
-
onLibraryChange?: (libraryItems: LibraryItems) => void | Promise<any>;
|
|
452
|
-
autoFocus?: boolean;
|
|
453
|
-
onBeforeTextEdit?: (textElement: ExcalidrawTextElement) => string;
|
|
454
|
-
onBeforeTextSubmit?: (textElement: ExcalidrawTextElement, nextText: string, //wrapped
|
|
455
|
-
nextOriginalText: string, isDeleted: boolean) => {
|
|
456
|
-
updatedNextOriginalText: string;
|
|
457
|
-
nextLink: string;
|
|
458
|
-
};
|
|
459
|
-
generateIdForFile?: (file: File) => string | Promise<string>;
|
|
460
|
-
onThemeChange?: (newTheme: string) => void;
|
|
461
|
-
onViewModeChange?: (isViewModeEnabled: boolean) => void;
|
|
462
|
-
onLinkOpen?: (element: NonDeletedExcalidrawElement, event: CustomEvent<{
|
|
463
|
-
nativeEvent: MouseEvent | React.PointerEvent<HTMLCanvasElement>;
|
|
464
|
-
}>) => void;
|
|
465
|
-
onLinkHover?: (element: NonDeletedExcalidrawElement, event: React.PointerEvent<HTMLCanvasElement>) => void;
|
|
466
|
-
onPointerDown?: (activeTool: AppState["activeTool"], pointerDownState: PointerDownState) => void;
|
|
467
|
-
onPointerUp?: (activeTool: AppState["activeTool"], pointerDownState: PointerDownState) => void;
|
|
468
|
-
onScrollChange?: (scrollX: number, scrollY: number, zoom: Zoom) => void;
|
|
469
|
-
onUserFollow?: (payload: OnUserFollowedPayload) => void;
|
|
470
|
-
children?: React.ReactNode;
|
|
471
|
-
validateEmbeddable?: boolean | string[] | RegExp | RegExp[] | ((link: string) => boolean | undefined);
|
|
472
|
-
renderEmbeddable?: (element: NonDeleted<ExcalidrawEmbeddableElement>, appState: AppState) => JSX.Element | null;
|
|
473
|
-
renderWebview?: boolean;
|
|
474
|
-
renderEmbeddableMenu?: (appState: AppState) => JSX.Element | null;
|
|
475
|
-
renderMermaid?: boolean;
|
|
476
|
-
onContextMenu?: (element: readonly NonDeletedExcalidrawElement[], appState: AppState, onClose: (callback?: () => void) => void) => JSX.Element | null;
|
|
477
|
-
aiEnabled?: boolean;
|
|
478
|
-
showDeprecatedFonts?: boolean;
|
|
479
|
-
}
|
|
480
|
-
export type SceneData = {
|
|
481
|
-
elements?: ImportedDataState["elements"];
|
|
482
|
-
appState?: ImportedDataState["appState"];
|
|
483
|
-
collaborators?: Map<SocketId, Collaborator>;
|
|
484
|
-
storeAction?: StoreActionType;
|
|
485
|
-
};
|
|
486
|
-
export declare enum UserIdleState {
|
|
487
|
-
ACTIVE = "active",
|
|
488
|
-
AWAY = "away",
|
|
489
|
-
IDLE = "idle"
|
|
490
|
-
}
|
|
491
|
-
export type ExportOpts = {
|
|
492
|
-
saveFileToDisk?: boolean;
|
|
493
|
-
onExportToBackend?: (exportedElements: readonly NonDeletedExcalidrawElement[], appState: UIAppState, files: BinaryFiles) => void;
|
|
494
|
-
renderCustomUI?: (exportedElements: readonly NonDeletedExcalidrawElement[], appState: UIAppState, files: BinaryFiles, canvas: HTMLCanvasElement) => JSX.Element;
|
|
495
|
-
};
|
|
496
|
-
export type CanvasActions = Partial<{
|
|
497
|
-
changeViewBackgroundColor: boolean;
|
|
498
|
-
clearCanvas: boolean;
|
|
499
|
-
export: false | ExportOpts;
|
|
500
|
-
loadScene: boolean;
|
|
501
|
-
saveToActiveFile: boolean;
|
|
502
|
-
toggleTheme: boolean | null;
|
|
503
|
-
saveAsImage: boolean;
|
|
504
|
-
}>;
|
|
505
|
-
export type UIOptions = Partial<{
|
|
506
|
-
dockedSidebarBreakpoint: number;
|
|
507
|
-
canvasActions: CanvasActions;
|
|
508
|
-
tools: {
|
|
509
|
-
image: boolean;
|
|
510
|
-
};
|
|
511
|
-
/** @deprecated does nothing. Will be removed in 0.15 */
|
|
512
|
-
welcomeScreen?: boolean;
|
|
513
|
-
}>;
|
|
514
|
-
export type AppProps = Merge<ExcalidrawProps, {
|
|
515
|
-
UIOptions: Merge<UIOptions, {
|
|
516
|
-
canvasActions: Required<CanvasActions> & {
|
|
517
|
-
export: ExportOpts;
|
|
518
|
-
};
|
|
519
|
-
}>;
|
|
520
|
-
detectScroll: boolean;
|
|
521
|
-
handleKeyboardGlobally: boolean;
|
|
522
|
-
isCollaborating: boolean;
|
|
523
|
-
children?: React.ReactNode;
|
|
524
|
-
aiEnabled: boolean;
|
|
525
|
-
}>;
|
|
526
|
-
/** A subset of App class properties that we need to use elsewhere
|
|
527
|
-
* in the app, eg Manager. Factored out into a separate type to keep DRY. */
|
|
528
|
-
export type AppClassProperties = {
|
|
529
|
-
props: AppProps;
|
|
530
|
-
state: AppState;
|
|
531
|
-
interactiveCanvas: HTMLCanvasElement | null;
|
|
532
|
-
/** static canvas */
|
|
533
|
-
canvas: HTMLCanvasElement;
|
|
534
|
-
focusContainer(): void;
|
|
535
|
-
library: Library;
|
|
536
|
-
imageCache: Map<FileId, {
|
|
537
|
-
image: HTMLImageElement | Promise<HTMLImageElement>;
|
|
538
|
-
mimeType: ValueOf<typeof IMAGE_MIME_TYPES>;
|
|
539
|
-
}>;
|
|
540
|
-
files: BinaryFiles;
|
|
541
|
-
device: App["device"];
|
|
542
|
-
scene: App["scene"];
|
|
543
|
-
syncActionResult: App["syncActionResult"];
|
|
544
|
-
fonts: App["fonts"];
|
|
545
|
-
pasteFromClipboard: App["pasteFromClipboard"];
|
|
546
|
-
id: App["id"];
|
|
547
|
-
onInsertElements: App["onInsertElements"];
|
|
548
|
-
onExportImage: App["onExportImage"];
|
|
549
|
-
lastViewportPosition: App["lastViewportPosition"];
|
|
550
|
-
scrollToContent: App["scrollToContent"];
|
|
551
|
-
addFiles: App["addFiles"];
|
|
552
|
-
addElementsFromPasteOrLibrary: App["addElementsFromPasteOrLibrary"];
|
|
553
|
-
setSelection: App["setSelection"];
|
|
554
|
-
togglePenMode: App["togglePenMode"];
|
|
555
|
-
toggleLock: App["toggleLock"];
|
|
556
|
-
setActiveTool: App["setActiveTool"];
|
|
557
|
-
setOpenDialog: App["setOpenDialog"];
|
|
558
|
-
insertEmbeddableElement: App["insertEmbeddableElement"];
|
|
559
|
-
onMagicframeToolSelect: App["onMagicframeToolSelect"];
|
|
560
|
-
getName: App["getName"];
|
|
561
|
-
dismissLinearEditor: App["dismissLinearEditor"];
|
|
562
|
-
flowChartCreator: App["flowChartCreator"];
|
|
563
|
-
getEffectiveGridSize: App["getEffectiveGridSize"];
|
|
564
|
-
setPlugins: App["setPlugins"];
|
|
565
|
-
plugins: App["plugins"];
|
|
566
|
-
getEditorUIOffsets: App["getEditorUIOffsets"];
|
|
567
|
-
visibleElements: App["visibleElements"];
|
|
568
|
-
excalidrawContainerValue: App["excalidrawContainerValue"];
|
|
569
|
-
};
|
|
570
|
-
export type PointerDownState = Readonly<{
|
|
571
|
-
origin: Readonly<{
|
|
572
|
-
x: number;
|
|
573
|
-
y: number;
|
|
574
|
-
}>;
|
|
575
|
-
originInGrid: Readonly<{
|
|
576
|
-
x: number;
|
|
577
|
-
y: number;
|
|
578
|
-
}>;
|
|
579
|
-
scrollbars: ReturnType<typeof isOverScrollBars>;
|
|
580
|
-
lastCoords: {
|
|
581
|
-
x: number;
|
|
582
|
-
y: number;
|
|
583
|
-
};
|
|
584
|
-
originalElements: Map<string, NonDeleted<ExcalidrawElement>>;
|
|
585
|
-
resize: {
|
|
586
|
-
handleType: MaybeTransformHandleType;
|
|
587
|
-
isResizing: boolean;
|
|
588
|
-
offset: {
|
|
589
|
-
x: number;
|
|
590
|
-
y: number;
|
|
591
|
-
};
|
|
592
|
-
arrowDirection: "origin" | "end";
|
|
593
|
-
center: {
|
|
594
|
-
x: number;
|
|
595
|
-
y: number;
|
|
596
|
-
};
|
|
597
|
-
};
|
|
598
|
-
hit: {
|
|
599
|
-
element: NonDeleted<ExcalidrawElement> | null;
|
|
600
|
-
allHitElements: NonDeleted<ExcalidrawElement>[];
|
|
601
|
-
wasAddedToSelection: boolean;
|
|
602
|
-
hasBeenDuplicated: boolean;
|
|
603
|
-
hasHitCommonBoundingBoxOfSelectedElements: boolean;
|
|
604
|
-
};
|
|
605
|
-
withCmdOrCtrl: boolean;
|
|
606
|
-
drag: {
|
|
607
|
-
hasOccurred: boolean;
|
|
608
|
-
offset: {
|
|
609
|
-
x: number;
|
|
610
|
-
y: number;
|
|
611
|
-
} | null;
|
|
612
|
-
};
|
|
613
|
-
eventListeners: {
|
|
614
|
-
onMove: null | ReturnType<typeof throttleRAF>;
|
|
615
|
-
onUp: null | ((event: PointerEvent) => void);
|
|
616
|
-
onKeyDown: null | ((event: KeyboardEvent) => void);
|
|
617
|
-
onKeyUp: null | ((event: KeyboardEvent) => void);
|
|
618
|
-
};
|
|
619
|
-
boxSelection: {
|
|
620
|
-
hasOccurred: boolean;
|
|
621
|
-
};
|
|
622
|
-
}>;
|
|
623
|
-
export type UnsubscribeCallback = () => void;
|
|
624
|
-
export interface ExcalidrawImperativeAPI {
|
|
625
|
-
updateScene: InstanceType<typeof App>["updateScene"];
|
|
626
|
-
updateLibrary: InstanceType<typeof Library>["updateLibrary"];
|
|
627
|
-
resetScene: InstanceType<typeof App>["resetScene"];
|
|
628
|
-
getSceneElementsIncludingDeleted: InstanceType<typeof App>["getSceneElementsIncludingDeleted"];
|
|
629
|
-
history: {
|
|
630
|
-
clear: InstanceType<typeof App>["resetHistory"];
|
|
631
|
-
};
|
|
632
|
-
zoomToFit: InstanceType<typeof App>["zoomToFit"];
|
|
633
|
-
startLineEditor: InstanceType<typeof App>["startLineEditor"];
|
|
634
|
-
getSceneElements: InstanceType<typeof App>["getSceneElements"];
|
|
635
|
-
getAppState: () => InstanceType<typeof App>["state"];
|
|
636
|
-
getFiles: () => InstanceType<typeof App>["files"];
|
|
637
|
-
getName: InstanceType<typeof App>["getName"];
|
|
638
|
-
scrollToContent: InstanceType<typeof App>["scrollToContent"];
|
|
639
|
-
registerAction: (action: Action) => void;
|
|
640
|
-
refresh: InstanceType<typeof App>["refresh"];
|
|
641
|
-
setToast: InstanceType<typeof App>["setToast"];
|
|
642
|
-
addFiles: (data: BinaryFileData[]) => void;
|
|
643
|
-
updateContainerSize: InstanceType<typeof App>["updateContainerSize"];
|
|
644
|
-
id: string;
|
|
645
|
-
selectElements: (elements: readonly ExcalidrawElement[], highlightSearchResult?: boolean) => void;
|
|
646
|
-
sendBackward: (elements: readonly ExcalidrawElement[]) => void;
|
|
647
|
-
bringForward: (elements: readonly ExcalidrawElement[]) => void;
|
|
648
|
-
sendToBack: (elements: readonly ExcalidrawElement[]) => void;
|
|
649
|
-
bringToFront: (elements: readonly ExcalidrawElement[]) => void;
|
|
650
|
-
setMobileModeAllowed: (allow: boolean) => void;
|
|
651
|
-
setActiveTool: InstanceType<typeof App>["setActiveTool"];
|
|
652
|
-
setCursor: InstanceType<typeof App>["setCursor"];
|
|
653
|
-
resetCursor: InstanceType<typeof App>["resetCursor"];
|
|
654
|
-
toggleSidebar: InstanceType<typeof App>["toggleSidebar"];
|
|
655
|
-
getHTMLIFrameElement: InstanceType<typeof App>["getHTMLIFrameElement"];
|
|
656
|
-
/**
|
|
657
|
-
* Disables rendering of frames (including element clipping), but currently
|
|
658
|
-
* the frames are still interactive in edit mode. As such, this API should be
|
|
659
|
-
* used in conjunction with view mode (props.viewModeEnabled).
|
|
660
|
-
*/
|
|
661
|
-
updateFrameRendering: InstanceType<typeof App>["updateFrameRendering"];
|
|
662
|
-
onChange: (callback: (elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles) => void) => UnsubscribeCallback;
|
|
663
|
-
onPointerDown: (callback: (activeTool: AppState["activeTool"], pointerDownState: PointerDownState, event: React.PointerEvent<HTMLElement>) => void) => UnsubscribeCallback;
|
|
664
|
-
onPointerUp: (callback: (activeTool: AppState["activeTool"], pointerDownState: PointerDownState, event: PointerEvent) => void) => UnsubscribeCallback;
|
|
665
|
-
onScrollChange: (callback: (scrollX: number, scrollY: number, zoom: Zoom) => void) => UnsubscribeCallback;
|
|
666
|
-
onUserFollow: (callback: (payload: OnUserFollowedPayload) => void) => UnsubscribeCallback;
|
|
667
|
-
}
|
|
668
|
-
export type Device = Readonly<{
|
|
669
|
-
viewport: {
|
|
670
|
-
isMobile: boolean;
|
|
671
|
-
isLandscape: boolean;
|
|
672
|
-
};
|
|
673
|
-
editor: {
|
|
674
|
-
isMobile: boolean;
|
|
675
|
-
canFitSidebar: boolean;
|
|
676
|
-
};
|
|
677
|
-
isTouchScreen: boolean;
|
|
678
|
-
}>;
|
|
679
|
-
export type FrameNameBounds = {
|
|
680
|
-
x: number;
|
|
681
|
-
y: number;
|
|
682
|
-
width: number;
|
|
683
|
-
height: number;
|
|
684
|
-
angle: number;
|
|
685
|
-
};
|
|
686
|
-
export type FrameNameBoundsCache = {
|
|
687
|
-
get: (frameElement: ExcalidrawFrameLikeElement | ExcalidrawMagicFrameElement) => FrameNameBounds | null;
|
|
688
|
-
_cache: Map<string, FrameNameBounds & {
|
|
689
|
-
zoom: AppState["zoom"]["value"];
|
|
690
|
-
versionNonce: ExcalidrawFrameLikeElement["versionNonce"];
|
|
691
|
-
}>;
|
|
692
|
-
};
|
|
693
|
-
export type KeyboardModifiersObject = {
|
|
694
|
-
ctrlKey: boolean;
|
|
695
|
-
shiftKey: boolean;
|
|
696
|
-
altKey: boolean;
|
|
697
|
-
metaKey: boolean;
|
|
698
|
-
};
|
|
699
|
-
export type Primitive = number | string | boolean | bigint | symbol | null | undefined;
|
|
700
|
-
export type JSONValue = string | number | boolean | null | object;
|
|
701
|
-
export type EmbedsValidationStatus = Map<ExcalidrawIframeLikeElement["id"], boolean>;
|
|
702
|
-
export type ElementsPendingErasure = Set<ExcalidrawElement["id"]>;
|
|
703
|
-
export type PendingExcalidrawElements = ExcalidrawElement[];
|
|
704
|
-
/** Runtime gridSize value. Null indicates disabled grid. */
|
|
705
|
-
export type NullableGridSize = (AppState["gridSize"] & MakeBrand<"NullableGridSize">) | null;
|
|
706
|
-
export type GenerateDiagramToCode = (props: {
|
|
707
|
-
frame: ExcalidrawMagicFrameElement;
|
|
708
|
-
children: readonly ExcalidrawElement[];
|
|
709
|
-
}) => MaybePromise<{
|
|
710
|
-
html: string;
|
|
711
|
-
}>;
|
|
712
|
-
export type Offsets = Partial<{
|
|
713
|
-
top: number;
|
|
714
|
-
right: number;
|
|
715
|
-
bottom: number;
|
|
716
|
-
left: number;
|
|
717
|
-
}>;
|
|
718
|
-
export {};
|