@excalidraw/math 0.18.0-a8acc82 → 0.18.0-a9ca16e
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/dev/index.js +9 -4
- package/dist/dev/index.js.map +2 -2
- package/dist/prod/index.js +1 -1
- package/dist/types/common/debug.d.ts +21 -0
- package/dist/types/common/src/appEventBus.d.ts +27 -0
- package/dist/types/common/src/bounds.d.ts +10 -0
- package/dist/types/common/src/colors.d.ts +59 -39
- package/dist/types/common/src/constants.d.ts +23 -27
- package/dist/types/common/src/editorInterface.d.ts +34 -0
- package/dist/types/common/src/font-metadata.d.ts +1 -3
- package/dist/types/common/src/index.d.ts +5 -0
- package/dist/types/common/src/keys.d.ts +1 -1
- package/dist/types/common/src/utility-types.d.ts +0 -1
- package/dist/types/common/src/utils.d.ts +53 -42
- package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
- package/dist/types/element/src/Scene.d.ts +5 -3
- 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 +67 -48
- package/dist/types/element/src/bounds.d.ts +3 -11
- package/dist/types/element/src/collision.d.ts +7 -2
- package/dist/types/element/src/comparisons.d.ts +7 -7
- package/dist/types/element/src/distribute.d.ts +2 -1
- package/dist/types/element/src/dragElements.d.ts +3 -3
- package/dist/types/element/src/duplicate.d.ts +3 -3
- package/dist/types/element/src/elbowArrow.d.ts +2 -0
- package/dist/types/element/src/fractionalIndex.d.ts +2 -2
- package/dist/types/element/src/frame.d.ts +5 -1
- package/dist/types/element/src/heading.d.ts +2 -1
- package/dist/types/element/src/image.d.ts +1 -11
- package/dist/types/element/src/index.d.ts +4 -3
- package/dist/types/element/src/linearElementEditor.d.ts +21 -20
- package/dist/types/element/src/mutateElement.d.ts +5 -1
- package/dist/types/element/src/newElement.d.ts +6 -6
- package/dist/types/element/src/renderElement.d.ts +1 -7
- package/dist/types/element/src/resizeElements.d.ts +10 -10
- package/dist/types/element/src/resizeTest.d.ts +6 -5
- package/dist/types/element/src/selection.d.ts +8 -8
- package/dist/types/element/src/shape.d.ts +8 -7
- package/dist/types/element/src/textElement.d.ts +1 -1
- package/dist/types/element/src/textMeasurements.d.ts +1 -3
- package/dist/types/element/src/textWrapping.d.ts +26 -0
- package/dist/types/{excalidraw/data → element/src}/transform.d.ts +3 -3
- package/dist/types/element/src/transformHandles.d.ts +8 -27
- package/dist/types/element/src/typeChecks.d.ts +4 -7
- package/dist/types/element/src/types.d.ts +12 -13
- package/dist/types/element/src/utils.d.ts +8 -3
- package/dist/types/element/src/zindex.d.ts +7 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +167 -210
- package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -7
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +92 -121
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +544 -902
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +123 -897
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +44 -59
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +145 -192
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
- package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +3 -4
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +53 -74
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +90 -119
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +59 -74
- package/dist/types/excalidraw/actions/actionExport.d.ts +171 -1412
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +10 -396
- package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
- package/dist/types/excalidraw/actions/actionFrame.d.ts +261 -356
- package/dist/types/excalidraw/actions/actionGroup.d.ts +95 -132
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +136 -189
- package/dist/types/excalidraw/actions/actionLink.d.ts +59 -74
- package/dist/types/excalidraw/actions/actionMenu.d.ts +48 -437
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -361
- package/dist/types/excalidraw/actions/actionProperties.d.ts +152 -2533
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +47 -66
- package/dist/types/excalidraw/actions/actionStyles.d.ts +44 -58
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +4 -4
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +172 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +59 -74
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +172 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +59 -74
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +47 -68
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +58 -73
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +59 -74
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +59 -74
- package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -9
- package/dist/types/excalidraw/actions/index.d.ts +3 -1
- package/dist/types/excalidraw/actions/register.d.ts +2 -2
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +4 -4
- package/dist/types/excalidraw/appState.d.ts +28 -22
- 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/clipboard.d.ts +13 -38
- package/dist/types/excalidraw/components/Actions.d.ts +14 -4
- package/dist/types/excalidraw/components/App.d.ts +109 -70
- package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
- package/dist/types/excalidraw/components/Card.d.ts +1 -3
- package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +1 -3
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +0 -1
- package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -1
- package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
- package/dist/types/excalidraw/components/CommandPalette/types.d.ts +2 -4
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +2 -2
- package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
- package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
- package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
- package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/EyeDropper.d.ts +0 -1
- package/dist/types/excalidraw/components/FilledButton.d.ts +2 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +2 -1
- package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
- package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
- package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
- package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
- package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
- package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
- package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
- package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
- package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
- package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
- package/dist/types/excalidraw/components/MobileToolBar.d.ts +10 -0
- package/dist/types/excalidraw/components/Modal.d.ts +0 -1
- package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
- package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
- package/dist/types/excalidraw/components/Popover.d.ts +2 -1
- package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -1
- package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
- package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
- package/dist/types/excalidraw/components/Range.d.ts +10 -4
- package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
- package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +15 -21
- package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
- package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
- package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
- package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
- package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
- package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
- package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
- package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
- package/dist/types/excalidraw/components/Stats/DragInput.d.ts +0 -1
- package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
- package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
- 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 +3 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +12 -29
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
- 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 +16 -16
- 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 +1 -0
- package/dist/types/excalidraw/components/Toast.d.ts +11 -7
- package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
- package/dist/types/excalidraw/components/Trans.d.ts +2 -2
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +7 -3
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +47 -35
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +7 -5
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +13 -22
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +5 -4
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +0 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
- 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 +3 -4
- package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +2 -2
- package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
- package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +1 -1
- package/dist/types/excalidraw/components/icons.d.ts +44 -22
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +19 -2
- package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +39 -35
- package/dist/types/excalidraw/components/shapes.d.ts +74 -1
- package/dist/types/excalidraw/data/blob.d.ts +326 -7
- package/dist/types/excalidraw/data/encode.d.ts +4 -4
- package/dist/types/excalidraw/data/encryption.d.ts +5 -5
- package/dist/types/excalidraw/data/filesystem.d.ts +5 -7
- package/dist/types/excalidraw/data/index.d.ts +4 -5
- package/dist/types/excalidraw/data/json.d.ts +170 -4
- package/dist/types/excalidraw/data/library.d.ts +24 -9
- package/dist/types/excalidraw/data/resave.d.ts +7 -2
- package/dist/types/excalidraw/data/restore.d.ts +25 -10
- package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
- package/dist/types/excalidraw/errors.d.ts +14 -0
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
- package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
- package/dist/types/excalidraw/i18n.d.ts +2 -2
- package/dist/types/excalidraw/renderer/animation.d.ts +12 -0
- package/dist/types/excalidraw/renderer/helpers.d.ts +6 -8
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +8 -14
- package/dist/types/excalidraw/scene/Renderer.d.ts +5 -2
- package/dist/types/excalidraw/scene/export.d.ts +2 -2
- package/dist/types/excalidraw/scene/scroll.d.ts +1 -6
- package/dist/types/excalidraw/scene/types.d.ts +22 -5
- package/dist/types/excalidraw/shortcut.d.ts +1 -0
- package/dist/types/excalidraw/snapping.d.ts +5 -5
- package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
- package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
- package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
- package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
- package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
- package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
- package/dist/types/excalidraw/types.d.ts +120 -36
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +7 -3
- package/dist/types/math/src/point.d.ts +7 -2
- package/dist/types/math/src/polygon.d.ts +2 -2
- package/dist/types/math/src/range.d.ts +1 -3
- package/dist/types/math/src/segment.d.ts +3 -3
- package/dist/types/math/src/types.d.ts +25 -1
- package/dist/types/utils/src/bbox.d.ts +1 -1
- package/dist/types/utils/src/export.d.ts +5 -5
- package/dist/types/utils/src/shape.d.ts +6 -6
- package/dist/types/utils/src/withinBounds.d.ts +2 -2
- package/package.json +2 -2
- package/dist/types/excalidraw/charts.d.ts +0 -27
- package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
- package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -16
- package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -9
- package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
- package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -10
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -85
- package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
- package/dist/types/excalidraw/index.d.ts +0 -47
- package/dist/types/excalidraw/polyfill.d.ts +0 -2
|
@@ -1,190 +1,263 @@
|
|
|
1
1
|
import type { AppClassProperties } from "../types";
|
|
2
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
|
+
}, {
|
|
3
10
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
4
11
|
readonly value: "selection";
|
|
5
12
|
readonly key: "v";
|
|
6
13
|
readonly numericKey: "1";
|
|
7
14
|
readonly fillable: true;
|
|
15
|
+
readonly toolbar: true;
|
|
8
16
|
}, {
|
|
9
17
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
10
18
|
readonly value: "rectangle";
|
|
11
19
|
readonly key: "r";
|
|
12
20
|
readonly numericKey: "2";
|
|
13
21
|
readonly fillable: true;
|
|
22
|
+
readonly toolbar: true;
|
|
14
23
|
}, {
|
|
15
24
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
16
25
|
readonly value: "diamond";
|
|
17
26
|
readonly key: "d";
|
|
18
27
|
readonly numericKey: "3";
|
|
19
28
|
readonly fillable: true;
|
|
29
|
+
readonly toolbar: true;
|
|
20
30
|
}, {
|
|
21
31
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
22
32
|
readonly value: "ellipse";
|
|
23
33
|
readonly key: "o";
|
|
24
34
|
readonly numericKey: "4";
|
|
25
35
|
readonly fillable: true;
|
|
36
|
+
readonly toolbar: true;
|
|
26
37
|
}, {
|
|
27
38
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
28
39
|
readonly value: "arrow";
|
|
29
40
|
readonly key: "a";
|
|
30
41
|
readonly numericKey: "5";
|
|
31
42
|
readonly fillable: true;
|
|
43
|
+
readonly toolbar: true;
|
|
32
44
|
}, {
|
|
33
45
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
34
46
|
readonly value: "line";
|
|
35
47
|
readonly key: "l";
|
|
36
48
|
readonly numericKey: "6";
|
|
37
49
|
readonly fillable: true;
|
|
50
|
+
readonly toolbar: true;
|
|
38
51
|
}, {
|
|
39
52
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
40
53
|
readonly value: "freedraw";
|
|
41
54
|
readonly key: readonly ["p", "x"];
|
|
42
55
|
readonly numericKey: "7";
|
|
43
56
|
readonly fillable: false;
|
|
57
|
+
readonly toolbar: true;
|
|
44
58
|
}, {
|
|
45
59
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
46
60
|
readonly value: "text";
|
|
47
61
|
readonly key: "t";
|
|
48
62
|
readonly numericKey: "8";
|
|
49
63
|
readonly fillable: false;
|
|
64
|
+
readonly toolbar: true;
|
|
50
65
|
}, {
|
|
51
66
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
52
67
|
readonly value: "image";
|
|
53
68
|
readonly key: null;
|
|
54
69
|
readonly numericKey: "9";
|
|
55
70
|
readonly fillable: false;
|
|
71
|
+
readonly toolbar: true;
|
|
56
72
|
}, {
|
|
57
73
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
58
74
|
readonly value: "eraser";
|
|
59
75
|
readonly key: "e";
|
|
60
76
|
readonly numericKey: "0";
|
|
61
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;
|
|
62
86
|
}];
|
|
63
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
|
+
}, {
|
|
64
95
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
65
96
|
readonly value: "selection";
|
|
66
97
|
readonly key: "v";
|
|
67
98
|
readonly numericKey: "1";
|
|
68
99
|
readonly fillable: true;
|
|
100
|
+
readonly toolbar: true;
|
|
69
101
|
}, {
|
|
70
102
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
71
103
|
readonly value: "rectangle";
|
|
72
104
|
readonly key: "r";
|
|
73
105
|
readonly numericKey: "2";
|
|
74
106
|
readonly fillable: true;
|
|
107
|
+
readonly toolbar: true;
|
|
75
108
|
}, {
|
|
76
109
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
77
110
|
readonly value: "diamond";
|
|
78
111
|
readonly key: "d";
|
|
79
112
|
readonly numericKey: "3";
|
|
80
113
|
readonly fillable: true;
|
|
114
|
+
readonly toolbar: true;
|
|
81
115
|
}, {
|
|
82
116
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
83
117
|
readonly value: "ellipse";
|
|
84
118
|
readonly key: "o";
|
|
85
119
|
readonly numericKey: "4";
|
|
86
120
|
readonly fillable: true;
|
|
121
|
+
readonly toolbar: true;
|
|
87
122
|
}, {
|
|
88
123
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
89
124
|
readonly value: "arrow";
|
|
90
125
|
readonly key: "a";
|
|
91
126
|
readonly numericKey: "5";
|
|
92
127
|
readonly fillable: true;
|
|
128
|
+
readonly toolbar: true;
|
|
93
129
|
}, {
|
|
94
130
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
95
131
|
readonly value: "line";
|
|
96
132
|
readonly key: "l";
|
|
97
133
|
readonly numericKey: "6";
|
|
98
134
|
readonly fillable: true;
|
|
135
|
+
readonly toolbar: true;
|
|
99
136
|
}, {
|
|
100
137
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
101
138
|
readonly value: "freedraw";
|
|
102
139
|
readonly key: readonly ["p", "x"];
|
|
103
140
|
readonly numericKey: "7";
|
|
104
141
|
readonly fillable: false;
|
|
142
|
+
readonly toolbar: true;
|
|
105
143
|
}, {
|
|
106
144
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
107
145
|
readonly value: "text";
|
|
108
146
|
readonly key: "t";
|
|
109
147
|
readonly numericKey: "8";
|
|
110
148
|
readonly fillable: false;
|
|
149
|
+
readonly toolbar: true;
|
|
111
150
|
}, {
|
|
112
151
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
113
152
|
readonly value: "image";
|
|
114
153
|
readonly key: null;
|
|
115
154
|
readonly numericKey: "9";
|
|
116
155
|
readonly fillable: false;
|
|
156
|
+
readonly toolbar: true;
|
|
117
157
|
}, {
|
|
118
158
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
119
159
|
readonly value: "eraser";
|
|
120
160
|
readonly key: "e";
|
|
121
161
|
readonly numericKey: "0";
|
|
122
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;
|
|
123
171
|
}] | readonly [{
|
|
124
172
|
readonly value: "lasso";
|
|
125
173
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
126
174
|
readonly key: "v";
|
|
127
175
|
readonly numericKey: "1";
|
|
128
176
|
readonly fillable: true;
|
|
177
|
+
readonly toolbar: true;
|
|
129
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
|
+
} | {
|
|
130
186
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
131
187
|
readonly value: "selection";
|
|
132
188
|
readonly key: "v";
|
|
133
189
|
readonly numericKey: "1";
|
|
134
190
|
readonly fillable: true;
|
|
191
|
+
readonly toolbar: true;
|
|
135
192
|
} | {
|
|
136
193
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
137
194
|
readonly value: "rectangle";
|
|
138
195
|
readonly key: "r";
|
|
139
196
|
readonly numericKey: "2";
|
|
140
197
|
readonly fillable: true;
|
|
198
|
+
readonly toolbar: true;
|
|
141
199
|
} | {
|
|
142
200
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
143
201
|
readonly value: "diamond";
|
|
144
202
|
readonly key: "d";
|
|
145
203
|
readonly numericKey: "3";
|
|
146
204
|
readonly fillable: true;
|
|
205
|
+
readonly toolbar: true;
|
|
147
206
|
} | {
|
|
148
207
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
149
208
|
readonly value: "ellipse";
|
|
150
209
|
readonly key: "o";
|
|
151
210
|
readonly numericKey: "4";
|
|
152
211
|
readonly fillable: true;
|
|
212
|
+
readonly toolbar: true;
|
|
153
213
|
} | {
|
|
154
214
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
155
215
|
readonly value: "arrow";
|
|
156
216
|
readonly key: "a";
|
|
157
217
|
readonly numericKey: "5";
|
|
158
218
|
readonly fillable: true;
|
|
219
|
+
readonly toolbar: true;
|
|
159
220
|
} | {
|
|
160
221
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
161
222
|
readonly value: "line";
|
|
162
223
|
readonly key: "l";
|
|
163
224
|
readonly numericKey: "6";
|
|
164
225
|
readonly fillable: true;
|
|
226
|
+
readonly toolbar: true;
|
|
165
227
|
} | {
|
|
166
228
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
167
229
|
readonly value: "freedraw";
|
|
168
230
|
readonly key: readonly ["p", "x"];
|
|
169
231
|
readonly numericKey: "7";
|
|
170
232
|
readonly fillable: false;
|
|
233
|
+
readonly toolbar: true;
|
|
171
234
|
} | {
|
|
172
235
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
173
236
|
readonly value: "text";
|
|
174
237
|
readonly key: "t";
|
|
175
238
|
readonly numericKey: "8";
|
|
176
239
|
readonly fillable: false;
|
|
240
|
+
readonly toolbar: true;
|
|
177
241
|
} | {
|
|
178
242
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
179
243
|
readonly value: "image";
|
|
180
244
|
readonly key: null;
|
|
181
245
|
readonly numericKey: "9";
|
|
182
246
|
readonly fillable: false;
|
|
247
|
+
readonly toolbar: true;
|
|
183
248
|
} | {
|
|
184
249
|
readonly icon: import("react/jsx-runtime").JSX.Element;
|
|
185
250
|
readonly value: "eraser";
|
|
186
251
|
readonly key: "e";
|
|
187
252
|
readonly numericKey: "0";
|
|
188
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;
|
|
189
262
|
})[]];
|
|
190
|
-
export declare const findShapeByKey: (key: string, app: AppClassProperties) => "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "lasso" | "eraser" | null;
|
|
263
|
+
export declare const findShapeByKey: (key: string, app: AppClassProperties) => "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "lasso" | "eraser" | "hand" | "laser" | null;
|
|
@@ -2,24 +2,343 @@ import { IMAGE_MIME_TYPES, MIME_TYPES } from "@excalidraw/common";
|
|
|
2
2
|
import type { ValueOf } from "@excalidraw/common/utility-types";
|
|
3
3
|
import type { ExcalidrawElement, FileId } from "@excalidraw/element/types";
|
|
4
4
|
import type { AppState, DataURL, LibraryItem } from "../types";
|
|
5
|
-
import type { FileSystemHandle } from "browser-fs-access";
|
|
6
5
|
import type { ImportedLibraryData } from "./types";
|
|
7
6
|
export declare const getMimeType: (blob: Blob | string) => string;
|
|
8
|
-
export declare const getFileHandleType: (handle:
|
|
7
|
+
export declare const getFileHandleType: (handle: FileSystemFileHandle | null) => string | null;
|
|
9
8
|
export declare const isImageFileHandleType: (type: string | null) => type is "png" | "svg";
|
|
10
|
-
export declare const isImageFileHandle: (handle:
|
|
9
|
+
export declare const isImageFileHandle: (handle: FileSystemFileHandle | null) => handle is FileSystemFileHandle;
|
|
11
10
|
export declare const isSupportedImageFileType: (type: string | null | undefined) => boolean;
|
|
12
11
|
export declare const isSupportedImageFile: (blob: Blob | null | undefined) => blob is Blob & {
|
|
13
12
|
type: ValueOf<typeof IMAGE_MIME_TYPES>;
|
|
14
13
|
};
|
|
15
|
-
export declare const loadSceneOrLibraryFromBlob: (blob: Blob | File,
|
|
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<{
|
|
16
19
|
type: "application/vnd.excalidraw+json";
|
|
17
|
-
data:
|
|
20
|
+
data: {
|
|
21
|
+
elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
22
|
+
appState: {
|
|
23
|
+
viewBackgroundColor: string;
|
|
24
|
+
theme: import("@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("@excalidraw/element/types").GroupId | null;
|
|
54
|
+
selectedElementIds: Readonly<{
|
|
55
|
+
[id: string]: true;
|
|
56
|
+
}>;
|
|
57
|
+
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@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("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
65
|
+
state: "hover" | "active";
|
|
66
|
+
} | null;
|
|
67
|
+
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
68
|
+
selectedGroupIds: {
|
|
69
|
+
[groupId: string]: boolean;
|
|
70
|
+
};
|
|
71
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
72
|
+
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
73
|
+
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
74
|
+
isBindingEnabled: boolean;
|
|
75
|
+
isMidpointSnappingEnabled: boolean;
|
|
76
|
+
suggestedBinding: {
|
|
77
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
78
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
79
|
+
} | null;
|
|
80
|
+
isRotating: boolean;
|
|
81
|
+
elementsToHighlight: import("@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("@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("@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("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
110
|
+
bindingPreference: "enabled" | "disabled";
|
|
111
|
+
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
112
|
+
editingFrame: string | null;
|
|
113
|
+
preferredSelectionTool: {
|
|
114
|
+
type: "selection" | "lasso";
|
|
115
|
+
initialized: boolean;
|
|
116
|
+
};
|
|
117
|
+
penMode: boolean;
|
|
118
|
+
penDetected: boolean;
|
|
119
|
+
exportBackground: boolean;
|
|
120
|
+
exportEmbedScene: boolean;
|
|
121
|
+
exportWithDarkMode: boolean;
|
|
122
|
+
currentItemStrokeColor: string;
|
|
123
|
+
currentItemBackgroundColor: string;
|
|
124
|
+
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
125
|
+
currentItemStrokeWidth: number;
|
|
126
|
+
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
127
|
+
currentItemRoughness: number;
|
|
128
|
+
currentItemOpacity: number;
|
|
129
|
+
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
130
|
+
currentItemFontSize: number;
|
|
131
|
+
currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
|
|
132
|
+
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
133
|
+
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
134
|
+
currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
|
|
135
|
+
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
136
|
+
cursorButton: "up" | "down";
|
|
137
|
+
scrolledOutside: boolean;
|
|
138
|
+
isResizing: boolean;
|
|
139
|
+
openMenu: "canvas" | null;
|
|
140
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
141
|
+
openSidebar: {
|
|
142
|
+
name: import("../types").SidebarName;
|
|
143
|
+
tab?: import("../types").SidebarTabName;
|
|
144
|
+
} | null;
|
|
145
|
+
defaultSidebarDockedPreference: boolean;
|
|
146
|
+
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
147
|
+
previousSelectedElementIds: {
|
|
148
|
+
[id: string]: true;
|
|
149
|
+
};
|
|
150
|
+
selectedElementsAreBeingDragged: boolean;
|
|
151
|
+
toast: {
|
|
152
|
+
message: React.ReactNode;
|
|
153
|
+
closable?: boolean;
|
|
154
|
+
duration?: number;
|
|
155
|
+
} | null;
|
|
156
|
+
gridStep: number;
|
|
157
|
+
gridModeEnabled: boolean;
|
|
158
|
+
fileHandle: FileSystemFileHandle | null;
|
|
159
|
+
stats: {
|
|
160
|
+
open: boolean;
|
|
161
|
+
panels: number;
|
|
162
|
+
};
|
|
163
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
164
|
+
originSnapOffset: {
|
|
165
|
+
x: number;
|
|
166
|
+
y: number;
|
|
167
|
+
} | null;
|
|
168
|
+
objectsSnapModeEnabled: boolean;
|
|
169
|
+
userToFollow: import("../types").UserToFollow | null;
|
|
170
|
+
followedBy: Set<import("../types").SocketId>;
|
|
171
|
+
lockedMultiSelections: {
|
|
172
|
+
[groupId: string]: true;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
files: import("../types").BinaryFiles;
|
|
176
|
+
};
|
|
18
177
|
} | {
|
|
19
178
|
type: "application/vnd.excalidrawlib+json";
|
|
20
179
|
data: ImportedLibraryData;
|
|
21
180
|
}>;
|
|
22
|
-
export declare const loadFromBlob: (blob: Blob,
|
|
181
|
+
export declare const loadFromBlob: (blob: Blob,
|
|
182
|
+
/** @see restore.localAppState */
|
|
183
|
+
localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null,
|
|
184
|
+
/** FileSystemFileHandle. Defaults to `blob.handle` if defined, otherwise null. */
|
|
185
|
+
fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
186
|
+
elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
187
|
+
appState: {
|
|
188
|
+
viewBackgroundColor: string;
|
|
189
|
+
theme: import("@excalidraw/element/types").Theme;
|
|
190
|
+
frameRendering: {
|
|
191
|
+
enabled: boolean;
|
|
192
|
+
name: boolean;
|
|
193
|
+
outline: boolean;
|
|
194
|
+
clip: boolean;
|
|
195
|
+
};
|
|
196
|
+
name: string | null;
|
|
197
|
+
zoom: import("../types").Zoom;
|
|
198
|
+
scrollX: number;
|
|
199
|
+
scrollY: number;
|
|
200
|
+
viewModeEnabled: boolean;
|
|
201
|
+
openDialog: null | {
|
|
202
|
+
name: "imageExport" | "help" | "jsonExport";
|
|
203
|
+
} | {
|
|
204
|
+
name: "ttd";
|
|
205
|
+
tab: "text-to-diagram" | "mermaid";
|
|
206
|
+
} | {
|
|
207
|
+
name: "commandPalette";
|
|
208
|
+
} | {
|
|
209
|
+
name: "settings";
|
|
210
|
+
} | {
|
|
211
|
+
name: "elementLinkSelector";
|
|
212
|
+
sourceElementId: ExcalidrawElement["id"];
|
|
213
|
+
} | {
|
|
214
|
+
name: "charts";
|
|
215
|
+
data: import("../charts").Spreadsheet;
|
|
216
|
+
rawText: string;
|
|
217
|
+
};
|
|
218
|
+
editingGroupId: import("@excalidraw/element/types").GroupId | null;
|
|
219
|
+
selectedElementIds: Readonly<{
|
|
220
|
+
[id: string]: true;
|
|
221
|
+
}>;
|
|
222
|
+
frameToHighlight: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawFrameLikeElement> | null;
|
|
223
|
+
activeTool: {
|
|
224
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
225
|
+
locked: boolean;
|
|
226
|
+
fromSelection: boolean;
|
|
227
|
+
} & import("../types").ActiveTool;
|
|
228
|
+
activeEmbeddable: {
|
|
229
|
+
element: import("@excalidraw/element/types").NonDeletedExcalidrawElement;
|
|
230
|
+
state: "hover" | "active";
|
|
231
|
+
} | null;
|
|
232
|
+
selectionElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
233
|
+
selectedGroupIds: {
|
|
234
|
+
[groupId: string]: boolean;
|
|
235
|
+
};
|
|
236
|
+
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
237
|
+
multiElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawLinearElement> | null;
|
|
238
|
+
newElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawNonSelectionElement> | null;
|
|
239
|
+
isBindingEnabled: boolean;
|
|
240
|
+
isMidpointSnappingEnabled: boolean;
|
|
241
|
+
suggestedBinding: {
|
|
242
|
+
element: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement>;
|
|
243
|
+
midPoint?: import("@excalidraw/math").GlobalPoint;
|
|
244
|
+
} | null;
|
|
245
|
+
isRotating: boolean;
|
|
246
|
+
elementsToHighlight: import("@excalidraw/element/types").NonDeleted<ExcalidrawElement>[] | null;
|
|
247
|
+
collaborators: Map<import("../types").SocketId, import("../types").Collaborator>;
|
|
248
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
249
|
+
zenModeEnabled: boolean;
|
|
250
|
+
editingTextElement: import("@excalidraw/element/types").ExcalidrawTextElement | null;
|
|
251
|
+
isCropping: boolean;
|
|
252
|
+
croppingElementId: ExcalidrawElement["id"] | null;
|
|
253
|
+
searchMatches: Readonly<{
|
|
254
|
+
focusedId: ExcalidrawElement["id"] | null;
|
|
255
|
+
matches: readonly import("../types").SearchMatch[];
|
|
256
|
+
}> | null;
|
|
257
|
+
activeLockedId: string | null;
|
|
258
|
+
hoveredElementIds: Readonly<{
|
|
259
|
+
[id: string]: true;
|
|
260
|
+
}>;
|
|
261
|
+
shouldCacheIgnoreZoom: boolean;
|
|
262
|
+
exportScale: number;
|
|
263
|
+
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
264
|
+
bindMode: import("@excalidraw/element/types").BindMode;
|
|
265
|
+
gridSize: number;
|
|
266
|
+
contextMenu: {
|
|
267
|
+
items: import("../components/ContextMenu").ContextMenuItems;
|
|
268
|
+
top: number;
|
|
269
|
+
left: number;
|
|
270
|
+
} | null;
|
|
271
|
+
showWelcomeScreen: boolean;
|
|
272
|
+
isLoading: boolean;
|
|
273
|
+
errorMessage: React.ReactNode;
|
|
274
|
+
resizingElement: import("@excalidraw/element/types").NonDeletedExcalidrawElement | null;
|
|
275
|
+
bindingPreference: "enabled" | "disabled";
|
|
276
|
+
startBoundElement: import("@excalidraw/element/types").NonDeleted<import("@excalidraw/element/types").ExcalidrawBindableElement> | null;
|
|
277
|
+
editingFrame: string | null;
|
|
278
|
+
preferredSelectionTool: {
|
|
279
|
+
type: "selection" | "lasso";
|
|
280
|
+
initialized: boolean;
|
|
281
|
+
};
|
|
282
|
+
penMode: boolean;
|
|
283
|
+
penDetected: boolean;
|
|
284
|
+
exportBackground: boolean;
|
|
285
|
+
exportEmbedScene: boolean;
|
|
286
|
+
exportWithDarkMode: boolean;
|
|
287
|
+
currentItemStrokeColor: string;
|
|
288
|
+
currentItemBackgroundColor: string;
|
|
289
|
+
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
290
|
+
currentItemStrokeWidth: number;
|
|
291
|
+
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
292
|
+
currentItemRoughness: number;
|
|
293
|
+
currentItemOpacity: number;
|
|
294
|
+
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
295
|
+
currentItemFontSize: number;
|
|
296
|
+
currentItemTextAlign: import("@excalidraw/element/types").TextAlign;
|
|
297
|
+
currentItemStartArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
298
|
+
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
299
|
+
currentHoveredFontFamily: import("@excalidraw/element/types").FontFamilyValues | null;
|
|
300
|
+
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
301
|
+
cursorButton: "up" | "down";
|
|
302
|
+
scrolledOutside: boolean;
|
|
303
|
+
isResizing: boolean;
|
|
304
|
+
openMenu: "canvas" | null;
|
|
305
|
+
openPopup: "canvasBackground" | "elementBackground" | "elementStroke" | "fontFamily" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
306
|
+
openSidebar: {
|
|
307
|
+
name: import("../types").SidebarName;
|
|
308
|
+
tab?: import("../types").SidebarTabName;
|
|
309
|
+
} | null;
|
|
310
|
+
defaultSidebarDockedPreference: boolean;
|
|
311
|
+
lastPointerDownWith: import("@excalidraw/element/types").PointerType;
|
|
312
|
+
previousSelectedElementIds: {
|
|
313
|
+
[id: string]: true;
|
|
314
|
+
};
|
|
315
|
+
selectedElementsAreBeingDragged: boolean;
|
|
316
|
+
toast: {
|
|
317
|
+
message: React.ReactNode;
|
|
318
|
+
closable?: boolean;
|
|
319
|
+
duration?: number;
|
|
320
|
+
} | null;
|
|
321
|
+
gridStep: number;
|
|
322
|
+
gridModeEnabled: boolean;
|
|
323
|
+
fileHandle: FileSystemFileHandle | null;
|
|
324
|
+
stats: {
|
|
325
|
+
open: boolean;
|
|
326
|
+
panels: number;
|
|
327
|
+
};
|
|
328
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
329
|
+
originSnapOffset: {
|
|
330
|
+
x: number;
|
|
331
|
+
y: number;
|
|
332
|
+
} | null;
|
|
333
|
+
objectsSnapModeEnabled: boolean;
|
|
334
|
+
userToFollow: import("../types").UserToFollow | null;
|
|
335
|
+
followedBy: Set<import("../types").SocketId>;
|
|
336
|
+
lockedMultiSelections: {
|
|
337
|
+
[groupId: string]: true;
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
files: import("../types").BinaryFiles;
|
|
341
|
+
}>;
|
|
23
342
|
export declare const parseLibraryJSON: (json: string, defaultStatus?: LibraryItem["status"]) => LibraryItem[];
|
|
24
343
|
export declare const loadLibraryFromBlob: (blob: Blob, defaultStatus?: LibraryItem["status"]) => Promise<LibraryItem[]>;
|
|
25
344
|
export declare const canvasToBlob: (canvas: HTMLCanvasElement | Promise<HTMLCanvasElement>) => Promise<Blob>;
|
|
@@ -40,7 +359,7 @@ export declare const SVGStringToFile: (SVGString: string, filename?: string) =>
|
|
|
40
359
|
type: typeof MIME_TYPES.svg;
|
|
41
360
|
};
|
|
42
361
|
export declare const ImageURLToFile: (imageUrl: string, filename?: string) => Promise<File | undefined>;
|
|
43
|
-
export declare const getFileHandle: (event: DragEvent | React.DragEvent | DataTransferItem) => Promise<
|
|
362
|
+
export declare const getFileHandle: (event: DragEvent | React.DragEvent | DataTransferItem) => Promise<FileSystemFileHandle | null>;
|
|
44
363
|
export declare const createFile: (blob: File | Blob | ArrayBuffer, mimeType: string, name: string | undefined) => File;
|
|
45
364
|
/** attempts to detect correct mimeType if none is set, or if an image
|
|
46
365
|
* has an incorrect extension.
|
|
@@ -21,7 +21,7 @@ type EncodedData = {
|
|
|
21
21
|
export declare const encode: ({ text, compress, }: {
|
|
22
22
|
text: string;
|
|
23
23
|
/** defaults to `true`. If compression fails, falls back to bstring alone. */
|
|
24
|
-
compress?: boolean
|
|
24
|
+
compress?: boolean;
|
|
25
25
|
}) => EncodedData;
|
|
26
26
|
export declare const decode: (data: EncodedData) => string;
|
|
27
27
|
/**
|
|
@@ -40,16 +40,16 @@ export declare const decode: (data: EncodedData) => string;
|
|
|
40
40
|
export declare const compressData: <T extends Record<string, any> = never>(dataBuffer: Uint8Array, options: {
|
|
41
41
|
encryptionKey: string;
|
|
42
42
|
} & ([T] extends [never] ? {
|
|
43
|
-
metadata?: T
|
|
43
|
+
metadata?: T;
|
|
44
44
|
} : {
|
|
45
45
|
metadata: T;
|
|
46
|
-
})) => Promise<Uint8Array
|
|
46
|
+
})) => Promise<Uint8Array<ArrayBuffer>>;
|
|
47
47
|
export declare const decompressData: <T extends Record<string, any>>(bufferView: Uint8Array, options: {
|
|
48
48
|
decryptionKey: string;
|
|
49
49
|
}) => Promise<{
|
|
50
50
|
/** metadata source is always JSON so we can decode it here */
|
|
51
51
|
metadata: T;
|
|
52
52
|
/** data can be anything so the caller must decode it */
|
|
53
|
-
data: Uint8Array
|
|
53
|
+
data: Uint8Array<ArrayBuffer>;
|
|
54
54
|
}>;
|
|
55
55
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const IV_LENGTH_BYTES = 12;
|
|
2
|
-
export declare const createIV: () => Uint8Array
|
|
3
|
-
export declare const generateEncryptionKey: <T extends "string" | "cryptoKey" = "string">(returnAs?: T
|
|
2
|
+
export declare const createIV: () => Uint8Array<ArrayBuffer>;
|
|
3
|
+
export declare const generateEncryptionKey: <T extends "string" | "cryptoKey" = "string">(returnAs?: T) => Promise<T extends "cryptoKey" ? CryptoKey : string>;
|
|
4
4
|
export declare const getCryptoKey: (key: string, usage: KeyUsage) => Promise<CryptoKey>;
|
|
5
|
-
export declare const encryptData: (key: string | CryptoKey, data: Uint8Array | ArrayBuffer | Blob | File | string) => Promise<{
|
|
5
|
+
export declare const encryptData: (key: string | CryptoKey, data: Uint8Array<ArrayBuffer> | ArrayBuffer | Blob | File | string) => Promise<{
|
|
6
6
|
encryptedBuffer: ArrayBuffer;
|
|
7
|
-
iv: Uint8Array
|
|
7
|
+
iv: Uint8Array<ArrayBuffer>;
|
|
8
8
|
}>;
|
|
9
|
-
export declare const decryptData: (iv: Uint8Array
|
|
9
|
+
export declare const decryptData: (iv: Uint8Array<ArrayBuffer>, encrypted: Uint8Array<ArrayBuffer> | ArrayBuffer, privateKey: string) => Promise<ArrayBuffer>;
|