tldraw 3.16.0-canary.ffdf566dd0a8 → 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 +19 -125
- package/dist-cjs/index.js +2 -19
- 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/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 +41 -24
- 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/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 +3 -0
- package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +5 -5
- package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +3 -0
- package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/line/LineShapeUtil.js +4 -15
- package/dist-cjs/lib/shapes/line/LineShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +1 -2
- 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/SvgTextLabel.js +3 -4
- package/dist-cjs/lib/shapes/shared/SvgTextLabel.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 +11 -5
- package/dist-cjs/lib/shapes/text/TextShapeUtil.js.map +2 -2
- package/dist-cjs/lib/styles.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/assetUrls.js +13 -10
- package/dist-cjs/lib/ui/assetUrls.js.map +2 -2
- 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/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/NavigationPanel/DefaultNavigationPanel.js +4 -3
- package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.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 +136 -168
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
- 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/OverflowingToolbar.js +3 -3
- package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js +2 -3
- 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 +0 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.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/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 +3 -12
- 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/TldrawUiMenuItem.js +2 -0
- 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.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 +19 -125
- package/dist-esm/index.mjs +4 -33
- 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/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 +41 -26
- 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/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 +3 -0
- package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +5 -5
- package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +3 -0
- package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/line/LineShapeUtil.mjs +4 -15
- package/dist-esm/lib/shapes/line/LineShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +1 -2
- 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/SvgTextLabel.mjs +3 -4
- package/dist-esm/lib/shapes/shared/SvgTextLabel.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 +11 -5
- package/dist-esm/lib/shapes/text/TextShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/styles.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/assetUrls.mjs +13 -10
- package/dist-esm/lib/ui/assetUrls.mjs.map +2 -2
- 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/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/NavigationPanel/DefaultNavigationPanel.mjs +4 -3
- package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.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 +136 -168
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.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/OverflowingToolbar.mjs +3 -3
- package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs +2 -3
- 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 +0 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.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/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 +3 -12
- 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/TldrawUiMenuItem.mjs +2 -0
- 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.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 +3 -4
- package/src/index.ts +2 -24
- 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/TldrawSelectionForeground.tsx +1 -5
- package/src/lib/defaultExternalContentHandlers.ts +1 -2
- package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +5 -5
- package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +43 -26
- package/src/lib/shapes/arrow/arrowLabel.ts +3 -23
- package/src/lib/shapes/arrow/arrowTargetState.ts +1 -2
- package/src/lib/shapes/arrow/toolStates/Pointing.tsx +0 -3
- package/src/lib/shapes/draw/DrawShapeUtil.tsx +4 -0
- package/src/lib/shapes/frame/FrameShapeUtil.tsx +7 -5
- package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +3 -0
- package/src/lib/shapes/line/LineShapeUtil.tsx +5 -19
- package/src/lib/shapes/note/NoteShapeUtil.tsx +0 -1
- 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/SvgTextLabel.tsx +2 -4
- package/src/lib/shapes/shared/usePrefersReducedMotion.tsx +1 -11
- package/src/lib/shapes/text/TextShapeUtil.tsx +12 -5
- package/src/lib/styles.tsx +1 -3
- 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 +0 -11
- package/src/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.ts +0 -1
- package/src/lib/ui/assetUrls.ts +13 -10
- package/src/lib/ui/components/A11y.tsx +13 -15
- 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/NavigationPanel/DefaultNavigationPanel.tsx +4 -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 +127 -171
- package/src/lib/ui/components/Toolbar/DefaultImageToolbar.tsx +9 -25
- package/src/lib/ui/components/Toolbar/OverflowingToolbar.tsx +3 -3
- 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 +0 -2
- 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/TldrawUiSlider.tsx +1 -6
- package/src/lib/ui/components/primitives/TldrawUiToolbar.tsx +3 -24
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.tsx +2 -2
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +4 -3
- 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 -5
- 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 +1 -2
- 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 +23 -65
- package/src/lib/utils/excalidraw/__snapshots__/putExcalidrawContent.test.tsx.snap +2 -16
- package/src/lib/utils/excalidraw/putExcalidrawContent.ts +1 -1
- package/src/lib/utils/tldr/__snapshots__/buildFromV1Document.test.ts.snap +3 -24
- package/src/lib/utils/tldr/buildFromV1Document.ts +1 -2
- package/src/test/Editor.test.tsx +1 -1
- package/src/test/SelectTool.test.ts +11 -37
- package/src/test/arrows-megabus.test.tsx +6 -12
- package/src/test/commands/__snapshots__/getSvgString.test.ts.snap +2 -2
- package/src/test/commands/deletePage.test.ts +1 -84
- package/src/test/groups.test.tsx +1 -1
- package/src/test/navigation.test.ts +0 -254
- package/src/test/shapeutils.test.ts +45 -394
- package/src/test/translating.test.ts +1 -1
- package/tldraw.css +50 -88
- 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 -267
- package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.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 -237
- package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +0 -7
- package/src/lib/ui/components/AccessibilityMenu.tsx +0 -20
- package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +0 -313
- package/src/test/inner-outer-margin.test.ts +0 -315
package/dist-esm/index.d.mts
CHANGED
|
@@ -148,9 +148,6 @@ export declare interface A11yProviderProps {
|
|
|
148
148
|
children: React.ReactNode;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
/** @public @react */
|
|
152
|
-
export declare function AccessibilityMenu(): JSX_2.Element;
|
|
153
|
-
|
|
154
151
|
/** @public */
|
|
155
152
|
export declare interface ActionsProviderProps {
|
|
156
153
|
overrides?(editor: Editor, actions: TLUiActionsContextType, helpers: TLUiOverrideHelpers): TLUiActionsContextType;
|
|
@@ -307,6 +304,7 @@ export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
|
|
|
307
304
|
canEdit(): boolean;
|
|
308
305
|
canBind({ toShapeType }: TLShapeUtilCanBindOpts<TLArrowShape>): boolean;
|
|
309
306
|
canSnap(): boolean;
|
|
307
|
+
canTabTo(shape: TLArrowShape): boolean;
|
|
310
308
|
hideResizeHandles(): boolean;
|
|
311
309
|
hideRotateHandle(): boolean;
|
|
312
310
|
hideSelectionBoundsBg(): boolean;
|
|
@@ -357,6 +355,7 @@ export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
|
|
|
357
355
|
component(shape: TLArrowShape): JSX_2.Element | null;
|
|
358
356
|
indicator(shape: TLArrowShape): JSX_2.Element | null;
|
|
359
357
|
onEditStart(shape: TLArrowShape): void;
|
|
358
|
+
onEditEnd(shape: TLArrowShape): void;
|
|
360
359
|
toSvg(shape: TLArrowShape, ctx: SvgExportContext): JSX_2.Element;
|
|
361
360
|
getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
|
|
362
361
|
getInterpolatedProps(startShape: TLArrowShape, endShape: TLArrowShape, progress: number): TLArrowShapeProps;
|
|
@@ -916,7 +915,7 @@ export declare const DefaultHelpMenu: NamedExoticComponent<TLUiHelpMenuProps>;
|
|
|
916
915
|
export declare function DefaultHelpMenuContent(): JSX_2.Element;
|
|
917
916
|
|
|
918
917
|
/** @public @react */
|
|
919
|
-
export declare
|
|
918
|
+
export declare const DefaultImageToolbar: NamedExoticComponent<TLUiImageToolbarProps>;
|
|
920
919
|
|
|
921
920
|
/** @public @react */
|
|
922
921
|
export declare const DefaultImageToolbarContent: NamedExoticComponent<DefaultImageToolbarContentProps>;
|
|
@@ -1113,6 +1112,7 @@ export declare class DrawShapeUtil extends ShapeUtil<TLDrawShape> {
|
|
|
1113
1112
|
static props: RecordProps<TLDrawShape>;
|
|
1114
1113
|
static migrations: TLPropsMigrations;
|
|
1115
1114
|
options: DrawShapeOptions;
|
|
1115
|
+
canTabTo(): boolean;
|
|
1116
1116
|
hideResizeHandles(shape: TLDrawShape): boolean;
|
|
1117
1117
|
hideRotateHandle(shape: TLDrawShape): boolean;
|
|
1118
1118
|
hideSelectionBoundsFg(shape: TLDrawShape): boolean;
|
|
@@ -1742,9 +1742,6 @@ export declare function getArrowTerminalsInArrowSpace(editor: Editor, shape: TLA
|
|
|
1742
1742
|
start: Vec;
|
|
1743
1743
|
};
|
|
1744
1744
|
|
|
1745
|
-
/** @public */
|
|
1746
|
-
export declare function getAssetInfo(file: File, options: TLDefaultExternalContentHandlerOpts, assetId?: TLAssetId): Promise<TLImageAsset | TLVideoAsset>;
|
|
1747
|
-
|
|
1748
1745
|
/** @public */
|
|
1749
1746
|
export declare function getCropBox<T extends ShapeWithCrop>(shape: T, info: TLCropInfo<T>, opts?: CropBoxOptions): {
|
|
1750
1747
|
id: TLShapeId;
|
|
@@ -1766,9 +1763,6 @@ export declare function getDefaultCrop(): TLShapeCrop;
|
|
|
1766
1763
|
*/
|
|
1767
1764
|
export declare function getEmbedInfo(definitions: readonly TLEmbedDefinition[], inputUrl: string): TLEmbedResult;
|
|
1768
1765
|
|
|
1769
|
-
/** @public */
|
|
1770
|
-
export declare function getHitShapeOnCanvasPointerDown(editor: Editor, hitLabels?: boolean): TLShape | undefined;
|
|
1771
|
-
|
|
1772
1766
|
/** @public */
|
|
1773
1767
|
export declare function getMediaAssetInfoPartial(file: File, assetId: TLAssetId, isImageType: boolean, isVideoType: boolean, maxImageDimension?: number): Promise<TLImageAsset | TLVideoAsset>;
|
|
1774
1768
|
|
|
@@ -1805,9 +1799,6 @@ export declare class HandTool extends StateNode {
|
|
|
1805
1799
|
/** @public @react */
|
|
1806
1800
|
export declare function HandToolbarItem(): JSX_2.Element;
|
|
1807
1801
|
|
|
1808
|
-
/** @public @react */
|
|
1809
|
-
export declare function HeartToolbarItem(): JSX_2.Element;
|
|
1810
|
-
|
|
1811
1802
|
/** @public @react */
|
|
1812
1803
|
export declare function HexagonToolbarItem(): JSX_2.Element;
|
|
1813
1804
|
|
|
@@ -1839,6 +1830,7 @@ export declare class HighlightShapeUtil extends ShapeUtil<TLHighlightShape> {
|
|
|
1839
1830
|
static props: RecordProps<TLHighlightShape>;
|
|
1840
1831
|
static migrations: TLPropsMigrations;
|
|
1841
1832
|
options: HighlightShapeOptions;
|
|
1833
|
+
canTabTo(): boolean;
|
|
1842
1834
|
hideResizeHandles(shape: TLHighlightShape): boolean;
|
|
1843
1835
|
hideRotateHandle(shape: TLHighlightShape): boolean;
|
|
1844
1836
|
hideSelectionBoundsFg(shape: TLHighlightShape): boolean;
|
|
@@ -1915,6 +1907,7 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
|
|
|
1915
1907
|
static type: "line";
|
|
1916
1908
|
static props: RecordProps<TLLineShape>;
|
|
1917
1909
|
static migrations: TLPropsMigrations;
|
|
1910
|
+
canTabTo(): boolean;
|
|
1918
1911
|
hideResizeHandles(): boolean;
|
|
1919
1912
|
hideRotateHandle(): boolean;
|
|
1920
1913
|
hideSelectionBoundsFg(): boolean;
|
|
@@ -1962,34 +1955,6 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
|
|
|
1962
1955
|
typeName: "shape";
|
|
1963
1956
|
x: number;
|
|
1964
1957
|
y: number;
|
|
1965
|
-
};
|
|
1966
|
-
onHandleDragStart(shape: TLLineShape, { handle }: TLHandleDragInfo<TLLineShape>): {
|
|
1967
|
-
id: TLShapeId;
|
|
1968
|
-
index: IndexKey;
|
|
1969
|
-
isLocked: boolean;
|
|
1970
|
-
meta: JsonObject;
|
|
1971
|
-
opacity: TLOpacityType;
|
|
1972
|
-
parentId: TLParentId;
|
|
1973
|
-
props: {
|
|
1974
|
-
color: TLDefaultColorStyle;
|
|
1975
|
-
dash: TLDefaultDashStyle;
|
|
1976
|
-
points: {
|
|
1977
|
-
[x: string]: {
|
|
1978
|
-
id: IndexKey;
|
|
1979
|
-
index: IndexKey;
|
|
1980
|
-
x: number;
|
|
1981
|
-
y: number;
|
|
1982
|
-
} | TLLineShapePoint;
|
|
1983
|
-
};
|
|
1984
|
-
scale: number;
|
|
1985
|
-
size: TLDefaultSizeStyle;
|
|
1986
|
-
spline: TLLineShapeSplineStyle;
|
|
1987
|
-
};
|
|
1988
|
-
rotation: number;
|
|
1989
|
-
type: "line";
|
|
1990
|
-
typeName: "shape";
|
|
1991
|
-
x: number;
|
|
1992
|
-
y: number;
|
|
1993
1958
|
} | undefined;
|
|
1994
1959
|
component(shape: TLLineShape): JSX_2.Element;
|
|
1995
1960
|
indicator(shape: TLLineShape): JSX_2.Element;
|
|
@@ -2003,9 +1968,6 @@ export declare function LineToolbarItem(): JSX_2.Element;
|
|
|
2003
1968
|
|
|
2004
1969
|
/* Excluded from this release type: LineToPathBuilderCommand */
|
|
2005
1970
|
|
|
2006
|
-
/** @public @react */
|
|
2007
|
-
export declare function LockGroup(): JSX_2.Element;
|
|
2008
|
-
|
|
2009
1971
|
/** @public @react */
|
|
2010
1972
|
export declare function MiscMenuGroup(): JSX_2.Element;
|
|
2011
1973
|
|
|
@@ -2188,7 +2150,6 @@ export declare class PathBuilder {
|
|
|
2188
2150
|
circularArcTo(radius: number, largeArcFlag: boolean, sweepFlag: boolean, x2: number, y2: number, opts?: PathBuilderCommandOpts): this;
|
|
2189
2151
|
arcTo(rx: number, ry: number, largeArcFlag: boolean, sweepFlag: boolean, xAxisRotationRadians: number, x2: number, y2: number, opts?: PathBuilderCommandOpts): this;
|
|
2190
2152
|
cubicBezierTo(x: number, y: number, cp1X: number, cp1Y: number, cp2X: number, cp2Y: number, opts?: PathBuilderCommandOpts): this;
|
|
2191
|
-
private cubicBezierToWithResolution;
|
|
2192
2153
|
close(): this;
|
|
2193
2154
|
toD(opts?: PathBuilderToDOpts): string;
|
|
2194
2155
|
toSvg(opts: PathBuilderOpts): JSX_2.Element;
|
|
@@ -2454,7 +2415,7 @@ export declare interface RichTextLabelProps {
|
|
|
2454
2415
|
*
|
|
2455
2416
|
* @public @react
|
|
2456
2417
|
*/
|
|
2457
|
-
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;
|
|
2458
2419
|
|
|
2459
2420
|
/** @public */
|
|
2460
2421
|
export declare interface RichTextSVGProps {
|
|
@@ -2467,7 +2428,6 @@ export declare interface RichTextSVGProps {
|
|
|
2467
2428
|
wrap?: boolean;
|
|
2468
2429
|
labelColor: string;
|
|
2469
2430
|
padding: number;
|
|
2470
|
-
showTextOutline?: boolean;
|
|
2471
2431
|
}
|
|
2472
2432
|
|
|
2473
2433
|
/** @public @react */
|
|
@@ -2527,7 +2487,7 @@ export declare interface StylePickerSetProps {
|
|
|
2527
2487
|
|
|
2528
2488
|
/** @public */
|
|
2529
2489
|
export declare type StyleValuesForUi<T> = readonly {
|
|
2530
|
-
readonly icon: string
|
|
2490
|
+
readonly icon: string;
|
|
2531
2491
|
readonly value: T;
|
|
2532
2492
|
}[];
|
|
2533
2493
|
|
|
@@ -2784,17 +2744,6 @@ export declare interface TldrawBaseProps extends TldrawUiProps, TldrawEditorBase
|
|
|
2784
2744
|
embeds?: TLEmbedDefinition[];
|
|
2785
2745
|
}
|
|
2786
2746
|
|
|
2787
|
-
/** @public @react */
|
|
2788
|
-
export declare function TldrawCropHandles({ size, width, height, hideAlternateHandles, }: TldrawCropHandlesProps): JSX_2.Element;
|
|
2789
|
-
|
|
2790
|
-
/** @public */
|
|
2791
|
-
export declare interface TldrawCropHandlesProps {
|
|
2792
|
-
size: number;
|
|
2793
|
-
width: number;
|
|
2794
|
-
height: number;
|
|
2795
|
-
hideAlternateHandles: boolean;
|
|
2796
|
-
}
|
|
2797
|
-
|
|
2798
2747
|
/** @public */
|
|
2799
2748
|
export declare interface TldrawFile {
|
|
2800
2749
|
tldrawFileFormatVersion: number;
|
|
@@ -3060,27 +3009,7 @@ export declare const TldrawUiToolbarButton: React_3.ForwardRefExoticComponent<TL
|
|
|
3060
3009
|
export declare const TldrawUiToolbarToggleGroup: ({ children, className, type, ...props }: TLUiToolbarToggleGroupProps) => JSX_2.Element;
|
|
3061
3010
|
|
|
3062
3011
|
/** @public @react */
|
|
3063
|
-
export declare const TldrawUiToolbarToggleItem: ({ children, className, type, value,
|
|
3064
|
-
|
|
3065
|
-
/** @public @react */
|
|
3066
|
-
export declare function TldrawUiTooltip({ children, content, side, sideOffset, disabled, }: TldrawUiTooltipProps): JSX_2.Element;
|
|
3067
|
-
|
|
3068
|
-
/** @public */
|
|
3069
|
-
export declare interface TldrawUiTooltipProps {
|
|
3070
|
-
children: React_3.ReactNode;
|
|
3071
|
-
content?: React_3.ReactNode | string;
|
|
3072
|
-
side?: 'bottom' | 'left' | 'right' | 'top';
|
|
3073
|
-
sideOffset?: number;
|
|
3074
|
-
disabled?: boolean;
|
|
3075
|
-
}
|
|
3076
|
-
|
|
3077
|
-
/** @public @react */
|
|
3078
|
-
export declare function TldrawUiTooltipProvider({ children }: TldrawUiTooltipProviderProps): JSX_2.Element;
|
|
3079
|
-
|
|
3080
|
-
/** @public */
|
|
3081
|
-
export declare interface TldrawUiTooltipProviderProps {
|
|
3082
|
-
children: React_3.ReactNode;
|
|
3083
|
-
}
|
|
3012
|
+
export declare const TldrawUiToolbarToggleItem: ({ children, className, type, value, ...props }: TLUiToolbarToggleItemProps) => JSX_2.Element;
|
|
3084
3013
|
|
|
3085
3014
|
/* Excluded from this release type: TldrawUiTranslationProvider */
|
|
3086
3015
|
|
|
@@ -3195,7 +3124,7 @@ export declare interface TLUiA11yContextType {
|
|
|
3195
3124
|
|
|
3196
3125
|
/** @public */
|
|
3197
3126
|
export declare interface TLUiActionItem<TransationKey extends string = string, IconType extends string = string> {
|
|
3198
|
-
icon?: IconType
|
|
3127
|
+
icon?: IconType;
|
|
3199
3128
|
id: string;
|
|
3200
3129
|
kbd?: string;
|
|
3201
3130
|
label?: {
|
|
@@ -3203,7 +3132,6 @@ export declare interface TLUiActionItem<TransationKey extends string = string, I
|
|
|
3203
3132
|
} | TransationKey;
|
|
3204
3133
|
readonlyOk?: boolean;
|
|
3205
3134
|
checkbox?: boolean;
|
|
3206
|
-
isRequiredA11yAction?: boolean;
|
|
3207
3135
|
onSelect(source: TLUiEventSource): Promise<void> | void;
|
|
3208
3136
|
}
|
|
3209
3137
|
|
|
@@ -3232,7 +3160,7 @@ export declare interface TLUiButtonCheckProps {
|
|
|
3232
3160
|
|
|
3233
3161
|
/** @public */
|
|
3234
3162
|
export declare interface TLUiButtonIconProps {
|
|
3235
|
-
icon: string
|
|
3163
|
+
icon: string;
|
|
3236
3164
|
small?: boolean;
|
|
3237
3165
|
invertIcon?: boolean;
|
|
3238
3166
|
}
|
|
@@ -3546,12 +3474,8 @@ export declare interface TLUiEventMap {
|
|
|
3546
3474
|
'delete-shapes': null;
|
|
3547
3475
|
'select-all-shapes': null;
|
|
3548
3476
|
'select-none-shapes': null;
|
|
3549
|
-
'rotate-ccw':
|
|
3550
|
-
|
|
3551
|
-
};
|
|
3552
|
-
'rotate-cw': {
|
|
3553
|
-
fine: boolean;
|
|
3554
|
-
};
|
|
3477
|
+
'rotate-ccw': null;
|
|
3478
|
+
'rotate-cw': null;
|
|
3555
3479
|
'zoom-in': {
|
|
3556
3480
|
towardsCursor: boolean;
|
|
3557
3481
|
};
|
|
@@ -3594,8 +3518,6 @@ export declare interface TLUiEventMap {
|
|
|
3594
3518
|
'toggle-paste-at-cursor': null;
|
|
3595
3519
|
'toggle-lock': null;
|
|
3596
3520
|
'toggle-reduce-motion': null;
|
|
3597
|
-
'toggle-keyboard-shortcuts': null;
|
|
3598
|
-
'toggle-ui-labels': null;
|
|
3599
3521
|
'toggle-edge-scrolling': null;
|
|
3600
3522
|
'color-scheme': {
|
|
3601
3523
|
value: string;
|
|
@@ -3620,7 +3542,6 @@ export declare interface TLUiEventMap {
|
|
|
3620
3542
|
'copy-link': null;
|
|
3621
3543
|
'image-replace': null;
|
|
3622
3544
|
'video-replace': null;
|
|
3623
|
-
'open-kbd-shortcuts': null;
|
|
3624
3545
|
'rich-text': {
|
|
3625
3546
|
operation: 'bold' | 'bulletList' | 'heading' | 'link-edit' | 'link-remove' | 'link-visit' | 'link' | 'strike';
|
|
3626
3547
|
};
|
|
@@ -3640,12 +3561,9 @@ export declare interface TLUiHelpMenuProps {
|
|
|
3640
3561
|
children?: ReactNode;
|
|
3641
3562
|
}
|
|
3642
3563
|
|
|
3643
|
-
/** @public */
|
|
3644
|
-
export declare type TLUiIconJsx = ReactElement<React.HTMLAttributes<HTMLDivElement>>;
|
|
3645
|
-
|
|
3646
3564
|
/** @public */
|
|
3647
3565
|
export declare interface TLUiIconProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3648
|
-
icon: Exclude<string, TLUiIconType> |
|
|
3566
|
+
icon: Exclude<string, TLUiIconType> | TLUiIconType;
|
|
3649
3567
|
label: string;
|
|
3650
3568
|
small?: boolean;
|
|
3651
3569
|
color?: string;
|
|
@@ -3721,7 +3639,7 @@ export declare type TLUiMenuActionItemProps = {
|
|
|
3721
3639
|
|
|
3722
3640
|
/** @public */
|
|
3723
3641
|
export declare interface TLUiMenuCheckboxItemProps<TranslationKey extends string = string, IconType extends string = string> {
|
|
3724
|
-
icon?: IconType
|
|
3642
|
+
icon?: IconType;
|
|
3725
3643
|
id: string;
|
|
3726
3644
|
kbd?: string;
|
|
3727
3645
|
title?: string;
|
|
@@ -3764,11 +3682,11 @@ export declare interface TLUiMenuItemProps<TranslationKey extends string = strin
|
|
|
3764
3682
|
/**
|
|
3765
3683
|
* The icon to display on the item. Icons are only shown in certain menu types.
|
|
3766
3684
|
*/
|
|
3767
|
-
icon?: IconType
|
|
3685
|
+
icon?: IconType;
|
|
3768
3686
|
/**
|
|
3769
3687
|
* An icon to display to the left of the menu item.
|
|
3770
3688
|
*/
|
|
3771
|
-
iconLeft?: IconType
|
|
3689
|
+
iconLeft?: IconType;
|
|
3772
3690
|
/**
|
|
3773
3691
|
* The keyboard shortcut to display on the item.
|
|
3774
3692
|
*/
|
|
@@ -3875,7 +3793,6 @@ export declare interface TLUiSliderProps {
|
|
|
3875
3793
|
onValueChange(value: number): void;
|
|
3876
3794
|
onHistoryMark(id: string): void;
|
|
3877
3795
|
'data-testid'?: string;
|
|
3878
|
-
ariaValueModifier?: number;
|
|
3879
3796
|
}
|
|
3880
3797
|
|
|
3881
3798
|
/** @public */
|
|
@@ -3933,7 +3850,6 @@ export declare interface TLUiToolbarButtonProps extends React_3.HTMLAttributes<H
|
|
|
3933
3850
|
disabled?: boolean;
|
|
3934
3851
|
isActive?: boolean;
|
|
3935
3852
|
type: 'icon' | 'menu' | 'tool';
|
|
3936
|
-
tooltip?: string;
|
|
3937
3853
|
}
|
|
3938
3854
|
|
|
3939
3855
|
/** @public */
|
|
@@ -3949,7 +3865,6 @@ export declare interface TLUiToolbarToggleGroupProps extends React_3.HTMLAttribu
|
|
|
3949
3865
|
children?: React_3.ReactNode;
|
|
3950
3866
|
className?: string;
|
|
3951
3867
|
dir?: 'ltr' | 'rtl';
|
|
3952
|
-
value: any;
|
|
3953
3868
|
defaultValue?: any;
|
|
3954
3869
|
type: 'multiple' | 'single';
|
|
3955
3870
|
}
|
|
@@ -3960,7 +3875,6 @@ export declare interface TLUiToolbarToggleItemProps extends React_3.HTMLAttribut
|
|
|
3960
3875
|
className?: string;
|
|
3961
3876
|
type: 'icon' | 'tool';
|
|
3962
3877
|
value: string;
|
|
3963
|
-
tooltip?: string;
|
|
3964
3878
|
}
|
|
3965
3879
|
|
|
3966
3880
|
/** @public */
|
|
@@ -3968,7 +3882,7 @@ export declare interface TLUiToolItem<TranslationKey extends string = string, Ic
|
|
|
3968
3882
|
id: string;
|
|
3969
3883
|
label: TranslationKey;
|
|
3970
3884
|
shortcutsLabel?: TranslationKey;
|
|
3971
|
-
icon: IconType
|
|
3885
|
+
icon: IconType;
|
|
3972
3886
|
onSelect(source: TLUiEventSource): void;
|
|
3973
3887
|
/**
|
|
3974
3888
|
* The keyboard shortcut for this tool. This is a string that can be a single key,
|
|
@@ -4005,7 +3919,7 @@ export declare interface TLUiTranslation {
|
|
|
4005
3919
|
export declare type TLUiTranslationContextType = TLUiTranslation;
|
|
4006
3920
|
|
|
4007
3921
|
/** @public */
|
|
4008
|
-
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';
|
|
4009
3923
|
|
|
4010
3924
|
/** @public */
|
|
4011
3925
|
export declare interface TLUiTranslationProviderProps {
|
|
@@ -4117,9 +4031,6 @@ export declare function ToggleFocusModeItem(): JSX_2.Element;
|
|
|
4117
4031
|
/** @public @react */
|
|
4118
4032
|
export declare function ToggleGridItem(): JSX_2.Element;
|
|
4119
4033
|
|
|
4120
|
-
/** @public @react */
|
|
4121
|
-
export declare function ToggleKeyboardShortcutsItem(): JSX_2.Element;
|
|
4122
|
-
|
|
4123
4034
|
/** @public @react */
|
|
4124
4035
|
export declare function ToggleLockMenuItem(): JSX_2.Element | null;
|
|
4125
4036
|
|
|
@@ -4132,23 +4043,12 @@ export declare function ToggleReduceMotionItem(): JSX_2.Element;
|
|
|
4132
4043
|
/** @public @react */
|
|
4133
4044
|
export declare function ToggleSnapModeItem(): JSX_2.Element;
|
|
4134
4045
|
|
|
4135
|
-
/** @public @react */
|
|
4136
|
-
export declare function ToggleToolLockedButton({ activeToolId }: ToggleToolLockedButtonProps): JSX_2.Element | null;
|
|
4137
|
-
|
|
4138
|
-
/** @public */
|
|
4139
|
-
export declare interface ToggleToolLockedButtonProps {
|
|
4140
|
-
activeToolId?: string;
|
|
4141
|
-
}
|
|
4142
|
-
|
|
4143
4046
|
/** @public @react */
|
|
4144
4047
|
export declare function ToggleToolLockItem(): JSX_2.Element;
|
|
4145
4048
|
|
|
4146
4049
|
/** @public @react */
|
|
4147
4050
|
export declare function ToggleTransparentBgMenuItem(): JSX_2.Element;
|
|
4148
4051
|
|
|
4149
|
-
/** @public @react */
|
|
4150
|
-
export declare function ToggleUiLabelsItem(): JSX_2.Element;
|
|
4151
|
-
|
|
4152
4052
|
/** @public @react */
|
|
4153
4053
|
export declare function ToggleWrapModeItem(): JSX_2.Element;
|
|
4154
4054
|
|
|
@@ -4405,12 +4305,6 @@ export declare function useTranslation(): (id?: Exclude<string, TLUiTranslationK
|
|
|
4405
4305
|
/** @public */
|
|
4406
4306
|
export declare function useUiEvents(): TLUiEventContextType;
|
|
4407
4307
|
|
|
4408
|
-
/**
|
|
4409
|
-
* Returns true if the number of UNLOCKED selected shapes is at least min or at most max.
|
|
4410
|
-
* @public
|
|
4411
|
-
*/
|
|
4412
|
-
export declare function useUnlockedSelectedShapesCount(min?: number, max?: number): boolean | number;
|
|
4413
|
-
|
|
4414
4308
|
/** @public */
|
|
4415
4309
|
export declare interface VideoShapeOptions {
|
|
4416
4310
|
/**
|
package/dist-esm/index.mjs
CHANGED
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
} from "./lib/shapes/shared/PathBuilder.mjs";
|
|
6
6
|
import { usePrefersReducedMotion } from "./lib/shapes/shared/usePrefersReducedMotion.mjs";
|
|
7
7
|
import { DefaultA11yAnnouncer, useSelectedShapesAnnouncer } from "./lib/ui/components/A11y.mjs";
|
|
8
|
-
import { AccessibilityMenu } from "./lib/ui/components/AccessibilityMenu.mjs";
|
|
9
8
|
import { ColorSchemeMenu } from "./lib/ui/components/ColorSchemeMenu.mjs";
|
|
10
9
|
import { DefaultDialogs } from "./lib/ui/components/Dialogs.mjs";
|
|
11
10
|
import {
|
|
@@ -21,7 +20,6 @@ import { DefaultToasts } from "./lib/ui/components/Toasts.mjs";
|
|
|
21
20
|
import { TldrawUiTranslationProvider } from "./lib/ui/hooks/useTranslation/useTranslation.mjs";
|
|
22
21
|
export * from "@tldraw/editor";
|
|
23
22
|
import { ArrowBindingUtil } from "./lib/bindings/arrow/ArrowBindingUtil.mjs";
|
|
24
|
-
import { TldrawCropHandles } from "./lib/canvas/TldrawCropHandles.mjs";
|
|
25
23
|
import { TldrawHandles } from "./lib/canvas/TldrawHandles.mjs";
|
|
26
24
|
import { TldrawArrowHints, TldrawOverlays } from "./lib/canvas/TldrawOverlays.mjs";
|
|
27
25
|
import { TldrawScribble } from "./lib/canvas/TldrawScribble.mjs";
|
|
@@ -47,7 +45,6 @@ import {
|
|
|
47
45
|
defaultHandleExternalTldrawContent,
|
|
48
46
|
defaultHandleExternalUrlAsset,
|
|
49
47
|
defaultHandleExternalUrlContent,
|
|
50
|
-
getAssetInfo,
|
|
51
48
|
getMediaAssetInfoPartial,
|
|
52
49
|
registerDefaultExternalContentHandlers
|
|
53
50
|
} from "./lib/defaultExternalContentHandlers.mjs";
|
|
@@ -123,7 +120,6 @@ import { TldrawImage } from "./lib/TldrawImage.mjs";
|
|
|
123
120
|
import { EraserTool } from "./lib/tools/EraserTool/EraserTool.mjs";
|
|
124
121
|
import { HandTool } from "./lib/tools/HandTool/HandTool.mjs";
|
|
125
122
|
import { LaserTool } from "./lib/tools/LaserTool/LaserTool.mjs";
|
|
126
|
-
import { getHitShapeOnCanvasPointerDown } from "./lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs";
|
|
127
123
|
import { SelectTool } from "./lib/tools/SelectTool/SelectTool.mjs";
|
|
128
124
|
import { ZoomTool } from "./lib/tools/ZoomTool/ZoomTool.mjs";
|
|
129
125
|
import {
|
|
@@ -181,7 +177,6 @@ import {
|
|
|
181
177
|
EditSubmenu,
|
|
182
178
|
ExportFileContentSubMenu,
|
|
183
179
|
ExtrasGroup,
|
|
184
|
-
LockGroup,
|
|
185
180
|
MiscMenuGroup,
|
|
186
181
|
PreferencesGroup,
|
|
187
182
|
UndoRedoGroup,
|
|
@@ -215,14 +210,12 @@ import {
|
|
|
215
210
|
ToggleEdgeScrollingItem,
|
|
216
211
|
ToggleFocusModeItem,
|
|
217
212
|
ToggleGridItem,
|
|
218
|
-
ToggleKeyboardShortcutsItem,
|
|
219
213
|
ToggleLockMenuItem,
|
|
220
214
|
TogglePasteAtCursorItem,
|
|
221
215
|
ToggleReduceMotionItem,
|
|
222
216
|
ToggleSnapModeItem,
|
|
223
217
|
ToggleToolLockItem,
|
|
224
218
|
ToggleTransparentBgMenuItem,
|
|
225
|
-
ToggleUiLabelsItem,
|
|
226
219
|
ToggleWrapModeItem,
|
|
227
220
|
UngroupMenuItem,
|
|
228
221
|
UnlockAllMenuItem,
|
|
@@ -290,9 +283,7 @@ import {
|
|
|
290
283
|
TldrawUiDropdownMenuSubTrigger,
|
|
291
284
|
TldrawUiDropdownMenuTrigger
|
|
292
285
|
} from "./lib/ui/components/primitives/TldrawUiDropdownMenu.mjs";
|
|
293
|
-
import {
|
|
294
|
-
TldrawUiIcon
|
|
295
|
-
} from "./lib/ui/components/primitives/TldrawUiIcon.mjs";
|
|
286
|
+
import { TldrawUiIcon } from "./lib/ui/components/primitives/TldrawUiIcon.mjs";
|
|
296
287
|
import { TldrawUiInput } from "./lib/ui/components/primitives/TldrawUiInput.mjs";
|
|
297
288
|
import { TldrawUiKbd } from "./lib/ui/components/primitives/TldrawUiKbd.mjs";
|
|
298
289
|
import {
|
|
@@ -307,10 +298,6 @@ import {
|
|
|
307
298
|
TldrawUiToolbarToggleGroup,
|
|
308
299
|
TldrawUiToolbarToggleItem
|
|
309
300
|
} from "./lib/ui/components/primitives/TldrawUiToolbar.mjs";
|
|
310
|
-
import {
|
|
311
|
-
TldrawUiTooltip,
|
|
312
|
-
TldrawUiTooltipProvider
|
|
313
|
-
} from "./lib/ui/components/primitives/TldrawUiTooltip.mjs";
|
|
314
301
|
import {
|
|
315
302
|
DefaultQuickActions
|
|
316
303
|
} from "./lib/ui/components/QuickActions/DefaultQuickActions.mjs";
|
|
@@ -361,7 +348,6 @@ import {
|
|
|
361
348
|
EraserToolbarItem,
|
|
362
349
|
FrameToolbarItem,
|
|
363
350
|
HandToolbarItem,
|
|
364
|
-
HeartToolbarItem,
|
|
365
351
|
HexagonToolbarItem,
|
|
366
352
|
HighlightToolbarItem,
|
|
367
353
|
LaserToolbarItem,
|
|
@@ -388,9 +374,6 @@ import {
|
|
|
388
374
|
import {
|
|
389
375
|
OverflowingToolbar
|
|
390
376
|
} from "./lib/ui/components/Toolbar/OverflowingToolbar.mjs";
|
|
391
|
-
import {
|
|
392
|
-
ToggleToolLockedButton
|
|
393
|
-
} from "./lib/ui/components/Toolbar/ToggleToolLockedButton.mjs";
|
|
394
377
|
import {
|
|
395
378
|
CenteredTopPanelContainer
|
|
396
379
|
} from "./lib/ui/components/TopPanel/CenteredTopPanelContainer.mjs";
|
|
@@ -432,7 +415,7 @@ import {
|
|
|
432
415
|
TldrawUiToastsProvider,
|
|
433
416
|
useToasts
|
|
434
417
|
} from "./lib/ui/context/toasts.mjs";
|
|
435
|
-
import { useCanRedo, useCanUndo
|
|
418
|
+
import { useCanRedo, useCanUndo } from "./lib/ui/hooks/menu-hooks.mjs";
|
|
436
419
|
import { useMenuClipboardEvents, useNativeClipboardEvents } from "./lib/ui/hooks/useClipboardEvents.mjs";
|
|
437
420
|
import {
|
|
438
421
|
useCollaborationStatus,
|
|
@@ -497,14 +480,13 @@ import {
|
|
|
497
480
|
} from "./lib/utils/tldr/file.mjs";
|
|
498
481
|
registerTldrawLibraryVersion(
|
|
499
482
|
"tldraw",
|
|
500
|
-
"3.16.0-
|
|
483
|
+
"3.16.0-internal.a478398270c6",
|
|
501
484
|
"esm"
|
|
502
485
|
);
|
|
503
486
|
export {
|
|
504
487
|
ARROW_LABEL_FONT_SIZES,
|
|
505
488
|
ASPECT_RATIO_OPTIONS,
|
|
506
489
|
ASPECT_RATIO_TO_VALUE,
|
|
507
|
-
AccessibilityMenu,
|
|
508
490
|
AlignMenuItems,
|
|
509
491
|
ArrangeMenuSubmenu,
|
|
510
492
|
ArrowBindingUtil,
|
|
@@ -607,7 +589,6 @@ export {
|
|
|
607
589
|
GroupOrUngroupMenuItem,
|
|
608
590
|
HandTool,
|
|
609
591
|
HandToolbarItem,
|
|
610
|
-
HeartToolbarItem,
|
|
611
592
|
HexagonToolbarItem,
|
|
612
593
|
HighlightShapeTool,
|
|
613
594
|
HighlightShapeUtil,
|
|
@@ -622,7 +603,6 @@ export {
|
|
|
622
603
|
LineShapeTool,
|
|
623
604
|
LineShapeUtil,
|
|
624
605
|
LineToolbarItem,
|
|
625
|
-
LockGroup,
|
|
626
606
|
MiscMenuGroup,
|
|
627
607
|
MobileStylePanel,
|
|
628
608
|
MoveToPageMenu,
|
|
@@ -679,7 +659,6 @@ export {
|
|
|
679
659
|
TextToolbarItem,
|
|
680
660
|
Tldraw,
|
|
681
661
|
TldrawArrowHints,
|
|
682
|
-
TldrawCropHandles,
|
|
683
662
|
TldrawHandles,
|
|
684
663
|
TldrawImage,
|
|
685
664
|
TldrawOverlays,
|
|
@@ -732,8 +711,6 @@ export {
|
|
|
732
711
|
TldrawUiToolbarButton,
|
|
733
712
|
TldrawUiToolbarToggleGroup,
|
|
734
713
|
TldrawUiToolbarToggleItem,
|
|
735
|
-
TldrawUiTooltip,
|
|
736
|
-
TldrawUiTooltipProvider,
|
|
737
714
|
TldrawUiTranslationProvider,
|
|
738
715
|
ToggleAutoSizeMenuItem,
|
|
739
716
|
ToggleDebugModeItem,
|
|
@@ -741,15 +718,12 @@ export {
|
|
|
741
718
|
ToggleEdgeScrollingItem,
|
|
742
719
|
ToggleFocusModeItem,
|
|
743
720
|
ToggleGridItem,
|
|
744
|
-
ToggleKeyboardShortcutsItem,
|
|
745
721
|
ToggleLockMenuItem,
|
|
746
722
|
TogglePasteAtCursorItem,
|
|
747
723
|
ToggleReduceMotionItem,
|
|
748
724
|
ToggleSnapModeItem,
|
|
749
725
|
ToggleToolLockItem,
|
|
750
|
-
ToggleToolLockedButton,
|
|
751
726
|
ToggleTransparentBgMenuItem,
|
|
752
|
-
ToggleUiLabelsItem,
|
|
753
727
|
ToggleWrapModeItem,
|
|
754
728
|
ToolbarItem,
|
|
755
729
|
TrapezoidToolbarItem,
|
|
@@ -796,11 +770,9 @@ export {
|
|
|
796
770
|
getArrowBindings,
|
|
797
771
|
getArrowInfo,
|
|
798
772
|
getArrowTerminalsInArrowSpace,
|
|
799
|
-
getAssetInfo,
|
|
800
773
|
getCropBox,
|
|
801
774
|
getDefaultCrop,
|
|
802
775
|
getEmbedInfo,
|
|
803
|
-
getHitShapeOnCanvasPointerDown,
|
|
804
776
|
getMediaAssetInfoPartial,
|
|
805
777
|
getUncroppedSize,
|
|
806
778
|
parseAndLoadDocument,
|
|
@@ -854,7 +826,6 @@ export {
|
|
|
854
826
|
useToasts,
|
|
855
827
|
useTools,
|
|
856
828
|
useTranslation,
|
|
857
|
-
useUiEvents
|
|
858
|
-
useUnlockedSelectedShapesCount
|
|
829
|
+
useUiEvents
|
|
859
830
|
};
|
|
860
831
|
//# sourceMappingURL=index.mjs.map
|