tldraw 3.16.0-internal.51e99e128bd4 → 3.16.0-internal.a478398270c6
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 +23 -297
- package/dist-cjs/index.js +2 -30
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/TldrawImage.js +2 -5
- package/dist-cjs/lib/TldrawImage.js.map +3 -3
- package/dist-cjs/lib/canvas/TldrawCropHandles.js +1 -1
- package/dist-cjs/lib/canvas/TldrawCropHandles.js.map +2 -2
- package/dist-cjs/lib/canvas/TldrawHandles.js +1 -1
- package/dist-cjs/lib/canvas/TldrawHandles.js.map +2 -2
- package/dist-cjs/lib/canvas/TldrawOverlays.js +1 -1
- package/dist-cjs/lib/canvas/TldrawOverlays.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/canvas/TldrawSelectionForeground.js +271 -279
- package/dist-cjs/lib/canvas/TldrawSelectionForeground.js.map +2 -2
- package/dist-cjs/lib/defaultExternalContentHandlers.js +0 -1
- package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +44 -27
- package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/arrowLabel.js +4 -16
- package/dist-cjs/lib/shapes/arrow/arrowLabel.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/arrowTargetState.js +1 -1
- 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 +0 -3
- package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js.map +2 -2
- package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js +6 -3
- package/dist-cjs/lib/shapes/draw/DrawShapeUtil.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 +17 -17
- 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/geo/GeoShapeUtil.js +2 -2
- package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js +1 -2
- package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js.map +2 -2
- package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +4 -5
- package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/image/ImageShapeUtil.js +3 -3
- package/dist-cjs/lib/shapes/image/ImageShapeUtil.js.map +1 -1
- package/dist-cjs/lib/shapes/line/LineShapeUtil.js +5 -20
- package/dist-cjs/lib/shapes/line/LineShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +5 -6
- package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/PathBuilder.js +3 -21
- package/dist-cjs/lib/shapes/shared/PathBuilder.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/PlainTextLabel.js +0 -1
- package/dist-cjs/lib/shapes/shared/PlainTextLabel.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/RichTextLabel.js +2 -5
- package/dist-cjs/lib/shapes/shared/RichTextLabel.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/ShapeFill.js +4 -4
- package/dist-cjs/lib/shapes/shared/ShapeFill.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/SvgTextLabel.js +3 -4
- package/dist-cjs/lib/shapes/shared/SvgTextLabel.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/freehand/svg.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js +1 -10
- package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js.map +2 -2
- package/dist-cjs/lib/shapes/text/TextShapeUtil.js +13 -7
- package/dist-cjs/lib/shapes/text/TextShapeUtil.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/styles.js.map +2 -2
- package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js +1 -25
- package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js.map +2 -2
- package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js +0 -12
- package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js +1 -7
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +22 -43
- package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js +15 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js +0 -5
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js +0 -8
- package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js +0 -8
- package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js +0 -8
- package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js.map +2 -2
- package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js.map +2 -2
- package/dist-cjs/lib/ui/TldrawUi.js +0 -14
- package/dist-cjs/lib/ui/TldrawUi.js.map +3 -3
- package/dist-cjs/lib/ui/components/A11y.js +12 -14
- package/dist-cjs/lib/ui/components/A11y.js.map +2 -2
- package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js +3 -12
- package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js.map +2 -2
- package/dist-cjs/lib/ui/components/DefaultMenuPanel.js +2 -3
- package/dist-cjs/lib/ui/components/DefaultMenuPanel.js.map +2 -2
- package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js +1 -51
- package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js.map +2 -2
- package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js +2 -3
- package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.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 +3 -5
- package/dist-cjs/lib/ui/components/MobileStylePanel.js.map +2 -2
- package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js +5 -4
- package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js.map +2 -2
- package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js +1 -2
- package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js.map +2 -2
- package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js +2 -3
- package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js.map +2 -2
- package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js +2 -2
- package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js.map +2 -2
- package/dist-cjs/lib/ui/components/Spinner.js +25 -2
- package/dist-cjs/lib/ui/components/Spinner.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js +0 -2
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +139 -171
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js +3 -3
- package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js +25 -26
- package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js.map +3 -3
- package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbar.js +7 -21
- package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbar.js.map +3 -3
- package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js +1 -1
- package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js +21 -66
- package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js.map +3 -3
- package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js +80 -189
- package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js.map +3 -3
- package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js +4 -5
- package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js.map +2 -2
- package/dist-cjs/lib/ui/components/menu-items.js +0 -22
- package/dist-cjs/lib/ui/components/menu-items.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/Button/TldrawUiButtonIcon.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js +16 -7
- package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js.map +3 -3
- package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js +1 -1
- package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiDialog.js +1 -1
- package/dist-cjs/lib/ui/components/primitives/TldrawUiDialog.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiIcon.js +1 -35
- package/dist-cjs/lib/ui/components/primitives/TldrawUiIcon.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js +2 -3
- package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js.map +3 -3
- package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js +2 -6
- package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js +7 -31
- package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js.map +2 -2
- 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 +12 -25
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +22 -154
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +2 -2
- package/dist-cjs/lib/ui/context/TldrawUiContextProvider.js +2 -3
- package/dist-cjs/lib/ui/context/TldrawUiContextProvider.js.map +2 -2
- package/dist-cjs/lib/ui/context/actions.js +8 -57
- package/dist-cjs/lib/ui/context/actions.js.map +2 -2
- package/dist-cjs/lib/ui/context/events.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/menu-hooks.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js +2 -2
- package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/useTools.js +9 -94
- 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 +0 -11
- package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +2 -2
- package/dist-cjs/lib/ui/kbd-utils.js +1 -2
- 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/excalidraw/putExcalidrawContent.js +1 -1
- package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js.map +2 -2
- package/dist-cjs/lib/utils/tldr/buildFromV1Document.js +2 -3
- package/dist-cjs/lib/utils/tldr/buildFromV1Document.js.map +2 -2
- package/dist-esm/index.d.mts +23 -297
- package/dist-esm/index.mjs +4 -51
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/TldrawImage.mjs +2 -5
- package/dist-esm/lib/TldrawImage.mjs.map +2 -2
- package/dist-esm/lib/canvas/TldrawCropHandles.mjs +1 -1
- package/dist-esm/lib/canvas/TldrawCropHandles.mjs.map +2 -2
- package/dist-esm/lib/canvas/TldrawHandles.mjs +1 -1
- package/dist-esm/lib/canvas/TldrawHandles.mjs.map +2 -2
- package/dist-esm/lib/canvas/TldrawOverlays.mjs +1 -1
- package/dist-esm/lib/canvas/TldrawOverlays.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/canvas/TldrawSelectionForeground.mjs +271 -279
- package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs.map +2 -2
- package/dist-esm/lib/defaultExternalContentHandlers.mjs +0 -1
- package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +44 -30
- package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/arrowLabel.mjs +5 -19
- package/dist-esm/lib/shapes/arrow/arrowLabel.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs +1 -1
- 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 +0 -3
- package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs.map +2 -2
- package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs +6 -4
- package/dist-esm/lib/shapes/draw/DrawShapeUtil.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 +17 -18
- 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/geo/GeoShapeUtil.mjs +2 -3
- package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs +1 -2
- package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs.map +2 -2
- package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +4 -6
- package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs +3 -3
- package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs.map +1 -1
- package/dist-esm/lib/shapes/line/LineShapeUtil.mjs +5 -21
- package/dist-esm/lib/shapes/line/LineShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +5 -7
- package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/PathBuilder.mjs +3 -22
- package/dist-esm/lib/shapes/shared/PathBuilder.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs +0 -1
- package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/RichTextLabel.mjs +2 -5
- package/dist-esm/lib/shapes/shared/RichTextLabel.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/ShapeFill.mjs +4 -5
- package/dist-esm/lib/shapes/shared/ShapeFill.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/SvgTextLabel.mjs +3 -4
- package/dist-esm/lib/shapes/shared/SvgTextLabel.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/freehand/svg.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs +1 -10
- package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs.map +2 -2
- package/dist-esm/lib/shapes/text/TextShapeUtil.mjs +13 -8
- package/dist-esm/lib/shapes/text/TextShapeUtil.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/styles.mjs.map +2 -2
- package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs +1 -26
- package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs.map +2 -2
- package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs +0 -13
- package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs +1 -7
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +22 -43
- package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs +15 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs +0 -5
- package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs +0 -8
- package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs +0 -8
- package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs +0 -8
- package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs.map +2 -2
- package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs.map +2 -2
- package/dist-esm/lib/ui/TldrawUi.mjs +2 -16
- package/dist-esm/lib/ui/TldrawUi.mjs.map +3 -3
- package/dist-esm/lib/ui/components/A11y.mjs +12 -14
- package/dist-esm/lib/ui/components/A11y.mjs.map +2 -2
- package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs +3 -12
- package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs.map +2 -2
- package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs +2 -3
- package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs.map +2 -2
- package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs +1 -51
- package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs.map +2 -2
- package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs +3 -3
- package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.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 +3 -6
- package/dist-esm/lib/ui/components/MobileStylePanel.mjs.map +2 -2
- package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.mjs +5 -4
- package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.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/SharePanel/PeopleMenuItem.mjs +2 -3
- package/dist-esm/lib/ui/components/SharePanel/PeopleMenuItem.mjs.map +2 -2
- package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs +2 -2
- package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Spinner.mjs +26 -3
- package/dist-esm/lib/ui/components/Spinner.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs +1 -3
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs +139 -171
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs +3 -3
- package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs +25 -26
- package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbar.mjs +9 -23
- package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbar.mjs.map +3 -3
- package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs +1 -1
- package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs +21 -56
- package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs +81 -192
- package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs.map +3 -3
- package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs +4 -5
- package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs.map +2 -2
- package/dist-esm/lib/ui/components/menu-items.mjs +0 -22
- package/dist-esm/lib/ui/components/menu-items.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/Button/TldrawUiButtonIcon.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs +6 -8
- package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs +1 -1
- package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiDialog.mjs +1 -1
- package/dist-esm/lib/ui/components/primitives/TldrawUiDialog.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiIcon.mjs +2 -36
- package/dist-esm/lib/ui/components/primitives/TldrawUiIcon.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs +2 -3
- package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs +2 -6
- package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs +7 -31
- package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs.map +2 -2
- 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 +12 -25
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +24 -162
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +2 -2
- package/dist-esm/lib/ui/context/TldrawUiContextProvider.mjs +2 -3
- package/dist-esm/lib/ui/context/TldrawUiContextProvider.mjs.map +2 -2
- package/dist-esm/lib/ui/context/actions.mjs +8 -57
- package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
- package/dist-esm/lib/ui/context/events.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/menu-hooks.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs +2 -2
- package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/useTools.mjs +10 -102
- package/dist-esm/lib/ui/hooks/useTools.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +0 -11
- package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +2 -2
- package/dist-esm/lib/ui/kbd-utils.mjs +1 -2
- 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/excalidraw/putExcalidrawContent.mjs +1 -1
- package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs.map +2 -2
- package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs +2 -3
- package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs.map +2 -2
- package/package.json +34 -12
- package/src/index.ts +2 -39
- package/src/lib/TldrawImage.tsx +2 -6
- package/src/lib/canvas/TldrawCropHandles.tsx +1 -3
- package/src/lib/canvas/TldrawHandles.tsx +1 -5
- package/src/lib/canvas/TldrawOverlays.tsx +1 -1
- package/src/lib/canvas/TldrawScribble.tsx +1 -1
- package/src/lib/canvas/TldrawSelectionForeground.tsx +1 -5
- package/src/lib/defaultExternalContentHandlers.ts +1 -2
- package/src/lib/shapes/arrow/ArrowShapeOptions.test.ts +1 -2
- package/src/lib/shapes/arrow/ArrowShapeTool.test.ts +3 -4
- package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +11 -12
- package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +46 -30
- package/src/lib/shapes/arrow/arrowLabel.ts +3 -23
- package/src/lib/shapes/arrow/arrowTargetState.ts +1 -2
- package/src/lib/shapes/arrow/elbow/ElbowArrowDebug.tsx +3 -3
- package/src/lib/shapes/arrow/toolStates/Pointing.tsx +0 -3
- package/src/lib/shapes/draw/DrawShapeTool.test.ts +5 -0
- package/src/lib/shapes/draw/DrawShapeUtil.tsx +7 -4
- package/src/lib/shapes/embed/EmbedShapeUtil.tsx +1 -1
- package/src/lib/shapes/frame/FrameShapeUtil.tsx +21 -26
- package/src/lib/shapes/frame/components/FrameHeading.tsx +1 -1
- package/src/lib/shapes/geo/GeoShapeUtil.tsx +2 -3
- package/src/lib/shapes/geo/components/GeoShapeBody.tsx +2 -2
- package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +4 -7
- package/src/lib/shapes/image/ImageShapeUtil.tsx +3 -3
- package/src/lib/shapes/line/LineShapeUtil.test.tsx +3 -4
- package/src/lib/shapes/line/LineShapeUtil.tsx +6 -25
- package/src/lib/shapes/line/__snapshots__/LineShapeUtil.test.tsx.snap +2 -2
- package/src/lib/shapes/note/NoteShapeUtil.tsx +4 -10
- package/src/lib/shapes/shared/PathBuilder.test.tsx +1 -1
- package/src/lib/shapes/shared/PathBuilder.tsx +1 -35
- package/src/lib/shapes/shared/PlainTextLabel.tsx +0 -1
- package/src/lib/shapes/shared/RichTextLabel.tsx +0 -4
- package/src/lib/shapes/shared/ShapeFill.tsx +4 -5
- package/src/lib/shapes/shared/SvgTextLabel.tsx +2 -4
- package/src/lib/shapes/shared/freehand/svg.ts +0 -2
- package/src/lib/shapes/shared/usePrefersReducedMotion.tsx +1 -11
- package/src/lib/shapes/text/TextShapeTool.test.ts +5 -6
- package/src/lib/shapes/text/TextShapeUtil.tsx +14 -8
- package/src/lib/shapes/video/VideoShapeUtil.tsx +3 -3
- package/src/lib/styles.tsx +1 -3
- package/src/lib/tools/EraserTool/childStates/Erasing.ts +1 -34
- package/src/lib/tools/EraserTool/childStates/Pointing.ts +0 -20
- package/src/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.ts +1 -8
- package/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +30 -54
- package/src/lib/tools/SelectTool/childStates/Idle.ts +24 -2
- package/src/lib/tools/SelectTool/childStates/PointingShape.ts +0 -7
- package/src/lib/tools/SelectTool/childStates/Resizing.ts +1 -12
- package/src/lib/tools/SelectTool/childStates/Rotating.ts +0 -11
- package/src/lib/tools/SelectTool/childStates/Translating.ts +1 -11
- package/src/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.ts +0 -1
- package/src/lib/ui/TldrawUi.tsx +2 -17
- package/src/lib/ui/components/A11y.tsx +13 -15
- package/src/lib/ui/components/ActionsMenu/DefaultActionsMenu.tsx +3 -15
- package/src/lib/ui/components/DefaultMenuPanel.tsx +3 -4
- package/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.tsx +0 -40
- package/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx +2 -4
- package/src/lib/ui/components/Minimap/MinimapManager.ts +4 -4
- package/src/lib/ui/components/MobileStylePanel.tsx +6 -9
- package/src/lib/ui/components/NavigationPanel/DefaultNavigationPanel.tsx +5 -4
- package/src/lib/ui/components/PageMenu/DefaultPageMenu.tsx +2 -3
- package/src/lib/ui/components/SharePanel/PeopleMenuItem.tsx +3 -4
- package/src/lib/ui/components/SharePanel/UserPresenceColorPicker.tsx +3 -3
- package/src/lib/ui/components/Spinner.tsx +24 -2
- package/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx +1 -3
- package/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +106 -146
- package/src/lib/ui/components/StylePanel/DoubleDropdownPicker.tsx +3 -3
- package/src/lib/ui/components/StylePanel/DropdownPicker.tsx +6 -7
- package/src/lib/ui/components/Toolbar/DefaultImageToolbar.tsx +9 -25
- package/src/lib/ui/components/Toolbar/DefaultImageToolbarContent.tsx +1 -1
- package/src/lib/ui/components/Toolbar/DefaultToolbar.tsx +23 -55
- package/src/lib/ui/components/Toolbar/OverflowingToolbar.tsx +61 -212
- package/src/lib/ui/components/Toolbar/ToggleToolLockedButton.tsx +12 -17
- package/src/lib/ui/components/menu-items.tsx +0 -25
- package/src/lib/ui/components/primitives/Button/TldrawUiButtonIcon.tsx +2 -2
- package/src/lib/ui/components/primitives/TldrawUiButtonPicker.tsx +35 -40
- package/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx +1 -1
- package/src/lib/ui/components/primitives/TldrawUiDialog.tsx +1 -1
- package/src/lib/ui/components/primitives/TldrawUiIcon.tsx +3 -41
- package/src/lib/ui/components/primitives/TldrawUiPopover.tsx +2 -4
- package/src/lib/ui/components/primitives/TldrawUiSlider.tsx +1 -6
- package/src/lib/ui/components/primitives/TldrawUiToolbar.tsx +12 -56
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.tsx +2 -2
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuContext.tsx +1 -0
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuGroup.tsx +16 -29
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +23 -224
- package/src/lib/ui/context/TldrawUiContextProvider.tsx +20 -23
- package/src/lib/ui/context/actions.tsx +9 -59
- package/src/lib/ui/context/events.tsx +2 -6
- package/src/lib/ui/hooks/menu-hooks.ts +0 -1
- package/src/lib/ui/hooks/useKeyboardShortcuts.ts +2 -3
- package/src/lib/ui/hooks/useTools.tsx +11 -142
- package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +0 -11
- package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +0 -11
- package/src/lib/ui/kbd-utils.ts +1 -2
- package/src/lib/ui/version.ts +3 -3
- package/src/lib/ui.css +314 -414
- package/src/lib/utils/excalidraw/__snapshots__/putExcalidrawContent.test.tsx.snap +7 -21
- package/src/lib/utils/excalidraw/putExcalidrawContent.ts +1 -1
- package/src/lib/utils/tldr/__snapshots__/buildFromV1Document.test.ts.snap +7 -28
- package/src/lib/utils/tldr/buildFromV1Document.ts +1 -2
- package/src/test/A11y.test.tsx +2 -3
- package/src/test/ClickManager.test.ts +6 -7
- package/src/test/Editor.test.tsx +20 -21
- package/src/test/EraserTool.test.ts +13 -184
- package/src/test/HandTool.test.ts +9 -10
- package/src/test/HighlightShape.test.ts +1 -2
- package/src/test/SelectTool.test.ts +13 -40
- package/src/test/TLUserPreferences.test.ts +3 -4
- package/src/test/TestEditor.ts +15 -13
- package/src/test/TldrawEditor.test.tsx +10 -11
- package/src/test/ZoomTool.test.ts +6 -7
- 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 +10 -17
- package/src/test/bindings.test.tsx +37 -24
- package/src/test/bookmark-shapes.test.ts +8 -1
- package/src/test/commands/__snapshots__/getSvgString.test.ts.snap +7 -23
- 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 +24 -25
- package/src/test/commands/animationSpeed.test.ts +1 -2
- package/src/test/commands/centerOnPoint.test.ts +2 -3
- package/src/test/commands/clipboard.test.ts +2 -3
- package/src/test/commands/createShapes.test.ts +1 -2
- package/src/test/commands/deletePage.test.ts +1 -84
- package/src/test/commands/deleteShapes.test.ts +1 -2
- package/src/test/commands/distributeShapes.test.tsx +10 -11
- package/src/test/commands/getSvgString.test.ts +1 -2
- package/src/test/commands/packShapes.test.ts +4 -5
- package/src/test/commands/resizeShape.test.ts +1 -2
- package/src/test/commands/rotateShapes.test.ts +6 -7
- package/src/test/commands/setCamera.test.ts +3 -4
- package/src/test/commands/setCurrentPage.test.ts +2 -3
- package/src/test/commands/stackShapes.test.ts +10 -11
- package/src/test/commands/stretch.test.tsx +12 -13
- package/src/test/createDeepLink.test.tsx +1 -2
- package/src/test/cropping.test.ts +2 -3
- package/src/test/drawing.test.ts +1 -2
- package/src/test/flipShapes.test.ts +3 -4
- package/src/test/frames.test.ts +24 -25
- package/src/test/getCulledShapes.test.tsx +2 -3
- package/src/test/groups.test.tsx +2 -2
- package/src/test/handleDeepLink.test.tsx +1 -2
- package/src/test/maxShapes.test.ts +2 -3
- package/src/test/modifiers.test.ts +4 -5
- package/src/test/navigation.test.ts +9 -264
- package/src/test/panning.test.ts +1 -2
- package/src/test/perf/perf.test.ts +1 -2
- package/src/test/registerDeepLinkListener.test.tsx +9 -10
- package/src/test/resizing.test.ts +38 -39
- package/src/test/select.test.tsx +3 -4
- package/src/test/selection-omnibus.test.ts +10 -11
- package/src/test/shapeutils.test.ts +48 -398
- package/src/test/translating.test.ts +9 -10
- package/tldraw.css +627 -726
- package/dist-cjs/lib/ui/components/AccessibilityMenu.js +0 -35
- package/dist-cjs/lib/ui/components/AccessibilityMenu.js.map +0 -7
- package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +0 -268
- package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +0 -7
- package/dist-cjs/lib/ui/components/primitives/layout.js +0 -76
- package/dist-cjs/lib/ui/components/primitives/layout.js.map +0 -7
- package/dist-esm/lib/ui/components/AccessibilityMenu.mjs +0 -19
- package/dist-esm/lib/ui/components/AccessibilityMenu.mjs.map +0 -7
- package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +0 -245
- package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +0 -7
- package/dist-esm/lib/ui/components/primitives/layout.mjs +0 -46
- package/dist-esm/lib/ui/components/primitives/layout.mjs.map +0 -7
- package/src/lib/ui/components/AccessibilityMenu.tsx +0 -20
- package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +0 -327
- package/src/lib/ui/components/primitives/layout.tsx +0 -107
- package/src/test/inner-outer-margin.test.ts +0 -315
package/dist-cjs/index.d.ts
CHANGED
|
@@ -13,13 +13,11 @@ import { CSSProperties } from 'react';
|
|
|
13
13
|
import { Editor } from '@tldraw/editor';
|
|
14
14
|
import { Extension } from '@tiptap/core';
|
|
15
15
|
import { Extensions } from '@tiptap/core';
|
|
16
|
-
import { ForwardRefExoticComponent } from 'react';
|
|
17
16
|
import { Geometry2d } from '@tldraw/editor';
|
|
18
17
|
import { Geometry2dFilters } from '@tldraw/editor';
|
|
19
18
|
import { Geometry2dOptions } from '@tldraw/editor';
|
|
20
19
|
import { Group2d } from '@tldraw/editor';
|
|
21
20
|
import { HandleSnapGeometry } from '@tldraw/editor';
|
|
22
|
-
import { HTMLAttributes } from 'react';
|
|
23
21
|
import { IndexKey } from '@tldraw/editor';
|
|
24
22
|
import { JsonObject } from '@tldraw/editor';
|
|
25
23
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
@@ -39,7 +37,6 @@ import { ReadonlySharedStyleMap } from '@tldraw/editor';
|
|
|
39
37
|
import { RecordProps } from '@tldraw/editor';
|
|
40
38
|
import { Rectangle2d } from '@tldraw/editor';
|
|
41
39
|
import { RecursivePartial } from '@tldraw/editor';
|
|
42
|
-
import { RefAttributes } from 'react';
|
|
43
40
|
import { RefObject } from 'react';
|
|
44
41
|
import { Result } from '@tldraw/editor';
|
|
45
42
|
import { RichTextFontVisitorState } from '@tldraw/editor';
|
|
@@ -151,9 +148,6 @@ export declare interface A11yProviderProps {
|
|
|
151
148
|
children: React.ReactNode;
|
|
152
149
|
}
|
|
153
150
|
|
|
154
|
-
/** @public @react */
|
|
155
|
-
export declare function AccessibilityMenu(): JSX_2.Element;
|
|
156
|
-
|
|
157
151
|
/** @public */
|
|
158
152
|
export declare interface ActionsProviderProps {
|
|
159
153
|
overrides?(editor: Editor, actions: TLUiActionsContextType, helpers: TLUiOverrideHelpers): TLUiActionsContextType;
|
|
@@ -310,6 +304,7 @@ export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
|
|
|
310
304
|
canEdit(): boolean;
|
|
311
305
|
canBind({ toShapeType }: TLShapeUtilCanBindOpts<TLArrowShape>): boolean;
|
|
312
306
|
canSnap(): boolean;
|
|
307
|
+
canTabTo(shape: TLArrowShape): boolean;
|
|
313
308
|
hideResizeHandles(): boolean;
|
|
314
309
|
hideRotateHandle(): boolean;
|
|
315
310
|
hideSelectionBoundsBg(): boolean;
|
|
@@ -360,6 +355,7 @@ export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
|
|
|
360
355
|
component(shape: TLArrowShape): JSX_2.Element | null;
|
|
361
356
|
indicator(shape: TLArrowShape): JSX_2.Element | null;
|
|
362
357
|
onEditStart(shape: TLArrowShape): void;
|
|
358
|
+
onEditEnd(shape: TLArrowShape): void;
|
|
363
359
|
toSvg(shape: TLArrowShape, ctx: SvgExportContext): JSX_2.Element;
|
|
364
360
|
getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
|
|
365
361
|
getInterpolatedProps(startShape: TLArrowShape, endShape: TLArrowShape, progress: number): TLArrowShapeProps;
|
|
@@ -919,7 +915,7 @@ export declare const DefaultHelpMenu: NamedExoticComponent<TLUiHelpMenuProps>;
|
|
|
919
915
|
export declare function DefaultHelpMenuContent(): JSX_2.Element;
|
|
920
916
|
|
|
921
917
|
/** @public @react */
|
|
922
|
-
export declare
|
|
918
|
+
export declare const DefaultImageToolbar: NamedExoticComponent<TLUiImageToolbarProps>;
|
|
923
919
|
|
|
924
920
|
/** @public @react */
|
|
925
921
|
export declare const DefaultImageToolbarContent: NamedExoticComponent<DefaultImageToolbarContentProps>;
|
|
@@ -1017,11 +1013,6 @@ export declare function DefaultToolbarContent(): JSX_2.Element;
|
|
|
1017
1013
|
/** @public */
|
|
1018
1014
|
export declare interface DefaultToolbarProps {
|
|
1019
1015
|
children?: ReactNode;
|
|
1020
|
-
orientation?: 'horizontal' | 'vertical';
|
|
1021
|
-
minItems?: number;
|
|
1022
|
-
minSizePx?: number;
|
|
1023
|
-
maxItems?: number;
|
|
1024
|
-
maxSizePx?: number;
|
|
1025
1016
|
}
|
|
1026
1017
|
|
|
1027
1018
|
/** @public */
|
|
@@ -1121,6 +1112,7 @@ export declare class DrawShapeUtil extends ShapeUtil<TLDrawShape> {
|
|
|
1121
1112
|
static props: RecordProps<TLDrawShape>;
|
|
1122
1113
|
static migrations: TLPropsMigrations;
|
|
1123
1114
|
options: DrawShapeOptions;
|
|
1115
|
+
canTabTo(): boolean;
|
|
1124
1116
|
hideResizeHandles(shape: TLDrawShape): boolean;
|
|
1125
1117
|
hideRotateHandle(shape: TLDrawShape): boolean;
|
|
1126
1118
|
hideSelectionBoundsFg(shape: TLDrawShape): boolean;
|
|
@@ -1750,9 +1742,6 @@ export declare function getArrowTerminalsInArrowSpace(editor: Editor, shape: TLA
|
|
|
1750
1742
|
start: Vec;
|
|
1751
1743
|
};
|
|
1752
1744
|
|
|
1753
|
-
/** @public */
|
|
1754
|
-
export declare function getAssetInfo(file: File, options: TLDefaultExternalContentHandlerOpts, assetId?: TLAssetId): Promise<TLImageAsset | TLVideoAsset>;
|
|
1755
|
-
|
|
1756
1745
|
/** @public */
|
|
1757
1746
|
export declare function getCropBox<T extends ShapeWithCrop>(shape: T, info: TLCropInfo<T>, opts?: CropBoxOptions): {
|
|
1758
1747
|
id: TLShapeId;
|
|
@@ -1774,35 +1763,9 @@ export declare function getDefaultCrop(): TLShapeCrop;
|
|
|
1774
1763
|
*/
|
|
1775
1764
|
export declare function getEmbedInfo(definitions: readonly TLEmbedDefinition[], inputUrl: string): TLEmbedResult;
|
|
1776
1765
|
|
|
1777
|
-
/** @public */
|
|
1778
|
-
export declare function getHitShapeOnCanvasPointerDown(editor: Editor, hitLabels?: boolean): TLShape | undefined;
|
|
1779
|
-
|
|
1780
1766
|
/** @public */
|
|
1781
1767
|
export declare function getMediaAssetInfoPartial(file: File, assetId: TLAssetId, isImageType: boolean, isVideoType: boolean, maxImageDimension?: number): Promise<TLImageAsset | TLVideoAsset>;
|
|
1782
1768
|
|
|
1783
|
-
/**
|
|
1784
|
-
* ## getStrokePoints
|
|
1785
|
-
*
|
|
1786
|
-
* Get an array of points as objects with an adjusted point, pressure, vector, distance, and
|
|
1787
|
-
* runningLength.
|
|
1788
|
-
*
|
|
1789
|
-
* @param points - An array of points (as `[x, y, pressure]` or `{x, y, pressure}`). Pressure is
|
|
1790
|
-
* optional in both cases.
|
|
1791
|
-
* @param options - An object with options.
|
|
1792
|
-
* @public
|
|
1793
|
-
*/
|
|
1794
|
-
export declare function getStrokePoints(rawInputPoints: VecLike[], options?: StrokeOptions): StrokePoint[];
|
|
1795
|
-
|
|
1796
|
-
/**
|
|
1797
|
-
* Turn an array of stroke points into a path of quadradic curves.
|
|
1798
|
-
*
|
|
1799
|
-
* @param points - The stroke points returned from perfect-freehand
|
|
1800
|
-
* @param closed - Whether the shape is closed
|
|
1801
|
-
*
|
|
1802
|
-
* @public
|
|
1803
|
-
*/
|
|
1804
|
-
export declare function getSvgPathFromStrokePoints(points: StrokePoint[], closed?: boolean): string;
|
|
1805
|
-
|
|
1806
1769
|
/**
|
|
1807
1770
|
* Original (uncropped) width and height of shape.
|
|
1808
1771
|
*
|
|
@@ -1836,9 +1799,6 @@ export declare class HandTool extends StateNode {
|
|
|
1836
1799
|
/** @public @react */
|
|
1837
1800
|
export declare function HandToolbarItem(): JSX_2.Element;
|
|
1838
1801
|
|
|
1839
|
-
/** @public @react */
|
|
1840
|
-
export declare function HeartToolbarItem(): JSX_2.Element;
|
|
1841
|
-
|
|
1842
1802
|
/** @public @react */
|
|
1843
1803
|
export declare function HexagonToolbarItem(): JSX_2.Element;
|
|
1844
1804
|
|
|
@@ -1870,6 +1830,7 @@ export declare class HighlightShapeUtil extends ShapeUtil<TLHighlightShape> {
|
|
|
1870
1830
|
static props: RecordProps<TLHighlightShape>;
|
|
1871
1831
|
static migrations: TLPropsMigrations;
|
|
1872
1832
|
options: HighlightShapeOptions;
|
|
1833
|
+
canTabTo(): boolean;
|
|
1873
1834
|
hideResizeHandles(shape: TLHighlightShape): boolean;
|
|
1874
1835
|
hideRotateHandle(shape: TLHighlightShape): boolean;
|
|
1875
1836
|
hideSelectionBoundsFg(shape: TLHighlightShape): boolean;
|
|
@@ -1946,6 +1907,7 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
|
|
|
1946
1907
|
static type: "line";
|
|
1947
1908
|
static props: RecordProps<TLLineShape>;
|
|
1948
1909
|
static migrations: TLPropsMigrations;
|
|
1910
|
+
canTabTo(): boolean;
|
|
1949
1911
|
hideResizeHandles(): boolean;
|
|
1950
1912
|
hideRotateHandle(): boolean;
|
|
1951
1913
|
hideSelectionBoundsFg(): boolean;
|
|
@@ -1993,34 +1955,6 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
|
|
|
1993
1955
|
typeName: "shape";
|
|
1994
1956
|
x: number;
|
|
1995
1957
|
y: number;
|
|
1996
|
-
};
|
|
1997
|
-
onHandleDragStart(shape: TLLineShape, { handle }: TLHandleDragInfo<TLLineShape>): {
|
|
1998
|
-
id: TLShapeId;
|
|
1999
|
-
index: IndexKey;
|
|
2000
|
-
isLocked: boolean;
|
|
2001
|
-
meta: JsonObject;
|
|
2002
|
-
opacity: TLOpacityType;
|
|
2003
|
-
parentId: TLParentId;
|
|
2004
|
-
props: {
|
|
2005
|
-
color: TLDefaultColorStyle;
|
|
2006
|
-
dash: TLDefaultDashStyle;
|
|
2007
|
-
points: {
|
|
2008
|
-
[x: string]: {
|
|
2009
|
-
id: IndexKey;
|
|
2010
|
-
index: IndexKey;
|
|
2011
|
-
x: number;
|
|
2012
|
-
y: number;
|
|
2013
|
-
} | TLLineShapePoint;
|
|
2014
|
-
};
|
|
2015
|
-
scale: number;
|
|
2016
|
-
size: TLDefaultSizeStyle;
|
|
2017
|
-
spline: TLLineShapeSplineStyle;
|
|
2018
|
-
};
|
|
2019
|
-
rotation: number;
|
|
2020
|
-
type: "line";
|
|
2021
|
-
typeName: "shape";
|
|
2022
|
-
x: number;
|
|
2023
|
-
y: number;
|
|
2024
1958
|
} | undefined;
|
|
2025
1959
|
component(shape: TLLineShape): JSX_2.Element;
|
|
2026
1960
|
indicator(shape: TLLineShape): JSX_2.Element;
|
|
@@ -2034,9 +1968,6 @@ export declare function LineToolbarItem(): JSX_2.Element;
|
|
|
2034
1968
|
|
|
2035
1969
|
/* Excluded from this release type: LineToPathBuilderCommand */
|
|
2036
1970
|
|
|
2037
|
-
/** @public @react */
|
|
2038
|
-
export declare function LockGroup(): JSX_2.Element;
|
|
2039
|
-
|
|
2040
1971
|
/** @public @react */
|
|
2041
1972
|
export declare function MiscMenuGroup(): JSX_2.Element;
|
|
2042
1973
|
|
|
@@ -2151,29 +2082,6 @@ export declare function NoteToolbarItem(): JSX_2.Element;
|
|
|
2151
2082
|
/** @public @react */
|
|
2152
2083
|
export declare function OfflineIndicator(): JSX_2.Element;
|
|
2153
2084
|
|
|
2154
|
-
/**
|
|
2155
|
-
* A helper method to use in {@link TLUiToolItem#onDragStart} to create a shape by dragging it from
|
|
2156
|
-
* the toolbar.
|
|
2157
|
-
* @public
|
|
2158
|
-
*/
|
|
2159
|
-
export declare function onDragFromToolbarToCreateShape(editor: Editor, info: TLPointerEventInfo, opts: OnDragFromToolbarToCreateShapesOpts): void;
|
|
2160
|
-
|
|
2161
|
-
/**
|
|
2162
|
-
* Options for {@link onDragFromToolbarToCreateShape}.
|
|
2163
|
-
* @public
|
|
2164
|
-
*/
|
|
2165
|
-
export declare interface OnDragFromToolbarToCreateShapesOpts {
|
|
2166
|
-
/**
|
|
2167
|
-
* Create the shape being dragged. You don't need to worry about positioning it, as it'll be
|
|
2168
|
-
* immediately updated with the correct position.
|
|
2169
|
-
*/
|
|
2170
|
-
createShape(id: TLShapeId): void;
|
|
2171
|
-
/**
|
|
2172
|
-
* Called once the drag interaction has finished.
|
|
2173
|
-
*/
|
|
2174
|
-
onDragEnd?(id: TLShapeId): void;
|
|
2175
|
-
}
|
|
2176
|
-
|
|
2177
2085
|
/** @public @react */
|
|
2178
2086
|
export declare function OpacitySlider(): JSX_2.Element | null;
|
|
2179
2087
|
|
|
@@ -2181,17 +2089,11 @@ export declare function OpacitySlider(): JSX_2.Element | null;
|
|
|
2181
2089
|
export declare function OvalToolbarItem(): JSX_2.Element;
|
|
2182
2090
|
|
|
2183
2091
|
/** @public @react */
|
|
2184
|
-
export declare function OverflowingToolbar({ children
|
|
2092
|
+
export declare function OverflowingToolbar({ children }: OverflowingToolbarProps): JSX_2.Element;
|
|
2185
2093
|
|
|
2186
2094
|
/** @public */
|
|
2187
2095
|
export declare interface OverflowingToolbarProps {
|
|
2188
2096
|
children: React.ReactNode;
|
|
2189
|
-
orientation: 'horizontal' | 'vertical';
|
|
2190
|
-
sizingParentClassName: string;
|
|
2191
|
-
minItems: number;
|
|
2192
|
-
minSizePx: number;
|
|
2193
|
-
maxItems: number;
|
|
2194
|
-
maxSizePx: number;
|
|
2195
2097
|
}
|
|
2196
2098
|
|
|
2197
2099
|
/** @public @react */
|
|
@@ -2248,7 +2150,6 @@ export declare class PathBuilder {
|
|
|
2248
2150
|
circularArcTo(radius: number, largeArcFlag: boolean, sweepFlag: boolean, x2: number, y2: number, opts?: PathBuilderCommandOpts): this;
|
|
2249
2151
|
arcTo(rx: number, ry: number, largeArcFlag: boolean, sweepFlag: boolean, xAxisRotationRadians: number, x2: number, y2: number, opts?: PathBuilderCommandOpts): this;
|
|
2250
2152
|
cubicBezierTo(x: number, y: number, cp1X: number, cp1Y: number, cp2X: number, cp2Y: number, opts?: PathBuilderCommandOpts): this;
|
|
2251
|
-
private cubicBezierToWithResolution;
|
|
2252
2153
|
close(): this;
|
|
2253
2154
|
toD(opts?: PathBuilderToDOpts): string;
|
|
2254
2155
|
toSvg(opts: PathBuilderOpts): JSX_2.Element;
|
|
@@ -2514,7 +2415,7 @@ export declare interface RichTextLabelProps {
|
|
|
2514
2415
|
*
|
|
2515
2416
|
* @public @react
|
|
2516
2417
|
*/
|
|
2517
|
-
export declare function RichTextSVG({ bounds, richText, fontSize, font, align, verticalAlign, wrap, labelColor, padding,
|
|
2418
|
+
export declare function RichTextSVG({ bounds, richText, fontSize, font, align, verticalAlign, wrap, labelColor, padding, }: RichTextSVGProps): JSX_2.Element;
|
|
2518
2419
|
|
|
2519
2420
|
/** @public */
|
|
2520
2421
|
export declare interface RichTextSVGProps {
|
|
@@ -2527,7 +2428,6 @@ export declare interface RichTextSVGProps {
|
|
|
2527
2428
|
wrap?: boolean;
|
|
2528
2429
|
labelColor: string;
|
|
2529
2430
|
padding: number;
|
|
2530
|
-
showTextOutline?: boolean;
|
|
2531
2431
|
}
|
|
2532
2432
|
|
|
2533
2433
|
/** @public @react */
|
|
@@ -2580,54 +2480,6 @@ export declare function StarToolbarItem(): JSX_2.Element;
|
|
|
2580
2480
|
/** @public */
|
|
2581
2481
|
export declare const STROKE_SIZES: Record<TLDefaultSizeStyle, number>;
|
|
2582
2482
|
|
|
2583
|
-
/**
|
|
2584
|
-
* The options object for `getStroke` or `getStrokePoints`.
|
|
2585
|
-
*
|
|
2586
|
-
* @public
|
|
2587
|
-
*/
|
|
2588
|
-
export declare interface StrokeOptions {
|
|
2589
|
-
/** The base size (diameter) of the stroke. */
|
|
2590
|
-
size?: number;
|
|
2591
|
-
/** The effect of pressure on the stroke's size. */
|
|
2592
|
-
thinning?: number;
|
|
2593
|
-
/** How much to soften the stroke's edges. */
|
|
2594
|
-
smoothing?: number;
|
|
2595
|
-
streamline?: number;
|
|
2596
|
-
/** An easing function to apply to each point's pressure. */
|
|
2597
|
-
easing?(pressure: number): number;
|
|
2598
|
-
/** Whether to simulate pressure based on velocity. */
|
|
2599
|
-
simulatePressure?: boolean;
|
|
2600
|
-
/** Cap, taper and easing for the start of the line. */
|
|
2601
|
-
start?: {
|
|
2602
|
-
cap?: boolean;
|
|
2603
|
-
easing?(distance: number): number;
|
|
2604
|
-
taper?: boolean | number;
|
|
2605
|
-
};
|
|
2606
|
-
/** Cap, taper and easing for the end of the line. */
|
|
2607
|
-
end?: {
|
|
2608
|
-
cap?: boolean;
|
|
2609
|
-
easing?(distance: number): number;
|
|
2610
|
-
taper?: boolean | number;
|
|
2611
|
-
};
|
|
2612
|
-
/** Whether to handle the points as a completed stroke. */
|
|
2613
|
-
last?: boolean;
|
|
2614
|
-
}
|
|
2615
|
-
|
|
2616
|
-
/**
|
|
2617
|
-
* The points returned by `getStrokePoints`, and the input for `getStrokeOutlinePoints`
|
|
2618
|
-
*
|
|
2619
|
-
* @public
|
|
2620
|
-
*/
|
|
2621
|
-
export declare interface StrokePoint {
|
|
2622
|
-
point: Vec;
|
|
2623
|
-
input: Vec;
|
|
2624
|
-
vector: Vec;
|
|
2625
|
-
pressure: number;
|
|
2626
|
-
distance: number;
|
|
2627
|
-
runningLength: number;
|
|
2628
|
-
radius: number;
|
|
2629
|
-
}
|
|
2630
|
-
|
|
2631
2483
|
/** @public */
|
|
2632
2484
|
export declare interface StylePickerSetProps {
|
|
2633
2485
|
styles: ReadonlySharedStyleMap;
|
|
@@ -2635,7 +2487,7 @@ export declare interface StylePickerSetProps {
|
|
|
2635
2487
|
|
|
2636
2488
|
/** @public */
|
|
2637
2489
|
export declare type StyleValuesForUi<T> = readonly {
|
|
2638
|
-
readonly icon: string
|
|
2490
|
+
readonly icon: string;
|
|
2639
2491
|
readonly value: T;
|
|
2640
2492
|
}[];
|
|
2641
2493
|
|
|
@@ -2892,17 +2744,6 @@ export declare interface TldrawBaseProps extends TldrawUiProps, TldrawEditorBase
|
|
|
2892
2744
|
embeds?: TLEmbedDefinition[];
|
|
2893
2745
|
}
|
|
2894
2746
|
|
|
2895
|
-
/** @public @react */
|
|
2896
|
-
export declare function TldrawCropHandles({ size, width, height, hideAlternateHandles, }: TldrawCropHandlesProps): JSX_2.Element;
|
|
2897
|
-
|
|
2898
|
-
/** @public */
|
|
2899
|
-
export declare interface TldrawCropHandlesProps {
|
|
2900
|
-
size: number;
|
|
2901
|
-
width: number;
|
|
2902
|
-
height: number;
|
|
2903
|
-
hideAlternateHandles: boolean;
|
|
2904
|
-
}
|
|
2905
|
-
|
|
2906
2747
|
/** @public */
|
|
2907
2748
|
export declare interface TldrawFile {
|
|
2908
2749
|
tldrawFileFormatVersion: number;
|
|
@@ -3026,13 +2867,6 @@ export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps):
|
|
|
3026
2867
|
/** @public */
|
|
3027
2868
|
export declare const TldrawUiButtonPicker: <T extends string>(props: TLUiButtonPickerProps<T>) => ReactElement;
|
|
3028
2869
|
|
|
3029
|
-
/**
|
|
3030
|
-
* A column, usually of UI controls like buttons, select dropdown, checkboxes, etc.
|
|
3031
|
-
*
|
|
3032
|
-
* @public @react
|
|
3033
|
-
*/
|
|
3034
|
-
export declare const TldrawUiColumn: ForwardRefExoticComponent<TLUiLayoutProps & RefAttributes<HTMLDivElement>>;
|
|
3035
|
-
|
|
3036
2870
|
/** @public @react */
|
|
3037
2871
|
export declare function TldrawUiComponentsProvider({ overrides, children, }: TLUiComponentsProviderProps): JSX_2.Element;
|
|
3038
2872
|
|
|
@@ -3095,13 +2929,6 @@ export declare function TldrawUiDropdownMenuTrigger({ children, ...rest }: TLUiD
|
|
|
3095
2929
|
/** @public @react */
|
|
3096
2930
|
export declare function TldrawUiEventsProvider({ onEvent, children }: EventsProviderProps): JSX_2.Element;
|
|
3097
2931
|
|
|
3098
|
-
/**
|
|
3099
|
-
* A tight grid 4 elements wide, usually of UI controls like buttons, select dropdown, checkboxes,
|
|
3100
|
-
* etc.
|
|
3101
|
-
*
|
|
3102
|
-
* @public @react */
|
|
3103
|
-
export declare const TldrawUiGrid: ForwardRefExoticComponent<TLUiLayoutProps & RefAttributes<HTMLDivElement>>;
|
|
3104
|
-
|
|
3105
2932
|
/** @public @react */
|
|
3106
2933
|
export declare const TldrawUiIcon: NamedExoticComponent<TLUiIconProps>;
|
|
3107
2934
|
|
|
@@ -3127,7 +2954,7 @@ export declare function TldrawUiMenuContextProvider({ type, sourceId, children,
|
|
|
3127
2954
|
export declare function TldrawUiMenuGroup({ id, label, className, children }: TLUiMenuGroupProps): boolean | JSX_2.Element | Iterable<ReactNode> | null | number | string | undefined;
|
|
3128
2955
|
|
|
3129
2956
|
/** @public @react */
|
|
3130
|
-
export declare function TldrawUiMenuItem<TranslationKey extends string = string, IconType extends string = string>({ disabled, spinner, readonlyOk, id, kbd, label, icon, iconLeft, onSelect, noClose, isSelected,
|
|
2957
|
+
export declare function TldrawUiMenuItem<TranslationKey extends string = string, IconType extends string = string>({ disabled, spinner, readonlyOk, id, kbd, label, icon, iconLeft, onSelect, noClose, isSelected, }: TLUiMenuItemProps<TranslationKey, IconType>): JSX_2.Element | null;
|
|
3131
2958
|
|
|
3132
2959
|
/** @public @react */
|
|
3133
2960
|
export declare function TldrawUiMenuSubmenu<Translation extends string = string>({ id, disabled, label, size, children, }: TLUiMenuSubmenuProps<Translation>): boolean | JSX_2.Element | Iterable<ReactNode> | null | number | string | undefined;
|
|
@@ -3135,24 +2962,8 @@ export declare function TldrawUiMenuSubmenu<Translation extends string = string>
|
|
|
3135
2962
|
/** @public @react */
|
|
3136
2963
|
export declare function TldrawUiMenuToolItem({ toolId, ...rest }: TLUiMenuToolItemProps): JSX_2.Element | null;
|
|
3137
2964
|
|
|
3138
|
-
/** @public */
|
|
3139
|
-
export declare interface TldrawUiOrientationContext {
|
|
3140
|
-
orientation: 'horizontal' | 'vertical';
|
|
3141
|
-
tooltipSide: 'bottom' | 'left' | 'right' | 'top';
|
|
3142
|
-
}
|
|
3143
|
-
|
|
3144
|
-
/** @public @react */
|
|
3145
|
-
export declare function TldrawUiOrientationProvider({ children, orientation, tooltipSide, }: TldrawUiOrientationProviderProps): JSX_2.Element;
|
|
3146
|
-
|
|
3147
|
-
/** @public */
|
|
3148
|
-
export declare interface TldrawUiOrientationProviderProps {
|
|
3149
|
-
children: ReactNode;
|
|
3150
|
-
orientation: 'horizontal' | 'vertical';
|
|
3151
|
-
tooltipSide?: 'bottom' | 'left' | 'right' | 'top';
|
|
3152
|
-
}
|
|
3153
|
-
|
|
3154
2965
|
/** @public @react */
|
|
3155
|
-
export declare function TldrawUiPopover({ id, children, onOpenChange, open
|
|
2966
|
+
export declare function TldrawUiPopover({ id, children, onOpenChange, open }: TLUiPopoverProps): JSX_2.Element;
|
|
3156
2967
|
|
|
3157
2968
|
/** @public @react */
|
|
3158
2969
|
export declare function TldrawUiPopoverContent({ side, children, align, sideOffset, alignOffset, disableEscapeKeyDown, autoFocusFirstButton, }: TLUiPopoverContentProps): JSX_2.Element;
|
|
@@ -3182,13 +2993,6 @@ export declare interface TldrawUiProps extends TLUiContextProviderProps {
|
|
|
3182
2993
|
assetUrls?: TLUiAssetUrlOverrides;
|
|
3183
2994
|
}
|
|
3184
2995
|
|
|
3185
|
-
/**
|
|
3186
|
-
* A row, usually of UI controls like buttons, select dropdown, checkboxes, etc.
|
|
3187
|
-
*
|
|
3188
|
-
* @public @react
|
|
3189
|
-
*/
|
|
3190
|
-
export declare const TldrawUiRow: ForwardRefExoticComponent<TLUiLayoutProps & RefAttributes<HTMLDivElement>>;
|
|
3191
|
-
|
|
3192
2996
|
/** @public @react */
|
|
3193
2997
|
export declare const TldrawUiSlider: React_3.ForwardRefExoticComponent<TLUiSliderProps & React_3.RefAttributes<HTMLDivElement>>;
|
|
3194
2998
|
|
|
@@ -3205,29 +3009,7 @@ export declare const TldrawUiToolbarButton: React_3.ForwardRefExoticComponent<TL
|
|
|
3205
3009
|
export declare const TldrawUiToolbarToggleGroup: ({ children, className, type, ...props }: TLUiToolbarToggleGroupProps) => JSX_2.Element;
|
|
3206
3010
|
|
|
3207
3011
|
/** @public @react */
|
|
3208
|
-
export declare const TldrawUiToolbarToggleItem: ({ children, className, type, value,
|
|
3209
|
-
|
|
3210
|
-
/** @public @react */
|
|
3211
|
-
export declare const TldrawUiTooltip: React_3.ForwardRefExoticComponent<TldrawUiTooltipProps & React_3.RefAttributes<HTMLButtonElement>>;
|
|
3212
|
-
|
|
3213
|
-
/** @public */
|
|
3214
|
-
export declare interface TldrawUiTooltipProps {
|
|
3215
|
-
children: React_3.ReactNode;
|
|
3216
|
-
content?: React_3.ReactNode | string;
|
|
3217
|
-
side?: 'bottom' | 'left' | 'right' | 'top';
|
|
3218
|
-
sideOffset?: number;
|
|
3219
|
-
disabled?: boolean;
|
|
3220
|
-
showOnMobile?: boolean;
|
|
3221
|
-
delayDuration?: number;
|
|
3222
|
-
}
|
|
3223
|
-
|
|
3224
|
-
/** @public @react */
|
|
3225
|
-
export declare function TldrawUiTooltipProvider({ children }: TldrawUiTooltipProviderProps): JSX_2.Element;
|
|
3226
|
-
|
|
3227
|
-
/** @public */
|
|
3228
|
-
export declare interface TldrawUiTooltipProviderProps {
|
|
3229
|
-
children: React_3.ReactNode;
|
|
3230
|
-
}
|
|
3012
|
+
export declare const TldrawUiToolbarToggleItem: ({ children, className, type, value, ...props }: TLUiToolbarToggleItemProps) => JSX_2.Element;
|
|
3231
3013
|
|
|
3232
3014
|
/* Excluded from this release type: TldrawUiTranslationProvider */
|
|
3233
3015
|
|
|
@@ -3342,7 +3124,7 @@ export declare interface TLUiA11yContextType {
|
|
|
3342
3124
|
|
|
3343
3125
|
/** @public */
|
|
3344
3126
|
export declare interface TLUiActionItem<TransationKey extends string = string, IconType extends string = string> {
|
|
3345
|
-
icon?: IconType
|
|
3127
|
+
icon?: IconType;
|
|
3346
3128
|
id: string;
|
|
3347
3129
|
kbd?: string;
|
|
3348
3130
|
label?: {
|
|
@@ -3350,7 +3132,6 @@ export declare interface TLUiActionItem<TransationKey extends string = string, I
|
|
|
3350
3132
|
} | TransationKey;
|
|
3351
3133
|
readonlyOk?: boolean;
|
|
3352
3134
|
checkbox?: boolean;
|
|
3353
|
-
isRequiredA11yAction?: boolean;
|
|
3354
3135
|
onSelect(source: TLUiEventSource): Promise<void> | void;
|
|
3355
3136
|
}
|
|
3356
3137
|
|
|
@@ -3379,7 +3160,7 @@ export declare interface TLUiButtonCheckProps {
|
|
|
3379
3160
|
|
|
3380
3161
|
/** @public */
|
|
3381
3162
|
export declare interface TLUiButtonIconProps {
|
|
3382
|
-
icon: string
|
|
3163
|
+
icon: string;
|
|
3383
3164
|
small?: boolean;
|
|
3384
3165
|
invertIcon?: boolean;
|
|
3385
3166
|
}
|
|
@@ -3693,12 +3474,8 @@ export declare interface TLUiEventMap {
|
|
|
3693
3474
|
'delete-shapes': null;
|
|
3694
3475
|
'select-all-shapes': null;
|
|
3695
3476
|
'select-none-shapes': null;
|
|
3696
|
-
'rotate-ccw':
|
|
3697
|
-
|
|
3698
|
-
};
|
|
3699
|
-
'rotate-cw': {
|
|
3700
|
-
fine: boolean;
|
|
3701
|
-
};
|
|
3477
|
+
'rotate-ccw': null;
|
|
3478
|
+
'rotate-cw': null;
|
|
3702
3479
|
'zoom-in': {
|
|
3703
3480
|
towardsCursor: boolean;
|
|
3704
3481
|
};
|
|
@@ -3741,8 +3518,6 @@ export declare interface TLUiEventMap {
|
|
|
3741
3518
|
'toggle-paste-at-cursor': null;
|
|
3742
3519
|
'toggle-lock': null;
|
|
3743
3520
|
'toggle-reduce-motion': null;
|
|
3744
|
-
'toggle-keyboard-shortcuts': null;
|
|
3745
|
-
'toggle-ui-labels': null;
|
|
3746
3521
|
'toggle-edge-scrolling': null;
|
|
3747
3522
|
'color-scheme': {
|
|
3748
3523
|
value: string;
|
|
@@ -3765,12 +3540,8 @@ export declare interface TLUiEventMap {
|
|
|
3765
3540
|
'open-context-menu': null;
|
|
3766
3541
|
'adjust-shape-styles': null;
|
|
3767
3542
|
'copy-link': null;
|
|
3768
|
-
'drag-tool': {
|
|
3769
|
-
id: string;
|
|
3770
|
-
};
|
|
3771
3543
|
'image-replace': null;
|
|
3772
3544
|
'video-replace': null;
|
|
3773
|
-
'open-kbd-shortcuts': null;
|
|
3774
3545
|
'rich-text': {
|
|
3775
3546
|
operation: 'bold' | 'bulletList' | 'heading' | 'link-edit' | 'link-remove' | 'link-visit' | 'link' | 'strike';
|
|
3776
3547
|
};
|
|
@@ -3790,12 +3561,9 @@ export declare interface TLUiHelpMenuProps {
|
|
|
3790
3561
|
children?: ReactNode;
|
|
3791
3562
|
}
|
|
3792
3563
|
|
|
3793
|
-
/** @public */
|
|
3794
|
-
export declare type TLUiIconJsx = ReactElement<React.HTMLAttributes<HTMLDivElement>>;
|
|
3795
|
-
|
|
3796
3564
|
/** @public */
|
|
3797
3565
|
export declare interface TLUiIconProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3798
|
-
icon: Exclude<string, TLUiIconType> |
|
|
3566
|
+
icon: Exclude<string, TLUiIconType> | TLUiIconType;
|
|
3799
3567
|
label: string;
|
|
3800
3568
|
small?: boolean;
|
|
3801
3569
|
color?: string;
|
|
@@ -3854,13 +3622,6 @@ export declare type TLUiKeyboardShortcutsDialogProps = TLUiDialogProps & {
|
|
|
3854
3622
|
children?: ReactNode;
|
|
3855
3623
|
};
|
|
3856
3624
|
|
|
3857
|
-
/** @public */
|
|
3858
|
-
export declare interface TLUiLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
3859
|
-
children: ReactNode;
|
|
3860
|
-
tooltipSide?: 'bottom' | 'left' | 'right' | 'top';
|
|
3861
|
-
asChild?: boolean;
|
|
3862
|
-
}
|
|
3863
|
-
|
|
3864
3625
|
/** @public */
|
|
3865
3626
|
export declare interface TLUiMainMenuProps {
|
|
3866
3627
|
children?: ReactNode;
|
|
@@ -3878,7 +3639,7 @@ export declare type TLUiMenuActionItemProps = {
|
|
|
3878
3639
|
|
|
3879
3640
|
/** @public */
|
|
3880
3641
|
export declare interface TLUiMenuCheckboxItemProps<TranslationKey extends string = string, IconType extends string = string> {
|
|
3881
|
-
icon?: IconType
|
|
3642
|
+
icon?: IconType;
|
|
3882
3643
|
id: string;
|
|
3883
3644
|
kbd?: string;
|
|
3884
3645
|
title?: string;
|
|
@@ -3900,7 +3661,7 @@ export declare interface TLUiMenuContextProviderProps {
|
|
|
3900
3661
|
}
|
|
3901
3662
|
|
|
3902
3663
|
/** @public */
|
|
3903
|
-
export declare type TLUiMenuContextType = 'context-menu' | 'helper-buttons' | 'icons' | 'keyboard-shortcuts' | 'menu' | 'small-icons' | 'toolbar-overflow' | 'toolbar';
|
|
3664
|
+
export declare type TLUiMenuContextType = 'context-menu' | 'helper-buttons' | 'icons' | 'keyboard-shortcuts' | 'menu' | 'panel' | 'small-icons' | 'toolbar-overflow' | 'toolbar';
|
|
3904
3665
|
|
|
3905
3666
|
/** @public */
|
|
3906
3667
|
export declare interface TLUiMenuGroupProps<TranslationKey extends string = string> {
|
|
@@ -3921,11 +3682,11 @@ export declare interface TLUiMenuItemProps<TranslationKey extends string = strin
|
|
|
3921
3682
|
/**
|
|
3922
3683
|
* The icon to display on the item. Icons are only shown in certain menu types.
|
|
3923
3684
|
*/
|
|
3924
|
-
icon?: IconType
|
|
3685
|
+
icon?: IconType;
|
|
3925
3686
|
/**
|
|
3926
3687
|
* An icon to display to the left of the menu item.
|
|
3927
3688
|
*/
|
|
3928
|
-
iconLeft?: IconType
|
|
3689
|
+
iconLeft?: IconType;
|
|
3929
3690
|
/**
|
|
3930
3691
|
* The keyboard shortcut to display on the item.
|
|
3931
3692
|
*/
|
|
@@ -3960,10 +3721,6 @@ export declare interface TLUiMenuItemProps<TranslationKey extends string = strin
|
|
|
3960
3721
|
* Whether the item is selected.
|
|
3961
3722
|
*/
|
|
3962
3723
|
isSelected?: boolean;
|
|
3963
|
-
/**
|
|
3964
|
-
* The function to call when the item is dragged. If this is provided, the item will be draggable.
|
|
3965
|
-
*/
|
|
3966
|
-
onDragStart?(source: TLUiEventSource, info: TLPointerEventInfo): void;
|
|
3967
3724
|
}
|
|
3968
3725
|
|
|
3969
3726
|
/** @public */
|
|
@@ -4009,7 +3766,6 @@ export declare interface TLUiPopoverProps {
|
|
|
4009
3766
|
open?: boolean;
|
|
4010
3767
|
children: React_3.ReactNode;
|
|
4011
3768
|
onOpenChange?(isOpen: boolean): void;
|
|
4012
|
-
className?: string;
|
|
4013
3769
|
}
|
|
4014
3770
|
|
|
4015
3771
|
/** @public */
|
|
@@ -4037,7 +3793,6 @@ export declare interface TLUiSliderProps {
|
|
|
4037
3793
|
onValueChange(value: number): void;
|
|
4038
3794
|
onHistoryMark(id: string): void;
|
|
4039
3795
|
'data-testid'?: string;
|
|
4040
|
-
ariaValueModifier?: number;
|
|
4041
3796
|
}
|
|
4042
3797
|
|
|
4043
3798
|
/** @public */
|
|
@@ -4095,7 +3850,6 @@ export declare interface TLUiToolbarButtonProps extends React_3.HTMLAttributes<H
|
|
|
4095
3850
|
disabled?: boolean;
|
|
4096
3851
|
isActive?: boolean;
|
|
4097
3852
|
type: 'icon' | 'menu' | 'tool';
|
|
4098
|
-
tooltip?: string;
|
|
4099
3853
|
}
|
|
4100
3854
|
|
|
4101
3855
|
/** @public */
|
|
@@ -4104,8 +3858,6 @@ export declare interface TLUiToolbarProps extends React_3.HTMLAttributes<HTMLDiv
|
|
|
4104
3858
|
className?: string;
|
|
4105
3859
|
dir?: 'ltr' | 'rtl';
|
|
4106
3860
|
label: string;
|
|
4107
|
-
orientation?: 'grid' | 'horizontal' | 'vertical';
|
|
4108
|
-
tooltipSide?: 'bottom' | 'left' | 'right' | 'top';
|
|
4109
3861
|
}
|
|
4110
3862
|
|
|
4111
3863
|
/** @public */
|
|
@@ -4113,7 +3865,6 @@ export declare interface TLUiToolbarToggleGroupProps extends React_3.HTMLAttribu
|
|
|
4113
3865
|
children?: React_3.ReactNode;
|
|
4114
3866
|
className?: string;
|
|
4115
3867
|
dir?: 'ltr' | 'rtl';
|
|
4116
|
-
value: any;
|
|
4117
3868
|
defaultValue?: any;
|
|
4118
3869
|
type: 'multiple' | 'single';
|
|
4119
3870
|
}
|
|
@@ -4124,7 +3875,6 @@ export declare interface TLUiToolbarToggleItemProps extends React_3.HTMLAttribut
|
|
|
4124
3875
|
className?: string;
|
|
4125
3876
|
type: 'icon' | 'tool';
|
|
4126
3877
|
value: string;
|
|
4127
|
-
tooltip?: string;
|
|
4128
3878
|
}
|
|
4129
3879
|
|
|
4130
3880
|
/** @public */
|
|
@@ -4132,9 +3882,8 @@ export declare interface TLUiToolItem<TranslationKey extends string = string, Ic
|
|
|
4132
3882
|
id: string;
|
|
4133
3883
|
label: TranslationKey;
|
|
4134
3884
|
shortcutsLabel?: TranslationKey;
|
|
4135
|
-
icon: IconType
|
|
3885
|
+
icon: IconType;
|
|
4136
3886
|
onSelect(source: TLUiEventSource): void;
|
|
4137
|
-
onDragStart?(source: TLUiEventSource, info: TLPointerEventInfo): void;
|
|
4138
3887
|
/**
|
|
4139
3888
|
* The keyboard shortcut for this tool. This is a string that can be a single key,
|
|
4140
3889
|
* or a combination of keys.
|
|
@@ -4170,7 +3919,7 @@ export declare interface TLUiTranslation {
|
|
|
4170
3919
|
export declare type TLUiTranslationContextType = TLUiTranslation;
|
|
4171
3920
|
|
|
4172
3921
|
/** @public */
|
|
4173
|
-
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';
|
|
3922
|
+
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.pan-camera' | 'a11y.repeat-shape' | '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.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-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-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.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';
|
|
4174
3923
|
|
|
4175
3924
|
/** @public */
|
|
4176
3925
|
export declare interface TLUiTranslationProviderProps {
|
|
@@ -4282,9 +4031,6 @@ export declare function ToggleFocusModeItem(): JSX_2.Element;
|
|
|
4282
4031
|
/** @public @react */
|
|
4283
4032
|
export declare function ToggleGridItem(): JSX_2.Element;
|
|
4284
4033
|
|
|
4285
|
-
/** @public @react */
|
|
4286
|
-
export declare function ToggleKeyboardShortcutsItem(): JSX_2.Element;
|
|
4287
|
-
|
|
4288
4034
|
/** @public @react */
|
|
4289
4035
|
export declare function ToggleLockMenuItem(): JSX_2.Element | null;
|
|
4290
4036
|
|
|
@@ -4297,23 +4043,12 @@ export declare function ToggleReduceMotionItem(): JSX_2.Element;
|
|
|
4297
4043
|
/** @public @react */
|
|
4298
4044
|
export declare function ToggleSnapModeItem(): JSX_2.Element;
|
|
4299
4045
|
|
|
4300
|
-
/** @public @react */
|
|
4301
|
-
export declare function ToggleToolLockedButton({ activeToolId }: ToggleToolLockedButtonProps): JSX_2.Element | null;
|
|
4302
|
-
|
|
4303
|
-
/** @public */
|
|
4304
|
-
export declare interface ToggleToolLockedButtonProps {
|
|
4305
|
-
activeToolId?: string;
|
|
4306
|
-
}
|
|
4307
|
-
|
|
4308
4046
|
/** @public @react */
|
|
4309
4047
|
export declare function ToggleToolLockItem(): JSX_2.Element;
|
|
4310
4048
|
|
|
4311
4049
|
/** @public @react */
|
|
4312
4050
|
export declare function ToggleTransparentBgMenuItem(): JSX_2.Element;
|
|
4313
4051
|
|
|
4314
|
-
/** @public @react */
|
|
4315
|
-
export declare function ToggleUiLabelsItem(): JSX_2.Element;
|
|
4316
|
-
|
|
4317
4052
|
/** @public @react */
|
|
4318
4053
|
export declare function ToggleWrapModeItem(): JSX_2.Element;
|
|
4319
4054
|
|
|
@@ -4547,9 +4282,6 @@ export declare function useShowCollaborationUi(): boolean;
|
|
|
4547
4282
|
/** @public */
|
|
4548
4283
|
export declare function useTldrawUiComponents(): TLUiComponents;
|
|
4549
4284
|
|
|
4550
|
-
/** @public */
|
|
4551
|
-
export declare function useTldrawUiOrientation(): TldrawUiOrientationContext;
|
|
4552
|
-
|
|
4553
4285
|
/** @public */
|
|
4554
4286
|
export declare function useToasts(): TLUiToastsContextType;
|
|
4555
4287
|
|
|
@@ -4573,12 +4305,6 @@ export declare function useTranslation(): (id?: Exclude<string, TLUiTranslationK
|
|
|
4573
4305
|
/** @public */
|
|
4574
4306
|
export declare function useUiEvents(): TLUiEventContextType;
|
|
4575
4307
|
|
|
4576
|
-
/**
|
|
4577
|
-
* Returns true if the number of UNLOCKED selected shapes is at least min or at most max.
|
|
4578
|
-
* @public
|
|
4579
|
-
*/
|
|
4580
|
-
export declare function useUnlockedSelectedShapesCount(min?: number, max?: number): boolean | number;
|
|
4581
|
-
|
|
4582
4308
|
/** @public */
|
|
4583
4309
|
export declare interface VideoShapeOptions {
|
|
4584
4310
|
/**
|