tldraw 4.3.0-next.f13438eb7775 → 4.3.0
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/README.md +0 -2
- package/dist-cjs/index.d.ts +311 -242
- package/dist-cjs/index.js +13 -5
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/bindings/arrow/ArrowBindingUtil.js.map +2 -2
- package/dist-cjs/lib/canvas/TldrawSelectionForeground.js +2 -2
- package/dist-cjs/lib/canvas/TldrawSelectionForeground.js.map +2 -2
- package/dist-cjs/lib/defaultEmbedDefinitions.js +1 -1
- package/dist-cjs/lib/defaultEmbedDefinitions.js.map +2 -2
- package/dist-cjs/lib/defaultExternalContentHandlers.js +5 -5
- package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
- package/dist-cjs/lib/defaultSideEffects.js +6 -1
- package/dist-cjs/lib/defaultSideEffects.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +14 -13
- package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/arrow-types.js.map +1 -1
- package/dist-cjs/lib/shapes/arrow/arrowLabel.js +1 -1
- package/dist-cjs/lib/shapes/arrow/arrowLabel.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/arrowTargetState.js +1 -1
- package/dist-cjs/lib/shapes/arrow/arrowTargetState.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/elbow/elbowArrowSnapLines.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/elbow/getElbowArrowInfo.js +1 -1
- package/dist-cjs/lib/shapes/arrow/elbow/getElbowArrowInfo.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/shared.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/toolStates/Idle.js +4 -10
- package/dist-cjs/lib/shapes/arrow/toolStates/Idle.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js +7 -4
- package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js.map +2 -2
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +1 -1
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/bookmark/bookmarks.js.map +2 -2
- package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js +25 -23
- package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/draw/getPath.js +20 -11
- package/dist-cjs/lib/shapes/draw/getPath.js.map +2 -2
- package/dist-cjs/lib/shapes/draw/toolStates/Drawing.js +82 -86
- package/dist-cjs/lib/shapes/draw/toolStates/Drawing.js.map +3 -3
- package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +6 -0
- package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/frame/FrameShapeTool.js.map +1 -1
- package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +6 -5
- package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +146 -142
- package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/geo/toolStates/Idle.js +5 -10
- package/dist-cjs/lib/shapes/geo/toolStates/Idle.js.map +2 -2
- package/dist-cjs/lib/shapes/geo/toolStates/Pointing.js +3 -3
- package/dist-cjs/lib/shapes/geo/toolStates/Pointing.js.map +2 -2
- package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +23 -21
- package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/line/toolStates/Pointing.js +3 -3
- package/dist-cjs/lib/shapes/line/toolStates/Pointing.js.map +2 -2
- package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +6 -11
- package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/note/noteHelpers.js.map +2 -2
- package/dist-cjs/lib/shapes/note/toolStates/Pointing.js +5 -10
- package/dist-cjs/lib/shapes/note/toolStates/Pointing.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/HyperlinkButton.js +3 -2
- package/dist-cjs/lib/shapes/shared/HyperlinkButton.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/PlainTextLabel.js +14 -2
- package/dist-cjs/lib/shapes/shared/PlainTextLabel.js.map +3 -3
- package/dist-cjs/lib/shapes/shared/RichTextLabel.js +12 -4
- package/dist-cjs/lib/shapes/shared/RichTextLabel.js.map +3 -3
- package/dist-cjs/lib/shapes/shared/ShapeFill.js +2 -2
- package/dist-cjs/lib/shapes/shared/ShapeFill.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/interpolate-props.js +3 -3
- package/dist-cjs/lib/shapes/shared/interpolate-props.js.map +2 -2
- 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/{useForceSolid.js → useEfficientZoomThreshold.js} +10 -7
- package/dist-cjs/lib/shapes/shared/useEfficientZoomThreshold.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js +1 -1
- package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js.map +2 -2
- package/dist-cjs/lib/shapes/text/RichTextArea.js +5 -0
- package/dist-cjs/lib/shapes/text/RichTextArea.js.map +2 -2
- package/dist-cjs/lib/shapes/text/TextShapeUtil.js +5 -2
- package/dist-cjs/lib/shapes/text/TextShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/text/toolStates/Idle.js +4 -10
- package/dist-cjs/lib/shapes/text/toolStates/Idle.js.map +2 -2
- package/dist-cjs/lib/shapes/text/toolStates/Pointing.js +7 -5
- package/dist-cjs/lib/shapes/text/toolStates/Pointing.js.map +2 -2
- package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +1 -1
- package/dist-cjs/lib/shapes/video/VideoShapeUtil.js.map +2 -2
- package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js +4 -5
- package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js.map +2 -2
- package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js +2 -4
- package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js.map +2 -2
- package/dist-cjs/lib/tools/HandTool/HandTool.js +3 -5
- package/dist-cjs/lib/tools/HandTool/HandTool.js.map +2 -2
- package/dist-cjs/lib/tools/HandTool/childStates/Dragging.js +3 -2
- package/dist-cjs/lib/tools/HandTool/childStates/Dragging.js.map +2 -2
- package/dist-cjs/lib/tools/HandTool/childStates/Pointing.js +1 -1
- package/dist-cjs/lib/tools/HandTool/childStates/Pointing.js.map +2 -2
- package/dist-cjs/lib/tools/LaserTool/childStates/Lasering.js +1 -1
- package/dist-cjs/lib/tools/LaserTool/childStates/Lasering.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/DragAndDropManager.js +10 -11
- package/dist-cjs/lib/tools/SelectTool/DragAndDropManager.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Brushing.js +6 -5
- package/dist-cjs/lib/tools/SelectTool/childStates/Brushing.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Cropping.js +4 -6
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Cropping.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Idle.js +1 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Idle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js +1 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.js +1 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.js +2 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.js +1 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +8 -6
- package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/EditingShape.js +38 -11
- package/dist-cjs/lib/tools/SelectTool/childStates/EditingShape.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js +42 -50
- package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingArrowLabel.js +6 -6
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingArrowLabel.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingCanvas.js +1 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingCanvas.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingHandle.js +4 -14
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingHandle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js +1 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingRotateHandle.js +1 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingRotateHandle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingSelection.js +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingSelection.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js +4 -13
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js +5 -6
- package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js +2 -3
- package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/ScribbleBrushing.js +7 -6
- package/dist-cjs/lib/tools/SelectTool/childStates/ScribbleBrushing.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js +13 -11
- package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/selectHelpers.js +15 -4
- package/dist-cjs/lib/tools/SelectTool/selectHelpers.js.map +2 -2
- package/dist-cjs/lib/tools/ZoomTool/ZoomTool.js +1 -1
- package/dist-cjs/lib/tools/ZoomTool/ZoomTool.js.map +2 -2
- package/dist-cjs/lib/tools/ZoomTool/childStates/Pointing.js +3 -3
- package/dist-cjs/lib/tools/ZoomTool/childStates/Pointing.js.map +2 -2
- package/dist-cjs/lib/tools/ZoomTool/childStates/ZoomBrushing.js +5 -6
- package/dist-cjs/lib/tools/ZoomTool/childStates/ZoomBrushing.js.map +2 -2
- package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js +1 -3
- package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js.map +2 -2
- package/dist-cjs/lib/tools/selection-logic/selectOnCanvasPointerUp.js +1 -1
- package/dist-cjs/lib/tools/selection-logic/selectOnCanvasPointerUp.js.map +2 -2
- package/dist-cjs/lib/tools/selection-logic/updateHoveredShapeId.js +1 -1
- package/dist-cjs/lib/tools/selection-logic/updateHoveredShapeId.js.map +2 -2
- package/dist-cjs/lib/ui/TldrawUi.js +2 -2
- package/dist-cjs/lib/ui/TldrawUi.js.map +2 -2
- package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.js +3 -9
- package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.js.map +2 -2
- package/dist-cjs/lib/ui/components/ContextMenu/DefaultContextMenu.js +1 -3
- package/dist-cjs/lib/ui/components/ContextMenu/DefaultContextMenu.js.map +2 -2
- package/dist-cjs/lib/ui/components/CursorChatBubble.js +1 -1
- package/dist-cjs/lib/ui/components/CursorChatBubble.js.map +2 -2
- package/dist-cjs/lib/ui/components/DefaultDebugPanel.js +1 -21
- package/dist-cjs/lib/ui/components/DefaultDebugPanel.js.map +2 -2
- 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/HelperButtons/BackToContent.js +1 -1
- package/dist-cjs/lib/ui/components/HelperButtons/BackToContent.js.map +2 -2
- package/dist-cjs/lib/ui/components/HelperButtons/StopFollowing.js.map +2 -2
- package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js +1 -1
- package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js.map +2 -2
- package/dist-cjs/lib/ui/components/OfflineIndicator/OfflineIndicator.js +2 -15
- package/dist-cjs/lib/ui/components/OfflineIndicator/OfflineIndicator.js.map +3 -3
- package/dist-cjs/lib/ui/components/PageMenu/PageItemInput.js +3 -1
- package/dist-cjs/lib/ui/components/PageMenu/PageItemInput.js.map +2 -2
- package/dist-cjs/lib/ui/components/SharePanel/PeopleMenu.js +6 -0
- package/dist-cjs/lib/ui/components/SharePanel/PeopleMenu.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/AltTextEditor.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbar.js +1 -1
- package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbar.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/DefaultRichTextToolbar.js +1 -1
- package/dist-cjs/lib/ui/components/Toolbar/DefaultRichTextToolbar.js.map +2 -2
- package/dist-cjs/lib/ui/components/TopPanel/CenteredTopPanelContainer.js.map +1 -1
- package/dist-cjs/lib/ui/components/menu-items.js +3 -1
- package/dist-cjs/lib/ui/components/menu-items.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js +3 -1
- package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js +1 -1
- package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +149 -93
- package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuActionCheckboxItem.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuActionItem.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +14 -7
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +2 -2
- package/dist-cjs/lib/ui/context/actions.js +7 -8
- package/dist-cjs/lib/ui/context/actions.js.map +2 -2
- package/dist-cjs/lib/ui/context/components.js +1 -2
- package/dist-cjs/lib/ui/context/components.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/menu-hooks.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/useClipboardEvents.js +2 -2
- package/dist-cjs/lib/ui/hooks/useClipboardEvents.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/useFlatten.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 +4 -5
- package/dist-cjs/lib/ui/hooks/useTools.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 +16 -6
- package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js.map +2 -2
- package/dist-cjs/lib/utils/export/exportAs.js.map +2 -2
- package/dist-cjs/lib/utils/frames/frames.js.map +2 -2
- package/dist-cjs/lib/{tools/selection-logic/getShouldEnterCropModeOnPointerDown.js → utils/test-helpers.js} +21 -8
- package/dist-cjs/lib/utils/test-helpers.js.map +7 -0
- package/dist-cjs/lib/utils/text/richText.js +15 -19
- package/dist-cjs/lib/utils/text/richText.js.map +3 -3
- package/dist-cjs/lib/utils/tldr/buildFromV1Document.js +7 -2
- package/dist-cjs/lib/utils/tldr/buildFromV1Document.js.map +2 -2
- package/dist-esm/index.d.mts +311 -242
- package/dist-esm/index.mjs +14 -5
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/bindings/arrow/ArrowBindingUtil.mjs.map +2 -2
- package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs +2 -2
- package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs.map +2 -2
- package/dist-esm/lib/defaultEmbedDefinitions.mjs +1 -1
- package/dist-esm/lib/defaultEmbedDefinitions.mjs.map +2 -2
- package/dist-esm/lib/defaultExternalContentHandlers.mjs +5 -5
- package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
- package/dist-esm/lib/defaultSideEffects.mjs +6 -1
- package/dist-esm/lib/defaultSideEffects.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +15 -15
- package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/arrowLabel.mjs +1 -1
- package/dist-esm/lib/shapes/arrow/arrowLabel.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs +1 -1
- package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/elbow/elbowArrowSnapLines.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/elbow/getElbowArrowInfo.mjs +1 -1
- package/dist-esm/lib/shapes/arrow/elbow/getElbowArrowInfo.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/shared.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/toolStates/Idle.mjs +4 -10
- package/dist-esm/lib/shapes/arrow/toolStates/Idle.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs +7 -4
- package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs.map +2 -2
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +1 -1
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/bookmark/bookmarks.mjs.map +2 -2
- package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs +30 -25
- package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/draw/getPath.mjs +21 -11
- package/dist-esm/lib/shapes/draw/getPath.mjs.map +2 -2
- package/dist-esm/lib/shapes/draw/toolStates/Drawing.mjs +83 -86
- package/dist-esm/lib/shapes/draw/toolStates/Drawing.mjs.map +3 -3
- package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +6 -0
- package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/frame/FrameShapeTool.mjs.map +1 -1
- package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +6 -5
- package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +147 -142
- package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/geo/toolStates/Idle.mjs +5 -10
- package/dist-esm/lib/shapes/geo/toolStates/Idle.mjs.map +2 -2
- package/dist-esm/lib/shapes/geo/toolStates/Pointing.mjs +3 -3
- package/dist-esm/lib/shapes/geo/toolStates/Pointing.mjs.map +2 -2
- package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +24 -22
- package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/line/toolStates/Pointing.mjs +3 -3
- package/dist-esm/lib/shapes/line/toolStates/Pointing.mjs.map +2 -2
- package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +7 -12
- package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/note/noteHelpers.mjs.map +2 -2
- package/dist-esm/lib/shapes/note/toolStates/Pointing.mjs +5 -10
- package/dist-esm/lib/shapes/note/toolStates/Pointing.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs +4 -3
- package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs +14 -2
- package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/RichTextLabel.mjs +12 -4
- package/dist-esm/lib/shapes/shared/RichTextLabel.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/ShapeFill.mjs +2 -2
- package/dist-esm/lib/shapes/shared/ShapeFill.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/interpolate-props.mjs +4 -4
- package/dist-esm/lib/shapes/shared/interpolate-props.mjs.map +2 -2
- 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/useEfficientZoomThreshold.mjs +12 -0
- package/dist-esm/lib/shapes/shared/useEfficientZoomThreshold.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs +1 -1
- package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs.map +2 -2
- package/dist-esm/lib/shapes/text/RichTextArea.mjs +5 -0
- package/dist-esm/lib/shapes/text/RichTextArea.mjs.map +2 -2
- package/dist-esm/lib/shapes/text/TextShapeUtil.mjs +5 -2
- package/dist-esm/lib/shapes/text/TextShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/text/toolStates/Idle.mjs +4 -10
- package/dist-esm/lib/shapes/text/toolStates/Idle.mjs.map +2 -2
- package/dist-esm/lib/shapes/text/toolStates/Pointing.mjs +7 -5
- package/dist-esm/lib/shapes/text/toolStates/Pointing.mjs.map +2 -2
- package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs +1 -1
- package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs +4 -5
- package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs.map +2 -2
- package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs +3 -8
- package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs.map +2 -2
- package/dist-esm/lib/tools/HandTool/HandTool.mjs +3 -5
- package/dist-esm/lib/tools/HandTool/HandTool.mjs.map +2 -2
- package/dist-esm/lib/tools/HandTool/childStates/Dragging.mjs +3 -2
- package/dist-esm/lib/tools/HandTool/childStates/Dragging.mjs.map +2 -2
- package/dist-esm/lib/tools/HandTool/childStates/Pointing.mjs +1 -1
- package/dist-esm/lib/tools/HandTool/childStates/Pointing.mjs.map +2 -2
- package/dist-esm/lib/tools/LaserTool/childStates/Lasering.mjs +1 -1
- package/dist-esm/lib/tools/LaserTool/childStates/Lasering.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/DragAndDropManager.mjs +10 -11
- package/dist-esm/lib/tools/SelectTool/DragAndDropManager.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Brushing.mjs +6 -5
- package/dist-esm/lib/tools/SelectTool/childStates/Brushing.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Cropping.mjs +4 -6
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Cropping.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Idle.mjs +1 -1
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Idle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs +1 -1
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.mjs +1 -1
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.mjs +2 -1
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.mjs +1 -1
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +8 -6
- package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/EditingShape.mjs +38 -11
- package/dist-esm/lib/tools/SelectTool/childStates/EditingShape.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs +43 -51
- package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/PointingArrowLabel.mjs +6 -6
- package/dist-esm/lib/tools/SelectTool/childStates/PointingArrowLabel.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/PointingCanvas.mjs +1 -1
- package/dist-esm/lib/tools/SelectTool/childStates/PointingCanvas.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/PointingHandle.mjs +6 -19
- package/dist-esm/lib/tools/SelectTool/childStates/PointingHandle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs +1 -1
- package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/PointingRotateHandle.mjs +1 -1
- package/dist-esm/lib/tools/SelectTool/childStates/PointingRotateHandle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/PointingSelection.mjs +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/PointingSelection.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs +4 -13
- package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs +5 -6
- package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs +2 -3
- package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/ScribbleBrushing.mjs +7 -6
- package/dist-esm/lib/tools/SelectTool/childStates/ScribbleBrushing.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs +13 -11
- package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/selectHelpers.mjs +17 -4
- package/dist-esm/lib/tools/SelectTool/selectHelpers.mjs.map +2 -2
- package/dist-esm/lib/tools/ZoomTool/ZoomTool.mjs +1 -1
- package/dist-esm/lib/tools/ZoomTool/ZoomTool.mjs.map +2 -2
- package/dist-esm/lib/tools/ZoomTool/childStates/Pointing.mjs +3 -3
- package/dist-esm/lib/tools/ZoomTool/childStates/Pointing.mjs.map +2 -2
- package/dist-esm/lib/tools/ZoomTool/childStates/ZoomBrushing.mjs +5 -6
- package/dist-esm/lib/tools/ZoomTool/childStates/ZoomBrushing.mjs.map +2 -2
- package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs +1 -3
- package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs.map +2 -2
- package/dist-esm/lib/tools/selection-logic/selectOnCanvasPointerUp.mjs +1 -1
- package/dist-esm/lib/tools/selection-logic/selectOnCanvasPointerUp.mjs.map +2 -2
- package/dist-esm/lib/tools/selection-logic/updateHoveredShapeId.mjs +1 -1
- package/dist-esm/lib/tools/selection-logic/updateHoveredShapeId.mjs.map +2 -2
- package/dist-esm/lib/ui/TldrawUi.mjs +2 -2
- package/dist-esm/lib/ui/TldrawUi.mjs.map +2 -2
- package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.mjs +2 -8
- package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.mjs.map +2 -2
- package/dist-esm/lib/ui/components/ContextMenu/DefaultContextMenu.mjs +1 -3
- package/dist-esm/lib/ui/components/ContextMenu/DefaultContextMenu.mjs.map +2 -2
- package/dist-esm/lib/ui/components/CursorChatBubble.mjs +1 -1
- package/dist-esm/lib/ui/components/CursorChatBubble.mjs.map +2 -2
- package/dist-esm/lib/ui/components/DefaultDebugPanel.mjs +3 -30
- package/dist-esm/lib/ui/components/DefaultDebugPanel.mjs.map +2 -2
- 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/HelperButtons/BackToContent.mjs +1 -1
- package/dist-esm/lib/ui/components/HelperButtons/BackToContent.mjs.map +2 -2
- package/dist-esm/lib/ui/components/HelperButtons/StopFollowing.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs +1 -1
- package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs.map +2 -2
- package/dist-esm/lib/ui/components/OfflineIndicator/OfflineIndicator.mjs +3 -6
- package/dist-esm/lib/ui/components/OfflineIndicator/OfflineIndicator.mjs.map +2 -2
- package/dist-esm/lib/ui/components/PageMenu/PageItemInput.mjs +3 -1
- package/dist-esm/lib/ui/components/PageMenu/PageItemInput.mjs.map +2 -2
- package/dist-esm/lib/ui/components/SharePanel/PeopleMenu.mjs +6 -0
- package/dist-esm/lib/ui/components/SharePanel/PeopleMenu.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/AltTextEditor.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbar.mjs +1 -1
- package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/DefaultRichTextToolbar.mjs +1 -1
- package/dist-esm/lib/ui/components/Toolbar/DefaultRichTextToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/TopPanel/CenteredTopPanelContainer.mjs.map +1 -1
- package/dist-esm/lib/ui/components/menu-items.mjs +4 -5
- package/dist-esm/lib/ui/components/menu-items.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs +3 -1
- package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +157 -95
- package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuActionCheckboxItem.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuActionItem.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +15 -8
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +2 -2
- package/dist-esm/lib/ui/context/actions.mjs +7 -8
- package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
- package/dist-esm/lib/ui/context/components.mjs +1 -2
- package/dist-esm/lib/ui/context/components.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/menu-hooks.mjs +1 -4
- package/dist-esm/lib/ui/hooks/menu-hooks.mjs.map +2 -2
- 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/useFlatten.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 +4 -5
- package/dist-esm/lib/ui/hooks/useTools.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 +17 -6
- package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs.map +2 -2
- package/dist-esm/lib/utils/export/exportAs.mjs +1 -3
- package/dist-esm/lib/utils/export/exportAs.mjs.map +2 -2
- package/dist-esm/lib/utils/frames/frames.mjs.map +2 -2
- package/dist-esm/lib/utils/test-helpers.mjs +21 -0
- package/dist-esm/lib/utils/test-helpers.mjs.map +7 -0
- package/dist-esm/lib/utils/text/richText.mjs +12 -5
- package/dist-esm/lib/utils/text/richText.mjs.map +2 -2
- package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs +8 -2
- package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs.map +2 -2
- package/package.json +18 -16
- package/src/index.ts +6 -2
- package/src/lib/Tldraw.test.tsx +46 -1
- package/src/lib/bindings/arrow/ArrowBindingUtil.ts +1 -1
- package/src/lib/canvas/TldrawSelectionForeground.tsx +6 -11
- package/src/lib/defaultEmbedDefinitions.ts +2 -1
- package/src/lib/defaultExternalContentHandlers.ts +13 -14
- package/src/lib/defaultSideEffects.ts +6 -1
- package/src/lib/shapes/arrow/ArrowShapeOptions.test.ts +40 -133
- package/src/lib/shapes/arrow/ArrowShapeTool.test.ts +8 -8
- package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +2 -2
- package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +16 -16
- package/src/lib/shapes/arrow/arrow-types.ts +2 -0
- package/src/lib/shapes/arrow/arrowLabel.ts +2 -2
- package/src/lib/shapes/arrow/arrowTargetState.ts +2 -2
- package/src/lib/shapes/arrow/elbow/elbowArrowSnapLines.tsx +3 -3
- package/src/lib/shapes/arrow/elbow/getElbowArrowInfo.test.ts +80 -0
- package/src/lib/shapes/arrow/elbow/getElbowArrowInfo.tsx +1 -1
- package/src/lib/shapes/arrow/shared.ts +4 -4
- package/src/lib/shapes/arrow/toolStates/Idle.tsx +4 -14
- package/src/lib/shapes/arrow/toolStates/Pointing.tsx +8 -5
- package/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx +1 -1
- package/src/lib/shapes/bookmark/bookmarks.ts +3 -3
- package/src/lib/shapes/draw/DrawShapeUtil.test.ts +146 -0
- package/src/lib/shapes/draw/DrawShapeUtil.tsx +33 -27
- package/src/lib/shapes/draw/getPath.ts +31 -10
- package/src/lib/shapes/draw/toolStates/Drawing.ts +100 -90
- package/src/lib/shapes/embed/EmbedShapeUtil.tsx +8 -1
- package/src/lib/shapes/frame/FrameShapeTool.ts +1 -1
- package/src/lib/shapes/frame/FrameShapeUtil.tsx +10 -4
- package/src/lib/shapes/geo/GeoShapeUtil.test.tsx +10 -2
- package/src/lib/shapes/geo/GeoShapeUtil.tsx +228 -176
- package/src/lib/shapes/geo/toolStates/Idle.ts +5 -15
- package/src/lib/shapes/geo/toolStates/Pointing.ts +6 -6
- package/src/lib/shapes/highlight/HighlightShapeUtil.test.ts +146 -0
- package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +27 -24
- package/src/lib/shapes/line/LineShapeTool.test.ts +6 -6
- package/src/lib/shapes/line/LineShapeUtil.test.tsx +5 -5
- package/src/lib/shapes/line/toolStates/Pointing.ts +4 -4
- package/src/lib/shapes/note/NoteShapeTool.test.ts +2 -1
- package/src/lib/shapes/note/NoteShapeUtil.tsx +9 -10
- package/src/lib/shapes/note/noteCloning.test.ts +3 -1
- package/src/lib/shapes/note/noteHelpers.ts +2 -2
- package/src/lib/shapes/note/toolStates/Pointing.ts +5 -10
- package/src/lib/shapes/shared/HyperlinkButton.tsx +4 -3
- package/src/lib/shapes/shared/PlainTextLabel.tsx +12 -2
- package/src/lib/shapes/shared/RichTextLabel.tsx +14 -4
- package/src/lib/shapes/shared/ShapeFill.tsx +2 -2
- package/src/lib/shapes/shared/crop.ts +1 -0
- package/src/lib/shapes/shared/interpolate-props.ts +4 -4
- package/src/lib/shapes/shared/useEditablePlainText.ts +7 -3
- package/src/lib/shapes/shared/useEditableRichText.ts +7 -3
- package/src/lib/shapes/shared/useEfficientZoomThreshold.ts +10 -0
- package/src/lib/shapes/shared/useImageOrVideoAsset.ts +1 -1
- package/src/lib/shapes/text/RichTextArea.tsx +5 -0
- package/src/lib/shapes/text/TextShapeTool.test.ts +4 -4
- package/src/lib/shapes/text/TextShapeUtil.tsx +5 -0
- package/src/lib/shapes/text/toolStates/Idle.ts +4 -14
- package/src/lib/shapes/text/toolStates/Pointing.ts +8 -8
- package/src/lib/shapes/video/VideoShapeUtil.tsx +2 -1
- package/src/lib/tools/EraserTool/childStates/Erasing.ts +7 -10
- package/src/lib/tools/EraserTool/childStates/Pointing.ts +5 -20
- package/src/lib/tools/HandTool/HandTool.ts +3 -5
- package/src/lib/tools/HandTool/childStates/Dragging.ts +3 -2
- package/src/lib/tools/HandTool/childStates/Pointing.ts +1 -1
- package/src/lib/tools/LaserTool/childStates/Lasering.ts +1 -1
- package/src/lib/tools/SelectTool/DragAndDropManager.ts +14 -11
- package/src/lib/tools/SelectTool/childStates/Brushing.ts +8 -11
- package/src/lib/tools/SelectTool/childStates/Crop/children/Cropping.ts +7 -6
- package/src/lib/tools/SelectTool/childStates/Crop/children/Idle.ts +3 -4
- package/src/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.ts +1 -1
- package/src/lib/tools/SelectTool/childStates/Crop/children/PointingCropHandle.ts +1 -1
- package/src/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.ts +2 -1
- package/src/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.ts +1 -1
- package/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +11 -12
- package/src/lib/tools/SelectTool/childStates/EditingShape.ts +57 -16
- package/src/lib/tools/SelectTool/childStates/Idle.ts +64 -81
- package/src/lib/tools/SelectTool/childStates/PointingArrowLabel.ts +7 -8
- package/src/lib/tools/SelectTool/childStates/PointingCanvas.ts +1 -1
- package/src/lib/tools/SelectTool/childStates/PointingHandle.ts +9 -17
- package/src/lib/tools/SelectTool/childStates/PointingResizeHandle.ts +1 -1
- package/src/lib/tools/SelectTool/childStates/PointingRotateHandle.ts +1 -1
- package/src/lib/tools/SelectTool/childStates/PointingSelection.ts +4 -4
- package/src/lib/tools/SelectTool/childStates/PointingShape.ts +4 -14
- package/src/lib/tools/SelectTool/childStates/Resizing.ts +8 -10
- package/src/lib/tools/SelectTool/childStates/Rotating.ts +2 -3
- package/src/lib/tools/SelectTool/childStates/ScribbleBrushing.ts +9 -10
- package/src/lib/tools/SelectTool/childStates/Translating.ts +16 -15
- package/src/lib/tools/SelectTool/selectHelpers.ts +39 -4
- package/src/lib/tools/ZoomTool/ZoomTool.ts +1 -1
- package/src/lib/tools/ZoomTool/childStates/Pointing.ts +3 -3
- package/src/lib/tools/ZoomTool/childStates/ZoomBrushing.ts +5 -6
- package/src/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.ts +1 -3
- package/src/lib/tools/selection-logic/selectOnCanvasPointerUp.ts +1 -1
- package/src/lib/tools/selection-logic/updateHoveredShapeId.ts +1 -1
- package/src/lib/ui/TldrawUi.tsx +5 -2
- package/src/lib/ui/components/ActionsMenu/DefaultActionsMenuContent.tsx +1 -9
- package/src/lib/ui/components/ContextMenu/DefaultContextMenu.tsx +1 -3
- package/src/lib/ui/components/CursorChatBubble.tsx +2 -2
- package/src/lib/ui/components/DefaultDebugPanel.tsx +3 -42
- package/src/lib/ui/components/EditLinkDialog.tsx +16 -6
- package/src/lib/ui/components/HelperButtons/BackToContent.tsx +1 -1
- package/src/lib/ui/components/HelperButtons/StopFollowing.tsx +2 -2
- package/src/lib/ui/components/Minimap/DefaultMinimap.tsx +1 -1
- package/src/lib/ui/components/OfflineIndicator/OfflineIndicator.tsx +6 -5
- package/src/lib/ui/components/PageMenu/PageItemInput.tsx +3 -1
- package/src/lib/ui/components/SharePanel/PeopleMenu.tsx +8 -0
- package/src/lib/ui/components/Toolbar/AltTextEditor.tsx +2 -2
- package/src/lib/ui/components/Toolbar/DefaultImageToolbar.tsx +1 -1
- package/src/lib/ui/components/Toolbar/DefaultRichTextToolbar.tsx +1 -1
- package/src/lib/ui/components/TopPanel/CenteredTopPanelContainer.tsx +1 -1
- package/src/lib/ui/components/menu-items.tsx +9 -15
- package/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx +5 -3
- package/src/lib/ui/components/primitives/TldrawUiSlider.tsx +2 -2
- package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +208 -113
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuActionCheckboxItem.tsx +1 -1
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuActionItem.tsx +1 -1
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +7 -4
- package/src/lib/ui/context/actions.tsx +15 -19
- package/src/lib/ui/context/components.tsx +1 -2
- package/src/lib/ui/hooks/menu-hooks.ts +9 -19
- package/src/lib/ui/hooks/useClipboardEvents.ts +2 -2
- package/src/lib/ui/hooks/useFlatten.ts +1 -2
- package/src/lib/ui/hooks/useKeyboardShortcuts.ts +2 -2
- package/src/lib/ui/hooks/useTools.tsx +5 -7
- package/src/lib/ui/version.ts +3 -3
- package/src/lib/ui.css +27 -23
- package/src/lib/utils/excalidraw/__snapshots__/putExcalidrawContent.test.tsx.snap +12 -48
- package/src/lib/utils/excalidraw/putExcalidrawContent.ts +19 -6
- package/src/lib/utils/export/exportAs.ts +2 -9
- package/src/lib/utils/frames/frames.ts +1 -1
- package/src/lib/utils/test-helpers.ts +62 -0
- package/src/lib/utils/text/richText.ts +13 -8
- package/src/lib/utils/tldr/buildFromV1Document.ts +21 -19
- package/src/test/Editor.test.tsx +78 -41
- package/src/test/EraserTool.test.ts +10 -12
- package/src/test/SelectTool.test.ts +11 -19
- package/src/test/TestEditor.ts +49 -51
- package/src/test/TldrawEditor.test.tsx +24 -20
- package/src/test/__snapshots__/drawing.test.ts.snap +3 -1257
- package/src/test/__snapshots__/resizing.test.ts.snap +3 -12
- package/src/test/arrows-megabus.test.tsx +1 -1
- package/src/test/bindings.test.tsx +29 -25
- package/src/test/bindingsIndex.test.tsx +4 -4
- package/src/test/commands/__snapshots__/getSvgString.test.ts.snap +10 -10
- package/src/test/commands/cameraState.test.ts +299 -0
- package/src/test/commands/createShape.test.ts +64 -0
- package/src/test/commands/createShapes.test.ts +15 -1
- package/src/test/commands/getSvgString.test.ts +2 -2
- package/src/test/commands/isShapeOfType.test.ts +44 -0
- package/src/test/commands/putContent.test.ts +80 -1
- package/src/test/commands/setCamera.test.ts +13 -11
- package/src/test/commands/stackShapes.test.ts +34 -8
- package/src/test/commands/updateShape.test.ts +67 -0
- package/src/test/commands/updateShapes.test.ts +21 -5
- package/src/test/commands/zoomToBounds.test.ts +19 -3
- package/src/test/commands/zoomToSelection.test.ts +14 -3
- package/src/test/custom-clipping.test.ts +52 -44
- package/src/test/customSnapping.test.tsx +77 -62
- package/src/test/drawing.test.ts +17 -10
- package/src/test/duplicate.test.ts +1 -1
- package/src/test/flipShapes.test.ts +33 -0
- package/src/test/frames.test.ts +94 -2
- package/src/test/getCulledShapes.test.tsx +11 -3
- package/src/test/getShapeAtPoint.test.ts +2 -2
- package/src/test/groups.test.tsx +7 -4
- package/src/test/modifiers.test.ts +6 -6
- package/src/test/resizing.test.ts +16 -22
- package/src/test/selection-omnibus.test.ts +13 -13
- package/src/test/shapeutils.test.ts +1 -1
- package/src/test/spacebarPanning.test.ts +28 -10
- package/src/test/styles2.test.tsx +1 -1
- package/src/test/styles3.test.ts +5 -5
- package/src/test/test-jsx.tsx +72 -57
- package/src/test/text.test.ts +15 -17
- package/src/test/translating.test.ts +6 -8
- package/src/test/ui/BackToContent.test.tsx +111 -0
- package/tldraw.css +41 -35
- package/dist-cjs/lib/shapes/shared/useForceSolid.js.map +0 -7
- package/dist-cjs/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.js.map +0 -7
- package/dist-cjs/lib/ui/components/TopPanel/DefaultTopPanel.js +0 -32
- package/dist-cjs/lib/ui/components/TopPanel/DefaultTopPanel.js.map +0 -7
- package/dist-cjs/lib/utils/text/textDirection.js +0 -51
- package/dist-cjs/lib/utils/text/textDirection.js.map +0 -7
- package/dist-esm/lib/shapes/shared/useForceSolid.mjs +0 -9
- package/dist-esm/lib/shapes/shared/useForceSolid.mjs.map +0 -7
- package/dist-esm/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.mjs +0 -8
- package/dist-esm/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.mjs.map +0 -7
- package/dist-esm/lib/ui/components/TopPanel/DefaultTopPanel.mjs +0 -12
- package/dist-esm/lib/ui/components/TopPanel/DefaultTopPanel.mjs.map +0 -7
- package/dist-esm/lib/utils/text/textDirection.mjs +0 -31
- package/dist-esm/lib/utils/text/textDirection.mjs.map +0 -7
- package/src/lib/shapes/shared/useForceSolid.ts +0 -6
- package/src/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.ts +0 -10
- package/src/lib/ui/components/TopPanel/DefaultTopPanel.tsx +0 -10
- package/src/lib/utils/text/textDirection.ts +0 -32
package/dist-esm/index.d.mts
CHANGED
|
@@ -15,6 +15,7 @@ import { Editor } from '@tldraw/editor';
|
|
|
15
15
|
import { ElbowArrowSnap } from '@tldraw/editor';
|
|
16
16
|
import { Extension } from '@tiptap/core';
|
|
17
17
|
import { Extensions } from '@tiptap/core';
|
|
18
|
+
import { ExtractShapeByProps } from '@tldraw/editor';
|
|
18
19
|
import { ForwardRefExoticComponent } from 'react';
|
|
19
20
|
import { Geometry2d } from '@tldraw/editor';
|
|
20
21
|
import { Geometry2dFilters } from '@tldraw/editor';
|
|
@@ -24,7 +25,8 @@ import { HandleSnapGeometry } from '@tldraw/editor';
|
|
|
24
25
|
import { HTMLAttributes } from 'react';
|
|
25
26
|
import { IndexKey } from '@tldraw/editor';
|
|
26
27
|
import { JsonObject } from '@tldraw/editor';
|
|
27
|
-
import { JSX
|
|
28
|
+
import { JSX } from 'react/jsx-runtime';
|
|
29
|
+
import { JSXElementConstructor } from 'react';
|
|
28
30
|
import { LANGUAGES } from '@tldraw/editor';
|
|
29
31
|
import { MigrationFailureReason } from '@tldraw/editor';
|
|
30
32
|
import { MigrationSequence } from '@tldraw/editor';
|
|
@@ -37,6 +39,7 @@ import * as React_2 from 'react';
|
|
|
37
39
|
import { default as React_3 } from 'react';
|
|
38
40
|
import { ReactElement } from 'react';
|
|
39
41
|
import { ReactNode } from 'react';
|
|
42
|
+
import { ReactPortal } from 'react';
|
|
40
43
|
import { ReadonlySharedStyleMap } from '@tldraw/editor';
|
|
41
44
|
import { RecordProps } from '@tldraw/editor';
|
|
42
45
|
import { Rectangle2d } from '@tldraw/editor';
|
|
@@ -88,8 +91,10 @@ import { TLDrawShapeProps } from '@tldraw/editor';
|
|
|
88
91
|
import { TLDrawShapeSegment } from '@tldraw/editor';
|
|
89
92
|
import { TLEditorComponents } from '@tldraw/editor';
|
|
90
93
|
import { TLEditorSnapshot } from '@tldraw/editor';
|
|
94
|
+
import { TLEditStartInfo } from '@tldraw/editor';
|
|
91
95
|
import { TLEmbedShape } from '@tldraw/editor';
|
|
92
96
|
import { TLEmbedShapeProps } from '@tldraw/editor';
|
|
97
|
+
import { TLEventInfo } from '@tldraw/editor';
|
|
93
98
|
import { TLExportType } from '@tldraw/editor';
|
|
94
99
|
import { TLFileExternalAsset } from '@tldraw/editor';
|
|
95
100
|
import { TLFontFace } from '@tldraw/editor';
|
|
@@ -154,7 +159,7 @@ export declare interface A11yProviderProps {
|
|
|
154
159
|
}
|
|
155
160
|
|
|
156
161
|
/** @public @react */
|
|
157
|
-
export declare function AccessibilityMenu():
|
|
162
|
+
export declare function AccessibilityMenu(): JSX.Element;
|
|
158
163
|
|
|
159
164
|
/** @public */
|
|
160
165
|
export declare interface ActionsProviderProps {
|
|
@@ -166,13 +171,13 @@ export declare interface ActionsProviderProps {
|
|
|
166
171
|
export declare type AlertSeverity = 'error' | 'info' | 'success' | 'warning';
|
|
167
172
|
|
|
168
173
|
/** @public @react */
|
|
169
|
-
export declare function AlignMenuItems():
|
|
174
|
+
export declare function AlignMenuItems(): JSX.Element;
|
|
170
175
|
|
|
171
176
|
/** @public */
|
|
172
177
|
export declare const allDefaultFontFaces: TLFontFace[];
|
|
173
178
|
|
|
174
179
|
/** @public @react */
|
|
175
|
-
export declare function ArrangeMenuSubmenu():
|
|
180
|
+
export declare function ArrangeMenuSubmenu(): JSX.Element | null;
|
|
176
181
|
|
|
177
182
|
/** @public */
|
|
178
183
|
export declare const ARROW_LABEL_FONT_SIZES: Record<TLDefaultSizeStyle, number>;
|
|
@@ -193,13 +198,13 @@ export declare class ArrowBindingUtil extends BindingUtil<TLArrowBinding> {
|
|
|
193
198
|
}
|
|
194
199
|
|
|
195
200
|
/** @public @react */
|
|
196
|
-
export declare function ArrowDownToolbarItem():
|
|
201
|
+
export declare function ArrowDownToolbarItem(): JSX.Element;
|
|
197
202
|
|
|
198
203
|
/** @public @react */
|
|
199
|
-
export declare function ArrowLeftToolbarItem():
|
|
204
|
+
export declare function ArrowLeftToolbarItem(): JSX.Element;
|
|
200
205
|
|
|
201
206
|
/** @public @react */
|
|
202
|
-
export declare function ArrowRightToolbarItem():
|
|
207
|
+
export declare function ArrowRightToolbarItem(): JSX.Element;
|
|
203
208
|
|
|
204
209
|
/**
|
|
205
210
|
* Options for the arrow shape.
|
|
@@ -290,6 +295,8 @@ export declare interface ArrowShapeOptions {
|
|
|
290
295
|
* When creating an arrow, should it bind to the target shape.
|
|
291
296
|
*/
|
|
292
297
|
shouldIgnoreTargets(editor: Editor): boolean;
|
|
298
|
+
/** Whether to show the outline of the arrow shape's label (using the same color as the canvas). This helps with overlapping shapes. It does not show up on Safari, where text outline is a performance issues. */
|
|
299
|
+
readonly showTextOutline: boolean;
|
|
293
300
|
}
|
|
294
301
|
|
|
295
302
|
/** @public */
|
|
@@ -357,10 +364,10 @@ export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
|
|
|
357
364
|
};
|
|
358
365
|
};
|
|
359
366
|
onDoubleClickHandle(shape: TLArrowShape, handle: TLHandle): TLShapePartial<TLArrowShape> | void;
|
|
360
|
-
component(shape: TLArrowShape):
|
|
361
|
-
indicator(shape: TLArrowShape):
|
|
367
|
+
component(shape: TLArrowShape): JSX.Element | null;
|
|
368
|
+
indicator(shape: TLArrowShape): JSX.Element | null;
|
|
362
369
|
onEditStart(shape: TLArrowShape): void;
|
|
363
|
-
toSvg(shape: TLArrowShape, ctx: SvgExportContext):
|
|
370
|
+
toSvg(shape: TLArrowShape, ctx: SvgExportContext): JSX.Element;
|
|
364
371
|
getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
|
|
365
372
|
getInterpolatedProps(startShape: TLArrowShape, endShape: TLArrowShape, progress: number): TLArrowShapeProps;
|
|
366
373
|
}
|
|
@@ -402,10 +409,10 @@ export declare interface ArrowTargetState {
|
|
|
402
409
|
}
|
|
403
410
|
|
|
404
411
|
/** @public @react */
|
|
405
|
-
export declare function ArrowToolbarItem():
|
|
412
|
+
export declare function ArrowToolbarItem(): JSX.Element;
|
|
406
413
|
|
|
407
414
|
/** @public @react */
|
|
408
|
-
export declare function ArrowUpToolbarItem():
|
|
415
|
+
export declare function ArrowUpToolbarItem(): JSX.Element;
|
|
409
416
|
|
|
410
417
|
/** @public */
|
|
411
418
|
export declare type ASPECT_RATIO_OPTION = 'circle' | 'landscape' | 'original' | 'portrait' | 'square' | 'wide';
|
|
@@ -417,7 +424,7 @@ export declare const ASPECT_RATIO_OPTIONS: ASPECT_RATIO_OPTION[];
|
|
|
417
424
|
export declare const ASPECT_RATIO_TO_VALUE: Record<ASPECT_RATIO_OPTION, number>;
|
|
418
425
|
|
|
419
426
|
/** @public @react */
|
|
420
|
-
export declare function AssetToolbarItem():
|
|
427
|
+
export declare function AssetToolbarItem(): JSX.Element;
|
|
421
428
|
|
|
422
429
|
/* Excluded from this release type: AssetUrlsProvider */
|
|
423
430
|
|
|
@@ -439,8 +446,8 @@ export declare class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape>
|
|
|
439
446
|
getText(shape: TLBookmarkShape): string;
|
|
440
447
|
getAriaDescriptor(shape: TLBookmarkShape): string | undefined;
|
|
441
448
|
getDefaultProps(): TLBookmarkShape['props'];
|
|
442
|
-
component(shape: TLBookmarkShape):
|
|
443
|
-
indicator(shape: TLBookmarkShape):
|
|
449
|
+
component(shape: TLBookmarkShape): JSX.Element;
|
|
450
|
+
indicator(shape: TLBookmarkShape): JSX.Element;
|
|
444
451
|
onBeforeCreate(next: TLBookmarkShape): {
|
|
445
452
|
id: TLShapeId;
|
|
446
453
|
index: IndexKey;
|
|
@@ -489,7 +496,7 @@ export declare interface BoxWidthHeight {
|
|
|
489
496
|
}
|
|
490
497
|
|
|
491
498
|
/** @public @react */
|
|
492
|
-
export declare function BreakPointProvider({ forceMobile, children }: BreakPointProviderProps):
|
|
499
|
+
export declare function BreakPointProvider({ forceMobile, children }: BreakPointProviderProps): JSX.Element;
|
|
493
500
|
|
|
494
501
|
/** @public */
|
|
495
502
|
export declare interface BreakPointProviderProps {
|
|
@@ -500,11 +507,11 @@ export declare interface BreakPointProviderProps {
|
|
|
500
507
|
/* Excluded from this release type: buildFromV1Document */
|
|
501
508
|
|
|
502
509
|
/** @public @react */
|
|
503
|
-
export declare function CenteredTopPanelContainer({ maxWidth, ignoreRightWidth, stylePanelWidth, marginBetweenZones, squeezeAmount, children, }: CenteredTopPanelContainerProps):
|
|
510
|
+
export declare function CenteredTopPanelContainer({ maxWidth, ignoreRightWidth, stylePanelWidth, marginBetweenZones, squeezeAmount, children, }: CenteredTopPanelContainerProps): JSX.Element;
|
|
504
511
|
|
|
505
512
|
/** @public */
|
|
506
513
|
export declare interface CenteredTopPanelContainerProps {
|
|
507
|
-
children
|
|
514
|
+
children?: ReactNode;
|
|
508
515
|
maxWidth?: number;
|
|
509
516
|
ignoreRightWidth?: number;
|
|
510
517
|
stylePanelWidth?: number;
|
|
@@ -525,7 +532,7 @@ export declare interface CenteredTopPanelContainerProps {
|
|
|
525
532
|
export declare function centerSelectionAroundPoint(editor: Editor, position: VecLike): void;
|
|
526
533
|
|
|
527
534
|
/** @public @react */
|
|
528
|
-
export declare function CheckBoxToolbarItem():
|
|
535
|
+
export declare function CheckBoxToolbarItem(): JSX.Element;
|
|
529
536
|
|
|
530
537
|
/**
|
|
531
538
|
* Clear the current arrow target state for an editor. See {@link ArrowTargetState} for more
|
|
@@ -536,13 +543,13 @@ export declare function CheckBoxToolbarItem(): JSX_2.Element;
|
|
|
536
543
|
export declare function clearArrowTargetState(editor: Editor): void;
|
|
537
544
|
|
|
538
545
|
/** @public @react */
|
|
539
|
-
export declare function ClipboardMenuGroup():
|
|
546
|
+
export declare function ClipboardMenuGroup(): JSX.Element;
|
|
540
547
|
|
|
541
548
|
/** @public @react */
|
|
542
|
-
export declare function CloudToolbarItem():
|
|
549
|
+
export declare function CloudToolbarItem(): JSX.Element;
|
|
543
550
|
|
|
544
551
|
/** @public @react */
|
|
545
|
-
export declare function ColorSchemeMenu():
|
|
552
|
+
export declare function ColorSchemeMenu(): JSX.Element;
|
|
546
553
|
|
|
547
554
|
/**
|
|
548
555
|
* Contains the size within the given box size
|
|
@@ -555,13 +562,13 @@ export declare function ColorSchemeMenu(): JSX_2.Element;
|
|
|
555
562
|
export declare function containBoxSize(originalSize: BoxWidthHeight, containBoxSize: BoxWidthHeight): BoxWidthHeight;
|
|
556
563
|
|
|
557
564
|
/** @public @react */
|
|
558
|
-
export declare function ConversionsMenuGroup():
|
|
565
|
+
export declare function ConversionsMenuGroup(): JSX.Element | null;
|
|
559
566
|
|
|
560
567
|
/** @public @react */
|
|
561
|
-
export declare function ConvertToBookmarkMenuItem():
|
|
568
|
+
export declare function ConvertToBookmarkMenuItem(): JSX.Element | null;
|
|
562
569
|
|
|
563
570
|
/** @public @react */
|
|
564
|
-
export declare function ConvertToEmbedMenuItem():
|
|
571
|
+
export declare function ConvertToEmbedMenuItem(): JSX.Element | null;
|
|
565
572
|
|
|
566
573
|
/**
|
|
567
574
|
* Copy the given shapes to the clipboard.
|
|
@@ -576,7 +583,7 @@ export declare function ConvertToEmbedMenuItem(): JSX_2.Element | null;
|
|
|
576
583
|
export declare function copyAs(editor: Editor, ids: TLShapeId[], opts: CopyAsOptions): Promise<void>;
|
|
577
584
|
|
|
578
585
|
/** @public @react */
|
|
579
|
-
export declare function CopyAsMenuGroup():
|
|
586
|
+
export declare function CopyAsMenuGroup(): JSX.Element;
|
|
580
587
|
|
|
581
588
|
/** @public */
|
|
582
589
|
export declare interface CopyAsOptions extends TLImageExportOptions {
|
|
@@ -585,7 +592,7 @@ export declare interface CopyAsOptions extends TLImageExportOptions {
|
|
|
585
592
|
}
|
|
586
593
|
|
|
587
594
|
/** @public @react */
|
|
588
|
-
export declare function CopyMenuItem():
|
|
595
|
+
export declare function CopyMenuItem(): JSX.Element;
|
|
589
596
|
|
|
590
597
|
/**
|
|
591
598
|
* Creates a bookmark shape from a URL with unfurled metadata.
|
|
@@ -627,7 +634,7 @@ export declare interface CropBoxOptions {
|
|
|
627
634
|
/* Excluded from this release type: CubicBezierToPathBuilderCommand */
|
|
628
635
|
|
|
629
636
|
/** @public @react */
|
|
630
|
-
export declare function CursorChatItem():
|
|
637
|
+
export declare function CursorChatItem(): JSX.Element | null;
|
|
631
638
|
|
|
632
639
|
/** @public */
|
|
633
640
|
export declare interface CustomDebugFlags {
|
|
@@ -641,7 +648,7 @@ export declare interface CustomEmbedDefinition extends EmbedDefinition {
|
|
|
641
648
|
}
|
|
642
649
|
|
|
643
650
|
/** @public @react */
|
|
644
|
-
export declare function CutMenuItem():
|
|
651
|
+
export declare function CutMenuItem(): JSX.Element;
|
|
645
652
|
|
|
646
653
|
/** @public */
|
|
647
654
|
export declare interface DashedPathBuilderOpts extends BasePathBuilderOpts {
|
|
@@ -653,7 +660,7 @@ export declare interface DashedPathBuilderOpts extends BasePathBuilderOpts {
|
|
|
653
660
|
}
|
|
654
661
|
|
|
655
662
|
/** @public @react */
|
|
656
|
-
export declare function DebugFlags(props: DebugFlagsProps):
|
|
663
|
+
export declare function DebugFlags(props: DebugFlagsProps): JSX.Element | null;
|
|
657
664
|
|
|
658
665
|
/** @public */
|
|
659
666
|
export declare interface DebugFlagsProps {
|
|
@@ -887,7 +894,7 @@ export declare const DefaultA11yAnnouncer: NamedExoticComponent<object>;
|
|
|
887
894
|
export declare const DefaultActionsMenu: NamedExoticComponent<TLUiActionsMenuProps>;
|
|
888
895
|
|
|
889
896
|
/** @public @react */
|
|
890
|
-
export declare function DefaultActionsMenuContent():
|
|
897
|
+
export declare function DefaultActionsMenuContent(): JSX.Element;
|
|
891
898
|
|
|
892
899
|
/** @public */
|
|
893
900
|
export declare function defaultAddFontsFromNode(node: Node_2, state: RichTextFontVisitorState, addFont: (font: TLFontFace) => void): RichTextFontVisitorState;
|
|
@@ -901,13 +908,13 @@ export { DefaultContextMenu as ContextMenu }
|
|
|
901
908
|
export { DefaultContextMenu }
|
|
902
909
|
|
|
903
910
|
/** @public @react */
|
|
904
|
-
export declare function DefaultContextMenuContent():
|
|
911
|
+
export declare function DefaultContextMenuContent(): JSX.Element | null;
|
|
905
912
|
|
|
906
913
|
/** @public @react */
|
|
907
|
-
export declare function DefaultDebugMenu({ children }: TLUiDebugMenuProps):
|
|
914
|
+
export declare function DefaultDebugMenu({ children }: TLUiDebugMenuProps): JSX.Element;
|
|
908
915
|
|
|
909
916
|
/** @public @react */
|
|
910
|
-
export declare function DefaultDebugMenuContent({ customDebugFlags, customFeatureFlags, }: CustomDebugFlags):
|
|
917
|
+
export declare function DefaultDebugMenuContent({ customDebugFlags, customFeatureFlags, }: CustomDebugFlags): JSX.Element;
|
|
911
918
|
|
|
912
919
|
/** @public @react */
|
|
913
920
|
export declare const DefaultDialogs: NamedExoticComponent<object>;
|
|
@@ -919,7 +926,7 @@ export declare let defaultEditorAssetUrls: TLEditorAssetUrls;
|
|
|
919
926
|
export declare type DefaultEmbedDefinitionType = (typeof DEFAULT_EMBED_DEFINITIONS)[number]['type'];
|
|
920
927
|
|
|
921
928
|
/** @public @react */
|
|
922
|
-
export declare function DefaultFollowingIndicator():
|
|
929
|
+
export declare function DefaultFollowingIndicator(): JSX.Element | null;
|
|
923
930
|
|
|
924
931
|
/** @public */
|
|
925
932
|
export declare const DefaultFontFaces: TLDefaultFonts;
|
|
@@ -975,19 +982,19 @@ export declare function defaultHandleExternalUrlContent(editor: Editor, { point,
|
|
|
975
982
|
}, { toasts, msg }: TLDefaultExternalContentHandlerOpts): Promise<void>;
|
|
976
983
|
|
|
977
984
|
/** @public @react */
|
|
978
|
-
export declare function DefaultHelperButtons({ children }: TLUiHelperButtonsProps):
|
|
985
|
+
export declare function DefaultHelperButtons({ children }: TLUiHelperButtonsProps): JSX.Element;
|
|
979
986
|
|
|
980
987
|
/** @public @react */
|
|
981
|
-
export declare function DefaultHelperButtonsContent():
|
|
988
|
+
export declare function DefaultHelperButtonsContent(): JSX.Element;
|
|
982
989
|
|
|
983
990
|
/** @public @react */
|
|
984
991
|
export declare const DefaultHelpMenu: NamedExoticComponent<TLUiHelpMenuProps>;
|
|
985
992
|
|
|
986
993
|
/** @public @react */
|
|
987
|
-
export declare function DefaultHelpMenuContent():
|
|
994
|
+
export declare function DefaultHelpMenuContent(): JSX.Element;
|
|
988
995
|
|
|
989
996
|
/** @public @react */
|
|
990
|
-
export declare function DefaultImageToolbar({ children }: TLUiImageToolbarProps):
|
|
997
|
+
export declare function DefaultImageToolbar({ children }: TLUiImageToolbarProps): JSX.Element | null;
|
|
991
998
|
|
|
992
999
|
/** @public @react */
|
|
993
1000
|
export declare const DefaultImageToolbarContent: NamedExoticComponent<DefaultImageToolbarContentProps>;
|
|
@@ -1005,19 +1012,19 @@ export declare interface DefaultImageToolbarContentProps {
|
|
|
1005
1012
|
export declare const DefaultKeyboardShortcutsDialog: NamedExoticComponent<TLUiKeyboardShortcutsDialogProps>;
|
|
1006
1013
|
|
|
1007
1014
|
/** @public @react */
|
|
1008
|
-
export declare function DefaultKeyboardShortcutsDialogContent():
|
|
1015
|
+
export declare function DefaultKeyboardShortcutsDialogContent(): JSX.Element;
|
|
1009
1016
|
|
|
1010
1017
|
/** @public @react */
|
|
1011
1018
|
export declare const DefaultMainMenu: NamedExoticComponent<TLUiMainMenuProps>;
|
|
1012
1019
|
|
|
1013
1020
|
/** @public @react */
|
|
1014
|
-
export declare function DefaultMainMenuContent():
|
|
1021
|
+
export declare function DefaultMainMenuContent(): JSX.Element;
|
|
1015
1022
|
|
|
1016
1023
|
/** @public @react */
|
|
1017
1024
|
export declare const DefaultMenuPanel: NamedExoticComponent<object>;
|
|
1018
1025
|
|
|
1019
1026
|
/** @public @react */
|
|
1020
|
-
export declare function DefaultMinimap():
|
|
1027
|
+
export declare function DefaultMinimap(): JSX.Element;
|
|
1021
1028
|
|
|
1022
1029
|
/** @public @react */
|
|
1023
1030
|
export declare const DefaultNavigationPanel: NamedExoticComponent<object>;
|
|
@@ -1029,7 +1036,7 @@ export declare const DefaultPageMenu: NamedExoticComponent<object>;
|
|
|
1029
1036
|
export declare const DefaultQuickActions: NamedExoticComponent<TLUiQuickActionsProps>;
|
|
1030
1037
|
|
|
1031
1038
|
/** @public @react */
|
|
1032
|
-
export declare function DefaultQuickActionsContent():
|
|
1039
|
+
export declare function DefaultQuickActionsContent(): JSX.Element | undefined;
|
|
1033
1040
|
|
|
1034
1041
|
/**
|
|
1035
1042
|
* The default rich text toolbar.
|
|
@@ -1043,7 +1050,7 @@ export declare const DefaultRichTextToolbar: React_3.NamedExoticComponent<TLUiRi
|
|
|
1043
1050
|
*
|
|
1044
1051
|
* @public @react
|
|
1045
1052
|
*/
|
|
1046
|
-
export declare function DefaultRichTextToolbarContent({ textEditor, onEditLinkStart, }: DefaultRichTextToolbarContentProps):
|
|
1053
|
+
export declare function DefaultRichTextToolbarContent({ textEditor, onEditLinkStart, }: DefaultRichTextToolbarContentProps): JSX.Element[];
|
|
1047
1054
|
|
|
1048
1055
|
/** @public */
|
|
1049
1056
|
export declare interface DefaultRichTextToolbarContentProps {
|
|
@@ -1058,13 +1065,13 @@ export declare const defaultShapeTools: readonly [typeof TextShapeTool, typeof D
|
|
|
1058
1065
|
export declare const defaultShapeUtils: readonly [typeof TextShapeUtil, typeof BookmarkShapeUtil, typeof DrawShapeUtil, typeof GeoShapeUtil, typeof NoteShapeUtil, typeof LineShapeUtil, typeof FrameShapeUtil, typeof ArrowShapeUtil, typeof HighlightShapeUtil, typeof EmbedShapeUtil, typeof ImageShapeUtil, typeof VideoShapeUtil];
|
|
1059
1066
|
|
|
1060
1067
|
/** @public @react */
|
|
1061
|
-
export declare function DefaultSharePanel():
|
|
1068
|
+
export declare function DefaultSharePanel(): JSX.Element;
|
|
1062
1069
|
|
|
1063
1070
|
/** @public @react */
|
|
1064
1071
|
export declare const DefaultStylePanel: NamedExoticComponent<TLUiStylePanelProps>;
|
|
1065
1072
|
|
|
1066
1073
|
/** @public @react */
|
|
1067
|
-
export declare function DefaultStylePanelContent():
|
|
1074
|
+
export declare function DefaultStylePanelContent(): JSX.Element;
|
|
1068
1075
|
|
|
1069
1076
|
/** @public @react */
|
|
1070
1077
|
export declare const DefaultToasts: NamedExoticComponent<object>;
|
|
@@ -1080,7 +1087,7 @@ export declare const DefaultToasts: NamedExoticComponent<object>;
|
|
|
1080
1087
|
export declare const DefaultToolbar: NamedExoticComponent<DefaultToolbarProps>;
|
|
1081
1088
|
|
|
1082
1089
|
/** @public @react */
|
|
1083
|
-
export declare function DefaultToolbarContent():
|
|
1090
|
+
export declare function DefaultToolbarContent(): JSX.Element;
|
|
1084
1091
|
|
|
1085
1092
|
/** @public */
|
|
1086
1093
|
export declare interface DefaultToolbarProps {
|
|
@@ -1095,9 +1102,6 @@ export declare interface DefaultToolbarProps {
|
|
|
1095
1102
|
/** @public */
|
|
1096
1103
|
export declare const defaultTools: readonly [typeof EraserTool, typeof HandTool, typeof LaserTool, typeof ZoomTool, typeof SelectTool];
|
|
1097
1104
|
|
|
1098
|
-
/** @public @react */
|
|
1099
|
-
export declare function DefaultTopPanel(): JSX_2.Element;
|
|
1100
|
-
|
|
1101
1105
|
/** @public @react */
|
|
1102
1106
|
export declare const DefaultVideoToolbar: NamedExoticComponent<TLUiVideoToolbarProps>;
|
|
1103
1107
|
|
|
@@ -1114,16 +1118,16 @@ export declare interface DefaultVideoToolbarContentProps {
|
|
|
1114
1118
|
export declare const DefaultZoomMenu: NamedExoticComponent<TLUiZoomMenuProps>;
|
|
1115
1119
|
|
|
1116
1120
|
/** @public @react */
|
|
1117
|
-
export declare function DefaultZoomMenuContent():
|
|
1121
|
+
export declare function DefaultZoomMenuContent(): JSX.Element;
|
|
1118
1122
|
|
|
1119
1123
|
/** @public @react */
|
|
1120
|
-
export declare function DeleteMenuItem():
|
|
1124
|
+
export declare function DeleteMenuItem(): JSX.Element;
|
|
1121
1125
|
|
|
1122
1126
|
/** @public @react */
|
|
1123
|
-
export declare function DiamondToolbarItem():
|
|
1127
|
+
export declare function DiamondToolbarItem(): JSX.Element;
|
|
1124
1128
|
|
|
1125
1129
|
/** @public @react */
|
|
1126
|
-
export declare function DistributeMenuItems():
|
|
1130
|
+
export declare function DistributeMenuItems(): JSX.Element;
|
|
1127
1131
|
|
|
1128
1132
|
/* Excluded from this release type: downloadFile */
|
|
1129
1133
|
|
|
@@ -1194,13 +1198,14 @@ export declare class DrawShapeUtil extends ShapeUtil<TLDrawShape> {
|
|
|
1194
1198
|
hideSelectionBoundsFg(shape: TLDrawShape): boolean;
|
|
1195
1199
|
getDefaultProps(): TLDrawShape['props'];
|
|
1196
1200
|
getGeometry(shape: TLDrawShape): Circle2d | Polyline2d;
|
|
1197
|
-
component(shape: TLDrawShape):
|
|
1198
|
-
indicator(shape: TLDrawShape):
|
|
1199
|
-
toSvg(shape: TLDrawShape, ctx: SvgExportContext):
|
|
1201
|
+
component(shape: TLDrawShape): JSX.Element;
|
|
1202
|
+
indicator(shape: TLDrawShape): JSX.Element;
|
|
1203
|
+
toSvg(shape: TLDrawShape, ctx: SvgExportContext): JSX.Element;
|
|
1200
1204
|
getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
|
|
1201
1205
|
onResize(shape: TLDrawShape, info: TLResizeInfo<TLDrawShape>): {
|
|
1202
1206
|
props: {
|
|
1203
|
-
|
|
1207
|
+
scaleX: number;
|
|
1208
|
+
scaleY: number;
|
|
1204
1209
|
};
|
|
1205
1210
|
};
|
|
1206
1211
|
expandSelectionOutlinePx(shape: TLDrawShape): number;
|
|
@@ -1208,19 +1213,19 @@ export declare class DrawShapeUtil extends ShapeUtil<TLDrawShape> {
|
|
|
1208
1213
|
}
|
|
1209
1214
|
|
|
1210
1215
|
/** @public @react */
|
|
1211
|
-
export declare function DrawToolbarItem():
|
|
1216
|
+
export declare function DrawToolbarItem(): JSX.Element;
|
|
1212
1217
|
|
|
1213
1218
|
/** @public @react */
|
|
1214
|
-
export declare function DuplicateMenuItem():
|
|
1219
|
+
export declare function DuplicateMenuItem(): JSX.Element | null;
|
|
1215
1220
|
|
|
1216
1221
|
/** @public @react */
|
|
1217
|
-
export declare function EditLinkMenuItem():
|
|
1222
|
+
export declare function EditLinkMenuItem(): JSX.Element | null;
|
|
1218
1223
|
|
|
1219
1224
|
/** @public @react */
|
|
1220
|
-
export declare function EditMenuSubmenu():
|
|
1225
|
+
export declare function EditMenuSubmenu(): JSX.Element | null;
|
|
1221
1226
|
|
|
1222
1227
|
/** @public @react */
|
|
1223
|
-
export declare function EditSubmenu():
|
|
1228
|
+
export declare function EditSubmenu(): JSX.Element;
|
|
1224
1229
|
|
|
1225
1230
|
/**
|
|
1226
1231
|
* @public
|
|
@@ -1446,7 +1451,7 @@ export declare interface ElbowArrowTargetBox extends ElbowArrowBox {
|
|
|
1446
1451
|
}
|
|
1447
1452
|
|
|
1448
1453
|
/** @public @react */
|
|
1449
|
-
export declare function EllipseToolbarItem():
|
|
1454
|
+
export declare function EllipseToolbarItem(): JSX.Element;
|
|
1450
1455
|
|
|
1451
1456
|
/** @public */
|
|
1452
1457
|
export declare interface EmbedDefinition {
|
|
@@ -1463,6 +1468,7 @@ export declare interface EmbedDefinition {
|
|
|
1463
1468
|
readonly instructionLink?: string;
|
|
1464
1469
|
readonly backgroundColor?: string;
|
|
1465
1470
|
readonly embedOnPaste?: boolean;
|
|
1471
|
+
readonly canEditWhileLocked?: boolean;
|
|
1466
1472
|
readonly overrideOutlineRadius?: number;
|
|
1467
1473
|
readonly toEmbedUrl: (url: string) => string | undefined;
|
|
1468
1474
|
readonly fromEmbedUrl: (url: string) => string | undefined;
|
|
@@ -1497,6 +1503,7 @@ export declare class EmbedShapeUtil extends BaseBoxShapeUtil<TLEmbedShape> {
|
|
|
1497
1503
|
static props: RecordProps<TLEmbedShape>;
|
|
1498
1504
|
static migrations: TLPropsMigrations;
|
|
1499
1505
|
private static embedDefinitions;
|
|
1506
|
+
canEditWhileLocked(shape: TLEmbedShape): boolean;
|
|
1500
1507
|
static setEmbedDefinitions(embedDefinitions: readonly TLEmbedDefinition[]): void;
|
|
1501
1508
|
getEmbedDefinitions(): readonly TLEmbedDefinition[];
|
|
1502
1509
|
getEmbedDefinition(url: string): TLEmbedResult;
|
|
@@ -1510,8 +1517,8 @@ export declare class EmbedShapeUtil extends BaseBoxShapeUtil<TLEmbedShape> {
|
|
|
1510
1517
|
getGeometry(shape: TLEmbedShape): Geometry2d;
|
|
1511
1518
|
isAspectRatioLocked(shape: TLEmbedShape): boolean;
|
|
1512
1519
|
onResize(shape: TLEmbedShape, info: TLResizeInfo<TLEmbedShape>): TLEmbedShape;
|
|
1513
|
-
component(shape: TLEmbedShape):
|
|
1514
|
-
indicator(shape: TLEmbedShape):
|
|
1520
|
+
component(shape: TLEmbedShape): JSX.Element | null;
|
|
1521
|
+
indicator(shape: TLEmbedShape): JSX.Element;
|
|
1515
1522
|
getInterpolatedProps(startShape: TLEmbedShape, endShape: TLEmbedShape, t: number): TLEmbedShapeProps;
|
|
1516
1523
|
}
|
|
1517
1524
|
|
|
@@ -1525,7 +1532,7 @@ export declare class EraserTool extends StateNode {
|
|
|
1525
1532
|
}
|
|
1526
1533
|
|
|
1527
1534
|
/** @public @react */
|
|
1528
|
-
export declare function EraserToolbarItem():
|
|
1535
|
+
export declare function EraserToolbarItem(): JSX.Element;
|
|
1529
1536
|
|
|
1530
1537
|
/** @public */
|
|
1531
1538
|
export declare interface EventsProviderProps {
|
|
@@ -1534,7 +1541,7 @@ export declare interface EventsProviderProps {
|
|
|
1534
1541
|
}
|
|
1535
1542
|
|
|
1536
1543
|
/** @public @react */
|
|
1537
|
-
export declare function ExampleDialog({ title, body, cancel, confirm, displayDontShowAgain, maxWidth, onCancel, onContinue, }: ExampleDialogProps):
|
|
1544
|
+
export declare function ExampleDialog({ title, body, cancel, confirm, displayDontShowAgain, maxWidth, onCancel, onContinue, }: ExampleDialogProps): JSX.Element;
|
|
1538
1545
|
|
|
1539
1546
|
/** @public */
|
|
1540
1547
|
export declare interface ExampleDialogProps {
|
|
@@ -1568,13 +1575,13 @@ export declare interface ExportAsOptions extends TLImageExportOptions {
|
|
|
1568
1575
|
}
|
|
1569
1576
|
|
|
1570
1577
|
/** @public @react */
|
|
1571
|
-
export declare function ExportFileContentSubMenu():
|
|
1578
|
+
export declare function ExportFileContentSubMenu(): JSX.Element;
|
|
1572
1579
|
|
|
1573
1580
|
/** @public @react */
|
|
1574
|
-
export declare function ExtrasGroup():
|
|
1581
|
+
export declare function ExtrasGroup(): JSX.Element;
|
|
1575
1582
|
|
|
1576
1583
|
/** @public @react */
|
|
1577
|
-
export declare function FeatureFlags(props: FeatureFlagsProps):
|
|
1584
|
+
export declare function FeatureFlags(props: FeatureFlagsProps): JSX.Element | null;
|
|
1578
1585
|
|
|
1579
1586
|
/** @public */
|
|
1580
1587
|
export declare interface FeatureFlagsProps {
|
|
@@ -1595,7 +1602,7 @@ export declare function fitFrameToContent(editor: Editor, id: TLShapeId, opts?:
|
|
|
1595
1602
|
}): void;
|
|
1596
1603
|
|
|
1597
1604
|
/** @public @react */
|
|
1598
|
-
export declare function FitFrameToContentMenuItem():
|
|
1605
|
+
export declare function FitFrameToContentMenuItem(): JSX.Element | null;
|
|
1599
1606
|
|
|
1600
1607
|
/** @public */
|
|
1601
1608
|
export declare const FONT_FAMILIES: Record<TLDefaultFontStyle, string>;
|
|
@@ -1609,13 +1616,17 @@ export declare interface FrameShapeOptions {
|
|
|
1609
1616
|
* When true, the frame will display colors for the shape's headings and background.
|
|
1610
1617
|
*/
|
|
1611
1618
|
showColors: boolean;
|
|
1619
|
+
/**
|
|
1620
|
+
* When true, the frame will resize its children when the frame itself is resized.
|
|
1621
|
+
*/
|
|
1622
|
+
resizeChildren: boolean;
|
|
1612
1623
|
}
|
|
1613
1624
|
|
|
1614
1625
|
/** @public */
|
|
1615
1626
|
export declare class FrameShapeTool extends BaseBoxShapeTool {
|
|
1616
1627
|
static id: string;
|
|
1617
1628
|
static initial: string;
|
|
1618
|
-
shapeType:
|
|
1629
|
+
shapeType: "frame";
|
|
1619
1630
|
onCreate(shape: null | TLShape): void;
|
|
1620
1631
|
}
|
|
1621
1632
|
|
|
@@ -1628,7 +1639,7 @@ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
|
|
|
1628
1639
|
static configure<T extends TLShapeUtilConstructor<any, any>>(this: T, options: T extends new (...args: any[]) => {
|
|
1629
1640
|
options: infer Options;
|
|
1630
1641
|
} ? Partial<Options> : never): T;
|
|
1631
|
-
canEdit(): boolean;
|
|
1642
|
+
canEdit(shape: TLFrameShape, info: TLEditStartInfo): boolean;
|
|
1632
1643
|
canResize(): boolean;
|
|
1633
1644
|
canResizeChildren(): boolean;
|
|
1634
1645
|
isExportBoundsContainer(): boolean;
|
|
@@ -1636,9 +1647,9 @@ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
|
|
|
1636
1647
|
getAriaDescriptor(shape: TLFrameShape): string;
|
|
1637
1648
|
getGeometry(shape: TLFrameShape): Geometry2d;
|
|
1638
1649
|
getText(shape: TLFrameShape): string | undefined;
|
|
1639
|
-
component(shape: TLFrameShape):
|
|
1640
|
-
toSvg(shape: TLFrameShape, ctx: SvgExportContext):
|
|
1641
|
-
indicator(shape: TLFrameShape):
|
|
1650
|
+
component(shape: TLFrameShape): JSX.Element;
|
|
1651
|
+
toSvg(shape: TLFrameShape, ctx: SvgExportContext): JSX.Element;
|
|
1652
|
+
indicator(shape: TLFrameShape): JSX.Element;
|
|
1642
1653
|
providesBackgroundForChildren(): boolean;
|
|
1643
1654
|
getClipPath(shape: TLFrameShape): Vec[];
|
|
1644
1655
|
canReceiveNewChildrenOfType(shape: TLShape): boolean;
|
|
@@ -1661,7 +1672,7 @@ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
|
|
|
1661
1672
|
}
|
|
1662
1673
|
|
|
1663
1674
|
/** @public @react */
|
|
1664
|
-
export declare function FrameToolbarItem():
|
|
1675
|
+
export declare function FrameToolbarItem(): JSX.Element;
|
|
1665
1676
|
|
|
1666
1677
|
/** @public */
|
|
1667
1678
|
export declare class GeoShapeTool extends StateNode {
|
|
@@ -1676,15 +1687,18 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
|
|
|
1676
1687
|
static type: "geo";
|
|
1677
1688
|
static props: RecordProps<TLGeoShape>;
|
|
1678
1689
|
static migrations: TLPropsMigrations;
|
|
1690
|
+
options: {
|
|
1691
|
+
showTextOutline: boolean;
|
|
1692
|
+
};
|
|
1679
1693
|
canEdit(): boolean;
|
|
1680
1694
|
getDefaultProps(): TLGeoShape['props'];
|
|
1681
1695
|
getGeometry(shape: TLGeoShape): Group2d;
|
|
1682
1696
|
getHandleSnapGeometry(shape: TLGeoShape): HandleSnapGeometry;
|
|
1683
1697
|
getText(shape: TLGeoShape): string;
|
|
1684
1698
|
getFontFaces(shape: TLGeoShape): TLFontFace[];
|
|
1685
|
-
component(shape: TLGeoShape):
|
|
1686
|
-
indicator(shape: TLGeoShape):
|
|
1687
|
-
toSvg(shape: TLGeoShape, ctx: SvgExportContext):
|
|
1699
|
+
component(shape: TLGeoShape): JSX.Element;
|
|
1700
|
+
indicator(shape: TLGeoShape): JSX.Element;
|
|
1701
|
+
toSvg(shape: TLGeoShape, ctx: SvgExportContext): JSX.Element;
|
|
1688
1702
|
getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
|
|
1689
1703
|
onResize(shape: TLGeoShape, { handle, newPoint, scaleX, scaleY, initialShape }: TLResizeInfo<TLGeoShape>): {
|
|
1690
1704
|
props: {
|
|
@@ -1839,6 +1853,35 @@ export declare function getHitShapeOnCanvasPointerDown(editor: Editor, hitLabels
|
|
|
1839
1853
|
/** @public */
|
|
1840
1854
|
export declare function getMediaAssetInfoPartial(file: File, assetId: TLAssetId, isImageType: boolean, isVideoType: boolean, maxImageDimension?: number): Promise<TLImageAsset | TLVideoAsset>;
|
|
1841
1855
|
|
|
1856
|
+
/** @public */
|
|
1857
|
+
export declare function getPointsFromDrawSegment(segment: TLDrawShapeSegment, scaleX: number, scaleY: number, points?: Vec[]): Vec[];
|
|
1858
|
+
|
|
1859
|
+
/** @public */
|
|
1860
|
+
export declare function getPointsFromDrawSegments(segments: TLDrawShapeSegment[], scaleX?: number, scaleY?: number): Vec[];
|
|
1861
|
+
|
|
1862
|
+
/**
|
|
1863
|
+
* ## getStroke
|
|
1864
|
+
*
|
|
1865
|
+
* Get an array of points describing a polygon that surrounds the input points.
|
|
1866
|
+
*
|
|
1867
|
+
* @param points - An array of points (as `[x, y, pressure]` or `{x, y, pressure}`). Pressure is
|
|
1868
|
+
* optional in both cases.
|
|
1869
|
+
* @param options - An object with options.
|
|
1870
|
+
* @public
|
|
1871
|
+
*/
|
|
1872
|
+
export declare function getStroke(points: VecLike[], options?: StrokeOptions): Vec[];
|
|
1873
|
+
|
|
1874
|
+
/**
|
|
1875
|
+
* ## getStrokeOutlinePoints
|
|
1876
|
+
*
|
|
1877
|
+
* Get an array of points (as `[x, y]`) representing the outline of a stroke.
|
|
1878
|
+
*
|
|
1879
|
+
* @param points - An array of StrokePoints as returned from `getStrokePoints`.
|
|
1880
|
+
* @param options - An object with options.
|
|
1881
|
+
* @public
|
|
1882
|
+
*/
|
|
1883
|
+
export declare function getStrokeOutlinePoints(strokePoints: StrokePoint[], options?: StrokeOptions): Vec[];
|
|
1884
|
+
|
|
1842
1885
|
/**
|
|
1843
1886
|
* ## getStrokePoints
|
|
1844
1887
|
*
|
|
@@ -1876,10 +1919,10 @@ export declare function getUncroppedSize(shapeSize: {
|
|
|
1876
1919
|
};
|
|
1877
1920
|
|
|
1878
1921
|
/** @public @react */
|
|
1879
|
-
export declare function GroupMenuItem():
|
|
1922
|
+
export declare function GroupMenuItem(): JSX.Element | null;
|
|
1880
1923
|
|
|
1881
1924
|
/** @public @react */
|
|
1882
|
-
export declare function GroupOrUngroupMenuItem():
|
|
1925
|
+
export declare function GroupOrUngroupMenuItem(): JSX.Element;
|
|
1883
1926
|
|
|
1884
1927
|
/** @public */
|
|
1885
1928
|
export declare class HandTool extends StateNode {
|
|
@@ -1893,13 +1936,16 @@ export declare class HandTool extends StateNode {
|
|
|
1893
1936
|
}
|
|
1894
1937
|
|
|
1895
1938
|
/** @public @react */
|
|
1896
|
-
export declare function HandToolbarItem():
|
|
1939
|
+
export declare function HandToolbarItem(): JSX.Element;
|
|
1897
1940
|
|
|
1898
1941
|
/** @public @react */
|
|
1899
|
-
export declare function HeartToolbarItem():
|
|
1942
|
+
export declare function HeartToolbarItem(): JSX.Element;
|
|
1900
1943
|
|
|
1901
1944
|
/** @public @react */
|
|
1902
|
-
export declare function HexagonToolbarItem():
|
|
1945
|
+
export declare function HexagonToolbarItem(): JSX.Element;
|
|
1946
|
+
|
|
1947
|
+
/** @public */
|
|
1948
|
+
export declare function hideAllTooltips(): void;
|
|
1903
1949
|
|
|
1904
1950
|
/** @public */
|
|
1905
1951
|
export declare interface HighlightShapeOptions {
|
|
@@ -1934,21 +1980,22 @@ export declare class HighlightShapeUtil extends ShapeUtil<TLHighlightShape> {
|
|
|
1934
1980
|
hideSelectionBoundsFg(shape: TLHighlightShape): boolean;
|
|
1935
1981
|
getDefaultProps(): TLHighlightShape['props'];
|
|
1936
1982
|
getGeometry(shape: TLHighlightShape): Circle2d | Polygon2d;
|
|
1937
|
-
component(shape: TLHighlightShape):
|
|
1938
|
-
backgroundComponent(shape: TLHighlightShape):
|
|
1939
|
-
indicator(shape: TLHighlightShape):
|
|
1940
|
-
toSvg(shape: TLHighlightShape):
|
|
1941
|
-
toBackgroundSvg(shape: TLHighlightShape):
|
|
1983
|
+
component(shape: TLHighlightShape): JSX.Element;
|
|
1984
|
+
backgroundComponent(shape: TLHighlightShape): JSX.Element;
|
|
1985
|
+
indicator(shape: TLHighlightShape): JSX.Element;
|
|
1986
|
+
toSvg(shape: TLHighlightShape): JSX.Element;
|
|
1987
|
+
toBackgroundSvg(shape: TLHighlightShape): JSX.Element;
|
|
1942
1988
|
onResize(shape: TLHighlightShape, info: TLResizeInfo<TLHighlightShape>): {
|
|
1943
1989
|
props: {
|
|
1944
|
-
|
|
1990
|
+
scaleX: number;
|
|
1991
|
+
scaleY: number;
|
|
1945
1992
|
};
|
|
1946
1993
|
};
|
|
1947
1994
|
getInterpolatedProps(startShape: TLHighlightShape, endShape: TLHighlightShape, t: number): TLHighlightShapeProps;
|
|
1948
1995
|
}
|
|
1949
1996
|
|
|
1950
1997
|
/** @public @react */
|
|
1951
|
-
export declare function HighlightToolbarItem():
|
|
1998
|
+
export declare function HighlightToolbarItem(): JSX.Element;
|
|
1952
1999
|
|
|
1953
2000
|
/** @public */
|
|
1954
2001
|
export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
|
|
@@ -1962,9 +2009,9 @@ export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
|
|
|
1962
2009
|
getGeometry(shape: TLImageShape): Geometry2d;
|
|
1963
2010
|
getAriaDescriptor(shape: TLImageShape): string;
|
|
1964
2011
|
onResize(shape: TLImageShape, info: TLResizeInfo<TLImageShape>): TLImageShape;
|
|
1965
|
-
component(shape: TLImageShape):
|
|
1966
|
-
indicator(shape: TLImageShape):
|
|
1967
|
-
toSvg(shape: TLImageShape, ctx: SvgExportContext): Promise<
|
|
2012
|
+
component(shape: TLImageShape): JSX.Element;
|
|
2013
|
+
indicator(shape: TLImageShape): JSX.Element | null;
|
|
2014
|
+
toSvg(shape: TLImageShape, ctx: SvgExportContext): Promise<JSX.Element | null>;
|
|
1968
2015
|
onDoubleClickEdge(shape: TLImageShape): void;
|
|
1969
2016
|
getInterpolatedProps(startShape: TLImageShape, endShape: TLImageShape, t: number): TLImageShapeProps;
|
|
1970
2017
|
}
|
|
@@ -1973,13 +2020,13 @@ export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
|
|
|
1973
2020
|
export declare const KeyboardShiftEnterTweakExtension: Extension<any, any>;
|
|
1974
2021
|
|
|
1975
2022
|
/** @public @react */
|
|
1976
|
-
export declare function KeyboardShortcutsMenuItem():
|
|
2023
|
+
export declare function KeyboardShortcutsMenuItem(): JSX.Element | null;
|
|
1977
2024
|
|
|
1978
2025
|
/** @public */
|
|
1979
2026
|
export declare const LABEL_FONT_SIZES: Record<TLDefaultSizeStyle, number>;
|
|
1980
2027
|
|
|
1981
2028
|
/** @public @react */
|
|
1982
|
-
export declare function LanguageMenu():
|
|
2029
|
+
export declare function LanguageMenu(): JSX.Element | null;
|
|
1983
2030
|
|
|
1984
2031
|
/** @public */
|
|
1985
2032
|
export declare class LaserTool extends StateNode {
|
|
@@ -1991,7 +2038,7 @@ export declare class LaserTool extends StateNode {
|
|
|
1991
2038
|
}
|
|
1992
2039
|
|
|
1993
2040
|
/** @public @react */
|
|
1994
|
-
export declare function LaserToolbarItem():
|
|
2041
|
+
export declare function LaserToolbarItem(): JSX.Element;
|
|
1995
2042
|
|
|
1996
2043
|
/** @public */
|
|
1997
2044
|
export declare class LineShapeTool extends StateNode {
|
|
@@ -2083,29 +2130,29 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
|
|
|
2083
2130
|
x: number;
|
|
2084
2131
|
y: number;
|
|
2085
2132
|
} | undefined;
|
|
2086
|
-
component(shape: TLLineShape):
|
|
2087
|
-
indicator(shape: TLLineShape):
|
|
2088
|
-
toSvg(shape: TLLineShape):
|
|
2133
|
+
component(shape: TLLineShape): JSX.Element;
|
|
2134
|
+
indicator(shape: TLLineShape): JSX.Element;
|
|
2135
|
+
toSvg(shape: TLLineShape): JSX.Element;
|
|
2089
2136
|
getHandleSnapGeometry(shape: TLLineShape): HandleSnapGeometry;
|
|
2090
2137
|
getInterpolatedProps(startShape: TLLineShape, endShape: TLLineShape, t: number): TLLineShape['props'];
|
|
2091
2138
|
}
|
|
2092
2139
|
|
|
2093
2140
|
/** @public @react */
|
|
2094
|
-
export declare function LineToolbarItem():
|
|
2141
|
+
export declare function LineToolbarItem(): JSX.Element;
|
|
2095
2142
|
|
|
2096
2143
|
/* Excluded from this release type: LineToPathBuilderCommand */
|
|
2097
2144
|
|
|
2098
2145
|
/** @public @react */
|
|
2099
|
-
export declare function LockGroup():
|
|
2146
|
+
export declare function LockGroup(): JSX.Element;
|
|
2100
2147
|
|
|
2101
2148
|
/** @public @react */
|
|
2102
|
-
export declare function MiscMenuGroup():
|
|
2149
|
+
export declare function MiscMenuGroup(): JSX.Element;
|
|
2103
2150
|
|
|
2104
2151
|
/** @public @react */
|
|
2105
|
-
export declare function MobileStylePanel():
|
|
2152
|
+
export declare function MobileStylePanel(): JSX.Element | null;
|
|
2106
2153
|
|
|
2107
2154
|
/** @public @react */
|
|
2108
|
-
export declare function MoveToPageMenu():
|
|
2155
|
+
export declare function MoveToPageMenu(): JSX.Element | null;
|
|
2109
2156
|
|
|
2110
2157
|
/* Excluded from this release type: MoveToPathBuilderCommand */
|
|
2111
2158
|
|
|
@@ -2148,9 +2195,9 @@ export declare class NoteShapeUtil extends ShapeUtil<TLNoteShape> {
|
|
|
2148
2195
|
} | undefined;
|
|
2149
2196
|
getText(shape: TLNoteShape): string;
|
|
2150
2197
|
getFontFaces(shape: TLNoteShape): TLFontFace[];
|
|
2151
|
-
component(shape: TLNoteShape):
|
|
2152
|
-
indicator(shape: TLNoteShape):
|
|
2153
|
-
toSvg(shape: TLNoteShape, ctx: SvgExportContext):
|
|
2198
|
+
component(shape: TLNoteShape): JSX.Element;
|
|
2199
|
+
indicator(shape: TLNoteShape): JSX.Element;
|
|
2200
|
+
toSvg(shape: TLNoteShape, ctx: SvgExportContext): JSX.Element;
|
|
2154
2201
|
onBeforeCreate(next: TLNoteShape): {
|
|
2155
2202
|
id: TLShapeId;
|
|
2156
2203
|
index: IndexKey;
|
|
@@ -2207,7 +2254,7 @@ export declare class NoteShapeUtil extends ShapeUtil<TLNoteShape> {
|
|
|
2207
2254
|
}
|
|
2208
2255
|
|
|
2209
2256
|
/** @public @react */
|
|
2210
|
-
export declare function NoteToolbarItem():
|
|
2257
|
+
export declare function NoteToolbarItem(): JSX.Element;
|
|
2211
2258
|
|
|
2212
2259
|
/**
|
|
2213
2260
|
* Checks if a file is allowed to be uploaded. If it is not, it will show a toast explaining why to the user.
|
|
@@ -2220,7 +2267,7 @@ export declare function NoteToolbarItem(): JSX_2.Element;
|
|
|
2220
2267
|
export declare function notifyIfFileNotAllowed(file: File, options: TLDefaultExternalContentHandlerOpts): boolean;
|
|
2221
2268
|
|
|
2222
2269
|
/** @public @react */
|
|
2223
|
-
export declare function OfflineIndicator():
|
|
2270
|
+
export declare function OfflineIndicator(): JSX.Element;
|
|
2224
2271
|
|
|
2225
2272
|
/**
|
|
2226
2273
|
* A helper method to use in {@link TLUiToolItem#onDragStart} to create a shape by dragging it from
|
|
@@ -2246,10 +2293,10 @@ export declare interface OnDragFromToolbarToCreateShapesOpts {
|
|
|
2246
2293
|
}
|
|
2247
2294
|
|
|
2248
2295
|
/** @public @react */
|
|
2249
|
-
export declare function OvalToolbarItem():
|
|
2296
|
+
export declare function OvalToolbarItem(): JSX.Element;
|
|
2250
2297
|
|
|
2251
2298
|
/** @public @react */
|
|
2252
|
-
export declare function OverflowingToolbar({ children, orientation, sizingParentClassName, minItems, minSizePx, maxItems, maxSizePx, }: OverflowingToolbarProps):
|
|
2299
|
+
export declare function OverflowingToolbar({ children, orientation, sizingParentClassName, minItems, minSizePx, maxItems, maxSizePx, }: OverflowingToolbarProps): JSX.Element;
|
|
2253
2300
|
|
|
2254
2301
|
/** @public */
|
|
2255
2302
|
export declare interface OverflowingToolbarProps {
|
|
@@ -2263,7 +2310,7 @@ export declare interface OverflowingToolbarProps {
|
|
|
2263
2310
|
}
|
|
2264
2311
|
|
|
2265
2312
|
/** @public @react */
|
|
2266
|
-
export declare const PageItemInput: ({ name, id, isCurrentPage, onCancel, onComplete, }: PageItemInputProps) =>
|
|
2313
|
+
export declare const PageItemInput: ({ name, id, isCurrentPage, onCancel, onComplete, }: PageItemInputProps) => JSX.Element;
|
|
2267
2314
|
|
|
2268
2315
|
/** @public */
|
|
2269
2316
|
export declare interface PageItemInputProps {
|
|
@@ -2297,7 +2344,7 @@ export declare function parseTldrawJsonFile({ json, schema, }: {
|
|
|
2297
2344
|
}): Result<TLStore, TldrawFileParseError>;
|
|
2298
2345
|
|
|
2299
2346
|
/** @public @react */
|
|
2300
|
-
export declare function PasteMenuItem():
|
|
2347
|
+
export declare function PasteMenuItem(): JSX.Element;
|
|
2301
2348
|
|
|
2302
2349
|
/** @public */
|
|
2303
2350
|
export declare class PathBuilder {
|
|
@@ -2319,7 +2366,7 @@ export declare class PathBuilder {
|
|
|
2319
2366
|
private cubicBezierToWithResolution;
|
|
2320
2367
|
close(): this;
|
|
2321
2368
|
toD(opts?: PathBuilderToDOpts): string;
|
|
2322
|
-
toSvg(opts: PathBuilderOpts):
|
|
2369
|
+
toSvg(opts: PathBuilderOpts): JSX.Element;
|
|
2323
2370
|
toGeometry(): Group2d | PathBuilderGeometry2d;
|
|
2324
2371
|
private toSolidSvg;
|
|
2325
2372
|
private toDashedSvg;
|
|
@@ -2388,7 +2435,7 @@ export declare interface PathBuilderToDOpts {
|
|
|
2388
2435
|
}
|
|
2389
2436
|
|
|
2390
2437
|
/** @public @react */
|
|
2391
|
-
export declare function PeopleMenu({ children }: PeopleMenuProps):
|
|
2438
|
+
export declare function PeopleMenu({ children }: PeopleMenuProps): JSX.Element | null;
|
|
2392
2439
|
|
|
2393
2440
|
/** @public */
|
|
2394
2441
|
export declare interface PeopleMenuProps {
|
|
@@ -2414,7 +2461,9 @@ export declare const PlainTextLabel: React_3.NamedExoticComponent<PlainTextLabel
|
|
|
2414
2461
|
/** @public */
|
|
2415
2462
|
export declare interface PlainTextLabelProps {
|
|
2416
2463
|
shapeId: TLShapeId;
|
|
2417
|
-
type:
|
|
2464
|
+
type: ExtractShapeByProps<{
|
|
2465
|
+
text: string;
|
|
2466
|
+
}>['type'];
|
|
2418
2467
|
font: TLDefaultFontStyle;
|
|
2419
2468
|
fontSize: number;
|
|
2420
2469
|
lineHeight: number;
|
|
@@ -2432,6 +2481,7 @@ export declare interface PlainTextLabelProps {
|
|
|
2432
2481
|
textWidth?: number;
|
|
2433
2482
|
textHeight?: number;
|
|
2434
2483
|
padding?: number;
|
|
2484
|
+
showTextOutline?: boolean;
|
|
2435
2485
|
}
|
|
2436
2486
|
|
|
2437
2487
|
/** @public */
|
|
@@ -2447,13 +2497,13 @@ export declare enum PORTRAIT_BREAKPOINT {
|
|
|
2447
2497
|
}
|
|
2448
2498
|
|
|
2449
2499
|
/** @public @react */
|
|
2450
|
-
export declare function PreferencesGroup():
|
|
2500
|
+
export declare function PreferencesGroup(): JSX.Element;
|
|
2451
2501
|
|
|
2452
2502
|
/** @public */
|
|
2453
2503
|
export declare function preloadFont(id: string, font: TLTypeFace): Promise<FontFace>;
|
|
2454
2504
|
|
|
2455
2505
|
/** @public @react */
|
|
2456
|
-
export declare function PrintItem():
|
|
2506
|
+
export declare function PrintItem(): JSX.Element;
|
|
2457
2507
|
|
|
2458
2508
|
/**
|
|
2459
2509
|
* Put excalidraw clipboard content onto the current page.
|
|
@@ -2466,7 +2516,7 @@ export declare function PrintItem(): JSX_2.Element;
|
|
|
2466
2516
|
export declare function putExcalidrawContent(editor: Editor, excalidrawClipboardContent: any, point?: VecLike): Promise<void>;
|
|
2467
2517
|
|
|
2468
2518
|
/** @public @react */
|
|
2469
|
-
export declare function RectangleToolbarItem():
|
|
2519
|
+
export declare function RectangleToolbarItem(): JSX.Element;
|
|
2470
2520
|
|
|
2471
2521
|
/** @public */
|
|
2472
2522
|
export declare function registerDefaultExternalContentHandlers(editor: Editor, options: TLDefaultExternalContentHandlerOpts): void;
|
|
@@ -2485,7 +2535,7 @@ export declare function registerDefaultSideEffects(editor: Editor): () => void;
|
|
|
2485
2535
|
export declare function removeFrame(editor: Editor, ids: TLShapeId[]): void;
|
|
2486
2536
|
|
|
2487
2537
|
/** @public @react */
|
|
2488
|
-
export declare function RemoveFrameMenuItem():
|
|
2538
|
+
export declare function RemoveFrameMenuItem(): JSX.Element | null;
|
|
2489
2539
|
|
|
2490
2540
|
/**
|
|
2491
2541
|
* Renders HTML from a rich text string.
|
|
@@ -2502,7 +2552,6 @@ export declare function renderHtmlFromRichText(editor: Editor, richText: TLRichT
|
|
|
2502
2552
|
* @param editor - The editor instance.
|
|
2503
2553
|
* @param richText - The rich text content.
|
|
2504
2554
|
*
|
|
2505
|
-
*
|
|
2506
2555
|
* @public
|
|
2507
2556
|
*/
|
|
2508
2557
|
export declare function renderHtmlFromRichTextForMeasurement(editor: Editor, richText: TLRichText): string;
|
|
@@ -2512,7 +2561,6 @@ export declare function renderHtmlFromRichTextForMeasurement(editor: Editor, ric
|
|
|
2512
2561
|
* @param editor - The editor instance.
|
|
2513
2562
|
* @param richText - The rich text content.
|
|
2514
2563
|
*
|
|
2515
|
-
*
|
|
2516
2564
|
* @public
|
|
2517
2565
|
*/
|
|
2518
2566
|
export declare function renderPlaintextFromRichText(editor: Editor, richText: TLRichText): string;
|
|
@@ -2522,19 +2570,18 @@ export declare function renderPlaintextFromRichText(editor: Editor, richText: TL
|
|
|
2522
2570
|
* @param editor - The editor instance.
|
|
2523
2571
|
* @param richText - The rich text content.
|
|
2524
2572
|
*
|
|
2525
|
-
*
|
|
2526
2573
|
* @public
|
|
2527
2574
|
*/
|
|
2528
2575
|
export declare function renderRichTextFromHTML(editor: Editor, html: string): TLRichText;
|
|
2529
2576
|
|
|
2530
2577
|
/** @public @react */
|
|
2531
|
-
export declare function ReorderMenuItems():
|
|
2578
|
+
export declare function ReorderMenuItems(): JSX.Element;
|
|
2532
2579
|
|
|
2533
2580
|
/** @public @react */
|
|
2534
|
-
export declare function ReorderMenuSubmenu():
|
|
2581
|
+
export declare function ReorderMenuSubmenu(): JSX.Element | null;
|
|
2535
2582
|
|
|
2536
2583
|
/** @public @react */
|
|
2537
|
-
export declare function RhombusToolbarItem():
|
|
2584
|
+
export declare function RhombusToolbarItem(): JSX.Element;
|
|
2538
2585
|
|
|
2539
2586
|
/**
|
|
2540
2587
|
* A rich text area that can be used for editing text with rich text formatting.
|
|
@@ -2556,7 +2603,9 @@ export declare const RichTextLabel: React_3.NamedExoticComponent<RichTextLabelPr
|
|
|
2556
2603
|
/** @public */
|
|
2557
2604
|
export declare interface RichTextLabelProps {
|
|
2558
2605
|
shapeId: TLShapeId;
|
|
2559
|
-
type:
|
|
2606
|
+
type: ExtractShapeByProps<{
|
|
2607
|
+
richText: TLRichText;
|
|
2608
|
+
}>['type'];
|
|
2560
2609
|
font: TLDefaultFontStyle;
|
|
2561
2610
|
fontSize: number;
|
|
2562
2611
|
lineHeight: number;
|
|
@@ -2575,6 +2624,7 @@ export declare interface RichTextLabelProps {
|
|
|
2575
2624
|
textHeight?: number;
|
|
2576
2625
|
padding?: number;
|
|
2577
2626
|
hasCustomTabBehavior?: boolean;
|
|
2627
|
+
showTextOutline?: boolean;
|
|
2578
2628
|
}
|
|
2579
2629
|
|
|
2580
2630
|
/**
|
|
@@ -2582,7 +2632,7 @@ export declare interface RichTextLabelProps {
|
|
|
2582
2632
|
*
|
|
2583
2633
|
* @public @react
|
|
2584
2634
|
*/
|
|
2585
|
-
export declare function RichTextSVG({ bounds, richText, fontSize, font, align, verticalAlign, wrap, labelColor, padding, showTextOutline, }: RichTextSVGProps):
|
|
2635
|
+
export declare function RichTextSVG({ bounds, richText, fontSize, font, align, verticalAlign, wrap, labelColor, padding, showTextOutline, }: RichTextSVGProps): JSX.Element;
|
|
2586
2636
|
|
|
2587
2637
|
/** @public */
|
|
2588
2638
|
export declare interface RichTextSVGProps {
|
|
@@ -2599,10 +2649,10 @@ export declare interface RichTextSVGProps {
|
|
|
2599
2649
|
}
|
|
2600
2650
|
|
|
2601
2651
|
/** @public @react */
|
|
2602
|
-
export declare function RotateCWMenuItem():
|
|
2652
|
+
export declare function RotateCWMenuItem(): JSX.Element;
|
|
2603
2653
|
|
|
2604
2654
|
/** @public @react */
|
|
2605
|
-
export declare function SelectAllMenuItem():
|
|
2655
|
+
export declare function SelectAllMenuItem(): JSX.Element;
|
|
2606
2656
|
|
|
2607
2657
|
/** @public */
|
|
2608
2658
|
export declare class SelectTool extends StateNode {
|
|
@@ -2617,7 +2667,7 @@ export declare class SelectTool extends StateNode {
|
|
|
2617
2667
|
}
|
|
2618
2668
|
|
|
2619
2669
|
/** @public @react */
|
|
2620
|
-
export declare function SelectToolbarItem():
|
|
2670
|
+
export declare function SelectToolbarItem(): JSX.Element;
|
|
2621
2671
|
|
|
2622
2672
|
/** @public */
|
|
2623
2673
|
export declare function serializeTldrawJson(editor: Editor): Promise<string>;
|
|
@@ -2629,6 +2679,9 @@ export declare function serializeTldrawJsonBlob(editor: Editor): Promise<Blob>;
|
|
|
2629
2679
|
|
|
2630
2680
|
/* Excluded from this release type: setDefaultUiAssetUrls */
|
|
2631
2681
|
|
|
2682
|
+
/** @public */
|
|
2683
|
+
export declare function setStrokePointRadii(strokePoints: StrokePoint[], options: StrokeOptions): StrokePoint[];
|
|
2684
|
+
|
|
2632
2685
|
/** @public */
|
|
2633
2686
|
export declare interface SolidPathBuilderOpts extends BasePathBuilderOpts {
|
|
2634
2687
|
style: 'solid';
|
|
@@ -2637,10 +2690,25 @@ export declare interface SolidPathBuilderOpts extends BasePathBuilderOpts {
|
|
|
2637
2690
|
/* Excluded from this release type: Spinner */
|
|
2638
2691
|
|
|
2639
2692
|
/** @public @react */
|
|
2640
|
-
export declare function StackMenuItems():
|
|
2693
|
+
export declare function StackMenuItems(): JSX.Element;
|
|
2694
|
+
|
|
2695
|
+
/**
|
|
2696
|
+
* Start editing a shape that has rich text, such as text, note, geo, or arrow shapes.
|
|
2697
|
+
* This will enter the editing state for the shape and optionally select all the text.
|
|
2698
|
+
*
|
|
2699
|
+
* @param editor - The editor instance.
|
|
2700
|
+
* @param shapeOrId - The shape to start editing. This shape must have a richText property with a TLRichText value.
|
|
2701
|
+
* @param options - Options: selectAll or info (TLEventInfo)
|
|
2702
|
+
*
|
|
2703
|
+
* @public
|
|
2704
|
+
*/
|
|
2705
|
+
export declare function startEditingShapeWithRichText(editor: Editor, shapeOrId: TLShape | TLShapeId, options?: {
|
|
2706
|
+
info?: TLEventInfo;
|
|
2707
|
+
selectAll?: boolean;
|
|
2708
|
+
}): void;
|
|
2641
2709
|
|
|
2642
2710
|
/** @public @react */
|
|
2643
|
-
export declare function StarToolbarItem():
|
|
2711
|
+
export declare function StarToolbarItem(): JSX.Element;
|
|
2644
2712
|
|
|
2645
2713
|
/** @public */
|
|
2646
2714
|
export declare const STROKE_SIZES: Record<TLDefaultSizeStyle, number>;
|
|
@@ -2694,10 +2762,10 @@ export declare interface StrokePoint {
|
|
|
2694
2762
|
}
|
|
2695
2763
|
|
|
2696
2764
|
/** @public @react */
|
|
2697
|
-
export declare function StylePanelArrowheadPicker():
|
|
2765
|
+
export declare function StylePanelArrowheadPicker(): JSX.Element | null;
|
|
2698
2766
|
|
|
2699
2767
|
/** @public @react */
|
|
2700
|
-
export declare function StylePanelArrowKindPicker():
|
|
2768
|
+
export declare function StylePanelArrowKindPicker(): JSX.Element | null;
|
|
2701
2769
|
|
|
2702
2770
|
/** @public @react */
|
|
2703
2771
|
export declare const StylePanelButtonPicker: <T extends string>(props: StylePanelButtonPickerProps<T>) => React.JSX.Element;
|
|
@@ -2717,7 +2785,7 @@ export declare interface StylePanelButtonPickerProps<T extends string> {
|
|
|
2717
2785
|
}
|
|
2718
2786
|
|
|
2719
2787
|
/** @public @react */
|
|
2720
|
-
export declare function StylePanelColorPicker():
|
|
2788
|
+
export declare function StylePanelColorPicker(): JSX.Element | null;
|
|
2721
2789
|
|
|
2722
2790
|
/** @public */
|
|
2723
2791
|
export declare interface StylePanelContext {
|
|
@@ -2728,7 +2796,7 @@ export declare interface StylePanelContext {
|
|
|
2728
2796
|
}
|
|
2729
2797
|
|
|
2730
2798
|
/** @public @react */
|
|
2731
|
-
export declare function StylePanelContextProvider({ children, styles }: StylePanelContextProviderProps):
|
|
2799
|
+
export declare function StylePanelContextProvider({ children, styles }: StylePanelContextProviderProps): JSX.Element;
|
|
2732
2800
|
|
|
2733
2801
|
/** @public */
|
|
2734
2802
|
export declare interface StylePanelContextProviderProps {
|
|
@@ -2737,7 +2805,7 @@ export declare interface StylePanelContextProviderProps {
|
|
|
2737
2805
|
}
|
|
2738
2806
|
|
|
2739
2807
|
/** @public @react */
|
|
2740
|
-
export declare function StylePanelDashPicker():
|
|
2808
|
+
export declare function StylePanelDashPicker(): JSX.Element | null;
|
|
2741
2809
|
|
|
2742
2810
|
/** @public @react */
|
|
2743
2811
|
export declare const StylePanelDoubleDropdownPicker: <T extends string>(props: StylePanelDoubleDropdownPickerProps<T>) => React_2.JSX.Element;
|
|
@@ -2781,22 +2849,22 @@ export declare interface StylePanelDropdownPickerProps<T extends string> {
|
|
|
2781
2849
|
}
|
|
2782
2850
|
|
|
2783
2851
|
/** @public @react */
|
|
2784
|
-
export declare function StylePanelFillPicker():
|
|
2852
|
+
export declare function StylePanelFillPicker(): JSX.Element | null;
|
|
2785
2853
|
|
|
2786
2854
|
/** @public @react */
|
|
2787
|
-
export declare function StylePanelFontPicker():
|
|
2855
|
+
export declare function StylePanelFontPicker(): JSX.Element | null;
|
|
2788
2856
|
|
|
2789
2857
|
/** @public @react */
|
|
2790
|
-
export declare function StylePanelGeoShapePicker():
|
|
2858
|
+
export declare function StylePanelGeoShapePicker(): JSX.Element | null;
|
|
2791
2859
|
|
|
2792
2860
|
/** @public @react */
|
|
2793
|
-
export declare function StylePanelLabelAlignPicker():
|
|
2861
|
+
export declare function StylePanelLabelAlignPicker(): JSX.Element | null;
|
|
2794
2862
|
|
|
2795
2863
|
/** @public @react */
|
|
2796
|
-
export declare function StylePanelOpacityPicker():
|
|
2864
|
+
export declare function StylePanelOpacityPicker(): JSX.Element | null;
|
|
2797
2865
|
|
|
2798
2866
|
/** @public @react */
|
|
2799
|
-
export declare function StylePanelSection({ children }: StylePanelSectionProps):
|
|
2867
|
+
export declare function StylePanelSection({ children }: StylePanelSectionProps): JSX.Element;
|
|
2800
2868
|
|
|
2801
2869
|
/** @public */
|
|
2802
2870
|
export declare interface StylePanelSectionProps {
|
|
@@ -2804,13 +2872,13 @@ export declare interface StylePanelSectionProps {
|
|
|
2804
2872
|
}
|
|
2805
2873
|
|
|
2806
2874
|
/** @public @react */
|
|
2807
|
-
export declare function StylePanelSizePicker():
|
|
2875
|
+
export declare function StylePanelSizePicker(): JSX.Element | null;
|
|
2808
2876
|
|
|
2809
2877
|
/** @public @react */
|
|
2810
|
-
export declare function StylePanelSplinePicker():
|
|
2878
|
+
export declare function StylePanelSplinePicker(): JSX.Element | null;
|
|
2811
2879
|
|
|
2812
2880
|
/** @public @react */
|
|
2813
|
-
export declare function StylePanelSubheading({ children }: StylePanelSubheadingProps):
|
|
2881
|
+
export declare function StylePanelSubheading({ children }: StylePanelSubheadingProps): JSX.Element;
|
|
2814
2882
|
|
|
2815
2883
|
/** @public */
|
|
2816
2884
|
export declare interface StylePanelSubheadingProps {
|
|
@@ -2818,7 +2886,7 @@ export declare interface StylePanelSubheadingProps {
|
|
|
2818
2886
|
}
|
|
2819
2887
|
|
|
2820
2888
|
/** @public @react */
|
|
2821
|
-
export declare function StylePanelTextAlignPicker():
|
|
2889
|
+
export declare function StylePanelTextAlignPicker(): JSX.Element | null;
|
|
2822
2890
|
|
|
2823
2891
|
/** @public */
|
|
2824
2892
|
export declare type StyleValuesForUi<T> = readonly {
|
|
@@ -2854,15 +2922,12 @@ export declare interface TextAreaProps {
|
|
|
2854
2922
|
hasCustomTabBehavior?: boolean;
|
|
2855
2923
|
}
|
|
2856
2924
|
|
|
2857
|
-
/**
|
|
2858
|
-
* @public
|
|
2859
|
-
*/
|
|
2860
|
-
export declare const TextDirection: Extension<any, any>;
|
|
2861
|
-
|
|
2862
2925
|
/** @public */
|
|
2863
2926
|
export declare interface TextShapeOptions {
|
|
2864
2927
|
/** How much addition padding should be added to the horizontal geometry of the shape when binding to an arrow? */
|
|
2865
2928
|
extraArrowHorizontalPadding: number;
|
|
2929
|
+
/** Whether to show the outline of the text shape (using the same color as the canvas). This helps with overlapping shapes. It does not show up on Safari, where text outline is a performance issues. */
|
|
2930
|
+
showTextOutline: boolean;
|
|
2866
2931
|
}
|
|
2867
2932
|
|
|
2868
2933
|
/** @public */
|
|
@@ -2889,9 +2954,9 @@ export declare class TextShapeUtil extends ShapeUtil<TLTextShape> {
|
|
|
2889
2954
|
getText(shape: TLTextShape): string;
|
|
2890
2955
|
canEdit(): boolean;
|
|
2891
2956
|
isAspectRatioLocked(): boolean;
|
|
2892
|
-
component(shape: TLTextShape):
|
|
2893
|
-
indicator(shape: TLTextShape):
|
|
2894
|
-
toSvg(shape: TLTextShape, ctx: SvgExportContext):
|
|
2957
|
+
component(shape: TLTextShape): JSX.Element;
|
|
2958
|
+
indicator(shape: TLTextShape): JSX.Element | null;
|
|
2959
|
+
toSvg(shape: TLTextShape, ctx: SvgExportContext): JSX.Element;
|
|
2895
2960
|
onResize(shape: TLTextShape, info: TLResizeInfo<TLTextShape>): {
|
|
2896
2961
|
id: TLShapeId;
|
|
2897
2962
|
props: {
|
|
@@ -2937,7 +3002,7 @@ export declare class TextShapeUtil extends ShapeUtil<TLTextShape> {
|
|
|
2937
3002
|
}
|
|
2938
3003
|
|
|
2939
3004
|
/** @public @react */
|
|
2940
|
-
export declare function TextToolbarItem():
|
|
3005
|
+
export declare function TextToolbarItem(): JSX.Element;
|
|
2941
3006
|
|
|
2942
3007
|
/**
|
|
2943
3008
|
* Default extensions for the TipTap editor.
|
|
@@ -3037,13 +3102,13 @@ export declare interface TLDefaultFonts {
|
|
|
3037
3102
|
}
|
|
3038
3103
|
|
|
3039
3104
|
/** @public @react */
|
|
3040
|
-
export declare function Tldraw(props: TldrawProps):
|
|
3105
|
+
export declare function Tldraw(props: TldrawProps): JSX.Element;
|
|
3041
3106
|
|
|
3042
3107
|
/** @public */
|
|
3043
3108
|
export declare const TLDRAW_FILE_EXTENSION: ".tldr";
|
|
3044
3109
|
|
|
3045
3110
|
/** @public @react */
|
|
3046
|
-
export declare function TldrawArrowHints():
|
|
3111
|
+
export declare function TldrawArrowHints(): JSX.Element | null;
|
|
3047
3112
|
|
|
3048
3113
|
/** @public */
|
|
3049
3114
|
export declare interface TldrawBaseProps extends TldrawUiProps, TldrawEditorBaseProps, TLExternalContentProps {
|
|
@@ -3065,7 +3130,7 @@ export declare interface TldrawBaseProps extends TldrawUiProps, TldrawEditorBase
|
|
|
3065
3130
|
}
|
|
3066
3131
|
|
|
3067
3132
|
/** @public @react */
|
|
3068
|
-
export declare function TldrawCropHandles({ size, width, height, hideAlternateHandles, }: TldrawCropHandlesProps):
|
|
3133
|
+
export declare function TldrawCropHandles({ size, width, height, hideAlternateHandles, }: TldrawCropHandlesProps): JSX.Element;
|
|
3069
3134
|
|
|
3070
3135
|
/** @public */
|
|
3071
3136
|
export declare interface TldrawCropHandlesProps {
|
|
@@ -3101,7 +3166,7 @@ export declare type TldrawFileParseError = {
|
|
|
3101
3166
|
};
|
|
3102
3167
|
|
|
3103
3168
|
/** @public @react */
|
|
3104
|
-
export declare function TldrawHandles({ children }: TLHandlesProps):
|
|
3169
|
+
export declare function TldrawHandles({ children }: TLHandlesProps): JSX.Element | null;
|
|
3105
3170
|
|
|
3106
3171
|
/**
|
|
3107
3172
|
* A rendered SVG image of a Tldraw snapshot.
|
|
@@ -3160,19 +3225,19 @@ export declare interface TldrawImageProps extends TLImageExportOptions {
|
|
|
3160
3225
|
}
|
|
3161
3226
|
|
|
3162
3227
|
/** @public @react */
|
|
3163
|
-
export declare function TldrawOverlays():
|
|
3228
|
+
export declare function TldrawOverlays(): JSX.Element | null;
|
|
3164
3229
|
|
|
3165
3230
|
/** @public */
|
|
3166
3231
|
export declare type TldrawProps = TldrawBaseProps & TldrawEditorStoreProps;
|
|
3167
3232
|
|
|
3168
3233
|
/** @public @react */
|
|
3169
|
-
export declare function TldrawScribble({ scribble, zoom, color, opacity, className }: TLScribbleProps):
|
|
3234
|
+
export declare function TldrawScribble({ scribble, zoom, color, opacity, className }: TLScribbleProps): JSX.Element | null;
|
|
3170
3235
|
|
|
3171
3236
|
/** @public */
|
|
3172
3237
|
export declare const TldrawSelectionForeground: NamedExoticComponent<TLSelectionForegroundProps>;
|
|
3173
3238
|
|
|
3174
3239
|
/** @public @react */
|
|
3175
|
-
export declare function TldrawShapeIndicators():
|
|
3240
|
+
export declare function TldrawShapeIndicators(): JSX.Element;
|
|
3176
3241
|
|
|
3177
3242
|
/**
|
|
3178
3243
|
* @public
|
|
@@ -3181,19 +3246,19 @@ export declare function TldrawShapeIndicators(): JSX_2.Element;
|
|
|
3181
3246
|
export declare const TldrawUi: React_3.NamedExoticComponent<TldrawUiProps>;
|
|
3182
3247
|
|
|
3183
3248
|
/** @public @react */
|
|
3184
|
-
export declare function TldrawUiA11yProvider({ children }: A11yProviderProps):
|
|
3249
|
+
export declare function TldrawUiA11yProvider({ children }: A11yProviderProps): JSX.Element;
|
|
3185
3250
|
|
|
3186
3251
|
/** @public @react */
|
|
3187
3252
|
export declare const TldrawUiButton: React_2.ForwardRefExoticComponent<TLUiButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
3188
3253
|
|
|
3189
3254
|
/** @public @react */
|
|
3190
|
-
export declare function TldrawUiButtonCheck({ checked }: TLUiButtonCheckProps):
|
|
3255
|
+
export declare function TldrawUiButtonCheck({ checked }: TLUiButtonCheckProps): JSX.Element;
|
|
3191
3256
|
|
|
3192
3257
|
/** @public @react */
|
|
3193
|
-
export declare function TldrawUiButtonIcon({ icon, small, invertIcon }: TLUiButtonIconProps):
|
|
3258
|
+
export declare function TldrawUiButtonIcon({ icon, small, invertIcon }: TLUiButtonIconProps): JSX.Element;
|
|
3194
3259
|
|
|
3195
3260
|
/** @public @react */
|
|
3196
|
-
export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps):
|
|
3261
|
+
export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps): JSX.Element;
|
|
3197
3262
|
|
|
3198
3263
|
/**
|
|
3199
3264
|
* A column, usually of UI controls like buttons, select dropdown, checkboxes, etc.
|
|
@@ -3203,7 +3268,7 @@ export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps):
|
|
|
3203
3268
|
export declare const TldrawUiColumn: ForwardRefExoticComponent<TLUiLayoutProps & RefAttributes<HTMLDivElement>>;
|
|
3204
3269
|
|
|
3205
3270
|
/** @public @react */
|
|
3206
|
-
export declare function TldrawUiComponentsProvider({ overrides, children, }: TLUiComponentsProviderProps):
|
|
3271
|
+
export declare function TldrawUiComponentsProvider({ overrides, children, }: TLUiComponentsProviderProps): JSX.Element;
|
|
3207
3272
|
|
|
3208
3273
|
/** @public @react */
|
|
3209
3274
|
export declare const TldrawUiContextProvider: NamedExoticComponent<TLUiContextProviderProps>;
|
|
@@ -3214,55 +3279,55 @@ export declare const TldrawUiContextProvider: NamedExoticComponent<TLUiContextPr
|
|
|
3214
3279
|
*
|
|
3215
3280
|
* @public @react
|
|
3216
3281
|
*/
|
|
3217
|
-
export declare const TldrawUiContextualToolbar: ({ children, className, isMousingDown, getSelectionBounds, changeOnlyWhenYChanges, label, }: TLUiContextualToolbarProps) =>
|
|
3282
|
+
export declare const TldrawUiContextualToolbar: ({ children, className, isMousingDown, getSelectionBounds, changeOnlyWhenYChanges, label, }: TLUiContextualToolbarProps) => JSX.Element;
|
|
3218
3283
|
|
|
3219
3284
|
/** @public @react */
|
|
3220
|
-
export declare function TldrawUiDialogBody({ className, children, style }: TLUiDialogBodyProps):
|
|
3285
|
+
export declare function TldrawUiDialogBody({ className, children, style }: TLUiDialogBodyProps): JSX.Element;
|
|
3221
3286
|
|
|
3222
3287
|
/** @public @react */
|
|
3223
|
-
export declare function TldrawUiDialogCloseButton():
|
|
3288
|
+
export declare function TldrawUiDialogCloseButton(): JSX.Element;
|
|
3224
3289
|
|
|
3225
3290
|
/** @public @react */
|
|
3226
|
-
export declare function TldrawUiDialogFooter({ className, children }: TLUiDialogFooterProps):
|
|
3291
|
+
export declare function TldrawUiDialogFooter({ className, children }: TLUiDialogFooterProps): JSX.Element;
|
|
3227
3292
|
|
|
3228
3293
|
/** @public @react */
|
|
3229
|
-
export declare function TldrawUiDialogHeader({ className, children }: TLUiDialogHeaderProps):
|
|
3294
|
+
export declare function TldrawUiDialogHeader({ className, children }: TLUiDialogHeaderProps): JSX.Element;
|
|
3230
3295
|
|
|
3231
3296
|
/** @public @react */
|
|
3232
|
-
export declare function TldrawUiDialogsProvider({ context, children }: TLUiDialogsProviderProps):
|
|
3297
|
+
export declare function TldrawUiDialogsProvider({ context, children }: TLUiDialogsProviderProps): JSX.Element;
|
|
3233
3298
|
|
|
3234
3299
|
/** @public @react */
|
|
3235
|
-
export declare function TldrawUiDialogTitle({ className, children, style }: TLUiDialogTitleProps):
|
|
3300
|
+
export declare function TldrawUiDialogTitle({ className, children, style }: TLUiDialogTitleProps): JSX.Element;
|
|
3236
3301
|
|
|
3237
3302
|
/** @public @react */
|
|
3238
|
-
export declare function TldrawUiDropdownMenuCheckboxItem({ children, onSelect, ...rest }: TLUiDropdownMenuCheckboxItemProps):
|
|
3303
|
+
export declare function TldrawUiDropdownMenuCheckboxItem({ children, onSelect, ...rest }: TLUiDropdownMenuCheckboxItemProps): JSX.Element;
|
|
3239
3304
|
|
|
3240
3305
|
/** @public @react */
|
|
3241
|
-
export declare function TldrawUiDropdownMenuContent({ className, side, align, sideOffset, alignOffset, children, }: TLUiDropdownMenuContentProps):
|
|
3306
|
+
export declare function TldrawUiDropdownMenuContent({ className, side, align, sideOffset, alignOffset, children, }: TLUiDropdownMenuContentProps): JSX.Element;
|
|
3242
3307
|
|
|
3243
3308
|
/** @public @react */
|
|
3244
|
-
export declare function TldrawUiDropdownMenuGroup({ className, children }: TLUiDropdownMenuGroupProps):
|
|
3309
|
+
export declare function TldrawUiDropdownMenuGroup({ className, children }: TLUiDropdownMenuGroupProps): JSX.Element;
|
|
3245
3310
|
|
|
3246
3311
|
/** @public @react */
|
|
3247
|
-
export declare function TldrawUiDropdownMenuIndicator():
|
|
3312
|
+
export declare function TldrawUiDropdownMenuIndicator(): JSX.Element;
|
|
3248
3313
|
|
|
3249
3314
|
/** @public @react */
|
|
3250
|
-
export declare function TldrawUiDropdownMenuItem({ noClose, children }: TLUiDropdownMenuItemProps):
|
|
3315
|
+
export declare function TldrawUiDropdownMenuItem({ noClose, children }: TLUiDropdownMenuItemProps): JSX.Element;
|
|
3251
3316
|
|
|
3252
3317
|
/** @public @react */
|
|
3253
|
-
export declare function TldrawUiDropdownMenuRoot({ id, children, modal, debugOpen, }: TLUiDropdownMenuRootProps):
|
|
3318
|
+
export declare function TldrawUiDropdownMenuRoot({ id, children, modal, debugOpen, }: TLUiDropdownMenuRootProps): JSX.Element;
|
|
3254
3319
|
|
|
3255
3320
|
/** @public @react */
|
|
3256
|
-
export declare function TldrawUiDropdownMenuSub({ id, children }: TLUiDropdownMenuSubProps):
|
|
3321
|
+
export declare function TldrawUiDropdownMenuSub({ id, children }: TLUiDropdownMenuSubProps): JSX.Element;
|
|
3257
3322
|
|
|
3258
3323
|
/** @public @react */
|
|
3259
|
-
export declare function TldrawUiDropdownMenuSubTrigger({ id, label, title, disabled, }: TLUiDropdownMenuSubTriggerProps):
|
|
3324
|
+
export declare function TldrawUiDropdownMenuSubTrigger({ id, label, title, disabled, }: TLUiDropdownMenuSubTriggerProps): JSX.Element;
|
|
3260
3325
|
|
|
3261
3326
|
/** @public @react */
|
|
3262
|
-
export declare function TldrawUiDropdownMenuTrigger({ children, ...rest }: TLUiDropdownMenuTriggerProps):
|
|
3327
|
+
export declare function TldrawUiDropdownMenuTrigger({ children, ...rest }: TLUiDropdownMenuTriggerProps): JSX.Element;
|
|
3263
3328
|
|
|
3264
3329
|
/** @public @react */
|
|
3265
|
-
export declare function TldrawUiEventsProvider({ onEvent, children }: EventsProviderProps):
|
|
3330
|
+
export declare function TldrawUiEventsProvider({ onEvent, children }: EventsProviderProps): JSX.Element;
|
|
3266
3331
|
|
|
3267
3332
|
/**
|
|
3268
3333
|
* A tight grid 4 elements wide, usually of UI controls like buttons, select dropdown, checkboxes,
|
|
@@ -3275,37 +3340,37 @@ export declare const TldrawUiGrid: ForwardRefExoticComponent<TLUiLayoutProps & R
|
|
|
3275
3340
|
export declare const TldrawUiIcon: NamedExoticComponent<TLUiIconProps>;
|
|
3276
3341
|
|
|
3277
3342
|
/** @public @react */
|
|
3278
|
-
export declare function TldrawUiInFrontOfTheCanvas():
|
|
3343
|
+
export declare function TldrawUiInFrontOfTheCanvas(): JSX.Element;
|
|
3279
3344
|
|
|
3280
3345
|
/** @public @react */
|
|
3281
3346
|
export declare const TldrawUiInput: React_2.ForwardRefExoticComponent<TLUiInputProps & React_2.RefAttributes<HTMLInputElement>>;
|
|
3282
3347
|
|
|
3283
3348
|
/** @public @react */
|
|
3284
|
-
export declare function TldrawUiKbd({ children, visibleOnMobileLayout }: TLUiKbdProps):
|
|
3349
|
+
export declare function TldrawUiKbd({ children, visibleOnMobileLayout }: TLUiKbdProps): JSX.Element | null;
|
|
3285
3350
|
|
|
3286
3351
|
/** @public @react */
|
|
3287
|
-
export declare function TldrawUiMenuActionCheckboxItem({ actionId, ...rest }: TLUiMenuActionCheckboxItemProps):
|
|
3352
|
+
export declare function TldrawUiMenuActionCheckboxItem({ actionId, ...rest }: TLUiMenuActionCheckboxItemProps): JSX.Element | null;
|
|
3288
3353
|
|
|
3289
3354
|
/** @public @react */
|
|
3290
|
-
export declare function TldrawUiMenuActionItem({ actionId, ...rest }: TLUiMenuActionItemProps):
|
|
3355
|
+
export declare function TldrawUiMenuActionItem({ actionId, ...rest }: TLUiMenuActionItemProps): JSX.Element | null;
|
|
3291
3356
|
|
|
3292
3357
|
/** @public @react */
|
|
3293
|
-
export declare function TldrawUiMenuCheckboxItem<TranslationKey extends string = string, IconType extends string = string>({ id, kbd, label, lang, readonlyOk, onSelect, toggle, disabled, checked, }: TLUiMenuCheckboxItemProps<TranslationKey, IconType>):
|
|
3358
|
+
export declare function TldrawUiMenuCheckboxItem<TranslationKey extends string = string, IconType extends string = string>({ id, kbd, label, lang, readonlyOk, onSelect, toggle, disabled, checked, }: TLUiMenuCheckboxItemProps<TranslationKey, IconType>): JSX.Element | null;
|
|
3294
3359
|
|
|
3295
3360
|
/** @public @react */
|
|
3296
|
-
export declare function TldrawUiMenuContextProvider({ type, sourceId, children, }: TLUiMenuContextProviderProps):
|
|
3361
|
+
export declare function TldrawUiMenuContextProvider({ type, sourceId, children, }: TLUiMenuContextProviderProps): JSX.Element;
|
|
3297
3362
|
|
|
3298
3363
|
/** @public @react */
|
|
3299
|
-
export declare function TldrawUiMenuGroup({ id, label, className, children }: TLUiMenuGroupProps): boolean |
|
|
3364
|
+
export declare function TldrawUiMenuGroup({ id, label, className, children }: TLUiMenuGroupProps): bigint | boolean | JSX.Element | Iterable<ReactNode> | null | number | Promise<bigint | boolean | ReactElement<unknown, JSXElementConstructor<any> | string> | ReactPortal | Iterable<ReactNode> | null | number | string | undefined> | string | undefined;
|
|
3300
3365
|
|
|
3301
3366
|
/** @public @react */
|
|
3302
|
-
export declare function TldrawUiMenuItem<TranslationKey extends string = string, IconType extends string = string>({ disabled, spinner, readonlyOk, id, kbd, label, icon, iconLeft, onSelect, noClose, isSelected, onDragStart, }: TLUiMenuItemProps<TranslationKey, IconType>):
|
|
3367
|
+
export declare function TldrawUiMenuItem<TranslationKey extends string = string, IconType extends string = string>({ disabled, spinner, readonlyOk, id, kbd, label, icon, iconLeft, onSelect, noClose, isSelected, onDragStart, }: TLUiMenuItemProps<TranslationKey, IconType>): JSX.Element | null;
|
|
3303
3368
|
|
|
3304
3369
|
/** @public @react */
|
|
3305
|
-
export declare function TldrawUiMenuSubmenu<Translation extends string = string>({ id, disabled, label, size, children, }: TLUiMenuSubmenuProps<Translation>): boolean |
|
|
3370
|
+
export declare function TldrawUiMenuSubmenu<Translation extends string = string>({ id, disabled, label, size, children, }: TLUiMenuSubmenuProps<Translation>): bigint | boolean | JSX.Element | Iterable<ReactNode> | null | number | Promise<bigint | boolean | ReactElement<unknown, JSXElementConstructor<any> | string> | ReactPortal | Iterable<ReactNode> | null | number | string | undefined> | string | undefined;
|
|
3306
3371
|
|
|
3307
3372
|
/** @public @react */
|
|
3308
|
-
export declare function TldrawUiMenuToolItem({ toolId, ...rest }: TLUiMenuToolItemProps):
|
|
3373
|
+
export declare function TldrawUiMenuToolItem({ toolId, ...rest }: TLUiMenuToolItemProps): JSX.Element | null;
|
|
3309
3374
|
|
|
3310
3375
|
/** @public */
|
|
3311
3376
|
export declare interface TldrawUiOrientationContext {
|
|
@@ -3314,7 +3379,7 @@ export declare interface TldrawUiOrientationContext {
|
|
|
3314
3379
|
}
|
|
3315
3380
|
|
|
3316
3381
|
/** @public @react */
|
|
3317
|
-
export declare function TldrawUiOrientationProvider({ children, orientation, tooltipSide, }: TldrawUiOrientationProviderProps):
|
|
3382
|
+
export declare function TldrawUiOrientationProvider({ children, orientation, tooltipSide, }: TldrawUiOrientationProviderProps): JSX.Element;
|
|
3318
3383
|
|
|
3319
3384
|
/** @public */
|
|
3320
3385
|
export declare interface TldrawUiOrientationProviderProps {
|
|
@@ -3324,13 +3389,13 @@ export declare interface TldrawUiOrientationProviderProps {
|
|
|
3324
3389
|
}
|
|
3325
3390
|
|
|
3326
3391
|
/** @public @react */
|
|
3327
|
-
export declare function TldrawUiPopover({ id, children, onOpenChange, open, className }: TLUiPopoverProps):
|
|
3392
|
+
export declare function TldrawUiPopover({ id, children, onOpenChange, open, className }: TLUiPopoverProps): JSX.Element;
|
|
3328
3393
|
|
|
3329
3394
|
/** @public @react */
|
|
3330
|
-
export declare function TldrawUiPopoverContent({ side, children, align, sideOffset, alignOffset, disableEscapeKeyDown, autoFocusFirstButton, }: TLUiPopoverContentProps):
|
|
3395
|
+
export declare function TldrawUiPopoverContent({ side, children, align, sideOffset, alignOffset, disableEscapeKeyDown, autoFocusFirstButton, }: TLUiPopoverContentProps): JSX.Element;
|
|
3331
3396
|
|
|
3332
3397
|
/** @public @react */
|
|
3333
|
-
export declare function TldrawUiPopoverTrigger({ children }: TLUiPopoverTriggerProps):
|
|
3398
|
+
export declare function TldrawUiPopoverTrigger({ children }: TLUiPopoverTriggerProps): JSX.Element;
|
|
3334
3399
|
|
|
3335
3400
|
/** @public */
|
|
3336
3401
|
export declare interface TldrawUiProps extends TLUiContextProviderProps {
|
|
@@ -3365,7 +3430,7 @@ export declare const TldrawUiRow: ForwardRefExoticComponent<TLUiLayoutProps & Re
|
|
|
3365
3430
|
export declare const TldrawUiSlider: React_3.ForwardRefExoticComponent<TLUiSliderProps & React_3.RefAttributes<HTMLDivElement>>;
|
|
3366
3431
|
|
|
3367
3432
|
/** @public @react */
|
|
3368
|
-
export declare function TldrawUiToastsProvider({ children }: TLUiToastsProviderProps):
|
|
3433
|
+
export declare function TldrawUiToastsProvider({ children }: TLUiToastsProviderProps): JSX.Element;
|
|
3369
3434
|
|
|
3370
3435
|
/** @public @react */
|
|
3371
3436
|
export declare const TldrawUiToolbar: React_3.ForwardRefExoticComponent<TLUiToolbarProps & React_3.RefAttributes<HTMLDivElement>>;
|
|
@@ -3374,10 +3439,10 @@ export declare const TldrawUiToolbar: React_3.ForwardRefExoticComponent<TLUiTool
|
|
|
3374
3439
|
export declare const TldrawUiToolbarButton: React_3.ForwardRefExoticComponent<TLUiToolbarButtonProps & React_3.RefAttributes<HTMLButtonElement>>;
|
|
3375
3440
|
|
|
3376
3441
|
/** @public @react */
|
|
3377
|
-
export declare const TldrawUiToolbarToggleGroup: ({ children, className, type, asChild, ...props }: TLUiToolbarToggleGroupProps) =>
|
|
3442
|
+
export declare const TldrawUiToolbarToggleGroup: ({ children, className, type, asChild, ...props }: TLUiToolbarToggleGroupProps) => JSX.Element;
|
|
3378
3443
|
|
|
3379
3444
|
/** @public @react */
|
|
3380
|
-
export declare const TldrawUiToolbarToggleItem: ({ children, className, type, value, tooltip, ...props }: TLUiToolbarToggleItemProps) =>
|
|
3445
|
+
export declare const TldrawUiToolbarToggleItem: ({ children, className, type, value, tooltip, ...props }: TLUiToolbarToggleItemProps) => JSX.Element;
|
|
3381
3446
|
|
|
3382
3447
|
/** @public @react */
|
|
3383
3448
|
export declare const TldrawUiTooltip: React_3.ForwardRefExoticComponent<TldrawUiTooltipProps & React_3.RefAttributes<HTMLButtonElement>>;
|
|
@@ -3394,7 +3459,7 @@ export declare interface TldrawUiTooltipProps {
|
|
|
3394
3459
|
}
|
|
3395
3460
|
|
|
3396
3461
|
/** @public @react */
|
|
3397
|
-
export declare function TldrawUiTooltipProvider({ children }: TldrawUiTooltipProviderProps):
|
|
3462
|
+
export declare function TldrawUiTooltipProvider({ children }: TldrawUiTooltipProviderProps): JSX.Element;
|
|
3398
3463
|
|
|
3399
3464
|
/** @public */
|
|
3400
3465
|
export declare interface TldrawUiTooltipProviderProps {
|
|
@@ -4429,43 +4494,43 @@ export declare interface TLUiZoomMenuProps {
|
|
|
4429
4494
|
/* Excluded from this release type: TLV1VideoShape */
|
|
4430
4495
|
|
|
4431
4496
|
/** @public @react */
|
|
4432
|
-
export declare function ToggleAutoSizeMenuItem():
|
|
4497
|
+
export declare function ToggleAutoSizeMenuItem(): JSX.Element | null;
|
|
4433
4498
|
|
|
4434
4499
|
/** @public @react */
|
|
4435
|
-
export declare function ToggleDebugModeItem():
|
|
4500
|
+
export declare function ToggleDebugModeItem(): JSX.Element;
|
|
4436
4501
|
|
|
4437
4502
|
/** @public @react */
|
|
4438
|
-
export declare function ToggleDynamicSizeModeItem():
|
|
4503
|
+
export declare function ToggleDynamicSizeModeItem(): JSX.Element;
|
|
4439
4504
|
|
|
4440
4505
|
/** @public @react */
|
|
4441
|
-
export declare function ToggleEdgeScrollingItem():
|
|
4506
|
+
export declare function ToggleEdgeScrollingItem(): JSX.Element;
|
|
4442
4507
|
|
|
4443
4508
|
/** @public @react */
|
|
4444
|
-
export declare function ToggleEnhancedA11yModeItem():
|
|
4509
|
+
export declare function ToggleEnhancedA11yModeItem(): JSX.Element;
|
|
4445
4510
|
|
|
4446
4511
|
/** @public @react */
|
|
4447
|
-
export declare function ToggleFocusModeItem():
|
|
4512
|
+
export declare function ToggleFocusModeItem(): JSX.Element;
|
|
4448
4513
|
|
|
4449
4514
|
/** @public @react */
|
|
4450
|
-
export declare function ToggleGridItem():
|
|
4515
|
+
export declare function ToggleGridItem(): JSX.Element;
|
|
4451
4516
|
|
|
4452
4517
|
/** @public @react */
|
|
4453
|
-
export declare function ToggleKeyboardShortcutsItem():
|
|
4518
|
+
export declare function ToggleKeyboardShortcutsItem(): JSX.Element;
|
|
4454
4519
|
|
|
4455
4520
|
/** @public @react */
|
|
4456
|
-
export declare function ToggleLockMenuItem():
|
|
4521
|
+
export declare function ToggleLockMenuItem(): JSX.Element | null;
|
|
4457
4522
|
|
|
4458
4523
|
/** @public @react */
|
|
4459
|
-
export declare function TogglePasteAtCursorItem():
|
|
4524
|
+
export declare function TogglePasteAtCursorItem(): JSX.Element;
|
|
4460
4525
|
|
|
4461
4526
|
/** @public @react */
|
|
4462
|
-
export declare function ToggleReduceMotionItem():
|
|
4527
|
+
export declare function ToggleReduceMotionItem(): JSX.Element;
|
|
4463
4528
|
|
|
4464
4529
|
/** @public @react */
|
|
4465
|
-
export declare function ToggleSnapModeItem():
|
|
4530
|
+
export declare function ToggleSnapModeItem(): JSX.Element;
|
|
4466
4531
|
|
|
4467
4532
|
/** @public @react */
|
|
4468
|
-
export declare function ToggleToolLockedButton({ activeToolId }: ToggleToolLockedButtonProps):
|
|
4533
|
+
export declare function ToggleToolLockedButton({ activeToolId }: ToggleToolLockedButtonProps): JSX.Element | null;
|
|
4469
4534
|
|
|
4470
4535
|
/** @public */
|
|
4471
4536
|
export declare interface ToggleToolLockedButtonProps {
|
|
@@ -4473,16 +4538,16 @@ export declare interface ToggleToolLockedButtonProps {
|
|
|
4473
4538
|
}
|
|
4474
4539
|
|
|
4475
4540
|
/** @public @react */
|
|
4476
|
-
export declare function ToggleToolLockItem():
|
|
4541
|
+
export declare function ToggleToolLockItem(): JSX.Element;
|
|
4477
4542
|
|
|
4478
4543
|
/** @public @react */
|
|
4479
|
-
export declare function ToggleTransparentBgMenuItem():
|
|
4544
|
+
export declare function ToggleTransparentBgMenuItem(): JSX.Element;
|
|
4480
4545
|
|
|
4481
4546
|
/** @public @react */
|
|
4482
|
-
export declare function ToggleWrapModeItem():
|
|
4547
|
+
export declare function ToggleWrapModeItem(): JSX.Element;
|
|
4483
4548
|
|
|
4484
4549
|
/** @public @react */
|
|
4485
|
-
export declare function ToolbarItem({ tool }: ToolbarItemProps):
|
|
4550
|
+
export declare function ToolbarItem({ tool }: ToolbarItemProps): JSX.Element;
|
|
4486
4551
|
|
|
4487
4552
|
/** @public */
|
|
4488
4553
|
export declare interface ToolbarItemProps {
|
|
@@ -4490,22 +4555,22 @@ export declare interface ToolbarItemProps {
|
|
|
4490
4555
|
}
|
|
4491
4556
|
|
|
4492
4557
|
/** @public @react */
|
|
4493
|
-
export declare function TrapezoidToolbarItem():
|
|
4558
|
+
export declare function TrapezoidToolbarItem(): JSX.Element;
|
|
4494
4559
|
|
|
4495
4560
|
/** @public @react */
|
|
4496
|
-
export declare function TriangleToolbarItem():
|
|
4561
|
+
export declare function TriangleToolbarItem(): JSX.Element;
|
|
4497
4562
|
|
|
4498
4563
|
/** @public */
|
|
4499
4564
|
export declare const truncateStringWithEllipsis: (str: string, maxLength: number) => string;
|
|
4500
4565
|
|
|
4501
4566
|
/** @public @react */
|
|
4502
|
-
export declare function UndoRedoGroup():
|
|
4567
|
+
export declare function UndoRedoGroup(): JSX.Element;
|
|
4503
4568
|
|
|
4504
4569
|
/** @public @react */
|
|
4505
|
-
export declare function UngroupMenuItem():
|
|
4570
|
+
export declare function UngroupMenuItem(): JSX.Element | null;
|
|
4506
4571
|
|
|
4507
4572
|
/** @public @react */
|
|
4508
|
-
export declare function UnlockAllMenuItem():
|
|
4573
|
+
export declare function UnlockAllMenuItem(): JSX.Element;
|
|
4509
4574
|
|
|
4510
4575
|
/** @public */
|
|
4511
4576
|
export declare function unwrapLabel(label?: TLUiActionItem['label'], menuType?: string): string | undefined;
|
|
@@ -4614,7 +4679,9 @@ export declare function useDefaultHelpers(): {
|
|
|
4614
4679
|
export declare function useDialogs(): TLUiDialogsContextType;
|
|
4615
4680
|
|
|
4616
4681
|
/** @public */
|
|
4617
|
-
export declare function useEditablePlainText(shapeId: TLShapeId, type:
|
|
4682
|
+
export declare function useEditablePlainText(shapeId: TLShapeId, type: ExtractShapeByProps<{
|
|
4683
|
+
text: string;
|
|
4684
|
+
}>['type'], text?: string): {
|
|
4618
4685
|
handleBlur: () => void;
|
|
4619
4686
|
handleChange: ({ plaintext }: {
|
|
4620
4687
|
plaintext: string;
|
|
@@ -4629,11 +4696,13 @@ export declare function useEditablePlainText(shapeId: TLShapeId, type: string, t
|
|
|
4629
4696
|
isEditing: boolean;
|
|
4630
4697
|
isEmpty: boolean;
|
|
4631
4698
|
isReadyForEditing: boolean;
|
|
4632
|
-
rInput: React_3.RefObject<HTMLTextAreaElement>;
|
|
4699
|
+
rInput: React_3.RefObject<HTMLTextAreaElement | null>;
|
|
4633
4700
|
};
|
|
4634
4701
|
|
|
4635
4702
|
/** @public */
|
|
4636
|
-
export declare function useEditableRichText(shapeId: TLShapeId, type:
|
|
4703
|
+
export declare function useEditableRichText(shapeId: TLShapeId, type: ExtractShapeByProps<{
|
|
4704
|
+
richText: TLRichText;
|
|
4705
|
+
}>['type'], richText?: TLRichText): {
|
|
4637
4706
|
handleBlur: () => void;
|
|
4638
4707
|
handleChange: ({ richText }: {
|
|
4639
4708
|
richText: TLRichText;
|
|
@@ -4648,7 +4717,7 @@ export declare function useEditableRichText(shapeId: TLShapeId, type: string, ri
|
|
|
4648
4717
|
isEditing: boolean;
|
|
4649
4718
|
isEmpty: boolean | undefined;
|
|
4650
4719
|
isReadyForEditing: boolean;
|
|
4651
|
-
rInput: RefObject<HTMLDivElement>;
|
|
4720
|
+
rInput: RefObject<HTMLDivElement | null>;
|
|
4652
4721
|
};
|
|
4653
4722
|
|
|
4654
4723
|
/** @public */
|
|
@@ -4786,25 +4855,25 @@ export declare class VideoShapeUtil extends BaseBoxShapeUtil<TLVideoShape> {
|
|
|
4786
4855
|
isAspectRatioLocked(): boolean;
|
|
4787
4856
|
getDefaultProps(): TLVideoShape['props'];
|
|
4788
4857
|
getAriaDescriptor(shape: TLVideoShape): string;
|
|
4789
|
-
component(shape: TLVideoShape):
|
|
4790
|
-
indicator(shape: TLVideoShape):
|
|
4791
|
-
toSvg(shape: TLVideoShape, ctx: SvgExportContext): Promise<
|
|
4858
|
+
component(shape: TLVideoShape): JSX.Element;
|
|
4859
|
+
indicator(shape: TLVideoShape): JSX.Element;
|
|
4860
|
+
toSvg(shape: TLVideoShape, ctx: SvgExportContext): Promise<JSX.Element | null>;
|
|
4792
4861
|
}
|
|
4793
4862
|
|
|
4794
4863
|
/** @public @react */
|
|
4795
|
-
export declare function ViewSubmenu():
|
|
4864
|
+
export declare function ViewSubmenu(): JSX.Element;
|
|
4796
4865
|
|
|
4797
4866
|
/** @public @react */
|
|
4798
|
-
export declare function XBoxToolbarItem():
|
|
4867
|
+
export declare function XBoxToolbarItem(): JSX.Element;
|
|
4799
4868
|
|
|
4800
4869
|
/** @public @react */
|
|
4801
|
-
export declare function ZoomOrRotateMenuItem():
|
|
4870
|
+
export declare function ZoomOrRotateMenuItem(): JSX.Element;
|
|
4802
4871
|
|
|
4803
4872
|
/** @public @react */
|
|
4804
|
-
export declare function ZoomTo100MenuItem():
|
|
4873
|
+
export declare function ZoomTo100MenuItem(): JSX.Element;
|
|
4805
4874
|
|
|
4806
4875
|
/** @public @react */
|
|
4807
|
-
export declare function ZoomToFitMenuItem():
|
|
4876
|
+
export declare function ZoomToFitMenuItem(): JSX.Element;
|
|
4808
4877
|
|
|
4809
4878
|
/** @public */
|
|
4810
4879
|
export declare class ZoomTool extends StateNode {
|
|
@@ -4827,7 +4896,7 @@ export declare class ZoomTool extends StateNode {
|
|
|
4827
4896
|
}
|
|
4828
4897
|
|
|
4829
4898
|
/** @public @react */
|
|
4830
|
-
export declare function ZoomToSelectionMenuItem():
|
|
4899
|
+
export declare function ZoomToSelectionMenuItem(): JSX.Element;
|
|
4831
4900
|
|
|
4832
4901
|
|
|
4833
4902
|
export * from "@tldraw/editor";
|