tldraw 3.16.0-canary.6f3aedaa1c01 → 3.16.0-canary.76c0d51de595
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-cjs/index.d.ts +359 -113
- package/dist-cjs/index.js +40 -14
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/Tldraw.js +12 -2
- package/dist-cjs/lib/Tldraw.js.map +2 -2
- package/dist-cjs/lib/canvas/TldrawScribble.js +1 -1
- package/dist-cjs/lib/canvas/TldrawScribble.js.map +2 -2
- package/dist-cjs/lib/defaultExternalContentHandlers.js +15 -4
- package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/arrow-types.js.map +1 -1
- package/dist-cjs/lib/shapes/arrow/arrowLabel.js +6 -0
- package/dist-cjs/lib/shapes/arrow/arrowLabel.js.map +3 -3
- package/dist-cjs/lib/shapes/arrow/arrowTargetState.js +3 -2
- package/dist-cjs/lib/shapes/arrow/arrowTargetState.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js +3 -3
- package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js.map +1 -1
- package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js +1 -1
- package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js.map +2 -2
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +4 -4
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +1 -1
- package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +1 -1
- package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +12 -5
- package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/frame/components/FrameHeading.js +1 -1
- package/dist-cjs/lib/shapes/frame/components/FrameHeading.js.map +2 -2
- package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js +8 -2
- package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js.map +2 -2
- package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +1 -0
- package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/image/ImageShapeUtil.js +6 -3
- package/dist-cjs/lib/shapes/image/ImageShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +2 -1
- package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/HyperlinkButton.js +4 -4
- package/dist-cjs/lib/shapes/shared/HyperlinkButton.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/PlainTextLabel.js +1 -3
- package/dist-cjs/lib/shapes/shared/PlainTextLabel.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/ShapeFill.js +1 -1
- package/dist-cjs/lib/shapes/shared/ShapeFill.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/freehand/svg.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/useEditablePlainText.js +3 -5
- package/dist-cjs/lib/shapes/shared/useEditablePlainText.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js +0 -2
- package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js.map +2 -2
- package/dist-cjs/lib/shapes/text/PlainTextArea.js +3 -2
- package/dist-cjs/lib/shapes/text/PlainTextArea.js.map +2 -2
- package/dist-cjs/lib/shapes/text/RichTextArea.js +3 -3
- package/dist-cjs/lib/shapes/text/RichTextArea.js.map +2 -2
- package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +3 -3
- package/dist-cjs/lib/shapes/video/VideoShapeUtil.js.map +1 -1
- package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js +25 -1
- package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js.map +2 -2
- package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js +12 -0
- package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +3 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +2 -2
- package/dist-cjs/lib/ui/TldrawUi.js +27 -12
- package/dist-cjs/lib/ui/TldrawUi.js.map +3 -3
- package/dist-cjs/lib/ui/assetUrls.js +13 -10
- package/dist-cjs/lib/ui/assetUrls.js.map +2 -2
- package/dist-cjs/lib/ui/components/A11y.js +1 -1
- package/dist-cjs/lib/ui/components/A11y.js.map +2 -2
- package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js +10 -2
- package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js.map +2 -2
- package/dist-cjs/lib/ui/components/{FollowingIndicator.js → DefaultFollowingIndicator.js} +6 -6
- package/dist-cjs/lib/ui/components/DefaultFollowingIndicator.js.map +7 -0
- package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js +6 -6
- package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js.map +1 -1
- package/dist-cjs/lib/ui/components/LanguageMenu.js +1 -0
- package/dist-cjs/lib/ui/components/LanguageMenu.js.map +2 -2
- package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js +2 -1
- package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js.map +2 -2
- package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js +4 -4
- package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js.map +2 -2
- package/dist-cjs/lib/ui/components/MobileStylePanel.js +4 -2
- package/dist-cjs/lib/ui/components/MobileStylePanel.js.map +2 -2
- package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js +1 -1
- package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js +9 -4
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +255 -316
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelButtonPicker.js +147 -0
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelButtonPicker.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js +68 -0
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/{DoubleDropdownPicker.js → StylePanelDoubleDropdownPicker.js} +23 -22
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/{DropdownPicker.js → StylePanelDropdownPicker.js} +24 -21
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelDropdownPicker.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelSubheading.js +28 -0
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelSubheading.js.map +7 -0
- package/dist-cjs/lib/ui/components/Toolbar/AltTextEditor.js +2 -0
- package/dist-cjs/lib/ui/components/Toolbar/AltTextEditor.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js +39 -10
- package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js +66 -22
- package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js.map +3 -3
- package/dist-cjs/lib/ui/components/Toolbar/DefaultVideoToolbarContent.js +15 -3
- package/dist-cjs/lib/ui/components/Toolbar/DefaultVideoToolbarContent.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/LinkEditor.js +2 -1
- package/dist-cjs/lib/ui/components/Toolbar/LinkEditor.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js +188 -78
- package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js.map +3 -3
- package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js +6 -2
- package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js +11 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiInput.js +5 -3
- package/dist-cjs/lib/ui/components/primitives/TldrawUiInput.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js +18 -5
- package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js +18 -3
- package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +187 -165
- package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/layout.js +30 -5
- package/dist-cjs/lib/ui/components/primitives/layout.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.js +3 -0
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuContext.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js +25 -12
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +11 -27
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +2 -2
- package/dist-cjs/lib/ui/context/actions.js +29 -10
- package/dist-cjs/lib/ui/context/actions.js.map +2 -2
- package/dist-cjs/lib/ui/context/components.js +2 -0
- package/dist-cjs/lib/ui/context/components.js.map +2 -2
- package/dist-cjs/lib/ui/context/events.js.map +1 -1
- package/dist-cjs/lib/ui/hooks/useClipboardEvents.js +1 -1
- package/dist-cjs/lib/ui/hooks/useClipboardEvents.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/useExportAs.js +3 -2
- package/dist-cjs/lib/ui/hooks/useExportAs.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/useTools.js +22 -4
- package/dist-cjs/lib/ui/hooks/useTools.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/useTranslation/TLUiTranslationKey.js.map +1 -1
- package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +6 -2
- package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +2 -2
- package/dist-cjs/lib/ui/kbd-utils.js +9 -3
- package/dist-cjs/lib/ui/kbd-utils.js.map +2 -2
- package/dist-cjs/lib/ui/version.js +3 -3
- package/dist-cjs/lib/ui/version.js.map +1 -1
- package/dist-cjs/lib/utils/export/copyAs.js +1 -2
- package/dist-cjs/lib/utils/export/copyAs.js.map +2 -2
- package/dist-cjs/lib/utils/export/export.js +0 -20
- package/dist-cjs/lib/utils/export/export.js.map +2 -2
- package/dist-cjs/lib/utils/export/exportAs.js +1 -2
- package/dist-cjs/lib/utils/export/exportAs.js.map +2 -2
- package/dist-esm/index.d.mts +359 -113
- package/dist-esm/index.mjs +76 -30
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/Tldraw.mjs +14 -4
- package/dist-esm/lib/Tldraw.mjs.map +2 -2
- package/dist-esm/lib/canvas/TldrawScribble.mjs +1 -1
- package/dist-esm/lib/canvas/TldrawScribble.mjs.map +2 -2
- package/dist-esm/lib/defaultExternalContentHandlers.mjs +15 -4
- package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/arrowLabel.mjs +6 -0
- package/dist-esm/lib/shapes/arrow/arrowLabel.mjs.map +3 -3
- package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs +3 -2
- package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs +3 -3
- package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs.map +1 -1
- package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs +1 -1
- package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs.map +2 -2
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +4 -5
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +1 -1
- package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +1 -1
- package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +12 -5
- package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs +1 -1
- package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs.map +2 -2
- package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs +9 -3
- package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs.map +2 -2
- package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +1 -0
- package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs +6 -3
- package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +2 -1
- package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs +5 -5
- package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs +1 -3
- package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/ShapeFill.mjs +1 -1
- package/dist-esm/lib/shapes/shared/ShapeFill.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/freehand/svg.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs +3 -6
- package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs +0 -2
- package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs.map +2 -2
- package/dist-esm/lib/shapes/text/PlainTextArea.mjs +4 -3
- package/dist-esm/lib/shapes/text/PlainTextArea.mjs.map +2 -2
- package/dist-esm/lib/shapes/text/RichTextArea.mjs +3 -4
- package/dist-esm/lib/shapes/text/RichTextArea.mjs.map +2 -2
- package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs +3 -3
- package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs.map +1 -1
- package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs +26 -1
- package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs.map +2 -2
- package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs +13 -0
- package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +3 -1
- package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +2 -2
- package/dist-esm/lib/ui/TldrawUi.mjs +29 -14
- package/dist-esm/lib/ui/TldrawUi.mjs.map +3 -3
- package/dist-esm/lib/ui/assetUrls.mjs +13 -10
- package/dist-esm/lib/ui/assetUrls.mjs.map +2 -2
- package/dist-esm/lib/ui/components/A11y.mjs +1 -2
- package/dist-esm/lib/ui/components/A11y.mjs.map +2 -2
- package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs +10 -2
- package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs.map +2 -2
- package/dist-esm/lib/ui/components/{FollowingIndicator.mjs → DefaultFollowingIndicator.mjs} +3 -3
- package/dist-esm/lib/ui/components/DefaultFollowingIndicator.mjs.map +7 -0
- package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs +6 -6
- package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs.map +1 -1
- package/dist-esm/lib/ui/components/LanguageMenu.mjs +1 -0
- package/dist-esm/lib/ui/components/LanguageMenu.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs +2 -1
- package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs +4 -4
- package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs.map +2 -2
- package/dist-esm/lib/ui/components/MobileStylePanel.mjs +4 -2
- package/dist-esm/lib/ui/components/MobileStylePanel.mjs.map +2 -2
- package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs +1 -2
- package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs +14 -5
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs +257 -320
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs +135 -0
- package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs +48 -0
- package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/{DoubleDropdownPicker.mjs → StylePanelDoubleDropdownPicker.mjs} +20 -19
- package/dist-esm/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/{DropdownPicker.mjs → StylePanelDropdownPicker.mjs} +21 -18
- package/dist-esm/lib/ui/components/StylePanel/StylePanelDropdownPicker.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/StylePanelSubheading.mjs +8 -0
- package/dist-esm/lib/ui/components/StylePanel/StylePanelSubheading.mjs.map +7 -0
- package/dist-esm/lib/ui/components/Toolbar/AltTextEditor.mjs +2 -0
- package/dist-esm/lib/ui/components/Toolbar/AltTextEditor.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs +39 -10
- package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs +56 -22
- package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/DefaultVideoToolbarContent.mjs +15 -3
- package/dist-esm/lib/ui/components/Toolbar/DefaultVideoToolbarContent.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/LinkEditor.mjs +2 -1
- package/dist-esm/lib/ui/components/Toolbar/LinkEditor.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs +192 -80
- package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs.map +3 -3
- package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs +6 -2
- package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs +11 -3
- package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiInput.mjs +6 -4
- package/dist-esm/lib/ui/components/primitives/TldrawUiInput.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs +18 -5
- package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs +19 -4
- package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +197 -167
- package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/layout.mjs +31 -6
- package/dist-esm/lib/ui/components/primitives/layout.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.mjs +3 -0
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuContext.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs +25 -12
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +11 -27
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +2 -2
- package/dist-esm/lib/ui/context/actions.mjs +29 -10
- package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
- package/dist-esm/lib/ui/context/components.mjs +2 -0
- package/dist-esm/lib/ui/context/components.mjs.map +2 -2
- package/dist-esm/lib/ui/context/events.mjs.map +1 -1
- package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs +1 -2
- package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/useExportAs.mjs +3 -2
- package/dist-esm/lib/ui/hooks/useExportAs.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/useTools.mjs +23 -4
- package/dist-esm/lib/ui/hooks/useTools.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +6 -2
- package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +2 -2
- package/dist-esm/lib/ui/kbd-utils.mjs +9 -3
- package/dist-esm/lib/ui/kbd-utils.mjs.map +2 -2
- package/dist-esm/lib/ui/version.mjs +3 -3
- package/dist-esm/lib/ui/version.mjs.map +1 -1
- package/dist-esm/lib/utils/export/copyAs.mjs +1 -2
- package/dist-esm/lib/utils/export/copyAs.mjs.map +2 -2
- package/dist-esm/lib/utils/export/export.mjs +0 -20
- package/dist-esm/lib/utils/export/export.mjs.map +2 -2
- package/dist-esm/lib/utils/export/exportAs.mjs +1 -2
- package/dist-esm/lib/utils/export/exportAs.mjs.map +2 -2
- package/package.json +11 -34
- package/src/index.ts +56 -22
- package/src/lib/Tldraw.tsx +15 -2
- package/src/lib/canvas/TldrawScribble.tsx +1 -1
- package/src/lib/defaultExternalContentHandlers.ts +26 -4
- package/src/lib/shapes/arrow/ArrowShapeOptions.test.ts +85 -14
- package/src/lib/shapes/arrow/ArrowShapeTool.test.ts +103 -8
- package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +48 -6
- package/src/lib/shapes/arrow/arrow-types.ts +3 -5
- package/src/lib/shapes/arrow/arrowLabel.ts +8 -0
- package/src/lib/shapes/arrow/arrowTargetState.ts +34 -3
- package/src/lib/shapes/arrow/elbow/ElbowArrowDebug.tsx +3 -3
- package/src/lib/shapes/arrow/toolStates/Pointing.tsx +1 -1
- package/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx +4 -5
- package/src/lib/shapes/draw/DrawShapeTool.test.ts +0 -5
- package/src/lib/shapes/embed/EmbedShapeUtil.tsx +1 -1
- package/src/lib/shapes/frame/FrameShapeUtil.tsx +21 -4
- package/src/lib/shapes/frame/components/FrameHeading.tsx +1 -1
- package/src/lib/shapes/frame/components/FrameLabelInput.tsx +10 -3
- package/src/lib/shapes/geo/GeoShapeUtil.tsx +1 -0
- package/src/lib/shapes/image/ImageShapeUtil.tsx +6 -3
- package/src/lib/shapes/line/LineShapeUtil.test.tsx +4 -3
- package/src/lib/shapes/line/__snapshots__/LineShapeUtil.test.tsx.snap +2 -2
- package/src/lib/shapes/note/NoteShapeUtil.tsx +1 -0
- package/src/lib/shapes/shared/HyperlinkButton.tsx +5 -5
- package/src/lib/shapes/shared/PlainTextLabel.tsx +0 -6
- package/src/lib/shapes/shared/ShapeFill.tsx +1 -1
- package/src/lib/shapes/shared/freehand/svg.ts +2 -0
- package/src/lib/shapes/shared/useEditablePlainText.ts +3 -10
- package/src/lib/shapes/shared/useImageOrVideoAsset.ts +0 -7
- package/src/lib/shapes/text/PlainTextArea.tsx +4 -3
- package/src/lib/shapes/text/RichTextArea.tsx +3 -4
- package/src/lib/shapes/text/TextShapeTool.test.ts +6 -5
- package/src/lib/shapes/video/VideoShapeUtil.tsx +3 -3
- package/src/lib/tools/EraserTool/childStates/Erasing.ts +34 -1
- package/src/lib/tools/EraserTool/childStates/Pointing.ts +20 -0
- package/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +6 -2
- package/src/lib/ui/TldrawUi.tsx +33 -12
- package/src/lib/ui/assetUrls.ts +13 -10
- package/src/lib/ui/components/A11y.tsx +1 -2
- package/src/lib/ui/components/ActionsMenu/DefaultActionsMenu.tsx +13 -2
- package/src/lib/ui/components/{FollowingIndicator.tsx → DefaultFollowingIndicator.tsx} +2 -1
- package/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.tsx +6 -6
- package/src/lib/ui/components/LanguageMenu.tsx +1 -0
- package/src/lib/ui/components/Minimap/DefaultMinimap.tsx +2 -1
- package/src/lib/ui/components/Minimap/MinimapManager.ts +4 -4
- package/src/lib/ui/components/MobileStylePanel.tsx +4 -3
- package/src/lib/ui/components/PageMenu/DefaultPageMenu.tsx +1 -2
- package/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx +27 -13
- package/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +260 -381
- package/src/lib/ui/components/{primitives/TldrawUiButtonPicker.tsx → StylePanel/StylePanelButtonPicker.tsx} +70 -50
- package/src/lib/ui/components/StylePanel/StylePanelContext.tsx +63 -0
- package/src/lib/ui/components/StylePanel/{DoubleDropdownPicker.tsx → StylePanelDoubleDropdownPicker.tsx} +28 -19
- package/src/lib/ui/components/StylePanel/StylePanelDropdownPicker.tsx +119 -0
- package/src/lib/ui/components/StylePanel/StylePanelSubheading.tsx +9 -0
- package/src/lib/ui/components/Toolbar/AltTextEditor.tsx +2 -0
- package/src/lib/ui/components/Toolbar/DefaultImageToolbarContent.tsx +33 -16
- package/src/lib/ui/components/Toolbar/DefaultToolbar.tsx +55 -24
- package/src/lib/ui/components/Toolbar/DefaultVideoToolbarContent.tsx +12 -4
- package/src/lib/ui/components/Toolbar/LinkEditor.tsx +1 -0
- package/src/lib/ui/components/Toolbar/OverflowingToolbar.tsx +208 -56
- package/src/lib/ui/components/Toolbar/ToggleToolLockedButton.tsx +9 -2
- package/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx +7 -3
- package/src/lib/ui/components/primitives/TldrawUiInput.tsx +6 -3
- package/src/lib/ui/components/primitives/TldrawUiSlider.tsx +52 -32
- package/src/lib/ui/components/primitives/TldrawUiToolbar.tsx +27 -6
- package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +232 -185
- package/src/lib/ui/components/primitives/layout.tsx +79 -5
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.tsx +4 -0
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuContext.tsx +0 -1
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuGroup.tsx +29 -16
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +14 -27
- package/src/lib/ui/context/actions.tsx +36 -10
- package/src/lib/ui/context/components.tsx +3 -0
- package/src/lib/ui/context/events.tsx +1 -1
- package/src/lib/ui/hooks/useClipboardEvents.ts +1 -2
- package/src/lib/ui/hooks/useExportAs.ts +3 -2
- package/src/lib/ui/hooks/useTools.tsx +26 -4
- package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +4 -0
- package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +6 -2
- package/src/lib/ui/kbd-utils.ts +10 -3
- package/src/lib/ui/version.ts +3 -3
- package/src/lib/ui.css +389 -246
- package/src/lib/utils/excalidraw/__snapshots__/putExcalidrawContent.test.tsx.snap +5 -5
- package/src/lib/utils/export/copyAs.ts +1 -24
- package/src/lib/utils/export/export.ts +0 -36
- package/src/lib/utils/export/exportAs.ts +1 -32
- package/src/lib/utils/tldr/__snapshots__/buildFromV1Document.test.ts.snap +4 -4
- package/src/test/A11y.test.tsx +3 -2
- package/src/test/ClickManager.test.ts +7 -6
- package/src/test/Editor.test.tsx +20 -19
- package/src/test/EraserTool.test.ts +184 -13
- package/src/test/HandTool.test.ts +10 -9
- package/src/test/HighlightShape.test.ts +2 -1
- package/src/test/SelectTool.test.ts +3 -2
- package/src/test/TLUserPreferences.test.ts +4 -3
- package/src/test/TestEditor.ts +21 -17
- package/src/test/TldrawEditor.test.tsx +11 -10
- package/src/test/ZoomTool.test.ts +7 -6
- package/src/test/__snapshots__/drawing.test.ts.snap +2 -2
- package/src/test/__snapshots__/groups.test.tsx.snap +6 -6
- package/src/test/__snapshots__/resizing.test.ts.snap +2 -2
- package/src/test/arrows-megabus.test.tsx +5 -4
- package/src/test/bindings.test.tsx +24 -37
- package/src/test/bookmark-shapes.test.ts +1 -8
- package/src/test/commands/__snapshots__/getSvgString.test.ts.snap +23 -7
- package/src/test/commands/__snapshots__/packShapes.test.ts.snap +8 -8
- package/src/test/commands/__snapshots__/zoomToFit.test.ts.snap +2 -2
- package/src/test/commands/alignShapes.test.tsx +25 -24
- package/src/test/commands/animationSpeed.test.ts +2 -1
- package/src/test/commands/centerOnPoint.test.ts +3 -2
- package/src/test/commands/clipboard.test.ts +3 -2
- package/src/test/commands/createShapes.test.ts +2 -1
- package/src/test/commands/deleteShapes.test.ts +2 -1
- package/src/test/commands/distributeShapes.test.tsx +11 -10
- package/src/test/commands/getSvgString.test.ts +2 -1
- package/src/test/commands/packShapes.test.ts +5 -4
- package/src/test/commands/resizeShape.test.ts +2 -1
- package/src/test/commands/rotateShapes.test.ts +7 -6
- package/src/test/commands/setCamera.test.ts +4 -3
- package/src/test/commands/setCurrentPage.test.ts +3 -2
- package/src/test/commands/stackShapes.test.ts +11 -10
- package/src/test/commands/stretch.test.tsx +13 -12
- package/src/test/createDeepLink.test.tsx +2 -1
- package/src/test/cropping.test.ts +3 -2
- package/src/test/custom-clipping.test.ts +436 -0
- package/src/test/drawing.test.ts +2 -1
- package/src/test/flipShapes.test.ts +4 -3
- package/src/test/frames.test.ts +25 -24
- package/src/test/getCulledShapes.test.tsx +74 -4
- package/src/test/groups.test.tsx +1 -1
- package/src/test/handleDeepLink.test.tsx +2 -1
- package/src/test/maxShapes.test.ts +3 -2
- package/src/test/modifiers.test.ts +5 -4
- package/src/test/navigation.test.ts +12 -11
- package/src/test/panning.test.ts +2 -1
- package/src/test/perf/perf.test.ts +2 -1
- package/src/test/registerDeepLinkListener.test.tsx +10 -9
- package/src/test/resizing.test.ts +39 -38
- package/src/test/select.test.tsx +4 -3
- package/src/test/selection-omnibus.test.ts +11 -10
- package/src/test/shapeutils.test.ts +4 -3
- package/src/test/translating.test.ts +9 -8
- package/tldraw.css +697 -538
- package/dist-cjs/lib/ui/components/FollowingIndicator.js.map +0 -7
- package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js.map +0 -7
- package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js.map +0 -7
- package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js +0 -131
- package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js.map +0 -7
- package/dist-esm/lib/ui/components/FollowingIndicator.mjs.map +0 -7
- package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs.map +0 -7
- package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs.map +0 -7
- package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs +0 -115
- package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs.map +0 -7
- package/src/lib/ui/components/StylePanel/DropdownPicker.tsx +0 -110
package/dist-cjs/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { Circle2d } from '@tldraw/editor';
|
|
|
11
11
|
import { ComponentType } from 'react';
|
|
12
12
|
import { CSSProperties } from 'react';
|
|
13
13
|
import { Editor } from '@tldraw/editor';
|
|
14
|
+
import { ElbowArrowSnap } from '@tldraw/editor';
|
|
14
15
|
import { Extension } from '@tiptap/core';
|
|
15
16
|
import { Extensions } from '@tiptap/core';
|
|
16
17
|
import { ForwardRefExoticComponent } from 'react';
|
|
@@ -58,6 +59,7 @@ import { TLArrowBinding } from '@tldraw/editor';
|
|
|
58
59
|
import { TLArrowBindingProps } from '@tldraw/editor';
|
|
59
60
|
import { TLArrowShape } from '@tldraw/editor';
|
|
60
61
|
import { TLArrowShapeArrowheadStyle } from '@tldraw/editor';
|
|
62
|
+
import { TLArrowShapeKind } from '@tldraw/editor';
|
|
61
63
|
import { TLArrowShapeProps } from '@tldraw/editor';
|
|
62
64
|
import { TLAsset } from '@tldraw/editor';
|
|
63
65
|
import { TLAssetId } from '@tldraw/editor';
|
|
@@ -68,7 +70,6 @@ import { TLClickEventInfo } from '@tldraw/editor';
|
|
|
68
70
|
import { TLContent } from '@tldraw/editor';
|
|
69
71
|
import { TLCropInfo } from '@tldraw/editor';
|
|
70
72
|
import { TLDefaultColorStyle } from '@tldraw/editor';
|
|
71
|
-
import { TLDefaultColorTheme } from '@tldraw/editor';
|
|
72
73
|
import { TLDefaultColorThemeColor } from '@tldraw/editor';
|
|
73
74
|
import { TLDefaultDashStyle } from '@tldraw/editor';
|
|
74
75
|
import { TLDefaultFillStyle } from '@tldraw/editor';
|
|
@@ -193,9 +194,6 @@ export declare class ArrowBindingUtil extends BindingUtil<TLArrowBinding> {
|
|
|
193
194
|
/** @public @react */
|
|
194
195
|
export declare function ArrowDownToolbarItem(): JSX_2.Element;
|
|
195
196
|
|
|
196
|
-
/** @public @react */
|
|
197
|
-
export declare function ArrowheadStylePickerSet({ styles }: StylePickerSetProps): JSX_2.Element | null;
|
|
198
|
-
|
|
199
197
|
/** @public @react */
|
|
200
198
|
export declare function ArrowLeftToolbarItem(): JSX_2.Element;
|
|
201
199
|
|
|
@@ -278,7 +276,7 @@ export declare interface ArrowShapeOptions {
|
|
|
278
276
|
*/
|
|
279
277
|
readonly hoverPreciseTimeout: number;
|
|
280
278
|
/**
|
|
281
|
-
* When pointing at a shape using the arrow tool or
|
|
279
|
+
* When pointing at a shape using the arrow tool or dragging an arrow terminal handle, how long
|
|
282
280
|
* should we wait before we assume the user is targeting precisely instead of imprecisely.
|
|
283
281
|
*/
|
|
284
282
|
readonly pointingPreciseTimeout: number;
|
|
@@ -286,11 +284,11 @@ export declare interface ArrowShapeOptions {
|
|
|
286
284
|
* When creating an arrow, should it stop exactly at the pointer, or should
|
|
287
285
|
* it stop at the edge of the target shape.
|
|
288
286
|
*/
|
|
289
|
-
|
|
287
|
+
shouldBeExact(editor: Editor, isPrecise: boolean): boolean;
|
|
290
288
|
/**
|
|
291
289
|
* When creating an arrow, should it bind to the target shape.
|
|
292
290
|
*/
|
|
293
|
-
|
|
291
|
+
shouldIgnoreTargets(editor: Editor): boolean;
|
|
294
292
|
}
|
|
295
293
|
|
|
296
294
|
/** @public */
|
|
@@ -365,6 +363,42 @@ export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
|
|
|
365
363
|
getInterpolatedProps(startShape: TLArrowShape, endShape: TLArrowShape, progress: number): TLArrowShapeProps;
|
|
366
364
|
}
|
|
367
365
|
|
|
366
|
+
/**
|
|
367
|
+
* State representing what we're pointing to when drawing or updating an arrow. You can get this
|
|
368
|
+
* state using {@link getArrowTargetState}, and update it as part of an arrow interaction with
|
|
369
|
+
* {@link updateArrowTargetState} or {@link clearArrowTargetState}.
|
|
370
|
+
*
|
|
371
|
+
* @public
|
|
372
|
+
*/
|
|
373
|
+
export declare interface ArrowTargetState {
|
|
374
|
+
target: TLShape;
|
|
375
|
+
arrowKind: TLArrowShapeKind;
|
|
376
|
+
handlesInPageSpace: {
|
|
377
|
+
bottom: {
|
|
378
|
+
isEnabled: boolean;
|
|
379
|
+
point: VecLike;
|
|
380
|
+
};
|
|
381
|
+
left: {
|
|
382
|
+
isEnabled: boolean;
|
|
383
|
+
point: VecLike;
|
|
384
|
+
};
|
|
385
|
+
right: {
|
|
386
|
+
isEnabled: boolean;
|
|
387
|
+
point: VecLike;
|
|
388
|
+
};
|
|
389
|
+
top: {
|
|
390
|
+
isEnabled: boolean;
|
|
391
|
+
point: VecLike;
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
isExact: boolean;
|
|
395
|
+
isPrecise: boolean;
|
|
396
|
+
centerInPageSpace: VecLike;
|
|
397
|
+
anchorInPageSpace: VecLike;
|
|
398
|
+
snap: ElbowArrowSnap;
|
|
399
|
+
normalizedAnchor: VecLike;
|
|
400
|
+
}
|
|
401
|
+
|
|
368
402
|
/** @public @react */
|
|
369
403
|
export declare function ArrowToolbarItem(): JSX_2.Element;
|
|
370
404
|
|
|
@@ -491,6 +525,14 @@ export declare function centerSelectionAroundPoint(editor: Editor, position: Vec
|
|
|
491
525
|
/** @public @react */
|
|
492
526
|
export declare function CheckBoxToolbarItem(): JSX_2.Element;
|
|
493
527
|
|
|
528
|
+
/**
|
|
529
|
+
* Clear the current arrow target state for an editor. See {@link ArrowTargetState} for more
|
|
530
|
+
* information.
|
|
531
|
+
*
|
|
532
|
+
* @public
|
|
533
|
+
*/
|
|
534
|
+
export declare function clearArrowTargetState(editor: Editor): void;
|
|
535
|
+
|
|
494
536
|
/** @public @react */
|
|
495
537
|
export declare function ClipboardMenuGroup(): JSX_2.Element;
|
|
496
538
|
|
|
@@ -500,9 +542,6 @@ export declare function CloudToolbarItem(): JSX_2.Element;
|
|
|
500
542
|
/** @public @react */
|
|
501
543
|
export declare function ColorSchemeMenu(): JSX_2.Element;
|
|
502
544
|
|
|
503
|
-
/** @public @react */
|
|
504
|
-
export declare function CommonStylePickerSet({ styles, theme }: ThemeStylePickerSetProps): JSX_2.Element;
|
|
505
|
-
|
|
506
545
|
/**
|
|
507
546
|
* Contains the size within the given box size
|
|
508
547
|
*
|
|
@@ -534,14 +573,6 @@ export declare function ConvertToEmbedMenuItem(): JSX_2.Element | null;
|
|
|
534
573
|
*/
|
|
535
574
|
export declare function copyAs(editor: Editor, ids: TLShapeId[], opts: CopyAsOptions): Promise<void>;
|
|
536
575
|
|
|
537
|
-
/**
|
|
538
|
-
* @deprecated The format parameter is now part of the opts object.
|
|
539
|
-
* @public
|
|
540
|
-
*/
|
|
541
|
-
export declare function copyAs(editor: Editor, ids: TLShapeId[], format: TLCopyType, opts?: TLImageExportOptions & {
|
|
542
|
-
format?: undefined;
|
|
543
|
-
}): Promise<void>;
|
|
544
|
-
|
|
545
576
|
/** @public @react */
|
|
546
577
|
export declare function CopyAsMenuGroup(): JSX_2.Element;
|
|
547
578
|
|
|
@@ -853,6 +884,9 @@ export declare let defaultEditorAssetUrls: TLEditorAssetUrls;
|
|
|
853
884
|
/** @public */
|
|
854
885
|
export declare type DefaultEmbedDefinitionType = (typeof DEFAULT_EMBED_DEFINITIONS)[number]['type'];
|
|
855
886
|
|
|
887
|
+
/** @public @react */
|
|
888
|
+
export declare function DefaultFollowingIndicator(): JSX_2.Element | null;
|
|
889
|
+
|
|
856
890
|
/** @public */
|
|
857
891
|
export declare const DefaultFontFaces: TLDefaultFonts;
|
|
858
892
|
|
|
@@ -996,7 +1030,7 @@ export declare function DefaultSharePanel(): JSX_2.Element;
|
|
|
996
1030
|
export declare const DefaultStylePanel: NamedExoticComponent<TLUiStylePanelProps>;
|
|
997
1031
|
|
|
998
1032
|
/** @public @react */
|
|
999
|
-
export declare function DefaultStylePanelContent(
|
|
1033
|
+
export declare function DefaultStylePanelContent(): JSX_2.Element;
|
|
1000
1034
|
|
|
1001
1035
|
/** @public @react */
|
|
1002
1036
|
export declare const DefaultToasts: NamedExoticComponent<object>;
|
|
@@ -1017,6 +1051,11 @@ export declare function DefaultToolbarContent(): JSX_2.Element;
|
|
|
1017
1051
|
/** @public */
|
|
1018
1052
|
export declare interface DefaultToolbarProps {
|
|
1019
1053
|
children?: ReactNode;
|
|
1054
|
+
orientation?: 'horizontal' | 'vertical';
|
|
1055
|
+
minItems?: number;
|
|
1056
|
+
minSizePx?: number;
|
|
1057
|
+
maxItems?: number;
|
|
1058
|
+
maxSizePx?: number;
|
|
1020
1059
|
}
|
|
1021
1060
|
|
|
1022
1061
|
/** @public */
|
|
@@ -1484,12 +1523,6 @@ export declare interface ExampleDialogProps {
|
|
|
1484
1523
|
*/
|
|
1485
1524
|
export declare function exportAs(editor: Editor, ids: TLShapeId[], opts: ExportAsOptions): Promise<void>;
|
|
1486
1525
|
|
|
1487
|
-
/**
|
|
1488
|
-
* @deprecated The format & name parameters are now part of the opts object.
|
|
1489
|
-
* @public
|
|
1490
|
-
*/
|
|
1491
|
-
export declare function exportAs(editor: Editor, ids: TLShapeId[], format?: TLExportType, name?: string, opts?: TLImageExportOptions): Promise<void>;
|
|
1492
|
-
|
|
1493
1526
|
/** @public */
|
|
1494
1527
|
export declare interface ExportAsOptions extends TLImageExportOptions {
|
|
1495
1528
|
/** {@inheritdoc @tldraw/editor#TLImageExportOptions.format} */
|
|
@@ -1501,23 +1534,6 @@ export declare interface ExportAsOptions extends TLImageExportOptions {
|
|
|
1501
1534
|
/** @public @react */
|
|
1502
1535
|
export declare function ExportFileContentSubMenu(): JSX_2.Element;
|
|
1503
1536
|
|
|
1504
|
-
/**
|
|
1505
|
-
* Export the given shapes as a blob.
|
|
1506
|
-
* @param editor - The editor instance.
|
|
1507
|
-
* @param ids - The ids of the shapes to export.
|
|
1508
|
-
* @param format - The format to export as.
|
|
1509
|
-
* @param opts - Rendering options.
|
|
1510
|
-
* @returns A promise that resolves to a blob.
|
|
1511
|
-
* @deprecated Use {@link @tldraw/editor#Editor.toImage} instead.
|
|
1512
|
-
* @public
|
|
1513
|
-
*/
|
|
1514
|
-
export declare function exportToBlob({ editor, ids, format, opts, }: {
|
|
1515
|
-
editor: Editor;
|
|
1516
|
-
format: TLExportType;
|
|
1517
|
-
ids: TLShapeId[];
|
|
1518
|
-
opts?: TLImageExportOptions;
|
|
1519
|
-
}): Promise<Blob>;
|
|
1520
|
-
|
|
1521
1537
|
/** @public @react */
|
|
1522
1538
|
export declare function ExtrasGroup(): JSX_2.Element;
|
|
1523
1539
|
|
|
@@ -1574,6 +1590,7 @@ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
|
|
|
1574
1590
|
canEdit(): boolean;
|
|
1575
1591
|
canResize(): boolean;
|
|
1576
1592
|
canResizeChildren(): boolean;
|
|
1593
|
+
isExportBoundsContainer(): boolean;
|
|
1577
1594
|
getDefaultProps(): TLFrameShape['props'];
|
|
1578
1595
|
getAriaDescriptor(shape: TLFrameShape): string;
|
|
1579
1596
|
getGeometry(shape: TLFrameShape): Geometry2d;
|
|
@@ -1582,6 +1599,7 @@ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
|
|
|
1582
1599
|
toSvg(shape: TLFrameShape, ctx: SvgExportContext): JSX_2.Element;
|
|
1583
1600
|
indicator(shape: TLFrameShape): JSX_2.Element;
|
|
1584
1601
|
providesBackgroundForChildren(): boolean;
|
|
1602
|
+
getClipPath(shape: TLFrameShape): Vec[];
|
|
1585
1603
|
canReceiveNewChildrenOfType(shape: TLShape): boolean;
|
|
1586
1604
|
onResize(shape: any, info: TLResizeInfo<any>): any;
|
|
1587
1605
|
getInterpolatedProps(startShape: TLFrameShape, endShape: TLFrameShape, t: number): TLFrameShapeProps;
|
|
@@ -1730,15 +1748,20 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
|
|
|
1730
1748
|
getInterpolatedProps(startShape: TLGeoShape, endShape: TLGeoShape, t: number): TLGeoShapeProps;
|
|
1731
1749
|
}
|
|
1732
1750
|
|
|
1733
|
-
/** @public @react */
|
|
1734
|
-
export declare function GeoStylePickerSet({ styles }: StylePickerSetProps): JSX_2.Element | null;
|
|
1735
|
-
|
|
1736
1751
|
/** @public */
|
|
1737
1752
|
export declare function getArrowBindings(editor: Editor, shape: TLArrowShape): TLArrowBindings;
|
|
1738
1753
|
|
|
1739
1754
|
/** @public */
|
|
1740
1755
|
export declare function getArrowInfo(editor: Editor, shape: TLArrowShape | TLShapeId): TLArrowInfo | undefined;
|
|
1741
1756
|
|
|
1757
|
+
/**
|
|
1758
|
+
* Get the current arrow target state for an editor. See {@link ArrowTargetState} for more
|
|
1759
|
+
* information.
|
|
1760
|
+
*
|
|
1761
|
+
* @public
|
|
1762
|
+
*/
|
|
1763
|
+
export declare function getArrowTargetState(editor: Editor): ArrowTargetState | null;
|
|
1764
|
+
|
|
1742
1765
|
/** @public */
|
|
1743
1766
|
export declare function getArrowTerminalsInArrowSpace(editor: Editor, shape: TLArrowShape, bindings: TLArrowBindings): {
|
|
1744
1767
|
end: Vec;
|
|
@@ -1775,6 +1798,29 @@ export declare function getHitShapeOnCanvasPointerDown(editor: Editor, hitLabels
|
|
|
1775
1798
|
/** @public */
|
|
1776
1799
|
export declare function getMediaAssetInfoPartial(file: File, assetId: TLAssetId, isImageType: boolean, isVideoType: boolean, maxImageDimension?: number): Promise<TLImageAsset | TLVideoAsset>;
|
|
1777
1800
|
|
|
1801
|
+
/**
|
|
1802
|
+
* ## getStrokePoints
|
|
1803
|
+
*
|
|
1804
|
+
* Get an array of points as objects with an adjusted point, pressure, vector, distance, and
|
|
1805
|
+
* runningLength.
|
|
1806
|
+
*
|
|
1807
|
+
* @param points - An array of points (as `[x, y, pressure]` or `{x, y, pressure}`). Pressure is
|
|
1808
|
+
* optional in both cases.
|
|
1809
|
+
* @param options - An object with options.
|
|
1810
|
+
* @public
|
|
1811
|
+
*/
|
|
1812
|
+
export declare function getStrokePoints(rawInputPoints: VecLike[], options?: StrokeOptions): StrokePoint[];
|
|
1813
|
+
|
|
1814
|
+
/**
|
|
1815
|
+
* Turn an array of stroke points into a path of quadradic curves.
|
|
1816
|
+
*
|
|
1817
|
+
* @param points - The stroke points returned from perfect-freehand
|
|
1818
|
+
* @param closed - Whether the shape is closed
|
|
1819
|
+
*
|
|
1820
|
+
* @public
|
|
1821
|
+
*/
|
|
1822
|
+
export declare function getSvgPathFromStrokePoints(points: StrokePoint[], closed?: boolean): string;
|
|
1823
|
+
|
|
1778
1824
|
/**
|
|
1779
1825
|
* Original (uncropped) width and height of shape.
|
|
1780
1826
|
*
|
|
@@ -1870,6 +1916,7 @@ export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
|
|
|
1870
1916
|
static migrations: TLPropsMigrations;
|
|
1871
1917
|
isAspectRatioLocked(): boolean;
|
|
1872
1918
|
canCrop(): boolean;
|
|
1919
|
+
isExportBoundsContainer(): boolean;
|
|
1873
1920
|
getDefaultProps(): TLImageShape['props'];
|
|
1874
1921
|
getGeometry(shape: TLImageShape): Geometry2d;
|
|
1875
1922
|
getAriaDescriptor(shape: TLImageShape): string;
|
|
@@ -2120,6 +2167,16 @@ export declare class NoteShapeUtil extends ShapeUtil<TLNoteShape> {
|
|
|
2120
2167
|
/** @public @react */
|
|
2121
2168
|
export declare function NoteToolbarItem(): JSX_2.Element;
|
|
2122
2169
|
|
|
2170
|
+
/**
|
|
2171
|
+
* Checks if a file is allowed to be uploaded. If it is not, it will show a toast explaining why to the user.
|
|
2172
|
+
*
|
|
2173
|
+
* @param file - The file to check
|
|
2174
|
+
* @param options - The options for the external content handler
|
|
2175
|
+
* @returns True if the file is allowed, false otherwise
|
|
2176
|
+
* @public
|
|
2177
|
+
*/
|
|
2178
|
+
export declare function notifyIfFileNotAllowed(file: File, options: TLDefaultExternalContentHandlerOpts): boolean;
|
|
2179
|
+
|
|
2123
2180
|
/** @public @react */
|
|
2124
2181
|
export declare function OfflineIndicator(): JSX_2.Element;
|
|
2125
2182
|
|
|
@@ -2146,18 +2203,21 @@ export declare interface OnDragFromToolbarToCreateShapesOpts {
|
|
|
2146
2203
|
onDragEnd?(id: TLShapeId): void;
|
|
2147
2204
|
}
|
|
2148
2205
|
|
|
2149
|
-
/** @public @react */
|
|
2150
|
-
export declare function OpacitySlider(): JSX_2.Element | null;
|
|
2151
|
-
|
|
2152
2206
|
/** @public @react */
|
|
2153
2207
|
export declare function OvalToolbarItem(): JSX_2.Element;
|
|
2154
2208
|
|
|
2155
2209
|
/** @public @react */
|
|
2156
|
-
export declare function OverflowingToolbar({ children }: OverflowingToolbarProps): JSX_2.Element;
|
|
2210
|
+
export declare function OverflowingToolbar({ children, orientation, sizingParentClassName, minItems, minSizePx, maxItems, maxSizePx, }: OverflowingToolbarProps): JSX_2.Element;
|
|
2157
2211
|
|
|
2158
2212
|
/** @public */
|
|
2159
2213
|
export declare interface OverflowingToolbarProps {
|
|
2160
2214
|
children: React.ReactNode;
|
|
2215
|
+
orientation: 'horizontal' | 'vertical';
|
|
2216
|
+
sizingParentClassName: string;
|
|
2217
|
+
minItems: number;
|
|
2218
|
+
minSizePx: number;
|
|
2219
|
+
maxItems: number;
|
|
2220
|
+
maxSizePx: number;
|
|
2161
2221
|
}
|
|
2162
2222
|
|
|
2163
2223
|
/** @public @react */
|
|
@@ -2534,9 +2594,6 @@ export declare interface SolidPathBuilderOpts extends BasePathBuilderOpts {
|
|
|
2534
2594
|
|
|
2535
2595
|
/* Excluded from this release type: Spinner */
|
|
2536
2596
|
|
|
2537
|
-
/** @public @react */
|
|
2538
|
-
export declare function SplineStylePickerSet({ styles }: StylePickerSetProps): JSX_2.Element | null;
|
|
2539
|
-
|
|
2540
2597
|
/** @public @react */
|
|
2541
2598
|
export declare function StackMenuItems(): JSX_2.Element;
|
|
2542
2599
|
|
|
@@ -2546,11 +2603,172 @@ export declare function StarToolbarItem(): JSX_2.Element;
|
|
|
2546
2603
|
/** @public */
|
|
2547
2604
|
export declare const STROKE_SIZES: Record<TLDefaultSizeStyle, number>;
|
|
2548
2605
|
|
|
2606
|
+
/**
|
|
2607
|
+
* The options object for `getStroke` or `getStrokePoints`.
|
|
2608
|
+
*
|
|
2609
|
+
* @public
|
|
2610
|
+
*/
|
|
2611
|
+
export declare interface StrokeOptions {
|
|
2612
|
+
/** The base size (diameter) of the stroke. */
|
|
2613
|
+
size?: number;
|
|
2614
|
+
/** The effect of pressure on the stroke's size. */
|
|
2615
|
+
thinning?: number;
|
|
2616
|
+
/** How much to soften the stroke's edges. */
|
|
2617
|
+
smoothing?: number;
|
|
2618
|
+
streamline?: number;
|
|
2619
|
+
/** An easing function to apply to each point's pressure. */
|
|
2620
|
+
easing?(pressure: number): number;
|
|
2621
|
+
/** Whether to simulate pressure based on velocity. */
|
|
2622
|
+
simulatePressure?: boolean;
|
|
2623
|
+
/** Cap, taper and easing for the start of the line. */
|
|
2624
|
+
start?: {
|
|
2625
|
+
cap?: boolean;
|
|
2626
|
+
easing?(distance: number): number;
|
|
2627
|
+
taper?: boolean | number;
|
|
2628
|
+
};
|
|
2629
|
+
/** Cap, taper and easing for the end of the line. */
|
|
2630
|
+
end?: {
|
|
2631
|
+
cap?: boolean;
|
|
2632
|
+
easing?(distance: number): number;
|
|
2633
|
+
taper?: boolean | number;
|
|
2634
|
+
};
|
|
2635
|
+
/** Whether to handle the points as a completed stroke. */
|
|
2636
|
+
last?: boolean;
|
|
2637
|
+
}
|
|
2638
|
+
|
|
2639
|
+
/**
|
|
2640
|
+
* The points returned by `getStrokePoints`, and the input for `getStrokeOutlinePoints`
|
|
2641
|
+
*
|
|
2642
|
+
* @public
|
|
2643
|
+
*/
|
|
2644
|
+
export declare interface StrokePoint {
|
|
2645
|
+
point: Vec;
|
|
2646
|
+
input: Vec;
|
|
2647
|
+
vector: Vec;
|
|
2648
|
+
pressure: number;
|
|
2649
|
+
distance: number;
|
|
2650
|
+
runningLength: number;
|
|
2651
|
+
radius: number;
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
/** @public @react */
|
|
2655
|
+
export declare function StylePanelArrowheadPicker(): JSX_2.Element | null;
|
|
2656
|
+
|
|
2657
|
+
/** @public @react */
|
|
2658
|
+
export declare function StylePanelArrowKindPicker(): JSX_2.Element | null;
|
|
2659
|
+
|
|
2660
|
+
/** @public */
|
|
2661
|
+
export declare const StylePanelButtonPicker: <T extends string>(props: StylePanelButtonPickerProps<T>) => ReactElement;
|
|
2662
|
+
|
|
2663
|
+
/** @public */
|
|
2664
|
+
export declare interface StylePanelButtonPickerProps<T extends string> {
|
|
2665
|
+
title: string;
|
|
2666
|
+
uiType: string;
|
|
2667
|
+
style: StyleProp<T>;
|
|
2668
|
+
value: SharedStyle<T>;
|
|
2669
|
+
items: StyleValuesForUi<T>;
|
|
2670
|
+
onValueChange?(style: StyleProp<T>, value: T): void;
|
|
2671
|
+
onHistoryMark?(id: string): void;
|
|
2672
|
+
}
|
|
2673
|
+
|
|
2674
|
+
/** @public @react */
|
|
2675
|
+
export declare function StylePanelColorPicker(): JSX_2.Element | null;
|
|
2676
|
+
|
|
2677
|
+
/** @public */
|
|
2678
|
+
export declare interface StylePanelContext {
|
|
2679
|
+
styles: ReadonlySharedStyleMap;
|
|
2680
|
+
showUiLabels: boolean;
|
|
2681
|
+
onHistoryMark(id: string): void;
|
|
2682
|
+
onValueChange<T>(style: StyleProp<T>, value: T): void;
|
|
2683
|
+
}
|
|
2684
|
+
|
|
2685
|
+
/** @public @react */
|
|
2686
|
+
export declare function StylePanelContextProvider({ children, styles }: StylePanelContextProviderProps): JSX_2.Element;
|
|
2687
|
+
|
|
2549
2688
|
/** @public */
|
|
2550
|
-
export declare interface
|
|
2689
|
+
export declare interface StylePanelContextProviderProps {
|
|
2690
|
+
children: React.ReactNode;
|
|
2551
2691
|
styles: ReadonlySharedStyleMap;
|
|
2552
2692
|
}
|
|
2553
2693
|
|
|
2694
|
+
/** @public @react */
|
|
2695
|
+
export declare function StylePanelDashPicker(): JSX_2.Element | null;
|
|
2696
|
+
|
|
2697
|
+
/** @public @react */
|
|
2698
|
+
export declare const StylePanelDoubleDropdownPicker: <T extends string>(props: StylePanelDoubleDropdownPickerProps<T>) => React_2.JSX.Element;
|
|
2699
|
+
|
|
2700
|
+
/** @public */
|
|
2701
|
+
export declare interface StylePanelDoubleDropdownPickerProps<T extends string> {
|
|
2702
|
+
uiTypeA: string;
|
|
2703
|
+
uiTypeB: string;
|
|
2704
|
+
label: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
|
|
2705
|
+
labelA: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
|
|
2706
|
+
labelB: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
|
|
2707
|
+
itemsA: StyleValuesForUi<T>;
|
|
2708
|
+
itemsB: StyleValuesForUi<T>;
|
|
2709
|
+
styleA: StyleProp<T>;
|
|
2710
|
+
styleB: StyleProp<T>;
|
|
2711
|
+
valueA: SharedStyle<T>;
|
|
2712
|
+
valueB: SharedStyle<T>;
|
|
2713
|
+
onValueChange?(style: StyleProp<T>, value: T): void;
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2716
|
+
/** @public @react */
|
|
2717
|
+
export declare const StylePanelDropdownPicker: <T extends string>(props: StylePanelDropdownPickerProps<T>) => React_2.JSX.Element;
|
|
2718
|
+
|
|
2719
|
+
/** @public */
|
|
2720
|
+
export declare interface StylePanelDropdownPickerProps<T extends string> {
|
|
2721
|
+
id: string;
|
|
2722
|
+
label?: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
|
|
2723
|
+
uiType: string;
|
|
2724
|
+
stylePanelType: string;
|
|
2725
|
+
style: StyleProp<T>;
|
|
2726
|
+
value: SharedStyle<T>;
|
|
2727
|
+
items: StyleValuesForUi<T>;
|
|
2728
|
+
type: 'icon' | 'menu' | 'tool';
|
|
2729
|
+
onValueChange?(style: StyleProp<T>, value: T): void;
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
/** @public @react */
|
|
2733
|
+
export declare function StylePanelFillPicker(): JSX_2.Element | null;
|
|
2734
|
+
|
|
2735
|
+
/** @public @react */
|
|
2736
|
+
export declare function StylePanelFontPicker(): JSX_2.Element | null;
|
|
2737
|
+
|
|
2738
|
+
/** @public @react */
|
|
2739
|
+
export declare function StylePanelGeoShapePicker(): JSX_2.Element | null;
|
|
2740
|
+
|
|
2741
|
+
/** @public @react */
|
|
2742
|
+
export declare function StylePanelLabelAlignPicker(): JSX_2.Element | null;
|
|
2743
|
+
|
|
2744
|
+
/** @public @react */
|
|
2745
|
+
export declare function StylePanelOpacityPicker(): JSX_2.Element | null;
|
|
2746
|
+
|
|
2747
|
+
/** @public @react */
|
|
2748
|
+
export declare function StylePanelSection({ children }: StylePanelSectionProps): JSX_2.Element;
|
|
2749
|
+
|
|
2750
|
+
/** @public */
|
|
2751
|
+
export declare interface StylePanelSectionProps {
|
|
2752
|
+
children: React_3.ReactNode;
|
|
2753
|
+
}
|
|
2754
|
+
|
|
2755
|
+
/** @public @react */
|
|
2756
|
+
export declare function StylePanelSizePicker(): JSX_2.Element | null;
|
|
2757
|
+
|
|
2758
|
+
/** @public @react */
|
|
2759
|
+
export declare function StylePanelSplinePicker(): JSX_2.Element | null;
|
|
2760
|
+
|
|
2761
|
+
/** @public @react */
|
|
2762
|
+
export declare function StylePanelSubheading({ children }: StylePanelSubheadingProps): JSX_2.Element;
|
|
2763
|
+
|
|
2764
|
+
/** @public */
|
|
2765
|
+
export declare interface StylePanelSubheadingProps {
|
|
2766
|
+
children: React.ReactNode;
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
/** @public @react */
|
|
2770
|
+
export declare function StylePanelTextAlignPicker(): JSX_2.Element | null;
|
|
2771
|
+
|
|
2554
2772
|
/** @public */
|
|
2555
2773
|
export declare type StyleValuesForUi<T> = readonly {
|
|
2556
2774
|
readonly icon: string | TLUiIconJsx;
|
|
@@ -2590,12 +2808,6 @@ export declare interface TextAreaProps {
|
|
|
2590
2808
|
*/
|
|
2591
2809
|
export declare const TextDirection: Extension<any, any>;
|
|
2592
2810
|
|
|
2593
|
-
/**
|
|
2594
|
-
* @deprecated Use `PlainTextLabel` instead.
|
|
2595
|
-
* @public
|
|
2596
|
-
*/
|
|
2597
|
-
export declare const TextLabel: React_3.NamedExoticComponent<PlainTextLabelProps>;
|
|
2598
|
-
|
|
2599
2811
|
/** @public */
|
|
2600
2812
|
export declare interface TextShapeOptions {
|
|
2601
2813
|
/** How much addition padding should be added to the horizontal geometry of the shape when binding to an arrow? */
|
|
@@ -2673,18 +2885,9 @@ export declare class TextShapeUtil extends ShapeUtil<TLTextShape> {
|
|
|
2673
2885
|
} | undefined;
|
|
2674
2886
|
}
|
|
2675
2887
|
|
|
2676
|
-
/** @public @react */
|
|
2677
|
-
export declare function TextStylePickerSet({ theme, styles }: ThemeStylePickerSetProps): JSX_2.Element | null;
|
|
2678
|
-
|
|
2679
2888
|
/** @public @react */
|
|
2680
2889
|
export declare function TextToolbarItem(): JSX_2.Element;
|
|
2681
2890
|
|
|
2682
|
-
/** @public */
|
|
2683
|
-
export declare interface ThemeStylePickerSetProps {
|
|
2684
|
-
styles: ReadonlySharedStyleMap;
|
|
2685
|
-
theme: TLDefaultColorTheme;
|
|
2686
|
-
}
|
|
2687
|
-
|
|
2688
2891
|
/**
|
|
2689
2892
|
* Default extensions for the TipTap editor.
|
|
2690
2893
|
*
|
|
@@ -2941,8 +3144,12 @@ export declare function TldrawUiButtonIcon({ icon, small, invertIcon }: TLUiButt
|
|
|
2941
3144
|
/** @public @react */
|
|
2942
3145
|
export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps): JSX_2.Element;
|
|
2943
3146
|
|
|
2944
|
-
/**
|
|
2945
|
-
|
|
3147
|
+
/**
|
|
3148
|
+
* A column, usually of UI controls like buttons, select dropdown, checkboxes, etc.
|
|
3149
|
+
*
|
|
3150
|
+
* @public @react
|
|
3151
|
+
*/
|
|
3152
|
+
export declare const TldrawUiColumn: ForwardRefExoticComponent<TLUiLayoutProps & RefAttributes<HTMLDivElement>>;
|
|
2946
3153
|
|
|
2947
3154
|
/** @public @react */
|
|
2948
3155
|
export declare function TldrawUiComponentsProvider({ overrides, children, }: TLUiComponentsProviderProps): JSX_2.Element;
|
|
@@ -3016,6 +3223,9 @@ export declare const TldrawUiGrid: ForwardRefExoticComponent<TLUiLayoutProps & R
|
|
|
3016
3223
|
/** @public @react */
|
|
3017
3224
|
export declare const TldrawUiIcon: NamedExoticComponent<TLUiIconProps>;
|
|
3018
3225
|
|
|
3226
|
+
/** @public @react */
|
|
3227
|
+
export declare function TldrawUiInFrontOfTheCanvas(): JSX_2.Element;
|
|
3228
|
+
|
|
3019
3229
|
/** @public @react */
|
|
3020
3230
|
export declare const TldrawUiInput: React_2.ForwardRefExoticComponent<TLUiInputProps & React_2.RefAttributes<HTMLInputElement>>;
|
|
3021
3231
|
|
|
@@ -3029,7 +3239,7 @@ export declare function TldrawUiMenuActionCheckboxItem({ actionId, ...rest }: TL
|
|
|
3029
3239
|
export declare function TldrawUiMenuActionItem({ actionId, ...rest }: TLUiMenuActionItemProps): JSX_2.Element | null;
|
|
3030
3240
|
|
|
3031
3241
|
/** @public @react */
|
|
3032
|
-
export declare function TldrawUiMenuCheckboxItem<TranslationKey extends string = string, IconType extends string = string>({ id, kbd, label, readonlyOk, onSelect, toggle, disabled, checked, }: TLUiMenuCheckboxItemProps<TranslationKey, IconType>): JSX_2.Element | null;
|
|
3242
|
+
export declare function TldrawUiMenuCheckboxItem<TranslationKey extends string = string, IconType extends string = string>({ id, kbd, label, lang, readonlyOk, onSelect, toggle, disabled, checked, }: TLUiMenuCheckboxItemProps<TranslationKey, IconType>): JSX_2.Element | null;
|
|
3033
3243
|
|
|
3034
3244
|
/** @public @react */
|
|
3035
3245
|
export declare function TldrawUiMenuContextProvider({ type, sourceId, children, }: TLUiMenuContextProviderProps): JSX_2.Element;
|
|
@@ -3046,6 +3256,22 @@ export declare function TldrawUiMenuSubmenu<Translation extends string = string>
|
|
|
3046
3256
|
/** @public @react */
|
|
3047
3257
|
export declare function TldrawUiMenuToolItem({ toolId, ...rest }: TLUiMenuToolItemProps): JSX_2.Element | null;
|
|
3048
3258
|
|
|
3259
|
+
/** @public */
|
|
3260
|
+
export declare interface TldrawUiOrientationContext {
|
|
3261
|
+
orientation: 'horizontal' | 'vertical';
|
|
3262
|
+
tooltipSide: 'bottom' | 'left' | 'right' | 'top';
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
/** @public @react */
|
|
3266
|
+
export declare function TldrawUiOrientationProvider({ children, orientation, tooltipSide, }: TldrawUiOrientationProviderProps): JSX_2.Element;
|
|
3267
|
+
|
|
3268
|
+
/** @public */
|
|
3269
|
+
export declare interface TldrawUiOrientationProviderProps {
|
|
3270
|
+
children: ReactNode;
|
|
3271
|
+
orientation: 'horizontal' | 'vertical';
|
|
3272
|
+
tooltipSide?: 'bottom' | 'left' | 'right' | 'top';
|
|
3273
|
+
}
|
|
3274
|
+
|
|
3049
3275
|
/** @public @react */
|
|
3050
3276
|
export declare function TldrawUiPopover({ id, children, onOpenChange, open, className }: TLUiPopoverProps): JSX_2.Element;
|
|
3051
3277
|
|
|
@@ -3097,13 +3323,13 @@ export declare const TldrawUiToolbar: React_3.ForwardRefExoticComponent<TLUiTool
|
|
|
3097
3323
|
export declare const TldrawUiToolbarButton: React_3.ForwardRefExoticComponent<TLUiToolbarButtonProps & React_3.RefAttributes<HTMLButtonElement>>;
|
|
3098
3324
|
|
|
3099
3325
|
/** @public @react */
|
|
3100
|
-
export declare const TldrawUiToolbarToggleGroup: ({ children, className, type, ...props }: TLUiToolbarToggleGroupProps) => JSX_2.Element;
|
|
3326
|
+
export declare const TldrawUiToolbarToggleGroup: ({ children, className, type, asChild, ...props }: TLUiToolbarToggleGroupProps) => JSX_2.Element;
|
|
3101
3327
|
|
|
3102
3328
|
/** @public @react */
|
|
3103
3329
|
export declare const TldrawUiToolbarToggleItem: ({ children, className, type, value, tooltip, ...props }: TLUiToolbarToggleItemProps) => JSX_2.Element;
|
|
3104
3330
|
|
|
3105
3331
|
/** @public @react */
|
|
3106
|
-
export declare
|
|
3332
|
+
export declare const TldrawUiTooltip: React_3.ForwardRefExoticComponent<TldrawUiTooltipProps & React_3.RefAttributes<HTMLButtonElement>>;
|
|
3107
3333
|
|
|
3108
3334
|
/** @public */
|
|
3109
3335
|
export declare interface TldrawUiTooltipProps {
|
|
@@ -3112,6 +3338,8 @@ export declare interface TldrawUiTooltipProps {
|
|
|
3112
3338
|
side?: 'bottom' | 'left' | 'right' | 'top';
|
|
3113
3339
|
sideOffset?: number;
|
|
3114
3340
|
disabled?: boolean;
|
|
3341
|
+
showOnMobile?: boolean;
|
|
3342
|
+
delayDuration?: number;
|
|
3115
3343
|
}
|
|
3116
3344
|
|
|
3117
3345
|
/** @public @react */
|
|
@@ -3282,18 +3510,6 @@ export declare interface TLUiButtonLabelProps {
|
|
|
3282
3510
|
children?: ReactNode;
|
|
3283
3511
|
}
|
|
3284
3512
|
|
|
3285
|
-
/** @public */
|
|
3286
|
-
export declare interface TLUiButtonPickerProps<T extends string> {
|
|
3287
|
-
title: string;
|
|
3288
|
-
uiType: string;
|
|
3289
|
-
style: StyleProp<T>;
|
|
3290
|
-
value: SharedStyle<T>;
|
|
3291
|
-
items: StyleValuesForUi<T>;
|
|
3292
|
-
theme: TLDefaultColorTheme;
|
|
3293
|
-
onValueChange(style: StyleProp<T>, value: T): void;
|
|
3294
|
-
onHistoryMark?(id: string): void;
|
|
3295
|
-
}
|
|
3296
|
-
|
|
3297
3513
|
/** @public */
|
|
3298
3514
|
export declare interface TLUiButtonProps extends React_2.HTMLAttributes<HTMLButtonElement> {
|
|
3299
3515
|
disabled?: boolean;
|
|
@@ -3328,6 +3544,7 @@ export declare interface TLUiComponents {
|
|
|
3328
3544
|
Dialogs?: ComponentType | null;
|
|
3329
3545
|
Toasts?: ComponentType | null;
|
|
3330
3546
|
A11y?: ComponentType | null;
|
|
3547
|
+
FollowingIndicator?: ComponentType | null;
|
|
3331
3548
|
}
|
|
3332
3549
|
|
|
3333
3550
|
/** @public */
|
|
@@ -3653,7 +3870,7 @@ export declare interface TLUiEventMap {
|
|
|
3653
3870
|
'flatten-to-image': null;
|
|
3654
3871
|
'a11y-repeat-shape-announce': null;
|
|
3655
3872
|
'open-url': {
|
|
3656
|
-
|
|
3873
|
+
destinationUrl: string;
|
|
3657
3874
|
};
|
|
3658
3875
|
'open-context-menu': null;
|
|
3659
3876
|
'adjust-shape-styles': null;
|
|
@@ -3734,6 +3951,7 @@ export declare interface TLUiInputProps {
|
|
|
3734
3951
|
shouldManuallyMaintainScrollPositionWhenFocused?: boolean;
|
|
3735
3952
|
value?: string;
|
|
3736
3953
|
'data-testid'?: string;
|
|
3954
|
+
'aria-label'?: string;
|
|
3737
3955
|
}
|
|
3738
3956
|
|
|
3739
3957
|
/** @public */
|
|
@@ -3750,6 +3968,7 @@ export declare type TLUiKeyboardShortcutsDialogProps = TLUiDialogProps & {
|
|
|
3750
3968
|
/** @public */
|
|
3751
3969
|
export declare interface TLUiLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
3752
3970
|
children: ReactNode;
|
|
3971
|
+
tooltipSide?: 'bottom' | 'left' | 'right' | 'top';
|
|
3753
3972
|
asChild?: boolean;
|
|
3754
3973
|
}
|
|
3755
3974
|
|
|
@@ -3777,6 +3996,7 @@ export declare interface TLUiMenuCheckboxItemProps<TranslationKey extends string
|
|
|
3777
3996
|
label?: {
|
|
3778
3997
|
[key: string]: TranslationKey;
|
|
3779
3998
|
} | TranslationKey;
|
|
3999
|
+
lang?: string;
|
|
3780
4000
|
readonlyOk?: boolean;
|
|
3781
4001
|
onSelect(source: TLUiEventSource): Promise<void> | void;
|
|
3782
4002
|
toggle?: boolean;
|
|
@@ -3792,7 +4012,7 @@ export declare interface TLUiMenuContextProviderProps {
|
|
|
3792
4012
|
}
|
|
3793
4013
|
|
|
3794
4014
|
/** @public */
|
|
3795
|
-
export declare type TLUiMenuContextType = 'context-menu' | 'helper-buttons' | 'icons' | 'keyboard-shortcuts' | 'menu' | '
|
|
4015
|
+
export declare type TLUiMenuContextType = 'context-menu' | 'helper-buttons' | 'icons' | 'keyboard-shortcuts' | 'menu' | 'small-icons' | 'toolbar-overflow' | 'toolbar';
|
|
3796
4016
|
|
|
3797
4017
|
/** @public */
|
|
3798
4018
|
export declare interface TLUiMenuGroupProps<TranslationKey extends string = string> {
|
|
@@ -3927,19 +4147,15 @@ export declare interface TLUiSliderProps {
|
|
|
3927
4147
|
label: string;
|
|
3928
4148
|
title: string;
|
|
3929
4149
|
onValueChange(value: number): void;
|
|
3930
|
-
onHistoryMark(id: string): void;
|
|
4150
|
+
onHistoryMark?(id: string): void;
|
|
3931
4151
|
'data-testid'?: string;
|
|
3932
4152
|
ariaValueModifier?: number;
|
|
3933
4153
|
}
|
|
3934
4154
|
|
|
3935
|
-
/** @public */
|
|
3936
|
-
export declare interface TLUiStylePanelContentProps {
|
|
3937
|
-
styles: ReturnType<typeof useRelevantStyles>;
|
|
3938
|
-
}
|
|
3939
|
-
|
|
3940
4155
|
/** @public */
|
|
3941
4156
|
export declare interface TLUiStylePanelProps {
|
|
3942
4157
|
isMobile?: boolean;
|
|
4158
|
+
styles?: null | ReadonlySharedStyleMap;
|
|
3943
4159
|
children?: ReactNode;
|
|
3944
4160
|
}
|
|
3945
4161
|
|
|
@@ -3996,7 +4212,8 @@ export declare interface TLUiToolbarProps extends React_3.HTMLAttributes<HTMLDiv
|
|
|
3996
4212
|
className?: string;
|
|
3997
4213
|
dir?: 'ltr' | 'rtl';
|
|
3998
4214
|
label: string;
|
|
3999
|
-
orientation?: 'grid' | 'horizontal';
|
|
4215
|
+
orientation?: 'grid' | 'horizontal' | 'vertical';
|
|
4216
|
+
tooltipSide?: 'bottom' | 'left' | 'right' | 'top';
|
|
4000
4217
|
}
|
|
4001
4218
|
|
|
4002
4219
|
/** @public */
|
|
@@ -4007,6 +4224,7 @@ export declare interface TLUiToolbarToggleGroupProps extends React_3.HTMLAttribu
|
|
|
4007
4224
|
value: any;
|
|
4008
4225
|
defaultValue?: any;
|
|
4009
4226
|
type: 'multiple' | 'single';
|
|
4227
|
+
asChild?: boolean;
|
|
4010
4228
|
}
|
|
4011
4229
|
|
|
4012
4230
|
/** @public */
|
|
@@ -4015,7 +4233,7 @@ export declare interface TLUiToolbarToggleItemProps extends React_3.HTMLAttribut
|
|
|
4015
4233
|
className?: string;
|
|
4016
4234
|
type: 'icon' | 'tool';
|
|
4017
4235
|
value: string;
|
|
4018
|
-
tooltip?:
|
|
4236
|
+
tooltip?: React_3.ReactNode;
|
|
4019
4237
|
}
|
|
4020
4238
|
|
|
4021
4239
|
/** @public */
|
|
@@ -4061,7 +4279,7 @@ export declare interface TLUiTranslation {
|
|
|
4061
4279
|
export declare type TLUiTranslationContextType = TLUiTranslation;
|
|
4062
4280
|
|
|
4063
4281
|
/** @public */
|
|
4064
|
-
export declare type TLUiTranslationKey = 'a11y.adjust-shape-styles' | 'a11y.enlarge-shape' | 'a11y.enter-leave-container' | 'a11y.move-shape-faster' | 'a11y.move-shape' | 'a11y.multiple-shapes' | 'a11y.open-context-menu' | 'a11y.open-keyboard-shortcuts' | 'a11y.pan-camera' | 'a11y.repeat-shape' | 'a11y.rotate-shape-ccw-fine' | 'a11y.rotate-shape-ccw' | 'a11y.rotate-shape-cw-fine' | 'a11y.rotate-shape-cw' | 'a11y.select-shape-direction' | 'a11y.select-shape' | 'a11y.shape-image' | 'a11y.shape-index' | 'a11y.shape-video' | 'a11y.shrink-shape' | 'a11y.skip-to-main-content' | 'a11y.status' | 'action.align-bottom' | 'action.align-center-horizontal.short' | 'action.align-center-horizontal' | 'action.align-center-vertical.short' | 'action.align-center-vertical' | 'action.align-left' | 'action.align-right' | 'action.align-top' | 'action.back-to-content' | 'action.bring-forward' | 'action.bring-to-front' | 'action.convert-to-bookmark' | 'action.convert-to-embed' | 'action.copy-as-png.short' | 'action.copy-as-png' | 'action.copy-as-svg.short' | 'action.copy-as-svg' | 'action.copy' | 'action.cut' | 'action.delete' | 'action.distribute-horizontal.short' | 'action.distribute-horizontal' | 'action.distribute-vertical.short' | 'action.distribute-vertical' | 'action.download-original' | 'action.duplicate' | 'action.edit-link' | 'action.exit-pen-mode' | 'action.export-all-as-png.short' | 'action.export-all-as-png' | 'action.export-all-as-svg.short' | 'action.export-all-as-svg' | 'action.export-as-png.short' | 'action.export-as-png' | 'action.export-as-svg.short' | 'action.export-as-svg' | 'action.fit-frame-to-content' | 'action.flatten-to-image' | 'action.flip-horizontal.short' | 'action.flip-horizontal' | 'action.flip-vertical.short' | 'action.flip-vertical' | 'action.fork-project-on-tldraw' | 'action.fork-project' | 'action.group' | 'action.insert-embed' | 'action.insert-media' | 'action.leave-shared-project' | 'action.new-project' | 'action.new-shared-project' | 'action.open-cursor-chat' | 'action.open-embed-link' | 'action.open-file' | 'action.open-kbd-shortcuts' | 'action.pack' | 'action.paste-error-description' | 'action.paste-error-title' | 'action.paste' | 'action.print' | 'action.redo' | 'action.remove-frame' | 'action.rename' | 'action.rotate-ccw' | 'action.rotate-cw' | 'action.save-copy' | 'action.select-all' | 'action.select-none' | 'action.send-backward' | 'action.send-to-back' | 'action.share-project' | 'action.stack-horizontal.short' | 'action.stack-horizontal' | 'action.stack-vertical.short' | 'action.stack-vertical' | 'action.stop-following' | 'action.stretch-horizontal.short' | 'action.stretch-horizontal' | 'action.stretch-vertical.short' | 'action.stretch-vertical' | 'action.toggle-auto-size' | 'action.toggle-dark-mode.menu' | 'action.toggle-dark-mode' | 'action.toggle-debug-mode.menu' | 'action.toggle-debug-mode' | 'action.toggle-dynamic-size-mode.menu' | 'action.toggle-dynamic-size-mode' | 'action.toggle-edge-scrolling.menu' | 'action.toggle-edge-scrolling' | 'action.toggle-focus-mode.menu' | 'action.toggle-focus-mode' | 'action.toggle-grid.menu' | 'action.toggle-grid' | 'action.toggle-keyboard-shortcuts.menu' | 'action.toggle-keyboard-shortcuts' | 'action.toggle-lock' | 'action.toggle-paste-at-cursor.menu' | 'action.toggle-paste-at-cursor' | 'action.toggle-reduce-motion.menu' | 'action.toggle-reduce-motion' | 'action.toggle-snap-mode.menu' | 'action.toggle-snap-mode' | 'action.toggle-tool-lock.menu' | 'action.toggle-tool-lock' | 'action.toggle-transparent.context-menu' | 'action.toggle-transparent.menu' | 'action.toggle-transparent' | 'action.toggle-ui-labels.menu' | 'action.toggle-ui-labels' | 'action.toggle-wrap-mode.menu' | 'action.toggle-wrap-mode' | 'action.undo' | 'action.ungroup' | 'action.unlock-all' | 'action.zoom-in' | 'action.zoom-out' | 'action.zoom-to-100' | 'action.zoom-to-fit' | 'action.zoom-to-selection' | 'actions-menu.title' | 'align-style.end' | 'align-style.justify' | 'align-style.middle' | 'align-style.start' | 'app.loading' | 'arrow-kind-style.arc' | 'arrow-kind-style.elbow' | 'arrowheadEnd-style.arrow' | 'arrowheadEnd-style.bar' | 'arrowheadEnd-style.diamond' | 'arrowheadEnd-style.dot' | 'arrowheadEnd-style.inverted' | 'arrowheadEnd-style.none' | 'arrowheadEnd-style.pipe' | 'arrowheadEnd-style.square' | 'arrowheadEnd-style.triangle' | 'arrowheadStart-style.arrow' | 'arrowheadStart-style.bar' | 'arrowheadStart-style.diamond' | 'arrowheadStart-style.dot' | 'arrowheadStart-style.inverted' | 'arrowheadStart-style.none' | 'arrowheadStart-style.pipe' | 'arrowheadStart-style.square' | 'arrowheadStart-style.triangle' | 'assets.files.amount-too-many' | 'assets.files.size-too-big' | 'assets.files.type-not-allowed' | 'assets.files.upload-failed' | 'assets.url.failed' | 'color-style.black' | 'color-style.blue' | 'color-style.green' | 'color-style.grey' | 'color-style.light-blue' | 'color-style.light-green' | 'color-style.light-red' | 'color-style.light-violet' | 'color-style.orange' | 'color-style.red' | 'color-style.violet' | 'color-style.white' | 'color-style.yellow' | 'context-menu.arrange' | 'context-menu.copy-as' | 'context-menu.edit' | 'context-menu.export-all-as' | 'context-menu.export-as' | 'context-menu.move-to-page' | 'context-menu.reorder' | 'context-menu.title' | 'context.pages.new-page' | 'cursor-chat.type-to-chat' | 'dash-style.dashed' | 'dash-style.dotted' | 'dash-style.draw' | 'dash-style.solid' | 'document-name-menu.copy-link' | 'document.default-name' | 'edit-link-dialog.cancel' | 'edit-link-dialog.clear' | 'edit-link-dialog.detail' | 'edit-link-dialog.external-link' | 'edit-link-dialog.invalid-url' | 'edit-link-dialog.save' | 'edit-link-dialog.title' | 'edit-link-dialog.url' | 'embed-dialog.back' | 'embed-dialog.cancel' | 'embed-dialog.create' | 'embed-dialog.instruction' | 'embed-dialog.invalid-url' | 'embed-dialog.title' | 'embed-dialog.url' | 'file-system.confirm-clear.cancel' | 'file-system.confirm-clear.continue' | 'file-system.confirm-clear.description' | 'file-system.confirm-clear.dont-show-again' | 'file-system.confirm-clear.title' | 'file-system.confirm-open.cancel' | 'file-system.confirm-open.description' | 'file-system.confirm-open.dont-show-again' | 'file-system.confirm-open.open' | 'file-system.confirm-open.title' | 'file-system.file-open-error.file-format-version-too-new' | 'file-system.file-open-error.generic-corrupted-file' | 'file-system.file-open-error.not-a-tldraw-file' | 'file-system.file-open-error.title' | 'file-system.shared-document-file-open-error.description' | 'file-system.shared-document-file-open-error.title' | 'fill-style.fill' | 'fill-style.none' | 'fill-style.pattern' | 'fill-style.semi' | 'fill-style.solid' | 'focus-mode.toggle-focus-mode' | 'font-style.draw' | 'font-style.mono' | 'font-style.sans' | 'font-style.serif' | 'geo-style.arrow-down' | 'geo-style.arrow-left' | 'geo-style.arrow-right' | 'geo-style.arrow-up' | 'geo-style.check-box' | 'geo-style.cloud' | 'geo-style.diamond' | 'geo-style.ellipse' | 'geo-style.heart' | 'geo-style.hexagon' | 'geo-style.octagon' | 'geo-style.oval' | 'geo-style.pentagon' | 'geo-style.rectangle' | 'geo-style.rhombus' | 'geo-style.star' | 'geo-style.trapezoid' | 'geo-style.triangle' | 'geo-style.x-box' | 'handle.crop.bottom-left' | 'handle.crop.bottom-right' | 'handle.crop.bottom' | 'handle.crop.left' | 'handle.crop.right' | 'handle.crop.top-left' | 'handle.crop.top-right' | 'handle.crop.top' | 'handle.resize-bottom-left' | 'handle.resize-bottom-right' | 'handle.resize-bottom' | 'handle.resize-left' | 'handle.resize-right' | 'handle.resize-top-left' | 'handle.resize-top-right' | 'handle.resize-top' | 'handle.rotate.bottom_left_rotate' | 'handle.rotate.bottom_right_rotate' | 'handle.rotate.mobile_rotate' | 'handle.rotate.top_left_rotate' | 'handle.rotate.top_right_rotate' | 'help-menu.about' | 'help-menu.discord' | 'help-menu.github' | 'help-menu.import-tldr-file' | 'help-menu.keyboard-shortcuts' | 'help-menu.privacy' | 'help-menu.terms' | 'help-menu.title' | 'help-menu.twitter' | 'menu.accessibility' | 'menu.copy-as' | 'menu.edit' | 'menu.export-as' | 'menu.file' | 'menu.language' | 'menu.preferences' | 'menu.theme' | 'menu.title' | 'menu.view' | 'navigation-zone.minimap' | 'navigation-zone.title' | 'navigation-zone.toggle-minimap' | 'navigation-zone.zoom' | 'opacity-style.0.1' | 'opacity-style.0.25' | 'opacity-style.0.5' | 'opacity-style.0.75' | 'opacity-style.1' | 'page-menu.create-new-page' | 'page-menu.edit-done' | 'page-menu.edit-start' | 'page-menu.go-to-page' | 'page-menu.max-page-count-reached' | 'page-menu.new-page-initial-name' | 'page-menu.submenu.delete' | 'page-menu.submenu.duplicate-page' | 'page-menu.submenu.move-down' | 'page-menu.submenu.move-up' | 'page-menu.submenu.rename' | 'page-menu.submenu.title' | 'page-menu.title' | 'people-menu.anonymous-user' | 'people-menu.avatar-color' | 'people-menu.change-color' | 'people-menu.change-name' | 'people-menu.follow' | 'people-menu.following' | 'people-menu.invite' | 'people-menu.leading' | 'people-menu.title' | 'people-menu.user' | 'share-menu.copied' | 'share-menu.copy-link-note' | 'share-menu.copy-link' | 'share-menu.copy-readonly-link-note' | 'share-menu.copy-readonly-link' | 'share-menu.create-snapshot-link' | 'share-menu.creating-project' | 'share-menu.fork-note' | 'share-menu.offline-note' | 'share-menu.project-too-large' | 'share-menu.save-note' | 'share-menu.share-project' | 'share-menu.snapshot-link-note' | 'share-menu.title' | 'share-menu.upload-failed' | 'sharing.confirm-leave.cancel' | 'sharing.confirm-leave.description' | 'sharing.confirm-leave.dont-show-again' | 'sharing.confirm-leave.leave' | 'sharing.confirm-leave.title' | 'shortcuts-dialog.a11y' | 'shortcuts-dialog.collaboration' | 'shortcuts-dialog.edit' | 'shortcuts-dialog.file' | 'shortcuts-dialog.preferences' | 'shortcuts-dialog.text-formatting' | 'shortcuts-dialog.title' | 'shortcuts-dialog.tools' | 'shortcuts-dialog.transform' | 'shortcuts-dialog.view' | 'size-style.l' | 'size-style.m' | 'size-style.s' | 'size-style.xl' | 'spline-style.cubic' | 'spline-style.line' | 'status.offline' | 'style-panel.align' | 'style-panel.arrow-kind' | 'style-panel.arrowhead-end' | 'style-panel.arrowhead-start' | 'style-panel.arrowheads' | 'style-panel.color' | 'style-panel.dash' | 'style-panel.fill' | 'style-panel.font' | 'style-panel.geo' | 'style-panel.label-align' | 'style-panel.mixed' | 'style-panel.opacity' | 'style-panel.position' | 'style-panel.size' | 'style-panel.spline' | 'style-panel.title' | 'style-panel.vertical-align' | 'theme.dark' | 'theme.light' | 'theme.system' | 'toast.close' | 'toast.error.copy-fail.desc' | 'toast.error.copy-fail.title' | 'toast.error.export-fail.desc' | 'toast.error.export-fail.title' | 'toast.error' | 'toast.info' | 'toast.success' | 'toast.warning' | 'tool-panel.more' | 'tool-panel.title' | 'tool.arrow-down' | 'tool.arrow-left' | 'tool.arrow-right' | 'tool.arrow-up' | 'tool.arrow' | 'tool.aspect-ratio.circle' | 'tool.aspect-ratio.landscape' | 'tool.aspect-ratio.original' | 'tool.aspect-ratio.portrait' | 'tool.aspect-ratio.square' | 'tool.aspect-ratio.wide' | 'tool.aspect-ratio' | 'tool.bookmark' | 'tool.check-box' | 'tool.cloud' | 'tool.diamond' | 'tool.draw' | 'tool.ellipse' | 'tool.embed' | 'tool.eraser' | 'tool.flip-horz' | 'tool.flip-vert' | 'tool.frame' | 'tool.hand' | 'tool.heart' | 'tool.hexagon' | 'tool.highlight' | 'tool.image-crop' | 'tool.image-toolbar-title' | 'tool.image-zoom' | 'tool.laser' | 'tool.line' | 'tool.media-alt-text-confirm' | 'tool.media-alt-text-desc' | 'tool.media-alt-text' | 'tool.media' | 'tool.note' | 'tool.octagon' | 'tool.oval' | 'tool.pentagon' | 'tool.pointer-down' | 'tool.rectangle' | 'tool.replace-media' | 'tool.rhombus' | 'tool.rich-text-bold' | 'tool.rich-text-bulletList' | 'tool.rich-text-code' | 'tool.rich-text-header' | 'tool.rich-text-highlight' | 'tool.rich-text-italic' | 'tool.rich-text-link-remove' | 'tool.rich-text-link-visit' | 'tool.rich-text-link' | 'tool.rich-text-orderedList' | 'tool.rich-text-strikethrough' | 'tool.rich-text-toolbar-title' | 'tool.rotate-cw' | 'tool.select' | 'tool.star' | 'tool.text' | 'tool.trapezoid' | 'tool.triangle' | 'tool.x-box' | 'ui.checked' | 'ui.close' | 'ui.unchecked' | 'verticalAlign-style.end' | 'verticalAlign-style.middle' | 'verticalAlign-style.start' | 'vscode.file-open.backup-failed' | 'vscode.file-open.backup-saved' | 'vscode.file-open.backup' | 'vscode.file-open.desc' | 'vscode.file-open.dont-show-again' | 'vscode.file-open.open';
|
|
4282
|
+
export declare type TLUiTranslationKey = 'a11y.adjust-shape-styles' | 'a11y.enlarge-shape' | 'a11y.enter-leave-container' | 'a11y.move-shape-faster' | 'a11y.move-shape' | 'a11y.multiple-shapes' | 'a11y.open-context-menu' | 'a11y.open-keyboard-shortcuts' | 'a11y.pan-camera' | 'a11y.repeat-shape' | 'a11y.rotate-shape-ccw-fine' | 'a11y.rotate-shape-ccw' | 'a11y.rotate-shape-cw-fine' | 'a11y.rotate-shape-cw' | 'a11y.select-shape-direction' | 'a11y.select-shape' | 'a11y.shape-image' | 'a11y.shape-index' | 'a11y.shape-video' | 'a11y.shrink-shape' | 'a11y.skip-to-main-content' | 'a11y.status' | 'action.align-bottom' | 'action.align-center-horizontal.short' | 'action.align-center-horizontal' | 'action.align-center-vertical.short' | 'action.align-center-vertical' | 'action.align-left' | 'action.align-right' | 'action.align-top' | 'action.back-to-content' | 'action.bring-forward' | 'action.bring-to-front' | 'action.convert-to-bookmark' | 'action.convert-to-embed' | 'action.copy-as-png.short' | 'action.copy-as-png' | 'action.copy-as-svg.short' | 'action.copy-as-svg' | 'action.copy' | 'action.cut' | 'action.delete' | 'action.distribute-horizontal.short' | 'action.distribute-horizontal' | 'action.distribute-vertical.short' | 'action.distribute-vertical' | 'action.download-original' | 'action.duplicate' | 'action.edit-link' | 'action.exit-pen-mode' | 'action.export-all-as-png.short' | 'action.export-all-as-png' | 'action.export-all-as-svg.short' | 'action.export-all-as-svg' | 'action.export-as-png.short' | 'action.export-as-png' | 'action.export-as-svg.short' | 'action.export-as-svg' | 'action.fit-frame-to-content' | 'action.flatten-to-image' | 'action.flip-horizontal.short' | 'action.flip-horizontal' | 'action.flip-vertical.short' | 'action.flip-vertical' | 'action.fork-project-on-tldraw' | 'action.fork-project' | 'action.group' | 'action.insert-embed' | 'action.insert-media' | 'action.leave-shared-project' | 'action.new-project' | 'action.new-shared-project' | 'action.open-cursor-chat' | 'action.open-embed-link' | 'action.open-file' | 'action.open-kbd-shortcuts' | 'action.pack' | 'action.paste-error-description' | 'action.paste-error-title' | 'action.paste' | 'action.print' | 'action.redo' | 'action.remove-frame' | 'action.rename' | 'action.rotate-ccw' | 'action.rotate-cw' | 'action.save-copy' | 'action.select-all' | 'action.select-none' | 'action.send-backward' | 'action.send-to-back' | 'action.share-project' | 'action.stack-horizontal.short' | 'action.stack-horizontal' | 'action.stack-vertical.short' | 'action.stack-vertical' | 'action.stop-following' | 'action.stretch-horizontal.short' | 'action.stretch-horizontal' | 'action.stretch-vertical.short' | 'action.stretch-vertical' | 'action.toggle-auto-size' | 'action.toggle-dark-mode.menu' | 'action.toggle-dark-mode' | 'action.toggle-debug-mode.menu' | 'action.toggle-debug-mode' | 'action.toggle-dynamic-size-mode.menu' | 'action.toggle-dynamic-size-mode' | 'action.toggle-edge-scrolling.menu' | 'action.toggle-edge-scrolling' | 'action.toggle-focus-mode.menu' | 'action.toggle-focus-mode' | 'action.toggle-grid.menu' | 'action.toggle-grid' | 'action.toggle-keyboard-shortcuts.menu' | 'action.toggle-keyboard-shortcuts' | 'action.toggle-lock' | 'action.toggle-paste-at-cursor.menu' | 'action.toggle-paste-at-cursor' | 'action.toggle-reduce-motion.menu' | 'action.toggle-reduce-motion' | 'action.toggle-snap-mode.menu' | 'action.toggle-snap-mode' | 'action.toggle-tool-lock.menu' | 'action.toggle-tool-lock' | 'action.toggle-transparent.context-menu' | 'action.toggle-transparent.menu' | 'action.toggle-transparent' | 'action.toggle-ui-labels.menu' | 'action.toggle-ui-labels' | 'action.toggle-wrap-mode.menu' | 'action.toggle-wrap-mode' | 'action.undo' | 'action.ungroup' | 'action.unlock-all' | 'action.zoom-in' | 'action.zoom-out' | 'action.zoom-to-100' | 'action.zoom-to-fit' | 'action.zoom-to-selection' | 'actions-menu.title' | 'align-style.end' | 'align-style.justify' | 'align-style.middle' | 'align-style.start' | 'app.loading' | 'arrow-kind-style.arc' | 'arrow-kind-style.elbow' | 'arrowheadEnd-style.arrow' | 'arrowheadEnd-style.bar' | 'arrowheadEnd-style.diamond' | 'arrowheadEnd-style.dot' | 'arrowheadEnd-style.inverted' | 'arrowheadEnd-style.none' | 'arrowheadEnd-style.pipe' | 'arrowheadEnd-style.square' | 'arrowheadEnd-style.triangle' | 'arrowheadStart-style.arrow' | 'arrowheadStart-style.bar' | 'arrowheadStart-style.diamond' | 'arrowheadStart-style.dot' | 'arrowheadStart-style.inverted' | 'arrowheadStart-style.none' | 'arrowheadStart-style.pipe' | 'arrowheadStart-style.square' | 'arrowheadStart-style.triangle' | 'assets.files.amount-too-many' | 'assets.files.maximum-size' | 'assets.files.size-too-big' | 'assets.files.type-not-allowed' | 'assets.files.upload-failed' | 'assets.url.failed' | 'color-style.black' | 'color-style.blue' | 'color-style.green' | 'color-style.grey' | 'color-style.light-blue' | 'color-style.light-green' | 'color-style.light-red' | 'color-style.light-violet' | 'color-style.orange' | 'color-style.red' | 'color-style.violet' | 'color-style.white' | 'color-style.yellow' | 'context-menu.arrange' | 'context-menu.copy-as' | 'context-menu.edit' | 'context-menu.export-all-as' | 'context-menu.export-as' | 'context-menu.move-to-page' | 'context-menu.reorder' | 'context-menu.title' | 'context.pages.new-page' | 'cursor-chat.type-to-chat' | 'dash-style.dashed' | 'dash-style.dotted' | 'dash-style.draw' | 'dash-style.solid' | 'document-name-menu.copy-link' | 'document.default-name' | 'edit-link-dialog.cancel' | 'edit-link-dialog.clear' | 'edit-link-dialog.detail' | 'edit-link-dialog.external-link' | 'edit-link-dialog.invalid-url' | 'edit-link-dialog.save' | 'edit-link-dialog.title' | 'edit-link-dialog.url' | 'embed-dialog.back' | 'embed-dialog.cancel' | 'embed-dialog.create' | 'embed-dialog.instruction' | 'embed-dialog.invalid-url' | 'embed-dialog.title' | 'embed-dialog.url' | 'file-system.confirm-clear.cancel' | 'file-system.confirm-clear.continue' | 'file-system.confirm-clear.description' | 'file-system.confirm-clear.dont-show-again' | 'file-system.confirm-clear.title' | 'file-system.confirm-open.cancel' | 'file-system.confirm-open.description' | 'file-system.confirm-open.dont-show-again' | 'file-system.confirm-open.open' | 'file-system.confirm-open.title' | 'file-system.file-open-error.file-format-version-too-new' | 'file-system.file-open-error.generic-corrupted-file' | 'file-system.file-open-error.not-a-tldraw-file' | 'file-system.file-open-error.title' | 'file-system.shared-document-file-open-error.description' | 'file-system.shared-document-file-open-error.title' | 'fill-style.fill' | 'fill-style.none' | 'fill-style.pattern' | 'fill-style.semi' | 'fill-style.solid' | 'focus-mode.toggle-focus-mode' | 'font-style.draw' | 'font-style.mono' | 'font-style.sans' | 'font-style.serif' | 'geo-style.arrow-down' | 'geo-style.arrow-left' | 'geo-style.arrow-right' | 'geo-style.arrow-up' | 'geo-style.check-box' | 'geo-style.cloud' | 'geo-style.diamond' | 'geo-style.ellipse' | 'geo-style.heart' | 'geo-style.hexagon' | 'geo-style.octagon' | 'geo-style.oval' | 'geo-style.pentagon' | 'geo-style.rectangle' | 'geo-style.rhombus-2' | 'geo-style.rhombus' | 'geo-style.star' | 'geo-style.trapezoid' | 'geo-style.triangle' | 'geo-style.x-box' | 'handle.crop.bottom-left' | 'handle.crop.bottom-right' | 'handle.crop.bottom' | 'handle.crop.left' | 'handle.crop.right' | 'handle.crop.top-left' | 'handle.crop.top-right' | 'handle.crop.top' | 'handle.resize-bottom-left' | 'handle.resize-bottom-right' | 'handle.resize-bottom' | 'handle.resize-left' | 'handle.resize-right' | 'handle.resize-top-left' | 'handle.resize-top-right' | 'handle.resize-top' | 'handle.rotate.bottom_left_rotate' | 'handle.rotate.bottom_right_rotate' | 'handle.rotate.mobile_rotate' | 'handle.rotate.top_left_rotate' | 'handle.rotate.top_right_rotate' | 'help-menu.about' | 'help-menu.discord' | 'help-menu.github' | 'help-menu.import-tldr-file' | 'help-menu.keyboard-shortcuts' | 'help-menu.privacy' | 'help-menu.terms' | 'help-menu.title' | 'help-menu.twitter' | 'menu.accessibility' | 'menu.copy-as' | 'menu.edit' | 'menu.export-as' | 'menu.file' | 'menu.language' | 'menu.preferences' | 'menu.theme' | 'menu.title' | 'menu.view' | 'navigation-zone.minimap' | 'navigation-zone.title' | 'navigation-zone.toggle-minimap' | 'navigation-zone.zoom' | 'opacity-style.0.1' | 'opacity-style.0.25' | 'opacity-style.0.5' | 'opacity-style.0.75' | 'opacity-style.1' | 'page-menu.create-new-page' | 'page-menu.edit-done' | 'page-menu.edit-start' | 'page-menu.go-to-page' | 'page-menu.max-page-count-reached' | 'page-menu.new-page-initial-name' | 'page-menu.submenu.delete' | 'page-menu.submenu.duplicate-page' | 'page-menu.submenu.move-down' | 'page-menu.submenu.move-up' | 'page-menu.submenu.rename' | 'page-menu.submenu.title' | 'page-menu.title' | 'people-menu.anonymous-user' | 'people-menu.avatar-color' | 'people-menu.change-color' | 'people-menu.change-name' | 'people-menu.follow' | 'people-menu.following' | 'people-menu.invite' | 'people-menu.leading' | 'people-menu.title' | 'people-menu.user' | 'share-menu.copied' | 'share-menu.copy-link-note' | 'share-menu.copy-link' | 'share-menu.copy-readonly-link-note' | 'share-menu.copy-readonly-link' | 'share-menu.create-snapshot-link' | 'share-menu.creating-project' | 'share-menu.fork-note' | 'share-menu.offline-note' | 'share-menu.project-too-large' | 'share-menu.save-note' | 'share-menu.share-project' | 'share-menu.snapshot-link-note' | 'share-menu.title' | 'share-menu.upload-failed' | 'sharing.confirm-leave.cancel' | 'sharing.confirm-leave.description' | 'sharing.confirm-leave.dont-show-again' | 'sharing.confirm-leave.leave' | 'sharing.confirm-leave.title' | 'shortcuts-dialog.a11y' | 'shortcuts-dialog.collaboration' | 'shortcuts-dialog.edit' | 'shortcuts-dialog.file' | 'shortcuts-dialog.preferences' | 'shortcuts-dialog.text-formatting' | 'shortcuts-dialog.title' | 'shortcuts-dialog.tools' | 'shortcuts-dialog.transform' | 'shortcuts-dialog.view' | 'size-style.l' | 'size-style.m' | 'size-style.s' | 'size-style.xl' | 'spline-style.cubic' | 'spline-style.line' | 'status.offline' | 'style-panel.align' | 'style-panel.arrow-kind' | 'style-panel.arrowhead-end' | 'style-panel.arrowhead-start' | 'style-panel.arrowheads' | 'style-panel.color' | 'style-panel.dash' | 'style-panel.fill' | 'style-panel.font' | 'style-panel.geo' | 'style-panel.label-align' | 'style-panel.mixed' | 'style-panel.opacity' | 'style-panel.position' | 'style-panel.selected' | 'style-panel.size' | 'style-panel.spline' | 'style-panel.title' | 'style-panel.vertical-align' | 'theme.dark' | 'theme.light' | 'theme.system' | 'toast.close' | 'toast.error.copy-fail.desc' | 'toast.error.copy-fail.title' | 'toast.error.export-fail.desc' | 'toast.error.export-fail.title' | 'toast.error' | 'toast.info' | 'toast.success' | 'toast.warning' | 'tool-panel.more' | 'tool-panel.title' | 'tool.arrow-down' | 'tool.arrow-left' | 'tool.arrow-right' | 'tool.arrow-up' | 'tool.arrow' | 'tool.aspect-ratio.circle' | 'tool.aspect-ratio.landscape' | 'tool.aspect-ratio.original' | 'tool.aspect-ratio.portrait' | 'tool.aspect-ratio.square' | 'tool.aspect-ratio.wide' | 'tool.aspect-ratio' | 'tool.bookmark' | 'tool.check-box' | 'tool.cloud' | 'tool.diamond' | 'tool.draw' | 'tool.ellipse' | 'tool.embed' | 'tool.eraser' | 'tool.flip-horz' | 'tool.flip-vert' | 'tool.frame' | 'tool.hand' | 'tool.heart' | 'tool.hexagon' | 'tool.highlight' | 'tool.image-crop-confirm' | 'tool.image-crop' | 'tool.image-toolbar-title' | 'tool.image-zoom' | 'tool.laser' | 'tool.line' | 'tool.media-alt-text-confirm' | 'tool.media-alt-text-desc' | 'tool.media-alt-text' | 'tool.media' | 'tool.note' | 'tool.octagon' | 'tool.oval' | 'tool.pentagon' | 'tool.pointer-down' | 'tool.rectangle' | 'tool.replace-media' | 'tool.rhombus' | 'tool.rich-text-bold' | 'tool.rich-text-bulletList' | 'tool.rich-text-code' | 'tool.rich-text-header' | 'tool.rich-text-highlight' | 'tool.rich-text-italic' | 'tool.rich-text-link-remove' | 'tool.rich-text-link-visit' | 'tool.rich-text-link' | 'tool.rich-text-orderedList' | 'tool.rich-text-strikethrough' | 'tool.rich-text-toolbar-title' | 'tool.rotate-cw' | 'tool.select' | 'tool.star' | 'tool.text' | 'tool.trapezoid' | 'tool.triangle' | 'tool.x-box' | 'ui.checked' | 'ui.close' | 'ui.unchecked' | 'verticalAlign-style.end' | 'verticalAlign-style.middle' | 'verticalAlign-style.start' | 'vscode.file-open.backup-failed' | 'vscode.file-open.backup-saved' | 'vscode.file-open.backup' | 'vscode.file-open.desc' | 'vscode.file-open.dont-show-again' | 'vscode.file-open.open';
|
|
4065
4283
|
|
|
4066
4284
|
/** @public */
|
|
4067
4285
|
export declare interface TLUiTranslationProviderProps {
|
|
@@ -4237,18 +4455,34 @@ export declare function UnlockAllMenuItem(): JSX_2.Element;
|
|
|
4237
4455
|
/** @public */
|
|
4238
4456
|
export declare function unwrapLabel(label?: TLUiActionItem['label'], menuType?: string): string | undefined;
|
|
4239
4457
|
|
|
4240
|
-
/**
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4458
|
+
/**
|
|
4459
|
+
* Update the current arrow target state for an editor. See {@link ArrowTargetState} for more
|
|
4460
|
+
* information.
|
|
4461
|
+
*
|
|
4462
|
+
* @public
|
|
4463
|
+
*/
|
|
4464
|
+
export declare function updateArrowTargetState({ editor, pointInPageSpace, arrow, isPrecise, currentBinding, oppositeBinding, }: UpdateArrowTargetStateOpts): ArrowTargetState | null;
|
|
4245
4465
|
|
|
4246
4466
|
/**
|
|
4247
|
-
*
|
|
4467
|
+
* Options passed to {@link updateArrowTargetState}.
|
|
4248
4468
|
*
|
|
4249
4469
|
* @public
|
|
4250
4470
|
*/
|
|
4251
|
-
export declare
|
|
4471
|
+
export declare interface UpdateArrowTargetStateOpts {
|
|
4472
|
+
editor: Editor;
|
|
4473
|
+
pointInPageSpace: VecLike;
|
|
4474
|
+
arrow: TLArrowShape | undefined;
|
|
4475
|
+
isPrecise: boolean;
|
|
4476
|
+
currentBinding: TLArrowBinding | undefined;
|
|
4477
|
+
/** The binding from the opposite end of the arrow, if one exists. */
|
|
4478
|
+
oppositeBinding: TLArrowBinding | undefined;
|
|
4479
|
+
}
|
|
4480
|
+
|
|
4481
|
+
/** @public */
|
|
4482
|
+
export declare function useA11y(): TLUiA11yContextType;
|
|
4483
|
+
|
|
4484
|
+
/** @public */
|
|
4485
|
+
export declare function useActions(): TLUiActionsContextType;
|
|
4252
4486
|
|
|
4253
4487
|
/* Excluded from this release type: useAssetUrls */
|
|
4254
4488
|
|
|
@@ -4304,7 +4538,11 @@ export declare function useDefaultHelpers(): {
|
|
|
4304
4538
|
copy: (source: TLUiEventSource) => Promise<void>;
|
|
4305
4539
|
copyAs: (ids: TLShapeId[], format?: TLCopyType) => void;
|
|
4306
4540
|
cut: (source: TLUiEventSource) => Promise<void>;
|
|
4307
|
-
exportAs: (ids: TLShapeId[],
|
|
4541
|
+
exportAs: (ids: TLShapeId[], opts?: {
|
|
4542
|
+
format?: TLExportType;
|
|
4543
|
+
name?: string;
|
|
4544
|
+
scale?: number;
|
|
4545
|
+
}) => void;
|
|
4308
4546
|
getEmbedDefinition: (url: string) => TLEmbedResult;
|
|
4309
4547
|
insertMedia: () => Promise<void>;
|
|
4310
4548
|
isMobile: boolean;
|
|
@@ -4326,7 +4564,9 @@ export declare function useEditablePlainText(shapeId: TLShapeId, type: string, t
|
|
|
4326
4564
|
handleChange: ({ plaintext }: {
|
|
4327
4565
|
plaintext: string;
|
|
4328
4566
|
}) => void;
|
|
4329
|
-
handleDoubleClick: (e:
|
|
4567
|
+
handleDoubleClick: (e: {
|
|
4568
|
+
nativeEvent: Event;
|
|
4569
|
+
} | Event) => void;
|
|
4330
4570
|
handleFocus: () => void;
|
|
4331
4571
|
handleInputPointerDown: (e: React_3.PointerEvent) => void;
|
|
4332
4572
|
handleKeyDown: (e: KeyboardEvent) => void;
|
|
@@ -4343,7 +4583,9 @@ export declare function useEditableRichText(shapeId: TLShapeId, type: string, ri
|
|
|
4343
4583
|
handleChange: ({ richText }: {
|
|
4344
4584
|
richText: TLRichText;
|
|
4345
4585
|
}) => void;
|
|
4346
|
-
handleDoubleClick: (e:
|
|
4586
|
+
handleDoubleClick: (e: {
|
|
4587
|
+
nativeEvent: Event;
|
|
4588
|
+
} | Event) => void;
|
|
4347
4589
|
handleFocus: () => void;
|
|
4348
4590
|
handleInputPointerDown: (e: React.PointerEvent) => void;
|
|
4349
4591
|
handleKeyDown: (e: KeyboardEvent) => void;
|
|
@@ -4354,14 +4596,12 @@ export declare function useEditableRichText(shapeId: TLShapeId, type: string, ri
|
|
|
4354
4596
|
rInput: RefObject<HTMLDivElement>;
|
|
4355
4597
|
};
|
|
4356
4598
|
|
|
4357
|
-
/**
|
|
4358
|
-
* @deprecated Use `useEditablePlainText` instead.
|
|
4359
|
-
* @public
|
|
4360
|
-
*/
|
|
4361
|
-
export declare const useEditableText: typeof useEditablePlainText;
|
|
4362
|
-
|
|
4363
4599
|
/** @public */
|
|
4364
|
-
export declare function useExportAs(): (ids: TLShapeId[],
|
|
4600
|
+
export declare function useExportAs(): (ids: TLShapeId[], opts?: {
|
|
4601
|
+
format?: TLExportType;
|
|
4602
|
+
name?: string;
|
|
4603
|
+
scale?: number;
|
|
4604
|
+
}) => void;
|
|
4365
4605
|
|
|
4366
4606
|
/**
|
|
4367
4607
|
* This is a handy helper hook that resolves an asset to an optimized URL for a given shape, or its
|
|
@@ -4435,9 +4675,15 @@ export declare const useSelectedShapesAnnouncer: () => void;
|
|
|
4435
4675
|
/** @public */
|
|
4436
4676
|
export declare function useShowCollaborationUi(): boolean;
|
|
4437
4677
|
|
|
4678
|
+
/** @public */
|
|
4679
|
+
export declare function useStylePanelContext(): StylePanelContext;
|
|
4680
|
+
|
|
4438
4681
|
/** @public */
|
|
4439
4682
|
export declare function useTldrawUiComponents(): TLUiComponents;
|
|
4440
4683
|
|
|
4684
|
+
/** @public */
|
|
4685
|
+
export declare function useTldrawUiOrientation(): TldrawUiOrientationContext;
|
|
4686
|
+
|
|
4441
4687
|
/** @public */
|
|
4442
4688
|
export declare function useToasts(): TLUiToastsContextType;
|
|
4443
4689
|
|