tldraw 4.4.0 → 4.5.0-canary.017db55bc43e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.d.ts +178 -142
- package/dist-cjs/index.js +5 -2
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/bindings/arrow/ArrowBindingUtil.js +2 -1
- package/dist-cjs/lib/bindings/arrow/ArrowBindingUtil.js.map +2 -2
- package/dist-cjs/lib/defaultExternalContentHandlers.js +47 -10
- package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +10 -9
- package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/arrowLabel.js +5 -5
- package/dist-cjs/lib/shapes/arrow/arrowLabel.js.map +2 -2
- package/dist-cjs/lib/shapes/arrow/getArrowInfo.js +72 -0
- package/dist-cjs/lib/shapes/arrow/getArrowInfo.js.map +7 -0
- package/dist-cjs/lib/shapes/arrow/shared.js +0 -46
- package/dist-cjs/lib/shapes/arrow/shared.js.map +2 -2
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +1 -0
- package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/draw/toolStates/Drawing.js +1 -1
- package/dist-cjs/lib/shapes/draw/toolStates/Drawing.js.map +2 -2
- package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +2 -9
- package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js +2 -2
- package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js.map +2 -2
- package/dist-cjs/lib/shapes/frame/frameHelpers.js +8 -2
- package/dist-cjs/lib/shapes/frame/frameHelpers.js.map +2 -2
- package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +4 -2
- package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/image/ImageShapeUtil.js +1 -0
- package/dist-cjs/lib/shapes/image/ImageShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +1 -0
- package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/RichTextLabel.js +1 -0
- package/dist-cjs/lib/shapes/shared/RichTextLabel.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/crop.js +4 -2
- package/dist-cjs/lib/shapes/shared/crop.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/freehand/getStrokePoints.js +5 -15
- package/dist-cjs/lib/shapes/shared/freehand/getStrokePoints.js.map +2 -2
- package/dist-cjs/lib/shapes/shared/freehand/svg.js.map +1 -1
- package/dist-cjs/lib/shapes/shared/legacyProps.js +1 -0
- package/dist-cjs/lib/shapes/shared/legacyProps.js.map +2 -2
- package/dist-cjs/lib/shapes/text/RichTextArea.js +2 -0
- package/dist-cjs/lib/shapes/text/RichTextArea.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js.map +1 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingHandle.js +1 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/PointingHandle.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js +1 -0
- package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js +4 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js.map +2 -2
- package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js +1 -1
- package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js.map +2 -2
- package/dist-cjs/lib/tools/selection-logic/updateHoveredShapeId.js +4 -3
- package/dist-cjs/lib/tools/selection-logic/updateHoveredShapeId.js.map +2 -2
- package/dist-cjs/lib/ui/components/A11y.js +1 -0
- package/dist-cjs/lib/ui/components/A11y.js.map +2 -2
- package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js +1 -0
- package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js.map +2 -2
- package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js +1 -1
- package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js.map +2 -2
- package/dist-cjs/lib/ui/components/menu-items.js +9 -34
- package/dist-cjs/lib/ui/components/menu-items.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/TldrawUiInput.js +2 -1
- package/dist-cjs/lib/ui/components/primitives/TldrawUiInput.js.map +2 -2
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +1 -0
- package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +2 -2
- package/dist-cjs/lib/ui/hooks/menu-hooks.js +5 -0
- package/dist-cjs/lib/ui/hooks/menu-hooks.js.map +2 -2
- package/dist-cjs/lib/ui/version.js +3 -3
- package/dist-cjs/lib/ui/version.js.map +1 -1
- package/dist-cjs/lib/utils/embeds/embeds.js +4 -2
- package/dist-cjs/lib/utils/embeds/embeds.js.map +2 -2
- package/dist-cjs/lib/utils/svg/sanitizeSvg.js +558 -0
- package/dist-cjs/lib/utils/svg/sanitizeSvg.js.map +7 -0
- package/dist-esm/index.d.mts +178 -142
- package/dist-esm/index.mjs +4 -2
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/bindings/arrow/ArrowBindingUtil.mjs +2 -1
- package/dist-esm/lib/bindings/arrow/ArrowBindingUtil.mjs.map +2 -2
- package/dist-esm/lib/defaultExternalContentHandlers.mjs +37 -10
- package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +1 -1
- package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/arrow/arrowLabel.mjs +1 -1
- package/dist-esm/lib/shapes/arrow/arrowLabel.mjs.map +1 -1
- package/dist-esm/lib/shapes/arrow/getArrowInfo.mjs +54 -0
- package/dist-esm/lib/shapes/arrow/getArrowInfo.mjs.map +7 -0
- package/dist-esm/lib/shapes/arrow/shared.mjs +0 -47
- package/dist-esm/lib/shapes/arrow/shared.mjs.map +2 -2
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +1 -0
- package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/draw/toolStates/Drawing.mjs +1 -1
- package/dist-esm/lib/shapes/draw/toolStates/Drawing.mjs.map +2 -2
- package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +2 -8
- package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs +1 -1
- package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs.map +1 -1
- package/dist-esm/lib/shapes/frame/frameHelpers.mjs +7 -1
- package/dist-esm/lib/shapes/frame/frameHelpers.mjs.map +2 -2
- package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +4 -2
- package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs +1 -0
- package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +1 -0
- package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/RichTextLabel.mjs +1 -0
- package/dist-esm/lib/shapes/shared/RichTextLabel.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/crop.mjs +4 -2
- package/dist-esm/lib/shapes/shared/crop.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/freehand/getStrokePoints.mjs +5 -15
- package/dist-esm/lib/shapes/shared/freehand/getStrokePoints.mjs.map +2 -2
- package/dist-esm/lib/shapes/shared/freehand/svg.mjs.map +1 -1
- package/dist-esm/lib/shapes/shared/legacyProps.mjs +1 -0
- package/dist-esm/lib/shapes/shared/legacyProps.mjs.map +2 -2
- package/dist-esm/lib/shapes/text/RichTextArea.mjs +2 -0
- package/dist-esm/lib/shapes/text/RichTextArea.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs.map +1 -1
- package/dist-esm/lib/tools/SelectTool/childStates/PointingHandle.mjs +1 -0
- package/dist-esm/lib/tools/SelectTool/childStates/PointingHandle.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs +1 -0
- package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs +4 -1
- package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs.map +2 -2
- package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs +1 -1
- package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs.map +2 -2
- package/dist-esm/lib/tools/selection-logic/updateHoveredShapeId.mjs +4 -3
- package/dist-esm/lib/tools/selection-logic/updateHoveredShapeId.mjs.map +2 -2
- package/dist-esm/lib/ui/components/A11y.mjs +1 -0
- package/dist-esm/lib/ui/components/A11y.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs +1 -0
- package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs.map +2 -2
- package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs +1 -1
- package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs.map +2 -2
- package/dist-esm/lib/ui/components/menu-items.mjs +10 -34
- package/dist-esm/lib/ui/components/menu-items.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/TldrawUiInput.mjs +2 -1
- package/dist-esm/lib/ui/components/primitives/TldrawUiInput.mjs.map +2 -2
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +1 -0
- package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +2 -2
- package/dist-esm/lib/ui/hooks/menu-hooks.mjs +5 -0
- package/dist-esm/lib/ui/hooks/menu-hooks.mjs.map +2 -2
- package/dist-esm/lib/ui/version.mjs +3 -3
- package/dist-esm/lib/ui/version.mjs.map +1 -1
- package/dist-esm/lib/utils/embeds/embeds.mjs +4 -2
- package/dist-esm/lib/utils/embeds/embeds.mjs.map +2 -2
- package/dist-esm/lib/utils/svg/sanitizeSvg.mjs +538 -0
- package/dist-esm/lib/utils/svg/sanitizeSvg.mjs.map +7 -0
- package/package.json +3 -3
- package/src/index.ts +2 -1
- package/src/lib/bindings/arrow/ArrowBindingUtil.ts +2 -1
- package/src/lib/defaultExternalContentHandlers.ts +39 -10
- package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +2 -1
- package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +1 -1
- package/src/lib/shapes/arrow/arrowLabel.ts +1 -1
- package/src/lib/shapes/arrow/getArrowInfo.ts +60 -0
- package/src/lib/shapes/arrow/shared.ts +0 -53
- package/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx +2 -0
- package/src/lib/shapes/draw/toolStates/Drawing.ts +3 -1
- package/src/lib/shapes/frame/FrameShapeUtil.tsx +1 -7
- package/src/lib/shapes/frame/components/FrameLabelInput.tsx +1 -1
- package/src/lib/shapes/frame/frameHelpers.ts +7 -1
- package/src/lib/shapes/geo/GeoShapeUtil.tsx +6 -2
- package/src/lib/shapes/image/ImageShapeUtil.tsx +1 -0
- package/src/lib/shapes/note/NoteShapeUtil.tsx +2 -0
- package/src/lib/shapes/shared/RichTextLabel.tsx +1 -0
- package/src/lib/shapes/shared/crop.ts +3 -1
- package/src/lib/shapes/shared/freehand/getStrokePoints.ts +8 -18
- package/src/lib/shapes/shared/freehand/svg.ts +1 -1
- package/src/lib/shapes/shared/legacyProps.ts +1 -0
- package/src/lib/shapes/text/RichTextArea.tsx +2 -0
- package/src/lib/tools/SelectTool/childStates/Idle.ts +1 -1
- package/src/lib/tools/SelectTool/childStates/PointingHandle.ts +1 -0
- package/src/lib/tools/SelectTool/childStates/Resizing.ts +2 -0
- package/src/lib/tools/SelectTool/childStates/Rotating.ts +4 -1
- package/src/lib/tools/SelectTool/childStates/Translating.ts +1 -1
- package/src/lib/tools/selection-logic/updateHoveredShapeId.ts +4 -3
- package/src/lib/ui/components/A11y.tsx +1 -0
- package/src/lib/ui/components/Minimap/DefaultMinimap.tsx +1 -0
- package/src/lib/ui/components/Toolbar/OverflowingToolbar.tsx +1 -1
- package/src/lib/ui/components/menu-items.tsx +10 -34
- package/src/lib/ui/components/primitives/TldrawUiInput.tsx +3 -1
- package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +1 -0
- package/src/lib/ui/hooks/menu-hooks.ts +6 -0
- package/src/lib/ui/version.ts +3 -3
- package/src/lib/utils/embeds/embeds.ts +4 -2
- package/src/lib/utils/svg/sanitizeSvg.test.ts +837 -0
- package/src/lib/utils/svg/sanitizeSvg.ts +643 -0
- package/src/test/TLSessionStateSnapshot.test.ts +15 -0
- package/src/test/commands/putContent.test.ts +39 -0
- package/src/test/crop.test.ts +76 -1
- package/src/test/paste.test.ts +121 -1
- package/src/test/test-jsx.tsx +1 -1
package/dist-cjs/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { BindingOnShapeIsolateOptions } from '@tldraw/editor';
|
|
|
8
8
|
import { BindingUtil } from '@tldraw/editor';
|
|
9
9
|
import { Box } from '@tldraw/editor';
|
|
10
10
|
import { Circle2d } from '@tldraw/editor';
|
|
11
|
+
import { ClipboardEvent as ClipboardEvent_2 } from 'react';
|
|
11
12
|
import { ComponentType } from 'react';
|
|
12
13
|
import { CSSProperties } from 'react';
|
|
13
14
|
import { DebugFlag } from '@tldraw/editor';
|
|
@@ -23,16 +24,19 @@ import { Geometry2dOptions } from '@tldraw/editor';
|
|
|
23
24
|
import { Group2d } from '@tldraw/editor';
|
|
24
25
|
import { HandleSnapGeometry } from '@tldraw/editor';
|
|
25
26
|
import { HTMLAttributes } from 'react';
|
|
26
|
-
import { IndexKey } from '@tldraw/
|
|
27
|
-
import {
|
|
27
|
+
import { IndexKey } from '@tldraw/utils';
|
|
28
|
+
import { IndexKey as IndexKey_2 } from '@tldraw/editor';
|
|
29
|
+
import { JsonObject } from '@tldraw/utils';
|
|
28
30
|
import { JSX } from 'react/jsx-runtime';
|
|
31
|
+
import { JSX as JSX_2 } from 'react';
|
|
29
32
|
import { JSXElementConstructor } from 'react';
|
|
30
33
|
import { LANGUAGES } from '@tldraw/editor';
|
|
31
34
|
import { MigrationFailureReason } from '@tldraw/editor';
|
|
32
|
-
import { MigrationSequence } from '@tldraw/
|
|
35
|
+
import { MigrationSequence } from '@tldraw/store';
|
|
33
36
|
import { NamedExoticComponent } from 'react';
|
|
34
37
|
import { Node as Node_2 } from '@tiptap/pm/model';
|
|
35
38
|
import { PerfectDashTerminal } from '@tldraw/editor';
|
|
39
|
+
import { PointerEvent as PointerEvent_2 } from 'react';
|
|
36
40
|
import { Polygon2d } from '@tldraw/editor';
|
|
37
41
|
import { Polyline2d } from '@tldraw/editor';
|
|
38
42
|
import * as React_2 from 'react';
|
|
@@ -41,7 +45,7 @@ import { ReactElement } from 'react';
|
|
|
41
45
|
import { ReactNode } from 'react';
|
|
42
46
|
import { ReactPortal } from 'react';
|
|
43
47
|
import { ReadonlySharedStyleMap } from '@tldraw/editor';
|
|
44
|
-
import { RecordProps } from '@tldraw/
|
|
48
|
+
import { RecordProps } from '@tldraw/tlschema';
|
|
45
49
|
import { Rectangle2d } from '@tldraw/editor';
|
|
46
50
|
import { RecursivePartial } from '@tldraw/editor';
|
|
47
51
|
import { RefAttributes } from 'react';
|
|
@@ -73,14 +77,11 @@ import { TLBookmarkShapeProps } from '@tldraw/editor';
|
|
|
73
77
|
import { TLClickEventInfo } from '@tldraw/editor';
|
|
74
78
|
import { TLContent } from '@tldraw/editor';
|
|
75
79
|
import { TLCropInfo } from '@tldraw/editor';
|
|
76
|
-
import {
|
|
77
|
-
import { TLDefaultColorThemeColor } from '@tldraw/editor';
|
|
78
|
-
import { TLDefaultDashStyle } from '@tldraw/editor';
|
|
80
|
+
import { TLDefaultColorThemeColor } from '@tldraw/tlschema';
|
|
79
81
|
import { TLDefaultFillStyle } from '@tldraw/editor';
|
|
80
82
|
import { TLDefaultFontStyle } from '@tldraw/editor';
|
|
81
83
|
import { TLDefaultHorizontalAlignStyle } from '@tldraw/editor';
|
|
82
84
|
import { TLDefaultSizeStyle } from '@tldraw/editor';
|
|
83
|
-
import { TLDefaultTextAlignStyle } from '@tldraw/editor';
|
|
84
85
|
import { TLDefaultVerticalAlignStyle } from '@tldraw/editor';
|
|
85
86
|
import { TLDragShapesOutInfo } from '@tldraw/editor';
|
|
86
87
|
import { TLDragShapesOverInfo } from '@tldraw/editor';
|
|
@@ -103,7 +104,6 @@ import { TLFrameShape } from '@tldraw/editor';
|
|
|
103
104
|
import { TLFrameShapeProps } from '@tldraw/editor';
|
|
104
105
|
import { TLGeometryOpts } from '@tldraw/editor';
|
|
105
106
|
import { TLGeoShape } from '@tldraw/editor';
|
|
106
|
-
import { TLGeoShapeGeoStyle } from '@tldraw/editor';
|
|
107
107
|
import { TLGeoShapeProps } from '@tldraw/editor';
|
|
108
108
|
import { TLHandle } from '@tldraw/editor';
|
|
109
109
|
import { TLHandleDragInfo } from '@tldraw/editor';
|
|
@@ -117,14 +117,12 @@ import { TLImageShapeProps } from '@tldraw/editor';
|
|
|
117
117
|
import { TLKeyboardEventInfo } from '@tldraw/editor';
|
|
118
118
|
import { TLLineShape } from '@tldraw/editor';
|
|
119
119
|
import { TLLineShapePoint } from '@tldraw/editor';
|
|
120
|
-
import { TLLineShapeSplineStyle } from '@tldraw/editor';
|
|
121
120
|
import { TLNoteShape } from '@tldraw/editor';
|
|
122
121
|
import { TLNoteShapeProps } from '@tldraw/editor';
|
|
123
|
-
import { TLOpacityType } from '@tldraw/editor';
|
|
124
122
|
import { TLPageId } from '@tldraw/editor';
|
|
125
|
-
import { TLParentId } from '@tldraw/
|
|
123
|
+
import { TLParentId } from '@tldraw/tlschema';
|
|
126
124
|
import { TLPointerEventInfo } from '@tldraw/editor';
|
|
127
|
-
import { TLPropsMigrations } from '@tldraw/
|
|
125
|
+
import { TLPropsMigrations } from '@tldraw/tlschema';
|
|
128
126
|
import { TLResizeInfo } from '@tldraw/editor';
|
|
129
127
|
import { TLRichText } from '@tldraw/editor';
|
|
130
128
|
import { TLSchema } from '@tldraw/editor';
|
|
@@ -133,6 +131,7 @@ import { TLSelectionForegroundProps } from '@tldraw/editor';
|
|
|
133
131
|
import { TLShape } from '@tldraw/editor';
|
|
134
132
|
import { TLShapeCrop } from '@tldraw/editor';
|
|
135
133
|
import { TLShapeId } from '@tldraw/editor';
|
|
134
|
+
import { TLShapeId as TLShapeId_2 } from '@tldraw/tlschema';
|
|
136
135
|
import { TLShapePartial } from '@tldraw/editor';
|
|
137
136
|
import { TLShapeUtilCanBeLaidOutOpts } from '@tldraw/editor';
|
|
138
137
|
import { TLShapeUtilCanBindOpts } from '@tldraw/editor';
|
|
@@ -150,6 +149,7 @@ import { UnknownRecord } from '@tldraw/editor';
|
|
|
150
149
|
import { Vec } from '@tldraw/editor';
|
|
151
150
|
import { VecLike } from '@tldraw/editor';
|
|
152
151
|
import { VecModel } from '@tldraw/editor';
|
|
152
|
+
import { VecModel as VecModel_2 } from '@tldraw/tlschema';
|
|
153
153
|
|
|
154
154
|
/** @public */
|
|
155
155
|
export declare type A11yPriority = 'assertive' | 'polite';
|
|
@@ -193,9 +193,9 @@ export declare class ArrowBindingUtil extends BindingUtil<TLArrowBinding> {
|
|
|
193
193
|
getDefaultProps(): Partial<TLArrowBindingProps>;
|
|
194
194
|
onAfterCreate({ binding }: BindingOnCreateOptions<TLArrowBinding>): void;
|
|
195
195
|
onAfterChange({ bindingAfter }: BindingOnChangeOptions<TLArrowBinding>): void;
|
|
196
|
-
onAfterChangeFromShape({ shapeBefore, shapeAfter, reason
|
|
197
|
-
onAfterChangeToShape({ binding, shapeBefore, shapeAfter, reason
|
|
198
|
-
onBeforeIsolateFromShape({ binding
|
|
196
|
+
onAfterChangeFromShape({ shapeBefore, shapeAfter, reason }: BindingOnShapeChangeOptions<TLArrowBinding>): void;
|
|
197
|
+
onAfterChangeToShape({ binding, shapeBefore, shapeAfter, reason }: BindingOnShapeChangeOptions<TLArrowBinding>): void;
|
|
198
|
+
onBeforeIsolateFromShape({ binding }: BindingOnShapeIsolateOptions<TLArrowBinding>): void;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
/** @public @react */
|
|
@@ -329,18 +329,18 @@ export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
|
|
|
329
329
|
getHandles(shape: TLArrowShape): TLHandle[];
|
|
330
330
|
getText(shape: TLArrowShape): string;
|
|
331
331
|
onHandleDrag(shape: TLArrowShape, info: TLHandleDragInfo<TLArrowShape>): ({
|
|
332
|
-
id:
|
|
332
|
+
id: TLShapeId_2;
|
|
333
333
|
meta?: Partial<JsonObject> | undefined;
|
|
334
334
|
props?: Partial<TLArrowShapeProps> | undefined;
|
|
335
335
|
type: "arrow";
|
|
336
336
|
} & Partial<Omit<TLArrowShape, "id" | "meta" | "props" | "type">>) | {
|
|
337
|
-
id:
|
|
337
|
+
id: TLShapeId_2;
|
|
338
338
|
props: {
|
|
339
339
|
bend: number;
|
|
340
340
|
};
|
|
341
341
|
type: "arrow";
|
|
342
342
|
} | {
|
|
343
|
-
id:
|
|
343
|
+
id: TLShapeId_2;
|
|
344
344
|
props: {
|
|
345
345
|
elbowMidPoint: number;
|
|
346
346
|
};
|
|
@@ -350,7 +350,7 @@ export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
|
|
|
350
350
|
private onElbowMidpointHandleDrag;
|
|
351
351
|
private onTerminalHandleDrag;
|
|
352
352
|
onTranslateStart(shape: TLArrowShape): ({
|
|
353
|
-
id:
|
|
353
|
+
id: TLShapeId_2;
|
|
354
354
|
meta?: Partial<JsonObject> | undefined;
|
|
355
355
|
props?: Partial<TLArrowShapeProps> | undefined;
|
|
356
356
|
type: "arrow";
|
|
@@ -360,8 +360,8 @@ export declare class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
|
|
|
360
360
|
onResize(shape: TLArrowShape, info: TLResizeInfo<TLArrowShape>): {
|
|
361
361
|
props: {
|
|
362
362
|
bend: number;
|
|
363
|
-
end:
|
|
364
|
-
start:
|
|
363
|
+
end: VecModel_2;
|
|
364
|
+
start: VecModel_2;
|
|
365
365
|
};
|
|
366
366
|
};
|
|
367
367
|
onDoubleClickHandle(shape: TLArrowShape, handle: TLHandle): TLShapePartial<TLArrowShape> | void;
|
|
@@ -458,11 +458,11 @@ export declare class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape>
|
|
|
458
458
|
useLegacyIndicator(): boolean;
|
|
459
459
|
getIndicatorPath(shape: TLBookmarkShape): Path2D;
|
|
460
460
|
onBeforeCreate(next: TLBookmarkShape): {
|
|
461
|
-
id:
|
|
461
|
+
id: TLShapeId_2;
|
|
462
462
|
index: IndexKey;
|
|
463
463
|
isLocked: boolean;
|
|
464
464
|
meta: JsonObject;
|
|
465
|
-
opacity:
|
|
465
|
+
opacity: number;
|
|
466
466
|
parentId: TLParentId;
|
|
467
467
|
props: {
|
|
468
468
|
assetId: null | TLAssetId;
|
|
@@ -477,11 +477,11 @@ export declare class BookmarkShapeUtil extends BaseBoxShapeUtil<TLBookmarkShape>
|
|
|
477
477
|
y: number;
|
|
478
478
|
};
|
|
479
479
|
onBeforeUpdate(prev: TLBookmarkShape, shape: TLBookmarkShape): {
|
|
480
|
-
id:
|
|
480
|
+
id: TLShapeId_2;
|
|
481
481
|
index: IndexKey;
|
|
482
482
|
isLocked: boolean;
|
|
483
483
|
meta: JsonObject;
|
|
484
|
-
opacity:
|
|
484
|
+
opacity: number;
|
|
485
485
|
parentId: TLParentId;
|
|
486
486
|
props: {
|
|
487
487
|
assetId: null | TLAssetId;
|
|
@@ -516,7 +516,7 @@ export declare interface BreakPointProviderProps {
|
|
|
516
516
|
/* Excluded from this release type: buildFromV1Document */
|
|
517
517
|
|
|
518
518
|
/** @public @react */
|
|
519
|
-
export declare function CenteredTopPanelContainer({ maxWidth, ignoreRightWidth, stylePanelWidth, marginBetweenZones, squeezeAmount, children
|
|
519
|
+
export declare function CenteredTopPanelContainer({ maxWidth, ignoreRightWidth, stylePanelWidth, marginBetweenZones, squeezeAmount, children }: CenteredTopPanelContainerProps): JSX.Element;
|
|
520
520
|
|
|
521
521
|
/** @public */
|
|
522
522
|
export declare interface CenteredTopPanelContainerProps {
|
|
@@ -609,7 +609,7 @@ export declare function CopyMenuItem(): JSX.Element;
|
|
|
609
609
|
* @returns A Result containing the created bookmark shape or an error
|
|
610
610
|
* @public
|
|
611
611
|
*/
|
|
612
|
-
export declare function createBookmarkFromUrl(editor: Editor, { url, center
|
|
612
|
+
export declare function createBookmarkFromUrl(editor: Editor, { url, center }: {
|
|
613
613
|
center?: {
|
|
614
614
|
x: number;
|
|
615
615
|
y: number;
|
|
@@ -923,7 +923,7 @@ export declare function DefaultContextMenuContent(): JSX.Element | null;
|
|
|
923
923
|
export declare function DefaultDebugMenu({ children }: TLUiDebugMenuProps): JSX.Element;
|
|
924
924
|
|
|
925
925
|
/** @public @react */
|
|
926
|
-
export declare function DefaultDebugMenuContent({ customDebugFlags, customFeatureFlags
|
|
926
|
+
export declare function DefaultDebugMenuContent({ customDebugFlags, customFeatureFlags }: CustomDebugFlags): JSX.Element;
|
|
927
927
|
|
|
928
928
|
/** @public @react */
|
|
929
929
|
export declare const DefaultDialogs: NamedExoticComponent<object>;
|
|
@@ -1059,7 +1059,7 @@ export declare const DefaultRichTextToolbar: React_3.NamedExoticComponent<TLUiRi
|
|
|
1059
1059
|
*
|
|
1060
1060
|
* @public @react
|
|
1061
1061
|
*/
|
|
1062
|
-
export declare function DefaultRichTextToolbarContent({ textEditor, onEditLinkStart
|
|
1062
|
+
export declare function DefaultRichTextToolbarContent({ textEditor, onEditLinkStart }: DefaultRichTextToolbarContentProps): JSX.Element[];
|
|
1063
1063
|
|
|
1064
1064
|
/** @public */
|
|
1065
1065
|
export declare interface DefaultRichTextToolbarContentProps {
|
|
@@ -1157,8 +1157,8 @@ export declare function DistributeMenuItems(): JSX.Element;
|
|
|
1157
1157
|
* @public
|
|
1158
1158
|
*/
|
|
1159
1159
|
export declare function downsizeImage(blob: Blob, width: number, height: number, opts?: {
|
|
1160
|
-
quality?: number;
|
|
1161
|
-
type?: string;
|
|
1160
|
+
quality?: number | undefined;
|
|
1161
|
+
type?: string | undefined;
|
|
1162
1162
|
}): Promise<Blob>;
|
|
1163
1163
|
|
|
1164
1164
|
/** @public */
|
|
@@ -1554,7 +1554,7 @@ export declare interface EventsProviderProps {
|
|
|
1554
1554
|
}
|
|
1555
1555
|
|
|
1556
1556
|
/** @public @react */
|
|
1557
|
-
export declare function ExampleDialog({ title, body, cancel, confirm, displayDontShowAgain, maxWidth, onCancel, onContinue
|
|
1557
|
+
export declare function ExampleDialog({ title, body, cancel, confirm, displayDontShowAgain, maxWidth, onCancel, onContinue }: ExampleDialogProps): JSX.Element;
|
|
1558
1558
|
|
|
1559
1559
|
/** @public */
|
|
1560
1560
|
export declare interface ExampleDialogProps {
|
|
@@ -1671,7 +1671,7 @@ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
|
|
|
1671
1671
|
onResize(shape: any, info: TLResizeInfo<any>): any;
|
|
1672
1672
|
getInterpolatedProps(startShape: TLFrameShape, endShape: TLFrameShape, t: number): TLFrameShapeProps;
|
|
1673
1673
|
onDoubleClickEdge(shape: TLFrameShape, info: TLClickEventInfo): {
|
|
1674
|
-
id:
|
|
1674
|
+
id: TLShapeId_2;
|
|
1675
1675
|
props: {
|
|
1676
1676
|
h: number;
|
|
1677
1677
|
w: number;
|
|
@@ -1679,7 +1679,7 @@ export declare class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
|
|
|
1679
1679
|
type: "frame";
|
|
1680
1680
|
} | undefined;
|
|
1681
1681
|
onDoubleClickCorner(shape: TLFrameShape): {
|
|
1682
|
-
id:
|
|
1682
|
+
id: TLShapeId_2;
|
|
1683
1683
|
type: "frame";
|
|
1684
1684
|
};
|
|
1685
1685
|
onDragShapesIn(shape: TLFrameShape, draggingShapes: TLShape[], { initialParentIds, initialIndices }: TLDragShapesOverInfo): void;
|
|
@@ -1727,27 +1727,31 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
|
|
|
1727
1727
|
y: number;
|
|
1728
1728
|
};
|
|
1729
1729
|
onBeforeCreate(shape: TLGeoShape): {
|
|
1730
|
-
id:
|
|
1730
|
+
id: TLShapeId_2;
|
|
1731
1731
|
index: IndexKey;
|
|
1732
1732
|
isLocked: boolean;
|
|
1733
1733
|
meta: JsonObject;
|
|
1734
|
-
opacity:
|
|
1734
|
+
opacity: number;
|
|
1735
1735
|
parentId: TLParentId;
|
|
1736
1736
|
props: {
|
|
1737
|
-
align:
|
|
1738
|
-
color:
|
|
1739
|
-
dash:
|
|
1740
|
-
fill:
|
|
1741
|
-
font:
|
|
1742
|
-
geo:
|
|
1737
|
+
align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
|
|
1738
|
+
color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow";
|
|
1739
|
+
dash: "dashed" | "dotted" | "draw" | "solid";
|
|
1740
|
+
fill: "fill" | "lined-fill" | "none" | "pattern" | "semi" | "solid";
|
|
1741
|
+
font: "draw" | "mono" | "sans" | "serif";
|
|
1742
|
+
geo: "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "heart" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box";
|
|
1743
1743
|
growY: number;
|
|
1744
1744
|
h: number;
|
|
1745
|
-
labelColor:
|
|
1746
|
-
richText:
|
|
1745
|
+
labelColor: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow";
|
|
1746
|
+
richText: {
|
|
1747
|
+
attrs?: any;
|
|
1748
|
+
content: unknown[];
|
|
1749
|
+
type: string;
|
|
1750
|
+
};
|
|
1747
1751
|
scale: number;
|
|
1748
|
-
size:
|
|
1752
|
+
size: "l" | "m" | "s" | "xl";
|
|
1749
1753
|
url: string;
|
|
1750
|
-
verticalAlign:
|
|
1754
|
+
verticalAlign: "end" | "middle" | "start";
|
|
1751
1755
|
w: number;
|
|
1752
1756
|
};
|
|
1753
1757
|
rotation: number;
|
|
@@ -1757,27 +1761,31 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
|
|
|
1757
1761
|
y: number;
|
|
1758
1762
|
} | undefined;
|
|
1759
1763
|
onBeforeUpdate(prev: TLGeoShape, next: TLGeoShape): {
|
|
1760
|
-
id:
|
|
1764
|
+
id: TLShapeId_2;
|
|
1761
1765
|
index: IndexKey;
|
|
1762
1766
|
isLocked: boolean;
|
|
1763
1767
|
meta: JsonObject;
|
|
1764
|
-
opacity:
|
|
1768
|
+
opacity: number;
|
|
1765
1769
|
parentId: TLParentId;
|
|
1766
1770
|
props: {
|
|
1767
|
-
align:
|
|
1768
|
-
color:
|
|
1769
|
-
dash:
|
|
1770
|
-
fill:
|
|
1771
|
-
font:
|
|
1772
|
-
geo:
|
|
1771
|
+
align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
|
|
1772
|
+
color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow";
|
|
1773
|
+
dash: "dashed" | "dotted" | "draw" | "solid";
|
|
1774
|
+
fill: "fill" | "lined-fill" | "none" | "pattern" | "semi" | "solid";
|
|
1775
|
+
font: "draw" | "mono" | "sans" | "serif";
|
|
1776
|
+
geo: "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "check-box" | "cloud" | "diamond" | "ellipse" | "heart" | "hexagon" | "octagon" | "oval" | "pentagon" | "rectangle" | "rhombus-2" | "rhombus" | "star" | "trapezoid" | "triangle" | "x-box";
|
|
1773
1777
|
growY: number;
|
|
1774
1778
|
h: number;
|
|
1775
|
-
labelColor:
|
|
1776
|
-
richText:
|
|
1779
|
+
labelColor: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow";
|
|
1780
|
+
richText: {
|
|
1781
|
+
attrs?: any;
|
|
1782
|
+
content: unknown[];
|
|
1783
|
+
type: string;
|
|
1784
|
+
};
|
|
1777
1785
|
scale: number;
|
|
1778
|
-
size:
|
|
1786
|
+
size: "l" | "m" | "s" | "xl";
|
|
1779
1787
|
url: string;
|
|
1780
|
-
verticalAlign:
|
|
1788
|
+
verticalAlign: "end" | "middle" | "start";
|
|
1781
1789
|
w: number;
|
|
1782
1790
|
};
|
|
1783
1791
|
rotation: number;
|
|
@@ -1787,11 +1795,11 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
|
|
|
1787
1795
|
y: number;
|
|
1788
1796
|
} | undefined;
|
|
1789
1797
|
onDoubleClick(shape: TLGeoShape): {
|
|
1790
|
-
id:
|
|
1798
|
+
id: TLShapeId_2;
|
|
1791
1799
|
index: IndexKey;
|
|
1792
1800
|
isLocked: boolean;
|
|
1793
1801
|
meta: JsonObject;
|
|
1794
|
-
opacity:
|
|
1802
|
+
opacity: number;
|
|
1795
1803
|
parentId: TLParentId;
|
|
1796
1804
|
props: {
|
|
1797
1805
|
geo: "check-box";
|
|
@@ -1802,11 +1810,11 @@ export declare class GeoShapeUtil extends BaseBoxShapeUtil<TLGeoShape> {
|
|
|
1802
1810
|
x: number;
|
|
1803
1811
|
y: number;
|
|
1804
1812
|
} | {
|
|
1805
|
-
id:
|
|
1813
|
+
id: TLShapeId_2;
|
|
1806
1814
|
index: IndexKey;
|
|
1807
1815
|
isLocked: boolean;
|
|
1808
1816
|
meta: JsonObject;
|
|
1809
|
-
opacity:
|
|
1817
|
+
opacity: number;
|
|
1810
1818
|
parentId: TLParentId;
|
|
1811
1819
|
props: {
|
|
1812
1820
|
geo: "rectangle";
|
|
@@ -1913,7 +1921,7 @@ export declare function getStrokeOutlinePoints(strokePoints: StrokePoint[], opti
|
|
|
1913
1921
|
export declare function getStrokePoints(rawInputPoints: VecLike[], options?: StrokeOptions): StrokePoint[];
|
|
1914
1922
|
|
|
1915
1923
|
/**
|
|
1916
|
-
* Turn an array of stroke points into a path of
|
|
1924
|
+
* Turn an array of stroke points into a path of quadratic curves.
|
|
1917
1925
|
*
|
|
1918
1926
|
* @param points - The stroke points returned from perfect-freehand
|
|
1919
1927
|
* @param closed - Whether the shape is closed
|
|
@@ -2106,15 +2114,15 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
|
|
|
2106
2114
|
};
|
|
2107
2115
|
onBeforeCreate(next: TLLineShape): TLLineShape | void;
|
|
2108
2116
|
onHandleDrag(shape: TLLineShape, { handle }: TLHandleDragInfo<TLLineShape>): {
|
|
2109
|
-
id:
|
|
2117
|
+
id: TLShapeId_2;
|
|
2110
2118
|
index: IndexKey;
|
|
2111
2119
|
isLocked: boolean;
|
|
2112
2120
|
meta: JsonObject;
|
|
2113
|
-
opacity:
|
|
2121
|
+
opacity: number;
|
|
2114
2122
|
parentId: TLParentId;
|
|
2115
2123
|
props: {
|
|
2116
|
-
color:
|
|
2117
|
-
dash:
|
|
2124
|
+
color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow";
|
|
2125
|
+
dash: "dashed" | "dotted" | "draw" | "solid";
|
|
2118
2126
|
points: {
|
|
2119
2127
|
[x: string]: {
|
|
2120
2128
|
id: string;
|
|
@@ -2124,8 +2132,8 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
|
|
|
2124
2132
|
} | TLLineShapePoint;
|
|
2125
2133
|
};
|
|
2126
2134
|
scale: number;
|
|
2127
|
-
size:
|
|
2128
|
-
spline:
|
|
2135
|
+
size: "l" | "m" | "s" | "xl";
|
|
2136
|
+
spline: "cubic" | "line";
|
|
2129
2137
|
};
|
|
2130
2138
|
rotation: number;
|
|
2131
2139
|
type: "line";
|
|
@@ -2134,15 +2142,15 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
|
|
|
2134
2142
|
y: number;
|
|
2135
2143
|
};
|
|
2136
2144
|
onHandleDragStart(shape: TLLineShape, { handle }: TLHandleDragInfo<TLLineShape>): {
|
|
2137
|
-
id:
|
|
2145
|
+
id: TLShapeId_2;
|
|
2138
2146
|
index: IndexKey;
|
|
2139
2147
|
isLocked: boolean;
|
|
2140
2148
|
meta: JsonObject;
|
|
2141
|
-
opacity:
|
|
2149
|
+
opacity: number;
|
|
2142
2150
|
parentId: TLParentId;
|
|
2143
2151
|
props: {
|
|
2144
|
-
color:
|
|
2145
|
-
dash:
|
|
2152
|
+
color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow";
|
|
2153
|
+
dash: "dashed" | "dotted" | "draw" | "solid";
|
|
2146
2154
|
points: {
|
|
2147
2155
|
[x: string]: {
|
|
2148
2156
|
id: IndexKey;
|
|
@@ -2152,8 +2160,8 @@ export declare class LineShapeUtil extends ShapeUtil<TLLineShape> {
|
|
|
2152
2160
|
} | TLLineShapePoint;
|
|
2153
2161
|
};
|
|
2154
2162
|
scale: number;
|
|
2155
|
-
size:
|
|
2156
|
-
spline:
|
|
2163
|
+
size: "l" | "m" | "s" | "xl";
|
|
2164
|
+
spline: "cubic" | "line";
|
|
2157
2165
|
};
|
|
2158
2166
|
rotation: number;
|
|
2159
2167
|
type: "line";
|
|
@@ -2235,23 +2243,27 @@ export declare class NoteShapeUtil extends ShapeUtil<TLNoteShape> {
|
|
|
2235
2243
|
toSvg(shape: TLNoteShape, ctx: SvgExportContext): JSX.Element;
|
|
2236
2244
|
onBeforeCreate(next: TLNoteShape): {
|
|
2237
2245
|
id: TLShapeId;
|
|
2238
|
-
index:
|
|
2246
|
+
index: IndexKey_2;
|
|
2239
2247
|
isLocked: boolean;
|
|
2240
2248
|
meta: JsonObject;
|
|
2241
|
-
opacity:
|
|
2249
|
+
opacity: number;
|
|
2242
2250
|
parentId: TLParentId;
|
|
2243
2251
|
props: {
|
|
2244
|
-
align:
|
|
2245
|
-
color:
|
|
2246
|
-
font:
|
|
2252
|
+
align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
|
|
2253
|
+
color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow";
|
|
2254
|
+
font: "draw" | "mono" | "sans" | "serif";
|
|
2247
2255
|
fontSizeAdjustment: number;
|
|
2248
2256
|
growY: number;
|
|
2249
|
-
labelColor:
|
|
2250
|
-
richText:
|
|
2257
|
+
labelColor: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow";
|
|
2258
|
+
richText: {
|
|
2259
|
+
attrs?: any;
|
|
2260
|
+
content: unknown[];
|
|
2261
|
+
type: string;
|
|
2262
|
+
};
|
|
2251
2263
|
scale: number;
|
|
2252
|
-
size:
|
|
2264
|
+
size: "l" | "m" | "s" | "xl";
|
|
2253
2265
|
url: string;
|
|
2254
|
-
verticalAlign:
|
|
2266
|
+
verticalAlign: "end" | "middle" | "start";
|
|
2255
2267
|
};
|
|
2256
2268
|
rotation: number;
|
|
2257
2269
|
type: "note";
|
|
@@ -2261,23 +2273,27 @@ export declare class NoteShapeUtil extends ShapeUtil<TLNoteShape> {
|
|
|
2261
2273
|
} | undefined;
|
|
2262
2274
|
onBeforeUpdate(prev: TLNoteShape, next: TLNoteShape): {
|
|
2263
2275
|
id: TLShapeId;
|
|
2264
|
-
index:
|
|
2276
|
+
index: IndexKey_2;
|
|
2265
2277
|
isLocked: boolean;
|
|
2266
2278
|
meta: JsonObject;
|
|
2267
|
-
opacity:
|
|
2279
|
+
opacity: number;
|
|
2268
2280
|
parentId: TLParentId;
|
|
2269
2281
|
props: {
|
|
2270
|
-
align:
|
|
2271
|
-
color:
|
|
2272
|
-
font:
|
|
2282
|
+
align: "end-legacy" | "end" | "middle-legacy" | "middle" | "start-legacy" | "start";
|
|
2283
|
+
color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow";
|
|
2284
|
+
font: "draw" | "mono" | "sans" | "serif";
|
|
2273
2285
|
fontSizeAdjustment: number;
|
|
2274
2286
|
growY: number;
|
|
2275
|
-
labelColor:
|
|
2276
|
-
richText:
|
|
2287
|
+
labelColor: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow";
|
|
2288
|
+
richText: {
|
|
2289
|
+
attrs?: any;
|
|
2290
|
+
content: unknown[];
|
|
2291
|
+
type: string;
|
|
2292
|
+
};
|
|
2277
2293
|
scale: number;
|
|
2278
|
-
size:
|
|
2294
|
+
size: "l" | "m" | "s" | "xl";
|
|
2279
2295
|
url: string;
|
|
2280
|
-
verticalAlign:
|
|
2296
|
+
verticalAlign: "end" | "middle" | "start";
|
|
2281
2297
|
};
|
|
2282
2298
|
rotation: number;
|
|
2283
2299
|
type: "note";
|
|
@@ -2331,7 +2347,7 @@ export declare interface OnDragFromToolbarToCreateShapesOpts {
|
|
|
2331
2347
|
export declare function OvalToolbarItem(): JSX.Element;
|
|
2332
2348
|
|
|
2333
2349
|
/** @public @react */
|
|
2334
|
-
export declare function OverflowingToolbar({ children, orientation, sizingParentClassName, minItems, minSizePx, maxItems, maxSizePx
|
|
2350
|
+
export declare function OverflowingToolbar({ children, orientation, sizingParentClassName, minItems, minSizePx, maxItems, maxSizePx }: OverflowingToolbarProps): JSX.Element;
|
|
2335
2351
|
|
|
2336
2352
|
/** @public */
|
|
2337
2353
|
export declare interface OverflowingToolbarProps {
|
|
@@ -2373,7 +2389,7 @@ export declare interface PageItemSubmenuProps {
|
|
|
2373
2389
|
/* Excluded from this release type: parseAndLoadDocument */
|
|
2374
2390
|
|
|
2375
2391
|
/** @public */
|
|
2376
|
-
export declare function parseTldrawJsonFile({ json, schema
|
|
2392
|
+
export declare function parseTldrawJsonFile({ json, schema }: {
|
|
2377
2393
|
json: string;
|
|
2378
2394
|
schema: TLSchema;
|
|
2379
2395
|
}): Result<TLStore, TldrawFileParseError>;
|
|
@@ -2668,7 +2684,7 @@ export declare interface RichTextLabelProps {
|
|
|
2668
2684
|
*
|
|
2669
2685
|
* @public @react
|
|
2670
2686
|
*/
|
|
2671
|
-
export declare function RichTextSVG({ bounds, richText, fontSize, font, align, verticalAlign, wrap, labelColor, padding, showTextOutline
|
|
2687
|
+
export declare function RichTextSVG({ bounds, richText, fontSize, font, align, verticalAlign, wrap, labelColor, padding, showTextOutline }: RichTextSVGProps): JSX.Element;
|
|
2672
2688
|
|
|
2673
2689
|
/** @public */
|
|
2674
2690
|
export declare interface RichTextSVGProps {
|
|
@@ -2687,6 +2703,18 @@ export declare interface RichTextSVGProps {
|
|
|
2687
2703
|
/** @public @react */
|
|
2688
2704
|
export declare function RotateCWMenuItem(): JSX.Element;
|
|
2689
2705
|
|
|
2706
|
+
/**
|
|
2707
|
+
* Sanitizes an SVG string by removing dangerous elements, attributes, and URIs
|
|
2708
|
+
* while preserving safe content including foreignObject (for text rendering),
|
|
2709
|
+
* style elements (for fonts with data: URLs), and animation elements.
|
|
2710
|
+
*
|
|
2711
|
+
* Returns the sanitized SVG string, or an empty string if the input was
|
|
2712
|
+
* malformed (parse error) or contained no safe content after sanitization.
|
|
2713
|
+
*
|
|
2714
|
+
* @public
|
|
2715
|
+
*/
|
|
2716
|
+
export declare function sanitizeSvg(svgText: string): string;
|
|
2717
|
+
|
|
2690
2718
|
/** @public @react */
|
|
2691
2719
|
export declare function SelectAllMenuItem(): JSX.Element;
|
|
2692
2720
|
|
|
@@ -2804,10 +2832,10 @@ export declare function StylePanelArrowheadPicker(): JSX.Element | null;
|
|
|
2804
2832
|
export declare function StylePanelArrowKindPicker(): JSX.Element | null;
|
|
2805
2833
|
|
|
2806
2834
|
/** @public @react */
|
|
2807
|
-
export declare const StylePanelButtonPicker: <T extends string>(props: StylePanelButtonPickerProps<T>) =>
|
|
2835
|
+
export declare const StylePanelButtonPicker: <T extends string>(props: StylePanelButtonPickerProps<T>) => JSX_2.Element;
|
|
2808
2836
|
|
|
2809
2837
|
/** @public @react*/
|
|
2810
|
-
export declare const StylePanelButtonPickerInline: <T extends string>(props: StylePanelButtonPickerProps<T>) =>
|
|
2838
|
+
export declare const StylePanelButtonPickerInline: <T extends string>(props: StylePanelButtonPickerProps<T>) => JSX_2.Element;
|
|
2811
2839
|
|
|
2812
2840
|
/** @public */
|
|
2813
2841
|
export declare interface StylePanelButtonPickerProps<T extends string> {
|
|
@@ -3021,16 +3049,20 @@ export declare class TextShapeUtil extends ShapeUtil<TLTextShape> {
|
|
|
3021
3049
|
index: IndexKey;
|
|
3022
3050
|
isLocked: boolean;
|
|
3023
3051
|
meta: JsonObject;
|
|
3024
|
-
opacity:
|
|
3052
|
+
opacity: number;
|
|
3025
3053
|
parentId: TLParentId;
|
|
3026
3054
|
props: {
|
|
3027
3055
|
autoSize: boolean;
|
|
3028
|
-
color:
|
|
3029
|
-
font:
|
|
3030
|
-
richText:
|
|
3056
|
+
color: "black" | "blue" | "green" | "grey" | "light-blue" | "light-green" | "light-red" | "light-violet" | "orange" | "red" | "violet" | "white" | "yellow";
|
|
3057
|
+
font: "draw" | "mono" | "sans" | "serif";
|
|
3058
|
+
richText: {
|
|
3059
|
+
attrs?: any;
|
|
3060
|
+
content: unknown[];
|
|
3061
|
+
type: string;
|
|
3062
|
+
};
|
|
3031
3063
|
scale: number;
|
|
3032
|
-
size:
|
|
3033
|
-
textAlign:
|
|
3064
|
+
size: "l" | "m" | "s" | "xl";
|
|
3065
|
+
textAlign: "end" | "middle" | "start";
|
|
3034
3066
|
w: number;
|
|
3035
3067
|
};
|
|
3036
3068
|
rotation: number;
|
|
@@ -3176,7 +3208,7 @@ export declare interface TldrawBaseProps extends TldrawUiProps, TldrawEditorBase
|
|
|
3176
3208
|
}
|
|
3177
3209
|
|
|
3178
3210
|
/** @public @react */
|
|
3179
|
-
export declare function TldrawCropHandles({ size, width, height, hideAlternateHandles
|
|
3211
|
+
export declare function TldrawCropHandles({ size, width, height, hideAlternateHandles }: TldrawCropHandlesProps): JSX.Element;
|
|
3180
3212
|
|
|
3181
3213
|
/** @public */
|
|
3182
3214
|
export declare interface TldrawCropHandlesProps {
|
|
@@ -3320,7 +3352,7 @@ export declare function TldrawUiButtonLabel({ children }: TLUiButtonLabelProps):
|
|
|
3320
3352
|
export declare const TldrawUiColumn: ForwardRefExoticComponent<TLUiLayoutProps & RefAttributes<HTMLDivElement>>;
|
|
3321
3353
|
|
|
3322
3354
|
/** @public @react */
|
|
3323
|
-
export declare function TldrawUiComponentsProvider({ overrides, children
|
|
3355
|
+
export declare function TldrawUiComponentsProvider({ overrides, children }: TLUiComponentsProviderProps): JSX.Element;
|
|
3324
3356
|
|
|
3325
3357
|
/** @public @react */
|
|
3326
3358
|
export declare const TldrawUiContextProvider: NamedExoticComponent<TLUiContextProviderProps>;
|
|
@@ -3355,7 +3387,7 @@ export declare function TldrawUiDialogTitle({ className, children, style }: TLUi
|
|
|
3355
3387
|
export declare function TldrawUiDropdownMenuCheckboxItem({ children, onSelect, ...rest }: TLUiDropdownMenuCheckboxItemProps): JSX.Element;
|
|
3356
3388
|
|
|
3357
3389
|
/** @public @react */
|
|
3358
|
-
export declare function TldrawUiDropdownMenuContent({ className, side, align, sideOffset, alignOffset, children
|
|
3390
|
+
export declare function TldrawUiDropdownMenuContent({ className, side, align, sideOffset, alignOffset, children }: TLUiDropdownMenuContentProps): JSX.Element;
|
|
3359
3391
|
|
|
3360
3392
|
/** @public @react */
|
|
3361
3393
|
export declare function TldrawUiDropdownMenuGroup({ className, children }: TLUiDropdownMenuGroupProps): JSX.Element;
|
|
@@ -3367,16 +3399,16 @@ export declare function TldrawUiDropdownMenuIndicator(): JSX.Element;
|
|
|
3367
3399
|
export declare function TldrawUiDropdownMenuItem({ noClose, children }: TLUiDropdownMenuItemProps): JSX.Element;
|
|
3368
3400
|
|
|
3369
3401
|
/** @public @react */
|
|
3370
|
-
export declare function TldrawUiDropdownMenuRoot({ id, children, modal, debugOpen
|
|
3402
|
+
export declare function TldrawUiDropdownMenuRoot({ id, children, modal, debugOpen }: TLUiDropdownMenuRootProps): JSX.Element;
|
|
3371
3403
|
|
|
3372
3404
|
/** @public @react */
|
|
3373
3405
|
export declare function TldrawUiDropdownMenuSub({ id, children }: TLUiDropdownMenuSubProps): JSX.Element;
|
|
3374
3406
|
|
|
3375
3407
|
/** @public @react */
|
|
3376
|
-
export declare function TldrawUiDropdownMenuSubContent({ id, alignOffset, sideOffset, size, children
|
|
3408
|
+
export declare function TldrawUiDropdownMenuSubContent({ id, alignOffset, sideOffset, size, children }: TLUiDropdownMenuSubContentProps): JSX.Element;
|
|
3377
3409
|
|
|
3378
3410
|
/** @public @react */
|
|
3379
|
-
export declare function TldrawUiDropdownMenuSubTrigger({ id, label, title, disabled
|
|
3411
|
+
export declare function TldrawUiDropdownMenuSubTrigger({ id, label, title, disabled }: TLUiDropdownMenuSubTriggerProps): JSX.Element;
|
|
3380
3412
|
|
|
3381
3413
|
/** @public @react */
|
|
3382
3414
|
export declare function TldrawUiDropdownMenuTrigger({ children, ...rest }: TLUiDropdownMenuTriggerProps): JSX.Element;
|
|
@@ -3410,19 +3442,19 @@ export declare function TldrawUiMenuActionCheckboxItem({ actionId, ...rest }: TL
|
|
|
3410
3442
|
export declare function TldrawUiMenuActionItem({ actionId, ...rest }: TLUiMenuActionItemProps): JSX.Element | null;
|
|
3411
3443
|
|
|
3412
3444
|
/** @public @react */
|
|
3413
|
-
export declare function TldrawUiMenuCheckboxItem<TranslationKey extends string = string, IconType extends string = string>({ id, kbd, label, lang, readonlyOk, onSelect, toggle, disabled, checked
|
|
3445
|
+
export declare function TldrawUiMenuCheckboxItem<TranslationKey extends string = string, IconType extends string = string>({ id, kbd, label, lang, readonlyOk, onSelect, toggle, disabled, checked }: TLUiMenuCheckboxItemProps<TranslationKey, IconType>): JSX.Element | null;
|
|
3414
3446
|
|
|
3415
3447
|
/** @public @react */
|
|
3416
|
-
export declare function TldrawUiMenuContextProvider({ type, sourceId, children
|
|
3448
|
+
export declare function TldrawUiMenuContextProvider({ type, sourceId, children }: TLUiMenuContextProviderProps): JSX.Element;
|
|
3417
3449
|
|
|
3418
3450
|
/** @public @react */
|
|
3419
3451
|
export declare function TldrawUiMenuGroup({ id, label, className, children }: TLUiMenuGroupProps): bigint | boolean | JSX.Element | Iterable<ReactNode> | null | number | Promise<bigint | boolean | ReactElement<unknown, JSXElementConstructor<any> | string> | ReactPortal | Iterable<ReactNode> | null | number | string | undefined> | string | undefined;
|
|
3420
3452
|
|
|
3421
3453
|
/** @public @react */
|
|
3422
|
-
export declare function TldrawUiMenuItem<TranslationKey extends string = string, IconType extends string = string>({ disabled, spinner, readonlyOk, id, kbd, label, icon, iconLeft, onSelect, noClose, isSelected, onDragStart
|
|
3454
|
+
export declare function TldrawUiMenuItem<TranslationKey extends string = string, IconType extends string = string>({ disabled, spinner, readonlyOk, id, kbd, label, icon, iconLeft, onSelect, noClose, isSelected, onDragStart }: TLUiMenuItemProps<TranslationKey, IconType>): JSX.Element | null;
|
|
3423
3455
|
|
|
3424
3456
|
/** @public @react */
|
|
3425
|
-
export declare function TldrawUiMenuSubmenu<Translation extends string = string>({ id, disabled, label, size, children
|
|
3457
|
+
export declare function TldrawUiMenuSubmenu<Translation extends string = string>({ id, disabled, label, size, children }: TLUiMenuSubmenuProps<Translation>): bigint | boolean | JSX.Element | Iterable<ReactNode> | null | number | Promise<bigint | boolean | ReactElement<unknown, JSXElementConstructor<any> | string> | ReactPortal | Iterable<ReactNode> | null | number | string | undefined> | string | undefined;
|
|
3426
3458
|
|
|
3427
3459
|
/** @public @react */
|
|
3428
3460
|
export declare function TldrawUiMenuToolItem({ toolId, ...rest }: TLUiMenuToolItemProps): JSX.Element | null;
|
|
@@ -3434,7 +3466,7 @@ export declare interface TldrawUiOrientationContext {
|
|
|
3434
3466
|
}
|
|
3435
3467
|
|
|
3436
3468
|
/** @public @react */
|
|
3437
|
-
export declare function TldrawUiOrientationProvider({ children, orientation, tooltipSide
|
|
3469
|
+
export declare function TldrawUiOrientationProvider({ children, orientation, tooltipSide }: TldrawUiOrientationProviderProps): JSX.Element;
|
|
3438
3470
|
|
|
3439
3471
|
/** @public */
|
|
3440
3472
|
export declare interface TldrawUiOrientationProviderProps {
|
|
@@ -3447,7 +3479,7 @@ export declare interface TldrawUiOrientationProviderProps {
|
|
|
3447
3479
|
export declare function TldrawUiPopover({ id, children, onOpenChange, open, className }: TLUiPopoverProps): JSX.Element;
|
|
3448
3480
|
|
|
3449
3481
|
/** @public @react */
|
|
3450
|
-
export declare function TldrawUiPopoverContent({ side, children, align, sideOffset, alignOffset, disableEscapeKeyDown, autoFocusFirstButton
|
|
3482
|
+
export declare function TldrawUiPopoverContent({ side, children, align, sideOffset, alignOffset, disableEscapeKeyDown, autoFocusFirstButton }: TLUiPopoverContentProps): JSX.Element;
|
|
3451
3483
|
|
|
3452
3484
|
/** @public @react */
|
|
3453
3485
|
export declare function TldrawUiPopoverTrigger({ children }: TLUiPopoverTriggerProps): JSX.Element;
|
|
@@ -3500,7 +3532,7 @@ export declare const TldrawUiRow: ForwardRefExoticComponent<TLUiLayoutProps & Re
|
|
|
3500
3532
|
* @public
|
|
3501
3533
|
* @react
|
|
3502
3534
|
*/
|
|
3503
|
-
export declare function TldrawUiSelect({ id, value, onValueChange, onOpenChange, disabled, className, children, 'data-testid': dataTestId, 'aria-label': ariaLabel
|
|
3535
|
+
export declare function TldrawUiSelect({ id, value, onValueChange, onOpenChange, disabled, className, children, 'data-testid': dataTestId, 'aria-label': ariaLabel }: TLUiSelectProps): JSX.Element;
|
|
3504
3536
|
|
|
3505
3537
|
/**
|
|
3506
3538
|
* The dropdown content container for select items.
|
|
@@ -3508,7 +3540,7 @@ export declare function TldrawUiSelect({ id, value, onValueChange, onOpenChange,
|
|
|
3508
3540
|
* @public
|
|
3509
3541
|
* @react
|
|
3510
3542
|
*/
|
|
3511
|
-
export declare function TldrawUiSelectContent({ children, side, align, className
|
|
3543
|
+
export declare function TldrawUiSelectContent({ children, side, align, className }: TLUiSelectContentProps): JSX.Element;
|
|
3512
3544
|
|
|
3513
3545
|
/**
|
|
3514
3546
|
* An item in the select dropdown. Styled to match TldrawUiMenuCheckboxItem.
|
|
@@ -3516,7 +3548,7 @@ export declare function TldrawUiSelectContent({ children, side, align, className
|
|
|
3516
3548
|
* @public
|
|
3517
3549
|
* @react
|
|
3518
3550
|
*/
|
|
3519
|
-
export declare function TldrawUiSelectItem({ value, label, icon, disabled, className
|
|
3551
|
+
export declare function TldrawUiSelectItem({ value, label, icon, disabled, className }: TLUiSelectItemProps): JSX.Element;
|
|
3520
3552
|
|
|
3521
3553
|
/**
|
|
3522
3554
|
* The trigger button for the select dropdown.
|
|
@@ -4745,7 +4777,7 @@ export declare function unwrapLabel(label?: TLUiActionItem['label'], menuType?:
|
|
|
4745
4777
|
*
|
|
4746
4778
|
* @public
|
|
4747
4779
|
*/
|
|
4748
|
-
export declare function updateArrowTargetState({ editor, pointInPageSpace, arrow, isPrecise, currentBinding, oppositeBinding
|
|
4780
|
+
export declare function updateArrowTargetState({ editor, pointInPageSpace, arrow, isPrecise, currentBinding, oppositeBinding }: UpdateArrowTargetStateOpts): ArrowTargetState | null;
|
|
4749
4781
|
|
|
4750
4782
|
/**
|
|
4751
4783
|
* Options passed to {@link updateArrowTargetState}.
|
|
@@ -4819,29 +4851,29 @@ export declare function useDefaultColorTheme(): {
|
|
|
4819
4851
|
/** @public */
|
|
4820
4852
|
export declare function useDefaultHelpers(): {
|
|
4821
4853
|
addDialog: (dialog: Omit<TLUiDialog, "id"> & {
|
|
4822
|
-
id?: string;
|
|
4854
|
+
id?: string | undefined;
|
|
4823
4855
|
}) => string;
|
|
4824
4856
|
addToast: (toast: Omit<TLUiToast, "id"> & {
|
|
4825
|
-
id?: string;
|
|
4857
|
+
id?: string | undefined;
|
|
4826
4858
|
}) => string;
|
|
4827
4859
|
clearDialogs: () => void;
|
|
4828
4860
|
clearToasts: () => void;
|
|
4829
4861
|
copy: (source: TLUiEventSource) => Promise<void>;
|
|
4830
|
-
copyAs: (ids:
|
|
4862
|
+
copyAs: (ids: TLShapeId_2[], format?: TLCopyType) => void;
|
|
4831
4863
|
cut: (source: TLUiEventSource) => Promise<void>;
|
|
4832
|
-
exportAs: (ids:
|
|
4833
|
-
format?: TLExportType;
|
|
4834
|
-
name?: string;
|
|
4835
|
-
scale?: number;
|
|
4864
|
+
exportAs: (ids: TLShapeId_2[], opts?: {
|
|
4865
|
+
format?: TLExportType | undefined;
|
|
4866
|
+
name?: string | undefined;
|
|
4867
|
+
scale?: number | undefined;
|
|
4836
4868
|
}) => void;
|
|
4837
4869
|
getEmbedDefinition: (url: string) => TLEmbedResult;
|
|
4838
4870
|
insertMedia: () => Promise<void>;
|
|
4839
4871
|
isMobile: boolean;
|
|
4840
|
-
msg: (id?:
|
|
4841
|
-
paste: (data: ClipboardItem[] | DataTransfer, source: TLUiEventSource, point?: VecLike) => Promise<void>;
|
|
4872
|
+
msg: (id?: string | undefined) => string;
|
|
4873
|
+
paste: (data: ClipboardItem[] | DataTransfer, source: TLUiEventSource, point?: VecLike | undefined) => Promise<void>;
|
|
4842
4874
|
printSelectionOrPages: () => Promise<void>;
|
|
4843
4875
|
removeDialog: (id: string) => string;
|
|
4844
|
-
removeToast: (id:
|
|
4876
|
+
removeToast: (id: string) => string;
|
|
4845
4877
|
replaceImage: () => Promise<void>;
|
|
4846
4878
|
replaceVideo: () => Promise<void>;
|
|
4847
4879
|
};
|
|
@@ -4861,7 +4893,7 @@ export declare function useEditablePlainText(shapeId: TLShapeId, type: ExtractSh
|
|
|
4861
4893
|
nativeEvent: Event;
|
|
4862
4894
|
} | Event) => void;
|
|
4863
4895
|
handleFocus: () => void;
|
|
4864
|
-
handleInputPointerDown: (e: React_3.PointerEvent) => void;
|
|
4896
|
+
handleInputPointerDown: (e: React_3.PointerEvent<Element>) => void;
|
|
4865
4897
|
handleKeyDown: (e: KeyboardEvent) => void;
|
|
4866
4898
|
handlePaste: (e: ClipboardEvent | React_3.ClipboardEvent<HTMLTextAreaElement>) => void;
|
|
4867
4899
|
isEditing: boolean;
|
|
@@ -4876,15 +4908,19 @@ export declare function useEditableRichText(shapeId: TLShapeId, type: ExtractSha
|
|
|
4876
4908
|
}>['type'], richText?: TLRichText): {
|
|
4877
4909
|
handleBlur: () => void;
|
|
4878
4910
|
handleChange: ({ richText }: {
|
|
4879
|
-
richText:
|
|
4911
|
+
richText: {
|
|
4912
|
+
attrs?: any;
|
|
4913
|
+
content: unknown[];
|
|
4914
|
+
type: string;
|
|
4915
|
+
};
|
|
4880
4916
|
}) => void;
|
|
4881
4917
|
handleDoubleClick: (e: {
|
|
4882
4918
|
nativeEvent: Event;
|
|
4883
4919
|
} | Event) => void;
|
|
4884
4920
|
handleFocus: () => void;
|
|
4885
|
-
handleInputPointerDown: (e:
|
|
4921
|
+
handleInputPointerDown: (e: PointerEvent_2<Element>) => void;
|
|
4886
4922
|
handleKeyDown: (e: KeyboardEvent) => void;
|
|
4887
|
-
handlePaste: (e: ClipboardEvent |
|
|
4923
|
+
handlePaste: (e: ClipboardEvent | ClipboardEvent_2<HTMLTextAreaElement>) => void;
|
|
4888
4924
|
isEditing: boolean;
|
|
4889
4925
|
isEmpty: boolean | undefined;
|
|
4890
4926
|
isReadyForEditing: boolean;
|
|
@@ -4893,9 +4929,9 @@ export declare function useEditableRichText(shapeId: TLShapeId, type: ExtractSha
|
|
|
4893
4929
|
|
|
4894
4930
|
/** @public */
|
|
4895
4931
|
export declare function useExportAs(): (ids: TLShapeId[], opts?: {
|
|
4896
|
-
format?: TLExportType;
|
|
4897
|
-
name?: string;
|
|
4898
|
-
scale?: number;
|
|
4932
|
+
format?: TLExportType | undefined;
|
|
4933
|
+
name?: string | undefined;
|
|
4934
|
+
scale?: number | undefined;
|
|
4899
4935
|
}) => void;
|
|
4900
4936
|
|
|
4901
4937
|
/**
|
|
@@ -4910,7 +4946,7 @@ export declare function useExportAs(): (ids: TLShapeId[], opts?: {
|
|
|
4910
4946
|
* @public
|
|
4911
4947
|
*/
|
|
4912
4948
|
export declare function useImageOrVideoAsset({ shapeId, assetId, width }: UseImageOrVideoAssetOptions): {
|
|
4913
|
-
asset:
|
|
4949
|
+
asset: null | TLImageAsset | TLVideoAsset;
|
|
4914
4950
|
url: null | string;
|
|
4915
4951
|
};
|
|
4916
4952
|
|
|
@@ -4946,7 +4982,7 @@ export declare function useLocalStorageState<T = any>(key: string, defaultValue:
|
|
|
4946
4982
|
export declare function useMenuClipboardEvents(): {
|
|
4947
4983
|
copy: (source: TLUiEventSource) => Promise<void>;
|
|
4948
4984
|
cut: (source: TLUiEventSource) => Promise<void>;
|
|
4949
|
-
paste: (data: ClipboardItem[] | DataTransfer, source: TLUiEventSource, point?: VecLike) => Promise<void>;
|
|
4985
|
+
paste: (data: ClipboardItem[] | DataTransfer, source: TLUiEventSource, point?: undefined | VecLike) => Promise<void>;
|
|
4950
4986
|
};
|
|
4951
4987
|
|
|
4952
4988
|
/** @public */
|
|
@@ -4997,7 +5033,7 @@ export declare function useTools(): TLUiToolsContextType;
|
|
|
4997
5033
|
*
|
|
4998
5034
|
* @public
|
|
4999
5035
|
*/
|
|
5000
|
-
export declare function useTranslation(): (id?:
|
|
5036
|
+
export declare function useTranslation(): (id?: string | undefined) => string;
|
|
5001
5037
|
|
|
5002
5038
|
/** @public */
|
|
5003
5039
|
export declare function useUiEvents(): TLUiEventContextType;
|
|
@@ -5055,7 +5091,7 @@ export declare class ZoomTool extends StateNode {
|
|
|
5055
5091
|
static children(): TLStateNodeConstructor[];
|
|
5056
5092
|
static isLockable: boolean;
|
|
5057
5093
|
info: TLPointerEventInfo & {
|
|
5058
|
-
onInteractionEnd?: string;
|
|
5094
|
+
onInteractionEnd?: string | undefined;
|
|
5059
5095
|
};
|
|
5060
5096
|
onEnter(info: TLPointerEventInfo & {
|
|
5061
5097
|
onInteractionEnd: string;
|