@bigbluebutton/tldraw 2.0.0-alpha.19
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/LICENSE +190 -0
- package/dist-cjs/index.d.ts +2954 -0
- package/dist-cjs/index.js +216 -0
- package/dist-cjs/index.js.map +7 -0
- package/dist-cjs/lib/Tldraw.js +136 -0
- package/dist-cjs/lib/Tldraw.js.map +7 -0
- package/dist-cjs/lib/canvas/TldrawCropHandles.js +164 -0
- package/dist-cjs/lib/canvas/TldrawCropHandles.js.map +7 -0
- package/dist-cjs/lib/canvas/TldrawHandles.js +37 -0
- package/dist-cjs/lib/canvas/TldrawHandles.js.map +7 -0
- package/dist-cjs/lib/canvas/TldrawHoveredShapeIndicator.js +42 -0
- package/dist-cjs/lib/canvas/TldrawHoveredShapeIndicator.js.map +7 -0
- package/dist-cjs/lib/canvas/TldrawScribble.js +72 -0
- package/dist-cjs/lib/canvas/TldrawScribble.js.map +7 -0
- package/dist-cjs/lib/canvas/TldrawSelectionBackground.js +44 -0
- package/dist-cjs/lib/canvas/TldrawSelectionBackground.js.map +7 -0
- package/dist-cjs/lib/canvas/TldrawSelectionForeground.js +509 -0
- package/dist-cjs/lib/canvas/TldrawSelectionForeground.js.map +7 -0
- package/dist-cjs/lib/defaultExternalContentHandlers.js +400 -0
- package/dist-cjs/lib/defaultExternalContentHandlers.js.map +7 -0
- package/dist-cjs/lib/defaultShapeTools.js +42 -0
- package/dist-cjs/lib/defaultShapeTools.js.map +7 -0
- package/dist-cjs/lib/defaultShapeUtils.js +50 -0
- package/dist-cjs/lib/defaultShapeUtils.js.map +7 -0
- package/dist-cjs/lib/defaultSideEffects.js +69 -0
- package/dist-cjs/lib/defaultSideEffects.js.map +7 -0
- package/dist-cjs/lib/defaultTools.js +30 -0
- package/dist-cjs/lib/defaultTools.js.map +7 -0
- package/dist-cjs/lib/shapes/arrow/ArrowShapeTool.js +33 -0
- package/dist-cjs/lib/shapes/arrow/ArrowShapeTool.js.map +7 -0
- package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +805 -0
- package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +7 -0
- package/dist-cjs/lib/shapes/arrow/components/ArrowTextLabel.js +114 -0
- package/dist-cjs/lib/shapes/arrow/components/ArrowTextLabel.js.map +7 -0
- package/dist-cjs/lib/shapes/arrow/toolStates/Idle.js +53 -0
- package/dist-cjs/lib/shapes/arrow/toolStates/Idle.js.map +7 -0
- package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js +182 -0
- package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js.map +7 -0
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +163 -0
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +7 -0
- package/dist-cjs/lib/shapes/draw/DrawShapeTool.js +37 -0
- package/dist-cjs/lib/shapes/draw/DrawShapeTool.js.map +7 -0
- package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js +243 -0
- package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js.map +7 -0
- package/dist-cjs/lib/shapes/draw/getPath.js +102 -0
- package/dist-cjs/lib/shapes/draw/getPath.js.map +7 -0
- package/dist-cjs/lib/shapes/draw/toolStates/Drawing.js +556 -0
- package/dist-cjs/lib/shapes/draw/toolStates/Drawing.js.map +7 -0
- package/dist-cjs/lib/shapes/draw/toolStates/Idle.js +37 -0
- package/dist-cjs/lib/shapes/draw/toolStates/Idle.js.map +7 -0
- package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +192 -0
- package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +7 -0
- package/dist-cjs/lib/shapes/frame/FrameShapeTool.js +66 -0
- package/dist-cjs/lib/shapes/frame/FrameShapeTool.js.map +7 -0
- package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +234 -0
- package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +7 -0
- package/dist-cjs/lib/shapes/frame/components/FrameHeading.js +106 -0
- package/dist-cjs/lib/shapes/frame/components/FrameHeading.js.map +7 -0
- package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js +101 -0
- package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/GeoShapeTool.js +33 -0
- package/dist-cjs/lib/shapes/geo/GeoShapeTool.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +999 -0
- package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/cloudOutline.js +288 -0
- package/dist-cjs/lib/shapes/geo/cloudOutline.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/components/DashStyleCloud.js +124 -0
- package/dist-cjs/lib/shapes/geo/components/DashStyleCloud.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/components/DashStyleEllipse.js +123 -0
- package/dist-cjs/lib/shapes/geo/components/DashStyleEllipse.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/components/DashStyleOval.js +118 -0
- package/dist-cjs/lib/shapes/geo/components/DashStyleOval.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/components/DashStylePolygon.js +155 -0
- package/dist-cjs/lib/shapes/geo/components/DashStylePolygon.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/components/DrawStyleCloud.js +79 -0
- package/dist-cjs/lib/shapes/geo/components/DrawStyleCloud.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/components/DrawStyleEllipse.js +133 -0
- package/dist-cjs/lib/shapes/geo/components/DrawStyleEllipse.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/components/DrawStylePolygon.js +93 -0
- package/dist-cjs/lib/shapes/geo/components/DrawStylePolygon.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/components/SolidStyleCloud.js +79 -0
- package/dist-cjs/lib/shapes/geo/components/SolidStyleCloud.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/components/SolidStyleEllipse.js +84 -0
- package/dist-cjs/lib/shapes/geo/components/SolidStyleEllipse.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/components/SolidStyleOval.js +99 -0
- package/dist-cjs/lib/shapes/geo/components/SolidStyleOval.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/components/SolidStylePolygon.js +86 -0
- package/dist-cjs/lib/shapes/geo/components/SolidStylePolygon.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/helpers.js +53 -0
- package/dist-cjs/lib/shapes/geo/helpers.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/toolStates/Idle.js +53 -0
- package/dist-cjs/lib/shapes/geo/toolStates/Idle.js.map +7 -0
- package/dist-cjs/lib/shapes/geo/toolStates/Pointing.js +118 -0
- package/dist-cjs/lib/shapes/geo/toolStates/Pointing.js.map +7 -0
- package/dist-cjs/lib/shapes/highlight/HighlightShapeTool.js +37 -0
- package/dist-cjs/lib/shapes/highlight/HighlightShapeTool.js.map +7 -0
- package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +208 -0
- package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +7 -0
- package/dist-cjs/lib/shapes/image/ImageShapeUtil.js +262 -0
- package/dist-cjs/lib/shapes/image/ImageShapeUtil.js.map +7 -0
- package/dist-cjs/lib/shapes/line/LineShapeTool.js +33 -0
- package/dist-cjs/lib/shapes/line/LineShapeTool.js.map +7 -0
- package/dist-cjs/lib/shapes/line/LineShapeUtil.js +359 -0
- package/dist-cjs/lib/shapes/line/LineShapeUtil.js.map +7 -0
- package/dist-cjs/lib/shapes/line/components/getLinePath.js +88 -0
- package/dist-cjs/lib/shapes/line/components/getLinePath.js.map +7 -0
- package/dist-cjs/lib/shapes/line/components/svg.js +73 -0
- package/dist-cjs/lib/shapes/line/components/svg.js.map +7 -0
- package/dist-cjs/lib/shapes/line/toolStates/Idle.js +39 -0
- package/dist-cjs/lib/shapes/line/toolStates/Idle.js.map +7 -0
- package/dist-cjs/lib/shapes/line/toolStates/Pointing.js +145 -0
- package/dist-cjs/lib/shapes/line/toolStates/Pointing.js.map +7 -0
- package/dist-cjs/lib/shapes/note/NoteShapeTool.js +33 -0
- package/dist-cjs/lib/shapes/note/NoteShapeTool.js.map +7 -0
- package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +205 -0
- package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +7 -0
- package/dist-cjs/lib/shapes/note/toolStates/Idle.js +37 -0
- package/dist-cjs/lib/shapes/note/toolStates/Idle.js.map +7 -0
- package/dist-cjs/lib/shapes/note/toolStates/Pointing.js +114 -0
- package/dist-cjs/lib/shapes/note/toolStates/Pointing.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/HyperlinkButton.js +65 -0
- package/dist-cjs/lib/shapes/shared/HyperlinkButton.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/ShapeFill.js +117 -0
- package/dist-cjs/lib/shapes/shared/ShapeFill.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/TextHelpers.js +228 -0
- package/dist-cjs/lib/shapes/shared/TextHelpers.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/TextLabel.js +138 -0
- package/dist-cjs/lib/shapes/shared/TextLabel.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/createTextSvgElementFromSpans.js +75 -0
- package/dist-cjs/lib/shapes/shared/createTextSvgElementFromSpans.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/default-shape-constants.js +72 -0
- package/dist-cjs/lib/shapes/shared/default-shape-constants.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/defaultStyleDefs.js +252 -0
- package/dist-cjs/lib/shapes/shared/defaultStyleDefs.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/freehand/getStroke.js +33 -0
- package/dist-cjs/lib/shapes/shared/freehand/getStroke.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/freehand/getStrokeOutlinePoints.js +175 -0
- package/dist-cjs/lib/shapes/shared/freehand/getStrokeOutlinePoints.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/freehand/getStrokePoints.js +144 -0
- package/dist-cjs/lib/shapes/shared/freehand/getStrokePoints.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/freehand/getStrokeRadius.js +27 -0
- package/dist-cjs/lib/shapes/shared/freehand/getStrokeRadius.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/freehand/setStrokePointRadii.js +101 -0
- package/dist-cjs/lib/shapes/shared/freehand/setStrokePointRadii.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/freehand/svg.js +56 -0
- package/dist-cjs/lib/shapes/shared/freehand/svg.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/freehand/svgInk.js +163 -0
- package/dist-cjs/lib/shapes/shared/freehand/svgInk.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/freehand/types.js +17 -0
- package/dist-cjs/lib/shapes/shared/freehand/types.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/getBrowserCanvasMaxSize.js +52 -0
- package/dist-cjs/lib/shapes/shared/getBrowserCanvasMaxSize.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/getPerfectDashProps.js +96 -0
- package/dist-cjs/lib/shapes/shared/getPerfectDashProps.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/getTextLabelSvgElement.js +56 -0
- package/dist-cjs/lib/shapes/shared/getTextLabelSvgElement.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/legacyProps.js +42 -0
- package/dist-cjs/lib/shapes/shared/legacyProps.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/polygon-helpers.js +116 -0
- package/dist-cjs/lib/shapes/shared/polygon-helpers.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/resizeBox.js +117 -0
- package/dist-cjs/lib/shapes/shared/resizeBox.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/resizeScaled.js +48 -0
- package/dist-cjs/lib/shapes/shared/resizeScaled.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/rotated-box-shadow.js +50 -0
- package/dist-cjs/lib/shapes/shared/rotated-box-shadow.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/useColorSpace.js +39 -0
- package/dist-cjs/lib/shapes/shared/useColorSpace.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/useEditableText.js +179 -0
- package/dist-cjs/lib/shapes/shared/useEditableText.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/useForceSolid.js +29 -0
- package/dist-cjs/lib/shapes/shared/useForceSolid.js.map +7 -0
- package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js +38 -0
- package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js.map +7 -0
- package/dist-cjs/lib/shapes/text/TextShapeTool.js +33 -0
- package/dist-cjs/lib/shapes/text/TextShapeTool.js.map +7 -0
- package/dist-cjs/lib/shapes/text/TextShapeUtil.js +341 -0
- package/dist-cjs/lib/shapes/text/TextShapeUtil.js.map +7 -0
- package/dist-cjs/lib/shapes/text/toolStates/Idle.js +62 -0
- package/dist-cjs/lib/shapes/text/toolStates/Idle.js.map +7 -0
- package/dist-cjs/lib/shapes/text/toolStates/Pointing.js +109 -0
- package/dist-cjs/lib/shapes/text/toolStates/Pointing.js.map +7 -0
- package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +202 -0
- package/dist-cjs/lib/shapes/video/VideoShapeUtil.js.map +7 -0
- package/dist-cjs/lib/tools/EraserTool/EraserTool.js +36 -0
- package/dist-cjs/lib/tools/EraserTool/EraserTool.js.map +7 -0
- package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js +111 -0
- package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js.map +7 -0
- package/dist-cjs/lib/tools/EraserTool/childStates/Idle.js +34 -0
- package/dist-cjs/lib/tools/EraserTool/childStates/Idle.js.map +7 -0
- package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js +84 -0
- package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js.map +7 -0
- package/dist-cjs/lib/tools/HandTool/HandTool.js +58 -0
- package/dist-cjs/lib/tools/HandTool/HandTool.js.map +7 -0
- package/dist-cjs/lib/tools/HandTool/childStates/Dragging.js +58 -0
- package/dist-cjs/lib/tools/HandTool/childStates/Dragging.js.map +7 -0
- package/dist-cjs/lib/tools/HandTool/childStates/Idle.js +37 -0
- package/dist-cjs/lib/tools/HandTool/childStates/Idle.js.map +7 -0
- package/dist-cjs/lib/tools/HandTool/childStates/Pointing.js +55 -0
- package/dist-cjs/lib/tools/HandTool/childStates/Pointing.js.map +7 -0
- package/dist-cjs/lib/tools/LaserTool/LaserTool.js +35 -0
- package/dist-cjs/lib/tools/LaserTool/LaserTool.js.map +7 -0
- package/dist-cjs/lib/tools/LaserTool/childStates/Idle.js +31 -0
- package/dist-cjs/lib/tools/LaserTool/childStates/Idle.js.map +7 -0
- package/dist-cjs/lib/tools/LaserTool/childStates/Lasering.js +66 -0
- package/dist-cjs/lib/tools/LaserTool/childStates/Lasering.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/DragAndDropManager.js +100 -0
- package/dist-cjs/lib/tools/SelectTool/DragAndDropManager.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/SelectTool.js +70 -0
- package/dist-cjs/lib/tools/SelectTool/SelectTool.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Brushing.js +145 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Brushing.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/Crop.js +33 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/Crop.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Idle.js +204 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/Idle.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js +39 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.js +101 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.js +58 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/crop-constants.js +25 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Crop/crop-constants.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Cropping.js +210 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Cropping.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +230 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/EditingShape.js +121 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/EditingShape.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js +461 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingCanvas.js +56 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingCanvas.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingCropHandle.js +89 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingCropHandle.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingHandle.js +67 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingHandle.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js +91 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingResizeHandle.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingRotateHandle.js +83 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingRotateHandle.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingSelection.js +73 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingSelection.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js +176 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js +371 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js +148 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/ScribbleBrushing.js +140 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/ScribbleBrushing.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js +315 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js.map +7 -0
- package/dist-cjs/lib/tools/SelectTool/children/DraggingHandle.js +230 -0
- package/dist-cjs/lib/tools/SelectTool/children/DraggingHandle.js.map +7 -0
- package/dist-cjs/lib/tools/ZoomTool/ZoomTool.js +79 -0
- package/dist-cjs/lib/tools/ZoomTool/ZoomTool.js.map +7 -0
- package/dist-cjs/lib/tools/ZoomTool/childStates/Idle.js +35 -0
- package/dist-cjs/lib/tools/ZoomTool/childStates/Idle.js.map +7 -0
- package/dist-cjs/lib/tools/ZoomTool/childStates/Pointing.js +55 -0
- package/dist-cjs/lib/tools/ZoomTool/childStates/Pointing.js.map +7 -0
- package/dist-cjs/lib/tools/ZoomTool/childStates/ZoomBrushing.js +72 -0
- package/dist-cjs/lib/tools/ZoomTool/childStates/ZoomBrushing.js.map +7 -0
- package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js +41 -0
- package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js.map +7 -0
- package/dist-cjs/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.js +28 -0
- package/dist-cjs/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.js.map +7 -0
- package/dist-cjs/lib/tools/selection-logic/selectOnCanvasPointerUp.js +80 -0
- package/dist-cjs/lib/tools/selection-logic/selectOnCanvasPointerUp.js.map +7 -0
- package/dist-cjs/lib/tools/selection-logic/updateHoveredId.js +47 -0
- package/dist-cjs/lib/tools/selection-logic/updateHoveredId.js.map +7 -0
- package/dist-cjs/lib/ui/TldrawUi.js +155 -0
- package/dist-cjs/lib/ui/TldrawUi.js.map +7 -0
- package/dist-cjs/lib/ui/TldrawUiContextProvider.js +57 -0
- package/dist-cjs/lib/ui/TldrawUiContextProvider.js.map +7 -0
- package/dist-cjs/lib/ui/assetUrls.js +67 -0
- package/dist-cjs/lib/ui/assetUrls.js.map +7 -0
- package/dist-cjs/lib/ui/components/ActionsMenu.js +96 -0
- package/dist-cjs/lib/ui/components/ActionsMenu.js.map +7 -0
- package/dist-cjs/lib/ui/components/BackToContent.js +67 -0
- package/dist-cjs/lib/ui/components/BackToContent.js.map +7 -0
- package/dist-cjs/lib/ui/components/ContextMenu.js +214 -0
- package/dist-cjs/lib/ui/components/ContextMenu.js.map +7 -0
- package/dist-cjs/lib/ui/components/DebugPanel.js +334 -0
- package/dist-cjs/lib/ui/components/DebugPanel.js.map +7 -0
- package/dist-cjs/lib/ui/components/Dialogs.js +64 -0
- package/dist-cjs/lib/ui/components/Dialogs.js.map +7 -0
- package/dist-cjs/lib/ui/components/DuplicateButton.js +47 -0
- package/dist-cjs/lib/ui/components/DuplicateButton.js.map +7 -0
- package/dist-cjs/lib/ui/components/EditLinkDialog.js +161 -0
- package/dist-cjs/lib/ui/components/EditLinkDialog.js.map +7 -0
- package/dist-cjs/lib/ui/components/EmbedDialog.js +152 -0
- package/dist-cjs/lib/ui/components/EmbedDialog.js.map +7 -0
- package/dist-cjs/lib/ui/components/FollowingIndicator.js +41 -0
- package/dist-cjs/lib/ui/components/FollowingIndicator.js.map +7 -0
- package/dist-cjs/lib/ui/components/HTMLCanvas.js +66 -0
- package/dist-cjs/lib/ui/components/HTMLCanvas.js.map +7 -0
- package/dist-cjs/lib/ui/components/HelpMenu.js +116 -0
- package/dist-cjs/lib/ui/components/HelpMenu.js.map +7 -0
- package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog.js +74 -0
- package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog.js.map +7 -0
- package/dist-cjs/lib/ui/components/LanguageMenu.js +60 -0
- package/dist-cjs/lib/ui/components/LanguageMenu.js.map +7 -0
- package/dist-cjs/lib/ui/components/Menu.js +139 -0
- package/dist-cjs/lib/ui/components/Menu.js.map +7 -0
- package/dist-cjs/lib/ui/components/MenuZone.js +51 -0
- package/dist-cjs/lib/ui/components/MenuZone.js.map +7 -0
- package/dist-cjs/lib/ui/components/MobileStylePanel.js +69 -0
- package/dist-cjs/lib/ui/components/MobileStylePanel.js.map +7 -0
- package/dist-cjs/lib/ui/components/MoveToPageMenu.js +142 -0
- package/dist-cjs/lib/ui/components/MoveToPageMenu.js.map +7 -0
- package/dist-cjs/lib/ui/components/NavigationZone/Minimap.js +208 -0
- package/dist-cjs/lib/ui/components/NavigationZone/Minimap.js.map +7 -0
- package/dist-cjs/lib/ui/components/NavigationZone/MinimapManager.js +293 -0
- package/dist-cjs/lib/ui/components/NavigationZone/MinimapManager.js.map +7 -0
- package/dist-cjs/lib/ui/components/NavigationZone/NavigationZone.js +103 -0
- package/dist-cjs/lib/ui/components/NavigationZone/NavigationZone.js.map +7 -0
- package/dist-cjs/lib/ui/components/NavigationZone/ZoomMenu.js +118 -0
- package/dist-cjs/lib/ui/components/NavigationZone/ZoomMenu.js.map +7 -0
- package/dist-cjs/lib/ui/components/OfflineIndicator/OfflineIndicator.js +47 -0
- package/dist-cjs/lib/ui/components/OfflineIndicator/OfflineIndicator.js.map +7 -0
- package/dist-cjs/lib/ui/components/PageMenu/PageItemInput.js +63 -0
- package/dist-cjs/lib/ui/components/PageMenu/PageItemInput.js.map +7 -0
- package/dist-cjs/lib/ui/components/PageMenu/PageItemSubmenu.js +88 -0
- package/dist-cjs/lib/ui/components/PageMenu/PageItemSubmenu.js.map +7 -0
- package/dist-cjs/lib/ui/components/PageMenu/PageMenu.js +395 -0
- package/dist-cjs/lib/ui/components/PageMenu/PageMenu.js.map +7 -0
- package/dist-cjs/lib/ui/components/PageMenu/edit-pages-shared.js +45 -0
- package/dist-cjs/lib/ui/components/PageMenu/edit-pages-shared.js.map +7 -0
- package/dist-cjs/lib/ui/components/PenModeToggle.js +45 -0
- package/dist-cjs/lib/ui/components/PenModeToggle.js.map +7 -0
- package/dist-cjs/lib/ui/components/RedoButton.js +49 -0
- package/dist-cjs/lib/ui/components/RedoButton.js.map +7 -0
- package/dist-cjs/lib/ui/components/Spinner.js +41 -0
- package/dist-cjs/lib/ui/components/Spinner.js.map +7 -0
- package/dist-cjs/lib/ui/components/StopFollowing.js +45 -0
- package/dist-cjs/lib/ui/components/StopFollowing.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js +138 -0
- package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js +89 -0
- package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/StylePanel.js +313 -0
- package/dist-cjs/lib/ui/components/StylePanel/StylePanel.js.map +7 -0
- package/dist-cjs/lib/ui/components/StylePanel/styles.js +119 -0
- package/dist-cjs/lib/ui/components/StylePanel/styles.js.map +7 -0
- package/dist-cjs/lib/ui/components/Toasts.js +101 -0
- package/dist-cjs/lib/ui/components/Toasts.js.map +7 -0
- package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js +73 -0
- package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js.map +7 -0
- package/dist-cjs/lib/ui/components/Toolbar/Toolbar.js +247 -0
- package/dist-cjs/lib/ui/components/Toolbar/Toolbar.js.map +7 -0
- package/dist-cjs/lib/ui/components/TrashButton.js +51 -0
- package/dist-cjs/lib/ui/components/TrashButton.js.map +7 -0
- package/dist-cjs/lib/ui/components/UndoButton.js +49 -0
- package/dist-cjs/lib/ui/components/UndoButton.js.map +7 -0
- package/dist-cjs/lib/ui/components/primitives/Button.js +79 -0
- package/dist-cjs/lib/ui/components/primitives/Button.js.map +7 -0
- package/dist-cjs/lib/ui/components/primitives/ButtonPicker.js +121 -0
- package/dist-cjs/lib/ui/components/primitives/ButtonPicker.js.map +7 -0
- package/dist-cjs/lib/ui/components/primitives/Dialog.js +70 -0
- package/dist-cjs/lib/ui/components/primitives/Dialog.js.map +7 -0
- package/dist-cjs/lib/ui/components/primitives/DropdownMenu.js +187 -0
- package/dist-cjs/lib/ui/components/primitives/DropdownMenu.js.map +7 -0
- package/dist-cjs/lib/ui/components/primitives/Icon.js +71 -0
- package/dist-cjs/lib/ui/components/primitives/Icon.js.map +7 -0
- package/dist-cjs/lib/ui/components/primitives/Input.js +155 -0
- package/dist-cjs/lib/ui/components/primitives/Input.js.map +7 -0
- package/dist-cjs/lib/ui/components/primitives/Kbd.js +29 -0
- package/dist-cjs/lib/ui/components/primitives/Kbd.js.map +7 -0
- package/dist-cjs/lib/ui/components/primitives/Popover.js +69 -0
- package/dist-cjs/lib/ui/components/primitives/Popover.js.map +7 -0
- package/dist-cjs/lib/ui/components/primitives/Slider.js +69 -0
- package/dist-cjs/lib/ui/components/primitives/Slider.js.map +7 -0
- package/dist-cjs/lib/ui/components/primitives/shared.js +44 -0
- package/dist-cjs/lib/ui/components/primitives/shared.js.map +7 -0
- package/dist-cjs/lib/ui/constants.js +25 -0
- package/dist-cjs/lib/ui/constants.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/clipboard/pasteExcalidrawContent.js +454 -0
- package/dist-cjs/lib/ui/hooks/clipboard/pasteExcalidrawContent.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/clipboard/pasteFiles.js +37 -0
- package/dist-cjs/lib/ui/hooks/clipboard/pasteFiles.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/clipboard/pasteTldrawContent.js +32 -0
- package/dist-cjs/lib/ui/hooks/clipboard/pasteTldrawContent.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/clipboard/pasteUrl.js +48 -0
- package/dist-cjs/lib/ui/hooks/clipboard/pasteUrl.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/menuHelpers.js +172 -0
- package/dist-cjs/lib/ui/hooks/menuHelpers.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useActions.js +1152 -0
- package/dist-cjs/lib/ui/hooks/useActions.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useActionsMenuSchema.js +112 -0
- package/dist-cjs/lib/ui/hooks/useActionsMenuSchema.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useAssetUrls.js +41 -0
- package/dist-cjs/lib/ui/hooks/useAssetUrls.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useBreakpoint.js +64 -0
- package/dist-cjs/lib/ui/hooks/useBreakpoint.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useCanRedo.js +29 -0
- package/dist-cjs/lib/ui/hooks/useCanRedo.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useCanUndo.js +29 -0
- package/dist-cjs/lib/ui/hooks/useCanUndo.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useClipboardEvents.js +463 -0
- package/dist-cjs/lib/ui/hooks/useClipboardEvents.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useContextMenuSchema.js +228 -0
- package/dist-cjs/lib/ui/hooks/useContextMenuSchema.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useCopyAs.js +47 -0
- package/dist-cjs/lib/ui/hooks/useCopyAs.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useDialogsProvider.js +108 -0
- package/dist-cjs/lib/ui/hooks/useDialogsProvider.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useEditorEvents.js +43 -0
- package/dist-cjs/lib/ui/hooks/useEditorEvents.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useEventsProvider.js +47 -0
- package/dist-cjs/lib/ui/hooks/useEventsProvider.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useExportAs.js +51 -0
- package/dist-cjs/lib/ui/hooks/useExportAs.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useHasLinkShapeSelected.js +36 -0
- package/dist-cjs/lib/ui/hooks/useHasLinkShapeSelected.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useHelpMenuSchema.js +103 -0
- package/dist-cjs/lib/ui/hooks/useHelpMenuSchema.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useHighDpiCanvas.js +35 -0
- package/dist-cjs/lib/ui/hooks/useHighDpiCanvas.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useInsertMedia.js +57 -0
- package/dist-cjs/lib/ui/hooks/useInsertMedia.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js +138 -0
- package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useKeyboardShortcutsSchema.js +134 -0
- package/dist-cjs/lib/ui/hooks/useKeyboardShortcutsSchema.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useLocalStorageState.js +59 -0
- package/dist-cjs/lib/ui/hooks/useLocalStorageState.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useMenuIsOpen.js +74 -0
- package/dist-cjs/lib/ui/hooks/useMenuIsOpen.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useMenuSchema.js +260 -0
- package/dist-cjs/lib/ui/hooks/useMenuSchema.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useOnlyFlippableShape.js +38 -0
- package/dist-cjs/lib/ui/hooks/useOnlyFlippableShape.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/usePreloadAssets.js +106 -0
- package/dist-cjs/lib/ui/hooks/usePreloadAssets.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/usePreloadIcons.js +51 -0
- package/dist-cjs/lib/ui/hooks/usePreloadIcons.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/usePrint.js +220 -0
- package/dist-cjs/lib/ui/hooks/usePrint.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useReadonly.js +29 -0
- package/dist-cjs/lib/ui/hooks/useReadonly.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useRevelantStyles.js +45 -0
- package/dist-cjs/lib/ui/hooks/useRevelantStyles.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useShowAutoSizeToggle.js +36 -0
- package/dist-cjs/lib/ui/hooks/useShowAutoSizeToggle.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useToastsProvider.js +53 -0
- package/dist-cjs/lib/ui/hooks/useToastsProvider.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useToolbarSchema.js +99 -0
- package/dist-cjs/lib/ui/hooks/useToolbarSchema.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useTools.js +235 -0
- package/dist-cjs/lib/ui/hooks/useTools.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useTranslation/TLUiTranslationKey.js +17 -0
- package/dist-cjs/lib/ui/hooks/useTranslation/TLUiTranslationKey.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +377 -0
- package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useTranslation/translations.js +67 -0
- package/dist-cjs/lib/ui/hooks/useTranslation/translations.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useTranslation/useLanguages.js +32 -0
- package/dist-cjs/lib/ui/hooks/useTranslation/useLanguages.js.map +7 -0
- package/dist-cjs/lib/ui/hooks/useTranslation/useTranslation.js +101 -0
- package/dist-cjs/lib/ui/hooks/useTranslation/useTranslation.js.map +7 -0
- package/dist-cjs/lib/ui/icon-types.js +190 -0
- package/dist-cjs/lib/ui/icon-types.js.map +7 -0
- package/dist-cjs/lib/ui/overrides.js +178 -0
- package/dist-cjs/lib/ui/overrides.js.map +7 -0
- package/dist-cjs/lib/ui/version.js +25 -0
- package/dist-cjs/lib/ui/version.js.map +7 -0
- package/dist-cjs/lib/utils/assets/assets.js +91 -0
- package/dist-cjs/lib/utils/assets/assets.js.map +7 -0
- package/dist-cjs/lib/utils/assets/is-gif-animated.js +74 -0
- package/dist-cjs/lib/utils/assets/is-gif-animated.js.map +7 -0
- package/dist-cjs/lib/utils/assets.js +91 -0
- package/dist-cjs/lib/utils/assets.js.map +7 -0
- package/dist-cjs/lib/utils/embeds/embeds.js +85 -0
- package/dist-cjs/lib/utils/embeds/embeds.js.map +7 -0
- package/dist-cjs/lib/utils/export/copyAs.js +116 -0
- package/dist-cjs/lib/utils/export/copyAs.js.map +7 -0
- package/dist-cjs/lib/utils/export/export.js +117 -0
- package/dist-cjs/lib/utils/export/export.js.map +7 -0
- package/dist-cjs/lib/utils/export/exportAs.js +88 -0
- package/dist-cjs/lib/utils/export/exportAs.js.map +7 -0
- package/dist-cjs/lib/utils/frames/frames.js +92 -0
- package/dist-cjs/lib/utils/frames/frames.js.map +7 -0
- package/dist-cjs/lib/utils/static-assets/assetUrls.js +48 -0
- package/dist-cjs/lib/utils/static-assets/assetUrls.js.map +7 -0
- package/dist-cjs/lib/utils/text/text.js +57 -0
- package/dist-cjs/lib/utils/text/text.js.map +7 -0
- package/dist-cjs/lib/utils/tldr/buildFromV1Document.js +792 -0
- package/dist-cjs/lib/utils/tldr/buildFromV1Document.js.map +7 -0
- package/dist-cjs/lib/utils/tldr/file.js +230 -0
- package/dist-cjs/lib/utils/tldr/file.js.map +7 -0
- package/dist-esm/index.d.mts +2954 -0
- package/dist-esm/index.mjs +234 -0
- package/dist-esm/index.mjs.map +7 -0
- package/dist-esm/lib/Tldraw.mjs +127 -0
- package/dist-esm/lib/Tldraw.mjs.map +7 -0
- package/dist-esm/lib/canvas/TldrawCropHandles.mjs +134 -0
- package/dist-esm/lib/canvas/TldrawCropHandles.mjs.map +7 -0
- package/dist-esm/lib/canvas/TldrawHandles.mjs +17 -0
- package/dist-esm/lib/canvas/TldrawHandles.mjs.map +7 -0
- package/dist-esm/lib/canvas/TldrawHoveredShapeIndicator.mjs +26 -0
- package/dist-esm/lib/canvas/TldrawHoveredShapeIndicator.mjs.map +7 -0
- package/dist-esm/lib/canvas/TldrawScribble.mjs +42 -0
- package/dist-esm/lib/canvas/TldrawScribble.mjs.map +7 -0
- package/dist-esm/lib/canvas/TldrawSelectionBackground.mjs +28 -0
- package/dist-esm/lib/canvas/TldrawSelectionBackground.mjs.map +7 -0
- package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs +487 -0
- package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs.map +7 -0
- package/dist-esm/lib/defaultExternalContentHandlers.mjs +387 -0
- package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +7 -0
- package/dist-esm/lib/defaultShapeTools.mjs +22 -0
- package/dist-esm/lib/defaultShapeTools.mjs.map +7 -0
- package/dist-esm/lib/defaultShapeUtils.mjs +30 -0
- package/dist-esm/lib/defaultShapeUtils.mjs.map +7 -0
- package/dist-esm/lib/defaultSideEffects.mjs +49 -0
- package/dist-esm/lib/defaultSideEffects.mjs.map +7 -0
- package/dist-esm/lib/defaultTools.mjs +10 -0
- package/dist-esm/lib/defaultTools.mjs.map +7 -0
- package/dist-esm/lib/shapes/arrow/ArrowShapeTool.mjs +13 -0
- package/dist-esm/lib/shapes/arrow/ArrowShapeTool.mjs.map +7 -0
- package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +808 -0
- package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +7 -0
- package/dist-esm/lib/shapes/arrow/components/ArrowTextLabel.mjs +84 -0
- package/dist-esm/lib/shapes/arrow/components/ArrowTextLabel.mjs.map +7 -0
- package/dist-esm/lib/shapes/arrow/toolStates/Idle.mjs +33 -0
- package/dist-esm/lib/shapes/arrow/toolStates/Idle.mjs.map +7 -0
- package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs +162 -0
- package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs.map +7 -0
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +154 -0
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +7 -0
- package/dist-esm/lib/shapes/draw/DrawShapeTool.mjs +17 -0
- package/dist-esm/lib/shapes/draw/DrawShapeTool.mjs.map +7 -0
- package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs +237 -0
- package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs.map +7 -0
- package/dist-esm/lib/shapes/draw/getPath.mjs +87 -0
- package/dist-esm/lib/shapes/draw/getPath.mjs.map +7 -0
- package/dist-esm/lib/shapes/draw/toolStates/Drawing.mjs +546 -0
- package/dist-esm/lib/shapes/draw/toolStates/Drawing.mjs.map +7 -0
- package/dist-esm/lib/shapes/draw/toolStates/Idle.mjs +17 -0
- package/dist-esm/lib/shapes/draw/toolStates/Idle.mjs.map +7 -0
- package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +181 -0
- package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +7 -0
- package/dist-esm/lib/shapes/frame/FrameShapeTool.mjs +46 -0
- package/dist-esm/lib/shapes/frame/FrameShapeTool.mjs.map +7 -0
- package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +216 -0
- package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +7 -0
- package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs +93 -0
- package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs.map +7 -0
- package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs +81 -0
- package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/GeoShapeTool.mjs +13 -0
- package/dist-esm/lib/shapes/geo/GeoShapeTool.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +1010 -0
- package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/cloudOutline.mjs +275 -0
- package/dist-esm/lib/shapes/geo/cloudOutline.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/components/DashStyleCloud.mjs +102 -0
- package/dist-esm/lib/shapes/geo/components/DashStyleCloud.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/components/DashStyleEllipse.mjs +101 -0
- package/dist-esm/lib/shapes/geo/components/DashStyleEllipse.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/components/DashStyleOval.mjs +93 -0
- package/dist-esm/lib/shapes/geo/components/DashStyleOval.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/components/DashStylePolygon.mjs +130 -0
- package/dist-esm/lib/shapes/geo/components/DashStylePolygon.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/components/DrawStyleCloud.mjs +54 -0
- package/dist-esm/lib/shapes/geo/components/DrawStyleCloud.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/components/DrawStyleEllipse.mjs +116 -0
- package/dist-esm/lib/shapes/geo/components/DrawStyleEllipse.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/components/DrawStylePolygon.mjs +68 -0
- package/dist-esm/lib/shapes/geo/components/DrawStylePolygon.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/components/SolidStyleCloud.mjs +54 -0
- package/dist-esm/lib/shapes/geo/components/SolidStyleCloud.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/components/SolidStyleEllipse.mjs +59 -0
- package/dist-esm/lib/shapes/geo/components/SolidStyleEllipse.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/components/SolidStyleOval.mjs +74 -0
- package/dist-esm/lib/shapes/geo/components/SolidStyleOval.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/components/SolidStylePolygon.mjs +61 -0
- package/dist-esm/lib/shapes/geo/components/SolidStylePolygon.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/helpers.mjs +33 -0
- package/dist-esm/lib/shapes/geo/helpers.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/toolStates/Idle.mjs +33 -0
- package/dist-esm/lib/shapes/geo/toolStates/Idle.mjs.map +7 -0
- package/dist-esm/lib/shapes/geo/toolStates/Pointing.mjs +104 -0
- package/dist-esm/lib/shapes/geo/toolStates/Pointing.mjs.map +7 -0
- package/dist-esm/lib/shapes/highlight/HighlightShapeTool.mjs +17 -0
- package/dist-esm/lib/shapes/highlight/HighlightShapeTool.mjs.map +7 -0
- package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +198 -0
- package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +7 -0
- package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs +252 -0
- package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs.map +7 -0
- package/dist-esm/lib/shapes/line/LineShapeTool.mjs +13 -0
- package/dist-esm/lib/shapes/line/LineShapeTool.mjs.map +7 -0
- package/dist-esm/lib/shapes/line/LineShapeUtil.mjs +357 -0
- package/dist-esm/lib/shapes/line/LineShapeUtil.mjs.map +7 -0
- package/dist-esm/lib/shapes/line/components/getLinePath.mjs +68 -0
- package/dist-esm/lib/shapes/line/components/getLinePath.mjs.map +7 -0
- package/dist-esm/lib/shapes/line/components/svg.mjs +57 -0
- package/dist-esm/lib/shapes/line/components/svg.mjs.map +7 -0
- package/dist-esm/lib/shapes/line/toolStates/Idle.mjs +19 -0
- package/dist-esm/lib/shapes/line/toolStates/Idle.mjs.map +7 -0
- package/dist-esm/lib/shapes/line/toolStates/Pointing.mjs +134 -0
- package/dist-esm/lib/shapes/line/toolStates/Pointing.mjs.map +7 -0
- package/dist-esm/lib/shapes/note/NoteShapeTool.mjs +13 -0
- package/dist-esm/lib/shapes/note/NoteShapeTool.mjs.map +7 -0
- package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +193 -0
- package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +7 -0
- package/dist-esm/lib/shapes/note/toolStates/Idle.mjs +17 -0
- package/dist-esm/lib/shapes/note/toolStates/Idle.mjs.map +7 -0
- package/dist-esm/lib/shapes/note/toolStates/Pointing.mjs +97 -0
- package/dist-esm/lib/shapes/note/toolStates/Pointing.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs +35 -0
- package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/ShapeFill.mjs +93 -0
- package/dist-esm/lib/shapes/shared/ShapeFill.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/TextHelpers.mjs +208 -0
- package/dist-esm/lib/shapes/shared/TextHelpers.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/TextLabel.mjs +112 -0
- package/dist-esm/lib/shapes/shared/TextLabel.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/createTextSvgElementFromSpans.mjs +57 -0
- package/dist-esm/lib/shapes/shared/createTextSvgElementFromSpans.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/default-shape-constants.mjs +52 -0
- package/dist-esm/lib/shapes/shared/default-shape-constants.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/defaultStyleDefs.mjs +240 -0
- package/dist-esm/lib/shapes/shared/defaultStyleDefs.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/freehand/getStroke.mjs +13 -0
- package/dist-esm/lib/shapes/shared/freehand/getStroke.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/freehand/getStrokeOutlinePoints.mjs +155 -0
- package/dist-esm/lib/shapes/shared/freehand/getStrokeOutlinePoints.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/freehand/getStrokePoints.mjs +124 -0
- package/dist-esm/lib/shapes/shared/freehand/getStrokePoints.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/freehand/getStrokeRadius.mjs +7 -0
- package/dist-esm/lib/shapes/shared/freehand/getStrokeRadius.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/freehand/setStrokePointRadii.mjs +81 -0
- package/dist-esm/lib/shapes/shared/freehand/setStrokePointRadii.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/freehand/svg.mjs +36 -0
- package/dist-esm/lib/shapes/shared/freehand/svg.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/freehand/svgInk.mjs +150 -0
- package/dist-esm/lib/shapes/shared/freehand/svgInk.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/freehand/types.mjs +1 -0
- package/dist-esm/lib/shapes/shared/freehand/types.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/getBrowserCanvasMaxSize.mjs +22 -0
- package/dist-esm/lib/shapes/shared/getBrowserCanvasMaxSize.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/getPerfectDashProps.mjs +76 -0
- package/dist-esm/lib/shapes/shared/getPerfectDashProps.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/getTextLabelSvgElement.mjs +36 -0
- package/dist-esm/lib/shapes/shared/getTextLabelSvgElement.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/legacyProps.mjs +22 -0
- package/dist-esm/lib/shapes/shared/legacyProps.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/polygon-helpers.mjs +96 -0
- package/dist-esm/lib/shapes/shared/polygon-helpers.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/resizeBox.mjs +99 -0
- package/dist-esm/lib/shapes/shared/resizeBox.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/resizeScaled.mjs +28 -0
- package/dist-esm/lib/shapes/shared/resizeScaled.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/rotated-box-shadow.mjs +30 -0
- package/dist-esm/lib/shapes/shared/rotated-box-shadow.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/useColorSpace.mjs +19 -0
- package/dist-esm/lib/shapes/shared/useColorSpace.mjs.map +7 -0
- package/dist-esm/lib/shapes/shared/useEditableText.mjs +165 -0
- package/dist-esm/lib/shapes/shared/useEditableText.mjs.map +7 -0
- 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/usePrefersReducedMotion.mjs +18 -0
- package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs.map +7 -0
- package/dist-esm/lib/shapes/text/TextShapeTool.mjs +13 -0
- package/dist-esm/lib/shapes/text/TextShapeTool.mjs.map +7 -0
- package/dist-esm/lib/shapes/text/TextShapeUtil.mjs +334 -0
- package/dist-esm/lib/shapes/text/TextShapeUtil.mjs.map +7 -0
- package/dist-esm/lib/shapes/text/toolStates/Idle.mjs +42 -0
- package/dist-esm/lib/shapes/text/toolStates/Idle.mjs.map +7 -0
- package/dist-esm/lib/shapes/text/toolStates/Pointing.mjs +89 -0
- package/dist-esm/lib/shapes/text/toolStates/Pointing.mjs.map +7 -0
- package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs +180 -0
- package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs.map +7 -0
- package/dist-esm/lib/tools/EraserTool/EraserTool.mjs +16 -0
- package/dist-esm/lib/tools/EraserTool/EraserTool.mjs.map +7 -0
- package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs +95 -0
- package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs.map +7 -0
- package/dist-esm/lib/tools/EraserTool/childStates/Idle.mjs +14 -0
- package/dist-esm/lib/tools/EraserTool/childStates/Idle.mjs.map +7 -0
- package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs +67 -0
- package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs.map +7 -0
- package/dist-esm/lib/tools/HandTool/HandTool.mjs +38 -0
- package/dist-esm/lib/tools/HandTool/HandTool.mjs.map +7 -0
- package/dist-esm/lib/tools/HandTool/childStates/Dragging.mjs +38 -0
- package/dist-esm/lib/tools/HandTool/childStates/Dragging.mjs.map +7 -0
- package/dist-esm/lib/tools/HandTool/childStates/Idle.mjs +17 -0
- package/dist-esm/lib/tools/HandTool/childStates/Idle.mjs.map +7 -0
- package/dist-esm/lib/tools/HandTool/childStates/Pointing.mjs +35 -0
- package/dist-esm/lib/tools/HandTool/childStates/Pointing.mjs.map +7 -0
- package/dist-esm/lib/tools/LaserTool/LaserTool.mjs +15 -0
- package/dist-esm/lib/tools/LaserTool/LaserTool.mjs.map +7 -0
- package/dist-esm/lib/tools/LaserTool/childStates/Idle.mjs +11 -0
- package/dist-esm/lib/tools/LaserTool/childStates/Idle.mjs.map +7 -0
- package/dist-esm/lib/tools/LaserTool/childStates/Lasering.mjs +46 -0
- package/dist-esm/lib/tools/LaserTool/childStates/Lasering.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/DragAndDropManager.mjs +80 -0
- package/dist-esm/lib/tools/SelectTool/DragAndDropManager.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/SelectTool.mjs +50 -0
- package/dist-esm/lib/tools/SelectTool/SelectTool.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Brushing.mjs +131 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Brushing.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/Crop.mjs +13 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/Crop.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Idle.mjs +187 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/Idle.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs +19 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.mjs +81 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.mjs +40 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/crop-constants.mjs +5 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Crop/crop-constants.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Cropping.mjs +194 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Cropping.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +217 -0
- package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/EditingShape.mjs +103 -0
- package/dist-esm/lib/tools/SelectTool/childStates/EditingShape.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs +447 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/PointingCanvas.mjs +36 -0
- package/dist-esm/lib/tools/SelectTool/childStates/PointingCanvas.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/PointingCropHandle.mjs +69 -0
- package/dist-esm/lib/tools/SelectTool/childStates/PointingCropHandle.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/PointingHandle.mjs +47 -0
- package/dist-esm/lib/tools/SelectTool/childStates/PointingHandle.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs +73 -0
- package/dist-esm/lib/tools/SelectTool/childStates/PointingResizeHandle.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/PointingRotateHandle.mjs +63 -0
- package/dist-esm/lib/tools/SelectTool/childStates/PointingRotateHandle.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/PointingSelection.mjs +55 -0
- package/dist-esm/lib/tools/SelectTool/childStates/PointingSelection.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs +159 -0
- package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs +360 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs +136 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/ScribbleBrushing.mjs +125 -0
- package/dist-esm/lib/tools/SelectTool/childStates/ScribbleBrushing.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs +302 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs.map +7 -0
- package/dist-esm/lib/tools/SelectTool/children/DraggingHandle.mjs +217 -0
- package/dist-esm/lib/tools/SelectTool/children/DraggingHandle.mjs.map +7 -0
- package/dist-esm/lib/tools/ZoomTool/ZoomTool.mjs +61 -0
- package/dist-esm/lib/tools/ZoomTool/ZoomTool.mjs.map +7 -0
- package/dist-esm/lib/tools/ZoomTool/childStates/Idle.mjs +15 -0
- package/dist-esm/lib/tools/ZoomTool/childStates/Idle.mjs.map +7 -0
- package/dist-esm/lib/tools/ZoomTool/childStates/Pointing.mjs +35 -0
- package/dist-esm/lib/tools/ZoomTool/childStates/Pointing.mjs.map +7 -0
- package/dist-esm/lib/tools/ZoomTool/childStates/ZoomBrushing.mjs +52 -0
- package/dist-esm/lib/tools/ZoomTool/childStates/ZoomBrushing.mjs.map +7 -0
- package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs +21 -0
- package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs.map +7 -0
- 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 +60 -0
- package/dist-esm/lib/tools/selection-logic/selectOnCanvasPointerUp.mjs.map +7 -0
- package/dist-esm/lib/tools/selection-logic/updateHoveredId.mjs +27 -0
- package/dist-esm/lib/tools/selection-logic/updateHoveredId.mjs.map +7 -0
- package/dist-esm/lib/ui/TldrawUi.mjs +125 -0
- package/dist-esm/lib/ui/TldrawUi.mjs.map +7 -0
- package/dist-esm/lib/ui/TldrawUiContextProvider.mjs +37 -0
- package/dist-esm/lib/ui/TldrawUiContextProvider.mjs.map +7 -0
- package/dist-esm/lib/ui/assetUrls.mjs +47 -0
- package/dist-esm/lib/ui/assetUrls.mjs.map +7 -0
- package/dist-esm/lib/ui/components/ActionsMenu.mjs +66 -0
- package/dist-esm/lib/ui/components/ActionsMenu.mjs.map +7 -0
- package/dist-esm/lib/ui/components/BackToContent.mjs +47 -0
- package/dist-esm/lib/ui/components/BackToContent.mjs.map +7 -0
- package/dist-esm/lib/ui/components/ContextMenu.mjs +184 -0
- package/dist-esm/lib/ui/components/ContextMenu.mjs.map +7 -0
- package/dist-esm/lib/ui/components/DebugPanel.mjs +315 -0
- package/dist-esm/lib/ui/components/DebugPanel.mjs.map +7 -0
- package/dist-esm/lib/ui/components/Dialogs.mjs +34 -0
- package/dist-esm/lib/ui/components/Dialogs.mjs.map +7 -0
- package/dist-esm/lib/ui/components/DuplicateButton.mjs +27 -0
- package/dist-esm/lib/ui/components/DuplicateButton.mjs.map +7 -0
- package/dist-esm/lib/ui/components/EditLinkDialog.mjs +131 -0
- package/dist-esm/lib/ui/components/EditLinkDialog.mjs.map +7 -0
- package/dist-esm/lib/ui/components/EmbedDialog.mjs +122 -0
- package/dist-esm/lib/ui/components/EmbedDialog.mjs.map +7 -0
- package/dist-esm/lib/ui/components/FollowingIndicator.mjs +21 -0
- package/dist-esm/lib/ui/components/FollowingIndicator.mjs.map +7 -0
- package/dist-esm/lib/ui/components/HTMLCanvas.mjs +36 -0
- package/dist-esm/lib/ui/components/HTMLCanvas.mjs.map +7 -0
- package/dist-esm/lib/ui/components/HelpMenu.mjs +86 -0
- package/dist-esm/lib/ui/components/HelpMenu.mjs.map +7 -0
- package/dist-esm/lib/ui/components/KeyboardShortcutsDialog.mjs +44 -0
- package/dist-esm/lib/ui/components/KeyboardShortcutsDialog.mjs.map +7 -0
- package/dist-esm/lib/ui/components/LanguageMenu.mjs +30 -0
- package/dist-esm/lib/ui/components/LanguageMenu.mjs.map +7 -0
- package/dist-esm/lib/ui/components/Menu.mjs +109 -0
- package/dist-esm/lib/ui/components/Menu.mjs.map +7 -0
- package/dist-esm/lib/ui/components/MenuZone.mjs +31 -0
- package/dist-esm/lib/ui/components/MenuZone.mjs.map +7 -0
- package/dist-esm/lib/ui/components/MobileStylePanel.mjs +54 -0
- package/dist-esm/lib/ui/components/MobileStylePanel.mjs.map +7 -0
- package/dist-esm/lib/ui/components/MoveToPageMenu.mjs +112 -0
- package/dist-esm/lib/ui/components/MoveToPageMenu.mjs.map +7 -0
- package/dist-esm/lib/ui/components/NavigationZone/Minimap.mjs +191 -0
- package/dist-esm/lib/ui/components/NavigationZone/Minimap.mjs.map +7 -0
- package/dist-esm/lib/ui/components/NavigationZone/MinimapManager.mjs +279 -0
- package/dist-esm/lib/ui/components/NavigationZone/MinimapManager.mjs.map +7 -0
- package/dist-esm/lib/ui/components/NavigationZone/NavigationZone.mjs +83 -0
- package/dist-esm/lib/ui/components/NavigationZone/NavigationZone.mjs.map +7 -0
- package/dist-esm/lib/ui/components/NavigationZone/ZoomMenu.mjs +88 -0
- package/dist-esm/lib/ui/components/NavigationZone/ZoomMenu.mjs.map +7 -0
- package/dist-esm/lib/ui/components/OfflineIndicator/OfflineIndicator.mjs +17 -0
- package/dist-esm/lib/ui/components/OfflineIndicator/OfflineIndicator.mjs.map +7 -0
- package/dist-esm/lib/ui/components/PageMenu/PageItemInput.mjs +43 -0
- package/dist-esm/lib/ui/components/PageMenu/PageItemInput.mjs.map +7 -0
- package/dist-esm/lib/ui/components/PageMenu/PageItemSubmenu.mjs +58 -0
- package/dist-esm/lib/ui/components/PageMenu/PageItemSubmenu.mjs.map +7 -0
- package/dist-esm/lib/ui/components/PageMenu/PageMenu.mjs +381 -0
- package/dist-esm/lib/ui/components/PageMenu/PageMenu.mjs.map +7 -0
- package/dist-esm/lib/ui/components/PageMenu/edit-pages-shared.mjs +29 -0
- package/dist-esm/lib/ui/components/PageMenu/edit-pages-shared.mjs.map +7 -0
- package/dist-esm/lib/ui/components/PenModeToggle.mjs +25 -0
- package/dist-esm/lib/ui/components/PenModeToggle.mjs.map +7 -0
- package/dist-esm/lib/ui/components/RedoButton.mjs +29 -0
- package/dist-esm/lib/ui/components/RedoButton.mjs.map +7 -0
- package/dist-esm/lib/ui/components/Spinner.mjs +21 -0
- package/dist-esm/lib/ui/components/Spinner.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StopFollowing.mjs +25 -0
- package/dist-esm/lib/ui/components/StopFollowing.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs +108 -0
- package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs +59 -0
- package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/StylePanel.mjs +297 -0
- package/dist-esm/lib/ui/components/StylePanel/StylePanel.mjs.map +7 -0
- package/dist-esm/lib/ui/components/StylePanel/styles.mjs +99 -0
- package/dist-esm/lib/ui/components/StylePanel/styles.mjs.map +7 -0
- package/dist-esm/lib/ui/components/Toasts.mjs +71 -0
- package/dist-esm/lib/ui/components/Toasts.mjs.map +7 -0
- package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs +43 -0
- package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs.map +7 -0
- package/dist-esm/lib/ui/components/Toolbar/Toolbar.mjs +217 -0
- package/dist-esm/lib/ui/components/Toolbar/Toolbar.mjs.map +7 -0
- package/dist-esm/lib/ui/components/TrashButton.mjs +31 -0
- package/dist-esm/lib/ui/components/TrashButton.mjs.map +7 -0
- package/dist-esm/lib/ui/components/UndoButton.mjs +29 -0
- package/dist-esm/lib/ui/components/UndoButton.mjs.map +7 -0
- package/dist-esm/lib/ui/components/primitives/Button.mjs +49 -0
- package/dist-esm/lib/ui/components/primitives/Button.mjs.map +7 -0
- package/dist-esm/lib/ui/components/primitives/ButtonPicker.mjs +96 -0
- package/dist-esm/lib/ui/components/primitives/ButtonPicker.mjs.map +7 -0
- package/dist-esm/lib/ui/components/primitives/Dialog.mjs +40 -0
- package/dist-esm/lib/ui/components/primitives/Dialog.mjs.map +7 -0
- package/dist-esm/lib/ui/components/primitives/DropdownMenu.mjs +157 -0
- package/dist-esm/lib/ui/components/primitives/DropdownMenu.mjs.map +7 -0
- package/dist-esm/lib/ui/components/primitives/Icon.mjs +41 -0
- package/dist-esm/lib/ui/components/primitives/Icon.mjs.map +7 -0
- package/dist-esm/lib/ui/components/primitives/Input.mjs +125 -0
- package/dist-esm/lib/ui/components/primitives/Input.mjs.map +7 -0
- package/dist-esm/lib/ui/components/primitives/Kbd.mjs +9 -0
- package/dist-esm/lib/ui/components/primitives/Kbd.mjs.map +7 -0
- package/dist-esm/lib/ui/components/primitives/Popover.mjs +39 -0
- package/dist-esm/lib/ui/components/primitives/Popover.mjs.map +7 -0
- package/dist-esm/lib/ui/components/primitives/Slider.mjs +49 -0
- package/dist-esm/lib/ui/components/primitives/Slider.mjs.map +7 -0
- package/dist-esm/lib/ui/components/primitives/shared.mjs +24 -0
- package/dist-esm/lib/ui/components/primitives/shared.mjs.map +7 -0
- package/dist-esm/lib/ui/constants.mjs +5 -0
- package/dist-esm/lib/ui/constants.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/clipboard/pasteExcalidrawContent.mjs +444 -0
- package/dist-esm/lib/ui/hooks/clipboard/pasteExcalidrawContent.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/clipboard/pasteFiles.mjs +17 -0
- package/dist-esm/lib/ui/hooks/clipboard/pasteFiles.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/clipboard/pasteTldrawContent.mjs +12 -0
- package/dist-esm/lib/ui/hooks/clipboard/pasteTldrawContent.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/clipboard/pasteUrl.mjs +28 -0
- package/dist-esm/lib/ui/hooks/clipboard/pasteUrl.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/menuHelpers.mjs +157 -0
- package/dist-esm/lib/ui/hooks/menuHelpers.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useActions.mjs +1132 -0
- package/dist-esm/lib/ui/hooks/useActions.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useActionsMenuSchema.mjs +87 -0
- package/dist-esm/lib/ui/hooks/useActionsMenuSchema.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useAssetUrls.mjs +21 -0
- package/dist-esm/lib/ui/hooks/useAssetUrls.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useBreakpoint.mjs +34 -0
- package/dist-esm/lib/ui/hooks/useBreakpoint.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useCanRedo.mjs +9 -0
- package/dist-esm/lib/ui/hooks/useCanRedo.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useCanUndo.mjs +9 -0
- package/dist-esm/lib/ui/hooks/useCanUndo.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs +448 -0
- package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useContextMenuSchema.mjs +208 -0
- package/dist-esm/lib/ui/hooks/useContextMenuSchema.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useCopyAs.mjs +27 -0
- package/dist-esm/lib/ui/hooks/useCopyAs.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useDialogsProvider.mjs +88 -0
- package/dist-esm/lib/ui/hooks/useDialogsProvider.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useEditorEvents.mjs +23 -0
- package/dist-esm/lib/ui/hooks/useEditorEvents.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useEventsProvider.mjs +17 -0
- package/dist-esm/lib/ui/hooks/useEventsProvider.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useExportAs.mjs +31 -0
- package/dist-esm/lib/ui/hooks/useExportAs.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useHasLinkShapeSelected.mjs +16 -0
- package/dist-esm/lib/ui/hooks/useHasLinkShapeSelected.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useHelpMenuSchema.mjs +73 -0
- package/dist-esm/lib/ui/hooks/useHelpMenuSchema.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useHighDpiCanvas.mjs +15 -0
- package/dist-esm/lib/ui/hooks/useHighDpiCanvas.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useInsertMedia.mjs +37 -0
- package/dist-esm/lib/ui/hooks/useInsertMedia.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs +108 -0
- package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useKeyboardShortcutsSchema.mjs +104 -0
- package/dist-esm/lib/ui/hooks/useKeyboardShortcutsSchema.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useLocalStorageState.mjs +29 -0
- package/dist-esm/lib/ui/hooks/useLocalStorageState.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useMenuIsOpen.mjs +54 -0
- package/dist-esm/lib/ui/hooks/useMenuIsOpen.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useMenuSchema.mjs +239 -0
- package/dist-esm/lib/ui/hooks/useMenuSchema.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useOnlyFlippableShape.mjs +21 -0
- package/dist-esm/lib/ui/hooks/useOnlyFlippableShape.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/usePreloadAssets.mjs +86 -0
- package/dist-esm/lib/ui/hooks/usePreloadAssets.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/usePreloadIcons.mjs +31 -0
- package/dist-esm/lib/ui/hooks/usePreloadIcons.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/usePrint.mjs +200 -0
- package/dist-esm/lib/ui/hooks/usePrint.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useReadonly.mjs +9 -0
- package/dist-esm/lib/ui/hooks/useReadonly.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useRevelantStyles.mjs +33 -0
- package/dist-esm/lib/ui/hooks/useRevelantStyles.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useShowAutoSizeToggle.mjs +16 -0
- package/dist-esm/lib/ui/hooks/useShowAutoSizeToggle.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useToastsProvider.mjs +33 -0
- package/dist-esm/lib/ui/hooks/useToastsProvider.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useToolbarSchema.mjs +69 -0
- package/dist-esm/lib/ui/hooks/useToolbarSchema.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useTools.mjs +205 -0
- package/dist-esm/lib/ui/hooks/useTools.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useTranslation/TLUiTranslationKey.mjs +1 -0
- package/dist-esm/lib/ui/hooks/useTranslation/TLUiTranslationKey.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +357 -0
- package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useTranslation/translations.mjs +47 -0
- package/dist-esm/lib/ui/hooks/useTranslation/translations.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useTranslation/useLanguages.mjs +12 -0
- package/dist-esm/lib/ui/hooks/useTranslation/useLanguages.mjs.map +7 -0
- package/dist-esm/lib/ui/hooks/useTranslation/useTranslation.mjs +71 -0
- package/dist-esm/lib/ui/hooks/useTranslation/useTranslation.mjs.map +7 -0
- package/dist-esm/lib/ui/icon-types.mjs +170 -0
- package/dist-esm/lib/ui/icon-types.mjs.map +7 -0
- package/dist-esm/lib/ui/overrides.mjs +158 -0
- package/dist-esm/lib/ui/overrides.mjs.map +7 -0
- package/dist-esm/lib/ui/version.mjs +5 -0
- package/dist-esm/lib/ui/version.mjs.map +7 -0
- package/dist-esm/lib/utils/assets/assets.mjs +61 -0
- package/dist-esm/lib/utils/assets/assets.mjs.map +7 -0
- package/dist-esm/lib/utils/assets/is-gif-animated.mjs +54 -0
- package/dist-esm/lib/utils/assets/is-gif-animated.mjs.map +7 -0
- package/dist-esm/lib/utils/assets.mjs +61 -0
- package/dist-esm/lib/utils/assets.mjs.map +7 -0
- package/dist-esm/lib/utils/embeds/embeds.mjs +65 -0
- package/dist-esm/lib/utils/embeds/embeds.mjs.map +7 -0
- package/dist-esm/lib/utils/export/copyAs.mjs +96 -0
- package/dist-esm/lib/utils/export/copyAs.mjs.map +7 -0
- package/dist-esm/lib/utils/export/export.mjs +97 -0
- package/dist-esm/lib/utils/export/export.mjs.map +7 -0
- package/dist-esm/lib/utils/export/exportAs.mjs +68 -0
- package/dist-esm/lib/utils/export/exportAs.mjs.map +7 -0
- package/dist-esm/lib/utils/frames/frames.mjs +76 -0
- package/dist-esm/lib/utils/frames/frames.mjs.map +7 -0
- package/dist-esm/lib/utils/static-assets/assetUrls.mjs +28 -0
- package/dist-esm/lib/utils/static-assets/assetUrls.mjs.map +7 -0
- package/dist-esm/lib/utils/text/text.mjs +37 -0
- package/dist-esm/lib/utils/text/text.mjs.map +7 -0
- package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs +779 -0
- package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs.map +7 -0
- package/dist-esm/lib/utils/tldr/file.mjs +219 -0
- package/dist-esm/lib/utils/tldr/file.mjs.map +7 -0
- package/package.json +105 -0
- package/src/index.ts +174 -0
- package/src/lib/Tldraw.test.tsx +78 -0
- package/src/lib/Tldraw.tsx +179 -0
- package/src/lib/canvas/TldrawCropHandles.tsx +126 -0
- package/src/lib/canvas/TldrawHandles.tsx +15 -0
- package/src/lib/canvas/TldrawHoveredShapeIndicator.tsx +30 -0
- package/src/lib/canvas/TldrawScribble.tsx +45 -0
- package/src/lib/canvas/TldrawSelectionBackground.tsx +29 -0
- package/src/lib/canvas/TldrawSelectionForeground.tsx +526 -0
- package/src/lib/defaultExternalContentHandlers.ts +533 -0
- package/src/lib/defaultShapeTools.ts +20 -0
- package/src/lib/defaultShapeUtils.ts +29 -0
- package/src/lib/defaultSideEffects.ts +48 -0
- package/src/lib/defaultTools.ts +8 -0
- package/src/lib/shapes/arrow/ArrowShapeTool.test.ts +558 -0
- package/src/lib/shapes/arrow/ArrowShapeTool.ts +12 -0
- package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +595 -0
- package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +1036 -0
- package/src/lib/shapes/arrow/components/ArrowTextLabel.tsx +87 -0
- package/src/lib/shapes/arrow/toolStates/Idle.ts +37 -0
- package/src/lib/shapes/arrow/toolStates/Pointing.ts +190 -0
- package/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx +196 -0
- package/src/lib/shapes/draw/DrawShapeTool.test.ts +52 -0
- package/src/lib/shapes/draw/DrawShapeTool.ts +17 -0
- package/src/lib/shapes/draw/DrawShapeUtil.tsx +298 -0
- package/src/lib/shapes/draw/getPath.ts +108 -0
- package/src/lib/shapes/draw/toolStates/Drawing.ts +722 -0
- package/src/lib/shapes/draw/toolStates/Idle.ts +17 -0
- package/src/lib/shapes/embed/EmbedShapeUtil.tsx +218 -0
- package/src/lib/shapes/frame/FrameShapeTool.test.ts +169 -0
- package/src/lib/shapes/frame/FrameShapeTool.ts +53 -0
- package/src/lib/shapes/frame/FrameShapeUtil.tsx +258 -0
- package/src/lib/shapes/frame/components/FrameHeading.tsx +115 -0
- package/src/lib/shapes/frame/components/FrameLabelInput.tsx +85 -0
- package/src/lib/shapes/geo/GeoShapeTool.test.ts +191 -0
- package/src/lib/shapes/geo/GeoShapeTool.ts +11 -0
- package/src/lib/shapes/geo/GeoShapeUtil.tsx +1153 -0
- package/src/lib/shapes/geo/cloudOutline.ts +391 -0
- package/src/lib/shapes/geo/components/DashStyleCloud.tsx +135 -0
- package/src/lib/shapes/geo/components/DashStyleEllipse.tsx +117 -0
- package/src/lib/shapes/geo/components/DashStyleOval.tsx +102 -0
- package/src/lib/shapes/geo/components/DashStylePolygon.tsx +152 -0
- package/src/lib/shapes/geo/components/DrawStyleCloud.tsx +65 -0
- package/src/lib/shapes/geo/components/DrawStyleEllipse.tsx +145 -0
- package/src/lib/shapes/geo/components/DrawStylePolygon.tsx +263 -0
- package/src/lib/shapes/geo/components/SolidStyleCloud.tsx +65 -0
- package/src/lib/shapes/geo/components/SolidStyleEllipse.tsx +68 -0
- package/src/lib/shapes/geo/components/SolidStyleOval.tsx +83 -0
- package/src/lib/shapes/geo/components/SolidStylePolygon.tsx +77 -0
- package/src/lib/shapes/geo/helpers.ts +34 -0
- package/src/lib/shapes/geo/toolStates/Idle.ts +38 -0
- package/src/lib/shapes/geo/toolStates/Pointing.ts +131 -0
- package/src/lib/shapes/highlight/HighlightShapeTool.test.ts +3 -0
- package/src/lib/shapes/highlight/HighlightShapeTool.ts +17 -0
- package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +255 -0
- package/src/lib/shapes/image/ImageShapeUtil.tsx +313 -0
- package/src/lib/shapes/line/LineShapeTool.test.ts +228 -0
- package/src/lib/shapes/line/LineShapeTool.ts +12 -0
- package/src/lib/shapes/line/LineShapeUtil.test.ts +222 -0
- package/src/lib/shapes/line/LineShapeUtil.tsx +421 -0
- package/src/lib/shapes/line/__snapshots__/LineShapeUtil.test.ts.snap +41 -0
- package/src/lib/shapes/line/components/getLinePath.ts +91 -0
- package/src/lib/shapes/line/components/svg.ts +62 -0
- package/src/lib/shapes/line/toolStates/Idle.ts +20 -0
- package/src/lib/shapes/line/toolStates/Pointing.ts +165 -0
- package/src/lib/shapes/note/NoteShapeTool.test.ts +146 -0
- package/src/lib/shapes/note/NoteShapeTool.ts +11 -0
- package/src/lib/shapes/note/NoteShapeUtil.tsx +221 -0
- package/src/lib/shapes/note/toolStates/Idle.ts +17 -0
- package/src/lib/shapes/note/toolStates/Pointing.ts +121 -0
- package/src/lib/shapes/shared/HyperlinkButton.tsx +30 -0
- package/src/lib/shapes/shared/ShapeFill.tsx +113 -0
- package/src/lib/shapes/shared/TextHelpers.ts +289 -0
- package/src/lib/shapes/shared/TextLabel.tsx +131 -0
- package/src/lib/shapes/shared/createTextSvgElementFromSpans.ts +101 -0
- package/src/lib/shapes/shared/default-shape-constants.ts +57 -0
- package/src/lib/shapes/shared/defaultStyleDefs.tsx +276 -0
- package/src/lib/shapes/shared/freehand/getStroke.ts +23 -0
- package/src/lib/shapes/shared/freehand/getStrokeOutlinePoints.ts +333 -0
- package/src/lib/shapes/shared/freehand/getStrokePoints.ts +187 -0
- package/src/lib/shapes/shared/freehand/getStrokeRadius.ts +13 -0
- package/src/lib/shapes/shared/freehand/setStrokePointRadii.ts +127 -0
- package/src/lib/shapes/shared/freehand/svg.ts +50 -0
- package/src/lib/shapes/shared/freehand/svgInk.ts +195 -0
- package/src/lib/shapes/shared/freehand/types.ts +49 -0
- package/src/lib/shapes/shared/getBrowserCanvasMaxSize.tsx +28 -0
- package/src/lib/shapes/shared/getPerfectDashProps.ts +96 -0
- package/src/lib/shapes/shared/getTextLabelSvgElement.ts +42 -0
- package/src/lib/shapes/shared/legacyProps.ts +25 -0
- package/src/lib/shapes/shared/polygon-helpers.ts +131 -0
- package/src/lib/shapes/shared/resizeBox.ts +130 -0
- package/src/lib/shapes/shared/resizeScaled.ts +40 -0
- package/src/lib/shapes/shared/rotated-box-shadow.ts +29 -0
- package/src/lib/shapes/shared/useColorSpace.tsx +21 -0
- package/src/lib/shapes/shared/useEditableText.ts +211 -0
- package/src/lib/shapes/shared/useForceSolid.ts +6 -0
- package/src/lib/shapes/shared/usePrefersReducedMotion.tsx +18 -0
- package/src/lib/shapes/text/TextShapeTool.test.ts +157 -0
- package/src/lib/shapes/text/TextShapeTool.ts +11 -0
- package/src/lib/shapes/text/TextShapeUtil.tsx +401 -0
- package/src/lib/shapes/text/toolStates/Idle.ts +47 -0
- package/src/lib/shapes/text/toolStates/Pointing.ts +105 -0
- package/src/lib/shapes/video/VideoShapeUtil.tsx +215 -0
- package/src/lib/tools/EraserTool/EraserTool.ts +15 -0
- package/src/lib/tools/EraserTool/childStates/Erasing.ts +131 -0
- package/src/lib/tools/EraserTool/childStates/Idle.ts +13 -0
- package/src/lib/tools/EraserTool/childStates/Pointing.ts +93 -0
- package/src/lib/tools/HandTool/HandTool.ts +40 -0
- package/src/lib/tools/HandTool/childStates/Dragging.ts +45 -0
- package/src/lib/tools/HandTool/childStates/Idle.ts +17 -0
- package/src/lib/tools/HandTool/childStates/Pointing.ts +39 -0
- package/src/lib/tools/LaserTool/LaserTool.ts +14 -0
- package/src/lib/tools/LaserTool/childStates/Idle.ts +9 -0
- package/src/lib/tools/LaserTool/childStates/Lasering.ts +53 -0
- package/src/lib/tools/SelectTool/DragAndDropManager.ts +112 -0
- package/src/lib/tools/SelectTool/SelectTool.ts +49 -0
- package/src/lib/tools/SelectTool/childStates/Brushing.ts +206 -0
- package/src/lib/tools/SelectTool/childStates/Crop/Crop.ts +10 -0
- package/src/lib/tools/SelectTool/childStates/Crop/children/Idle.ts +217 -0
- package/src/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.ts +19 -0
- package/src/lib/tools/SelectTool/childStates/Crop/children/TranslatingCrop.ts +108 -0
- package/src/lib/tools/SelectTool/childStates/Crop/children/crop_helpers.ts +64 -0
- package/src/lib/tools/SelectTool/childStates/Crop/crop-constants.ts +2 -0
- package/src/lib/tools/SelectTool/childStates/Cropping.ts +249 -0
- package/src/lib/tools/SelectTool/childStates/DraggingHandle.ts +308 -0
- package/src/lib/tools/SelectTool/childStates/EditingShape.ts +130 -0
- package/src/lib/tools/SelectTool/childStates/Idle.ts +575 -0
- package/src/lib/tools/SelectTool/childStates/PointingCanvas.ts +41 -0
- package/src/lib/tools/SelectTool/childStates/PointingCropHandle.ts +83 -0
- package/src/lib/tools/SelectTool/childStates/PointingHandle.ts +56 -0
- package/src/lib/tools/SelectTool/childStates/PointingResizeHandle.ts +90 -0
- package/src/lib/tools/SelectTool/childStates/PointingRotateHandle.ts +76 -0
- package/src/lib/tools/SelectTool/childStates/PointingSelection.ts +71 -0
- package/src/lib/tools/SelectTool/childStates/PointingShape.ts +218 -0
- package/src/lib/tools/SelectTool/childStates/Resizing.ts +511 -0
- package/src/lib/tools/SelectTool/childStates/Rotating.ts +175 -0
- package/src/lib/tools/SelectTool/childStates/ScribbleBrushing.ts +167 -0
- package/src/lib/tools/SelectTool/childStates/Translating.ts +418 -0
- package/src/lib/tools/SelectTool/children/DraggingHandle.ts +308 -0
- package/src/lib/tools/ZoomTool/ZoomTool.ts +72 -0
- package/src/lib/tools/ZoomTool/childStates/Idle.ts +15 -0
- package/src/lib/tools/ZoomTool/childStates/Pointing.ts +39 -0
- package/src/lib/tools/ZoomTool/childStates/ZoomBrushing.ts +62 -0
- package/src/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.ts +20 -0
- package/src/lib/tools/selection-logic/getShouldEnterCropModeOnPointerDown.ts +10 -0
- package/src/lib/tools/selection-logic/selectOnCanvasPointerUp.ts +94 -0
- package/src/lib/tools/selection-logic/selection.tldr +1041 -0
- package/src/lib/tools/selection-logic/updateHoveredId.ts +32 -0
- package/src/lib/ui/TldrawUi.tsx +195 -0
- package/src/lib/ui/TldrawUiContextProvider.tsx +99 -0
- package/src/lib/ui/assetUrls.ts +57 -0
- package/src/lib/ui/components/ActionsMenu.tsx +75 -0
- package/src/lib/ui/components/BackToContent.tsx +55 -0
- package/src/lib/ui/components/ContextMenu.tsx +234 -0
- package/src/lib/ui/components/DebugPanel.tsx +355 -0
- package/src/lib/ui/components/Dialogs.tsx +52 -0
- package/src/lib/ui/components/DuplicateButton.tsx +23 -0
- package/src/lib/ui/components/EditLinkDialog.tsx +180 -0
- package/src/lib/ui/components/EmbedDialog.tsx +143 -0
- package/src/lib/ui/components/FollowingIndicator.tsx +16 -0
- package/src/lib/ui/components/HTMLCanvas.tsx +54 -0
- package/src/lib/ui/components/HelpMenu.tsx +109 -0
- package/src/lib/ui/components/KeyboardShortcutsDialog.tsx +62 -0
- package/src/lib/ui/components/LanguageMenu.tsx +38 -0
- package/src/lib/ui/components/Menu.tsx +129 -0
- package/src/lib/ui/components/MenuZone.tsx +35 -0
- package/src/lib/ui/components/MobileStylePanel.tsx +61 -0
- package/src/lib/ui/components/MoveToPageMenu.tsx +104 -0
- package/src/lib/ui/components/NavigationZone/Minimap.tsx +245 -0
- package/src/lib/ui/components/NavigationZone/MinimapManager.ts +382 -0
- package/src/lib/ui/components/NavigationZone/NavigationZone.tsx +81 -0
- package/src/lib/ui/components/NavigationZone/ZoomMenu.tsx +87 -0
- package/src/lib/ui/components/OfflineIndicator/OfflineIndicator.tsx +17 -0
- package/src/lib/ui/components/PageMenu/PageItemInput.tsx +46 -0
- package/src/lib/ui/components/PageMenu/PageItemSubmenu.tsx +86 -0
- package/src/lib/ui/components/PageMenu/PageMenu.tsx +415 -0
- package/src/lib/ui/components/PageMenu/edit-pages-shared.ts +32 -0
- package/src/lib/ui/components/PenModeToggle.tsx +24 -0
- package/src/lib/ui/components/RedoButton.tsx +26 -0
- package/src/lib/ui/components/Spinner.tsx +22 -0
- package/src/lib/ui/components/StopFollowing.tsx +23 -0
- package/src/lib/ui/components/StylePanel/DoubleDropdownPicker.tsx +150 -0
- package/src/lib/ui/components/StylePanel/DropdownPicker.tsx +76 -0
- package/src/lib/ui/components/StylePanel/StylePanel.tsx +332 -0
- package/src/lib/ui/components/StylePanel/styles.tsx +100 -0
- package/src/lib/ui/components/Toasts.tsx +104 -0
- package/src/lib/ui/components/Toolbar/ToggleToolLockedButton.tsx +45 -0
- package/src/lib/ui/components/Toolbar/Toolbar.tsx +281 -0
- package/src/lib/ui/components/TrashButton.tsx +28 -0
- package/src/lib/ui/components/UndoButton.tsx +26 -0
- package/src/lib/ui/components/primitives/Button.tsx +69 -0
- package/src/lib/ui/components/primitives/ButtonPicker.tsx +128 -0
- package/src/lib/ui/components/primitives/Dialog.tsx +57 -0
- package/src/lib/ui/components/primitives/DropdownMenu.tsx +229 -0
- package/src/lib/ui/components/primitives/Icon.tsx +55 -0
- package/src/lib/ui/components/primitives/Input.tsx +165 -0
- package/src/lib/ui/components/primitives/Kbd.tsx +17 -0
- package/src/lib/ui/components/primitives/Popover.tsx +61 -0
- package/src/lib/ui/components/primitives/Slider.tsx +62 -0
- package/src/lib/ui/components/primitives/shared.ts +40 -0
- package/src/lib/ui/constants.ts +2 -0
- package/src/lib/ui/hooks/clipboard/pasteExcalidrawContent.ts +514 -0
- package/src/lib/ui/hooks/clipboard/pasteFiles.ts +31 -0
- package/src/lib/ui/hooks/clipboard/pasteTldrawContent.ts +19 -0
- package/src/lib/ui/hooks/clipboard/pasteUrl.ts +44 -0
- package/src/lib/ui/hooks/menuHelpers.ts +247 -0
- package/src/lib/ui/hooks/useActions.tsx +1180 -0
- package/src/lib/ui/hooks/useActionsMenuSchema.tsx +123 -0
- package/src/lib/ui/hooks/useAssetUrls.tsx +28 -0
- package/src/lib/ui/hooks/useBreakpoint.tsx +42 -0
- package/src/lib/ui/hooks/useCanRedo.ts +7 -0
- package/src/lib/ui/hooks/useCanUndo.ts +7 -0
- package/src/lib/ui/hooks/useClipboardEvents.ts +705 -0
- package/src/lib/ui/hooks/useContextMenuSchema.tsx +260 -0
- package/src/lib/ui/hooks/useCopyAs.ts +26 -0
- package/src/lib/ui/hooks/useDialogsProvider.tsx +128 -0
- package/src/lib/ui/hooks/useEditorEvents.ts +23 -0
- package/src/lib/ui/hooks/useEventsProvider.tsx +129 -0
- package/src/lib/ui/hooks/useExportAs.ts +30 -0
- package/src/lib/ui/hooks/useHasLinkShapeSelected.ts +17 -0
- package/src/lib/ui/hooks/useHelpMenuSchema.tsx +105 -0
- package/src/lib/ui/hooks/useHighDpiCanvas.ts +14 -0
- package/src/lib/ui/hooks/useInsertMedia.ts +35 -0
- package/src/lib/ui/hooks/useKeyboardShortcuts.ts +121 -0
- package/src/lib/ui/hooks/useKeyboardShortcutsSchema.tsx +127 -0
- package/src/lib/ui/hooks/useLocalStorageState.ts +30 -0
- package/src/lib/ui/hooks/useMenuIsOpen.ts +73 -0
- package/src/lib/ui/hooks/useMenuSchema.tsx +280 -0
- package/src/lib/ui/hooks/useOnlyFlippableShape.ts +29 -0
- package/src/lib/ui/hooks/usePreloadAssets.ts +120 -0
- package/src/lib/ui/hooks/usePreloadIcons.ts +38 -0
- package/src/lib/ui/hooks/usePrint.ts +223 -0
- package/src/lib/ui/hooks/useReadonly.ts +7 -0
- package/src/lib/ui/hooks/useRevelantStyles.ts +38 -0
- package/src/lib/ui/hooks/useShowAutoSizeToggle.ts +17 -0
- package/src/lib/ui/hooks/useToastsProvider.tsx +75 -0
- package/src/lib/ui/hooks/useToolbarSchema.tsx +99 -0
- package/src/lib/ui/hooks/useTools.tsx +245 -0
- package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +356 -0
- package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +367 -0
- package/src/lib/ui/hooks/useTranslation/translations.ts +74 -0
- package/src/lib/ui/hooks/useTranslation/useLanguages.tsx +10 -0
- package/src/lib/ui/hooks/useTranslation/useTranslation.tsx +117 -0
- package/src/lib/ui/icon-types.ts +337 -0
- package/src/lib/ui/overrides.ts +211 -0
- package/src/lib/ui/version.ts +1 -0
- package/src/lib/ui.css +1603 -0
- package/src/lib/utils/assets/assets.ts +103 -0
- package/src/lib/utils/assets/is-gif-animated.ts +106 -0
- package/src/lib/utils/assets.ts +103 -0
- package/src/lib/utils/embeds/embeds.test.ts +612 -0
- package/src/lib/utils/embeds/embeds.ts +99 -0
- package/src/lib/utils/export/copyAs.ts +139 -0
- package/src/lib/utils/export/export.ts +128 -0
- package/src/lib/utils/export/exportAs.ts +94 -0
- package/src/lib/utils/frames/frames.ts +101 -0
- package/src/lib/utils/static-assets/assetUrls.ts +41 -0
- package/src/lib/utils/text/text.test.ts +11 -0
- package/src/lib/utils/text/text.ts +59 -0
- package/src/lib/utils/tldr/buildFromV1Document.ts +1171 -0
- package/src/lib/utils/tldr/file.ts +303 -0
- package/src/test/ClickManager.test.ts +258 -0
- package/src/test/Editor.test.tsx +647 -0
- package/src/test/EraserTool.test.ts +446 -0
- package/src/test/HandTool.test.ts +191 -0
- package/src/test/HighlightShape.test.ts +24 -0
- package/src/test/LaserTool.test.ts +3 -0
- package/src/test/SelectTool.test.ts +445 -0
- package/src/test/TLSessionStateSnapshot.test.ts +152 -0
- package/src/test/TLUserPreferences.test.ts +123 -0
- package/src/test/TestEditor.test.ts +7 -0
- package/src/test/TestEditor.ts +661 -0
- package/src/test/TldrawEditor.test.tsx +377 -0
- package/src/test/ZoomTool.test.ts +210 -0
- package/src/test/__snapshots__/groups.test.ts.snap +46 -0
- package/src/test/__snapshots__/resizing.test.ts.snap +43 -0
- package/src/test/arrowBindingsIndex.test.tsx +295 -0
- package/src/test/arrows-megabus.test.ts +652 -0
- package/src/test/assets.test.ts +38 -0
- package/src/test/bookmark-shapes.test.ts +141 -0
- package/src/test/cleanup.test.ts +127 -0
- package/src/test/commands/__snapshots__/getSvg.test.ts.snap +174 -0
- package/src/test/commands/__snapshots__/packShapes.test.ts.snap +185 -0
- package/src/test/commands/__snapshots__/zoomToFit.test.ts.snap +12 -0
- package/src/test/commands/alignShapes.test.tsx +388 -0
- package/src/test/commands/allShapesCommonBounds.test.ts +91 -0
- package/src/test/commands/animateShapes.test.ts +3 -0
- package/src/test/commands/animateToShape.test.ts +3 -0
- package/src/test/commands/animationSpeed.test.ts +38 -0
- package/src/test/commands/blur.test.ts +3 -0
- package/src/test/commands/cancel.test.ts +3 -0
- package/src/test/commands/centerOnPoint.test.ts +21 -0
- package/src/test/commands/clipboard.test.ts +481 -0
- package/src/test/commands/complete.test.ts +3 -0
- package/src/test/commands/createPage.test.ts +65 -0
- package/src/test/commands/createShapes.test.ts +141 -0
- package/src/test/commands/deletePage.test.ts +79 -0
- package/src/test/commands/deleteShapes.test.ts +113 -0
- package/src/test/commands/distributeShapes.test.ts +232 -0
- package/src/test/commands/duplicatePage.test.ts +55 -0
- package/src/test/commands/getContent.test.ts +9 -0
- package/src/test/commands/getInitialMetaForShape.test.ts +21 -0
- package/src/test/commands/getSvg.test.ts +110 -0
- package/src/test/commands/groupShapes.test.ts +42 -0
- package/src/test/commands/guide.md +12 -0
- package/src/test/commands/interrupt.test.ts +3 -0
- package/src/test/commands/lockShapes.test.ts +176 -0
- package/src/test/commands/moveShapesToPage.test.ts +254 -0
- package/src/test/commands/nudge.test.ts +292 -0
- package/src/test/commands/packShapes.test.ts +62 -0
- package/src/test/commands/pageToScreen.test.ts +25 -0
- package/src/test/commands/pan.test.ts +32 -0
- package/src/test/commands/penmode.test.ts +27 -0
- package/src/test/commands/pinch.test.ts +11 -0
- package/src/test/commands/putContent.test.ts +39 -0
- package/src/test/commands/reorderShapes.test.ts +950 -0
- package/src/test/commands/reparentShapesById.test.ts +162 -0
- package/src/test/commands/resetZoom.test.ts +30 -0
- package/src/test/commands/resizeShape.test.ts +58 -0
- package/src/test/commands/rotateShapes.test.ts +82 -0
- package/src/test/commands/screenToPage.test.ts +246 -0
- package/src/test/commands/setAppState.test.ts +9 -0
- package/src/test/commands/setBrush.test.ts +38 -0
- package/src/test/commands/setCurrentPage.test.ts +88 -0
- package/src/test/commands/setPageState.test.ts +9 -0
- package/src/test/commands/setSelectedIds.test.ts +57 -0
- package/src/test/commands/setSelectedTool.test.ts +23 -0
- package/src/test/commands/setSettings.test.ts +9 -0
- package/src/test/commands/setStyle.test.ts +11 -0
- package/src/test/commands/squash.test.ts +13 -0
- package/src/test/commands/stackShapes.test.ts +227 -0
- package/src/test/commands/stretch.test.tsx +245 -0
- package/src/test/commands/ungroup.test.ts +17 -0
- package/src/test/commands/updateShapes.test.ts +192 -0
- package/src/test/commands/updateViewportPageBounds.test.ts +123 -0
- package/src/test/commands/zoomIn.test.ts +43 -0
- package/src/test/commands/zoomOut.test.ts +31 -0
- package/src/test/commands/zoomToBounds.test.ts +50 -0
- package/src/test/commands/zoomToFit.test.ts +20 -0
- package/src/test/commands/zoomToSelection.test.ts +42 -0
- package/src/test/cropping.test.ts +1033 -0
- package/src/test/drawing.test.ts +262 -0
- package/src/test/duplicate.test.ts +217 -0
- package/src/test/flipShapes.test.ts +581 -0
- package/src/test/frames.test.ts +995 -0
- package/src/test/getShapeAtPoint.test.ts +168 -0
- package/src/test/getSnapLines.ts +25 -0
- package/src/test/groups.test.ts +2005 -0
- package/src/test/middleMouseButtonPanning.test.ts +31 -0
- package/src/test/modifiers.test.ts +36 -0
- package/src/test/panning.test.ts +25 -0
- package/src/test/parentsToChildrenWithIndexes.test.ts +117 -0
- package/src/test/paste.test.ts +494 -0
- package/src/test/renderingShapes.test.tsx +223 -0
- package/src/test/resizeBox.test.ts +106 -0
- package/src/test/resizing.test.ts +3901 -0
- package/src/test/rotating.test.ts +321 -0
- package/src/test/roundedBox.ts +13 -0
- package/src/test/select.test.tsx +172 -0
- package/src/test/selection-omnibus.test.ts +1710 -0
- package/src/test/shapeIdsInCurrentPage.test.ts +75 -0
- package/src/test/shapeutils.test.ts +204 -0
- package/src/test/spacebarPanning.test.ts +50 -0
- package/src/test/styles2.test.tsx +199 -0
- package/src/test/styles3.test.ts +70 -0
- package/src/test/test-jsx.tsx +134 -0
- package/src/test/testutils/getSnapLines.ts +25 -0
- package/src/test/testutils/roundedBox.ts +13 -0
- package/src/test/text.test.ts +269 -0
- package/src/test/translating-snapping.test.ts +584 -0
- package/src/test/translating.test.ts +1829 -0
- package/src/test/viewport-following.test.ts +18 -0
- package/tldraw.css +3264 -0
|
@@ -0,0 +1,2954 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
|
|
3
|
+
import { ArrayOfValidator } from '@bigbluebutton/editor';
|
|
4
|
+
import { BaseBoxShapeTool } from '@bigbluebutton/editor';
|
|
5
|
+
import { BaseBoxShapeUtil } from '@bigbluebutton/editor';
|
|
6
|
+
import { Box2d } from '@bigbluebutton/editor';
|
|
7
|
+
import { Circle2d } from '@bigbluebutton/editor';
|
|
8
|
+
import { CubicSpline2d } from '@bigbluebutton/editor';
|
|
9
|
+
import { DictValidator } from '@bigbluebutton/editor';
|
|
10
|
+
import { Editor } from '@bigbluebutton/editor';
|
|
11
|
+
import { EMBED_DEFINITIONS } from '@bigbluebutton/editor';
|
|
12
|
+
import { EmbedDefinition } from '@bigbluebutton/editor';
|
|
13
|
+
import { EnumStyleProp } from '@bigbluebutton/editor';
|
|
14
|
+
import { Geometry2d } from '@bigbluebutton/editor';
|
|
15
|
+
import { Group2d } from '@bigbluebutton/editor';
|
|
16
|
+
import { JsonObject } from '@bigbluebutton/editor';
|
|
17
|
+
import { LANGUAGES } from '@bigbluebutton/editor';
|
|
18
|
+
import { Matrix2d } from '@bigbluebutton/editor';
|
|
19
|
+
import { Matrix2dModel } from '@bigbluebutton/editor';
|
|
20
|
+
import { MigrationFailureReason } from '@bigbluebutton/editor';
|
|
21
|
+
import { Migrations } from '@bigbluebutton/editor';
|
|
22
|
+
import { NamedExoticComponent } from 'react';
|
|
23
|
+
import { ObjectValidator } from '@bigbluebutton/editor';
|
|
24
|
+
import { Polygon2d } from '@bigbluebutton/editor';
|
|
25
|
+
import { Polyline2d } from '@bigbluebutton/editor';
|
|
26
|
+
import { default as React_2 } from 'react';
|
|
27
|
+
import * as React_3 from 'react';
|
|
28
|
+
import { ReactNode } from 'react';
|
|
29
|
+
import { Rectangle2d } from '@bigbluebutton/editor';
|
|
30
|
+
import { RecursivePartial } from '@bigbluebutton/editor';
|
|
31
|
+
import { Result } from '@bigbluebutton/editor';
|
|
32
|
+
import { SelectionCorner } from '@bigbluebutton/editor';
|
|
33
|
+
import { SelectionEdge } from '@bigbluebutton/editor';
|
|
34
|
+
import { SelectionHandle } from '@bigbluebutton/editor';
|
|
35
|
+
import { SerializedSchema } from '@bigbluebutton/editor';
|
|
36
|
+
import { ShapeUtil } from '@bigbluebutton/editor';
|
|
37
|
+
import { SnapPoint } from '@bigbluebutton/editor';
|
|
38
|
+
import { StateNode } from '@bigbluebutton/editor';
|
|
39
|
+
import { StoreSnapshot } from '@bigbluebutton/editor';
|
|
40
|
+
import { SvgExportContext } from '@bigbluebutton/editor';
|
|
41
|
+
import { TLAnyShapeUtilConstructor } from '@bigbluebutton/editor';
|
|
42
|
+
import { TLArrowShape } from '@bigbluebutton/editor';
|
|
43
|
+
import { TLAssetId } from '@bigbluebutton/editor';
|
|
44
|
+
import { TLBaseEventInfo } from '@bigbluebutton/editor';
|
|
45
|
+
import { TLBookmarkShape } from '@bigbluebutton/editor';
|
|
46
|
+
import { TLCancelEvent } from '@bigbluebutton/editor';
|
|
47
|
+
import { TLClickEvent } from '@bigbluebutton/editor';
|
|
48
|
+
import { TLClickEventInfo } from '@bigbluebutton/editor';
|
|
49
|
+
import { TLDefaultSizeStyle } from '@bigbluebutton/editor';
|
|
50
|
+
import { TldrawEditorBaseProps } from '@bigbluebutton/editor';
|
|
51
|
+
import { TLDrawShape } from '@bigbluebutton/editor';
|
|
52
|
+
import { TLDrawShapeSegment } from '@bigbluebutton/editor';
|
|
53
|
+
import { TLEmbedShape } from '@bigbluebutton/editor';
|
|
54
|
+
import { TLEnterEventHandler } from '@bigbluebutton/editor';
|
|
55
|
+
import { TLEventHandlers } from '@bigbluebutton/editor';
|
|
56
|
+
import { TLExitEventHandler } from '@bigbluebutton/editor';
|
|
57
|
+
import { TLFrameShape } from '@bigbluebutton/editor';
|
|
58
|
+
import { TLGeoShape } from '@bigbluebutton/editor';
|
|
59
|
+
import { TLHandle } from '@bigbluebutton/editor';
|
|
60
|
+
import { TLHandlesComponent } from '@bigbluebutton/editor';
|
|
61
|
+
import { TLHighlightShape } from '@bigbluebutton/editor';
|
|
62
|
+
import { TLHoveredShapeIndicatorComponent } from '@bigbluebutton/editor';
|
|
63
|
+
import { TLImageShape } from '@bigbluebutton/editor';
|
|
64
|
+
import { TLInterruptEvent } from '@bigbluebutton/editor';
|
|
65
|
+
import { TLKeyboardEvent } from '@bigbluebutton/editor';
|
|
66
|
+
import { TLKeyboardEventInfo } from '@bigbluebutton/editor';
|
|
67
|
+
import { TLLanguage } from '@bigbluebutton/editor';
|
|
68
|
+
import { TLLineShape } from '@bigbluebutton/editor';
|
|
69
|
+
import { TLNoteShape } from '@bigbluebutton/editor';
|
|
70
|
+
import { TLOnBeforeCreateHandler } from '@bigbluebutton/editor';
|
|
71
|
+
import { TLOnBeforeUpdateHandler } from '@bigbluebutton/editor';
|
|
72
|
+
import { TLOnDoubleClickHandler } from '@bigbluebutton/editor';
|
|
73
|
+
import { TLOnEditEndHandler } from '@bigbluebutton/editor';
|
|
74
|
+
import { TLOnHandleChangeHandler } from '@bigbluebutton/editor';
|
|
75
|
+
import { TLOnResizeEndHandler } from '@bigbluebutton/editor';
|
|
76
|
+
import { TLOnResizeHandler } from '@bigbluebutton/editor';
|
|
77
|
+
import { TLOnTranslateStartHandler } from '@bigbluebutton/editor';
|
|
78
|
+
import { TLParentId } from '@bigbluebutton/editor';
|
|
79
|
+
import { TLPointerEvent } from '@bigbluebutton/editor';
|
|
80
|
+
import { TLPointerEventInfo } from '@bigbluebutton/editor';
|
|
81
|
+
import { TLPointerEventName } from '@bigbluebutton/editor';
|
|
82
|
+
import { TLRecord } from '@bigbluebutton/editor';
|
|
83
|
+
import { TLRotationSnapshot } from '@bigbluebutton/editor';
|
|
84
|
+
import { TLSchema } from '@bigbluebutton/editor';
|
|
85
|
+
import { TLScribbleComponent } from '@bigbluebutton/editor';
|
|
86
|
+
import { TLSelectionBackgroundComponent } from '@bigbluebutton/editor';
|
|
87
|
+
import { TLSelectionForegroundComponent } from '@bigbluebutton/editor';
|
|
88
|
+
import { TLSelectionHandle } from '@bigbluebutton/editor';
|
|
89
|
+
import { TLShape } from '@bigbluebutton/editor';
|
|
90
|
+
import { TLShapeId } from '@bigbluebutton/editor';
|
|
91
|
+
import { TLShapePartial } from '@bigbluebutton/editor';
|
|
92
|
+
import { TLShapeUtilCanvasSvgDef } from '@bigbluebutton/editor';
|
|
93
|
+
import { TLShapeUtilFlag } from '@bigbluebutton/editor';
|
|
94
|
+
import { TLStore } from '@bigbluebutton/editor';
|
|
95
|
+
import { TLStoreWithStatus } from '@bigbluebutton/editor';
|
|
96
|
+
import { TLSvgOptions } from '@bigbluebutton/editor';
|
|
97
|
+
import { TLTextShape } from '@bigbluebutton/editor';
|
|
98
|
+
import { TLUnknownShape } from '@bigbluebutton/editor';
|
|
99
|
+
import { TLVideoShape } from '@bigbluebutton/editor';
|
|
100
|
+
import { UnionValidator } from '@bigbluebutton/editor';
|
|
101
|
+
import { UnknownRecord } from '@bigbluebutton/editor';
|
|
102
|
+
import { Validator } from '@bigbluebutton/editor';
|
|
103
|
+
import { Vec2d } from '@bigbluebutton/editor';
|
|
104
|
+
import { Vec2dModel } from '@bigbluebutton/editor';
|
|
105
|
+
import { VecLike } from '@bigbluebutton/editor';
|
|
106
|
+
|
|
107
|
+
/** @public */
|
|
108
|
+
declare type ActionsMenuSchemaProviderProps = {
|
|
109
|
+
overrides?: (editor: Editor, schema: TLUiActionsMenuSchemaContextType, helpers: {
|
|
110
|
+
actions: ReturnType<typeof useActions>;
|
|
111
|
+
oneSelected: boolean;
|
|
112
|
+
twoSelected: boolean;
|
|
113
|
+
threeSelected: boolean;
|
|
114
|
+
}) => TLUiActionsMenuSchemaContextType;
|
|
115
|
+
children: any;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/** @public */
|
|
119
|
+
declare type ActionsProviderProps = {
|
|
120
|
+
overrides?: (editor: Editor, actions: TLUiActionsContextType, helpers: undefined) => TLUiActionsContextType;
|
|
121
|
+
children: any;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
declare enum AlignStyle {
|
|
125
|
+
Start = "start",
|
|
126
|
+
Middle = "middle",
|
|
127
|
+
End = "end",
|
|
128
|
+
Justify = "justify"
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare interface ArrowBinding extends TLV1Binding {
|
|
132
|
+
handleId: keyof ArrowShape['handles'];
|
|
133
|
+
distance: number;
|
|
134
|
+
point: number[];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
declare interface ArrowShape extends TDBaseShape {
|
|
138
|
+
type: TDShapeType.Arrow;
|
|
139
|
+
bend: number;
|
|
140
|
+
handles: {
|
|
141
|
+
start: TDHandle;
|
|
142
|
+
bend: TDHandle;
|
|
143
|
+
end: TDHandle;
|
|
144
|
+
};
|
|
145
|
+
decorations?: {
|
|
146
|
+
start?: Decoration;
|
|
147
|
+
end?: Decoration;
|
|
148
|
+
middle?: Decoration;
|
|
149
|
+
};
|
|
150
|
+
label?: string;
|
|
151
|
+
labelPoint?: number[];
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** @public */
|
|
155
|
+
export declare class ArrowShapeTool extends StateNode {
|
|
156
|
+
static id: string;
|
|
157
|
+
static initial: string;
|
|
158
|
+
static children: () => (typeof Idle | typeof Pointing)[];
|
|
159
|
+
shapeType: string;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** @public */
|
|
163
|
+
export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
|
|
164
|
+
static type: "arrow";
|
|
165
|
+
static props: {
|
|
166
|
+
labelColor: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
|
|
167
|
+
color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
|
|
168
|
+
fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">;
|
|
169
|
+
dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">;
|
|
170
|
+
size: EnumStyleProp<"l" | "m" | "s" | "xl">;
|
|
171
|
+
arrowheadStart: EnumStyleProp<"arrow" | "bar" | "diamond" | "dot" | "inverted" | "none" | "pipe" | "square" | "triangle">;
|
|
172
|
+
arrowheadEnd: EnumStyleProp<"arrow" | "bar" | "diamond" | "dot" | "inverted" | "none" | "pipe" | "square" | "triangle">;
|
|
173
|
+
font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">;
|
|
174
|
+
start: UnionValidator<"type", {
|
|
175
|
+
binding: ObjectValidator< {
|
|
176
|
+
type: "binding";
|
|
177
|
+
boundShapeId: TLShapeId;
|
|
178
|
+
normalizedAnchor: Vec2dModel;
|
|
179
|
+
isExact: boolean;
|
|
180
|
+
isPrecise: boolean;
|
|
181
|
+
}>;
|
|
182
|
+
point: ObjectValidator< {
|
|
183
|
+
type: "point";
|
|
184
|
+
x: number;
|
|
185
|
+
y: number;
|
|
186
|
+
}>;
|
|
187
|
+
}, never>;
|
|
188
|
+
end: UnionValidator<"type", {
|
|
189
|
+
binding: ObjectValidator< {
|
|
190
|
+
type: "binding";
|
|
191
|
+
boundShapeId: TLShapeId;
|
|
192
|
+
normalizedAnchor: Vec2dModel;
|
|
193
|
+
isExact: boolean;
|
|
194
|
+
isPrecise: boolean;
|
|
195
|
+
}>;
|
|
196
|
+
point: ObjectValidator< {
|
|
197
|
+
type: "point";
|
|
198
|
+
x: number;
|
|
199
|
+
y: number;
|
|
200
|
+
}>;
|
|
201
|
+
}, never>;
|
|
202
|
+
bend: Validator<number>;
|
|
203
|
+
text: Validator<string>;
|
|
204
|
+
};
|
|
205
|
+
static migrations: Migrations;
|
|
206
|
+
canEdit: () => boolean;
|
|
207
|
+
canBind: () => boolean;
|
|
208
|
+
canSnap: () => boolean;
|
|
209
|
+
hideResizeHandles: TLShapeUtilFlag<TLArrowShape>;
|
|
210
|
+
hideRotateHandle: TLShapeUtilFlag<TLArrowShape>;
|
|
211
|
+
hideSelectionBoundsBg: TLShapeUtilFlag<TLArrowShape>;
|
|
212
|
+
hideSelectionBoundsFg: TLShapeUtilFlag<TLArrowShape>;
|
|
213
|
+
getDefaultProps(): TLArrowShape['props'];
|
|
214
|
+
getGeometry(shape: TLArrowShape): Group2d;
|
|
215
|
+
getHandles(shape: TLArrowShape): TLHandle[];
|
|
216
|
+
onHandleChange: TLOnHandleChangeHandler<TLArrowShape>;
|
|
217
|
+
onTranslateStart: TLOnTranslateStartHandler<TLArrowShape>;
|
|
218
|
+
onResize: TLOnResizeHandler<TLArrowShape>;
|
|
219
|
+
onDoubleClickHandle: (shape: TLArrowShape, handle: TLHandle) => TLShapePartial<TLArrowShape> | void;
|
|
220
|
+
component(shape: TLArrowShape): JSX.Element | null;
|
|
221
|
+
indicator(shape: TLArrowShape): JSX.Element | null;
|
|
222
|
+
onEditEnd: TLOnEditEndHandler<TLArrowShape>;
|
|
223
|
+
toSvg(shape: TLArrowShape, ctx: SvgExportContext): SVGGElement;
|
|
224
|
+
getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Excluded from this release type: AssetUrlsProvider */
|
|
228
|
+
|
|
229
|
+
/** @public */
|
|
230
|
+
declare function Body_2({ className, children, style, }: {
|
|
231
|
+
className?: string;
|
|
232
|
+
children: any;
|
|
233
|
+
style?: React.CSSProperties;
|
|
234
|
+
}): JSX.Element;
|
|
235
|
+
|
|
236
|
+
/** @public */
|
|
237
|
+
export declare class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape> {
|
|
238
|
+
static type: "bookmark";
|
|
239
|
+
static props: {
|
|
240
|
+
w: Validator<number>;
|
|
241
|
+
h: Validator<number>;
|
|
242
|
+
assetId: Validator<null | TLAssetId>;
|
|
243
|
+
url: Validator<string>;
|
|
244
|
+
};
|
|
245
|
+
static migrations: Migrations;
|
|
246
|
+
canResize: () => boolean;
|
|
247
|
+
hideSelectionBoundsFg: () => boolean;
|
|
248
|
+
getDefaultProps(): TLBookmarkShape['props'];
|
|
249
|
+
component(shape: TLBookmarkShape): JSX.Element;
|
|
250
|
+
indicator(shape: TLBookmarkShape): JSX.Element;
|
|
251
|
+
onBeforeCreate?: TLOnBeforeCreateHandler<TLBookmarkShape>;
|
|
252
|
+
onBeforeUpdate?: TLOnBeforeUpdateHandler<TLBookmarkShape>;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
declare type BoxWidthHeight = {
|
|
256
|
+
w: number;
|
|
257
|
+
h: number;
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
/** @public */
|
|
261
|
+
export declare function BreakPointProvider({ forceMobile, children, }: {
|
|
262
|
+
forceMobile?: boolean;
|
|
263
|
+
children: any;
|
|
264
|
+
}): JSX.Element;
|
|
265
|
+
|
|
266
|
+
declare class Brushing extends StateNode {
|
|
267
|
+
static id: string;
|
|
268
|
+
info: TLBaseEventInfo & {
|
|
269
|
+
type: "pointer";
|
|
270
|
+
name: TLPointerEventName;
|
|
271
|
+
point: VecLike;
|
|
272
|
+
pointerId: number;
|
|
273
|
+
button: number;
|
|
274
|
+
isPen: boolean;
|
|
275
|
+
} & {
|
|
276
|
+
target: "canvas";
|
|
277
|
+
shape?: undefined;
|
|
278
|
+
} & {
|
|
279
|
+
target: 'canvas';
|
|
280
|
+
};
|
|
281
|
+
brush: Box2d;
|
|
282
|
+
initialSelectedShapeIds: TLShapeId[];
|
|
283
|
+
excludedShapeIds: Set<TLShapeId>;
|
|
284
|
+
initialStartShape: null | TLShape;
|
|
285
|
+
onEnter: (info: TLPointerEventInfo & {
|
|
286
|
+
target: 'canvas';
|
|
287
|
+
}) => void;
|
|
288
|
+
onExit: () => void;
|
|
289
|
+
onPointerMove: () => void;
|
|
290
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
291
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
292
|
+
onCancel?: TLCancelEvent | undefined;
|
|
293
|
+
onKeyDown: TLEventHandlers['onKeyDown'];
|
|
294
|
+
onKeyUp?: TLKeyboardEvent | undefined;
|
|
295
|
+
private complete;
|
|
296
|
+
private hitTestShapes;
|
|
297
|
+
onInterrupt: TLInterruptEvent;
|
|
298
|
+
private handleHit;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/* Excluded from this release type: buildFromV1Document */
|
|
302
|
+
|
|
303
|
+
/** @public */
|
|
304
|
+
export declare const Button: React_3.ForwardRefExoticComponent<TLUiButtonProps & React_3.RefAttributes<HTMLButtonElement>>;
|
|
305
|
+
|
|
306
|
+
/** @public */
|
|
307
|
+
declare function CheckboxItem({ children, onSelect, ...rest }: DropdownMenuCheckboxItemProps): JSX.Element;
|
|
308
|
+
|
|
309
|
+
/** @public */
|
|
310
|
+
declare function CloseButton(): JSX.Element;
|
|
311
|
+
|
|
312
|
+
declare enum ColorStyle {
|
|
313
|
+
White = "white",
|
|
314
|
+
LightGray = "lightGray",
|
|
315
|
+
Gray = "gray",
|
|
316
|
+
Black = "black",
|
|
317
|
+
Green = "green",
|
|
318
|
+
Cyan = "cyan",
|
|
319
|
+
Blue = "blue",
|
|
320
|
+
Indigo = "indigo",
|
|
321
|
+
Violet = "violet",
|
|
322
|
+
Red = "red",
|
|
323
|
+
Orange = "orange",
|
|
324
|
+
Yellow = "yellow"
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/** @public */
|
|
328
|
+
export declare function compactMenuItems<T>(arr: T[]): Exclude<T, false | null | undefined>[];
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Contains the size within the given box size
|
|
332
|
+
*
|
|
333
|
+
* @param originalSize - The size of the asset
|
|
334
|
+
* @param containBoxSize - The container size
|
|
335
|
+
* @returns Adjusted size
|
|
336
|
+
* @public
|
|
337
|
+
*/
|
|
338
|
+
export declare function containBoxSize(originalSize: BoxWidthHeight, containBoxSize: BoxWidthHeight): BoxWidthHeight;
|
|
339
|
+
|
|
340
|
+
/** @public */
|
|
341
|
+
declare function Content({ side, align, sideOffset, alignOffset, children, }: {
|
|
342
|
+
children: any;
|
|
343
|
+
alignOffset?: number;
|
|
344
|
+
sideOffset?: number;
|
|
345
|
+
align?: 'center' | 'end' | 'start';
|
|
346
|
+
side?: 'bottom' | 'left' | 'right' | 'top';
|
|
347
|
+
}): JSX.Element;
|
|
348
|
+
|
|
349
|
+
/** @public */
|
|
350
|
+
export declare const ContextMenu: ({ children }: {
|
|
351
|
+
children: any;
|
|
352
|
+
}) => JSX.Element;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Copy the given shapes to the clipboard.
|
|
356
|
+
*
|
|
357
|
+
* @param editor - The editor instance.
|
|
358
|
+
* @param ids - The ids of the shapes to copy.
|
|
359
|
+
* @param format - The format to copy as.
|
|
360
|
+
* @param opts - Options for the copy.
|
|
361
|
+
*
|
|
362
|
+
* @public
|
|
363
|
+
*/
|
|
364
|
+
export declare function copyAs(editor: Editor, ids: TLShapeId[], format?: TLCopyType, opts?: Partial<TLSvgOptions>): Promise<void>;
|
|
365
|
+
|
|
366
|
+
declare class Crop extends StateNode {
|
|
367
|
+
static id: string;
|
|
368
|
+
static initial: string;
|
|
369
|
+
static children: () => (typeof Idle_10 | typeof PointingCrop | typeof TranslatingCrop)[];
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
declare class Cropping extends StateNode {
|
|
373
|
+
static id: string;
|
|
374
|
+
info: TLBaseEventInfo & {
|
|
375
|
+
type: "pointer";
|
|
376
|
+
name: TLPointerEventName;
|
|
377
|
+
point: VecLike;
|
|
378
|
+
pointerId: number;
|
|
379
|
+
button: number;
|
|
380
|
+
isPen: boolean;
|
|
381
|
+
} & {
|
|
382
|
+
target: "selection";
|
|
383
|
+
handle?: TLSelectionHandle | undefined;
|
|
384
|
+
shape?: undefined;
|
|
385
|
+
} & {
|
|
386
|
+
target: 'selection';
|
|
387
|
+
handle: SelectionHandle;
|
|
388
|
+
onInteractionEnd?: string | undefined;
|
|
389
|
+
};
|
|
390
|
+
markId: string;
|
|
391
|
+
private snapshot;
|
|
392
|
+
onEnter: TLEnterEventHandler;
|
|
393
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
394
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
395
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
396
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
397
|
+
private updateCursor;
|
|
398
|
+
private getDefaultCrop;
|
|
399
|
+
private updateShapes;
|
|
400
|
+
private complete;
|
|
401
|
+
private cancel;
|
|
402
|
+
private createSnapshot;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
declare enum DashStyle {
|
|
406
|
+
Draw = "draw",
|
|
407
|
+
Solid = "solid",
|
|
408
|
+
Dashed = "dashed",
|
|
409
|
+
Dotted = "dotted"
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
declare enum Decoration {
|
|
413
|
+
Arrow = "arrow"
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/** @public */
|
|
417
|
+
export declare const DEFAULT_ACCEPTED_IMG_TYPE: string[];
|
|
418
|
+
|
|
419
|
+
/** @public */
|
|
420
|
+
export declare const DEFAULT_ACCEPTED_VID_TYPE: string[];
|
|
421
|
+
|
|
422
|
+
declare type DefaultHelpers = ReturnType<typeof useDefaultHelpers>;
|
|
423
|
+
|
|
424
|
+
/** @public */
|
|
425
|
+
export declare const defaultShapeTools: (typeof ArrowShapeTool | typeof DrawShapeTool | typeof FrameShapeTool | typeof GeoShapeTool | typeof LineShapeTool | typeof NoteShapeTool | typeof TextShapeTool)[];
|
|
426
|
+
|
|
427
|
+
/** @public */
|
|
428
|
+
export declare const defaultShapeUtils: TLAnyShapeUtilConstructor[];
|
|
429
|
+
|
|
430
|
+
/** @public */
|
|
431
|
+
export declare const defaultTools: (typeof EraserTool | typeof HandTool | typeof LaserTool | typeof SelectTool | typeof ZoomTool)[];
|
|
432
|
+
|
|
433
|
+
declare namespace Dialog {
|
|
434
|
+
export {
|
|
435
|
+
Header,
|
|
436
|
+
Title,
|
|
437
|
+
CloseButton,
|
|
438
|
+
Body_2 as Body,
|
|
439
|
+
Footer
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
export { Dialog }
|
|
443
|
+
|
|
444
|
+
/** @public */
|
|
445
|
+
declare class DragAndDropManager {
|
|
446
|
+
editor: Editor;
|
|
447
|
+
constructor(editor: Editor);
|
|
448
|
+
prevDroppingShapeId: null | TLShapeId;
|
|
449
|
+
droppingNodeTimer: null | ReturnType<typeof setTimeout>;
|
|
450
|
+
first: boolean;
|
|
451
|
+
updateDroppingNode(movingShapes: TLShape[], cb: () => void): void;
|
|
452
|
+
private setDragTimer;
|
|
453
|
+
private handleDrag;
|
|
454
|
+
dropShapes(shapes: TLShape[]): void;
|
|
455
|
+
clear(): void;
|
|
456
|
+
dispose: () => void;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
declare class Dragging extends StateNode {
|
|
460
|
+
static id: string;
|
|
461
|
+
onEnter: () => void;
|
|
462
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
463
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
464
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
465
|
+
onComplete: () => void;
|
|
466
|
+
private update;
|
|
467
|
+
private complete;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
declare class DraggingHandle extends StateNode {
|
|
471
|
+
static id: string;
|
|
472
|
+
shapeId: TLShapeId;
|
|
473
|
+
initialHandle: TLHandle;
|
|
474
|
+
initialAdjacentHandle: null | TLHandle;
|
|
475
|
+
initialPagePoint: Vec2d;
|
|
476
|
+
markId: string;
|
|
477
|
+
initialPageTransform: any;
|
|
478
|
+
initialPageRotation: any;
|
|
479
|
+
info: TLBaseEventInfo & {
|
|
480
|
+
type: "pointer";
|
|
481
|
+
name: TLPointerEventName;
|
|
482
|
+
point: VecLike;
|
|
483
|
+
pointerId: number;
|
|
484
|
+
button: number;
|
|
485
|
+
isPen: boolean;
|
|
486
|
+
} & {
|
|
487
|
+
target: "handle";
|
|
488
|
+
shape: TLShape;
|
|
489
|
+
handle: TLHandle;
|
|
490
|
+
} & {
|
|
491
|
+
shape: TLArrowShape;
|
|
492
|
+
target: 'handle';
|
|
493
|
+
onInteractionEnd?: string | undefined;
|
|
494
|
+
isCreating: boolean;
|
|
495
|
+
};
|
|
496
|
+
isPrecise: boolean;
|
|
497
|
+
isPreciseId: null | TLShapeId;
|
|
498
|
+
pointingId: null | TLShapeId;
|
|
499
|
+
onEnter: TLEnterEventHandler;
|
|
500
|
+
private exactTimeout;
|
|
501
|
+
private resetExactTimeout;
|
|
502
|
+
private clearExactTimeout;
|
|
503
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
504
|
+
onKeyDown: TLKeyboardEvent | undefined;
|
|
505
|
+
onKeyUp: TLKeyboardEvent | undefined;
|
|
506
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
507
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
508
|
+
onCancel: TLCancelEvent;
|
|
509
|
+
onExit: () => void;
|
|
510
|
+
private complete;
|
|
511
|
+
private cancel;
|
|
512
|
+
private update;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
declare type DrawableShape = TLDrawShape | TLHighlightShape;
|
|
516
|
+
|
|
517
|
+
declare class Drawing extends StateNode {
|
|
518
|
+
static id: string;
|
|
519
|
+
info: TLPointerEventInfo;
|
|
520
|
+
initialShape?: DrawableShape;
|
|
521
|
+
shapeType: "draw" | "highlight";
|
|
522
|
+
util: ShapeUtil<TLUnknownShape>;
|
|
523
|
+
isPen: boolean;
|
|
524
|
+
segmentMode: "free" | "starting_free" | "starting_straight" | "straight";
|
|
525
|
+
didJustShiftClickToExtendPreviousShapeLine: boolean;
|
|
526
|
+
pagePointWhereCurrentSegmentChanged: Vec2d;
|
|
527
|
+
pagePointWhereNextSegmentChanged: null | Vec2d;
|
|
528
|
+
lastRecordedPoint: Vec2d;
|
|
529
|
+
mergeNextPoint: boolean;
|
|
530
|
+
currentLineLength: number;
|
|
531
|
+
canDraw: boolean;
|
|
532
|
+
markId: null | string;
|
|
533
|
+
onEnter: (info: TLPointerEventInfo) => void;
|
|
534
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
535
|
+
onKeyDown: TLEventHandlers['onKeyDown'];
|
|
536
|
+
onKeyUp: TLEventHandlers['onKeyUp'];
|
|
537
|
+
onExit?: (() => void) | undefined;
|
|
538
|
+
canClose(): boolean;
|
|
539
|
+
getIsClosed(segments: TLDrawShapeSegment[], size: TLDefaultSizeStyle): boolean;
|
|
540
|
+
private startShape;
|
|
541
|
+
private updateShapes;
|
|
542
|
+
private getLineLength;
|
|
543
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
544
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
545
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
546
|
+
onInterrupt: TLEventHandlers['onInterrupt'];
|
|
547
|
+
complete(): void;
|
|
548
|
+
cancel(): void;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
declare interface DrawShape extends TDBaseShape {
|
|
552
|
+
type: TDShapeType.Draw;
|
|
553
|
+
points: number[][];
|
|
554
|
+
isComplete: boolean;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/** @public */
|
|
558
|
+
export declare class DrawShapeTool extends StateNode {
|
|
559
|
+
static id: string;
|
|
560
|
+
static initial: string;
|
|
561
|
+
static children: () => (typeof Drawing | typeof Idle_2)[];
|
|
562
|
+
shapeType: string;
|
|
563
|
+
onExit: () => void;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/** @public */
|
|
567
|
+
export declare class DrawShapeUtil extends ShapeUtil<TLDrawShape> {
|
|
568
|
+
static type: "draw";
|
|
569
|
+
static props: {
|
|
570
|
+
color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
|
|
571
|
+
fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">;
|
|
572
|
+
dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">;
|
|
573
|
+
size: EnumStyleProp<"l" | "m" | "s" | "xl">;
|
|
574
|
+
segments: ArrayOfValidator< {
|
|
575
|
+
type: "free" | "straight";
|
|
576
|
+
points: Vec2dModel[];
|
|
577
|
+
}>;
|
|
578
|
+
isComplete: Validator<boolean>;
|
|
579
|
+
isClosed: Validator<boolean>;
|
|
580
|
+
isPen: Validator<boolean>;
|
|
581
|
+
};
|
|
582
|
+
static migrations: Migrations;
|
|
583
|
+
hideResizeHandles: (shape: TLDrawShape) => boolean;
|
|
584
|
+
hideRotateHandle: (shape: TLDrawShape) => boolean;
|
|
585
|
+
hideSelectionBoundsFg: (shape: TLDrawShape) => boolean;
|
|
586
|
+
getDefaultProps(): TLDrawShape['props'];
|
|
587
|
+
getGeometry(shape: TLDrawShape): Circle2d | Polyline2d;
|
|
588
|
+
component(shape: TLDrawShape): JSX.Element;
|
|
589
|
+
indicator(shape: TLDrawShape): JSX.Element;
|
|
590
|
+
toSvg(shape: TLDrawShape, ctx: SvgExportContext): SVGGElement;
|
|
591
|
+
getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
|
|
592
|
+
onResize: TLOnResizeHandler<TLDrawShape>;
|
|
593
|
+
expandSelectionOutlinePx(shape: TLDrawShape): number;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
declare namespace DropdownMenu {
|
|
597
|
+
export {
|
|
598
|
+
Root,
|
|
599
|
+
Trigger,
|
|
600
|
+
Content,
|
|
601
|
+
Sub,
|
|
602
|
+
SubTrigger,
|
|
603
|
+
SubContent,
|
|
604
|
+
Group,
|
|
605
|
+
Indicator,
|
|
606
|
+
Item,
|
|
607
|
+
CheckboxItem,
|
|
608
|
+
RadioItem,
|
|
609
|
+
DropdownMenuItemProps,
|
|
610
|
+
DropdownMenuCheckboxItemProps
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
export { DropdownMenu }
|
|
614
|
+
|
|
615
|
+
/** @public */
|
|
616
|
+
declare interface DropdownMenuCheckboxItemProps {
|
|
617
|
+
checked?: boolean;
|
|
618
|
+
onSelect?: (e: Event) => void;
|
|
619
|
+
disabled?: boolean;
|
|
620
|
+
title: string;
|
|
621
|
+
children: any;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
/** @public */
|
|
625
|
+
declare interface DropdownMenuItemProps extends TLUiButtonProps {
|
|
626
|
+
noClose?: boolean;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
declare class EditingShape extends StateNode {
|
|
630
|
+
static id: string;
|
|
631
|
+
onEnter: () => void;
|
|
632
|
+
onExit: () => void;
|
|
633
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
634
|
+
onPointerDown: TLEventHandlers['onPointerDown'];
|
|
635
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
636
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
declare interface EllipseShape extends TDBaseShape {
|
|
640
|
+
type: TDShapeType.Ellipse;
|
|
641
|
+
radius: number[];
|
|
642
|
+
label?: string;
|
|
643
|
+
labelPoint?: number[];
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
/** @public */
|
|
647
|
+
export declare class EmbedShapeUtil extends BaseBoxShapeUtil<TLEmbedShape> {
|
|
648
|
+
static type: "embed";
|
|
649
|
+
static props: {
|
|
650
|
+
w: Validator<number>;
|
|
651
|
+
h: Validator<number>;
|
|
652
|
+
url: Validator<string>;
|
|
653
|
+
};
|
|
654
|
+
static migrations: Migrations;
|
|
655
|
+
hideSelectionBoundsFg: TLShapeUtilFlag<TLEmbedShape>;
|
|
656
|
+
canEdit: TLShapeUtilFlag<TLEmbedShape>;
|
|
657
|
+
canUnmount: TLShapeUtilFlag<TLEmbedShape>;
|
|
658
|
+
canResize: (shape: TLEmbedShape) => boolean;
|
|
659
|
+
canEditInReadOnly: () => boolean;
|
|
660
|
+
getDefaultProps(): TLEmbedShape['props'];
|
|
661
|
+
isAspectRatioLocked: TLShapeUtilFlag<TLEmbedShape>;
|
|
662
|
+
onResize: TLOnResizeHandler<TLEmbedShape>;
|
|
663
|
+
component(shape: TLEmbedShape): JSX.Element;
|
|
664
|
+
indicator(shape: TLEmbedShape): JSX.Element;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/** @public */
|
|
668
|
+
export declare class EraserTool extends StateNode {
|
|
669
|
+
static id: string;
|
|
670
|
+
static initial: string;
|
|
671
|
+
static children: () => (typeof Erasing | typeof Idle_7 | typeof Pointing_6)[];
|
|
672
|
+
onEnter: () => void;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
declare class Erasing extends StateNode {
|
|
676
|
+
static id: string;
|
|
677
|
+
private info;
|
|
678
|
+
private scribbleId;
|
|
679
|
+
private markId;
|
|
680
|
+
private excludedShapeIds;
|
|
681
|
+
onEnter: (info: TLPointerEventInfo) => void;
|
|
682
|
+
private pushPointToScribble;
|
|
683
|
+
onExit: () => void;
|
|
684
|
+
onPointerMove: () => void;
|
|
685
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
686
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
687
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
688
|
+
update(): void;
|
|
689
|
+
complete(): void;
|
|
690
|
+
cancel(): void;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
/** @public */
|
|
694
|
+
export declare type EventsProviderProps = {
|
|
695
|
+
onEvent?: TLUiEventHandler;
|
|
696
|
+
children: any;
|
|
697
|
+
};
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Export the given shapes as files.
|
|
701
|
+
*
|
|
702
|
+
* @param editor - The editor instance.
|
|
703
|
+
* @param ids - The ids of the shapes to export.
|
|
704
|
+
* @param format - The format to export as.
|
|
705
|
+
* @param opts - Options for the export.
|
|
706
|
+
*
|
|
707
|
+
* @public
|
|
708
|
+
*/
|
|
709
|
+
export declare function exportAs(editor: Editor, ids: TLShapeId[], format?: TLExportType, opts?: Partial<TLSvgOptions>): Promise<void>;
|
|
710
|
+
|
|
711
|
+
/** @public */
|
|
712
|
+
export declare function findMenuItem(menu: TLUiMenuSchema, path: string[]): TLUiCustomMenuItem | TLUiMenuGroup | TLUiMenuItem | TLUiSubMenu<string>;
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Fit a frame to its content.
|
|
716
|
+
*
|
|
717
|
+
* @param id - Id of the frame you wish to fit to content.
|
|
718
|
+
* @param editor - tlraw editor instance.
|
|
719
|
+
* @param opts - Options for fitting the frame.
|
|
720
|
+
*
|
|
721
|
+
* @public
|
|
722
|
+
*/
|
|
723
|
+
export declare function fitFrameToContent(editor: Editor, id: TLShapeId, opts?: {
|
|
724
|
+
padding: number;
|
|
725
|
+
}): void;
|
|
726
|
+
|
|
727
|
+
declare enum FontStyle {
|
|
728
|
+
Script = "script",
|
|
729
|
+
Sans = "sans",
|
|
730
|
+
Serif = "serif",
|
|
731
|
+
Mono = "mono"
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
/** @public */
|
|
735
|
+
declare function Footer({ className, children }: {
|
|
736
|
+
className?: string;
|
|
737
|
+
children: any;
|
|
738
|
+
}): JSX.Element;
|
|
739
|
+
|
|
740
|
+
/** @public */
|
|
741
|
+
export declare class FrameShapeTool extends BaseBoxShapeTool {
|
|
742
|
+
static id: string;
|
|
743
|
+
static initial: string;
|
|
744
|
+
shapeType: string;
|
|
745
|
+
onCreate: (shape: null | TLShape) => void;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
/** @public */
|
|
749
|
+
export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
|
|
750
|
+
static type: "frame";
|
|
751
|
+
static props: {
|
|
752
|
+
w: Validator<number>;
|
|
753
|
+
h: Validator<number>;
|
|
754
|
+
name: Validator<string>;
|
|
755
|
+
};
|
|
756
|
+
static migrations: Migrations;
|
|
757
|
+
canBind: () => boolean;
|
|
758
|
+
canEdit: () => boolean;
|
|
759
|
+
getDefaultProps(): TLFrameShape['props'];
|
|
760
|
+
getGeometry(shape: TLFrameShape): Geometry2d;
|
|
761
|
+
component(shape: TLFrameShape): JSX.Element;
|
|
762
|
+
toSvg(shape: TLFrameShape): Promise<SVGElement> | SVGElement;
|
|
763
|
+
indicator(shape: TLFrameShape): JSX.Element;
|
|
764
|
+
canReceiveNewChildrenOfType: (shape: TLShape, _type: TLShape['type']) => boolean;
|
|
765
|
+
providesBackgroundForChildren(): boolean;
|
|
766
|
+
canDropShapes: (shape: TLFrameShape, _shapes: TLShape[]) => boolean;
|
|
767
|
+
onDragShapesOver: (frame: TLFrameShape, shapes: TLShape[]) => {
|
|
768
|
+
shouldHint: boolean;
|
|
769
|
+
};
|
|
770
|
+
onDragShapesOut: (_shape: TLFrameShape, shapes: TLShape[]) => void;
|
|
771
|
+
onResizeEnd: TLOnResizeEndHandler<TLFrameShape>;
|
|
772
|
+
onResize: TLOnResizeHandler<any>;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
/** @public */
|
|
776
|
+
export declare class GeoShapeTool extends StateNode {
|
|
777
|
+
static id: string;
|
|
778
|
+
static initial: string;
|
|
779
|
+
static children: () => (typeof Idle_3 | typeof Pointing_2)[];
|
|
780
|
+
shapeType: string;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
/** @public */
|
|
784
|
+
export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
|
|
785
|
+
static type: "geo";
|
|
786
|
+
static props: {
|
|
787
|
+
geo: EnumStyleProp<"arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box">;
|
|
788
|
+
labelColor: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
|
|
789
|
+
color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
|
|
790
|
+
fill: EnumStyleProp<"none" | "pattern" | "semi" | "solid">;
|
|
791
|
+
dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">;
|
|
792
|
+
size: EnumStyleProp<"l" | "m" | "s" | "xl">;
|
|
793
|
+
font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">;
|
|
794
|
+
align: EnumStyleProp<"end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start">;
|
|
795
|
+
verticalAlign: EnumStyleProp<"end" | "middle" | "start">;
|
|
796
|
+
url: Validator<string>;
|
|
797
|
+
w: Validator<number>;
|
|
798
|
+
h: Validator<number>;
|
|
799
|
+
growY: Validator<number>;
|
|
800
|
+
text: Validator<string>;
|
|
801
|
+
};
|
|
802
|
+
static migrations: Migrations;
|
|
803
|
+
canEdit: () => boolean;
|
|
804
|
+
getDefaultProps(): TLGeoShape['props'];
|
|
805
|
+
getGeometry(shape: TLGeoShape): Geometry2d;
|
|
806
|
+
onEditEnd: TLOnEditEndHandler<TLGeoShape>;
|
|
807
|
+
component(shape: TLGeoShape): JSX.Element;
|
|
808
|
+
indicator(shape: TLGeoShape): JSX.Element;
|
|
809
|
+
toSvg(shape: TLGeoShape, ctx: SvgExportContext): SVGElement;
|
|
810
|
+
getCanvasSvgDefs(): TLShapeUtilCanvasSvgDef[];
|
|
811
|
+
onResize: TLOnResizeHandler<TLGeoShape>;
|
|
812
|
+
onBeforeCreate: (shape: TLGeoShape) => {
|
|
813
|
+
props: {
|
|
814
|
+
growY: number;
|
|
815
|
+
geo: "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box";
|
|
816
|
+
labelColor: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
|
|
817
|
+
color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
|
|
818
|
+
fill: "none" | "pattern" | "semi" | "solid";
|
|
819
|
+
dash: "dashed" | "dotted" | "draw" | "solid";
|
|
820
|
+
size: "l" | "m" | "s" | "xl";
|
|
821
|
+
font: "draw" | "mono" | "sans" | "serif";
|
|
822
|
+
align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
|
|
823
|
+
verticalAlign: "end" | "middle" | "start";
|
|
824
|
+
url: string;
|
|
825
|
+
w: number;
|
|
826
|
+
h: number;
|
|
827
|
+
text: string;
|
|
828
|
+
};
|
|
829
|
+
type: "geo";
|
|
830
|
+
x: number;
|
|
831
|
+
y: number;
|
|
832
|
+
rotation: number;
|
|
833
|
+
index: string;
|
|
834
|
+
parentId: TLParentId;
|
|
835
|
+
isLocked: boolean;
|
|
836
|
+
opacity: number;
|
|
837
|
+
meta: JsonObject;
|
|
838
|
+
id: TLShapeId;
|
|
839
|
+
typeName: "shape";
|
|
840
|
+
} | undefined;
|
|
841
|
+
onBeforeUpdate: (prev: TLGeoShape, next: TLGeoShape) => {
|
|
842
|
+
props: {
|
|
843
|
+
growY: number;
|
|
844
|
+
geo: "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box";
|
|
845
|
+
labelColor: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
|
|
846
|
+
color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
|
|
847
|
+
fill: "none" | "pattern" | "semi" | "solid";
|
|
848
|
+
dash: "dashed" | "dotted" | "draw" | "solid";
|
|
849
|
+
size: "l" | "m" | "s" | "xl";
|
|
850
|
+
font: "draw" | "mono" | "sans" | "serif";
|
|
851
|
+
align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
|
|
852
|
+
verticalAlign: "end" | "middle" | "start";
|
|
853
|
+
url: string;
|
|
854
|
+
w: number;
|
|
855
|
+
h: number;
|
|
856
|
+
text: string;
|
|
857
|
+
};
|
|
858
|
+
type: "geo";
|
|
859
|
+
x: number;
|
|
860
|
+
y: number;
|
|
861
|
+
rotation: number;
|
|
862
|
+
index: string;
|
|
863
|
+
parentId: TLParentId;
|
|
864
|
+
isLocked: boolean;
|
|
865
|
+
opacity: number;
|
|
866
|
+
meta: JsonObject;
|
|
867
|
+
id: TLShapeId;
|
|
868
|
+
typeName: "shape";
|
|
869
|
+
} | undefined;
|
|
870
|
+
onDoubleClick: (shape: TLGeoShape) => {
|
|
871
|
+
props: {
|
|
872
|
+
geo: "check-box";
|
|
873
|
+
};
|
|
874
|
+
type: "geo";
|
|
875
|
+
x: number;
|
|
876
|
+
y: number;
|
|
877
|
+
rotation: number;
|
|
878
|
+
index: string;
|
|
879
|
+
parentId: TLParentId;
|
|
880
|
+
isLocked: boolean;
|
|
881
|
+
opacity: number;
|
|
882
|
+
meta: JsonObject;
|
|
883
|
+
id: TLShapeId;
|
|
884
|
+
typeName: "shape";
|
|
885
|
+
} | {
|
|
886
|
+
props: {
|
|
887
|
+
geo: "rectangle";
|
|
888
|
+
};
|
|
889
|
+
type: "geo";
|
|
890
|
+
x: number;
|
|
891
|
+
y: number;
|
|
892
|
+
rotation: number;
|
|
893
|
+
index: string;
|
|
894
|
+
parentId: TLParentId;
|
|
895
|
+
isLocked: boolean;
|
|
896
|
+
opacity: number;
|
|
897
|
+
meta: JsonObject;
|
|
898
|
+
id: TLShapeId;
|
|
899
|
+
typeName: "shape";
|
|
900
|
+
} | undefined;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Tests whether an URL supports embedding and returns the result. If we encounter an error, we
|
|
905
|
+
* return undefined.
|
|
906
|
+
*
|
|
907
|
+
* @param inputUrl - The URL to match
|
|
908
|
+
* @public
|
|
909
|
+
*/
|
|
910
|
+
export declare function getEmbedInfo(inputUrl: string): TLEmbedResult;
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* Get the size of an image from its source.
|
|
914
|
+
*
|
|
915
|
+
* @example
|
|
916
|
+
* ```ts
|
|
917
|
+
* const size = await getImageSize('https://example.com/image.jpg')
|
|
918
|
+
* const dataUrl = await getResizedImageDataUrl('https://example.com/image.jpg', size.w, size.h, { type: "image/jpeg", quality: 0.92 })
|
|
919
|
+
* ```
|
|
920
|
+
*
|
|
921
|
+
* @param dataURLForImage - The image file as a string.
|
|
922
|
+
* @param width - The desired width.
|
|
923
|
+
* @param height - The desired height.
|
|
924
|
+
* @param opts - Options for the image.
|
|
925
|
+
* @public
|
|
926
|
+
*/
|
|
927
|
+
export declare function getResizedImageDataUrl(dataURLForImage: string, width: number, height: number, opts?: {
|
|
928
|
+
type?: string | undefined;
|
|
929
|
+
quality?: number | undefined;
|
|
930
|
+
}): Promise<string>;
|
|
931
|
+
|
|
932
|
+
/** @public */
|
|
933
|
+
export declare function getSvgAsImage(svg: SVGElement, isSafari: boolean, options: {
|
|
934
|
+
type: 'jpeg' | 'png' | 'svg' | 'webp';
|
|
935
|
+
quality: number;
|
|
936
|
+
scale: number;
|
|
937
|
+
}): Promise<Blob | null>;
|
|
938
|
+
|
|
939
|
+
declare function getTranslatingSnapshot(editor: Editor): {
|
|
940
|
+
averagePagePoint: Vec2d;
|
|
941
|
+
movingShapes: TLShape[];
|
|
942
|
+
shapeSnapshots: MovingShapeSnapshot[];
|
|
943
|
+
initialPageBounds: Box2d;
|
|
944
|
+
initialSnapPoints: SnapPoint[];
|
|
945
|
+
};
|
|
946
|
+
|
|
947
|
+
/** @public */
|
|
948
|
+
declare function Group({ children, size, }: {
|
|
949
|
+
children: any;
|
|
950
|
+
size?: 'medium' | 'small' | 'tiny' | 'wide';
|
|
951
|
+
}): JSX.Element;
|
|
952
|
+
|
|
953
|
+
declare interface GroupShape extends TDBaseShape {
|
|
954
|
+
type: TDShapeType.Group;
|
|
955
|
+
size: number[];
|
|
956
|
+
children: string[];
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
/** @public */
|
|
960
|
+
export declare class HandTool extends StateNode {
|
|
961
|
+
static id: string;
|
|
962
|
+
static initial: string;
|
|
963
|
+
static children: () => (typeof Dragging | typeof Idle_8 | typeof Pointing_7)[];
|
|
964
|
+
onDoubleClick: TLClickEvent;
|
|
965
|
+
onTripleClick: TLClickEvent;
|
|
966
|
+
onQuadrupleClick: TLClickEvent;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
/** @public */
|
|
970
|
+
declare function Header({ className, children }: {
|
|
971
|
+
className?: string;
|
|
972
|
+
children: any;
|
|
973
|
+
}): JSX.Element;
|
|
974
|
+
|
|
975
|
+
/** @public */
|
|
976
|
+
export declare class HighlightShapeTool extends StateNode {
|
|
977
|
+
static id: string;
|
|
978
|
+
static initial: string;
|
|
979
|
+
static children: () => (typeof Drawing | typeof Idle_2)[];
|
|
980
|
+
shapeType: string;
|
|
981
|
+
onExit: () => void;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
/** @public */
|
|
985
|
+
export declare class HighlightShapeUtil extends ShapeUtil<TLHighlightShape> {
|
|
986
|
+
static type: "highlight";
|
|
987
|
+
static props: {
|
|
988
|
+
color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
|
|
989
|
+
size: EnumStyleProp<"l" | "m" | "s" | "xl">;
|
|
990
|
+
segments: ArrayOfValidator< {
|
|
991
|
+
type: "free" | "straight";
|
|
992
|
+
points: Vec2dModel[];
|
|
993
|
+
}>;
|
|
994
|
+
isComplete: Validator<boolean>;
|
|
995
|
+
isPen: Validator<boolean>;
|
|
996
|
+
};
|
|
997
|
+
static migrations: Migrations;
|
|
998
|
+
hideResizeHandles: (shape: TLHighlightShape) => boolean;
|
|
999
|
+
hideRotateHandle: (shape: TLHighlightShape) => boolean;
|
|
1000
|
+
hideSelectionBoundsFg: (shape: TLHighlightShape) => boolean;
|
|
1001
|
+
getDefaultProps(): TLHighlightShape['props'];
|
|
1002
|
+
getGeometry(shape: TLHighlightShape): Circle2d | Polygon2d;
|
|
1003
|
+
component(shape: TLHighlightShape): JSX.Element;
|
|
1004
|
+
backgroundComponent(shape: TLHighlightShape): JSX.Element;
|
|
1005
|
+
indicator(shape: TLHighlightShape): JSX.Element;
|
|
1006
|
+
toSvg(shape: TLHighlightShape): SVGPathElement;
|
|
1007
|
+
toBackgroundSvg(shape: TLHighlightShape): SVGPathElement;
|
|
1008
|
+
onResize: TLOnResizeHandler<TLHighlightShape>;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
/** @public */
|
|
1012
|
+
export declare const Icon: NamedExoticComponent<TLUiIconProps>;
|
|
1013
|
+
|
|
1014
|
+
declare class Idle extends StateNode {
|
|
1015
|
+
static id: string;
|
|
1016
|
+
onPointerDown: TLEventHandlers['onPointerDown'];
|
|
1017
|
+
onEnter: () => void;
|
|
1018
|
+
onCancel: () => void;
|
|
1019
|
+
onKeyUp: TLEventHandlers['onKeyUp'];
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
declare class Idle_10 extends StateNode {
|
|
1023
|
+
static id: string;
|
|
1024
|
+
onEnter: () => void;
|
|
1025
|
+
onExit: TLExitEventHandler;
|
|
1026
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1027
|
+
onPointerDown: TLEventHandlers['onPointerDown'];
|
|
1028
|
+
onDoubleClick: TLEventHandlers['onDoubleClick'];
|
|
1029
|
+
onKeyDown: TLEventHandlers['onKeyDown'];
|
|
1030
|
+
onKeyRepeat: TLEventHandlers['onKeyRepeat'];
|
|
1031
|
+
onKeyUp: TLEventHandlers['onKeyUp'];
|
|
1032
|
+
private cancel;
|
|
1033
|
+
private cleanupCroppingState;
|
|
1034
|
+
private nudgeCroppingImage;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
declare class Idle_11 extends StateNode {
|
|
1038
|
+
static id: string;
|
|
1039
|
+
onEnter: () => void;
|
|
1040
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1041
|
+
onPointerDown: TLEventHandlers['onPointerDown'];
|
|
1042
|
+
onDoubleClick: TLEventHandlers['onDoubleClick'];
|
|
1043
|
+
onRightClick: TLEventHandlers['onRightClick'];
|
|
1044
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1045
|
+
onKeyDown: TLEventHandlers['onKeyDown'];
|
|
1046
|
+
onKeyRepeat: TLEventHandlers['onKeyDown'];
|
|
1047
|
+
onKeyUp: (info: TLKeyboardEventInfo) => void;
|
|
1048
|
+
private shouldStartEditingShape;
|
|
1049
|
+
private startEditingShape;
|
|
1050
|
+
isDarwin: boolean;
|
|
1051
|
+
handleDoubleClickOnCanvas(info: TLClickEventInfo): void;
|
|
1052
|
+
private nudgeSelectedShapes;
|
|
1053
|
+
private canInteractWithShapeInReadOnly;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
declare class Idle_12 extends StateNode {
|
|
1057
|
+
static id: string;
|
|
1058
|
+
info: TLPointerEventInfo & {
|
|
1059
|
+
onInteractionEnd?: string | undefined;
|
|
1060
|
+
};
|
|
1061
|
+
onEnter: (info: TLPointerEventInfo & {
|
|
1062
|
+
onInteractionEnd: string;
|
|
1063
|
+
}) => void;
|
|
1064
|
+
onPointerDown: TLEventHandlers['onPointerUp'];
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
declare class Idle_2 extends StateNode {
|
|
1068
|
+
static id: string;
|
|
1069
|
+
onPointerDown: TLEventHandlers['onPointerDown'];
|
|
1070
|
+
onEnter: () => void;
|
|
1071
|
+
onCancel: () => void;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
declare class Idle_3 extends StateNode {
|
|
1075
|
+
static id: string;
|
|
1076
|
+
onPointerDown: TLEventHandlers['onPointerDown'];
|
|
1077
|
+
onEnter: () => void;
|
|
1078
|
+
onKeyUp: TLEventHandlers['onKeyUp'];
|
|
1079
|
+
onCancel: () => void;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
declare class Idle_4 extends StateNode {
|
|
1083
|
+
static id: string;
|
|
1084
|
+
private shapeId;
|
|
1085
|
+
onEnter: (info: {
|
|
1086
|
+
shapeId: TLShapeId;
|
|
1087
|
+
}) => void;
|
|
1088
|
+
onPointerDown: TLEventHandlers['onPointerDown'];
|
|
1089
|
+
onCancel: () => void;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
declare class Idle_5 extends StateNode {
|
|
1093
|
+
static id: string;
|
|
1094
|
+
onPointerDown: TLEventHandlers['onPointerDown'];
|
|
1095
|
+
onEnter: () => void;
|
|
1096
|
+
onCancel: () => void;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
declare class Idle_6 extends StateNode {
|
|
1100
|
+
static id: string;
|
|
1101
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1102
|
+
onPointerDown: TLEventHandlers['onPointerDown'];
|
|
1103
|
+
onEnter: () => void;
|
|
1104
|
+
onKeyDown: TLEventHandlers['onKeyDown'];
|
|
1105
|
+
onCancel: () => void;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
declare class Idle_7 extends StateNode {
|
|
1109
|
+
static id: string;
|
|
1110
|
+
onPointerDown: TLEventHandlers['onPointerDown'];
|
|
1111
|
+
onCancel: () => void;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
declare class Idle_8 extends StateNode {
|
|
1115
|
+
static id: string;
|
|
1116
|
+
onEnter: () => void;
|
|
1117
|
+
onPointerDown: TLEventHandlers['onPointerDown'];
|
|
1118
|
+
onCancel: () => void;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
declare class Idle_9 extends StateNode {
|
|
1122
|
+
static id: string;
|
|
1123
|
+
onPointerDown: TLEventHandlers['onPointerDown'];
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
declare interface ImageShape extends TDBaseShape {
|
|
1127
|
+
type: TDShapeType.Image;
|
|
1128
|
+
size: number[];
|
|
1129
|
+
assetId: string;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
/** @public */
|
|
1133
|
+
export declare class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
|
|
1134
|
+
static type: "image";
|
|
1135
|
+
static props: {
|
|
1136
|
+
w: Validator<number>;
|
|
1137
|
+
h: Validator<number>;
|
|
1138
|
+
playing: Validator<boolean>;
|
|
1139
|
+
url: Validator<string>;
|
|
1140
|
+
assetId: Validator<TLAssetId | null>;
|
|
1141
|
+
crop: Validator< {
|
|
1142
|
+
topLeft: Vec2dModel;
|
|
1143
|
+
bottomRight: Vec2dModel;
|
|
1144
|
+
} | null>;
|
|
1145
|
+
};
|
|
1146
|
+
static migrations: Migrations;
|
|
1147
|
+
isAspectRatioLocked: () => boolean;
|
|
1148
|
+
canCrop: () => boolean;
|
|
1149
|
+
getDefaultProps(): TLImageShape['props'];
|
|
1150
|
+
component(shape: TLImageShape): JSX.Element;
|
|
1151
|
+
indicator(shape: TLImageShape): JSX.Element | null;
|
|
1152
|
+
toSvg(shape: TLImageShape): Promise<SVGGElement>;
|
|
1153
|
+
onDoubleClick: (shape: TLImageShape) => void;
|
|
1154
|
+
onDoubleClickEdge: TLOnDoubleClickHandler<TLImageShape>;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
/** @public */
|
|
1158
|
+
declare function Indicator(): JSX.Element;
|
|
1159
|
+
|
|
1160
|
+
/** @public */
|
|
1161
|
+
export declare const Input: React_3.ForwardRefExoticComponent<TLUiInputProps & React_3.RefAttributes<HTMLInputElement>>;
|
|
1162
|
+
|
|
1163
|
+
/** @public */
|
|
1164
|
+
export declare function isGifAnimated(file: File): Promise<boolean>;
|
|
1165
|
+
|
|
1166
|
+
/** @public */
|
|
1167
|
+
declare function Item({ noClose, ...props }: DropdownMenuItemProps): JSX.Element;
|
|
1168
|
+
|
|
1169
|
+
declare type Join<T, K> = K extends null ? {
|
|
1170
|
+
[R in keyof T]: T[R];
|
|
1171
|
+
} : {
|
|
1172
|
+
[R in keyof T]: T[R];
|
|
1173
|
+
} & {
|
|
1174
|
+
[R in keyof K]: K[R];
|
|
1175
|
+
};
|
|
1176
|
+
|
|
1177
|
+
declare class Lasering extends StateNode {
|
|
1178
|
+
static id: string;
|
|
1179
|
+
scribbleId: string;
|
|
1180
|
+
onEnter: () => void;
|
|
1181
|
+
onExit: () => void;
|
|
1182
|
+
onPointerMove: () => void;
|
|
1183
|
+
onPointerUp: () => void;
|
|
1184
|
+
private pushPointToScribble;
|
|
1185
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1186
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1187
|
+
private complete;
|
|
1188
|
+
private cancel;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
/** @public */
|
|
1192
|
+
export declare class LaserTool extends StateNode {
|
|
1193
|
+
static id: string;
|
|
1194
|
+
static initial: string;
|
|
1195
|
+
static children: () => (typeof Idle_9 | typeof Lasering)[];
|
|
1196
|
+
onEnter: () => void;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
/* Excluded from this release type: LegacyTldrawDocument */
|
|
1200
|
+
|
|
1201
|
+
/** @public */
|
|
1202
|
+
export declare class LineShapeTool extends StateNode {
|
|
1203
|
+
static id: string;
|
|
1204
|
+
static initial: string;
|
|
1205
|
+
static children: () => (typeof Idle_4 | typeof Pointing_3)[];
|
|
1206
|
+
shapeType: string;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
/** @public */
|
|
1210
|
+
export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
|
|
1211
|
+
static type: "line";
|
|
1212
|
+
static props: {
|
|
1213
|
+
color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
|
|
1214
|
+
dash: EnumStyleProp<"dashed" | "dotted" | "draw" | "solid">;
|
|
1215
|
+
size: EnumStyleProp<"l" | "m" | "s" | "xl">;
|
|
1216
|
+
spline: EnumStyleProp<"cubic" | "line">;
|
|
1217
|
+
handles: DictValidator<string, TLHandle>;
|
|
1218
|
+
};
|
|
1219
|
+
static migrations: Migrations;
|
|
1220
|
+
hideResizeHandles: () => boolean;
|
|
1221
|
+
hideRotateHandle: () => boolean;
|
|
1222
|
+
hideSelectionBoundsFg: () => boolean;
|
|
1223
|
+
hideSelectionBoundsBg: () => boolean;
|
|
1224
|
+
getDefaultProps(): TLLineShape['props'];
|
|
1225
|
+
getGeometry(shape: TLLineShape): CubicSpline2d | Polyline2d;
|
|
1226
|
+
getHandles(shape: TLLineShape): TLHandle[];
|
|
1227
|
+
getOutlineSegments(shape: TLLineShape): Vec2d[][];
|
|
1228
|
+
onResize: TLOnResizeHandler<TLLineShape>;
|
|
1229
|
+
onHandleChange: TLOnHandleChangeHandler<TLLineShape>;
|
|
1230
|
+
component(shape: TLLineShape): JSX.Element | undefined;
|
|
1231
|
+
indicator(shape: TLLineShape): JSX.Element;
|
|
1232
|
+
toSvg(shape: TLLineShape): SVGGElement;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
/** @public */
|
|
1236
|
+
export declare function menuCustom(id: string, opts?: Partial<{
|
|
1237
|
+
readonlyOk: boolean;
|
|
1238
|
+
disabled: boolean;
|
|
1239
|
+
}>): {
|
|
1240
|
+
id: string;
|
|
1241
|
+
type: "custom";
|
|
1242
|
+
disabled: boolean;
|
|
1243
|
+
readonlyOk: boolean;
|
|
1244
|
+
};
|
|
1245
|
+
|
|
1246
|
+
/** @public */
|
|
1247
|
+
export declare function menuGroup(id: string, ...children: (false | TLUiMenuChild)[]): null | TLUiMenuGroup;
|
|
1248
|
+
|
|
1249
|
+
/** @public */
|
|
1250
|
+
export declare function menuItem(actionItem: TLUiActionItem | TLUiToolItem, opts?: Partial<{
|
|
1251
|
+
checked: boolean;
|
|
1252
|
+
disabled: boolean;
|
|
1253
|
+
}>): TLUiMenuItem;
|
|
1254
|
+
|
|
1255
|
+
/** @public */
|
|
1256
|
+
export declare function menuSubmenu(id: string, label: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey, ...children: (false | TLUiMenuChild)[]): null | TLUiSubMenu;
|
|
1257
|
+
|
|
1258
|
+
declare interface MovingShapeSnapshot {
|
|
1259
|
+
shape: TLShape;
|
|
1260
|
+
pagePoint: Vec2d;
|
|
1261
|
+
parentTransform: Matrix2dModel | null;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
/** @public */
|
|
1265
|
+
export declare class NoteShapeTool extends StateNode {
|
|
1266
|
+
static id: string;
|
|
1267
|
+
static initial: string;
|
|
1268
|
+
static children: () => (typeof Idle_5 | typeof Pointing_4)[];
|
|
1269
|
+
shapeType: string;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
/** @public */
|
|
1273
|
+
export declare class NoteShapeUtil extends ShapeUtil<TLNoteShape> {
|
|
1274
|
+
static type: "note";
|
|
1275
|
+
static props: {
|
|
1276
|
+
color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
|
|
1277
|
+
size: EnumStyleProp<"l" | "m" | "s" | "xl">;
|
|
1278
|
+
font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">;
|
|
1279
|
+
align: EnumStyleProp<"end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start">;
|
|
1280
|
+
verticalAlign: EnumStyleProp<"end" | "middle" | "start">;
|
|
1281
|
+
growY: Validator<number>;
|
|
1282
|
+
url: Validator<string>;
|
|
1283
|
+
text: Validator<string>;
|
|
1284
|
+
};
|
|
1285
|
+
static migrations: Migrations;
|
|
1286
|
+
canEdit: () => boolean;
|
|
1287
|
+
hideResizeHandles: () => boolean;
|
|
1288
|
+
hideSelectionBoundsFg: () => boolean;
|
|
1289
|
+
getDefaultProps(): TLNoteShape['props'];
|
|
1290
|
+
getHeight(shape: TLNoteShape): number;
|
|
1291
|
+
getGeometry(shape: TLNoteShape): Rectangle2d;
|
|
1292
|
+
component(shape: TLNoteShape): JSX.Element;
|
|
1293
|
+
indicator(shape: TLNoteShape): JSX.Element;
|
|
1294
|
+
toSvg(shape: TLNoteShape, ctx: SvgExportContext): SVGGElement;
|
|
1295
|
+
onBeforeCreate: (next: TLNoteShape) => {
|
|
1296
|
+
props: {
|
|
1297
|
+
growY: number;
|
|
1298
|
+
color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
|
|
1299
|
+
size: "l" | "m" | "s" | "xl";
|
|
1300
|
+
font: "draw" | "mono" | "sans" | "serif";
|
|
1301
|
+
align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
|
|
1302
|
+
verticalAlign: "end" | "middle" | "start";
|
|
1303
|
+
url: string;
|
|
1304
|
+
text: string;
|
|
1305
|
+
};
|
|
1306
|
+
type: "note";
|
|
1307
|
+
x: number;
|
|
1308
|
+
y: number;
|
|
1309
|
+
rotation: number;
|
|
1310
|
+
index: string;
|
|
1311
|
+
parentId: TLParentId;
|
|
1312
|
+
isLocked: boolean;
|
|
1313
|
+
opacity: number;
|
|
1314
|
+
meta: JsonObject;
|
|
1315
|
+
id: TLShapeId;
|
|
1316
|
+
typeName: "shape";
|
|
1317
|
+
} | undefined;
|
|
1318
|
+
onBeforeUpdate: (prev: TLNoteShape, next: TLNoteShape) => {
|
|
1319
|
+
props: {
|
|
1320
|
+
growY: number;
|
|
1321
|
+
color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
|
|
1322
|
+
size: "l" | "m" | "s" | "xl";
|
|
1323
|
+
font: "draw" | "mono" | "sans" | "serif";
|
|
1324
|
+
align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
|
|
1325
|
+
verticalAlign: "end" | "middle" | "start";
|
|
1326
|
+
url: string;
|
|
1327
|
+
text: string;
|
|
1328
|
+
};
|
|
1329
|
+
type: "note";
|
|
1330
|
+
x: number;
|
|
1331
|
+
y: number;
|
|
1332
|
+
rotation: number;
|
|
1333
|
+
index: string;
|
|
1334
|
+
parentId: TLParentId;
|
|
1335
|
+
isLocked: boolean;
|
|
1336
|
+
opacity: number;
|
|
1337
|
+
meta: JsonObject;
|
|
1338
|
+
id: TLShapeId;
|
|
1339
|
+
typeName: "shape";
|
|
1340
|
+
} | undefined;
|
|
1341
|
+
onEditEnd: TLOnEditEndHandler<TLNoteShape>;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
/** @public */
|
|
1345
|
+
export declare function OfflineIndicator(): JSX.Element;
|
|
1346
|
+
|
|
1347
|
+
/* Excluded from this release type: parseAndLoadDocument */
|
|
1348
|
+
|
|
1349
|
+
/** @public */
|
|
1350
|
+
export declare function parseTldrawJsonFile({ json, schema, }: {
|
|
1351
|
+
schema: TLSchema;
|
|
1352
|
+
json: string;
|
|
1353
|
+
}): Result<TLStore, TldrawFileParseError>;
|
|
1354
|
+
|
|
1355
|
+
declare class Pointing extends StateNode {
|
|
1356
|
+
static id: string;
|
|
1357
|
+
shape?: TLArrowShape;
|
|
1358
|
+
markId: string;
|
|
1359
|
+
onEnter: () => void;
|
|
1360
|
+
onExit: () => void;
|
|
1361
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1362
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
1363
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1364
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1365
|
+
onInterrupt: TLEventHandlers['onInterrupt'];
|
|
1366
|
+
cancel(): void;
|
|
1367
|
+
createArrowShape(): void;
|
|
1368
|
+
updateArrowShapeEndHandle(): void;
|
|
1369
|
+
private preciseTimeout;
|
|
1370
|
+
private didTimeout;
|
|
1371
|
+
private startPreciseTimeout;
|
|
1372
|
+
private clearPreciseTimeout;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
declare class Pointing_2 extends StateNode {
|
|
1376
|
+
static id: string;
|
|
1377
|
+
markId: string;
|
|
1378
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
1379
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1380
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1381
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1382
|
+
onInterrupt: TLEventHandlers['onInterrupt'];
|
|
1383
|
+
private complete;
|
|
1384
|
+
private cancel;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
declare class Pointing_3 extends StateNode {
|
|
1388
|
+
static id: string;
|
|
1389
|
+
shape: TLLineShape;
|
|
1390
|
+
markId: string | undefined;
|
|
1391
|
+
onEnter: (info: {
|
|
1392
|
+
shapeId?: TLShapeId;
|
|
1393
|
+
}) => void;
|
|
1394
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1395
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
1396
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1397
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1398
|
+
onInterrupt: TLInterruptEvent;
|
|
1399
|
+
complete(): void;
|
|
1400
|
+
cancel(): void;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
declare class Pointing_4 extends StateNode {
|
|
1404
|
+
static id: string;
|
|
1405
|
+
dragged: boolean;
|
|
1406
|
+
info: TLPointerEventInfo;
|
|
1407
|
+
wasFocusedOnEnter: boolean;
|
|
1408
|
+
markId: string;
|
|
1409
|
+
shape: TLNoteShape;
|
|
1410
|
+
onEnter: () => void;
|
|
1411
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1412
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
1413
|
+
onInterrupt: TLInterruptEvent;
|
|
1414
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1415
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1416
|
+
private complete;
|
|
1417
|
+
private cancel;
|
|
1418
|
+
private createShape;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
declare class Pointing_5 extends StateNode {
|
|
1422
|
+
static id: string;
|
|
1423
|
+
shape?: TLTextShape;
|
|
1424
|
+
markId: string;
|
|
1425
|
+
onExit: () => void;
|
|
1426
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1427
|
+
onPointerUp: () => void;
|
|
1428
|
+
onComplete: () => void;
|
|
1429
|
+
onCancel: () => void;
|
|
1430
|
+
onInterrupt: () => void;
|
|
1431
|
+
private complete;
|
|
1432
|
+
private cancel;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
declare class Pointing_6 extends StateNode {
|
|
1436
|
+
static id: string;
|
|
1437
|
+
onEnter: () => void;
|
|
1438
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1439
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
1440
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1441
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1442
|
+
onInterrupt: TLEventHandlers['onInterrupt'];
|
|
1443
|
+
complete(): void;
|
|
1444
|
+
cancel(): void;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
declare class Pointing_7 extends StateNode {
|
|
1448
|
+
static id: string;
|
|
1449
|
+
onEnter: () => void;
|
|
1450
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1451
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
1452
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1453
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1454
|
+
onInterrupt: TLEventHandlers['onInterrupt'];
|
|
1455
|
+
private complete;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
declare class Pointing_8 extends StateNode {
|
|
1459
|
+
static id: string;
|
|
1460
|
+
info: TLPointerEventInfo & {
|
|
1461
|
+
onInteractionEnd?: string | undefined;
|
|
1462
|
+
};
|
|
1463
|
+
onEnter: (info: TLPointerEventInfo & {
|
|
1464
|
+
onInteractionEnd: string;
|
|
1465
|
+
}) => void;
|
|
1466
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
1467
|
+
onPointerMove: TLEventHandlers['onPointerUp'];
|
|
1468
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1469
|
+
private complete;
|
|
1470
|
+
private cancel;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
declare class PointingCanvas extends StateNode {
|
|
1474
|
+
static id: string;
|
|
1475
|
+
onEnter: () => void;
|
|
1476
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1477
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
1478
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1479
|
+
onInterrupt: () => void;
|
|
1480
|
+
private complete;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
declare class PointingCrop extends StateNode {
|
|
1484
|
+
static id: string;
|
|
1485
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1486
|
+
onPointerMove: TLPointerEvent;
|
|
1487
|
+
onPointerUp: TLPointerEvent;
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
declare class PointingCropHandle extends StateNode {
|
|
1491
|
+
static id: string;
|
|
1492
|
+
private info;
|
|
1493
|
+
private updateCursor;
|
|
1494
|
+
onEnter: (info: TLPointingCropHandleInfo) => void;
|
|
1495
|
+
onExit: () => void;
|
|
1496
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1497
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
1498
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1499
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1500
|
+
onInterrupt: () => void;
|
|
1501
|
+
private cancel;
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
declare class PointingHandle extends StateNode {
|
|
1505
|
+
static id: string;
|
|
1506
|
+
info: TLBaseEventInfo & {
|
|
1507
|
+
type: "pointer";
|
|
1508
|
+
name: TLPointerEventName;
|
|
1509
|
+
point: VecLike;
|
|
1510
|
+
pointerId: number;
|
|
1511
|
+
button: number;
|
|
1512
|
+
isPen: boolean;
|
|
1513
|
+
} & {
|
|
1514
|
+
target: "handle";
|
|
1515
|
+
shape: TLShape;
|
|
1516
|
+
handle: TLHandle;
|
|
1517
|
+
} & {
|
|
1518
|
+
target: 'handle';
|
|
1519
|
+
};
|
|
1520
|
+
onEnter: (info: TLPointerEventInfo & {
|
|
1521
|
+
target: 'handle';
|
|
1522
|
+
}) => void;
|
|
1523
|
+
onExit: () => void;
|
|
1524
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
1525
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1526
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1527
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1528
|
+
onInterrupt: () => void;
|
|
1529
|
+
private cancel;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
declare class PointingResizeHandle extends StateNode {
|
|
1533
|
+
static id: string;
|
|
1534
|
+
private info;
|
|
1535
|
+
private updateCursor;
|
|
1536
|
+
onEnter: (info: PointingResizeHandleInfo) => void;
|
|
1537
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1538
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
1539
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1540
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1541
|
+
onInterrupt: () => void;
|
|
1542
|
+
private complete;
|
|
1543
|
+
private cancel;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
declare type PointingResizeHandleInfo = Extract<TLPointerEventInfo, {
|
|
1547
|
+
target: 'selection';
|
|
1548
|
+
}> & {
|
|
1549
|
+
onInteractionEnd?: string;
|
|
1550
|
+
};
|
|
1551
|
+
|
|
1552
|
+
declare class PointingRotateHandle extends StateNode {
|
|
1553
|
+
static id: string;
|
|
1554
|
+
private info;
|
|
1555
|
+
private updateCursor;
|
|
1556
|
+
onEnter: (info: PointingRotateHandleInfo) => void;
|
|
1557
|
+
onExit: () => void;
|
|
1558
|
+
onPointerMove: () => void;
|
|
1559
|
+
onPointerUp: () => void;
|
|
1560
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1561
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1562
|
+
onInterrupt: () => void;
|
|
1563
|
+
private complete;
|
|
1564
|
+
private cancel;
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
declare type PointingRotateHandleInfo = Extract<TLPointerEventInfo, {
|
|
1568
|
+
target: 'selection';
|
|
1569
|
+
}> & {
|
|
1570
|
+
onInteractionEnd?: string;
|
|
1571
|
+
};
|
|
1572
|
+
|
|
1573
|
+
declare class PointingSelection extends StateNode {
|
|
1574
|
+
static id: string;
|
|
1575
|
+
info: TLBaseEventInfo & {
|
|
1576
|
+
type: "pointer";
|
|
1577
|
+
name: TLPointerEventName;
|
|
1578
|
+
point: VecLike;
|
|
1579
|
+
pointerId: number;
|
|
1580
|
+
button: number;
|
|
1581
|
+
isPen: boolean;
|
|
1582
|
+
} & {
|
|
1583
|
+
target: "selection";
|
|
1584
|
+
handle?: TLSelectionHandle | undefined;
|
|
1585
|
+
shape?: undefined;
|
|
1586
|
+
} & {
|
|
1587
|
+
target: 'selection';
|
|
1588
|
+
};
|
|
1589
|
+
onEnter: (info: TLPointerEventInfo & {
|
|
1590
|
+
target: 'selection';
|
|
1591
|
+
}) => void;
|
|
1592
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
1593
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1594
|
+
onDoubleClick?: TLClickEvent | undefined;
|
|
1595
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1596
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1597
|
+
onInterrupt: () => void;
|
|
1598
|
+
private cancel;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
declare class PointingShape extends StateNode {
|
|
1602
|
+
static id: string;
|
|
1603
|
+
hitShape: TLShape;
|
|
1604
|
+
hitShapeForPointerUp: TLShape;
|
|
1605
|
+
didSelectOnEnter: boolean;
|
|
1606
|
+
onEnter: (info: TLPointerEventInfo & {
|
|
1607
|
+
target: 'shape';
|
|
1608
|
+
}) => void;
|
|
1609
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
1610
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1611
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1612
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1613
|
+
onInterrupt: () => void;
|
|
1614
|
+
private cancel;
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
/** @public */
|
|
1618
|
+
declare function RadioItem({ children, onSelect, ...rest }: DropdownMenuCheckboxItemProps): JSX.Element;
|
|
1619
|
+
|
|
1620
|
+
declare interface RectangleShape extends TDBaseShape {
|
|
1621
|
+
type: TDShapeType.Rectangle;
|
|
1622
|
+
size: number[];
|
|
1623
|
+
label?: string;
|
|
1624
|
+
labelPoint?: number[];
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
/**
|
|
1628
|
+
* Remove a frame.
|
|
1629
|
+
*
|
|
1630
|
+
* @param editor - tlraw editor instance.
|
|
1631
|
+
* @param ids - Ids of the frames you wish to remove.
|
|
1632
|
+
*
|
|
1633
|
+
* @public
|
|
1634
|
+
*/
|
|
1635
|
+
export declare function removeFrame(editor: Editor, ids: TLShapeId[]): void;
|
|
1636
|
+
|
|
1637
|
+
declare class Resizing extends StateNode {
|
|
1638
|
+
static id: string;
|
|
1639
|
+
info: TLBaseEventInfo & {
|
|
1640
|
+
type: "pointer";
|
|
1641
|
+
name: TLPointerEventName;
|
|
1642
|
+
point: VecLike;
|
|
1643
|
+
pointerId: number;
|
|
1644
|
+
button: number;
|
|
1645
|
+
isPen: boolean;
|
|
1646
|
+
} & {
|
|
1647
|
+
target: "selection";
|
|
1648
|
+
handle?: TLSelectionHandle | undefined;
|
|
1649
|
+
shape?: undefined;
|
|
1650
|
+
} & {
|
|
1651
|
+
target: "selection";
|
|
1652
|
+
handle: SelectionCorner | SelectionEdge;
|
|
1653
|
+
isCreating?: boolean | undefined;
|
|
1654
|
+
onCreate?: ((shape: null | TLShape) => void) | undefined;
|
|
1655
|
+
creationCursorOffset?: undefined | VecLike;
|
|
1656
|
+
onInteractionEnd?: string | undefined;
|
|
1657
|
+
};
|
|
1658
|
+
markId: string;
|
|
1659
|
+
private didHoldCommand;
|
|
1660
|
+
creationCursorOffset: VecLike;
|
|
1661
|
+
private snapshot;
|
|
1662
|
+
onEnter: TLEnterEventHandler;
|
|
1663
|
+
onPointerMove: TLEventHandlers['onPointerMove'];
|
|
1664
|
+
onKeyDown: TLEventHandlers['onKeyDown'];
|
|
1665
|
+
onKeyUp: TLEventHandlers['onKeyUp'];
|
|
1666
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
1667
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1668
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1669
|
+
private cancel;
|
|
1670
|
+
private complete;
|
|
1671
|
+
private handleResizeStart;
|
|
1672
|
+
private handleResizeEnd;
|
|
1673
|
+
private updateShapes;
|
|
1674
|
+
private updateCursor;
|
|
1675
|
+
onExit: () => void;
|
|
1676
|
+
_createSnapshot: () => {
|
|
1677
|
+
shapeSnapshots: Map<TLShapeId, {
|
|
1678
|
+
shape: TLShape;
|
|
1679
|
+
bounds: Box2d;
|
|
1680
|
+
pageTransform: Matrix2d;
|
|
1681
|
+
pageRotation: number;
|
|
1682
|
+
isAspectRatioLocked: boolean;
|
|
1683
|
+
}>;
|
|
1684
|
+
selectionBounds: Box2d;
|
|
1685
|
+
cursorHandleOffset: Vec2d;
|
|
1686
|
+
selectionRotation: number;
|
|
1687
|
+
selectedShapeIds: TLShapeId[];
|
|
1688
|
+
canShapesDeform: boolean;
|
|
1689
|
+
initialSelectionPageBounds: Box2d;
|
|
1690
|
+
frames: {
|
|
1691
|
+
id: TLShapeId;
|
|
1692
|
+
children: TLShape[];
|
|
1693
|
+
}[];
|
|
1694
|
+
};
|
|
1695
|
+
_createShapeSnapshot: (shape: TLShape) => {
|
|
1696
|
+
shape: TLShape;
|
|
1697
|
+
bounds: Box2d;
|
|
1698
|
+
pageTransform: Matrix2d;
|
|
1699
|
+
pageRotation: number;
|
|
1700
|
+
isAspectRatioLocked: boolean;
|
|
1701
|
+
};
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
/** @public */
|
|
1705
|
+
declare function Root({ id, children, modal, debugOpen, }: {
|
|
1706
|
+
id: string;
|
|
1707
|
+
children: any;
|
|
1708
|
+
modal?: boolean;
|
|
1709
|
+
debugOpen?: boolean;
|
|
1710
|
+
}): JSX.Element;
|
|
1711
|
+
|
|
1712
|
+
declare class Rotating extends StateNode {
|
|
1713
|
+
static id: string;
|
|
1714
|
+
snapshot: TLRotationSnapshot;
|
|
1715
|
+
info: TLBaseEventInfo & {
|
|
1716
|
+
type: "pointer";
|
|
1717
|
+
name: TLPointerEventName;
|
|
1718
|
+
point: VecLike;
|
|
1719
|
+
pointerId: number;
|
|
1720
|
+
button: number;
|
|
1721
|
+
isPen: boolean;
|
|
1722
|
+
} & {
|
|
1723
|
+
target: "selection";
|
|
1724
|
+
handle?: TLSelectionHandle | undefined;
|
|
1725
|
+
shape?: undefined;
|
|
1726
|
+
} & {
|
|
1727
|
+
onInteractionEnd?: string | undefined;
|
|
1728
|
+
};
|
|
1729
|
+
markId: string;
|
|
1730
|
+
onEnter: (info: TLPointerEventInfo & {
|
|
1731
|
+
target: 'selection';
|
|
1732
|
+
onInteractionEnd?: string;
|
|
1733
|
+
}) => StateNode | undefined;
|
|
1734
|
+
onExit: () => void;
|
|
1735
|
+
onPointerMove: () => void;
|
|
1736
|
+
onKeyDown: () => void;
|
|
1737
|
+
onKeyUp: () => void;
|
|
1738
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
1739
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1740
|
+
onCancel: () => void;
|
|
1741
|
+
private update;
|
|
1742
|
+
private cancel;
|
|
1743
|
+
private complete;
|
|
1744
|
+
protected handleStart(): void;
|
|
1745
|
+
_getRotationFromPointerPosition({ snapToNearestDegree }: {
|
|
1746
|
+
snapToNearestDegree: boolean;
|
|
1747
|
+
}): number;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
declare class ScribbleBrushing extends StateNode {
|
|
1751
|
+
static id: string;
|
|
1752
|
+
hits: Set<TLShapeId>;
|
|
1753
|
+
size: number;
|
|
1754
|
+
scribbleId: string;
|
|
1755
|
+
initialSelectedShapeIds: Set<TLShapeId>;
|
|
1756
|
+
newlySelectedShapeIds: Set<TLShapeId>;
|
|
1757
|
+
onEnter: () => void;
|
|
1758
|
+
onExit: () => void;
|
|
1759
|
+
onPointerMove: () => void;
|
|
1760
|
+
onPointerUp: () => void;
|
|
1761
|
+
onKeyDown: () => void;
|
|
1762
|
+
onKeyUp: () => void;
|
|
1763
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
1764
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
1765
|
+
private pushPointToScribble;
|
|
1766
|
+
private updateScribbleSelection;
|
|
1767
|
+
private complete;
|
|
1768
|
+
private cancel;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
/** @public */
|
|
1772
|
+
export declare class SelectTool extends StateNode {
|
|
1773
|
+
static id: string;
|
|
1774
|
+
static initial: string;
|
|
1775
|
+
static children: () => (typeof Brushing | typeof Crop | typeof Cropping | typeof DraggingHandle | typeof EditingShape | typeof Idle_11 | typeof PointingCanvas | typeof PointingCropHandle | typeof PointingHandle | typeof PointingResizeHandle | typeof PointingRotateHandle | typeof PointingSelection | typeof PointingShape | typeof Resizing | typeof Rotating | typeof ScribbleBrushing | typeof Translating)[];
|
|
1776
|
+
onExit: () => void;
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
/** @public */
|
|
1780
|
+
export declare function serializeTldrawJson(store: TLStore): Promise<string>;
|
|
1781
|
+
|
|
1782
|
+
/** @public */
|
|
1783
|
+
export declare function serializeTldrawJsonBlob(store: TLStore): Promise<Blob>;
|
|
1784
|
+
|
|
1785
|
+
/** @public */
|
|
1786
|
+
export declare function setDefaultEditorAssetUrls(assetUrls: TLEditorAssetUrls): void;
|
|
1787
|
+
|
|
1788
|
+
/* Excluded from this release type: setDefaultUiAssetUrls */
|
|
1789
|
+
|
|
1790
|
+
declare type ShapeStyles = {
|
|
1791
|
+
color: ColorStyle;
|
|
1792
|
+
size: SizeStyle;
|
|
1793
|
+
dash: DashStyle;
|
|
1794
|
+
font?: FontStyle;
|
|
1795
|
+
textAlign?: AlignStyle;
|
|
1796
|
+
isFilled?: boolean;
|
|
1797
|
+
scale?: number;
|
|
1798
|
+
};
|
|
1799
|
+
|
|
1800
|
+
declare enum SizeStyle {
|
|
1801
|
+
Small = "small",
|
|
1802
|
+
Medium = "medium",
|
|
1803
|
+
Large = "large"
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
/* Excluded from this release type: Spinner */
|
|
1807
|
+
|
|
1808
|
+
declare interface StickyShape extends TDBaseShape {
|
|
1809
|
+
type: TDShapeType.Sticky;
|
|
1810
|
+
size: number[];
|
|
1811
|
+
text: string;
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
/** @public */
|
|
1815
|
+
declare function Sub({ id, children }: {
|
|
1816
|
+
id: string;
|
|
1817
|
+
children: any;
|
|
1818
|
+
}): JSX.Element;
|
|
1819
|
+
|
|
1820
|
+
/** @public */
|
|
1821
|
+
declare function SubContent({ alignOffset, sideOffset, children, }: {
|
|
1822
|
+
alignOffset?: number;
|
|
1823
|
+
sideOffset?: number;
|
|
1824
|
+
children: any;
|
|
1825
|
+
}): JSX.Element;
|
|
1826
|
+
|
|
1827
|
+
/** @public */
|
|
1828
|
+
declare function SubTrigger({ label, 'data-testid': testId, 'data-direction': dataDirection, }: {
|
|
1829
|
+
label: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
|
|
1830
|
+
'data-testid'?: string;
|
|
1831
|
+
'data-direction'?: 'left' | 'right';
|
|
1832
|
+
}): JSX.Element;
|
|
1833
|
+
|
|
1834
|
+
declare type TDAsset = TDImageAsset | TDVideoAsset;
|
|
1835
|
+
|
|
1836
|
+
declare type TDAssets = Record<string, TDAsset>;
|
|
1837
|
+
|
|
1838
|
+
declare enum TDAssetType {
|
|
1839
|
+
Image = "image",
|
|
1840
|
+
Video = "video"
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
declare interface TDBaseShape extends TLV1Shape {
|
|
1844
|
+
style: ShapeStyles;
|
|
1845
|
+
type: TDShapeType;
|
|
1846
|
+
label?: string;
|
|
1847
|
+
handles?: Record<string, TDHandle>;
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
declare type TDBinding = ArrowBinding;
|
|
1851
|
+
|
|
1852
|
+
declare interface TDHandle extends TLV1Handle {
|
|
1853
|
+
canBind?: boolean;
|
|
1854
|
+
bindingId?: string;
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
declare interface TDImageAsset extends TLV1Asset {
|
|
1858
|
+
type: TDAssetType.Image;
|
|
1859
|
+
fileName: string;
|
|
1860
|
+
src: string;
|
|
1861
|
+
size: number[];
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
declare type TDPage = {
|
|
1865
|
+
id: string;
|
|
1866
|
+
name?: string;
|
|
1867
|
+
childIndex?: number;
|
|
1868
|
+
shapes: Record<string, TDShape>;
|
|
1869
|
+
bindings: Record<string, TDBinding>;
|
|
1870
|
+
};
|
|
1871
|
+
|
|
1872
|
+
declare type TDShape = ArrowShape | DrawShape | EllipseShape | GroupShape | ImageShape | RectangleShape | StickyShape | TextShape | TriangleShape | VideoShape;
|
|
1873
|
+
|
|
1874
|
+
declare enum TDShapeType {
|
|
1875
|
+
Sticky = "sticky",
|
|
1876
|
+
Ellipse = "ellipse",
|
|
1877
|
+
Rectangle = "rectangle",
|
|
1878
|
+
Triangle = "triangle",
|
|
1879
|
+
Draw = "draw",
|
|
1880
|
+
Arrow = "arrow",
|
|
1881
|
+
Text = "text",
|
|
1882
|
+
Group = "group",
|
|
1883
|
+
Image = "image",
|
|
1884
|
+
Video = "video"
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
declare interface TDVideoAsset extends TLV1Asset {
|
|
1888
|
+
type: TDAssetType.Video;
|
|
1889
|
+
fileName: string;
|
|
1890
|
+
src: string;
|
|
1891
|
+
size: number[];
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
declare interface TextShape extends TDBaseShape {
|
|
1895
|
+
type: TDShapeType.Text;
|
|
1896
|
+
text: string;
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
/** @public */
|
|
1900
|
+
export declare class TextShapeTool extends StateNode {
|
|
1901
|
+
static id: string;
|
|
1902
|
+
static initial: string;
|
|
1903
|
+
static children: () => (typeof Idle_6 | typeof Pointing_5)[];
|
|
1904
|
+
shapeType: string;
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
/** @public */
|
|
1908
|
+
export declare class TextShapeUtil extends ShapeUtil<TLTextShape> {
|
|
1909
|
+
static type: "text";
|
|
1910
|
+
static props: {
|
|
1911
|
+
color: EnumStyleProp<"black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow">;
|
|
1912
|
+
size: EnumStyleProp<"l" | "m" | "s" | "xl">;
|
|
1913
|
+
font: EnumStyleProp<"draw" | "mono" | "sans" | "serif">;
|
|
1914
|
+
align: EnumStyleProp<"end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start">;
|
|
1915
|
+
w: Validator<number>;
|
|
1916
|
+
text: Validator<string>;
|
|
1917
|
+
scale: Validator<number>;
|
|
1918
|
+
autoSize: Validator<boolean>;
|
|
1919
|
+
};
|
|
1920
|
+
static migrations: Migrations;
|
|
1921
|
+
getDefaultProps(): TLTextShape['props'];
|
|
1922
|
+
getMinDimensions(shape: TLTextShape): {
|
|
1923
|
+
height: number;
|
|
1924
|
+
width: number;
|
|
1925
|
+
};
|
|
1926
|
+
getGeometry(shape: TLTextShape): Rectangle2d;
|
|
1927
|
+
canEdit: () => boolean;
|
|
1928
|
+
isAspectRatioLocked: TLShapeUtilFlag<TLTextShape>;
|
|
1929
|
+
component(shape: TLTextShape): JSX.Element;
|
|
1930
|
+
indicator(shape: TLTextShape): JSX.Element | null;
|
|
1931
|
+
toSvg(shape: TLTextShape, ctx: SvgExportContext): SVGGElement;
|
|
1932
|
+
onResize: TLOnResizeHandler<TLTextShape>;
|
|
1933
|
+
onBeforeCreate: (shape: TLTextShape) => {
|
|
1934
|
+
x: number;
|
|
1935
|
+
y: number;
|
|
1936
|
+
type: "text";
|
|
1937
|
+
rotation: number;
|
|
1938
|
+
index: string;
|
|
1939
|
+
parentId: TLParentId;
|
|
1940
|
+
isLocked: boolean;
|
|
1941
|
+
opacity: number;
|
|
1942
|
+
props: {
|
|
1943
|
+
color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
|
|
1944
|
+
size: "l" | "m" | "s" | "xl";
|
|
1945
|
+
font: "draw" | "mono" | "sans" | "serif";
|
|
1946
|
+
align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
|
|
1947
|
+
w: number;
|
|
1948
|
+
text: string;
|
|
1949
|
+
scale: number;
|
|
1950
|
+
autoSize: boolean;
|
|
1951
|
+
};
|
|
1952
|
+
meta: JsonObject;
|
|
1953
|
+
id: TLShapeId;
|
|
1954
|
+
typeName: "shape";
|
|
1955
|
+
} | undefined;
|
|
1956
|
+
onEditEnd: TLOnEditEndHandler<TLTextShape>;
|
|
1957
|
+
onBeforeUpdate: (prev: TLTextShape, next: TLTextShape) => {
|
|
1958
|
+
x: number;
|
|
1959
|
+
y: number;
|
|
1960
|
+
props: {
|
|
1961
|
+
w: number;
|
|
1962
|
+
color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "yellow";
|
|
1963
|
+
size: "l" | "m" | "s" | "xl";
|
|
1964
|
+
font: "draw" | "mono" | "sans" | "serif";
|
|
1965
|
+
align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
|
|
1966
|
+
text: string;
|
|
1967
|
+
scale: number;
|
|
1968
|
+
autoSize: boolean;
|
|
1969
|
+
};
|
|
1970
|
+
type: "text";
|
|
1971
|
+
rotation: number;
|
|
1972
|
+
index: string;
|
|
1973
|
+
parentId: TLParentId;
|
|
1974
|
+
isLocked: boolean;
|
|
1975
|
+
opacity: number;
|
|
1976
|
+
meta: JsonObject;
|
|
1977
|
+
id: TLShapeId;
|
|
1978
|
+
typeName: "shape";
|
|
1979
|
+
} | undefined;
|
|
1980
|
+
onDoubleClickEdge: (shape: TLTextShape) => {
|
|
1981
|
+
id: TLShapeId;
|
|
1982
|
+
type: "text";
|
|
1983
|
+
props: {
|
|
1984
|
+
autoSize: boolean;
|
|
1985
|
+
scale?: undefined;
|
|
1986
|
+
};
|
|
1987
|
+
} | {
|
|
1988
|
+
id: TLShapeId;
|
|
1989
|
+
type: "text";
|
|
1990
|
+
props: {
|
|
1991
|
+
scale: number;
|
|
1992
|
+
autoSize?: undefined;
|
|
1993
|
+
};
|
|
1994
|
+
} | undefined;
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
/** @public */
|
|
1998
|
+
declare function Title({ className, children }: {
|
|
1999
|
+
className?: string;
|
|
2000
|
+
children: any;
|
|
2001
|
+
}): JSX.Element;
|
|
2002
|
+
|
|
2003
|
+
/** @public */
|
|
2004
|
+
declare type TLCopyType = 'jpeg' | 'json' | 'png' | 'svg';
|
|
2005
|
+
|
|
2006
|
+
/** @public */
|
|
2007
|
+
export declare function Tldraw(props: TldrawProps): JSX.Element;
|
|
2008
|
+
|
|
2009
|
+
/** @public */
|
|
2010
|
+
export declare const TLDRAW_FILE_EXTENSION: ".tldr";
|
|
2011
|
+
|
|
2012
|
+
/** @public */
|
|
2013
|
+
export declare function TldrawCropHandles({ size, width, height, hideAlternateHandles, }: TldrawCropHandlesProps): JSX.Element;
|
|
2014
|
+
|
|
2015
|
+
/** @public */
|
|
2016
|
+
export declare interface TldrawCropHandlesProps {
|
|
2017
|
+
size: number;
|
|
2018
|
+
width: number;
|
|
2019
|
+
height: number;
|
|
2020
|
+
hideAlternateHandles: boolean;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
/** @public */
|
|
2024
|
+
export declare interface TldrawFile {
|
|
2025
|
+
tldrawFileFormatVersion: number;
|
|
2026
|
+
schema: SerializedSchema;
|
|
2027
|
+
records: UnknownRecord[];
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
/** @public */
|
|
2031
|
+
declare type TldrawFileParseError = {
|
|
2032
|
+
type: 'fileFormatVersionTooNew';
|
|
2033
|
+
version: number;
|
|
2034
|
+
} | {
|
|
2035
|
+
type: 'invalidRecords';
|
|
2036
|
+
cause: unknown;
|
|
2037
|
+
} | {
|
|
2038
|
+
type: 'migrationFailed';
|
|
2039
|
+
reason: MigrationFailureReason;
|
|
2040
|
+
} | {
|
|
2041
|
+
type: 'notATldrawFile';
|
|
2042
|
+
cause: unknown;
|
|
2043
|
+
} | {
|
|
2044
|
+
type: 'v1File';
|
|
2045
|
+
data: any;
|
|
2046
|
+
};
|
|
2047
|
+
|
|
2048
|
+
/** @public */
|
|
2049
|
+
export declare const TldrawHandles: TLHandlesComponent;
|
|
2050
|
+
|
|
2051
|
+
/** @public */
|
|
2052
|
+
export declare const TldrawHoveredShapeIndicator: TLHoveredShapeIndicatorComponent;
|
|
2053
|
+
|
|
2054
|
+
/** @public */
|
|
2055
|
+
export declare type TldrawProps = TldrawEditorBaseProps & ({
|
|
2056
|
+
store: TLStore | TLStoreWithStatus;
|
|
2057
|
+
} | {
|
|
2058
|
+
store?: undefined;
|
|
2059
|
+
persistenceKey?: string;
|
|
2060
|
+
sessionId?: string;
|
|
2061
|
+
defaultName?: string;
|
|
2062
|
+
/**
|
|
2063
|
+
* A snapshot to load for the store's initial data / schema.
|
|
2064
|
+
*/
|
|
2065
|
+
snapshot?: StoreSnapshot<TLRecord>;
|
|
2066
|
+
}) & TldrawUiProps & Partial<TLExternalContentProps>;
|
|
2067
|
+
|
|
2068
|
+
/** @public */
|
|
2069
|
+
export declare const TldrawScribble: TLScribbleComponent;
|
|
2070
|
+
|
|
2071
|
+
/** @public */
|
|
2072
|
+
export declare const TldrawSelectionBackground: TLSelectionBackgroundComponent;
|
|
2073
|
+
|
|
2074
|
+
/** @public */
|
|
2075
|
+
export declare const TldrawSelectionForeground: TLSelectionForegroundComponent;
|
|
2076
|
+
|
|
2077
|
+
/**
|
|
2078
|
+
* @public
|
|
2079
|
+
*/
|
|
2080
|
+
export declare const TldrawUi: React_2.NamedExoticComponent<TldrawUiProps>;
|
|
2081
|
+
|
|
2082
|
+
/**
|
|
2083
|
+
* Base props for the {@link @bigbluebutton/tldraw#Tldraw} and {@link TldrawUi} components.
|
|
2084
|
+
*
|
|
2085
|
+
* @public
|
|
2086
|
+
*/
|
|
2087
|
+
export declare interface TldrawUiBaseProps {
|
|
2088
|
+
/**
|
|
2089
|
+
* The component's children.
|
|
2090
|
+
*/
|
|
2091
|
+
children?: ReactNode;
|
|
2092
|
+
/**
|
|
2093
|
+
* Whether to hide the user interface and only display the canvas.
|
|
2094
|
+
*/
|
|
2095
|
+
hideUi?: boolean;
|
|
2096
|
+
/**
|
|
2097
|
+
* A component to use for the share zone (will be deprecated)
|
|
2098
|
+
*/
|
|
2099
|
+
shareZone?: ReactNode;
|
|
2100
|
+
/* Excluded from this release type: topZone */
|
|
2101
|
+
/**
|
|
2102
|
+
* Additional items to add to the debug menu (will be deprecated)
|
|
2103
|
+
*/
|
|
2104
|
+
renderDebugMenuItems?: () => React_2.ReactNode;
|
|
2105
|
+
/** Asset URL override. */
|
|
2106
|
+
assetUrls?: TLUiAssetUrlOverrides;
|
|
2107
|
+
}
|
|
2108
|
+
|
|
2109
|
+
/** @public */
|
|
2110
|
+
export declare function TldrawUiContextProvider({ overrides, assetUrls, onUiEvent, forceMobile, children, }: TldrawUiContextProviderProps): JSX.Element;
|
|
2111
|
+
|
|
2112
|
+
/**
|
|
2113
|
+
* Props for the {@link @bigbluebutton/tldraw#Tldraw} and {@link TldrawUi} components.
|
|
2114
|
+
*
|
|
2115
|
+
* @public
|
|
2116
|
+
**/
|
|
2117
|
+
export declare interface TldrawUiContextProviderProps {
|
|
2118
|
+
/**
|
|
2119
|
+
* Urls for where to find fonts and other assets for the UI.
|
|
2120
|
+
*/
|
|
2121
|
+
assetUrls?: RecursivePartial<TLUiAssetUrls>;
|
|
2122
|
+
/**
|
|
2123
|
+
* Overrides for the UI.
|
|
2124
|
+
*/
|
|
2125
|
+
overrides?: TLUiOverrides | TLUiOverrides[];
|
|
2126
|
+
/**
|
|
2127
|
+
* Callback for when an event occurs in the UI.
|
|
2128
|
+
*/
|
|
2129
|
+
onUiEvent?: TLUiEventHandler;
|
|
2130
|
+
/**
|
|
2131
|
+
* Whether to always should the mobile breakpoints.
|
|
2132
|
+
*/
|
|
2133
|
+
forceMobile?: boolean;
|
|
2134
|
+
/**
|
|
2135
|
+
* The component's children.
|
|
2136
|
+
*/
|
|
2137
|
+
children?: any;
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
/**
|
|
2141
|
+
* Props for the {@link @bigbluebutton/tldraw#Tldraw} and {@link TldrawUi} components.
|
|
2142
|
+
*
|
|
2143
|
+
* @public
|
|
2144
|
+
*/
|
|
2145
|
+
export declare type TldrawUiProps = TldrawUiBaseProps & TldrawUiContextProviderProps;
|
|
2146
|
+
|
|
2147
|
+
/** @public */
|
|
2148
|
+
declare type TLEditorAssetUrls = {
|
|
2149
|
+
fonts: {
|
|
2150
|
+
monospace: string;
|
|
2151
|
+
serif: string;
|
|
2152
|
+
sansSerif: string;
|
|
2153
|
+
draw: string;
|
|
2154
|
+
};
|
|
2155
|
+
};
|
|
2156
|
+
|
|
2157
|
+
/** @public */
|
|
2158
|
+
declare type TLEmbedResult = {
|
|
2159
|
+
definition: EmbedDefinition;
|
|
2160
|
+
url: string;
|
|
2161
|
+
embedUrl: string;
|
|
2162
|
+
} | undefined;
|
|
2163
|
+
|
|
2164
|
+
/** @public */
|
|
2165
|
+
declare type TLExportType = 'jpeg' | 'json' | 'png' | 'svg' | 'webp';
|
|
2166
|
+
|
|
2167
|
+
/** @public */
|
|
2168
|
+
declare type TLExternalContentProps = {
|
|
2169
|
+
maxImageDimension: number;
|
|
2170
|
+
maxAssetSize: number;
|
|
2171
|
+
acceptedImageMimeTypes: string[];
|
|
2172
|
+
acceptedVideoMimeTypes: string[];
|
|
2173
|
+
};
|
|
2174
|
+
|
|
2175
|
+
declare type TLPointingCropHandleInfo = TLPointerEventInfo & {
|
|
2176
|
+
target: 'selection';
|
|
2177
|
+
} & {
|
|
2178
|
+
onInteractionEnd?: string;
|
|
2179
|
+
};
|
|
2180
|
+
|
|
2181
|
+
/** @public */
|
|
2182
|
+
export declare interface TLUiActionItem<TransationKey extends string = string, IconType extends string = string> {
|
|
2183
|
+
icon?: IconType;
|
|
2184
|
+
id: string;
|
|
2185
|
+
kbd?: string;
|
|
2186
|
+
title?: string;
|
|
2187
|
+
label?: TransationKey;
|
|
2188
|
+
menuLabel?: TransationKey;
|
|
2189
|
+
shortcutsLabel?: TransationKey;
|
|
2190
|
+
contextMenuLabel?: TransationKey;
|
|
2191
|
+
readonlyOk: boolean;
|
|
2192
|
+
checkbox?: boolean;
|
|
2193
|
+
onSelect: (source: TLUiEventSource) => Promise<void> | void;
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
/** @public */
|
|
2197
|
+
export declare type TLUiActionsContextType = Record<string, TLUiActionItem>;
|
|
2198
|
+
|
|
2199
|
+
/** @public */
|
|
2200
|
+
export declare type TLUiActionsMenuSchemaContextType = TLUiMenuSchema;
|
|
2201
|
+
|
|
2202
|
+
/** @public */
|
|
2203
|
+
export declare type TLUiAssetUrlOverrides = RecursivePartial<TLUiAssetUrls>;
|
|
2204
|
+
|
|
2205
|
+
declare type TLUiAssetUrls = TLEditorAssetUrls & {
|
|
2206
|
+
icons: Record<Exclude<string, TLUiIconType> | TLUiIconType, string>;
|
|
2207
|
+
translations: Record<(typeof LANGUAGES)[number]['locale'], string>;
|
|
2208
|
+
embedIcons: Record<(typeof EMBED_DEFINITIONS)[number]['type'], string>;
|
|
2209
|
+
};
|
|
2210
|
+
|
|
2211
|
+
/** @public */
|
|
2212
|
+
export declare interface TLUiButtonProps extends React_3.HTMLAttributes<HTMLButtonElement> {
|
|
2213
|
+
loading?: boolean;
|
|
2214
|
+
disabled?: boolean;
|
|
2215
|
+
label?: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
|
|
2216
|
+
icon?: Exclude<string, TLUiIconType> | TLUiIconType;
|
|
2217
|
+
spinner?: boolean;
|
|
2218
|
+
iconLeft?: Exclude<string, TLUiIconType> | TLUiIconType;
|
|
2219
|
+
smallIcon?: boolean;
|
|
2220
|
+
kbd?: string;
|
|
2221
|
+
isChecked?: boolean;
|
|
2222
|
+
invertIcon?: boolean;
|
|
2223
|
+
type: 'danger' | 'help' | 'icon' | 'low' | 'menu' | 'normal' | 'primary' | 'tool';
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
/** @public */
|
|
2227
|
+
export declare interface TLUiContextMenuProps {
|
|
2228
|
+
children: any;
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
/** @public */
|
|
2232
|
+
declare type TLUiContextMenuSchemaProviderProps = {
|
|
2233
|
+
overrides?: (editor: Editor, schema: TLUiContextTTLUiMenuSchemaContextType, helpers: {
|
|
2234
|
+
actions: ReturnType<typeof useActions>;
|
|
2235
|
+
oneSelected: boolean;
|
|
2236
|
+
twoSelected: boolean;
|
|
2237
|
+
threeSelected: boolean;
|
|
2238
|
+
showAutoSizeToggle: boolean;
|
|
2239
|
+
showUngroup: boolean;
|
|
2240
|
+
onlyFlippableShapeSelected: boolean;
|
|
2241
|
+
}) => TLUiContextTTLUiMenuSchemaContextType;
|
|
2242
|
+
children: any;
|
|
2243
|
+
};
|
|
2244
|
+
|
|
2245
|
+
/** @public */
|
|
2246
|
+
export declare type TLUiContextTTLUiMenuSchemaContextType = TLUiMenuSchema;
|
|
2247
|
+
|
|
2248
|
+
/** @public */
|
|
2249
|
+
export declare type TLUiCustomMenuItem = {
|
|
2250
|
+
id: string;
|
|
2251
|
+
type: 'custom';
|
|
2252
|
+
disabled: boolean;
|
|
2253
|
+
readonlyOk: boolean;
|
|
2254
|
+
};
|
|
2255
|
+
|
|
2256
|
+
/** @public */
|
|
2257
|
+
export declare interface TLUiDialog {
|
|
2258
|
+
id: string;
|
|
2259
|
+
onClose?: () => void;
|
|
2260
|
+
component: (props: TLUiDialogProps) => any;
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
/** @public */
|
|
2264
|
+
export declare interface TLUiDialogProps {
|
|
2265
|
+
onClose: () => void;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
/** @public */
|
|
2269
|
+
export declare type TLUiDialogsContextType = {
|
|
2270
|
+
addDialog: (dialog: Omit<TLUiDialog, 'id'> & {
|
|
2271
|
+
id?: string;
|
|
2272
|
+
}) => string;
|
|
2273
|
+
removeDialog: (id: string) => string;
|
|
2274
|
+
updateDialog: (id: string, newDialogData: Partial<TLUiDialog>) => string;
|
|
2275
|
+
clearDialogs: () => void;
|
|
2276
|
+
dialogs: TLUiDialog[];
|
|
2277
|
+
};
|
|
2278
|
+
|
|
2279
|
+
/** @public */
|
|
2280
|
+
export declare type TLUiEventContextType = TLUiEventHandler<keyof TLUiEventMap>;
|
|
2281
|
+
|
|
2282
|
+
/** @public */
|
|
2283
|
+
export declare type TLUiEventHandler<T extends keyof TLUiEventMap = keyof TLUiEventMap> = (name: T, data: Join<{
|
|
2284
|
+
source: TLUiEventSource;
|
|
2285
|
+
}, TLUiEventMap[T]>) => void;
|
|
2286
|
+
|
|
2287
|
+
/** @public */
|
|
2288
|
+
export declare interface TLUiEventMap {
|
|
2289
|
+
undo: null;
|
|
2290
|
+
redo: null;
|
|
2291
|
+
'group-shapes': null;
|
|
2292
|
+
'ungroup-shapes': null;
|
|
2293
|
+
'remove-frame': null;
|
|
2294
|
+
'fit-frame-to-content': null;
|
|
2295
|
+
'convert-to-embed': null;
|
|
2296
|
+
'convert-to-bookmark': null;
|
|
2297
|
+
'open-embed-link': null;
|
|
2298
|
+
'toggle-auto-size': null;
|
|
2299
|
+
'copy-as': {
|
|
2300
|
+
format: 'json' | 'png' | 'svg';
|
|
2301
|
+
};
|
|
2302
|
+
'export-as': {
|
|
2303
|
+
format: 'json' | 'png' | 'svg';
|
|
2304
|
+
};
|
|
2305
|
+
'edit-link': null;
|
|
2306
|
+
'insert-embed': null;
|
|
2307
|
+
'insert-media': null;
|
|
2308
|
+
'align-shapes': {
|
|
2309
|
+
operation: 'bottom' | 'center-horizontal' | 'center-vertical' | 'left' | 'right' | 'top';
|
|
2310
|
+
};
|
|
2311
|
+
'duplicate-shapes': null;
|
|
2312
|
+
'pack-shapes': null;
|
|
2313
|
+
'stack-shapes': {
|
|
2314
|
+
operation: 'horizontal' | 'vertical';
|
|
2315
|
+
};
|
|
2316
|
+
'flip-shapes': {
|
|
2317
|
+
operation: 'horizontal' | 'vertical';
|
|
2318
|
+
};
|
|
2319
|
+
'distribute-shapes': {
|
|
2320
|
+
operation: 'horizontal' | 'vertical';
|
|
2321
|
+
};
|
|
2322
|
+
'stretch-shapes': {
|
|
2323
|
+
operation: 'horizontal' | 'vertical';
|
|
2324
|
+
};
|
|
2325
|
+
'reorder-shapes': {
|
|
2326
|
+
operation: 'backward' | 'forward' | 'toBack' | 'toFront';
|
|
2327
|
+
};
|
|
2328
|
+
'delete-shapes': null;
|
|
2329
|
+
'select-all-shapes': null;
|
|
2330
|
+
'select-none-shapes': null;
|
|
2331
|
+
'rotate-ccw': null;
|
|
2332
|
+
'rotate-cw': null;
|
|
2333
|
+
'zoom-in': null;
|
|
2334
|
+
'zoom-out': null;
|
|
2335
|
+
'zoom-to-fit': null;
|
|
2336
|
+
'zoom-to-selection': null;
|
|
2337
|
+
'reset-zoom': null;
|
|
2338
|
+
'zoom-into-view': null;
|
|
2339
|
+
'zoom-to-content': null;
|
|
2340
|
+
'open-menu': {
|
|
2341
|
+
id: string;
|
|
2342
|
+
};
|
|
2343
|
+
'close-menu': {
|
|
2344
|
+
id: string;
|
|
2345
|
+
};
|
|
2346
|
+
'create-new-project': null;
|
|
2347
|
+
'save-project-to-file': null;
|
|
2348
|
+
'open-file': null;
|
|
2349
|
+
'select-tool': {
|
|
2350
|
+
id: string;
|
|
2351
|
+
};
|
|
2352
|
+
print: null;
|
|
2353
|
+
copy: null;
|
|
2354
|
+
paste: null;
|
|
2355
|
+
cut: null;
|
|
2356
|
+
'toggle-transparent': null;
|
|
2357
|
+
'toggle-snap-mode': null;
|
|
2358
|
+
'toggle-tool-lock': null;
|
|
2359
|
+
'toggle-grid-mode': null;
|
|
2360
|
+
'toggle-dark-mode': null;
|
|
2361
|
+
'toggle-focus-mode': null;
|
|
2362
|
+
'toggle-debug-mode': null;
|
|
2363
|
+
'toggle-lock': null;
|
|
2364
|
+
'toggle-reduce-motion': null;
|
|
2365
|
+
'exit-pen-mode': null;
|
|
2366
|
+
'stop-following': null;
|
|
2367
|
+
'open-cursor-chat': null;
|
|
2368
|
+
'zoom-tool': null;
|
|
2369
|
+
'unlock-all': null;
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
/** @public */
|
|
2373
|
+
export declare type TLUiEventSource = 'actions-menu' | 'context-menu' | 'debug-panel' | 'dialog' | 'export-menu' | 'help-menu' | 'helper-buttons' | 'kbd' | 'menu' | 'navigation-zone' | 'page-menu' | 'people-menu' | 'quick-actions' | 'share-menu' | 'toolbar' | 'unknown' | 'zoom-menu';
|
|
2374
|
+
|
|
2375
|
+
/** @public */
|
|
2376
|
+
export declare type TLUiHelpMenuSchemaContextType = TLUiMenuSchema;
|
|
2377
|
+
|
|
2378
|
+
/** @public */
|
|
2379
|
+
declare type TLUiHelpMenuSchemaProviderProps = {
|
|
2380
|
+
overrides?: (editor: Editor, schema: TLUiHelpMenuSchemaContextType, helpers: {
|
|
2381
|
+
actions: ReturnType<typeof useActions>;
|
|
2382
|
+
languages: readonly TLLanguage[];
|
|
2383
|
+
currentLanguage: string;
|
|
2384
|
+
oneSelected: boolean;
|
|
2385
|
+
twoSelected: boolean;
|
|
2386
|
+
threeSelected: boolean;
|
|
2387
|
+
}) => TLUiHelpMenuSchemaContextType;
|
|
2388
|
+
children: any;
|
|
2389
|
+
};
|
|
2390
|
+
|
|
2391
|
+
/** @public */
|
|
2392
|
+
export declare interface TLUiIconProps extends React.HTMLProps<HTMLDivElement> {
|
|
2393
|
+
icon: Exclude<string, TLUiIconType> | TLUiIconType;
|
|
2394
|
+
small?: boolean;
|
|
2395
|
+
color?: string;
|
|
2396
|
+
children?: undefined;
|
|
2397
|
+
invertIcon?: boolean;
|
|
2398
|
+
crossOrigin?: 'anonymous' | 'use-credentials';
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2401
|
+
/** @public */
|
|
2402
|
+
export declare type TLUiIconType = 'align-bottom-center' | 'align-bottom-left' | 'align-bottom-right' | 'align-bottom' | 'align-center-center' | 'align-center-horizontal' | 'align-center-left' | 'align-center-right' | 'align-center-vertical' | 'align-left' | 'align-right' | 'align-top-center' | 'align-top-left' | 'align-top-right' | 'align-top' | 'arrow-left' | 'arrowhead-arrow' | 'arrowhead-bar' | 'arrowhead-diamond' | 'arrowhead-dot' | 'arrowhead-none' | 'arrowhead-square' | 'arrowhead-triangle-inverted' | 'arrowhead-triangle' | 'aspect-ratio' | 'avatar' | 'blob' | 'bring-forward' | 'bring-to-front' | 'check' | 'checkbox-checked' | 'checkbox-empty' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'chevrons-ne' | 'chevrons-sw' | 'clipboard-copied' | 'clipboard-copy' | 'code' | 'collab' | 'color' | 'comment' | 'cross-2' | 'cross' | 'dash-dashed' | 'dash-dotted' | 'dash-draw' | 'dash-solid' | 'discord' | 'distribute-horizontal' | 'distribute-vertical' | 'dot' | 'dots-horizontal' | 'dots-vertical' | 'drag-handle-dots' | 'duplicate' | 'edit' | 'external-link' | 'file' | 'fill-none' | 'fill-pattern' | 'fill-semi' | 'fill-solid' | 'follow' | 'following' | 'font-draw' | 'font-mono' | 'font-sans' | 'font-serif' | 'geo-arrow-down' | 'geo-arrow-left' | 'geo-arrow-right' | 'geo-arrow-up' | 'geo-check-box' | 'geo-cloud' | 'geo-diamond' | 'geo-ellipse' | 'geo-hexagon' | 'geo-octagon' | 'geo-oval' | 'geo-pentagon' | 'geo-rectangle' | 'geo-rhombus-2' | 'geo-rhombus' | 'geo-star' | 'geo-trapezoid' | 'geo-triangle' | 'geo-x-box' | 'github' | 'group' | 'hidden' | 'image' | 'info-circle' | 'leading' | 'link' | 'lock-small' | 'lock' | 'menu' | 'minus' | 'mixed' | 'pack' | 'page' | 'plus' | 'question-mark-circle' | 'question-mark' | 'redo' | 'reset-zoom' | 'rotate-ccw' | 'rotate-cw' | 'ruler' | 'search' | 'send-backward' | 'send-to-back' | 'settings-horizontal' | 'settings-vertical-1' | 'settings-vertical' | 'share-1' | 'share-2' | 'size-extra-large' | 'size-large' | 'size-medium' | 'size-small' | 'spline-cubic' | 'spline-line' | 'stack-horizontal' | 'stack-vertical' | 'status-offline' | 'status-online' | 'stretch-horizontal' | 'stretch-vertical' | 'text-align-center' | 'text-align-justify' | 'text-align-left' | 'text-align-right' | 'tool-arrow' | 'tool-embed' | 'tool-eraser' | 'tool-frame' | 'tool-hand' | 'tool-highlight' | 'tool-laser' | 'tool-line' | 'tool-media' | 'tool-note' | 'tool-pencil' | 'tool-pointer' | 'tool-text' | 'trash' | 'triangle-down' | 'triangle-up' | 'twitter' | 'undo' | 'ungroup' | 'unlock-small' | 'unlock' | 'vertical-align-center' | 'vertical-align-end' | 'vertical-align-start' | 'visible' | 'warning-triangle' | 'zoom-in' | 'zoom-out';
|
|
2403
|
+
|
|
2404
|
+
/** @public */
|
|
2405
|
+
export declare interface TLUiInputProps {
|
|
2406
|
+
disabled?: boolean;
|
|
2407
|
+
label?: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;
|
|
2408
|
+
icon?: Exclude<string, TLUiIconType> | TLUiIconType;
|
|
2409
|
+
iconLeft?: Exclude<string, TLUiIconType> | TLUiIconType;
|
|
2410
|
+
autofocus?: boolean;
|
|
2411
|
+
autoselect?: boolean;
|
|
2412
|
+
children?: any;
|
|
2413
|
+
defaultValue?: string;
|
|
2414
|
+
placeholder?: string;
|
|
2415
|
+
onComplete?: (value: string) => void;
|
|
2416
|
+
onValueChange?: (value: string) => void;
|
|
2417
|
+
onCancel?: (value: string) => void;
|
|
2418
|
+
onBlur?: (value: string) => void;
|
|
2419
|
+
className?: string;
|
|
2420
|
+
/**
|
|
2421
|
+
* Usually on iOS when you focus an input, the browser will adjust the viewport to bring the input
|
|
2422
|
+
* into view. Sometimes this doesn't work properly though - for example, if the input is newly
|
|
2423
|
+
* created, iOS seems to have a hard time adjusting the viewport for it. This prop allows you to
|
|
2424
|
+
* opt-in to some extra code to manually bring the input into view when the visual viewport of the
|
|
2425
|
+
* browser changes, but we don't want to use it everywhere because generally the native behavior
|
|
2426
|
+
* looks nicer in scenarios where it's sufficient.
|
|
2427
|
+
*/
|
|
2428
|
+
shouldManuallyMaintainScrollPositionWhenFocused?: boolean;
|
|
2429
|
+
value?: string;
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
/** @public */
|
|
2433
|
+
export declare type TLUiKeyboardShortcutsSchemaContextType = TLUiMenuSchema;
|
|
2434
|
+
|
|
2435
|
+
/** @public */
|
|
2436
|
+
export declare type TLUiKeyboardShortcutsSchemaProviderProps = {
|
|
2437
|
+
overrides?: (editor: Editor, schema: TLUiKeyboardShortcutsSchemaContextType, more: {
|
|
2438
|
+
tools: TLUiToolsContextType;
|
|
2439
|
+
actions: TLUiActionsContextType;
|
|
2440
|
+
}) => TLUiKeyboardShortcutsSchemaContextType;
|
|
2441
|
+
children: any;
|
|
2442
|
+
};
|
|
2443
|
+
|
|
2444
|
+
/** @public */
|
|
2445
|
+
export declare type TLUiMenuChild<TranslationKey extends string = string> = null | TLUiCustomMenuItem | TLUiMenuGroup | TLUiMenuItem | TLUiSubMenu<TranslationKey>;
|
|
2446
|
+
|
|
2447
|
+
/** @public */
|
|
2448
|
+
export declare type TLUiMenuGroup = {
|
|
2449
|
+
id: string;
|
|
2450
|
+
type: 'group';
|
|
2451
|
+
checkbox: boolean;
|
|
2452
|
+
disabled: boolean;
|
|
2453
|
+
readonlyOk: boolean;
|
|
2454
|
+
children: TLUiMenuChild[];
|
|
2455
|
+
};
|
|
2456
|
+
|
|
2457
|
+
/** @public */
|
|
2458
|
+
export declare type TLUiMenuItem = {
|
|
2459
|
+
id: string;
|
|
2460
|
+
type: 'item';
|
|
2461
|
+
readonlyOk: boolean;
|
|
2462
|
+
actionItem: TLUiActionItem;
|
|
2463
|
+
disabled: boolean;
|
|
2464
|
+
checked: boolean;
|
|
2465
|
+
};
|
|
2466
|
+
|
|
2467
|
+
/** @public */
|
|
2468
|
+
export declare type TLUiMenuSchema = (TLUiCustomMenuItem | TLUiMenuGroup | TLUiMenuItem)[];
|
|
2469
|
+
|
|
2470
|
+
/** @public */
|
|
2471
|
+
export declare type TLUiMenuSchemaContextType = TLUiMenuSchema;
|
|
2472
|
+
|
|
2473
|
+
/** @public */
|
|
2474
|
+
export declare type TLUiMenuSchemaProviderProps = {
|
|
2475
|
+
overrides?: (editor: Editor, schema: TLUiMenuSchemaContextType, helpers: {
|
|
2476
|
+
actions: ReturnType<typeof useActions>;
|
|
2477
|
+
noneSelected: boolean;
|
|
2478
|
+
oneSelected: boolean;
|
|
2479
|
+
twoSelected: boolean;
|
|
2480
|
+
threeSelected: boolean;
|
|
2481
|
+
}) => TLUiMenuSchemaContextType;
|
|
2482
|
+
children: any;
|
|
2483
|
+
};
|
|
2484
|
+
|
|
2485
|
+
declare type TLUiOverride<Type, Helpers> = (editor: Editor, schema: Type, helpers: Helpers) => Type;
|
|
2486
|
+
|
|
2487
|
+
/** @public */
|
|
2488
|
+
export declare type TLUiOverrides = Partial<{
|
|
2489
|
+
actionsMenu: WithDefaultHelpers<NonNullable<ActionsMenuSchemaProviderProps['overrides']>>;
|
|
2490
|
+
actions: WithDefaultHelpers<NonNullable<ActionsProviderProps['overrides']>>;
|
|
2491
|
+
contextMenu: WithDefaultHelpers<NonNullable<TLUiContextMenuSchemaProviderProps['overrides']>>;
|
|
2492
|
+
helpMenu: WithDefaultHelpers<NonNullable<TLUiHelpMenuSchemaProviderProps['overrides']>>;
|
|
2493
|
+
menu: WithDefaultHelpers<NonNullable<TLUiMenuSchemaProviderProps['overrides']>>;
|
|
2494
|
+
toolbar: WithDefaultHelpers<NonNullable<TLUiToolbarSchemaProviderProps['overrides']>>;
|
|
2495
|
+
keyboardShortcutsMenu: WithDefaultHelpers<NonNullable<TLUiKeyboardShortcutsSchemaProviderProps['overrides']>>;
|
|
2496
|
+
tools: WithDefaultHelpers<NonNullable<TLUiToolsProviderProps['overrides']>>;
|
|
2497
|
+
translations: TLUiTranslationProviderProps['overrides'];
|
|
2498
|
+
}>;
|
|
2499
|
+
|
|
2500
|
+
/** @public */
|
|
2501
|
+
export declare type TLUiSubMenu<TranslationKey extends string = string> = {
|
|
2502
|
+
id: string;
|
|
2503
|
+
type: 'submenu';
|
|
2504
|
+
label: TranslationKey;
|
|
2505
|
+
disabled: boolean;
|
|
2506
|
+
readonlyOk: boolean;
|
|
2507
|
+
children: TLUiMenuChild[];
|
|
2508
|
+
};
|
|
2509
|
+
|
|
2510
|
+
/** @public */
|
|
2511
|
+
export declare interface TLUiToast {
|
|
2512
|
+
id: string;
|
|
2513
|
+
icon?: TLUiIconType;
|
|
2514
|
+
title?: string;
|
|
2515
|
+
description?: string;
|
|
2516
|
+
actions?: TLUiToastAction[];
|
|
2517
|
+
keepOpen?: boolean;
|
|
2518
|
+
closeLabel?: string;
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
/** @public */
|
|
2522
|
+
export declare interface TLUiToastAction {
|
|
2523
|
+
type: 'danger' | 'normal' | 'primary';
|
|
2524
|
+
label: string;
|
|
2525
|
+
onClick: () => void;
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
/** @public */
|
|
2529
|
+
export declare type TLUiToastsContextType = {
|
|
2530
|
+
addToast: (toast: Omit<TLUiToast, 'id'> & {
|
|
2531
|
+
id?: string;
|
|
2532
|
+
}) => string;
|
|
2533
|
+
removeToast: (id: TLUiToast['id']) => string;
|
|
2534
|
+
clearToasts: () => void;
|
|
2535
|
+
toasts: TLUiToast[];
|
|
2536
|
+
};
|
|
2537
|
+
|
|
2538
|
+
/** @public */
|
|
2539
|
+
export declare type TLUiToolbarItem = {
|
|
2540
|
+
id: string;
|
|
2541
|
+
type: 'item';
|
|
2542
|
+
readonlyOk: boolean;
|
|
2543
|
+
toolItem: TLUiToolItem;
|
|
2544
|
+
};
|
|
2545
|
+
|
|
2546
|
+
/** @public */
|
|
2547
|
+
export declare type TLUiToolbarSchemaContextType = TLUiToolbarItem[];
|
|
2548
|
+
|
|
2549
|
+
/** @public */
|
|
2550
|
+
declare type TLUiToolbarSchemaProviderProps = {
|
|
2551
|
+
overrides?: (editor: Editor, schema: TLUiToolbarSchemaContextType, more: {
|
|
2552
|
+
tools: TLUiToolsContextType;
|
|
2553
|
+
}) => TLUiToolbarSchemaContextType;
|
|
2554
|
+
children: any;
|
|
2555
|
+
};
|
|
2556
|
+
|
|
2557
|
+
/** @public */
|
|
2558
|
+
export declare interface TLUiToolItem<TranslationKey extends string = string, IconType extends string = string> {
|
|
2559
|
+
id: string;
|
|
2560
|
+
label: TranslationKey;
|
|
2561
|
+
shortcutsLabel?: TranslationKey;
|
|
2562
|
+
icon: IconType;
|
|
2563
|
+
onSelect: (source: TLUiEventSource) => void;
|
|
2564
|
+
kbd?: string;
|
|
2565
|
+
readonlyOk: boolean;
|
|
2566
|
+
meta?: {
|
|
2567
|
+
[key: string]: any;
|
|
2568
|
+
};
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
/** @public */
|
|
2572
|
+
export declare type TLUiToolsContextType = Record<string, TLUiToolItem>;
|
|
2573
|
+
|
|
2574
|
+
/** @public */
|
|
2575
|
+
export declare type TLUiToolsProviderProps = {
|
|
2576
|
+
overrides?: (editor: Editor, tools: TLUiToolsContextType, helpers: {
|
|
2577
|
+
insertMedia: () => void;
|
|
2578
|
+
}) => TLUiToolsContextType;
|
|
2579
|
+
children: any;
|
|
2580
|
+
};
|
|
2581
|
+
|
|
2582
|
+
/** @public */
|
|
2583
|
+
export declare type TLUiTranslation = {
|
|
2584
|
+
readonly locale: string;
|
|
2585
|
+
readonly label: string;
|
|
2586
|
+
readonly messages: Record<TLUiTranslationKey, string>;
|
|
2587
|
+
};
|
|
2588
|
+
|
|
2589
|
+
/** @public */
|
|
2590
|
+
export declare type TLUiTranslationContextType = TLUiTranslation;
|
|
2591
|
+
|
|
2592
|
+
/** @public */
|
|
2593
|
+
export declare type TLUiTranslationKey = 'action.align-bottom' | 'action.align-center-horizontal.short' | 'action.align-center-horizontal' | 'action.align-center-vertical.short' | 'action.align-center-vertical' | 'action.align-left' | 'action.align-right' | 'action.align-top' | 'action.back-to-content' | 'action.bring-forward' | 'action.bring-to-front' | 'action.convert-to-bookmark' | 'action.convert-to-embed' | 'action.copy-as-json.short' | 'action.copy-as-json' | 'action.copy-as-png.short' | 'action.copy-as-png' | 'action.copy-as-svg.short' | 'action.copy-as-svg' | 'action.copy' | 'action.cut' | 'action.delete' | 'action.distribute-horizontal.short' | 'action.distribute-horizontal' | 'action.distribute-vertical.short' | 'action.distribute-vertical' | 'action.duplicate' | 'action.edit-link' | 'action.exit-pen-mode' | 'action.export-as-json.short' | 'action.export-as-json' | 'action.export-as-png.short' | 'action.export-as-png' | 'action.export-as-svg.short' | 'action.export-as-svg' | 'action.fit-frame-to-content' | 'action.flip-horizontal.short' | 'action.flip-horizontal' | 'action.flip-vertical.short' | 'action.flip-vertical' | 'action.fork-project' | 'action.group' | 'action.insert-embed' | 'action.insert-media' | 'action.leave-shared-project' | 'action.new-project' | 'action.new-shared-project' | 'action.open-cursor-chat' | 'action.open-embed-link' | 'action.open-file' | 'action.pack' | 'action.paste' | 'action.print' | 'action.redo' | 'action.remove-frame' | 'action.rotate-ccw' | 'action.rotate-cw' | 'action.save-copy' | 'action.select-all' | 'action.select-none' | 'action.send-backward' | 'action.send-to-back' | 'action.share-project' | 'action.stack-horizontal.short' | 'action.stack-horizontal' | 'action.stack-vertical.short' | 'action.stack-vertical' | 'action.stop-following' | 'action.stretch-horizontal.short' | 'action.stretch-horizontal' | 'action.stretch-vertical.short' | 'action.stretch-vertical' | 'action.toggle-auto-size' | 'action.toggle-dark-mode.menu' | 'action.toggle-dark-mode' | 'action.toggle-debug-mode.menu' | 'action.toggle-debug-mode' | 'action.toggle-focus-mode.menu' | 'action.toggle-focus-mode' | 'action.toggle-grid.menu' | 'action.toggle-grid' | 'action.toggle-lock' | 'action.toggle-reduce-motion.menu' | 'action.toggle-reduce-motion' | 'action.toggle-snap-mode.menu' | 'action.toggle-snap-mode' | 'action.toggle-tool-lock.menu' | 'action.toggle-tool-lock' | 'action.toggle-transparent.context-menu' | 'action.toggle-transparent.menu' | 'action.toggle-transparent' | 'action.undo' | 'action.ungroup' | 'action.unlock-all' | 'action.zoom-in' | 'action.zoom-out' | 'action.zoom-to-100' | 'action.zoom-to-fit' | 'action.zoom-to-selection' | 'actions-menu.title' | 'align-style.end' | 'align-style.justify' | 'align-style.middle' | 'align-style.start' | 'arrowheadEnd-style.arrow' | 'arrowheadEnd-style.bar' | 'arrowheadEnd-style.diamond' | 'arrowheadEnd-style.dot' | 'arrowheadEnd-style.inverted' | 'arrowheadEnd-style.none' | 'arrowheadEnd-style.pipe' | 'arrowheadEnd-style.square' | 'arrowheadEnd-style.triangle' | 'arrowheadStart-style.arrow' | 'arrowheadStart-style.bar' | 'arrowheadStart-style.diamond' | 'arrowheadStart-style.dot' | 'arrowheadStart-style.inverted' | 'arrowheadStart-style.none' | 'arrowheadStart-style.pipe' | 'arrowheadStart-style.square' | 'arrowheadStart-style.triangle' | 'color-style.black' | 'color-style.blue' | 'color-style.green' | 'color-style.grey' | 'color-style.light-blue' | 'color-style.light-green' | 'color-style.light-red' | 'color-style.light-violet' | 'color-style.orange' | 'color-style.red' | 'color-style.violet' | 'color-style.yellow' | 'context-menu.arrange' | 'context-menu.copy-as' | 'context-menu.export-as' | 'context-menu.move-to-page' | 'context-menu.reorder' | 'context.pages.new-page' | 'cursor-chat.type-to-chat' | 'dash-style.dashed' | 'dash-style.dotted' | 'dash-style.draw' | 'dash-style.solid' | 'debug-panel.more' | 'edit-link-dialog.cancel' | 'edit-link-dialog.clear' | 'edit-link-dialog.detail' | 'edit-link-dialog.invalid-url' | 'edit-link-dialog.save' | 'edit-link-dialog.title' | 'edit-link-dialog.url' | 'edit-pages-dialog.move-down' | 'edit-pages-dialog.move-up' | 'embed-dialog.back' | 'embed-dialog.cancel' | 'embed-dialog.create' | 'embed-dialog.instruction' | 'embed-dialog.invalid-url' | 'embed-dialog.title' | 'embed-dialog.url' | 'file-system.confirm-clear.cancel' | 'file-system.confirm-clear.continue' | 'file-system.confirm-clear.description' | 'file-system.confirm-clear.dont-show-again' | 'file-system.confirm-clear.title' | 'file-system.confirm-open.cancel' | 'file-system.confirm-open.description' | 'file-system.confirm-open.dont-show-again' | 'file-system.confirm-open.open' | 'file-system.confirm-open.title' | 'file-system.file-open-error.file-format-version-too-new' | 'file-system.file-open-error.generic-corrupted-file' | 'file-system.file-open-error.not-a-tldraw-file' | 'file-system.file-open-error.title' | 'file-system.shared-document-file-open-error.description' | 'file-system.shared-document-file-open-error.title' | 'fill-style.none' | 'fill-style.pattern' | 'fill-style.semi' | 'fill-style.solid' | 'focus-mode.toggle-focus-mode' | 'font-style.draw' | 'font-style.mono' | 'font-style.sans' | 'font-style.serif' | 'geo-style.arrow-down' | 'geo-style.arrow-left' | 'geo-style.arrow-right' | 'geo-style.arrow-up' | 'geo-style.check-box' | 'geo-style.cloud' | 'geo-style.diamond' | 'geo-style.ellipse' | 'geo-style.hexagon' | 'geo-style.octagon' | 'geo-style.oval' | 'geo-style.pentagon' | 'geo-style.rectangle' | 'geo-style.rhombus-2' | 'geo-style.rhombus' | 'geo-style.star' | 'geo-style.trapezoid' | 'geo-style.triangle' | 'geo-style.x-box' | 'help-menu.about' | 'help-menu.discord' | 'help-menu.github' | 'help-menu.keyboard-shortcuts' | 'help-menu.title' | 'help-menu.twitter' | 'home-project-dialog.description' | 'home-project-dialog.ok' | 'home-project-dialog.title' | 'menu.copy-as' | 'menu.edit' | 'menu.export-as' | 'menu.file' | 'menu.language' | 'menu.preferences' | 'menu.title' | 'menu.view' | 'navigation-zone.toggle-minimap' | 'navigation-zone.zoom' | 'opacity-style.0.1' | 'opacity-style.0.25' | 'opacity-style.0.5' | 'opacity-style.0.75' | 'opacity-style.1' | 'page-menu.create-new-page' | 'page-menu.edit-done' | 'page-menu.edit-start' | 'page-menu.go-to-page' | 'page-menu.max-page-count-reached' | 'page-menu.new-page-initial-name' | 'page-menu.submenu.delete' | 'page-menu.submenu.duplicate-page' | 'page-menu.submenu.move-down' | 'page-menu.submenu.move-up' | 'page-menu.submenu.rename' | 'page-menu.submenu.title' | 'page-menu.title' | 'people-menu.change-color' | 'people-menu.change-name' | 'people-menu.follow' | 'people-menu.following' | 'people-menu.invite' | 'people-menu.leading' | 'people-menu.title' | 'people-menu.user' | 'rename-project-dialog.cancel' | 'rename-project-dialog.rename' | 'rename-project-dialog.title' | 'share-menu.copy-link-note' | 'share-menu.copy-link' | 'share-menu.copy-readonly-link-note' | 'share-menu.copy-readonly-link' | 'share-menu.create-snapshot-link' | 'share-menu.default-project-name' | 'share-menu.fork-note' | 'share-menu.offline-note' | 'share-menu.project-too-large' | 'share-menu.readonly-link' | 'share-menu.save-note' | 'share-menu.share-project' | 'share-menu.snapshot-link-note' | 'share-menu.title' | 'share-menu.upload-failed' | 'sharing.confirm-leave.cancel' | 'sharing.confirm-leave.description' | 'sharing.confirm-leave.dont-show-again' | 'sharing.confirm-leave.leave' | 'sharing.confirm-leave.title' | 'shortcuts-dialog.collaboration' | 'shortcuts-dialog.edit' | 'shortcuts-dialog.file' | 'shortcuts-dialog.preferences' | 'shortcuts-dialog.title' | 'shortcuts-dialog.tools' | 'shortcuts-dialog.transform' | 'shortcuts-dialog.view' | 'size-style.l' | 'size-style.m' | 'size-style.s' | 'size-style.xl' | 'spline-style.cubic' | 'spline-style.line' | 'status.offline' | 'status.online' | 'style-panel.align' | 'style-panel.arrowhead-end' | 'style-panel.arrowhead-start' | 'style-panel.arrowheads' | 'style-panel.color' | 'style-panel.dash' | 'style-panel.fill' | 'style-panel.font' | 'style-panel.geo' | 'style-panel.mixed' | 'style-panel.opacity' | 'style-panel.position' | 'style-panel.size' | 'style-panel.spline' | 'style-panel.title' | 'style-panel.vertical-align' | 'toast.close' | 'toast.error.copy-fail.desc' | 'toast.error.copy-fail.title' | 'toast.error.export-fail.desc' | 'toast.error.export-fail.title' | 'tool-panel.drawing' | 'tool-panel.more' | 'tool-panel.shapes' | 'tool.arrow-down' | 'tool.arrow-left' | 'tool.arrow-right' | 'tool.arrow-up' | 'tool.arrow' | 'tool.asset' | 'tool.check-box' | 'tool.cloud' | 'tool.diamond' | 'tool.draw' | 'tool.ellipse' | 'tool.embed' | 'tool.eraser' | 'tool.frame' | 'tool.hand' | 'tool.hexagon' | 'tool.highlight' | 'tool.laser' | 'tool.line' | 'tool.note' | 'tool.octagon' | 'tool.oval' | 'tool.pentagon' | 'tool.rectangle' | 'tool.rhombus' | 'tool.select' | 'tool.star' | 'tool.text' | 'tool.trapezoid' | 'tool.triangle' | 'tool.x-box' | 'vscode.file-open.backup-failed' | 'vscode.file-open.backup-saved' | 'vscode.file-open.backup' | 'vscode.file-open.desc' | 'vscode.file-open.dont-show-again' | 'vscode.file-open.open';
|
|
2594
|
+
|
|
2595
|
+
/** @public */
|
|
2596
|
+
declare interface TLUiTranslationProviderProps {
|
|
2597
|
+
children: any;
|
|
2598
|
+
/**
|
|
2599
|
+
* A collection of overrides different locales.
|
|
2600
|
+
*
|
|
2601
|
+
* @example
|
|
2602
|
+
*
|
|
2603
|
+
* ```ts
|
|
2604
|
+
* <TranslationProvider overrides={{ en: { 'style-panel.styles': 'Properties' } }} />
|
|
2605
|
+
* ```
|
|
2606
|
+
*/
|
|
2607
|
+
overrides?: Record<string, Record<string, string>>;
|
|
2608
|
+
}
|
|
2609
|
+
|
|
2610
|
+
declare interface TLV1Asset {
|
|
2611
|
+
id: string;
|
|
2612
|
+
type: string;
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
declare interface TLV1Binding {
|
|
2616
|
+
id: string;
|
|
2617
|
+
toId: string;
|
|
2618
|
+
fromId: string;
|
|
2619
|
+
}
|
|
2620
|
+
|
|
2621
|
+
declare interface TLV1Bounds {
|
|
2622
|
+
minX: number;
|
|
2623
|
+
minY: number;
|
|
2624
|
+
maxX: number;
|
|
2625
|
+
maxY: number;
|
|
2626
|
+
width: number;
|
|
2627
|
+
height: number;
|
|
2628
|
+
rotation?: number;
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
declare interface TLV1Handle {
|
|
2632
|
+
id: string;
|
|
2633
|
+
index: number;
|
|
2634
|
+
point: number[];
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
declare interface TLV1PageState {
|
|
2638
|
+
id: string;
|
|
2639
|
+
selectedIds: string[];
|
|
2640
|
+
camera: {
|
|
2641
|
+
point: number[];
|
|
2642
|
+
zoom: number;
|
|
2643
|
+
};
|
|
2644
|
+
brush?: null | TLV1Bounds;
|
|
2645
|
+
pointedId?: null | string;
|
|
2646
|
+
hoveredId?: null | string;
|
|
2647
|
+
editingId?: null | string;
|
|
2648
|
+
bindingId?: null | string;
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
declare interface TLV1Shape {
|
|
2652
|
+
id: string;
|
|
2653
|
+
type: string;
|
|
2654
|
+
parentId: string;
|
|
2655
|
+
childIndex: number;
|
|
2656
|
+
name: string;
|
|
2657
|
+
point: number[];
|
|
2658
|
+
assetId?: string;
|
|
2659
|
+
rotation?: number;
|
|
2660
|
+
children?: string[];
|
|
2661
|
+
handles?: Record<string, TLV1Handle>;
|
|
2662
|
+
isGhost?: boolean;
|
|
2663
|
+
isHidden?: boolean;
|
|
2664
|
+
isLocked?: boolean;
|
|
2665
|
+
isGenerated?: boolean;
|
|
2666
|
+
isAspectRatioLocked?: boolean;
|
|
2667
|
+
}
|
|
2668
|
+
|
|
2669
|
+
/** @public */
|
|
2670
|
+
export declare function toolbarItem(toolItem: TLUiToolItem): TLUiToolbarItem;
|
|
2671
|
+
|
|
2672
|
+
declare class Translating extends StateNode {
|
|
2673
|
+
static id: string;
|
|
2674
|
+
info: TLBaseEventInfo & {
|
|
2675
|
+
type: "pointer";
|
|
2676
|
+
name: TLPointerEventName;
|
|
2677
|
+
point: VecLike;
|
|
2678
|
+
pointerId: number;
|
|
2679
|
+
button: number;
|
|
2680
|
+
isPen: boolean;
|
|
2681
|
+
} & {
|
|
2682
|
+
target: "shape";
|
|
2683
|
+
shape: TLShape;
|
|
2684
|
+
} & {
|
|
2685
|
+
target: 'shape';
|
|
2686
|
+
isCreating?: boolean | undefined;
|
|
2687
|
+
onCreate?: (() => void) | undefined;
|
|
2688
|
+
onInteractionEnd?: string | undefined;
|
|
2689
|
+
};
|
|
2690
|
+
selectionSnapshot: TranslatingSnapshot;
|
|
2691
|
+
snapshot: TranslatingSnapshot;
|
|
2692
|
+
markId: string;
|
|
2693
|
+
isCloning: boolean;
|
|
2694
|
+
isCreating: boolean;
|
|
2695
|
+
onCreate: (shape: null | TLShape) => void;
|
|
2696
|
+
dragAndDropManager: DragAndDropManager;
|
|
2697
|
+
onEnter: (info: TLPointerEventInfo & {
|
|
2698
|
+
target: 'shape';
|
|
2699
|
+
isCreating?: boolean;
|
|
2700
|
+
onCreate?: () => void;
|
|
2701
|
+
onInteractionEnd?: string;
|
|
2702
|
+
}) => void;
|
|
2703
|
+
onExit: () => void;
|
|
2704
|
+
onPointerMove: () => void;
|
|
2705
|
+
onKeyDown: () => void;
|
|
2706
|
+
onKeyUp: TLEventHandlers['onKeyUp'];
|
|
2707
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
2708
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
2709
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
2710
|
+
protected startCloning(): void;
|
|
2711
|
+
protected stopCloning(): void;
|
|
2712
|
+
updateParent: () => void;
|
|
2713
|
+
reset(): void;
|
|
2714
|
+
protected complete(): void;
|
|
2715
|
+
private cancel;
|
|
2716
|
+
protected handleStart(): void;
|
|
2717
|
+
protected handleEnd(): void;
|
|
2718
|
+
protected handleChange(): void;
|
|
2719
|
+
protected updateShapes(): void;
|
|
2720
|
+
protected updateParentTransforms: () => void;
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
declare class TranslatingCrop extends StateNode {
|
|
2724
|
+
static id: string;
|
|
2725
|
+
info: TLBaseEventInfo & {
|
|
2726
|
+
type: "pointer";
|
|
2727
|
+
name: TLPointerEventName;
|
|
2728
|
+
point: VecLike;
|
|
2729
|
+
pointerId: number;
|
|
2730
|
+
button: number;
|
|
2731
|
+
isPen: boolean;
|
|
2732
|
+
} & {
|
|
2733
|
+
target: "shape";
|
|
2734
|
+
shape: TLShape;
|
|
2735
|
+
} & {
|
|
2736
|
+
target: 'shape';
|
|
2737
|
+
isCreating?: boolean | undefined;
|
|
2738
|
+
onInteractionEnd?: string | undefined;
|
|
2739
|
+
};
|
|
2740
|
+
markId: string;
|
|
2741
|
+
private snapshot;
|
|
2742
|
+
onEnter: (info: TLPointerEventInfo & {
|
|
2743
|
+
target: 'shape';
|
|
2744
|
+
isCreating?: boolean;
|
|
2745
|
+
onInteractionEnd?: string;
|
|
2746
|
+
}) => void;
|
|
2747
|
+
onExit: () => void;
|
|
2748
|
+
onPointerMove: () => void;
|
|
2749
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
2750
|
+
onComplete: TLEventHandlers['onComplete'];
|
|
2751
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
2752
|
+
onKeyDown: TLEventHandlers['onKeyDown'];
|
|
2753
|
+
onKeyUp: TLEventHandlers['onKeyUp'];
|
|
2754
|
+
protected complete(): void;
|
|
2755
|
+
private cancel;
|
|
2756
|
+
private createSnapshot;
|
|
2757
|
+
protected updateShapes(): void;
|
|
2758
|
+
}
|
|
2759
|
+
|
|
2760
|
+
declare type TranslatingSnapshot = ReturnType<typeof getTranslatingSnapshot>;
|
|
2761
|
+
|
|
2762
|
+
declare interface TriangleShape extends TDBaseShape {
|
|
2763
|
+
type: TDShapeType.Triangle;
|
|
2764
|
+
size: number[];
|
|
2765
|
+
label?: string;
|
|
2766
|
+
labelPoint?: number[];
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
/** @public */
|
|
2770
|
+
declare function Trigger({ children, 'data-testid': testId, }: {
|
|
2771
|
+
children: any;
|
|
2772
|
+
'data-testid'?: string;
|
|
2773
|
+
}): JSX.Element;
|
|
2774
|
+
|
|
2775
|
+
/** @public */
|
|
2776
|
+
export declare const truncateStringWithEllipsis: (str: string, maxLength: number) => string;
|
|
2777
|
+
|
|
2778
|
+
/** @public */
|
|
2779
|
+
export declare function UiEventsProvider({ onEvent, children }: EventsProviderProps): JSX.Element;
|
|
2780
|
+
|
|
2781
|
+
/** @public */
|
|
2782
|
+
export declare function useActions(): TLUiActionsContextType;
|
|
2783
|
+
|
|
2784
|
+
/** @public */
|
|
2785
|
+
export declare function useActionsMenuSchema(): TLUiMenuSchema;
|
|
2786
|
+
|
|
2787
|
+
/* Excluded from this release type: useAssetUrls */
|
|
2788
|
+
|
|
2789
|
+
/** @public */
|
|
2790
|
+
export declare function useBreakpoint(): number;
|
|
2791
|
+
|
|
2792
|
+
/** @public */
|
|
2793
|
+
export declare function useCanRedo(): boolean;
|
|
2794
|
+
|
|
2795
|
+
/** @public */
|
|
2796
|
+
export declare function useCanUndo(): boolean;
|
|
2797
|
+
|
|
2798
|
+
/** @public */
|
|
2799
|
+
export declare function useContextMenuSchema(): TLUiMenuSchema;
|
|
2800
|
+
|
|
2801
|
+
/** @public */
|
|
2802
|
+
export declare function useCopyAs(): (ids: TLShapeId[], format?: TLCopyType) => void;
|
|
2803
|
+
|
|
2804
|
+
/** @public */
|
|
2805
|
+
export declare function useDefaultHelpers(): {
|
|
2806
|
+
addToast: (toast: Omit<TLUiToast, "id"> & {
|
|
2807
|
+
id?: string | undefined;
|
|
2808
|
+
}) => string;
|
|
2809
|
+
removeToast: (id: string) => string;
|
|
2810
|
+
clearToasts: () => void;
|
|
2811
|
+
addDialog: (dialog: Omit<TLUiDialog, "id"> & {
|
|
2812
|
+
id?: string | undefined;
|
|
2813
|
+
}) => string;
|
|
2814
|
+
clearDialogs: () => void;
|
|
2815
|
+
removeDialog: (id: string) => string;
|
|
2816
|
+
updateDialog: (id: string, newDialogData: Partial<TLUiDialog>) => string;
|
|
2817
|
+
msg: (id: string) => string;
|
|
2818
|
+
isMobile: boolean;
|
|
2819
|
+
};
|
|
2820
|
+
|
|
2821
|
+
/** @public */
|
|
2822
|
+
export declare function useDialogs(): TLUiDialogsContextType;
|
|
2823
|
+
|
|
2824
|
+
/** @public */
|
|
2825
|
+
export declare function useExportAs(): (ids: TLShapeId[], format?: TLExportType) => void;
|
|
2826
|
+
|
|
2827
|
+
/** @public */
|
|
2828
|
+
export declare function useHelpMenuSchema(): TLUiMenuSchema;
|
|
2829
|
+
|
|
2830
|
+
/** @public */
|
|
2831
|
+
export declare function useKeyboardShortcuts(): void;
|
|
2832
|
+
|
|
2833
|
+
/** @public */
|
|
2834
|
+
export declare function useKeyboardShortcutsSchema(): TLUiKeyboardShortcutsSchemaContextType;
|
|
2835
|
+
|
|
2836
|
+
/** @public */
|
|
2837
|
+
export declare function useLocalStorageState<T = any>(key: string, defaultValue: T): readonly [T, (setter: ((value: T) => T) | T) => void];
|
|
2838
|
+
|
|
2839
|
+
/** @public */
|
|
2840
|
+
export declare function useMenuClipboardEvents(): {
|
|
2841
|
+
copy: (source: TLUiEventSource) => void;
|
|
2842
|
+
cut: (source: TLUiEventSource) => void;
|
|
2843
|
+
paste: (data: ClipboardItem[] | DataTransfer, source: TLUiEventSource, point?: VecLike) => Promise<void>;
|
|
2844
|
+
};
|
|
2845
|
+
|
|
2846
|
+
/** @public */
|
|
2847
|
+
export declare function useMenuIsOpen(id: string, cb?: (isOpen: boolean) => void): readonly [boolean, (isOpen: boolean) => void];
|
|
2848
|
+
|
|
2849
|
+
/** @public */
|
|
2850
|
+
export declare function useMenuSchema(): TLUiMenuSchema;
|
|
2851
|
+
|
|
2852
|
+
/** @public */
|
|
2853
|
+
export declare function useNativeClipboardEvents(): void;
|
|
2854
|
+
|
|
2855
|
+
/** @public */
|
|
2856
|
+
export declare function useReadonly(): boolean;
|
|
2857
|
+
|
|
2858
|
+
/** @public */
|
|
2859
|
+
export declare function useToasts(): TLUiToastsContextType;
|
|
2860
|
+
|
|
2861
|
+
/** @public */
|
|
2862
|
+
export declare function useToolbarSchema(): TLUiToolbarSchemaContextType;
|
|
2863
|
+
|
|
2864
|
+
/** @public */
|
|
2865
|
+
export declare function useTools(): TLUiToolsContextType;
|
|
2866
|
+
|
|
2867
|
+
/**
|
|
2868
|
+
* Returns a function to translate a translation key into a string based on the current translation.
|
|
2869
|
+
*
|
|
2870
|
+
* @example
|
|
2871
|
+
*
|
|
2872
|
+
* ```ts
|
|
2873
|
+
* const msg = useTranslation()
|
|
2874
|
+
* const label = msg('style-panel.styles')
|
|
2875
|
+
* ```
|
|
2876
|
+
*
|
|
2877
|
+
* @public
|
|
2878
|
+
*/
|
|
2879
|
+
export declare function useTranslation(): (id: Exclude<string, TLUiTranslationKey> | string) => string;
|
|
2880
|
+
|
|
2881
|
+
/** @public */
|
|
2882
|
+
export declare function useUiEvents(): TLUiEventContextType;
|
|
2883
|
+
|
|
2884
|
+
declare interface VideoShape extends TDBaseShape {
|
|
2885
|
+
type: TDShapeType.Video;
|
|
2886
|
+
size: number[];
|
|
2887
|
+
assetId: string;
|
|
2888
|
+
isPlaying: boolean;
|
|
2889
|
+
currentTime: number;
|
|
2890
|
+
}
|
|
2891
|
+
|
|
2892
|
+
/** @public */
|
|
2893
|
+
export declare class VideoShapeUtil extends BaseBoxShapeUtil<TLVideoShape> {
|
|
2894
|
+
static type: "video";
|
|
2895
|
+
static props: {
|
|
2896
|
+
w: Validator<number>;
|
|
2897
|
+
h: Validator<number>;
|
|
2898
|
+
time: Validator<number>;
|
|
2899
|
+
playing: Validator<boolean>;
|
|
2900
|
+
url: Validator<string>;
|
|
2901
|
+
assetId: Validator<TLAssetId | null>;
|
|
2902
|
+
};
|
|
2903
|
+
static migrations: Migrations;
|
|
2904
|
+
canEdit: () => boolean;
|
|
2905
|
+
isAspectRatioLocked: () => boolean;
|
|
2906
|
+
getDefaultProps(): TLVideoShape['props'];
|
|
2907
|
+
component(shape: TLVideoShape): JSX.Element;
|
|
2908
|
+
indicator(shape: TLVideoShape): JSX.Element;
|
|
2909
|
+
toSvg(shape: TLVideoShape): SVGGElement;
|
|
2910
|
+
}
|
|
2911
|
+
|
|
2912
|
+
declare type WithDefaultHelpers<T extends TLUiOverride<any, any>> = T extends TLUiOverride<infer Type, infer Helpers> ? TLUiOverride<Type, Helpers extends undefined ? DefaultHelpers : Helpers & DefaultHelpers> : never;
|
|
2913
|
+
|
|
2914
|
+
declare class ZoomBrushing extends StateNode {
|
|
2915
|
+
static id: string;
|
|
2916
|
+
info: TLPointerEventInfo & {
|
|
2917
|
+
onInteractionEnd?: string | undefined;
|
|
2918
|
+
};
|
|
2919
|
+
zoomBrush: Box2d;
|
|
2920
|
+
onEnter: (info: TLPointerEventInfo & {
|
|
2921
|
+
onInteractionEnd: string;
|
|
2922
|
+
}) => void;
|
|
2923
|
+
onExit: () => void;
|
|
2924
|
+
onPointerMove: () => void;
|
|
2925
|
+
onPointerUp: TLEventHandlers['onPointerUp'];
|
|
2926
|
+
onCancel: TLEventHandlers['onCancel'];
|
|
2927
|
+
private update;
|
|
2928
|
+
private cancel;
|
|
2929
|
+
private complete;
|
|
2930
|
+
}
|
|
2931
|
+
|
|
2932
|
+
/** @public */
|
|
2933
|
+
export declare class ZoomTool extends StateNode {
|
|
2934
|
+
static id: string;
|
|
2935
|
+
static initial: string;
|
|
2936
|
+
static children: () => (typeof Idle_12 | typeof Pointing_8 | typeof ZoomBrushing)[];
|
|
2937
|
+
info: TLPointerEventInfo & {
|
|
2938
|
+
onInteractionEnd?: string | undefined;
|
|
2939
|
+
};
|
|
2940
|
+
onEnter: (info: TLPointerEventInfo & {
|
|
2941
|
+
onInteractionEnd: string;
|
|
2942
|
+
}) => void;
|
|
2943
|
+
onExit: () => void;
|
|
2944
|
+
onKeyDown: TLKeyboardEvent | undefined;
|
|
2945
|
+
onKeyUp: TLKeyboardEvent;
|
|
2946
|
+
onInterrupt: TLInterruptEvent;
|
|
2947
|
+
private complete;
|
|
2948
|
+
private updateCursor;
|
|
2949
|
+
}
|
|
2950
|
+
|
|
2951
|
+
|
|
2952
|
+
export * from "@bigbluebutton/editor";
|
|
2953
|
+
|
|
2954
|
+
export { }
|