tldraw 3.16.0-internal.51e99e128bd4 → 3.16.0-internal.71f83a8a571b
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 +177 -110
- package/dist-cjs/index.js +29 -14
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/Tldraw.js +12 -2
- package/dist-cjs/lib/Tldraw.js.map +2 -2
- package/dist-cjs/lib/defaultExternalContentHandlers.js +5 -4
- package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/arrowLabel.js +6 -0
- package/dist-cjs/lib/shapes/arrow/arrowLabel.js.map +3 -3
- package/dist-cjs/lib/shapes/arrow/arrowTargetState.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/elbow/elbowArrowSnapLines.js.map +1 -1
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +4 -4
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/frame/FrameShapeTool.js.map +1 -1
- package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +8 -1
- package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js +2 -2
- package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js.map +2 -2
- package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +1 -0
- package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/image/ImageShapeUtil.js +3 -0
- package/dist-cjs/lib/shapes/image/ImageShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +2 -1
- package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/HyperlinkButton.js +4 -4
- package/dist-cjs/lib/shapes/shared/HyperlinkButton.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/PlainTextLabel.js +1 -3
- package/dist-cjs/lib/shapes/shared/PlainTextLabel.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/RichTextLabel.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/crop.js +1 -0
- package/dist-cjs/lib/shapes/shared/crop.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/useEditablePlainText.js +3 -4
- package/dist-cjs/lib/shapes/shared/useEditablePlainText.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/useEditableRichText.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js +0 -2
- package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js.map +2 -2
- package/dist-cjs/lib/shapes/text/PlainTextArea.js +2 -2
- package/dist-cjs/lib/shapes/text/PlainTextArea.js.map +2 -2
- package/dist-cjs/lib/shapes/text/RichTextArea.js +3 -3
- package/dist-cjs/lib/shapes/text/RichTextArea.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +1 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +2 -2
- package/dist-cjs/lib/ui/TldrawUi.js +13 -12
- package/dist-cjs/lib/ui/TldrawUi.js.map +2 -2
- package/dist-cjs/lib/ui/components/A11y.js +1 -1
- package/dist-cjs/lib/ui/components/A11y.js.map +2 -2
- package/dist-cjs/lib/ui/components/{FollowingIndicator.js → DefaultFollowingIndicator.js} +6 -6
- package/dist-cjs/lib/ui/components/DefaultFollowingIndicator.js.map +7 -0
- package/dist-cjs/lib/ui/components/EditLinkDialog.js +11 -1
- package/dist-cjs/lib/ui/components/EditLinkDialog.js.map +2 -2
- package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js +6 -6
- package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js.map +1 -1
- package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js +1 -1
- package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js +9 -4
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js.map +2 -2
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +255 -316
- package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
- package/dist-cjs/lib/ui/components/{primitives/TldrawUiButtonPicker.js → StylePanel/StylePanelButtonPicker.js} +52 -45
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelButtonPicker.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js +68 -0
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/{DoubleDropdownPicker.js → StylePanelDoubleDropdownPicker.js} +23 -22
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/{DropdownPicker.js → StylePanelDropdownPicker.js} +24 -21
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelDropdownPicker.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelSubheading.js +28 -0
- package/dist-cjs/lib/ui/components/StylePanel/StylePanelSubheading.js.map +7 -0
- package/dist-cjs/lib/ui/components/Toolbar/AltTextEditor.js +3 -2
- package/dist-cjs/lib/ui/components/Toolbar/AltTextEditor.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js +38 -9
- package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/DefaultVideoToolbarContent.js +15 -3
- package/dist-cjs/lib/ui/components/Toolbar/DefaultVideoToolbarContent.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/LinkEditor.js +3 -3
- package/dist-cjs/lib/ui/components/Toolbar/LinkEditor.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js +11 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiInput.js +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiInput.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js +18 -5
- package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js +2 -0
- package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +62 -36
- package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +5 -5
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +1 -1
- package/dist-cjs/lib/ui/context/actions.js +23 -10
- package/dist-cjs/lib/ui/context/actions.js.map +2 -2
- package/dist-cjs/lib/ui/context/components.js +2 -0
- package/dist-cjs/lib/ui/context/components.js.map +2 -2
- package/dist-cjs/lib/ui/context/events.js.map +1 -1
- package/dist-cjs/lib/ui/hooks/useClipboardEvents.js +1 -1
- package/dist-cjs/lib/ui/hooks/useClipboardEvents.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/useExportAs.js +3 -2
- package/dist-cjs/lib/ui/hooks/useExportAs.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/useTools.js +1 -1
- 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 +4 -2
- package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +2 -2
- package/dist-cjs/lib/ui/kbd-utils.js +9 -3
- package/dist-cjs/lib/ui/kbd-utils.js.map +2 -2
- package/dist-cjs/lib/ui/version.js +3 -3
- package/dist-cjs/lib/ui/version.js.map +1 -1
- package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js.map +1 -1
- package/dist-cjs/lib/utils/export/copyAs.js +1 -2
- package/dist-cjs/lib/utils/export/copyAs.js.map +2 -2
- package/dist-cjs/lib/utils/export/export.js +0 -20
- package/dist-cjs/lib/utils/export/export.js.map +2 -2
- package/dist-cjs/lib/utils/export/exportAs.js +1 -2
- package/dist-cjs/lib/utils/export/exportAs.js.map +2 -2
- package/dist-esm/index.d.mts +177 -110
- package/dist-esm/index.mjs +57 -29
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/Tldraw.mjs +14 -4
- package/dist-esm/lib/Tldraw.mjs.map +2 -2
- package/dist-esm/lib/defaultExternalContentHandlers.mjs +5 -4
- package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/arrowLabel.mjs +6 -0
- package/dist-esm/lib/shapes/arrow/arrowLabel.mjs.map +3 -3
- package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/elbow/elbowArrowSnapLines.mjs.map +1 -1
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +5 -5
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/frame/FrameShapeTool.mjs.map +1 -1
- package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +8 -1
- package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs +3 -3
- package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs.map +2 -2
- package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +1 -0
- package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs +3 -0
- package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +2 -1
- package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs +5 -5
- package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs +1 -3
- package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/RichTextLabel.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/crop.mjs +1 -0
- package/dist-esm/lib/shapes/shared/crop.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs +4 -5
- package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/useEditableRichText.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs +0 -2
- package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs.map +2 -2
- package/dist-esm/lib/shapes/text/PlainTextArea.mjs +3 -3
- package/dist-esm/lib/shapes/text/PlainTextArea.mjs.map +2 -2
- package/dist-esm/lib/shapes/text/RichTextArea.mjs +3 -4
- package/dist-esm/lib/shapes/text/RichTextArea.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +1 -1
- package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +2 -2
- package/dist-esm/lib/ui/TldrawUi.mjs +13 -12
- package/dist-esm/lib/ui/TldrawUi.mjs.map +2 -2
- package/dist-esm/lib/ui/components/A11y.mjs +2 -2
- package/dist-esm/lib/ui/components/A11y.mjs.map +2 -2
- package/dist-esm/lib/ui/components/{FollowingIndicator.mjs → DefaultFollowingIndicator.mjs} +3 -3
- package/dist-esm/lib/ui/components/DefaultFollowingIndicator.mjs.map +7 -0
- package/dist-esm/lib/ui/components/EditLinkDialog.mjs +11 -1
- package/dist-esm/lib/ui/components/EditLinkDialog.mjs.map +2 -2
- package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs +6 -6
- package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs.map +1 -1
- package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs +2 -2
- package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs +14 -5
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs.map +2 -2
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs +257 -320
- package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs.map +2 -2
- package/dist-esm/lib/ui/components/{primitives/TldrawUiButtonPicker.mjs → StylePanel/StylePanelButtonPicker.mjs} +54 -43
- package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs +48 -0
- package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/{DoubleDropdownPicker.mjs → StylePanelDoubleDropdownPicker.mjs} +20 -19
- package/dist-esm/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/{DropdownPicker.mjs → StylePanelDropdownPicker.mjs} +21 -18
- package/dist-esm/lib/ui/components/StylePanel/StylePanelDropdownPicker.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/StylePanelSubheading.mjs +8 -0
- package/dist-esm/lib/ui/components/StylePanel/StylePanelSubheading.mjs.map +7 -0
- package/dist-esm/lib/ui/components/Toolbar/AltTextEditor.mjs +3 -2
- package/dist-esm/lib/ui/components/Toolbar/AltTextEditor.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs +38 -9
- package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/DefaultVideoToolbarContent.mjs +15 -3
- package/dist-esm/lib/ui/components/Toolbar/DefaultVideoToolbarContent.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/LinkEditor.mjs +3 -3
- package/dist-esm/lib/ui/components/Toolbar/LinkEditor.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs +12 -3
- package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiInput.mjs +3 -3
- package/dist-esm/lib/ui/components/primitives/TldrawUiInput.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs +18 -5
- package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs +2 -0
- package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +63 -36
- package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +5 -5
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +1 -1
- package/dist-esm/lib/ui/context/actions.mjs +23 -10
- package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
- package/dist-esm/lib/ui/context/components.mjs +2 -0
- package/dist-esm/lib/ui/context/components.mjs.map +2 -2
- package/dist-esm/lib/ui/context/events.mjs.map +1 -1
- package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs +2 -2
- package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/useExportAs.mjs +3 -2
- package/dist-esm/lib/ui/hooks/useExportAs.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/useTools.mjs +1 -1
- package/dist-esm/lib/ui/hooks/useTools.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +4 -2
- package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +2 -2
- package/dist-esm/lib/ui/kbd-utils.mjs +9 -3
- package/dist-esm/lib/ui/kbd-utils.mjs.map +2 -2
- package/dist-esm/lib/ui/version.mjs +3 -3
- package/dist-esm/lib/ui/version.mjs.map +1 -1
- package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs.map +1 -1
- package/dist-esm/lib/utils/export/copyAs.mjs +1 -2
- package/dist-esm/lib/utils/export/copyAs.mjs.map +2 -2
- package/dist-esm/lib/utils/export/export.mjs +0 -20
- package/dist-esm/lib/utils/export/export.mjs.map +2 -2
- package/dist-esm/lib/utils/export/exportAs.mjs +1 -2
- package/dist-esm/lib/utils/export/exportAs.mjs.map +2 -2
- package/package.json +3 -3
- package/src/index.ts +41 -22
- package/src/lib/Tldraw.tsx +15 -2
- package/src/lib/defaultExternalContentHandlers.ts +12 -4
- package/src/lib/shapes/arrow/ArrowShapeTool.test.ts +2 -2
- package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +41 -0
- package/src/lib/shapes/arrow/arrowLabel.ts +8 -0
- package/src/lib/shapes/arrow/arrowTargetState.ts +1 -1
- package/src/lib/shapes/arrow/elbow/elbowArrowSnapLines.tsx +2 -2
- package/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx +5 -5
- package/src/lib/shapes/frame/FrameShapeTool.ts +1 -1
- package/src/lib/shapes/frame/FrameShapeUtil.tsx +9 -0
- package/src/lib/shapes/frame/components/FrameLabelInput.tsx +3 -3
- package/src/lib/shapes/geo/GeoShapeUtil.tsx +1 -0
- package/src/lib/shapes/image/ImageShapeUtil.tsx +3 -0
- package/src/lib/shapes/line/LineShapeUtil.test.tsx +4 -4
- package/src/lib/shapes/note/NoteShapeTool.test.ts +2 -1
- package/src/lib/shapes/note/NoteShapeUtil.tsx +1 -0
- package/src/lib/shapes/shared/HyperlinkButton.tsx +5 -5
- package/src/lib/shapes/shared/PlainTextLabel.tsx +2 -7
- package/src/lib/shapes/shared/RichTextLabel.tsx +2 -1
- package/src/lib/shapes/shared/crop.ts +1 -0
- package/src/lib/shapes/shared/useEditablePlainText.ts +12 -12
- package/src/lib/shapes/shared/useEditableRichText.ts +7 -3
- package/src/lib/shapes/shared/useImageOrVideoAsset.ts +0 -7
- package/src/lib/shapes/text/PlainTextArea.tsx +3 -3
- package/src/lib/shapes/text/RichTextArea.tsx +3 -4
- package/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +1 -1
- package/src/lib/ui/TldrawUi.tsx +16 -10
- package/src/lib/ui/components/A11y.tsx +2 -2
- package/src/lib/ui/components/{FollowingIndicator.tsx → DefaultFollowingIndicator.tsx} +2 -1
- package/src/lib/ui/components/EditLinkDialog.tsx +16 -6
- package/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.tsx +6 -6
- package/src/lib/ui/components/PageMenu/DefaultPageMenu.tsx +2 -2
- package/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx +27 -13
- package/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +260 -381
- package/src/lib/ui/components/{primitives/TldrawUiButtonPicker.tsx → StylePanel/StylePanelButtonPicker.tsx} +63 -50
- package/src/lib/ui/components/StylePanel/StylePanelContext.tsx +63 -0
- package/src/lib/ui/components/StylePanel/{DoubleDropdownPicker.tsx → StylePanelDoubleDropdownPicker.tsx} +28 -19
- package/src/lib/ui/components/StylePanel/StylePanelDropdownPicker.tsx +119 -0
- package/src/lib/ui/components/StylePanel/StylePanelSubheading.tsx +9 -0
- package/src/lib/ui/components/Toolbar/AltTextEditor.tsx +5 -4
- package/src/lib/ui/components/Toolbar/DefaultImageToolbarContent.tsx +32 -15
- package/src/lib/ui/components/Toolbar/DefaultVideoToolbarContent.tsx +12 -4
- package/src/lib/ui/components/Toolbar/LinkEditor.tsx +5 -5
- package/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx +8 -3
- package/src/lib/ui/components/primitives/TldrawUiInput.tsx +3 -3
- package/src/lib/ui/components/primitives/TldrawUiSlider.tsx +52 -32
- package/src/lib/ui/components/primitives/TldrawUiToolbar.tsx +3 -0
- package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +67 -29
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +6 -6
- package/src/lib/ui/context/actions.tsx +23 -10
- package/src/lib/ui/context/components.tsx +3 -0
- package/src/lib/ui/context/events.tsx +1 -1
- package/src/lib/ui/hooks/useClipboardEvents.ts +2 -2
- package/src/lib/ui/hooks/useExportAs.ts +3 -2
- package/src/lib/ui/hooks/useTools.tsx +1 -1
- package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +2 -0
- package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +4 -2
- package/src/lib/ui/kbd-utils.ts +10 -3
- package/src/lib/ui/version.ts +3 -3
- package/src/lib/ui.css +19 -2
- package/src/lib/utils/excalidraw/putExcalidrawContent.ts +6 -6
- package/src/lib/utils/export/copyAs.ts +1 -24
- package/src/lib/utils/export/export.ts +0 -36
- package/src/lib/utils/export/exportAs.ts +1 -32
- package/src/test/Editor.test.tsx +37 -10
- package/src/test/TldrawEditor.test.tsx +15 -9
- package/src/test/commands/putContent.test.ts +1 -0
- package/src/test/commands/updateShapes.test.ts +9 -5
- package/src/test/custom-clipping.test.ts +442 -0
- package/src/test/customSnapping.test.tsx +55 -41
- package/src/test/getCulledShapes.test.tsx +77 -2
- package/src/test/groups.test.tsx +4 -2
- package/src/test/translating.test.ts +2 -2
- package/tldraw.css +35 -5
- package/dist-cjs/lib/ui/components/FollowingIndicator.js.map +0 -7
- package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js.map +0 -7
- package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js.map +0 -7
- package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js.map +0 -7
- package/dist-esm/lib/ui/components/FollowingIndicator.mjs.map +0 -7
- package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs.map +0 -7
- package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs.map +0 -7
- package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs.map +0 -7
- package/src/lib/ui/components/StylePanel/DropdownPicker.tsx +0 -110
package/dist-esm/index.d.mts
CHANGED
|
@@ -68,7 +68,6 @@ import { TLClickEventInfo } from '@tldraw/editor';
|
|
|
68
68
|
import { TLContent } from '@tldraw/editor';
|
|
69
69
|
import { TLCropInfo } from '@tldraw/editor';
|
|
70
70
|
import { TLDefaultColorStyle } from '@tldraw/editor';
|
|
71
|
-
import { TLDefaultColorTheme } from '@tldraw/editor';
|
|
72
71
|
import { TLDefaultColorThemeColor } from '@tldraw/editor';
|
|
73
72
|
import { TLDefaultDashStyle } from '@tldraw/editor';
|
|
74
73
|
import { TLDefaultFillStyle } from '@tldraw/editor';
|
|
@@ -193,9 +192,6 @@ export declare class ArrowBindingUtil extends BindingUtil<TLArrowBinding> {
|
|
|
193
192
|
/** @public @react */
|
|
194
193
|
export declare function ArrowDownToolbarItem(): JSX_2.Element;
|
|
195
194
|
|
|
196
|
-
/** @public @react */
|
|
197
|
-
export declare function ArrowheadStylePickerSet({ styles }: StylePickerSetProps): JSX_2.Element | null;
|
|
198
|
-
|
|
199
195
|
/** @public @react */
|
|
200
196
|
export declare function ArrowLeftToolbarItem(): JSX_2.Element;
|
|
201
197
|
|
|
@@ -500,9 +496,6 @@ export declare function CloudToolbarItem(): JSX_2.Element;
|
|
|
500
496
|
/** @public @react */
|
|
501
497
|
export declare function ColorSchemeMenu(): JSX_2.Element;
|
|
502
498
|
|
|
503
|
-
/** @public @react */
|
|
504
|
-
export declare function CommonStylePickerSet({ styles, theme }: ThemeStylePickerSetProps): JSX_2.Element;
|
|
505
|
-
|
|
506
499
|
/**
|
|
507
500
|
* Contains the size within the given box size
|
|
508
501
|
*
|
|
@@ -534,14 +527,6 @@ export declare function ConvertToEmbedMenuItem(): JSX_2.Element | null;
|
|
|
534
527
|
*/
|
|
535
528
|
export declare function copyAs(editor: Editor, ids: TLShapeId[], opts: CopyAsOptions): Promise<void>;
|
|
536
529
|
|
|
537
|
-
/**
|
|
538
|
-
* @deprecated The format parameter is now part of the opts object.
|
|
539
|
-
* @public
|
|
540
|
-
*/
|
|
541
|
-
export declare function copyAs(editor: Editor, ids: TLShapeId[], format: TLCopyType, opts?: TLImageExportOptions & {
|
|
542
|
-
format?: undefined;
|
|
543
|
-
}): Promise<void>;
|
|
544
|
-
|
|
545
530
|
/** @public @react */
|
|
546
531
|
export declare function CopyAsMenuGroup(): JSX_2.Element;
|
|
547
532
|
|
|
@@ -853,6 +838,9 @@ export declare let defaultEditorAssetUrls: TLEditorAssetUrls;
|
|
|
853
838
|
/** @public */
|
|
854
839
|
export declare type DefaultEmbedDefinitionType = (typeof DEFAULT_EMBED_DEFINITIONS)[number]['type'];
|
|
855
840
|
|
|
841
|
+
/** @public @react */
|
|
842
|
+
export declare function DefaultFollowingIndicator(): JSX_2.Element | null;
|
|
843
|
+
|
|
856
844
|
/** @public */
|
|
857
845
|
export declare const DefaultFontFaces: TLDefaultFonts;
|
|
858
846
|
|
|
@@ -996,7 +984,7 @@ export declare function DefaultSharePanel(): JSX_2.Element;
|
|
|
996
984
|
export declare const DefaultStylePanel: NamedExoticComponent<TLUiStylePanelProps>;
|
|
997
985
|
|
|
998
986
|
/** @public @react */
|
|
999
|
-
export declare function DefaultStylePanelContent(
|
|
987
|
+
export declare function DefaultStylePanelContent(): JSX_2.Element;
|
|
1000
988
|
|
|
1001
989
|
/** @public @react */
|
|
1002
990
|
export declare const DefaultToasts: NamedExoticComponent<object>;
|
|
@@ -1489,12 +1477,6 @@ export declare interface ExampleDialogProps {
|
|
|
1489
1477
|
*/
|
|
1490
1478
|
export declare function exportAs(editor: Editor, ids: TLShapeId[], opts: ExportAsOptions): Promise<void>;
|
|
1491
1479
|
|
|
1492
|
-
/**
|
|
1493
|
-
* @deprecated The format & name parameters are now part of the opts object.
|
|
1494
|
-
* @public
|
|
1495
|
-
*/
|
|
1496
|
-
export declare function exportAs(editor: Editor, ids: TLShapeId[], format?: TLExportType, name?: string, opts?: TLImageExportOptions): Promise<void>;
|
|
1497
|
-
|
|
1498
1480
|
/** @public */
|
|
1499
1481
|
export declare interface ExportAsOptions extends TLImageExportOptions {
|
|
1500
1482
|
/** {@inheritdoc @tldraw/editor#TLImageExportOptions.format} */
|
|
@@ -1506,23 +1488,6 @@ export declare interface ExportAsOptions extends TLImageExportOptions {
|
|
|
1506
1488
|
/** @public @react */
|
|
1507
1489
|
export declare function ExportFileContentSubMenu(): JSX_2.Element;
|
|
1508
1490
|
|
|
1509
|
-
/**
|
|
1510
|
-
* Export the given shapes as a blob.
|
|
1511
|
-
* @param editor - The editor instance.
|
|
1512
|
-
* @param ids - The ids of the shapes to export.
|
|
1513
|
-
* @param format - The format to export as.
|
|
1514
|
-
* @param opts - Rendering options.
|
|
1515
|
-
* @returns A promise that resolves to a blob.
|
|
1516
|
-
* @deprecated Use {@link @tldraw/editor#Editor.toImage} instead.
|
|
1517
|
-
* @public
|
|
1518
|
-
*/
|
|
1519
|
-
export declare function exportToBlob({ editor, ids, format, opts, }: {
|
|
1520
|
-
editor: Editor;
|
|
1521
|
-
format: TLExportType;
|
|
1522
|
-
ids: TLShapeId[];
|
|
1523
|
-
opts?: TLImageExportOptions;
|
|
1524
|
-
}): Promise<Blob>;
|
|
1525
|
-
|
|
1526
1491
|
/** @public @react */
|
|
1527
1492
|
export declare function ExtrasGroup(): JSX_2.Element;
|
|
1528
1493
|
|
|
@@ -1563,7 +1528,7 @@ export declare interface FrameShapeOptions {
|
|
|
1563
1528
|
export declare class FrameShapeTool extends BaseBoxShapeTool {
|
|
1564
1529
|
static id: string;
|
|
1565
1530
|
static initial: string;
|
|
1566
|
-
shapeType:
|
|
1531
|
+
shapeType: "frame";
|
|
1567
1532
|
onCreate(shape: null | TLShape): void;
|
|
1568
1533
|
}
|
|
1569
1534
|
|
|
@@ -1579,6 +1544,7 @@ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
|
|
|
1579
1544
|
canEdit(): boolean;
|
|
1580
1545
|
canResize(): boolean;
|
|
1581
1546
|
canResizeChildren(): boolean;
|
|
1547
|
+
isExportBoundsContainer(): boolean;
|
|
1582
1548
|
getDefaultProps(): TLFrameShape['props'];
|
|
1583
1549
|
getAriaDescriptor(shape: TLFrameShape): string;
|
|
1584
1550
|
getGeometry(shape: TLFrameShape): Geometry2d;
|
|
@@ -1587,6 +1553,7 @@ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
|
|
|
1587
1553
|
toSvg(shape: TLFrameShape, ctx: SvgExportContext): JSX_2.Element;
|
|
1588
1554
|
indicator(shape: TLFrameShape): JSX_2.Element;
|
|
1589
1555
|
providesBackgroundForChildren(): boolean;
|
|
1556
|
+
getClipPath(shape: TLFrameShape): Vec[];
|
|
1590
1557
|
canReceiveNewChildrenOfType(shape: TLShape): boolean;
|
|
1591
1558
|
onResize(shape: any, info: TLResizeInfo<any>): any;
|
|
1592
1559
|
getInterpolatedProps(startShape: TLFrameShape, endShape: TLFrameShape, t: number): TLFrameShapeProps;
|
|
@@ -1735,9 +1702,6 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
|
|
|
1735
1702
|
getInterpolatedProps(startShape: TLGeoShape, endShape: TLGeoShape, t: number): TLGeoShapeProps;
|
|
1736
1703
|
}
|
|
1737
1704
|
|
|
1738
|
-
/** @public @react */
|
|
1739
|
-
export declare function GeoStylePickerSet({ styles }: StylePickerSetProps): JSX_2.Element | null;
|
|
1740
|
-
|
|
1741
1705
|
/** @public */
|
|
1742
1706
|
export declare function getArrowBindings(editor: Editor, shape: TLArrowShape): TLArrowBindings;
|
|
1743
1707
|
|
|
@@ -1898,6 +1862,7 @@ export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
|
|
|
1898
1862
|
static migrations: TLPropsMigrations;
|
|
1899
1863
|
isAspectRatioLocked(): boolean;
|
|
1900
1864
|
canCrop(): boolean;
|
|
1865
|
+
isExportBoundsContainer(): boolean;
|
|
1901
1866
|
getDefaultProps(): TLImageShape['props'];
|
|
1902
1867
|
getGeometry(shape: TLImageShape): Geometry2d;
|
|
1903
1868
|
getAriaDescriptor(shape: TLImageShape): string;
|
|
@@ -2148,6 +2113,16 @@ export declare class NoteShapeUtil extends ShapeUtil<TLNoteShape> {
|
|
|
2148
2113
|
/** @public @react */
|
|
2149
2114
|
export declare function NoteToolbarItem(): JSX_2.Element;
|
|
2150
2115
|
|
|
2116
|
+
/**
|
|
2117
|
+
* Checks if a file is allowed to be uploaded. If it is not, it will show a toast explaining why to the user.
|
|
2118
|
+
*
|
|
2119
|
+
* @param file - The file to check
|
|
2120
|
+
* @param options - The options for the external content handler
|
|
2121
|
+
* @returns True if the file is allowed, false otherwise
|
|
2122
|
+
* @public
|
|
2123
|
+
*/
|
|
2124
|
+
export declare function notifyIfFileNotAllowed(file: File, options: TLDefaultExternalContentHandlerOpts): boolean;
|
|
2125
|
+
|
|
2151
2126
|
/** @public @react */
|
|
2152
2127
|
export declare function OfflineIndicator(): JSX_2.Element;
|
|
2153
2128
|
|
|
@@ -2174,9 +2149,6 @@ export declare interface OnDragFromToolbarToCreateShapesOpts {
|
|
|
2174
2149
|
onDragEnd?(id: TLShapeId): void;
|
|
2175
2150
|
}
|
|
2176
2151
|
|
|
2177
|
-
/** @public @react */
|
|
2178
|
-
export declare function OpacitySlider(): JSX_2.Element | null;
|
|
2179
|
-
|
|
2180
2152
|
/** @public @react */
|
|
2181
2153
|
export declare function OvalToolbarItem(): JSX_2.Element;
|
|
2182
2154
|
|
|
@@ -2346,7 +2318,11 @@ export declare const PlainTextLabel: React_3.NamedExoticComponent<PlainTextLabel
|
|
|
2346
2318
|
/** @public */
|
|
2347
2319
|
export declare interface PlainTextLabelProps {
|
|
2348
2320
|
shapeId: TLShapeId;
|
|
2349
|
-
type:
|
|
2321
|
+
type: Extract<TLShape, {
|
|
2322
|
+
props: {
|
|
2323
|
+
text: string;
|
|
2324
|
+
};
|
|
2325
|
+
}>['type'];
|
|
2350
2326
|
font: TLDefaultFontStyle;
|
|
2351
2327
|
fontSize: number;
|
|
2352
2328
|
lineHeight: number;
|
|
@@ -2488,7 +2464,11 @@ export declare const RichTextLabel: React_3.NamedExoticComponent<RichTextLabelPr
|
|
|
2488
2464
|
/** @public */
|
|
2489
2465
|
export declare interface RichTextLabelProps {
|
|
2490
2466
|
shapeId: TLShapeId;
|
|
2491
|
-
type:
|
|
2467
|
+
type: Extract<TLShape, {
|
|
2468
|
+
props: {
|
|
2469
|
+
richText: TLRichText;
|
|
2470
|
+
};
|
|
2471
|
+
}>['type'];
|
|
2492
2472
|
font: TLDefaultFontStyle;
|
|
2493
2473
|
fontSize: number;
|
|
2494
2474
|
lineHeight: number;
|
|
@@ -2568,9 +2548,6 @@ export declare interface SolidPathBuilderOpts extends BasePathBuilderOpts {
|
|
|
2568
2548
|
|
|
2569
2549
|
/* Excluded from this release type: Spinner */
|
|
2570
2550
|
|
|
2571
|
-
/** @public @react */
|
|
2572
|
-
export declare function SplineStylePickerSet({ styles }: StylePickerSetProps): JSX_2.Element | null;
|
|
2573
|
-
|
|
2574
2551
|
/** @public @react */
|
|
2575
2552
|
export declare function StackMenuItems(): JSX_2.Element;
|
|
2576
2553
|
|
|
@@ -2628,11 +2605,124 @@ export declare interface StrokePoint {
|
|
|
2628
2605
|
radius: number;
|
|
2629
2606
|
}
|
|
2630
2607
|
|
|
2608
|
+
/** @public @react */
|
|
2609
|
+
export declare function StylePanelArrowheadPicker(): JSX_2.Element | null;
|
|
2610
|
+
|
|
2611
|
+
/** @public @react */
|
|
2612
|
+
export declare function StylePanelArrowKindPicker(): JSX_2.Element | null;
|
|
2613
|
+
|
|
2614
|
+
/** @public */
|
|
2615
|
+
export declare const StylePanelButtonPicker: <T extends string>(props: StylePanelButtonPickerProps<T>) => ReactElement;
|
|
2616
|
+
|
|
2617
|
+
/** @public */
|
|
2618
|
+
export declare interface StylePanelButtonPickerProps<T extends string> {
|
|
2619
|
+
title: string;
|
|
2620
|
+
uiType: string;
|
|
2621
|
+
style: StyleProp<T>;
|
|
2622
|
+
value: SharedStyle<T>;
|
|
2623
|
+
items: StyleValuesForUi<T>;
|
|
2624
|
+
onValueChange?(style: StyleProp<T>, value: T): void;
|
|
2625
|
+
onHistoryMark?(id: string): void;
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2628
|
+
/** @public @react */
|
|
2629
|
+
export declare function StylePanelColorPicker(): JSX_2.Element | null;
|
|
2630
|
+
|
|
2631
2631
|
/** @public */
|
|
2632
|
-
export declare interface
|
|
2632
|
+
export declare interface StylePanelContext {
|
|
2633
2633
|
styles: ReadonlySharedStyleMap;
|
|
2634
|
+
showUiLabels: boolean;
|
|
2635
|
+
onHistoryMark(id: string): void;
|
|
2636
|
+
onValueChange<T>(style: StyleProp<T>, value: T): void;
|
|
2634
2637
|
}
|
|
2635
2638
|
|
|
2639
|
+
/** @public @react */
|
|
2640
|
+
export declare function StylePanelContextProvider({ children, styles }: StylePanelContextProviderProps): JSX_2.Element;
|
|
2641
|
+
|
|
2642
|
+
/** @public */
|
|
2643
|
+
export declare interface StylePanelContextProviderProps {
|
|
2644
|
+
children: React.ReactNode;
|
|
2645
|
+
styles: ReadonlySharedStyleMap;
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2648
|
+
/** @public @react */
|
|
2649
|
+
export declare function StylePanelDashPicker(): JSX_2.Element | null;
|
|
2650
|
+
|
|
2651
|
+
/** @public @react */
|
|
2652
|
+
export declare const StylePanelDoubleDropdownPicker: <T extends string>(props: StylePanelDoubleDropdownPickerProps<T>) => React_2.JSX.Element;
|
|
2653
|
+
|
|
2654
|
+
/** @public */
|
|
2655
|
+
export declare interface StylePanelDoubleDropdownPickerProps<T extends string> {
|
|
2656
|
+
uiTypeA: string;
|
|
2657
|
+
uiTypeB: string;
|
|
2658
|
+
label: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
|
|
2659
|
+
labelA: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
|
|
2660
|
+
labelB: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
|
|
2661
|
+
itemsA: StyleValuesForUi<T>;
|
|
2662
|
+
itemsB: StyleValuesForUi<T>;
|
|
2663
|
+
styleA: StyleProp<T>;
|
|
2664
|
+
styleB: StyleProp<T>;
|
|
2665
|
+
valueA: SharedStyle<T>;
|
|
2666
|
+
valueB: SharedStyle<T>;
|
|
2667
|
+
onValueChange?(style: StyleProp<T>, value: T): void;
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2670
|
+
/** @public @react */
|
|
2671
|
+
export declare const StylePanelDropdownPicker: <T extends string>(props: StylePanelDropdownPickerProps<T>) => React_2.JSX.Element;
|
|
2672
|
+
|
|
2673
|
+
/** @public */
|
|
2674
|
+
export declare interface StylePanelDropdownPickerProps<T extends string> {
|
|
2675
|
+
id: string;
|
|
2676
|
+
label?: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
|
|
2677
|
+
uiType: string;
|
|
2678
|
+
stylePanelType: string;
|
|
2679
|
+
style: StyleProp<T>;
|
|
2680
|
+
value: SharedStyle<T>;
|
|
2681
|
+
items: StyleValuesForUi<T>;
|
|
2682
|
+
type: 'icon' | 'menu' | 'tool';
|
|
2683
|
+
onValueChange?(style: StyleProp<T>, value: T): void;
|
|
2684
|
+
}
|
|
2685
|
+
|
|
2686
|
+
/** @public @react */
|
|
2687
|
+
export declare function StylePanelFillPicker(): JSX_2.Element | null;
|
|
2688
|
+
|
|
2689
|
+
/** @public @react */
|
|
2690
|
+
export declare function StylePanelFontPicker(): JSX_2.Element | null;
|
|
2691
|
+
|
|
2692
|
+
/** @public @react */
|
|
2693
|
+
export declare function StylePanelGeoShapePicker(): JSX_2.Element | null;
|
|
2694
|
+
|
|
2695
|
+
/** @public @react */
|
|
2696
|
+
export declare function StylePanelLabelAlignPicker(): JSX_2.Element | null;
|
|
2697
|
+
|
|
2698
|
+
/** @public @react */
|
|
2699
|
+
export declare function StylePanelOpacityPicker(): JSX_2.Element | null;
|
|
2700
|
+
|
|
2701
|
+
/** @public @react */
|
|
2702
|
+
export declare function StylePanelSection({ children }: StylePanelSectionProps): JSX_2.Element;
|
|
2703
|
+
|
|
2704
|
+
/** @public */
|
|
2705
|
+
export declare interface StylePanelSectionProps {
|
|
2706
|
+
children: React_3.ReactNode;
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
/** @public @react */
|
|
2710
|
+
export declare function StylePanelSizePicker(): JSX_2.Element | null;
|
|
2711
|
+
|
|
2712
|
+
/** @public @react */
|
|
2713
|
+
export declare function StylePanelSplinePicker(): JSX_2.Element | null;
|
|
2714
|
+
|
|
2715
|
+
/** @public @react */
|
|
2716
|
+
export declare function StylePanelSubheading({ children }: StylePanelSubheadingProps): JSX_2.Element;
|
|
2717
|
+
|
|
2718
|
+
/** @public */
|
|
2719
|
+
export declare interface StylePanelSubheadingProps {
|
|
2720
|
+
children: React.ReactNode;
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
/** @public @react */
|
|
2724
|
+
export declare function StylePanelTextAlignPicker(): JSX_2.Element | null;
|
|
2725
|
+
|
|
2636
2726
|
/** @public */
|
|
2637
2727
|
export declare type StyleValuesForUi<T> = readonly {
|
|
2638
2728
|
readonly icon: string | TLUiIconJsx;
|
|
@@ -2672,12 +2762,6 @@ export declare interface TextAreaProps {
|
|
|
2672
2762
|
*/
|
|
2673
2763
|
export declare const TextDirection: Extension<any, any>;
|
|
2674
2764
|
|
|
2675
|
-
/**
|
|
2676
|
-
* @deprecated Use `PlainTextLabel` instead.
|
|
2677
|
-
* @public
|
|
2678
|
-
*/
|
|
2679
|
-
export declare const TextLabel: React_3.NamedExoticComponent<PlainTextLabelProps>;
|
|
2680
|
-
|
|
2681
2765
|
/** @public */
|
|
2682
2766
|
export declare interface TextShapeOptions {
|
|
2683
2767
|
/** How much addition padding should be added to the horizontal geometry of the shape when binding to an arrow? */
|
|
@@ -2755,18 +2839,9 @@ export declare class TextShapeUtil extends ShapeUtil<TLTextShape> {
|
|
|
2755
2839
|
} | undefined;
|
|
2756
2840
|
}
|
|
2757
2841
|
|
|
2758
|
-
/** @public @react */
|
|
2759
|
-
export declare function TextStylePickerSet({ theme, styles }: ThemeStylePickerSetProps): JSX_2.Element | null;
|
|
2760
|
-
|
|
2761
2842
|
/** @public @react */
|
|
2762
2843
|
export declare function TextToolbarItem(): JSX_2.Element;
|
|
2763
2844
|
|
|
2764
|
-
/** @public */
|
|
2765
|
-
export declare interface ThemeStylePickerSetProps {
|
|
2766
|
-
styles: ReadonlySharedStyleMap;
|
|
2767
|
-
theme: TLDefaultColorTheme;
|
|
2768
|
-
}
|
|
2769
|
-
|
|
2770
2845
|
/**
|
|
2771
2846
|
* Default extensions for the TipTap editor.
|
|
2772
2847
|
*
|
|
@@ -3023,9 +3098,6 @@ export declare function TldrawUiButtonIcon({ icon, small, invertIcon }: TLUiButt
|
|
|
3023
3098
|
/** @public @react */
|
|
3024
3099
|
export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps): JSX_2.Element;
|
|
3025
3100
|
|
|
3026
|
-
/** @public */
|
|
3027
|
-
export declare const TldrawUiButtonPicker: <T extends string>(props: TLUiButtonPickerProps<T>) => ReactElement;
|
|
3028
|
-
|
|
3029
3101
|
/**
|
|
3030
3102
|
* A column, usually of UI controls like buttons, select dropdown, checkboxes, etc.
|
|
3031
3103
|
*
|
|
@@ -3105,6 +3177,9 @@ export declare const TldrawUiGrid: ForwardRefExoticComponent<TLUiLayoutProps & R
|
|
|
3105
3177
|
/** @public @react */
|
|
3106
3178
|
export declare const TldrawUiIcon: NamedExoticComponent<TLUiIconProps>;
|
|
3107
3179
|
|
|
3180
|
+
/** @public @react */
|
|
3181
|
+
export declare function TldrawUiInFrontOfTheCanvas(): JSX_2.Element;
|
|
3182
|
+
|
|
3108
3183
|
/** @public @react */
|
|
3109
3184
|
export declare const TldrawUiInput: React_2.ForwardRefExoticComponent<TLUiInputProps & React_2.RefAttributes<HTMLInputElement>>;
|
|
3110
3185
|
|
|
@@ -3202,7 +3277,7 @@ export declare const TldrawUiToolbar: React_3.ForwardRefExoticComponent<TLUiTool
|
|
|
3202
3277
|
export declare const TldrawUiToolbarButton: React_3.ForwardRefExoticComponent<TLUiToolbarButtonProps & React_3.RefAttributes<HTMLButtonElement>>;
|
|
3203
3278
|
|
|
3204
3279
|
/** @public @react */
|
|
3205
|
-
export declare const TldrawUiToolbarToggleGroup: ({ children, className, type, ...props }: TLUiToolbarToggleGroupProps) => JSX_2.Element;
|
|
3280
|
+
export declare const TldrawUiToolbarToggleGroup: ({ children, className, type, asChild, ...props }: TLUiToolbarToggleGroupProps) => JSX_2.Element;
|
|
3206
3281
|
|
|
3207
3282
|
/** @public @react */
|
|
3208
3283
|
export declare const TldrawUiToolbarToggleItem: ({ children, className, type, value, tooltip, ...props }: TLUiToolbarToggleItemProps) => JSX_2.Element;
|
|
@@ -3389,18 +3464,6 @@ export declare interface TLUiButtonLabelProps {
|
|
|
3389
3464
|
children?: ReactNode;
|
|
3390
3465
|
}
|
|
3391
3466
|
|
|
3392
|
-
/** @public */
|
|
3393
|
-
export declare interface TLUiButtonPickerProps<T extends string> {
|
|
3394
|
-
title: string;
|
|
3395
|
-
uiType: string;
|
|
3396
|
-
style: StyleProp<T>;
|
|
3397
|
-
value: SharedStyle<T>;
|
|
3398
|
-
items: StyleValuesForUi<T>;
|
|
3399
|
-
theme: TLDefaultColorTheme;
|
|
3400
|
-
onValueChange(style: StyleProp<T>, value: T): void;
|
|
3401
|
-
onHistoryMark?(id: string): void;
|
|
3402
|
-
}
|
|
3403
|
-
|
|
3404
3467
|
/** @public */
|
|
3405
3468
|
export declare interface TLUiButtonProps extends React_2.HTMLAttributes<HTMLButtonElement> {
|
|
3406
3469
|
disabled?: boolean;
|
|
@@ -3435,6 +3498,7 @@ export declare interface TLUiComponents {
|
|
|
3435
3498
|
Dialogs?: ComponentType | null;
|
|
3436
3499
|
Toasts?: ComponentType | null;
|
|
3437
3500
|
A11y?: ComponentType | null;
|
|
3501
|
+
FollowingIndicator?: ComponentType | null;
|
|
3438
3502
|
}
|
|
3439
3503
|
|
|
3440
3504
|
/** @public */
|
|
@@ -3760,7 +3824,7 @@ export declare interface TLUiEventMap {
|
|
|
3760
3824
|
'flatten-to-image': null;
|
|
3761
3825
|
'a11y-repeat-shape-announce': null;
|
|
3762
3826
|
'open-url': {
|
|
3763
|
-
|
|
3827
|
+
destinationUrl: string;
|
|
3764
3828
|
};
|
|
3765
3829
|
'open-context-menu': null;
|
|
3766
3830
|
'adjust-shape-styles': null;
|
|
@@ -4035,19 +4099,15 @@ export declare interface TLUiSliderProps {
|
|
|
4035
4099
|
label: string;
|
|
4036
4100
|
title: string;
|
|
4037
4101
|
onValueChange(value: number): void;
|
|
4038
|
-
onHistoryMark(id: string): void;
|
|
4102
|
+
onHistoryMark?(id: string): void;
|
|
4039
4103
|
'data-testid'?: string;
|
|
4040
4104
|
ariaValueModifier?: number;
|
|
4041
4105
|
}
|
|
4042
4106
|
|
|
4043
|
-
/** @public */
|
|
4044
|
-
export declare interface TLUiStylePanelContentProps {
|
|
4045
|
-
styles: ReturnType<typeof useRelevantStyles>;
|
|
4046
|
-
}
|
|
4047
|
-
|
|
4048
4107
|
/** @public */
|
|
4049
4108
|
export declare interface TLUiStylePanelProps {
|
|
4050
4109
|
isMobile?: boolean;
|
|
4110
|
+
styles?: null | ReadonlySharedStyleMap;
|
|
4051
4111
|
children?: ReactNode;
|
|
4052
4112
|
}
|
|
4053
4113
|
|
|
@@ -4116,6 +4176,7 @@ export declare interface TLUiToolbarToggleGroupProps extends React_3.HTMLAttribu
|
|
|
4116
4176
|
value: any;
|
|
4117
4177
|
defaultValue?: any;
|
|
4118
4178
|
type: 'multiple' | 'single';
|
|
4179
|
+
asChild?: boolean;
|
|
4119
4180
|
}
|
|
4120
4181
|
|
|
4121
4182
|
/** @public */
|
|
@@ -4170,7 +4231,7 @@ export declare interface TLUiTranslation {
|
|
|
4170
4231
|
export declare type TLUiTranslationContextType = TLUiTranslation;
|
|
4171
4232
|
|
|
4172
4233
|
/** @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';
|
|
4234
|
+
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-2' | 'geo-style.rhombus' | 'geo-style.star' | 'geo-style.trapezoid' | 'geo-style.triangle' | 'geo-style.x-box' | 'handle.crop.bottom-left' | 'handle.crop.bottom-right' | 'handle.crop.bottom' | 'handle.crop.left' | 'handle.crop.right' | 'handle.crop.top-left' | 'handle.crop.top-right' | 'handle.crop.top' | 'handle.resize-bottom-left' | 'handle.resize-bottom-right' | 'handle.resize-bottom' | 'handle.resize-left' | 'handle.resize-right' | 'handle.resize-top-left' | 'handle.resize-top-right' | 'handle.resize-top' | 'handle.rotate.bottom_left_rotate' | 'handle.rotate.bottom_right_rotate' | 'handle.rotate.mobile_rotate' | 'handle.rotate.top_left_rotate' | 'handle.rotate.top_right_rotate' | 'help-menu.about' | 'help-menu.discord' | 'help-menu.github' | 'help-menu.import-tldr-file' | 'help-menu.keyboard-shortcuts' | 'help-menu.privacy' | 'help-menu.terms' | 'help-menu.title' | 'help-menu.twitter' | 'menu.accessibility' | 'menu.copy-as' | 'menu.edit' | 'menu.export-as' | 'menu.file' | 'menu.language' | 'menu.preferences' | 'menu.theme' | 'menu.title' | 'menu.view' | 'navigation-zone.minimap' | 'navigation-zone.title' | 'navigation-zone.toggle-minimap' | 'navigation-zone.zoom' | 'opacity-style.0.1' | 'opacity-style.0.25' | 'opacity-style.0.5' | 'opacity-style.0.75' | 'opacity-style.1' | 'page-menu.create-new-page' | 'page-menu.edit-done' | 'page-menu.edit-start' | 'page-menu.go-to-page' | 'page-menu.max-page-count-reached' | 'page-menu.new-page-initial-name' | 'page-menu.submenu.delete' | 'page-menu.submenu.duplicate-page' | 'page-menu.submenu.move-down' | 'page-menu.submenu.move-up' | 'page-menu.submenu.rename' | 'page-menu.submenu.title' | 'page-menu.title' | 'people-menu.anonymous-user' | 'people-menu.avatar-color' | 'people-menu.change-color' | 'people-menu.change-name' | 'people-menu.follow' | 'people-menu.following' | 'people-menu.invite' | 'people-menu.leading' | 'people-menu.title' | 'people-menu.user' | 'share-menu.copied' | 'share-menu.copy-link-note' | 'share-menu.copy-link' | 'share-menu.copy-readonly-link-note' | 'share-menu.copy-readonly-link' | 'share-menu.create-snapshot-link' | 'share-menu.creating-project' | 'share-menu.fork-note' | 'share-menu.offline-note' | 'share-menu.project-too-large' | 'share-menu.save-note' | 'share-menu.share-project' | 'share-menu.snapshot-link-note' | 'share-menu.title' | 'share-menu.upload-failed' | 'sharing.confirm-leave.cancel' | 'sharing.confirm-leave.description' | 'sharing.confirm-leave.dont-show-again' | 'sharing.confirm-leave.leave' | 'sharing.confirm-leave.title' | 'shortcuts-dialog.a11y' | 'shortcuts-dialog.collaboration' | 'shortcuts-dialog.edit' | 'shortcuts-dialog.file' | 'shortcuts-dialog.preferences' | 'shortcuts-dialog.text-formatting' | 'shortcuts-dialog.title' | 'shortcuts-dialog.tools' | 'shortcuts-dialog.transform' | 'shortcuts-dialog.view' | 'size-style.l' | 'size-style.m' | 'size-style.s' | 'size-style.xl' | 'spline-style.cubic' | 'spline-style.line' | 'status.offline' | 'style-panel.align' | 'style-panel.arrow-kind' | 'style-panel.arrowhead-end' | 'style-panel.arrowhead-start' | 'style-panel.arrowheads' | 'style-panel.color' | 'style-panel.dash' | 'style-panel.fill' | 'style-panel.font' | 'style-panel.geo' | 'style-panel.label-align' | 'style-panel.mixed' | 'style-panel.opacity' | 'style-panel.position' | 'style-panel.size' | 'style-panel.spline' | 'style-panel.title' | 'style-panel.vertical-align' | 'theme.dark' | 'theme.light' | 'theme.system' | 'toast.close' | 'toast.error.copy-fail.desc' | 'toast.error.copy-fail.title' | 'toast.error.export-fail.desc' | 'toast.error.export-fail.title' | 'toast.error' | 'toast.info' | 'toast.success' | 'toast.warning' | 'tool-panel.more' | 'tool-panel.title' | 'tool.arrow-down' | 'tool.arrow-left' | 'tool.arrow-right' | 'tool.arrow-up' | 'tool.arrow' | 'tool.aspect-ratio.circle' | 'tool.aspect-ratio.landscape' | 'tool.aspect-ratio.original' | 'tool.aspect-ratio.portrait' | 'tool.aspect-ratio.square' | 'tool.aspect-ratio.wide' | 'tool.aspect-ratio' | 'tool.bookmark' | 'tool.check-box' | 'tool.cloud' | 'tool.diamond' | 'tool.draw' | 'tool.ellipse' | 'tool.embed' | 'tool.eraser' | 'tool.flip-horz' | 'tool.flip-vert' | 'tool.frame' | 'tool.hand' | 'tool.heart' | 'tool.hexagon' | 'tool.highlight' | 'tool.image-crop-confirm' | 'tool.image-crop' | 'tool.image-toolbar-title' | 'tool.image-zoom' | 'tool.laser' | 'tool.line' | 'tool.media-alt-text-confirm' | 'tool.media-alt-text-desc' | 'tool.media-alt-text' | 'tool.media' | 'tool.note' | 'tool.octagon' | 'tool.oval' | 'tool.pentagon' | 'tool.pointer-down' | 'tool.rectangle' | 'tool.replace-media' | 'tool.rhombus' | 'tool.rich-text-bold' | 'tool.rich-text-bulletList' | 'tool.rich-text-code' | 'tool.rich-text-header' | 'tool.rich-text-highlight' | 'tool.rich-text-italic' | 'tool.rich-text-link-remove' | 'tool.rich-text-link-visit' | 'tool.rich-text-link' | 'tool.rich-text-orderedList' | 'tool.rich-text-strikethrough' | 'tool.rich-text-toolbar-title' | 'tool.rotate-cw' | 'tool.select' | 'tool.star' | 'tool.text' | 'tool.trapezoid' | 'tool.triangle' | 'tool.x-box' | 'ui.checked' | 'ui.close' | 'ui.unchecked' | 'verticalAlign-style.end' | 'verticalAlign-style.middle' | 'verticalAlign-style.start' | 'vscode.file-open.backup-failed' | 'vscode.file-open.backup-saved' | 'vscode.file-open.backup' | 'vscode.file-open.desc' | 'vscode.file-open.dont-show-again' | 'vscode.file-open.open';
|
|
4174
4235
|
|
|
4175
4236
|
/** @public */
|
|
4176
4237
|
export declare interface TLUiTranslationProviderProps {
|
|
@@ -4352,13 +4413,6 @@ export declare function useA11y(): TLUiA11yContextType;
|
|
|
4352
4413
|
/** @public */
|
|
4353
4414
|
export declare function useActions(): TLUiActionsContextType;
|
|
4354
4415
|
|
|
4355
|
-
/**
|
|
4356
|
-
* @deprecated Use {@link useImageOrVideoAsset} instead.
|
|
4357
|
-
*
|
|
4358
|
-
* @public
|
|
4359
|
-
*/
|
|
4360
|
-
export declare const useAsset: typeof useImageOrVideoAsset;
|
|
4361
|
-
|
|
4362
4416
|
/* Excluded from this release type: useAssetUrls */
|
|
4363
4417
|
|
|
4364
4418
|
/** @public */
|
|
@@ -4413,7 +4467,11 @@ export declare function useDefaultHelpers(): {
|
|
|
4413
4467
|
copy: (source: TLUiEventSource) => Promise<void>;
|
|
4414
4468
|
copyAs: (ids: TLShapeId[], format?: TLCopyType) => void;
|
|
4415
4469
|
cut: (source: TLUiEventSource) => Promise<void>;
|
|
4416
|
-
exportAs: (ids: TLShapeId[],
|
|
4470
|
+
exportAs: (ids: TLShapeId[], opts?: {
|
|
4471
|
+
format?: TLExportType;
|
|
4472
|
+
name?: string;
|
|
4473
|
+
scale?: number;
|
|
4474
|
+
}) => void;
|
|
4417
4475
|
getEmbedDefinition: (url: string) => TLEmbedResult;
|
|
4418
4476
|
insertMedia: () => Promise<void>;
|
|
4419
4477
|
isMobile: boolean;
|
|
@@ -4430,12 +4488,16 @@ export declare function useDefaultHelpers(): {
|
|
|
4430
4488
|
export declare function useDialogs(): TLUiDialogsContextType;
|
|
4431
4489
|
|
|
4432
4490
|
/** @public */
|
|
4433
|
-
export declare function useEditablePlainText(shapeId: TLShapeId, type:
|
|
4491
|
+
export declare function useEditablePlainText(shapeId: TLShapeId, type: Extract<TLShape, {
|
|
4492
|
+
props: {
|
|
4493
|
+
text: string;
|
|
4494
|
+
};
|
|
4495
|
+
}>['type'], text?: string): {
|
|
4434
4496
|
handleBlur: () => void;
|
|
4435
4497
|
handleChange: ({ plaintext }: {
|
|
4436
4498
|
plaintext: string;
|
|
4437
4499
|
}) => void;
|
|
4438
|
-
handleDoubleClick: (e:
|
|
4500
|
+
handleDoubleClick: (e: React_3.MouseEvent) => void;
|
|
4439
4501
|
handleFocus: () => void;
|
|
4440
4502
|
handleInputPointerDown: (e: React_3.PointerEvent) => void;
|
|
4441
4503
|
handleKeyDown: (e: KeyboardEvent) => void;
|
|
@@ -4447,12 +4509,16 @@ export declare function useEditablePlainText(shapeId: TLShapeId, type: string, t
|
|
|
4447
4509
|
};
|
|
4448
4510
|
|
|
4449
4511
|
/** @public */
|
|
4450
|
-
export declare function useEditableRichText(shapeId: TLShapeId, type:
|
|
4512
|
+
export declare function useEditableRichText(shapeId: TLShapeId, type: Extract<TLShape, {
|
|
4513
|
+
props: {
|
|
4514
|
+
richText: TLRichText;
|
|
4515
|
+
};
|
|
4516
|
+
}>['type'], richText?: TLRichText): {
|
|
4451
4517
|
handleBlur: () => void;
|
|
4452
4518
|
handleChange: ({ richText }: {
|
|
4453
4519
|
richText: TLRichText;
|
|
4454
4520
|
}) => void;
|
|
4455
|
-
handleDoubleClick: (e:
|
|
4521
|
+
handleDoubleClick: (e: React.MouseEvent) => void;
|
|
4456
4522
|
handleFocus: () => void;
|
|
4457
4523
|
handleInputPointerDown: (e: React.PointerEvent) => void;
|
|
4458
4524
|
handleKeyDown: (e: KeyboardEvent) => void;
|
|
@@ -4463,14 +4529,12 @@ export declare function useEditableRichText(shapeId: TLShapeId, type: string, ri
|
|
|
4463
4529
|
rInput: RefObject<HTMLDivElement>;
|
|
4464
4530
|
};
|
|
4465
4531
|
|
|
4466
|
-
/**
|
|
4467
|
-
* @deprecated Use `useEditablePlainText` instead.
|
|
4468
|
-
* @public
|
|
4469
|
-
*/
|
|
4470
|
-
export declare const useEditableText: typeof useEditablePlainText;
|
|
4471
|
-
|
|
4472
4532
|
/** @public */
|
|
4473
|
-
export declare function useExportAs(): (ids: TLShapeId[],
|
|
4533
|
+
export declare function useExportAs(): (ids: TLShapeId[], opts?: {
|
|
4534
|
+
format?: TLExportType;
|
|
4535
|
+
name?: string;
|
|
4536
|
+
scale?: number;
|
|
4537
|
+
}) => void;
|
|
4474
4538
|
|
|
4475
4539
|
/**
|
|
4476
4540
|
* This is a handy helper hook that resolves an asset to an optimized URL for a given shape, or its
|
|
@@ -4544,6 +4608,9 @@ export declare const useSelectedShapesAnnouncer: () => void;
|
|
|
4544
4608
|
/** @public */
|
|
4545
4609
|
export declare function useShowCollaborationUi(): boolean;
|
|
4546
4610
|
|
|
4611
|
+
/** @public */
|
|
4612
|
+
export declare function useStylePanelContext(): StylePanelContext;
|
|
4613
|
+
|
|
4547
4614
|
/** @public */
|
|
4548
4615
|
export declare function useTldrawUiComponents(): TLUiComponents;
|
|
4549
4616
|
|