@nous-excalidraw/math 0.1.0
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/README.md +19 -0
- package/dist/dev/index.js +934 -0
- package/dist/dev/index.js.map +7 -0
- package/dist/prod/index.js +1 -0
- package/dist/types/common/debug.d.ts +21 -0
- package/dist/types/common/src/appEventBus.d.ts +27 -0
- package/dist/types/common/src/binary-heap.d.ts +12 -0
- package/dist/types/common/src/bounds.d.ts +10 -0
- package/dist/types/common/src/colors.d.ts +82 -0
- package/dist/types/common/src/constants.d.ts +357 -0
- package/dist/types/common/src/editorInterface.d.ts +34 -0
- package/dist/types/common/src/emitter.d.ts +16 -0
- package/dist/types/common/src/font-metadata.d.ts +46 -0
- package/dist/types/common/src/index.d.ts +17 -0
- package/dist/types/common/src/keys.d.ts +189 -0
- package/dist/types/common/src/points.d.ts +9 -0
- package/dist/types/common/src/promise-pool.d.ts +6 -0
- package/dist/types/common/src/queue.d.ts +9 -0
- package/dist/types/common/src/random.d.ts +3 -0
- package/dist/types/common/src/url.d.ts +7 -0
- package/dist/types/common/src/utility-types.d.ts +37 -0
- package/dist/types/common/src/utils.d.ts +279 -0
- package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
- package/dist/types/element/src/Scene.d.ts +82 -0
- package/dist/types/element/src/align.d.ts +8 -0
- package/dist/types/element/src/arrowheads.d.ts +3 -0
- package/dist/types/element/src/arrows/focus.d.ts +27 -0
- package/dist/types/element/src/arrows/helpers.d.ts +5 -0
- package/dist/types/element/src/binding.d.ts +129 -0
- package/dist/types/element/src/bounds.d.ts +83 -0
- package/dist/types/element/src/collision.d.ts +37 -0
- package/dist/types/element/src/comparisons.d.ts +8 -0
- package/dist/types/element/src/containerCache.d.ts +11 -0
- package/dist/types/element/src/cropElement.d.ts +19 -0
- package/dist/types/element/src/delta.d.ts +228 -0
- package/dist/types/element/src/distance.d.ts +3 -0
- package/dist/types/element/src/distribute.d.ts +8 -0
- package/dist/types/element/src/dragElements.d.ts +33 -0
- package/dist/types/element/src/duplicate.d.ts +63 -0
- package/dist/types/element/src/elbowArrow.d.ts +19 -0
- package/dist/types/element/src/elementLink.d.ts +13 -0
- package/dist/types/element/src/embeddable.d.ts +10 -0
- package/dist/types/element/src/flowchart.d.ts +26 -0
- package/dist/types/element/src/fractionalIndex.d.ts +57 -0
- package/dist/types/element/src/frame.d.ts +74 -0
- package/dist/types/element/src/groups.d.ts +34 -0
- package/dist/types/element/src/heading.d.ts +16 -0
- package/dist/types/element/src/image.d.ts +22 -0
- package/dist/types/element/src/index.d.ts +59 -0
- package/dist/types/element/src/linearElementEditor.d.ts +118 -0
- package/dist/types/element/src/mutateElement.d.ts +25 -0
- package/dist/types/element/src/newElement.d.ts +62 -0
- package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
- package/dist/types/element/src/renderElement.d.ts +25 -0
- package/dist/types/element/src/resizeElements.d.ts +32 -0
- package/dist/types/element/src/resizeTest.d.ts +16 -0
- package/dist/types/element/src/selection.d.ts +38 -0
- package/dist/types/element/src/shape.d.ts +43 -0
- package/dist/types/element/src/showSelectedShapeActions.d.ts +3 -0
- package/dist/types/element/src/sizeHelpers.d.ts +35 -0
- package/dist/types/element/src/sortElements.d.ts +2 -0
- package/dist/types/element/src/store.d.ts +237 -0
- package/dist/types/element/src/textElement.d.ts +40 -0
- package/dist/types/element/src/textMeasurements.d.ts +39 -0
- package/dist/types/element/src/textWrapping.d.ts +39 -0
- package/dist/types/element/src/transform.d.ts +81 -0
- package/dist/types/element/src/transformHandles.d.ts +36 -0
- package/dist/types/element/src/typeChecks.d.ts +54 -0
- package/dist/types/element/src/types.d.ts +294 -0
- package/dist/types/element/src/utils.d.ts +36 -0
- package/dist/types/element/src/zindex.d.ts +13 -0
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +488 -0
- package/dist/types/excalidraw/actions/actionAlign.d.ts +109 -0
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +362 -0
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +2071 -0
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +401 -0
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +175 -0
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +524 -0
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +160 -0
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +34 -0
- package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +17 -0
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +191 -0
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +348 -0
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +172 -0
- package/dist/types/excalidraw/actions/actionExport.d.ts +409 -0
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +13 -0
- package/dist/types/excalidraw/actions/actionFlip.d.ts +34 -0
- package/dist/types/excalidraw/actions/actionFrame.d.ts +1154 -0
- package/dist/types/excalidraw/actions/actionGroup.d.ts +352 -0
- package/dist/types/excalidraw/actions/actionHistory.d.ts +6 -0
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +662 -0
- package/dist/types/excalidraw/actions/actionLink.d.ts +176 -0
- package/dist/types/excalidraw/actions/actionMenu.d.ts +160 -0
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +20 -0
- package/dist/types/excalidraw/actions/actionProperties.d.ts +404 -0
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +171 -0
- package/dist/types/excalidraw/actions/actionStyles.d.ts +190 -0
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +17 -0
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +173 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +178 -0
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +173 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +176 -0
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +163 -0
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +175 -0
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +176 -0
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +176 -0
- package/dist/types/excalidraw/actions/actionZindex.d.ts +74 -0
- package/dist/types/excalidraw/actions/index.d.ts +31 -0
- package/dist/types/excalidraw/actions/manager.d.ts +21 -0
- package/dist/types/excalidraw/actions/register.d.ts +5 -0
- package/dist/types/excalidraw/actions/shortcuts.d.ts +4 -0
- package/dist/types/excalidraw/actions/types.d.ts +47 -0
- package/dist/types/excalidraw/analytics.d.ts +1 -0
- package/dist/types/excalidraw/animated-trail.d.ts +39 -0
- package/dist/types/excalidraw/animation-frame-handler.d.ts +16 -0
- package/dist/types/excalidraw/appState.d.ts +104 -0
- package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
- package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
- package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
- package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
- package/dist/types/excalidraw/charts/index.d.ts +7 -0
- package/dist/types/excalidraw/clients.d.ts +14 -0
- package/dist/types/excalidraw/clipboard.d.ts +104 -0
- package/dist/types/excalidraw/components/Actions.d.ts +47 -0
- package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +4 -0
- package/dist/types/excalidraw/components/App.d.ts +602 -0
- package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
- package/dist/types/excalidraw/components/Avatar.d.ts +11 -0
- package/dist/types/excalidraw/components/BraveMeasureTextError.d.ts +2 -0
- package/dist/types/excalidraw/components/Button.d.ts +17 -0
- package/dist/types/excalidraw/components/ButtonIcon.d.ts +16 -0
- package/dist/types/excalidraw/components/ButtonSeparator.d.ts +1 -0
- package/dist/types/excalidraw/components/Card.d.ts +5 -0
- package/dist/types/excalidraw/components/CheckboxItem.d.ts +8 -0
- package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +8 -0
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +22 -0
- package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +8 -0
- package/dist/types/excalidraw/components/ColorPicker/HotkeyLabel.d.ts +7 -0
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +19 -0
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +10 -0
- package/dist/types/excalidraw/components/ColorPicker/PickerHeading.d.ts +5 -0
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +9 -0
- package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +9 -0
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +20 -0
- package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +20 -0
- package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +19 -0
- package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +2 -0
- package/dist/types/excalidraw/components/CommandPalette/types.d.ts +24 -0
- package/dist/types/excalidraw/components/ConfirmDialog.d.ts +10 -0
- package/dist/types/excalidraw/components/ContextMenu.d.ts +16 -0
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +23 -0
- package/dist/types/excalidraw/components/DarkModeToggle.d.ts +7 -0
- package/dist/types/excalidraw/components/DefaultSidebar.d.ts +27 -0
- package/dist/types/excalidraw/components/Dialog.d.ts +13 -0
- package/dist/types/excalidraw/components/DialogActionButton.d.ts +10 -0
- package/dist/types/excalidraw/components/ElementCanvasButtons.d.ts +7 -0
- package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +12 -0
- package/dist/types/excalidraw/components/Ellipsify.d.ts +3 -0
- package/dist/types/excalidraw/components/ErrorDialog.d.ts +5 -0
- package/dist/types/excalidraw/components/EyeDropper.d.ts +27 -0
- package/dist/types/excalidraw/components/FilledButton.d.ts +19 -0
- package/dist/types/excalidraw/components/FixedSideContainer.d.ts +9 -0
- package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +10 -0
- package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +22 -0
- package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +26 -0
- package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +8 -0
- package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +13 -0
- package/dist/types/excalidraw/components/HandButton.d.ts +10 -0
- package/dist/types/excalidraw/components/HelpButton.d.ts +7 -0
- package/dist/types/excalidraw/components/HelpDialog.d.ts +4 -0
- package/dist/types/excalidraw/components/HintViewer.d.ts +11 -0
- package/dist/types/excalidraw/components/IconPicker.d.ts +20 -0
- package/dist/types/excalidraw/components/ImageExportDialog.d.ts +14 -0
- package/dist/types/excalidraw/components/InlineIcon.d.ts +5 -0
- package/dist/types/excalidraw/components/Island.d.ts +10 -0
- package/dist/types/excalidraw/components/JSONExportDialog.d.ts +15 -0
- package/dist/types/excalidraw/components/LaserPointerButton.d.ts +10 -0
- package/dist/types/excalidraw/components/LayerUI.d.ts +32 -0
- package/dist/types/excalidraw/components/LibraryMenu.d.ts +10 -0
- package/dist/types/excalidraw/components/LibraryMenuBrowseButton.d.ts +7 -0
- package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +9 -0
- package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +17 -0
- package/dist/types/excalidraw/components/LibraryMenuItems.d.ts +14 -0
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +23 -0
- package/dist/types/excalidraw/components/LibraryUnit.d.ts +14 -0
- package/dist/types/excalidraw/components/LoadingMessage.d.ts +5 -0
- package/dist/types/excalidraw/components/LockButton.d.ts +10 -0
- package/dist/types/excalidraw/components/MagicButton.d.ts +10 -0
- package/dist/types/excalidraw/components/MobileMenu.d.ts +23 -0
- package/dist/types/excalidraw/components/MobileToolBar.d.ts +10 -0
- package/dist/types/excalidraw/components/Modal.d.ts +11 -0
- package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +17 -0
- package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +17 -0
- package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +22 -0
- package/dist/types/excalidraw/components/PasteChartDialog.d.ts +7 -0
- package/dist/types/excalidraw/components/PenModeButton.d.ts +12 -0
- package/dist/types/excalidraw/components/Popover.d.ts +16 -0
- package/dist/types/excalidraw/components/ProjectName.d.ts +10 -0
- package/dist/types/excalidraw/components/PropertiesPopover.d.ts +16 -0
- package/dist/types/excalidraw/components/PublishLibrary.d.ts +16 -0
- package/dist/types/excalidraw/components/QuickSearch.d.ts +9 -0
- package/dist/types/excalidraw/components/RadioGroup.d.ts +13 -0
- package/dist/types/excalidraw/components/RadioSelection.d.ts +20 -0
- package/dist/types/excalidraw/components/Range.d.ts +14 -0
- package/dist/types/excalidraw/components/SVGLayer.d.ts +7 -0
- package/dist/types/excalidraw/components/ScrollableList.d.ts +8 -0
- package/dist/types/excalidraw/components/SearchMenu.d.ts +5 -0
- package/dist/types/excalidraw/components/Section.d.ts +6 -0
- package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +70 -0
- package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +7 -0
- package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +8 -0
- package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +9 -0
- package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +6 -0
- package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +6 -0
- package/dist/types/excalidraw/components/Sidebar/SidebarTrigger.d.ts +6 -0
- package/dist/types/excalidraw/components/Sidebar/common.d.ts +34 -0
- package/dist/types/excalidraw/components/Spinner.d.ts +8 -0
- package/dist/types/excalidraw/components/Stack.d.ts +15 -0
- package/dist/types/excalidraw/components/Stats/Angle.d.ts +11 -0
- package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +10 -0
- package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +10 -0
- package/dist/types/excalidraw/components/Stats/Dimension.d.ts +11 -0
- package/dist/types/excalidraw/components/Stats/DragInput.d.ts +44 -0
- package/dist/types/excalidraw/components/Stats/FontSize.d.ts +11 -0
- package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +11 -0
- package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +14 -0
- package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +12 -0
- package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +14 -0
- package/dist/types/excalidraw/components/Stats/Position.d.ts +12 -0
- package/dist/types/excalidraw/components/Stats/index.d.ts +35 -0
- package/dist/types/excalidraw/components/Stats/utils.d.ts +19 -0
- package/dist/types/excalidraw/components/Switch.d.ts +9 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
- package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
- package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +7 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +13 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +9 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +11 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +21 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanels.d.ts +4 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogSubmitShortcut.d.ts +1 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +7 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +8 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +6 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabs.d.ts +11 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
- package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
- package/dist/types/excalidraw/components/TTDDialog/common.d.ts +33 -0
- package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
- package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
- package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
- package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
- package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
- package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
- package/dist/types/excalidraw/components/TextField.d.ts +22 -0
- package/dist/types/excalidraw/components/Toast.d.ts +13 -0
- package/dist/types/excalidraw/components/ToolButton.d.ts +49 -0
- package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
- package/dist/types/excalidraw/components/Tooltip.d.ts +18 -0
- package/dist/types/excalidraw/components/Trans.d.ts +9 -0
- package/dist/types/excalidraw/components/UnlockPopup.d.ts +8 -0
- package/dist/types/excalidraw/components/UserList.d.ts +18 -0
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +34 -0
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +14 -0
- package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +19 -0
- package/dist/types/excalidraw/components/canvases/index.d.ts +3 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +98 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +17 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +37 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +9 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +18 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +7 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +16 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +10 -0
- package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +6 -0
- package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +5 -0
- package/dist/types/excalidraw/components/footer/Footer.d.ts +12 -0
- package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +4 -0
- package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +19 -0
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +10 -0
- package/dist/types/excalidraw/components/icons.d.ts +253 -0
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +82 -0
- package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +87 -0
- package/dist/types/excalidraw/components/shapes.d.ts +263 -0
- package/dist/types/excalidraw/context/tunnels.d.ts +21 -0
- package/dist/types/excalidraw/context/ui-appState.d.ts +4 -0
- package/dist/types/excalidraw/cursor.d.ts +5 -0
- package/dist/types/excalidraw/data/EditorLocalStorage.d.ts +8 -0
- package/dist/types/excalidraw/data/blob.d.ts +370 -0
- package/dist/types/excalidraw/data/encode.d.ts +55 -0
- package/dist/types/excalidraw/data/encryption.d.ts +9 -0
- package/dist/types/excalidraw/data/filesystem.d.ts +19 -0
- package/dist/types/excalidraw/data/image.d.ts +9 -0
- package/dist/types/excalidraw/data/index.d.ts +21 -0
- package/dist/types/excalidraw/data/json.d.ts +183 -0
- package/dist/types/excalidraw/data/library.d.ts +127 -0
- package/dist/types/excalidraw/data/resave.d.ts +10 -0
- package/dist/types/excalidraw/data/restore.d.ts +41 -0
- package/dist/types/excalidraw/data/types.d.ts +48 -0
- package/dist/types/excalidraw/deburr.d.ts +1 -0
- package/dist/types/excalidraw/editor-jotai.d.ts +56 -0
- package/dist/types/excalidraw/eraser/index.d.ts +12 -0
- package/dist/types/excalidraw/errors.d.ts +43 -0
- package/dist/types/excalidraw/fonts/Cascadia/index.d.ts +2 -0
- package/dist/types/excalidraw/fonts/ComicShanns/index.d.ts +2 -0
- package/dist/types/excalidraw/fonts/Emoji/index.d.ts +2 -0
- package/dist/types/excalidraw/fonts/ExcalidrawFontFace.d.ts +25 -0
- package/dist/types/excalidraw/fonts/Excalifont/index.d.ts +2 -0
- package/dist/types/excalidraw/fonts/Fonts.d.ts +79 -0
- package/dist/types/excalidraw/fonts/Helvetica/index.d.ts +2 -0
- package/dist/types/excalidraw/fonts/Liberation/index.d.ts +2 -0
- package/dist/types/excalidraw/fonts/Lilita/index.d.ts +2 -0
- package/dist/types/excalidraw/fonts/Nunito/index.d.ts +2 -0
- package/dist/types/excalidraw/fonts/Virgil/index.d.ts +2 -0
- package/dist/types/excalidraw/fonts/Xiaolai/index.d.ts +8 -0
- package/dist/types/excalidraw/fonts/index.d.ts +1 -0
- package/dist/types/excalidraw/gesture.d.ts +6 -0
- package/dist/types/excalidraw/history.d.ts +48 -0
- package/dist/types/excalidraw/hooks/useCallbackRefState.d.ts +1 -0
- package/dist/types/excalidraw/hooks/useCopiedIndicator.d.ts +5 -0
- package/dist/types/excalidraw/hooks/useCreatePortalContainer.d.ts +4 -0
- package/dist/types/excalidraw/hooks/useEmitter.d.ts +2 -0
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +11 -0
- package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +21 -0
- package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -0
- package/dist/types/excalidraw/hooks/useStable.d.ts +1 -0
- package/dist/types/excalidraw/hooks/useStableCallback.d.ts +4 -0
- package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
- package/dist/types/excalidraw/hooks/useTransition.d.ts +2 -0
- package/dist/types/excalidraw/i18n.d.ts +24 -0
- package/dist/types/excalidraw/laser-trails.d.ts +20 -0
- package/dist/types/excalidraw/lasso/index.d.ts +16 -0
- package/dist/types/excalidraw/lasso/utils.d.ts +13 -0
- package/dist/types/excalidraw/mermaid.d.ts +2 -0
- package/dist/types/excalidraw/reactUtils.d.ts +14 -0
- package/dist/types/excalidraw/renderer/animation.d.ts +12 -0
- package/dist/types/excalidraw/renderer/helpers.d.ts +16 -0
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +14 -0
- package/dist/types/excalidraw/renderer/renderNewElementScene.d.ts +7 -0
- package/dist/types/excalidraw/renderer/renderSnaps.d.ts +2 -0
- package/dist/types/excalidraw/renderer/roundRect.d.ts +11 -0
- package/dist/types/excalidraw/renderer/staticScene.d.ts +14 -0
- package/dist/types/excalidraw/renderer/staticSvgScene.d.ts +5 -0
- package/dist/types/excalidraw/scene/Renderer.d.ts +30 -0
- package/dist/types/excalidraw/scene/export.d.ts +36 -0
- package/dist/types/excalidraw/scene/index.d.ts +4 -0
- package/dist/types/excalidraw/scene/normalize.d.ts +4 -0
- package/dist/types/excalidraw/scene/scroll.d.ts +18 -0
- package/dist/types/excalidraw/scene/scrollbars.d.ts +11 -0
- package/dist/types/excalidraw/scene/types.d.ts +137 -0
- package/dist/types/excalidraw/scene/zoom.d.ts +12 -0
- package/dist/types/excalidraw/shortcut.d.ts +1 -0
- package/dist/types/excalidraw/snapping.d.ts +111 -0
- package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +45 -0
- package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +13 -0
- package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +2 -0
- package/dist/types/excalidraw/subset/subset-main.d.ts +12 -0
- package/dist/types/excalidraw/subset/subset-shared.chunk.d.ts +32 -0
- package/dist/types/excalidraw/subset/subset-worker.chunk.d.ts +15 -0
- package/dist/types/excalidraw/subset/woff2/woff2-bindings.d.ts +31 -0
- package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +14 -0
- package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +2 -0
- package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
- package/dist/types/excalidraw/types.d.ts +798 -0
- package/dist/types/excalidraw/workers.d.ts +36 -0
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +28 -0
- package/dist/types/math/src/angle.d.ts +19 -0
- package/dist/types/math/src/constants.d.ts +3 -0
- package/dist/types/math/src/curve.d.ts +77 -0
- package/dist/types/math/src/ellipse.d.ts +44 -0
- package/dist/types/math/src/index.d.ts +13 -0
- package/dist/types/math/src/line.d.ts +17 -0
- package/dist/types/math/src/point.d.ts +127 -0
- package/dist/types/math/src/polygon.d.ts +6 -0
- package/dist/types/math/src/range.d.ts +42 -0
- package/dist/types/math/src/rectangle.d.ts +5 -0
- package/dist/types/math/src/segment.d.ts +40 -0
- package/dist/types/math/src/triangle.d.ts +11 -0
- package/dist/types/math/src/types.d.ts +130 -0
- package/dist/types/math/src/utils.d.ts +7 -0
- package/dist/types/math/src/vector.d.ts +94 -0
- package/dist/types/utils/src/bbox.d.ts +9 -0
- package/dist/types/utils/src/export.d.ts +35 -0
- package/dist/types/utils/src/index.d.ts +4 -0
- package/dist/types/utils/src/shape.d.ts +58 -0
- package/dist/types/utils/src/withinBounds.d.ts +19 -0
- package/package.json +66 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import type { AppClassProperties } from "../types";
|
|
2
|
+
export declare const SHAPES: readonly [{
|
|
3
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
readonly value: "hand";
|
|
5
|
+
readonly key: "h";
|
|
6
|
+
readonly numericKey: null;
|
|
7
|
+
readonly fillable: false;
|
|
8
|
+
readonly toolbar: true;
|
|
9
|
+
}, {
|
|
10
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
readonly value: "selection";
|
|
12
|
+
readonly key: "v";
|
|
13
|
+
readonly numericKey: "1";
|
|
14
|
+
readonly fillable: true;
|
|
15
|
+
readonly toolbar: true;
|
|
16
|
+
}, {
|
|
17
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
readonly value: "rectangle";
|
|
19
|
+
readonly key: "r";
|
|
20
|
+
readonly numericKey: "2";
|
|
21
|
+
readonly fillable: true;
|
|
22
|
+
readonly toolbar: true;
|
|
23
|
+
}, {
|
|
24
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
readonly value: "diamond";
|
|
26
|
+
readonly key: "d";
|
|
27
|
+
readonly numericKey: "3";
|
|
28
|
+
readonly fillable: true;
|
|
29
|
+
readonly toolbar: true;
|
|
30
|
+
}, {
|
|
31
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
readonly value: "ellipse";
|
|
33
|
+
readonly key: "o";
|
|
34
|
+
readonly numericKey: "4";
|
|
35
|
+
readonly fillable: true;
|
|
36
|
+
readonly toolbar: true;
|
|
37
|
+
}, {
|
|
38
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
readonly value: "arrow";
|
|
40
|
+
readonly key: "a";
|
|
41
|
+
readonly numericKey: "5";
|
|
42
|
+
readonly fillable: true;
|
|
43
|
+
readonly toolbar: true;
|
|
44
|
+
}, {
|
|
45
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
readonly value: "line";
|
|
47
|
+
readonly key: "l";
|
|
48
|
+
readonly numericKey: "6";
|
|
49
|
+
readonly fillable: true;
|
|
50
|
+
readonly toolbar: true;
|
|
51
|
+
}, {
|
|
52
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
readonly value: "freedraw";
|
|
54
|
+
readonly key: readonly ["p", "x"];
|
|
55
|
+
readonly numericKey: "7";
|
|
56
|
+
readonly fillable: false;
|
|
57
|
+
readonly toolbar: true;
|
|
58
|
+
}, {
|
|
59
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
readonly value: "text";
|
|
61
|
+
readonly key: "t";
|
|
62
|
+
readonly numericKey: "8";
|
|
63
|
+
readonly fillable: false;
|
|
64
|
+
readonly toolbar: true;
|
|
65
|
+
}, {
|
|
66
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
readonly value: "image";
|
|
68
|
+
readonly key: null;
|
|
69
|
+
readonly numericKey: "9";
|
|
70
|
+
readonly fillable: false;
|
|
71
|
+
readonly toolbar: true;
|
|
72
|
+
}, {
|
|
73
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
readonly value: "eraser";
|
|
75
|
+
readonly key: "e";
|
|
76
|
+
readonly numericKey: "0";
|
|
77
|
+
readonly fillable: false;
|
|
78
|
+
readonly toolbar: true;
|
|
79
|
+
}, {
|
|
80
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
readonly value: "laser";
|
|
82
|
+
readonly key: "k";
|
|
83
|
+
readonly numericKey: null;
|
|
84
|
+
readonly fillable: false;
|
|
85
|
+
readonly toolbar: false;
|
|
86
|
+
}];
|
|
87
|
+
export declare const getToolbarTools: (app: AppClassProperties) => readonly [{
|
|
88
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
readonly value: "hand";
|
|
90
|
+
readonly key: "h";
|
|
91
|
+
readonly numericKey: null;
|
|
92
|
+
readonly fillable: false;
|
|
93
|
+
readonly toolbar: true;
|
|
94
|
+
}, {
|
|
95
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
96
|
+
readonly value: "selection";
|
|
97
|
+
readonly key: "v";
|
|
98
|
+
readonly numericKey: "1";
|
|
99
|
+
readonly fillable: true;
|
|
100
|
+
readonly toolbar: true;
|
|
101
|
+
}, {
|
|
102
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
103
|
+
readonly value: "rectangle";
|
|
104
|
+
readonly key: "r";
|
|
105
|
+
readonly numericKey: "2";
|
|
106
|
+
readonly fillable: true;
|
|
107
|
+
readonly toolbar: true;
|
|
108
|
+
}, {
|
|
109
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
110
|
+
readonly value: "diamond";
|
|
111
|
+
readonly key: "d";
|
|
112
|
+
readonly numericKey: "3";
|
|
113
|
+
readonly fillable: true;
|
|
114
|
+
readonly toolbar: true;
|
|
115
|
+
}, {
|
|
116
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
117
|
+
readonly value: "ellipse";
|
|
118
|
+
readonly key: "o";
|
|
119
|
+
readonly numericKey: "4";
|
|
120
|
+
readonly fillable: true;
|
|
121
|
+
readonly toolbar: true;
|
|
122
|
+
}, {
|
|
123
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
124
|
+
readonly value: "arrow";
|
|
125
|
+
readonly key: "a";
|
|
126
|
+
readonly numericKey: "5";
|
|
127
|
+
readonly fillable: true;
|
|
128
|
+
readonly toolbar: true;
|
|
129
|
+
}, {
|
|
130
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
131
|
+
readonly value: "line";
|
|
132
|
+
readonly key: "l";
|
|
133
|
+
readonly numericKey: "6";
|
|
134
|
+
readonly fillable: true;
|
|
135
|
+
readonly toolbar: true;
|
|
136
|
+
}, {
|
|
137
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
138
|
+
readonly value: "freedraw";
|
|
139
|
+
readonly key: readonly ["p", "x"];
|
|
140
|
+
readonly numericKey: "7";
|
|
141
|
+
readonly fillable: false;
|
|
142
|
+
readonly toolbar: true;
|
|
143
|
+
}, {
|
|
144
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
145
|
+
readonly value: "text";
|
|
146
|
+
readonly key: "t";
|
|
147
|
+
readonly numericKey: "8";
|
|
148
|
+
readonly fillable: false;
|
|
149
|
+
readonly toolbar: true;
|
|
150
|
+
}, {
|
|
151
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
152
|
+
readonly value: "image";
|
|
153
|
+
readonly key: null;
|
|
154
|
+
readonly numericKey: "9";
|
|
155
|
+
readonly fillable: false;
|
|
156
|
+
readonly toolbar: true;
|
|
157
|
+
}, {
|
|
158
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
159
|
+
readonly value: "eraser";
|
|
160
|
+
readonly key: "e";
|
|
161
|
+
readonly numericKey: "0";
|
|
162
|
+
readonly fillable: false;
|
|
163
|
+
readonly toolbar: true;
|
|
164
|
+
}, {
|
|
165
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
166
|
+
readonly value: "laser";
|
|
167
|
+
readonly key: "k";
|
|
168
|
+
readonly numericKey: null;
|
|
169
|
+
readonly fillable: false;
|
|
170
|
+
readonly toolbar: false;
|
|
171
|
+
}] | readonly [{
|
|
172
|
+
readonly value: "lasso";
|
|
173
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
174
|
+
readonly key: "v";
|
|
175
|
+
readonly numericKey: "1";
|
|
176
|
+
readonly fillable: true;
|
|
177
|
+
readonly toolbar: true;
|
|
178
|
+
}, ...({
|
|
179
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
180
|
+
readonly value: "hand";
|
|
181
|
+
readonly key: "h";
|
|
182
|
+
readonly numericKey: null;
|
|
183
|
+
readonly fillable: false;
|
|
184
|
+
readonly toolbar: true;
|
|
185
|
+
} | {
|
|
186
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
187
|
+
readonly value: "selection";
|
|
188
|
+
readonly key: "v";
|
|
189
|
+
readonly numericKey: "1";
|
|
190
|
+
readonly fillable: true;
|
|
191
|
+
readonly toolbar: true;
|
|
192
|
+
} | {
|
|
193
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
194
|
+
readonly value: "rectangle";
|
|
195
|
+
readonly key: "r";
|
|
196
|
+
readonly numericKey: "2";
|
|
197
|
+
readonly fillable: true;
|
|
198
|
+
readonly toolbar: true;
|
|
199
|
+
} | {
|
|
200
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
201
|
+
readonly value: "diamond";
|
|
202
|
+
readonly key: "d";
|
|
203
|
+
readonly numericKey: "3";
|
|
204
|
+
readonly fillable: true;
|
|
205
|
+
readonly toolbar: true;
|
|
206
|
+
} | {
|
|
207
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
208
|
+
readonly value: "ellipse";
|
|
209
|
+
readonly key: "o";
|
|
210
|
+
readonly numericKey: "4";
|
|
211
|
+
readonly fillable: true;
|
|
212
|
+
readonly toolbar: true;
|
|
213
|
+
} | {
|
|
214
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
215
|
+
readonly value: "arrow";
|
|
216
|
+
readonly key: "a";
|
|
217
|
+
readonly numericKey: "5";
|
|
218
|
+
readonly fillable: true;
|
|
219
|
+
readonly toolbar: true;
|
|
220
|
+
} | {
|
|
221
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
222
|
+
readonly value: "line";
|
|
223
|
+
readonly key: "l";
|
|
224
|
+
readonly numericKey: "6";
|
|
225
|
+
readonly fillable: true;
|
|
226
|
+
readonly toolbar: true;
|
|
227
|
+
} | {
|
|
228
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
229
|
+
readonly value: "freedraw";
|
|
230
|
+
readonly key: readonly ["p", "x"];
|
|
231
|
+
readonly numericKey: "7";
|
|
232
|
+
readonly fillable: false;
|
|
233
|
+
readonly toolbar: true;
|
|
234
|
+
} | {
|
|
235
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
236
|
+
readonly value: "text";
|
|
237
|
+
readonly key: "t";
|
|
238
|
+
readonly numericKey: "8";
|
|
239
|
+
readonly fillable: false;
|
|
240
|
+
readonly toolbar: true;
|
|
241
|
+
} | {
|
|
242
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
243
|
+
readonly value: "image";
|
|
244
|
+
readonly key: null;
|
|
245
|
+
readonly numericKey: "9";
|
|
246
|
+
readonly fillable: false;
|
|
247
|
+
readonly toolbar: true;
|
|
248
|
+
} | {
|
|
249
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
250
|
+
readonly value: "eraser";
|
|
251
|
+
readonly key: "e";
|
|
252
|
+
readonly numericKey: "0";
|
|
253
|
+
readonly fillable: false;
|
|
254
|
+
readonly toolbar: true;
|
|
255
|
+
} | {
|
|
256
|
+
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
257
|
+
readonly value: "laser";
|
|
258
|
+
readonly key: "k";
|
|
259
|
+
readonly numericKey: null;
|
|
260
|
+
readonly fillable: false;
|
|
261
|
+
readonly toolbar: false;
|
|
262
|
+
})[]];
|
|
263
|
+
export declare const findShapeByKey: (key: string, app: AppClassProperties) => "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "lasso" | "eraser" | "hand" | "laser" | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createIsolation } from "jotai-scope";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import tunnel from "tunnel-rat";
|
|
4
|
+
export type Tunnel = ReturnType<typeof tunnel>;
|
|
5
|
+
type TunnelsContextValue = {
|
|
6
|
+
MainMenuTunnel: Tunnel;
|
|
7
|
+
WelcomeScreenMenuHintTunnel: Tunnel;
|
|
8
|
+
WelcomeScreenToolbarHintTunnel: Tunnel;
|
|
9
|
+
WelcomeScreenHelpHintTunnel: Tunnel;
|
|
10
|
+
WelcomeScreenCenterTunnel: Tunnel;
|
|
11
|
+
FooterCenterTunnel: Tunnel;
|
|
12
|
+
DefaultSidebarTriggerTunnel: Tunnel;
|
|
13
|
+
DefaultSidebarTabTriggersTunnel: Tunnel;
|
|
14
|
+
OverwriteConfirmDialogTunnel: Tunnel;
|
|
15
|
+
TTDDialogTriggerTunnel: Tunnel;
|
|
16
|
+
tunnelsJotai: ReturnType<typeof createIsolation>;
|
|
17
|
+
};
|
|
18
|
+
export declare const TunnelsContext: React.Context<TunnelsContextValue>;
|
|
19
|
+
export declare const useTunnels: () => TunnelsContextValue;
|
|
20
|
+
export declare const useInitializeTunnels: () => TunnelsContextValue;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AppState } from "./types";
|
|
2
|
+
export declare const resetCursor: (interactiveCanvas: HTMLCanvasElement | null) => void;
|
|
3
|
+
export declare const setCursor: (interactiveCanvas: HTMLCanvasElement | null, cursor: string) => void;
|
|
4
|
+
export declare const setEraserCursor: (interactiveCanvas: HTMLCanvasElement | null, theme: AppState["theme"]) => void;
|
|
5
|
+
export declare const setCursorForShape: (interactiveCanvas: HTMLCanvasElement | null, appState: Pick<AppState, "activeTool" | "theme">) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EDITOR_LS_KEYS } from "@nous-excalidraw/common";
|
|
2
|
+
import type { JSONValue } from "../types";
|
|
3
|
+
export declare class EditorLocalStorage {
|
|
4
|
+
static has(key: typeof EDITOR_LS_KEYS[keyof typeof EDITOR_LS_KEYS]): boolean;
|
|
5
|
+
static get<T extends JSONValue>(key: typeof EDITOR_LS_KEYS[keyof typeof EDITOR_LS_KEYS]): T | null;
|
|
6
|
+
static set: (key: (typeof EDITOR_LS_KEYS)[keyof typeof EDITOR_LS_KEYS], value: JSONValue) => boolean;
|
|
7
|
+
static delete: (name: (typeof EDITOR_LS_KEYS)[keyof typeof EDITOR_LS_KEYS]) => void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
import { IMAGE_MIME_TYPES, MIME_TYPES } from "@nous-excalidraw/common";
|
|
2
|
+
import type { ValueOf } from "@nous-excalidraw/common/utility-types";
|
|
3
|
+
import type { ExcalidrawElement, FileId } from "@nous-excalidraw/element/types";
|
|
4
|
+
import type { AppState, DataURL, LibraryItem } from "../types";
|
|
5
|
+
import type { ImportedLibraryData } from "./types";
|
|
6
|
+
export declare const getMimeType: (blob: Blob | string) => string;
|
|
7
|
+
export declare const getFileHandleType: (handle: FileSystemFileHandle | null) => string | null;
|
|
8
|
+
export declare const isImageFileHandleType: (type: string | null) => type is "png" | "svg";
|
|
9
|
+
export declare const isImageFileHandle: (handle: FileSystemFileHandle | null) => handle is FileSystemFileHandle;
|
|
10
|
+
export declare const isSupportedImageFileType: (type: string | null | undefined) => boolean;
|
|
11
|
+
export declare const isSupportedImageFile: (blob: Blob | null | undefined) => blob is Blob & {
|
|
12
|
+
type: ValueOf<typeof IMAGE_MIME_TYPES>;
|
|
13
|
+
};
|
|
14
|
+
export declare const loadSceneOrLibraryFromBlob: (blob: Blob | File,
|
|
15
|
+
/** @see restore.localAppState */
|
|
16
|
+
localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null,
|
|
17
|
+
/** FileSystemFileHandle. Defaults to `blob.handle` if defined, otherwise null. */
|
|
18
|
+
fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
19
|
+
type: "application/vnd.excalidraw+json";
|
|
20
|
+
data: {
|
|
21
|
+
elements: import("@nous-excalidraw/element/types").OrderedExcalidrawElement[];
|
|
22
|
+
appState: {
|
|
23
|
+
viewBackgroundColor: string;
|
|
24
|
+
theme: import("@nous-excalidraw/element/types").Theme;
|
|
25
|
+
frameRendering: {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
name: boolean;
|
|
28
|
+
outline: boolean;
|
|
29
|
+
clip: boolean;
|
|
30
|
+
};
|
|
31
|
+
name: string | null;
|
|
32
|
+
zoom: import("../types").Zoom;
|
|
33
|
+
scrollX: number;
|
|
34
|
+
scrollY: number;
|
|
35
|
+
viewModeEnabled: boolean;
|
|
36
|
+
openDialog: null | {
|
|
37
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
38
|
+
} | {
|
|
39
|
+
name: "ttd";
|
|
40
|
+
tab: "text-to-diagram" | "mermaid";
|
|
41
|
+
} | {
|
|
42
|
+
name: "commandPalette";
|
|
43
|
+
} | {
|
|
44
|
+
name: "settings";
|
|
45
|
+
} | {
|
|
46
|
+
name: "elementLinkSelector";
|
|
47
|
+
sourceElementId: ExcalidrawElement["id"];
|
|
48
|
+
} | {
|
|
49
|
+
name: "charts";
|
|
50
|
+
data: import("../charts").Spreadsheet;
|
|
51
|
+
rawText: string;
|
|
52
|
+
};
|
|
53
|
+
editingGroupId: import("@nous-excalidraw/element/types").GroupId | null;
|
|
54
|
+
selectedElementIds: Readonly<{
|
|
55
|
+
[id: string]: true;
|
|
56
|
+
}>;
|
|
57
|
+
frameToHighlight: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
58
|
+
activeTool: {
|
|
59
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
60
|
+
locked: boolean;
|
|
61
|
+
fromSelection: boolean;
|
|
62
|
+
} & import("../types").ActiveTool;
|
|
63
|
+
activeEmbeddable: {
|
|
64
|
+
element: import("@nous-excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
65
|
+
state: "hover" | "active";
|
|
66
|
+
} | null;
|
|
67
|
+
selectionElement: import("@nous-excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
68
|
+
selectedGroupIds: {
|
|
69
|
+
[groupId: string]: boolean;
|
|
70
|
+
};
|
|
71
|
+
selectedLinearElement: import("@nous-excalidraw/element").LinearElementEditor | null;
|
|
72
|
+
multiElement: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
73
|
+
newElement: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
74
|
+
isBindingEnabled: boolean;
|
|
75
|
+
isMidpointSnappingEnabled: boolean;
|
|
76
|
+
suggestedBinding: {
|
|
77
|
+
element: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawBindableElement>;
|
|
78
|
+
midPoint?: import("@nous-excalidraw/math").GlobalPoint;
|
|
79
|
+
} | null;
|
|
80
|
+
isRotating: boolean;
|
|
81
|
+
elementsToHighlight: import("@nous-excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
82
|
+
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
83
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
84
|
+
zenModeEnabled: boolean;
|
|
85
|
+
editingTextElement: import("@nous-excalidraw/element/types").ExcalidrawTextElement | null;
|
|
86
|
+
isCropping: boolean;
|
|
87
|
+
croppingElementId: ExcalidrawElement["id"] | null;
|
|
88
|
+
searchMatches: Readonly<{
|
|
89
|
+
focusedId: ExcalidrawElement["id"] | null;
|
|
90
|
+
matches: readonly import("../types").SearchMatch[];
|
|
91
|
+
}> | null;
|
|
92
|
+
activeLockedId: string | null;
|
|
93
|
+
hoveredElementIds: Readonly<{
|
|
94
|
+
[id: string]: true;
|
|
95
|
+
}>;
|
|
96
|
+
shouldCacheIgnoreZoom: boolean;
|
|
97
|
+
exportScale: number;
|
|
98
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
99
|
+
bindMode: import("@nous-excalidraw/element/types").BindMode;
|
|
100
|
+
gridSize: number;
|
|
101
|
+
contextMenu: {
|
|
102
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
103
|
+
top: number;
|
|
104
|
+
left: number;
|
|
105
|
+
} | null;
|
|
106
|
+
showWelcomeScreen: boolean;
|
|
107
|
+
isLoading: boolean;
|
|
108
|
+
errorMessage: React.ReactNode;
|
|
109
|
+
resizingElement: import("@nous-excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
110
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
111
|
+
bindingPreference: "enabled" | "disabled";
|
|
112
|
+
startBoundElement: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
113
|
+
editingFrame: string | null;
|
|
114
|
+
preferredSelectionTool: {
|
|
115
|
+
type: "selection" | "lasso";
|
|
116
|
+
initialized: boolean;
|
|
117
|
+
};
|
|
118
|
+
penMode: boolean;
|
|
119
|
+
penDetected: boolean;
|
|
120
|
+
exportBackground: boolean;
|
|
121
|
+
exportEmbedScene: boolean;
|
|
122
|
+
exportWithDarkMode: boolean;
|
|
123
|
+
currentItemStrokeColor: string;
|
|
124
|
+
currentItemBackgroundColor: string;
|
|
125
|
+
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
126
|
+
currentItemStrokeWidth: number;
|
|
127
|
+
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
128
|
+
currentItemRoughness: number;
|
|
129
|
+
currentItemOpacity: number;
|
|
130
|
+
currentItemFontFamily: import("@nous-excalidraw/element/types").FontFamilyValues;
|
|
131
|
+
currentItemFontSize: number;
|
|
132
|
+
currentItemTextAlign: import("@nous-excalidraw/element/types").TextAlign;
|
|
133
|
+
currentItemStartArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
|
|
134
|
+
currentItemEndArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
|
|
135
|
+
currentHoveredFontFamily: import("@nous-excalidraw/element/types").FontFamilyValues | null;
|
|
136
|
+
currentItemRoundness: import("@nous-excalidraw/element/types").StrokeRoundness;
|
|
137
|
+
cursorButton: "up" | "down";
|
|
138
|
+
scrolledOutside: boolean;
|
|
139
|
+
isResizing: boolean;
|
|
140
|
+
openMenu: "canvas" | null;
|
|
141
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
142
|
+
openSidebar: {
|
|
143
|
+
name: import("../types").SidebarName;
|
|
144
|
+
tab?: import("../types").SidebarTabName;
|
|
145
|
+
} | null;
|
|
146
|
+
defaultSidebarDockedPreference: boolean;
|
|
147
|
+
lastPointerDownWith: import("@nous-excalidraw/element/types").PointerType;
|
|
148
|
+
previousSelectedElementIds: {
|
|
149
|
+
[id: string]: true;
|
|
150
|
+
};
|
|
151
|
+
selectedElementsAreBeingDragged: boolean;
|
|
152
|
+
toast: {
|
|
153
|
+
message: React.ReactNode;
|
|
154
|
+
closable?: boolean;
|
|
155
|
+
duration?: number;
|
|
156
|
+
} | null;
|
|
157
|
+
gridStep: number;
|
|
158
|
+
gridModeEnabled: boolean;
|
|
159
|
+
fileHandle: FileSystemFileHandle | null;
|
|
160
|
+
stats: {
|
|
161
|
+
open: boolean;
|
|
162
|
+
panels: number;
|
|
163
|
+
};
|
|
164
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
165
|
+
originSnapOffset: {
|
|
166
|
+
x: number;
|
|
167
|
+
y: number;
|
|
168
|
+
} | null;
|
|
169
|
+
objectsSnapModeEnabled: boolean;
|
|
170
|
+
userToFollow: import("../types").UserToFollow | null;
|
|
171
|
+
followedBy: Set<import("../types").SocketId>;
|
|
172
|
+
lockedMultiSelections: {
|
|
173
|
+
[groupId: string]: true;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
files: import("../types").BinaryFiles;
|
|
177
|
+
};
|
|
178
|
+
} | {
|
|
179
|
+
type: "application/vnd.excalidrawlib+json";
|
|
180
|
+
data: ImportedLibraryData;
|
|
181
|
+
}>;
|
|
182
|
+
export declare const loadFromBlob: (blob: Blob,
|
|
183
|
+
/** @see restore.localAppState */
|
|
184
|
+
localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null,
|
|
185
|
+
/** FileSystemFileHandle. Defaults to `blob.handle` if defined, otherwise null. */
|
|
186
|
+
fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
187
|
+
elements: import("@nous-excalidraw/element/types").OrderedExcalidrawElement[];
|
|
188
|
+
appState: {
|
|
189
|
+
viewBackgroundColor: string;
|
|
190
|
+
theme: import("@nous-excalidraw/element/types").Theme;
|
|
191
|
+
frameRendering: {
|
|
192
|
+
enabled: boolean;
|
|
193
|
+
name: boolean;
|
|
194
|
+
outline: boolean;
|
|
195
|
+
clip: boolean;
|
|
196
|
+
};
|
|
197
|
+
name: string | null;
|
|
198
|
+
zoom: import("../types").Zoom;
|
|
199
|
+
scrollX: number;
|
|
200
|
+
scrollY: number;
|
|
201
|
+
viewModeEnabled: boolean;
|
|
202
|
+
openDialog: null | {
|
|
203
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
204
|
+
} | {
|
|
205
|
+
name: "ttd";
|
|
206
|
+
tab: "text-to-diagram" | "mermaid";
|
|
207
|
+
} | {
|
|
208
|
+
name: "commandPalette";
|
|
209
|
+
} | {
|
|
210
|
+
name: "settings";
|
|
211
|
+
} | {
|
|
212
|
+
name: "elementLinkSelector";
|
|
213
|
+
sourceElementId: ExcalidrawElement["id"];
|
|
214
|
+
} | {
|
|
215
|
+
name: "charts";
|
|
216
|
+
data: import("../charts").Spreadsheet;
|
|
217
|
+
rawText: string;
|
|
218
|
+
};
|
|
219
|
+
editingGroupId: import("@nous-excalidraw/element/types").GroupId | null;
|
|
220
|
+
selectedElementIds: Readonly<{
|
|
221
|
+
[id: string]: true;
|
|
222
|
+
}>;
|
|
223
|
+
frameToHighlight: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
224
|
+
activeTool: {
|
|
225
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
226
|
+
locked: boolean;
|
|
227
|
+
fromSelection: boolean;
|
|
228
|
+
} & import("../types").ActiveTool;
|
|
229
|
+
activeEmbeddable: {
|
|
230
|
+
element: import("@nous-excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
231
|
+
state: "hover" | "active";
|
|
232
|
+
} | null;
|
|
233
|
+
selectionElement: import("@nous-excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
234
|
+
selectedGroupIds: {
|
|
235
|
+
[groupId: string]: boolean;
|
|
236
|
+
};
|
|
237
|
+
selectedLinearElement: import("@nous-excalidraw/element").LinearElementEditor | null;
|
|
238
|
+
multiElement: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
239
|
+
newElement: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
240
|
+
isBindingEnabled: boolean;
|
|
241
|
+
isMidpointSnappingEnabled: boolean;
|
|
242
|
+
suggestedBinding: {
|
|
243
|
+
element: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawBindableElement>;
|
|
244
|
+
midPoint?: import("@nous-excalidraw/math").GlobalPoint;
|
|
245
|
+
} | null;
|
|
246
|
+
isRotating: boolean;
|
|
247
|
+
elementsToHighlight: import("@nous-excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
248
|
+
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
249
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
250
|
+
zenModeEnabled: boolean;
|
|
251
|
+
editingTextElement: import("@nous-excalidraw/element/types").ExcalidrawTextElement | null;
|
|
252
|
+
isCropping: boolean;
|
|
253
|
+
croppingElementId: ExcalidrawElement["id"] | null;
|
|
254
|
+
searchMatches: Readonly<{
|
|
255
|
+
focusedId: ExcalidrawElement["id"] | null;
|
|
256
|
+
matches: readonly import("../types").SearchMatch[];
|
|
257
|
+
}> | null;
|
|
258
|
+
activeLockedId: string | null;
|
|
259
|
+
hoveredElementIds: Readonly<{
|
|
260
|
+
[id: string]: true;
|
|
261
|
+
}>;
|
|
262
|
+
shouldCacheIgnoreZoom: boolean;
|
|
263
|
+
exportScale: number;
|
|
264
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
265
|
+
bindMode: import("@nous-excalidraw/element/types").BindMode;
|
|
266
|
+
gridSize: number;
|
|
267
|
+
contextMenu: {
|
|
268
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
269
|
+
top: number;
|
|
270
|
+
left: number;
|
|
271
|
+
} | null;
|
|
272
|
+
showWelcomeScreen: boolean;
|
|
273
|
+
isLoading: boolean;
|
|
274
|
+
errorMessage: React.ReactNode;
|
|
275
|
+
resizingElement: import("@nous-excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
276
|
+
boxSelectionMode: import("../types").BoxSelectionMode;
|
|
277
|
+
bindingPreference: "enabled" | "disabled";
|
|
278
|
+
startBoundElement: import("@nous-excalidraw/element/types").NonDeleted<import("@nous-excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
279
|
+
editingFrame: string | null;
|
|
280
|
+
preferredSelectionTool: {
|
|
281
|
+
type: "selection" | "lasso";
|
|
282
|
+
initialized: boolean;
|
|
283
|
+
};
|
|
284
|
+
penMode: boolean;
|
|
285
|
+
penDetected: boolean;
|
|
286
|
+
exportBackground: boolean;
|
|
287
|
+
exportEmbedScene: boolean;
|
|
288
|
+
exportWithDarkMode: boolean;
|
|
289
|
+
currentItemStrokeColor: string;
|
|
290
|
+
currentItemBackgroundColor: string;
|
|
291
|
+
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
292
|
+
currentItemStrokeWidth: number;
|
|
293
|
+
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
294
|
+
currentItemRoughness: number;
|
|
295
|
+
currentItemOpacity: number;
|
|
296
|
+
currentItemFontFamily: import("@nous-excalidraw/element/types").FontFamilyValues;
|
|
297
|
+
currentItemFontSize: number;
|
|
298
|
+
currentItemTextAlign: import("@nous-excalidraw/element/types").TextAlign;
|
|
299
|
+
currentItemStartArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
|
|
300
|
+
currentItemEndArrowhead: import("@nous-excalidraw/element/types").Arrowhead | null;
|
|
301
|
+
currentHoveredFontFamily: import("@nous-excalidraw/element/types").FontFamilyValues | null;
|
|
302
|
+
currentItemRoundness: import("@nous-excalidraw/element/types").StrokeRoundness;
|
|
303
|
+
cursorButton: "up" | "down";
|
|
304
|
+
scrolledOutside: boolean;
|
|
305
|
+
isResizing: boolean;
|
|
306
|
+
openMenu: "canvas" | null;
|
|
307
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
308
|
+
openSidebar: {
|
|
309
|
+
name: import("../types").SidebarName;
|
|
310
|
+
tab?: import("../types").SidebarTabName;
|
|
311
|
+
} | null;
|
|
312
|
+
defaultSidebarDockedPreference: boolean;
|
|
313
|
+
lastPointerDownWith: import("@nous-excalidraw/element/types").PointerType;
|
|
314
|
+
previousSelectedElementIds: {
|
|
315
|
+
[id: string]: true;
|
|
316
|
+
};
|
|
317
|
+
selectedElementsAreBeingDragged: boolean;
|
|
318
|
+
toast: {
|
|
319
|
+
message: React.ReactNode;
|
|
320
|
+
closable?: boolean;
|
|
321
|
+
duration?: number;
|
|
322
|
+
} | null;
|
|
323
|
+
gridStep: number;
|
|
324
|
+
gridModeEnabled: boolean;
|
|
325
|
+
fileHandle: FileSystemFileHandle | null;
|
|
326
|
+
stats: {
|
|
327
|
+
open: boolean;
|
|
328
|
+
panels: number;
|
|
329
|
+
};
|
|
330
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
331
|
+
originSnapOffset: {
|
|
332
|
+
x: number;
|
|
333
|
+
y: number;
|
|
334
|
+
} | null;
|
|
335
|
+
objectsSnapModeEnabled: boolean;
|
|
336
|
+
userToFollow: import("../types").UserToFollow | null;
|
|
337
|
+
followedBy: Set<import("../types").SocketId>;
|
|
338
|
+
lockedMultiSelections: {
|
|
339
|
+
[groupId: string]: true;
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
files: import("../types").BinaryFiles;
|
|
343
|
+
}>;
|
|
344
|
+
export declare const parseLibraryJSON: (json: string, defaultStatus?: LibraryItem["status"]) => LibraryItem[];
|
|
345
|
+
export declare const loadLibraryFromBlob: (blob: Blob, defaultStatus?: LibraryItem["status"]) => Promise<LibraryItem[]>;
|
|
346
|
+
export declare const canvasToBlob: (canvas: HTMLCanvasElement | Promise<HTMLCanvasElement>) => Promise<Blob>;
|
|
347
|
+
/** generates SHA-1 digest from supplied file (if not supported, falls back
|
|
348
|
+
to a 40-char base64 random id) */
|
|
349
|
+
export declare const generateIdFromFile: (file: File) => Promise<FileId>;
|
|
350
|
+
/** async. For sync variant, use getDataURL_sync */
|
|
351
|
+
export declare const getDataURL: (file: Blob | File) => Promise<DataURL>;
|
|
352
|
+
export declare const getDataURL_sync: (data: string | Uint8Array | ArrayBuffer, mimeType: ValueOf<typeof MIME_TYPES>) => DataURL;
|
|
353
|
+
export declare const dataURLToFile: (dataURL: DataURL, filename?: string) => File;
|
|
354
|
+
export declare const dataURLToString: (dataURL: DataURL) => string;
|
|
355
|
+
export declare const resizeImageFile: (file: File, opts: {
|
|
356
|
+
/** undefined indicates auto */
|
|
357
|
+
outputType?: (typeof MIME_TYPES)["jpg"];
|
|
358
|
+
maxWidthOrHeight: number;
|
|
359
|
+
}) => Promise<File>;
|
|
360
|
+
export declare const SVGStringToFile: (SVGString: string, filename?: string) => File & {
|
|
361
|
+
type: typeof MIME_TYPES.svg;
|
|
362
|
+
};
|
|
363
|
+
export declare const ImageURLToFile: (imageUrl: string, filename?: string) => Promise<File | undefined>;
|
|
364
|
+
export declare const getFileHandle: (event: DragEvent | React.DragEvent | DataTransferItem) => Promise<FileSystemFileHandle | null>;
|
|
365
|
+
export declare const createFile: (blob: File | Blob | ArrayBuffer, mimeType: string, name: string | undefined) => File;
|
|
366
|
+
/** attempts to detect correct mimeType if none is set, or if an image
|
|
367
|
+
* has an incorrect extension.
|
|
368
|
+
* Note: doesn't handle missing .excalidraw/.excalidrawlib extension */
|
|
369
|
+
export declare const normalizeFile: (file: File) => Promise<File>;
|
|
370
|
+
export declare const blobToArrayBuffer: (blob: Blob) => Promise<ArrayBuffer>;
|