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