@tldraw/editor 4.2.2 → 4.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.d.ts +155 -498
- package/dist-cjs/index.js +1 -6
- package/dist-cjs/index.js.map +2 -2
- package/dist-cjs/lib/components/ErrorBoundary.js.map +1 -1
- package/dist-cjs/lib/components/GeometryDebuggingView.js +17 -1
- package/dist-cjs/lib/components/GeometryDebuggingView.js.map +2 -2
- package/dist-cjs/lib/components/default-components/DefaultCanvas.js +3 -3
- package/dist-cjs/lib/components/default-components/DefaultCanvas.js.map +2 -2
- package/dist-cjs/lib/constants.js +3 -1
- package/dist-cjs/lib/constants.js.map +2 -2
- package/dist-cjs/lib/editor/Editor.js +286 -292
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/lib/editor/bindings/BindingUtil.js.map +2 -2
- package/dist-cjs/lib/editor/derivations/bindingsIndex.js.map +2 -2
- package/dist-cjs/lib/editor/derivations/notVisibleShapes.js +17 -18
- package/dist-cjs/lib/editor/derivations/notVisibleShapes.js.map +3 -3
- package/dist-cjs/lib/editor/derivations/parentsToChildren.js +3 -12
- package/dist-cjs/lib/editor/derivations/parentsToChildren.js.map +2 -2
- package/dist-cjs/lib/editor/managers/ClickManager/ClickManager.js +1 -1
- package/dist-cjs/lib/editor/managers/ClickManager/ClickManager.js.map +2 -2
- package/dist-cjs/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.js +6 -5
- package/dist-cjs/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.js.map +2 -2
- package/dist-cjs/lib/editor/managers/SnapManager/SnapManager.js +1 -1
- package/dist-cjs/lib/editor/managers/SnapManager/SnapManager.js.map +2 -2
- package/dist-cjs/lib/editor/managers/TickManager/TickManager.js +22 -1
- package/dist-cjs/lib/editor/managers/TickManager/TickManager.js.map +2 -2
- package/dist-cjs/lib/editor/shapes/BaseBoxShapeUtil.js.map +1 -1
- package/dist-cjs/lib/editor/shapes/ShapeUtil.js +23 -31
- package/dist-cjs/lib/editor/shapes/ShapeUtil.js.map +2 -2
- package/dist-cjs/lib/editor/shapes/group/DashedOutlineBox.js +1 -1
- package/dist-cjs/lib/editor/shapes/group/DashedOutlineBox.js.map +2 -2
- package/dist-cjs/lib/editor/shapes/group/GroupShapeUtil.js.map +2 -2
- package/dist-cjs/lib/editor/tools/BaseBoxShapeTool/BaseBoxShapeTool.js.map +2 -2
- package/dist-cjs/lib/editor/tools/BaseBoxShapeTool/children/Pointing.js +3 -3
- package/dist-cjs/lib/editor/tools/BaseBoxShapeTool/children/Pointing.js.map +2 -2
- package/dist-cjs/lib/editor/types/emit-types.js.map +1 -1
- package/dist-cjs/lib/exports/getSvgJsx.js.map +2 -2
- package/dist-cjs/lib/exports/parseCss.js +1 -1
- package/dist-cjs/lib/exports/parseCss.js.map +2 -2
- package/dist-cjs/lib/globals/environment.js +9 -45
- package/dist-cjs/lib/globals/environment.js.map +2 -2
- package/dist-cjs/lib/globals/menus.js +1 -1
- package/dist-cjs/lib/globals/menus.js.map +2 -2
- package/dist-cjs/lib/hooks/useCanvasEvents.js +3 -4
- package/dist-cjs/lib/hooks/useCanvasEvents.js.map +2 -2
- package/dist-cjs/lib/hooks/useCoarsePointer.js +29 -14
- package/dist-cjs/lib/hooks/useCoarsePointer.js.map +2 -2
- package/dist-cjs/lib/hooks/useEvent.js +1 -1
- package/dist-cjs/lib/hooks/useEvent.js.map +2 -2
- package/dist-cjs/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.js.map +2 -2
- package/dist-cjs/lib/hooks/useGestureEvents.js +1 -1
- package/dist-cjs/lib/hooks/useGestureEvents.js.map +2 -2
- package/dist-cjs/lib/hooks/usePassThroughMouseOverEvents.js.map +2 -2
- package/dist-cjs/lib/hooks/usePassThroughWheelEvents.js.map +2 -2
- package/dist-cjs/lib/hooks/useScreenBounds.js.map +2 -2
- package/dist-cjs/lib/hooks/useStateAttribute.js +1 -4
- package/dist-cjs/lib/hooks/useStateAttribute.js.map +2 -2
- package/dist-cjs/lib/hooks/useTransform.js.map +1 -1
- package/dist-cjs/lib/hooks/useZoomCss.js +8 -4
- package/dist-cjs/lib/hooks/useZoomCss.js.map +2 -2
- package/dist-cjs/lib/options.js +1 -6
- package/dist-cjs/lib/options.js.map +2 -2
- package/dist-cjs/lib/primitives/Box.js +0 -3
- package/dist-cjs/lib/primitives/Box.js.map +2 -2
- package/dist-cjs/lib/primitives/geometry/Geometry2d.js +0 -1
- package/dist-cjs/lib/primitives/geometry/Geometry2d.js.map +2 -2
- package/dist-cjs/lib/utils/reparenting.js.map +2 -2
- package/dist-cjs/lib/utils/rotation.js +1 -1
- package/dist-cjs/lib/utils/rotation.js.map +2 -2
- package/dist-cjs/version.js +3 -3
- package/dist-cjs/version.js.map +1 -1
- package/dist-esm/index.d.mts +155 -498
- package/dist-esm/index.mjs +2 -7
- package/dist-esm/index.mjs.map +2 -2
- package/dist-esm/lib/components/ErrorBoundary.mjs.map +1 -1
- package/dist-esm/lib/components/GeometryDebuggingView.mjs +17 -1
- package/dist-esm/lib/components/GeometryDebuggingView.mjs.map +2 -2
- package/dist-esm/lib/components/default-components/DefaultCanvas.mjs +3 -3
- package/dist-esm/lib/components/default-components/DefaultCanvas.mjs.map +2 -2
- package/dist-esm/lib/constants.mjs +3 -1
- package/dist-esm/lib/constants.mjs.map +2 -2
- package/dist-esm/lib/editor/Editor.mjs +289 -293
- package/dist-esm/lib/editor/Editor.mjs.map +2 -2
- package/dist-esm/lib/editor/bindings/BindingUtil.mjs.map +2 -2
- package/dist-esm/lib/editor/derivations/bindingsIndex.mjs.map +2 -2
- package/dist-esm/lib/editor/derivations/notVisibleShapes.mjs +17 -18
- package/dist-esm/lib/editor/derivations/notVisibleShapes.mjs.map +3 -3
- package/dist-esm/lib/editor/derivations/parentsToChildren.mjs +4 -13
- package/dist-esm/lib/editor/derivations/parentsToChildren.mjs.map +2 -2
- package/dist-esm/lib/editor/managers/ClickManager/ClickManager.mjs +1 -1
- package/dist-esm/lib/editor/managers/ClickManager/ClickManager.mjs.map +2 -2
- package/dist-esm/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.mjs +6 -5
- package/dist-esm/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.mjs.map +2 -2
- package/dist-esm/lib/editor/managers/SnapManager/SnapManager.mjs +1 -1
- package/dist-esm/lib/editor/managers/SnapManager/SnapManager.mjs.map +2 -2
- package/dist-esm/lib/editor/managers/TickManager/TickManager.mjs +22 -1
- package/dist-esm/lib/editor/managers/TickManager/TickManager.mjs.map +2 -2
- package/dist-esm/lib/editor/shapes/BaseBoxShapeUtil.mjs.map +1 -1
- package/dist-esm/lib/editor/shapes/ShapeUtil.mjs +23 -31
- package/dist-esm/lib/editor/shapes/ShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/editor/shapes/group/DashedOutlineBox.mjs +1 -1
- package/dist-esm/lib/editor/shapes/group/DashedOutlineBox.mjs.map +2 -2
- package/dist-esm/lib/editor/shapes/group/GroupShapeUtil.mjs.map +2 -2
- package/dist-esm/lib/editor/tools/BaseBoxShapeTool/BaseBoxShapeTool.mjs.map +2 -2
- package/dist-esm/lib/editor/tools/BaseBoxShapeTool/children/Pointing.mjs +3 -3
- package/dist-esm/lib/editor/tools/BaseBoxShapeTool/children/Pointing.mjs.map +2 -2
- package/dist-esm/lib/exports/getSvgJsx.mjs.map +2 -2
- package/dist-esm/lib/exports/parseCss.mjs +1 -1
- package/dist-esm/lib/exports/parseCss.mjs.map +2 -2
- package/dist-esm/lib/globals/environment.mjs +9 -45
- package/dist-esm/lib/globals/environment.mjs.map +2 -2
- package/dist-esm/lib/globals/menus.mjs +1 -1
- package/dist-esm/lib/globals/menus.mjs.map +2 -2
- package/dist-esm/lib/hooks/useCanvasEvents.mjs +3 -4
- package/dist-esm/lib/hooks/useCanvasEvents.mjs.map +2 -2
- package/dist-esm/lib/hooks/useCoarsePointer.mjs +30 -15
- package/dist-esm/lib/hooks/useCoarsePointer.mjs.map +2 -2
- package/dist-esm/lib/hooks/useEvent.mjs +1 -1
- package/dist-esm/lib/hooks/useEvent.mjs.map +2 -2
- package/dist-esm/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.mjs.map +2 -2
- package/dist-esm/lib/hooks/useGestureEvents.mjs +1 -1
- package/dist-esm/lib/hooks/useGestureEvents.mjs.map +2 -2
- package/dist-esm/lib/hooks/usePassThroughMouseOverEvents.mjs.map +2 -2
- package/dist-esm/lib/hooks/usePassThroughWheelEvents.mjs.map +2 -2
- package/dist-esm/lib/hooks/useScreenBounds.mjs.map +2 -2
- package/dist-esm/lib/hooks/useStateAttribute.mjs +1 -4
- package/dist-esm/lib/hooks/useStateAttribute.mjs.map +2 -2
- package/dist-esm/lib/hooks/useTransform.mjs.map +1 -1
- package/dist-esm/lib/hooks/useZoomCss.mjs +8 -4
- package/dist-esm/lib/hooks/useZoomCss.mjs.map +2 -2
- package/dist-esm/lib/options.mjs +1 -6
- package/dist-esm/lib/options.mjs.map +2 -2
- package/dist-esm/lib/primitives/Box.mjs +0 -3
- package/dist-esm/lib/primitives/Box.mjs.map +2 -2
- package/dist-esm/lib/primitives/geometry/Geometry2d.mjs +0 -1
- package/dist-esm/lib/primitives/geometry/Geometry2d.mjs.map +2 -2
- package/dist-esm/lib/utils/reparenting.mjs.map +2 -2
- package/dist-esm/lib/utils/rotation.mjs +1 -1
- package/dist-esm/lib/utils/rotation.mjs.map +2 -2
- package/dist-esm/version.mjs +3 -3
- package/dist-esm/version.mjs.map +1 -1
- package/editor.css +12 -14
- package/package.json +16 -18
- package/src/index.ts +1 -4
- package/src/lib/components/ErrorBoundary.tsx +1 -1
- package/src/lib/components/GeometryDebuggingView.tsx +19 -1
- package/src/lib/components/default-components/DefaultCanvas.tsx +3 -4
- package/src/lib/constants.ts +2 -0
- package/src/lib/editor/Editor.test.ts +10 -150
- package/src/lib/editor/Editor.ts +379 -459
- package/src/lib/editor/bindings/BindingUtil.ts +9 -15
- package/src/lib/editor/derivations/bindingsIndex.ts +2 -2
- package/src/lib/editor/derivations/notVisibleShapes.ts +23 -37
- package/src/lib/editor/derivations/parentsToChildren.ts +7 -18
- package/src/lib/editor/managers/ClickManager/ClickManager.test.ts +31 -17
- package/src/lib/editor/managers/ClickManager/ClickManager.ts +1 -1
- package/src/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.test.ts +79 -129
- package/src/lib/editor/managers/EdgeScrollManager/EdgeScrollManager.ts +6 -10
- package/src/lib/editor/managers/FontManager/FontManager.test.ts +4 -14
- package/src/lib/editor/managers/ScribbleManager/ScribbleManager.test.ts +4 -0
- package/src/lib/editor/managers/SnapManager/SnapManager.test.ts +0 -12
- package/src/lib/editor/managers/SnapManager/SnapManager.ts +4 -4
- package/src/lib/editor/managers/TickManager/TickManager.test.ts +107 -40
- package/src/lib/editor/managers/TickManager/TickManager.ts +32 -2
- package/src/lib/editor/shapes/BaseBoxShapeUtil.tsx +2 -2
- package/src/lib/editor/shapes/ShapeUtil.ts +32 -72
- package/src/lib/editor/shapes/group/DashedOutlineBox.tsx +1 -1
- package/src/lib/editor/shapes/group/GroupShapeUtil.tsx +3 -1
- package/src/lib/editor/tools/BaseBoxShapeTool/BaseBoxShapeTool.ts +1 -2
- package/src/lib/editor/tools/BaseBoxShapeTool/children/Pointing.ts +6 -6
- package/src/lib/editor/types/emit-types.ts +1 -3
- package/src/lib/exports/getSvgJsx.test.ts +19 -10
- package/src/lib/exports/getSvgJsx.tsx +5 -2
- package/src/lib/exports/parseCss.test.ts +0 -1
- package/src/lib/exports/parseCss.ts +1 -1
- package/src/lib/globals/environment.ts +10 -65
- package/src/lib/globals/menus.ts +1 -1
- package/src/lib/hooks/useCanvasEvents.ts +3 -4
- package/src/lib/hooks/useCoarsePointer.ts +59 -16
- package/src/lib/hooks/useEvent.tsx +1 -1
- package/src/lib/hooks/useFixSafariDoubleTapZoomPencilEvents.ts +1 -1
- package/src/lib/hooks/useGestureEvents.ts +2 -2
- package/src/lib/hooks/usePassThroughMouseOverEvents.ts +1 -1
- package/src/lib/hooks/usePassThroughWheelEvents.ts +1 -1
- package/src/lib/hooks/useScreenBounds.ts +1 -1
- package/src/lib/hooks/useStateAttribute.ts +1 -4
- package/src/lib/hooks/useTransform.ts +1 -1
- package/src/lib/hooks/useZoomCss.ts +8 -3
- package/src/lib/options.ts +0 -32
- package/src/lib/primitives/Box.ts +0 -9
- package/src/lib/primitives/geometry/Geometry2d.ts +0 -1
- package/src/lib/utils/reparenting.ts +5 -5
- package/src/lib/utils/rotation.ts +1 -1
- package/src/version.ts +3 -3
- package/dist-cjs/lib/editor/managers/InputsManager/InputsManager.js +0 -591
- package/dist-cjs/lib/editor/managers/InputsManager/InputsManager.js.map +0 -7
- package/dist-esm/lib/editor/managers/InputsManager/InputsManager.mjs +0 -573
- package/dist-esm/lib/editor/managers/InputsManager/InputsManager.mjs.map +0 -7
- package/src/lib/config/TLUserPreferences.test.ts +0 -40
- package/src/lib/editor/managers/InputsManager/InputsManager.ts +0 -566
package/dist-cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Atom } from '@tldraw/state';
|
|
2
|
-
import { AtomSet } from '@tldraw/store';
|
|
3
2
|
import { BoxModel } from '@tldraw/tlschema';
|
|
4
3
|
import { ComponentType } from 'react';
|
|
5
4
|
import { Computed } from '@tldraw/state';
|
|
@@ -8,13 +7,11 @@ import { Editor as Editor_2 } from '@tiptap/core';
|
|
|
8
7
|
import { EditorProviderProps as EditorProviderProps_2 } from '@tiptap/react';
|
|
9
8
|
import EventEmitter from 'eventemitter3';
|
|
10
9
|
import { ExoticComponent } from 'react';
|
|
11
|
-
import { ExtractShapeByProps } from '@tldraw/tlschema';
|
|
12
10
|
import { ForwardRefExoticComponent } from 'react';
|
|
13
|
-
import { FragmentProps } from 'react';
|
|
14
11
|
import { HistoryEntry } from '@tldraw/store';
|
|
15
12
|
import { IndexKey } from '@tldraw/utils';
|
|
16
13
|
import { JsonObject } from '@tldraw/utils';
|
|
17
|
-
import { JSX } from 'react/jsx-runtime';
|
|
14
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
18
15
|
import { LegacyMigrations } from '@tldraw/store';
|
|
19
16
|
import { MigrationSequence } from '@tldraw/store';
|
|
20
17
|
import { NamedExoticComponent } from 'react';
|
|
@@ -51,7 +48,6 @@ import { TLBindingId } from '@tldraw/tlschema';
|
|
|
51
48
|
import { TLBindingUpdate } from '@tldraw/tlschema';
|
|
52
49
|
import { TLBookmarkAsset } from '@tldraw/tlschema';
|
|
53
50
|
import { TLCamera } from '@tldraw/tlschema';
|
|
54
|
-
import { TLCreateShapePartial } from '@tldraw/tlschema';
|
|
55
51
|
import { TLCursor } from '@tldraw/tlschema';
|
|
56
52
|
import { TLCursorType } from '@tldraw/tlschema';
|
|
57
53
|
import { TLDefaultDashStyle } from '@tldraw/tlschema';
|
|
@@ -151,7 +147,7 @@ export declare abstract class BaseBoxShapeTool extends StateNode {
|
|
|
151
147
|
static id: string;
|
|
152
148
|
static initial: string;
|
|
153
149
|
static children(): TLStateNodeConstructor[];
|
|
154
|
-
abstract shapeType:
|
|
150
|
+
abstract shapeType: string;
|
|
155
151
|
onCreate?(_shape: null | TLShape): null | void;
|
|
156
152
|
}
|
|
157
153
|
|
|
@@ -169,7 +165,7 @@ export declare abstract class BaseBoxShapeUtil<Shape extends TLBaseBoxShape> ext
|
|
|
169
165
|
*
|
|
170
166
|
* @public
|
|
171
167
|
*/
|
|
172
|
-
export declare interface BindingOnChangeOptions<Binding extends
|
|
168
|
+
export declare interface BindingOnChangeOptions<Binding extends TLUnknownBinding> {
|
|
173
169
|
/** The binding record before the change is made. */
|
|
174
170
|
bindingBefore: Binding;
|
|
175
171
|
/** The binding record after the change is made. */
|
|
@@ -182,7 +178,7 @@ export declare interface BindingOnChangeOptions<Binding extends TLBinding = TLBi
|
|
|
182
178
|
*
|
|
183
179
|
* @public
|
|
184
180
|
*/
|
|
185
|
-
export declare interface BindingOnCreateOptions<Binding extends
|
|
181
|
+
export declare interface BindingOnCreateOptions<Binding extends TLUnknownBinding> {
|
|
186
182
|
/** The binding being created. */
|
|
187
183
|
binding: Binding;
|
|
188
184
|
}
|
|
@@ -193,7 +189,7 @@ export declare interface BindingOnCreateOptions<Binding extends TLBinding = TLBi
|
|
|
193
189
|
*
|
|
194
190
|
* @public
|
|
195
191
|
*/
|
|
196
|
-
export declare interface BindingOnDeleteOptions<Binding extends
|
|
192
|
+
export declare interface BindingOnDeleteOptions<Binding extends TLUnknownBinding> {
|
|
197
193
|
/** The binding being deleted. */
|
|
198
194
|
binding: Binding;
|
|
199
195
|
}
|
|
@@ -204,7 +200,7 @@ export declare interface BindingOnDeleteOptions<Binding extends TLBinding = TLBi
|
|
|
204
200
|
*
|
|
205
201
|
* @public
|
|
206
202
|
*/
|
|
207
|
-
export declare interface BindingOnShapeChangeOptions<Binding extends
|
|
203
|
+
export declare interface BindingOnShapeChangeOptions<Binding extends TLUnknownBinding> {
|
|
208
204
|
/** The binding record linking these two shapes. */
|
|
209
205
|
binding: Binding;
|
|
210
206
|
/** The shape record before the change is made. */
|
|
@@ -228,7 +224,7 @@ export declare interface BindingOnShapeChangeOptions<Binding extends TLBinding =
|
|
|
228
224
|
*
|
|
229
225
|
* @public
|
|
230
226
|
*/
|
|
231
|
-
export declare interface BindingOnShapeDeleteOptions<Binding extends
|
|
227
|
+
export declare interface BindingOnShapeDeleteOptions<Binding extends TLUnknownBinding> {
|
|
232
228
|
/** The binding record that refers to the shape in question. */
|
|
233
229
|
binding: Binding;
|
|
234
230
|
/** The shape that is about to be deleted. */
|
|
@@ -260,7 +256,7 @@ export declare interface BindingOnShapeDeleteOptions<Binding extends TLBinding =
|
|
|
260
256
|
*
|
|
261
257
|
* @public
|
|
262
258
|
*/
|
|
263
|
-
export declare interface BindingOnShapeIsolateOptions<Binding extends
|
|
259
|
+
export declare interface BindingOnShapeIsolateOptions<Binding extends TLUnknownBinding> {
|
|
264
260
|
/** The binding record that refers to the shape in question. */
|
|
265
261
|
binding: Binding;
|
|
266
262
|
/**
|
|
@@ -271,7 +267,7 @@ export declare interface BindingOnShapeIsolateOptions<Binding extends TLBinding
|
|
|
271
267
|
}
|
|
272
268
|
|
|
273
269
|
/** @public */
|
|
274
|
-
export declare abstract class BindingUtil<Binding extends
|
|
270
|
+
export declare abstract class BindingUtil<Binding extends TLUnknownBinding = TLUnknownBinding> {
|
|
275
271
|
editor: Editor;
|
|
276
272
|
constructor(editor: Editor);
|
|
277
273
|
static props?: RecordProps<TLUnknownBinding>;
|
|
@@ -490,7 +486,6 @@ export declare class Box {
|
|
|
490
486
|
get cornersAndCenter(): Vec[];
|
|
491
487
|
get sides(): Array<[Vec, Vec]>;
|
|
492
488
|
get size(): Vec;
|
|
493
|
-
isValid(): boolean;
|
|
494
489
|
toFixed(): this;
|
|
495
490
|
setTo(B: Box): this;
|
|
496
491
|
set(x?: number, y?: number, w?: number, h?: number): this;
|
|
@@ -658,7 +653,7 @@ export declare function clockwiseAngleDist(a0: number, a1: number): number;
|
|
|
658
653
|
* @public
|
|
659
654
|
* @react
|
|
660
655
|
*/
|
|
661
|
-
export declare function ContainerProvider({ container, children }: ContainerProviderProps):
|
|
656
|
+
export declare function ContainerProvider({ container, children }: ContainerProviderProps): JSX_2.Element;
|
|
662
657
|
|
|
663
658
|
/** @public */
|
|
664
659
|
export declare interface ContainerProviderProps {
|
|
@@ -799,16 +794,16 @@ export declare interface DebugFlagDefaults<T> {
|
|
|
799
794
|
/* Excluded from this release type: DEFAULT_CAMERA_OPTIONS */
|
|
800
795
|
|
|
801
796
|
/** @public @react */
|
|
802
|
-
export declare function DefaultBackground():
|
|
797
|
+
export declare function DefaultBackground(): JSX_2.Element;
|
|
803
798
|
|
|
804
799
|
/** @public @react */
|
|
805
|
-
export declare const DefaultBrush: ({ brush, color, opacity, className }: TLBrushProps) =>
|
|
800
|
+
export declare const DefaultBrush: ({ brush, color, opacity, className }: TLBrushProps) => JSX_2.Element;
|
|
806
801
|
|
|
807
802
|
/** @public @react */
|
|
808
|
-
export declare function DefaultCanvas({ className }: TLCanvasComponentProps):
|
|
803
|
+
export declare function DefaultCanvas({ className }: TLCanvasComponentProps): JSX_2.Element;
|
|
809
804
|
|
|
810
805
|
/** @public @react */
|
|
811
|
-
export declare function DefaultCollaboratorHint({ className, zoom, point, color, viewport, opacity, }: TLCollaboratorHintProps):
|
|
806
|
+
export declare function DefaultCollaboratorHint({ className, zoom, point, color, viewport, opacity, }: TLCollaboratorHintProps): JSX_2.Element;
|
|
812
807
|
|
|
813
808
|
/** @public @react */
|
|
814
809
|
export declare const DefaultCursor: NamedExoticComponent<TLCursorProps>;
|
|
@@ -817,22 +812,22 @@ export declare const DefaultCursor: NamedExoticComponent<TLCursorProps>;
|
|
|
817
812
|
export declare const DefaultErrorFallback: TLErrorFallbackComponent;
|
|
818
813
|
|
|
819
814
|
/** @public @react */
|
|
820
|
-
export declare function DefaultGrid({ x, y, z, size }: TLGridProps):
|
|
815
|
+
export declare function DefaultGrid({ x, y, z, size }: TLGridProps): JSX_2.Element;
|
|
821
816
|
|
|
822
817
|
/** @public @react */
|
|
823
|
-
export declare function DefaultHandle({ handle, isCoarse, className, zoom }: TLHandleProps):
|
|
818
|
+
export declare function DefaultHandle({ handle, isCoarse, className, zoom }: TLHandleProps): JSX_2.Element;
|
|
824
819
|
|
|
825
820
|
/** @public @react */
|
|
826
|
-
export declare const DefaultHandles: ({ children }: TLHandlesProps) =>
|
|
821
|
+
export declare const DefaultHandles: ({ children }: TLHandlesProps) => JSX_2.Element;
|
|
827
822
|
|
|
828
823
|
/** @public @react */
|
|
829
|
-
export declare function DefaultScribble({ scribble, zoom, color, opacity, className }: TLScribbleProps):
|
|
824
|
+
export declare function DefaultScribble({ scribble, zoom, color, opacity, className }: TLScribbleProps): JSX_2.Element | null;
|
|
830
825
|
|
|
831
826
|
/** @public @react */
|
|
832
|
-
export declare function DefaultSelectionBackground({ bounds, rotation }: TLSelectionBackgroundProps):
|
|
827
|
+
export declare function DefaultSelectionBackground({ bounds, rotation }: TLSelectionBackgroundProps): JSX_2.Element;
|
|
833
828
|
|
|
834
829
|
/** @public @react */
|
|
835
|
-
export declare function DefaultSelectionForeground({ bounds, rotation }: TLSelectionForegroundProps):
|
|
830
|
+
export declare function DefaultSelectionForeground({ bounds, rotation }: TLSelectionForegroundProps): JSX_2.Element;
|
|
836
831
|
|
|
837
832
|
/** @public @react */
|
|
838
833
|
export declare const DefaultShapeIndicator: NamedExoticComponent<TLShapeIndicatorProps>;
|
|
@@ -844,10 +839,10 @@ export declare const DefaultShapeIndicators: NamedExoticComponent<TLShapeIndicat
|
|
|
844
839
|
export declare const DefaultShapeWrapper: ForwardRefExoticComponent<TLShapeWrapperProps & RefAttributes<HTMLDivElement>>;
|
|
845
840
|
|
|
846
841
|
/** @public @react */
|
|
847
|
-
export declare function DefaultSnapIndicator({ className, line, zoom }: TLSnapIndicatorProps):
|
|
842
|
+
export declare function DefaultSnapIndicator({ className, line, zoom }: TLSnapIndicatorProps): JSX_2.Element;
|
|
848
843
|
|
|
849
844
|
/** @public @react */
|
|
850
|
-
export declare function DefaultSpinner(props: React.SVGProps<SVGSVGElement>):
|
|
845
|
+
export declare function DefaultSpinner(props: React.SVGProps<SVGSVGElement>): JSX_2.Element;
|
|
851
846
|
|
|
852
847
|
/** @public @react */
|
|
853
848
|
export declare const DefaultSvgDefs: () => null;
|
|
@@ -866,8 +861,6 @@ export declare const defaultTldrawOptions: {
|
|
|
866
861
|
readonly collaboratorIdleTimeoutMs: 3000;
|
|
867
862
|
readonly collaboratorInactiveTimeoutMs: 60000;
|
|
868
863
|
readonly createTextOnCanvasDoubleClick: true;
|
|
869
|
-
readonly debouncedZoom: true;
|
|
870
|
-
readonly debouncedZoomThreshold: 500;
|
|
871
864
|
readonly defaultSvgPadding: 32;
|
|
872
865
|
readonly doubleClickDurationMs: 450;
|
|
873
866
|
readonly dragDistanceSquared: 16;
|
|
@@ -876,7 +869,9 @@ export declare const defaultTldrawOptions: {
|
|
|
876
869
|
readonly edgeScrollEaseDuration: 200;
|
|
877
870
|
readonly edgeScrollSpeed: 25;
|
|
878
871
|
readonly enableToolbarKeyboardShortcuts: true;
|
|
879
|
-
readonly exportProvider: ExoticComponent<
|
|
872
|
+
readonly exportProvider: ExoticComponent< {
|
|
873
|
+
children?: ReactNode | undefined;
|
|
874
|
+
}>;
|
|
880
875
|
readonly flattenImageBoundsExpand: 64;
|
|
881
876
|
readonly flattenImageBoundsPadding: 16;
|
|
882
877
|
readonly followChaseViewportSnap: 2;
|
|
@@ -908,14 +903,11 @@ export declare const defaultTldrawOptions: {
|
|
|
908
903
|
readonly maxShapesPerPage: 4000;
|
|
909
904
|
readonly multiClickDurationMs: 200;
|
|
910
905
|
readonly nonce: undefined;
|
|
911
|
-
readonly snapThreshold: 8;
|
|
912
|
-
readonly spacebarPanning: true;
|
|
913
906
|
readonly temporaryAssetPreviewLifetimeMs: 180000;
|
|
914
907
|
readonly textShadowLod: 0.35;
|
|
915
908
|
readonly tooltipDelayMs: 700;
|
|
916
909
|
readonly uiCoarseDragDistanceSquared: 625;
|
|
917
910
|
readonly uiDragDistanceSquared: 16;
|
|
918
|
-
readonly zoomToFitPadding: 128;
|
|
919
911
|
};
|
|
920
912
|
|
|
921
913
|
/** @public */
|
|
@@ -989,7 +981,6 @@ export declare class EdgeScrollManager {
|
|
|
989
981
|
constructor(editor: Editor);
|
|
990
982
|
private _isEdgeScrolling;
|
|
991
983
|
private _edgeScrollDuration;
|
|
992
|
-
getIsEdgeScrolling(): boolean;
|
|
993
984
|
/**
|
|
994
985
|
* Update the camera position when the mouse is close to the edge of the screen.
|
|
995
986
|
* Run this on every tick when in a state where edge scrolling is enabled.
|
|
@@ -1048,7 +1039,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1048
1039
|
*/
|
|
1049
1040
|
removeTool(Tool: TLStateNodeConstructor, parent?: StateNode): void;
|
|
1050
1041
|
/**
|
|
1051
|
-
* A set of functions to call when the
|
|
1042
|
+
* A set of functions to call when the app is disposed.
|
|
1052
1043
|
*
|
|
1053
1044
|
* @public
|
|
1054
1045
|
*/
|
|
@@ -1061,13 +1052,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1061
1052
|
isDisposed: boolean;
|
|
1062
1053
|
/* Excluded from this release type: _tickManager */
|
|
1063
1054
|
/**
|
|
1064
|
-
* A manager for the
|
|
1065
|
-
*
|
|
1066
|
-
* @public
|
|
1067
|
-
*/
|
|
1068
|
-
readonly inputs: InputsManager;
|
|
1069
|
-
/**
|
|
1070
|
-
* A manager for the editor's snapping feature.
|
|
1055
|
+
* A manager for the app's snapping feature.
|
|
1071
1056
|
*
|
|
1072
1057
|
* @public
|
|
1073
1058
|
*/
|
|
@@ -1144,7 +1129,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1144
1129
|
* @public
|
|
1145
1130
|
*/
|
|
1146
1131
|
shapeUtils: {
|
|
1147
|
-
readonly [K in string]?: ShapeUtil<
|
|
1132
|
+
readonly [K in string]?: ShapeUtil<TLUnknownShape>;
|
|
1148
1133
|
};
|
|
1149
1134
|
styleProps: {
|
|
1150
1135
|
[key: string]: Map<StyleProp<any>, string>;
|
|
@@ -1164,18 +1149,16 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1164
1149
|
*
|
|
1165
1150
|
* @public
|
|
1166
1151
|
*/
|
|
1167
|
-
getShapeUtil<
|
|
1168
|
-
|
|
1169
|
-
}>>;
|
|
1170
|
-
getShapeUtil<S extends TLShape>(shape: S | S['type'] | TLShapePartial<S>): ShapeUtil<S>;
|
|
1152
|
+
getShapeUtil<S extends TLUnknownShape>(shape: S | TLShapePartial<S>): ShapeUtil<S>;
|
|
1153
|
+
getShapeUtil<S extends TLUnknownShape>(type: S['type']): ShapeUtil<S>;
|
|
1171
1154
|
getShapeUtil<T extends ShapeUtil>(type: T extends ShapeUtil<infer R> ? R['type'] : string): T;
|
|
1172
1155
|
/**
|
|
1173
1156
|
* Returns true if the editor has a shape util for the given shape / shape type.
|
|
1174
1157
|
*
|
|
1175
1158
|
* @param shape - A shape, shape partial, or shape type.
|
|
1176
1159
|
*/
|
|
1177
|
-
hasShapeUtil(shape:
|
|
1178
|
-
hasShapeUtil(type:
|
|
1160
|
+
hasShapeUtil<S extends TLUnknownShape>(shape: S | TLShapePartial<S>): boolean;
|
|
1161
|
+
hasShapeUtil<S extends TLUnknownShape>(type: S['type']): boolean;
|
|
1179
1162
|
hasShapeUtil<T extends ShapeUtil>(type: T extends ShapeUtil<infer R> ? R['type'] : string): boolean;
|
|
1180
1163
|
/**
|
|
1181
1164
|
* A map of shape utility classes (TLShapeUtils) by shape type.
|
|
@@ -1183,7 +1166,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1183
1166
|
* @public
|
|
1184
1167
|
*/
|
|
1185
1168
|
bindingUtils: {
|
|
1186
|
-
readonly [K in string]?: BindingUtil<
|
|
1169
|
+
readonly [K in string]?: BindingUtil<TLUnknownBinding>;
|
|
1187
1170
|
};
|
|
1188
1171
|
/**
|
|
1189
1172
|
* Get a binding util from a binding itself.
|
|
@@ -1200,15 +1183,13 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1200
1183
|
*
|
|
1201
1184
|
* @public
|
|
1202
1185
|
*/
|
|
1203
|
-
getBindingUtil<
|
|
1204
|
-
type: K;
|
|
1205
|
-
}>>;
|
|
1206
|
-
getBindingUtil<S extends TLBinding>(binding: {
|
|
1186
|
+
getBindingUtil<S extends TLUnknownBinding>(binding: {
|
|
1207
1187
|
type: S['type'];
|
|
1208
1188
|
} | S): BindingUtil<S>;
|
|
1189
|
+
getBindingUtil<S extends TLUnknownBinding>(type: S['type']): BindingUtil<S>;
|
|
1209
1190
|
getBindingUtil<T extends BindingUtil>(type: T extends BindingUtil<infer R> ? R['type'] : string): T;
|
|
1210
1191
|
/**
|
|
1211
|
-
* A manager for the
|
|
1192
|
+
* A manager for the app's history.
|
|
1212
1193
|
*
|
|
1213
1194
|
* @readonly
|
|
1214
1195
|
*/
|
|
@@ -1225,11 +1206,10 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1225
1206
|
*/
|
|
1226
1207
|
undo(): this;
|
|
1227
1208
|
/**
|
|
1228
|
-
* Whether the
|
|
1209
|
+
* Whether the app can undo.
|
|
1229
1210
|
*
|
|
1230
1211
|
* @public
|
|
1231
1212
|
*/
|
|
1232
|
-
canUndo(): boolean;
|
|
1233
1213
|
getCanUndo(): boolean;
|
|
1234
1214
|
/**
|
|
1235
1215
|
* Redo to the next mark.
|
|
@@ -1242,14 +1222,13 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1242
1222
|
* @public
|
|
1243
1223
|
*/
|
|
1244
1224
|
redo(): this;
|
|
1225
|
+
clearHistory(): this;
|
|
1245
1226
|
/**
|
|
1246
|
-
* Whether the
|
|
1227
|
+
* Whether the app can redo.
|
|
1247
1228
|
*
|
|
1248
1229
|
* @public
|
|
1249
1230
|
*/
|
|
1250
|
-
canRedo(): boolean;
|
|
1251
1231
|
getCanRedo(): boolean;
|
|
1252
|
-
clearHistory(): this;
|
|
1253
1232
|
/**
|
|
1254
1233
|
* Create a new "mark", or stopping point, in the undo redo history. Creating a mark will clear
|
|
1255
1234
|
* any redos. You typically want to do this just before a user interaction begins or is handled.
|
|
@@ -1608,7 +1587,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1608
1587
|
*/
|
|
1609
1588
|
selectNone(): this;
|
|
1610
1589
|
/**
|
|
1611
|
-
* The id of the
|
|
1590
|
+
* The id of the app's only selected shape.
|
|
1612
1591
|
*
|
|
1613
1592
|
* @returns Null if there is no shape or more than one selected shape, otherwise the selected shape's id.
|
|
1614
1593
|
*
|
|
@@ -1617,7 +1596,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1617
1596
|
*/
|
|
1618
1597
|
getOnlySelectedShapeId(): null | TLShapeId;
|
|
1619
1598
|
/**
|
|
1620
|
-
* The
|
|
1599
|
+
* The app's only selected shape.
|
|
1621
1600
|
*
|
|
1622
1601
|
* @returns Null if there is no shape or more than one selected shape, otherwise the selected shape.
|
|
1623
1602
|
*
|
|
@@ -1709,16 +1688,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1709
1688
|
* @public
|
|
1710
1689
|
*/
|
|
1711
1690
|
getEditingShape(): TLShape | undefined;
|
|
1712
|
-
/**
|
|
1713
|
-
* Whether the shape can be edited.
|
|
1714
|
-
*
|
|
1715
|
-
* @param shape - The shape (or shape id) to check if it can be edited.
|
|
1716
|
-
* @param info - The info about the edit start.
|
|
1717
|
-
*
|
|
1718
|
-
* @public
|
|
1719
|
-
* @returns true if the shape can be edited, false otherwise.
|
|
1720
|
-
*/
|
|
1721
|
-
canEditShape<T extends TLShape | TLShapeId>(shape: null | T, info?: TLEditStartInfo): shape is T;
|
|
1722
1691
|
/**
|
|
1723
1692
|
* Set the current editing shape.
|
|
1724
1693
|
*
|
|
@@ -1838,15 +1807,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1838
1807
|
* @public
|
|
1839
1808
|
*/
|
|
1840
1809
|
getCroppingShapeId(): null | TLShapeId;
|
|
1841
|
-
/**
|
|
1842
|
-
* Whether the shape can be cropped.
|
|
1843
|
-
*
|
|
1844
|
-
* @param shape - The shape (or shape id) to check if it can be cropped.
|
|
1845
|
-
*
|
|
1846
|
-
* @public
|
|
1847
|
-
* @returns true if the shape can be cropped, false otherwise.
|
|
1848
|
-
*/
|
|
1849
|
-
canCropShape<T extends TLShape | TLShapeId>(shape: null | T): shape is T;
|
|
1850
1810
|
/**
|
|
1851
1811
|
* Set the current cropping shape.
|
|
1852
1812
|
*
|
|
@@ -1889,32 +1849,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1889
1849
|
* @public
|
|
1890
1850
|
*/
|
|
1891
1851
|
getZoomLevel(): number;
|
|
1892
|
-
private _debouncedZoomLevel;
|
|
1893
|
-
/**
|
|
1894
|
-
* Get the debounced zoom level. When the camera is moving, this returns the zoom level
|
|
1895
|
-
* from when the camera started moving rather than the current zoom level. This can be
|
|
1896
|
-
* used to avoid expensive re-renders during camera movements.
|
|
1897
|
-
*
|
|
1898
|
-
* This behavior is controlled by the `useDebouncedZoom` option. When `useDebouncedZoom`
|
|
1899
|
-
* is `false`, this method always returns the current zoom level.
|
|
1900
|
-
*
|
|
1901
|
-
* @public
|
|
1902
|
-
*/
|
|
1903
|
-
getDebouncedZoomLevel(): number;
|
|
1904
|
-
private _getAboveDebouncedZoomThreshold;
|
|
1905
|
-
/**
|
|
1906
|
-
* Get the efficient zoom level. This returns the current zoom level if there are less than 300 shapes on the page,
|
|
1907
|
-
* otherwise it returns the debounced zoom level. This can be used to avoid expensive re-renders during camera movements.
|
|
1908
|
-
*
|
|
1909
|
-
* @public
|
|
1910
|
-
* @example
|
|
1911
|
-
* ```ts
|
|
1912
|
-
* editor.getEfficientZoomLevel()
|
|
1913
|
-
* ```
|
|
1914
|
-
*
|
|
1915
|
-
* @public
|
|
1916
|
-
*/
|
|
1917
|
-
getEfficientZoomLevel(): number;
|
|
1918
1852
|
/**
|
|
1919
1853
|
* Get the camera's initial or reset zoom level.
|
|
1920
1854
|
*
|
|
@@ -2029,7 +1963,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2029
1963
|
* ```ts
|
|
2030
1964
|
* editor.zoomIn()
|
|
2031
1965
|
* editor.zoomIn(editor.getViewportScreenCenter(), { animation: { duration: 200 } })
|
|
2032
|
-
* editor.zoomIn(editor.inputs.
|
|
1966
|
+
* editor.zoomIn(editor.inputs.currentScreenPoint, { animation: { duration: 200 } })
|
|
2033
1967
|
* ```
|
|
2034
1968
|
*
|
|
2035
1969
|
* @param point - The screen point to zoom in on. Defaults to the screen center
|
|
@@ -2045,7 +1979,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2045
1979
|
* ```ts
|
|
2046
1980
|
* editor.zoomOut()
|
|
2047
1981
|
* editor.zoomOut(editor.getViewportScreenCenter(), { animation: { duration: 120 } })
|
|
2048
|
-
* editor.zoomOut(editor.inputs.
|
|
1982
|
+
* editor.zoomOut(editor.inputs.currentScreenPoint, { animation: { duration: 120 } })
|
|
2049
1983
|
* ```
|
|
2050
1984
|
*
|
|
2051
1985
|
* @param point - The point to zoom out on. Defaults to the viewport screen center.
|
|
@@ -2258,8 +2192,8 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2258
2192
|
/* Excluded from this release type: getUnorderedRenderingShapes */
|
|
2259
2193
|
private _cameraState;
|
|
2260
2194
|
private _cameraStateTimeoutRemaining;
|
|
2261
|
-
|
|
2262
|
-
|
|
2195
|
+
_decayCameraStateTimeout(elapsed: number): void;
|
|
2196
|
+
_tickCameraState(): void;
|
|
2263
2197
|
/**
|
|
2264
2198
|
* Whether the camera is moving or idle.
|
|
2265
2199
|
*
|
|
@@ -2831,7 +2765,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2831
2765
|
*
|
|
2832
2766
|
* @example
|
|
2833
2767
|
* ```ts
|
|
2834
|
-
* const isArrowShape = isShapeOfType(someShape, 'arrow')
|
|
2768
|
+
* const isArrowShape = isShapeOfType<TLArrowShape>(someShape, 'arrow')
|
|
2835
2769
|
* ```
|
|
2836
2770
|
*
|
|
2837
2771
|
* @param util - the TLShapeUtil constructor to test against
|
|
@@ -2839,13 +2773,8 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2839
2773
|
*
|
|
2840
2774
|
* @public
|
|
2841
2775
|
*/
|
|
2842
|
-
isShapeOfType<
|
|
2843
|
-
|
|
2844
|
-
}>;
|
|
2845
|
-
isShapeOfType<T extends TLShape>(shape: TLShape, type: T['type']): shape is Extract<TLShape, {
|
|
2846
|
-
type: T['type'];
|
|
2847
|
-
}>;
|
|
2848
|
-
isShapeOfType<T extends TLShape = TLShape>(shapeId: TLShapeId, type: T['type']): boolean;
|
|
2776
|
+
isShapeOfType<T extends TLUnknownShape>(shape: TLUnknownShape, type: T['type']): shape is T;
|
|
2777
|
+
isShapeOfType<T extends TLUnknownShape>(shapeId: TLUnknownShape['id'], type: T['type']): shapeId is T['id'];
|
|
2849
2778
|
/**
|
|
2850
2779
|
* Get a shape by its id.
|
|
2851
2780
|
*
|
|
@@ -2996,26 +2925,17 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2996
2925
|
* Get all bindings of a certain type _from_ a particular shape. These are the bindings whose
|
|
2997
2926
|
* `fromId` matched the shape's ID.
|
|
2998
2927
|
*/
|
|
2999
|
-
getBindingsFromShape<
|
|
3000
|
-
type: K;
|
|
3001
|
-
}>[];
|
|
3002
|
-
getBindingsFromShape<Binding extends TLBinding = TLBinding>(shape: TLShape | TLShapeId, type: Binding['type']): Binding[];
|
|
2928
|
+
getBindingsFromShape<Binding extends TLUnknownBinding = TLBinding>(shape: TLShape | TLShapeId, type: Binding['type']): Binding[];
|
|
3003
2929
|
/**
|
|
3004
2930
|
* Get all bindings of a certain type _to_ a particular shape. These are the bindings whose
|
|
3005
2931
|
* `toId` matches the shape's ID.
|
|
3006
2932
|
*/
|
|
3007
|
-
getBindingsToShape<
|
|
3008
|
-
type: K;
|
|
3009
|
-
}>[];
|
|
3010
|
-
getBindingsToShape<Binding extends TLBinding = TLBinding>(shape: TLShape | TLShapeId, type: Binding['type']): Binding[];
|
|
2933
|
+
getBindingsToShape<Binding extends TLUnknownBinding = TLBinding>(shape: TLShape | TLShapeId, type: Binding['type']): Binding[];
|
|
3011
2934
|
/**
|
|
3012
2935
|
* Get all bindings involving a particular shape. This includes bindings where the shape is the
|
|
3013
2936
|
* `fromId` or `toId`. If a type is provided, only bindings of that type are returned.
|
|
3014
2937
|
*/
|
|
3015
|
-
getBindingsInvolvingShape<
|
|
3016
|
-
type: K;
|
|
3017
|
-
}>[];
|
|
3018
|
-
getBindingsInvolvingShape<Binding extends TLBinding = TLBinding>(shape: TLShape | TLShapeId, type?: Binding['type']): Binding[];
|
|
2938
|
+
getBindingsInvolvingShape<Binding extends TLUnknownBinding = TLBinding>(shape: TLShape | TLShapeId, type?: Binding['type']): Binding[];
|
|
3019
2939
|
/**
|
|
3020
2940
|
* Create bindings from a list of partial bindings. You can omit the ID and most props of a
|
|
3021
2941
|
* binding, but the `type`, `toId`, and `fromId` must all be provided.
|
|
@@ -3330,7 +3250,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3330
3250
|
*
|
|
3331
3251
|
* @public
|
|
3332
3252
|
*/
|
|
3333
|
-
canCreateShape(shape: OptionalKeys<TLShapePartial<
|
|
3253
|
+
canCreateShape<T extends TLUnknownShape>(shape: OptionalKeys<TLShapePartial<T>, 'id'> | T['id']): boolean;
|
|
3334
3254
|
/**
|
|
3335
3255
|
* Get whether the provided shapes can be created.
|
|
3336
3256
|
*
|
|
@@ -3338,7 +3258,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3338
3258
|
*
|
|
3339
3259
|
* @public
|
|
3340
3260
|
*/
|
|
3341
|
-
canCreateShapes(shapes: (OptionalKeys<TLShapePartial<
|
|
3261
|
+
canCreateShapes<T extends TLUnknownShape>(shapes: (OptionalKeys<TLShapePartial<T>, 'id'> | T['id'])[]): boolean;
|
|
3342
3262
|
/**
|
|
3343
3263
|
* Create a single shape.
|
|
3344
3264
|
*
|
|
@@ -3352,7 +3272,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3352
3272
|
*
|
|
3353
3273
|
* @public
|
|
3354
3274
|
*/
|
|
3355
|
-
createShape<
|
|
3275
|
+
createShape<T extends TLUnknownShape>(shape: OptionalKeys<TLShapePartial<T>, 'id'>): this;
|
|
3356
3276
|
/**
|
|
3357
3277
|
* Create shapes.
|
|
3358
3278
|
*
|
|
@@ -3366,7 +3286,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3366
3286
|
*
|
|
3367
3287
|
* @public
|
|
3368
3288
|
*/
|
|
3369
|
-
createShapes<
|
|
3289
|
+
createShapes<T extends TLUnknownShape>(shapes: OptionalKeys<TLShapePartial<T>, 'id'>[]): this;
|
|
3370
3290
|
private animatingShapes;
|
|
3371
3291
|
/**
|
|
3372
3292
|
* Animate a shape.
|
|
@@ -3452,7 +3372,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3452
3372
|
*
|
|
3453
3373
|
* @public
|
|
3454
3374
|
*/
|
|
3455
|
-
updateShape<T extends
|
|
3375
|
+
updateShape<T extends TLUnknownShape>(partial: null | TLShapePartial<T> | undefined): this;
|
|
3456
3376
|
/**
|
|
3457
3377
|
* Update shapes using partials of each shape.
|
|
3458
3378
|
*
|
|
@@ -3465,7 +3385,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3465
3385
|
*
|
|
3466
3386
|
* @public
|
|
3467
3387
|
*/
|
|
3468
|
-
updateShapes<T extends
|
|
3388
|
+
updateShapes<T extends TLUnknownShape>(partials: (null | TLShapePartial<T> | undefined)[]): this;
|
|
3469
3389
|
/* Excluded from this release type: _updateShapes */
|
|
3470
3390
|
/* Excluded from this release type: _getUnlockedShapeIds */
|
|
3471
3391
|
/**
|
|
@@ -3780,6 +3700,59 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
3780
3700
|
url: string;
|
|
3781
3701
|
width: number;
|
|
3782
3702
|
}>;
|
|
3703
|
+
/**
|
|
3704
|
+
* The app's current input state.
|
|
3705
|
+
*
|
|
3706
|
+
* @public
|
|
3707
|
+
*/
|
|
3708
|
+
inputs: {
|
|
3709
|
+
/** A set containing the currently pressed buttons. */
|
|
3710
|
+
buttons: Set<number>;
|
|
3711
|
+
/** A set containing the currently pressed keys. */
|
|
3712
|
+
keys: Set<string>;
|
|
3713
|
+
/** The most recent pointer down's position in screen space. */
|
|
3714
|
+
originScreenPoint: Vec;
|
|
3715
|
+
/** The most recent pointer down's position in the current page space. */
|
|
3716
|
+
originPagePoint: Vec;
|
|
3717
|
+
/** The most recent pointer position in screen space. */
|
|
3718
|
+
currentScreenPoint: Vec;
|
|
3719
|
+
/** The most recent pointer position in the current page space. */
|
|
3720
|
+
currentPagePoint: Vec;
|
|
3721
|
+
/** The previous pointer position in screen space. */
|
|
3722
|
+
previousScreenPoint: Vec;
|
|
3723
|
+
/** The previous pointer position in the current page space. */
|
|
3724
|
+
previousPagePoint: Vec;
|
|
3725
|
+
/** Velocity of mouse pointer, in pixels per millisecond */
|
|
3726
|
+
pointerVelocity: Vec;
|
|
3727
|
+
/** Whether the alt or option key is currently pressed. */
|
|
3728
|
+
altKey: boolean;
|
|
3729
|
+
/** Whether the control or command key is currently pressed. */
|
|
3730
|
+
ctrlKey: boolean;
|
|
3731
|
+
/** Whether the input is from a pe. */
|
|
3732
|
+
isPen: boolean;
|
|
3733
|
+
/** Whether the meta key is currently pressed. */
|
|
3734
|
+
metaKey: boolean;
|
|
3735
|
+
/** Whether the shift key is currently pressed. */
|
|
3736
|
+
shiftKey: boolean;
|
|
3737
|
+
/** Whether the user is dragging. */
|
|
3738
|
+
isDragging: boolean;
|
|
3739
|
+
/** Whether the user is editing. */
|
|
3740
|
+
isEditing: boolean;
|
|
3741
|
+
/** Whether the user is panning. */
|
|
3742
|
+
isPanning: boolean;
|
|
3743
|
+
/** Whether the user is pinching. */
|
|
3744
|
+
isPinching: boolean;
|
|
3745
|
+
/** Whether the user is pointing. */
|
|
3746
|
+
isPointing: boolean;
|
|
3747
|
+
/** Whether the user is spacebar panning. */
|
|
3748
|
+
isSpacebarPanning: boolean;
|
|
3749
|
+
};
|
|
3750
|
+
/**
|
|
3751
|
+
* Update the input points from a pointer, pinch, or wheel event.
|
|
3752
|
+
*
|
|
3753
|
+
* @param info - The event info.
|
|
3754
|
+
*/
|
|
3755
|
+
private _updateInputsFromEvent;
|
|
3783
3756
|
/**
|
|
3784
3757
|
* Dispatch a cancel event.
|
|
3785
3758
|
*
|
|
@@ -4025,6 +3998,7 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
4025
3998
|
/* Excluded from this release type: _metaKeyTimeout */
|
|
4026
3999
|
/* Excluded from this release type: _setMetaKeyTimeout */
|
|
4027
4000
|
/* Excluded from this release type: _restoreToolId */
|
|
4001
|
+
/* Excluded from this release type: _pinchStart */
|
|
4028
4002
|
/* Excluded from this release type: _didPinch */
|
|
4029
4003
|
/* Excluded from this release type: _selectedShapeIdsAtPointerDown */
|
|
4030
4004
|
/* Excluded from this release type: _longPressTimeout */
|
|
@@ -4099,7 +4073,7 @@ export declare class EditorAtom<T> {
|
|
|
4099
4073
|
export declare const EditorContext: React_3.Context<Editor | null>;
|
|
4100
4074
|
|
|
4101
4075
|
/** @public @react */
|
|
4102
|
-
export declare function EditorProvider({ editor, children }: EditorProviderProps):
|
|
4076
|
+
export declare function EditorProvider({ editor, children }: EditorProviderProps): JSX_2.Element;
|
|
4103
4077
|
|
|
4104
4078
|
/** @public */
|
|
4105
4079
|
export declare interface EditorProviderProps {
|
|
@@ -4130,7 +4104,7 @@ export declare class Ellipse2d extends Geometry2d {
|
|
|
4130
4104
|
}
|
|
4131
4105
|
|
|
4132
4106
|
/** @public */
|
|
4133
|
-
export declare class ErrorBoundary extends React_2.Component<React_2.PropsWithChildren<TLErrorBoundaryProps
|
|
4107
|
+
export declare class ErrorBoundary extends React_2.Component<React_2.PropsWithRef<React_2.PropsWithChildren<TLErrorBoundaryProps>>, {
|
|
4134
4108
|
error: Error | null;
|
|
4135
4109
|
}> {
|
|
4136
4110
|
static getDerivedStateFromError(error: Error): {
|
|
@@ -4140,11 +4114,11 @@ export declare class ErrorBoundary extends React_2.Component<React_2.PropsWithCh
|
|
|
4140
4114
|
error: null;
|
|
4141
4115
|
};
|
|
4142
4116
|
componentDidCatch(error: unknown): void;
|
|
4143
|
-
render():
|
|
4117
|
+
render(): boolean | JSX_2.Element | Iterable<React_2.ReactNode> | null | number | string | undefined;
|
|
4144
4118
|
}
|
|
4145
4119
|
|
|
4146
4120
|
/** @public @react */
|
|
4147
|
-
export declare function ErrorScreen({ children }: LoadingScreenProps):
|
|
4121
|
+
export declare function ErrorScreen({ children }: LoadingScreenProps): JSX_2.Element;
|
|
4148
4122
|
|
|
4149
4123
|
/** @public */
|
|
4150
4124
|
export declare const EVENT_NAME_MAP: Record<Exclude<TLEventName, TLPinchEventName>, keyof TLEventHandlers>;
|
|
@@ -4444,8 +4418,8 @@ export declare class GroupShapeUtil extends ShapeUtil<TLGroupShape> {
|
|
|
4444
4418
|
canResizeChildren(): boolean;
|
|
4445
4419
|
getDefaultProps(): TLGroupShape['props'];
|
|
4446
4420
|
getGeometry(shape: TLGroupShape): Geometry2d;
|
|
4447
|
-
component(shape: TLGroupShape):
|
|
4448
|
-
indicator(shape: TLGroupShape):
|
|
4421
|
+
component(shape: TLGroupShape): JSX_2.Element | null;
|
|
4422
|
+
indicator(shape: TLGroupShape): JSX_2.Element;
|
|
4449
4423
|
onChildrenChange(group: TLGroupShape): void;
|
|
4450
4424
|
}
|
|
4451
4425
|
|
|
@@ -4549,7 +4523,7 @@ export declare class HistoryManager<R extends UnknownRecord> {
|
|
|
4549
4523
|
}
|
|
4550
4524
|
|
|
4551
4525
|
/** @public @react */
|
|
4552
|
-
export declare function HTMLContainer({ children, className, ...rest }: HTMLContainerProps):
|
|
4526
|
+
export declare function HTMLContainer({ children, className, ...rest }: HTMLContainerProps): JSX_2.Element;
|
|
4553
4527
|
|
|
4554
4528
|
/** @public */
|
|
4555
4529
|
export declare type HTMLContainerProps = React_2.HTMLAttributes<HTMLDivElement>;
|
|
@@ -4557,248 +4531,6 @@ export declare type HTMLContainerProps = React_2.HTMLAttributes<HTMLDivElement>;
|
|
|
4557
4531
|
/** @public */
|
|
4558
4532
|
export declare const inlineBase64AssetStore: TLAssetStore;
|
|
4559
4533
|
|
|
4560
|
-
/** @public */
|
|
4561
|
-
export declare class InputsManager {
|
|
4562
|
-
private readonly editor;
|
|
4563
|
-
constructor(editor: Editor);
|
|
4564
|
-
private _originPagePoint;
|
|
4565
|
-
/**
|
|
4566
|
-
* The most recent pointer down's position in the current page space.
|
|
4567
|
-
*/
|
|
4568
|
-
getOriginPagePoint(): Vec;
|
|
4569
|
-
/**
|
|
4570
|
-
* @deprecated Use `getOriginPagePoint()` instead.
|
|
4571
|
-
*/
|
|
4572
|
-
get originPagePoint(): Vec;
|
|
4573
|
-
private _originScreenPoint;
|
|
4574
|
-
/**
|
|
4575
|
-
* The most recent pointer down's position in screen space.
|
|
4576
|
-
*/
|
|
4577
|
-
getOriginScreenPoint(): Vec;
|
|
4578
|
-
/**
|
|
4579
|
-
* @deprecated Use `getOriginScreenPoint()` instead.
|
|
4580
|
-
*/
|
|
4581
|
-
get originScreenPoint(): Vec;
|
|
4582
|
-
private _previousPagePoint;
|
|
4583
|
-
/**
|
|
4584
|
-
* The previous pointer position in the current page space.
|
|
4585
|
-
*/
|
|
4586
|
-
getPreviousPagePoint(): Vec;
|
|
4587
|
-
/**
|
|
4588
|
-
* @deprecated Use `getPreviousPagePoint()` instead.
|
|
4589
|
-
*/
|
|
4590
|
-
get previousPagePoint(): Vec;
|
|
4591
|
-
private _previousScreenPoint;
|
|
4592
|
-
/**
|
|
4593
|
-
* The previous pointer position in screen space.
|
|
4594
|
-
*/
|
|
4595
|
-
getPreviousScreenPoint(): Vec;
|
|
4596
|
-
/**
|
|
4597
|
-
* @deprecated Use `getPreviousScreenPoint()` instead.
|
|
4598
|
-
*/
|
|
4599
|
-
get previousScreenPoint(): Vec;
|
|
4600
|
-
private _currentPagePoint;
|
|
4601
|
-
/**
|
|
4602
|
-
* The most recent pointer position in the current page space.
|
|
4603
|
-
*/
|
|
4604
|
-
getCurrentPagePoint(): Vec;
|
|
4605
|
-
/**
|
|
4606
|
-
* @deprecated Use `getCurrentPagePoint()` instead.
|
|
4607
|
-
*/
|
|
4608
|
-
get currentPagePoint(): Vec;
|
|
4609
|
-
private _currentScreenPoint;
|
|
4610
|
-
/**
|
|
4611
|
-
* The most recent pointer position in screen space.
|
|
4612
|
-
*/
|
|
4613
|
-
getCurrentScreenPoint(): Vec;
|
|
4614
|
-
/**
|
|
4615
|
-
* @deprecated Use `getCurrentScreenPoint()` instead.
|
|
4616
|
-
*/
|
|
4617
|
-
get currentScreenPoint(): Vec;
|
|
4618
|
-
private _pointerVelocity;
|
|
4619
|
-
/**
|
|
4620
|
-
* Velocity of mouse pointer, in pixels per millisecond.
|
|
4621
|
-
*/
|
|
4622
|
-
getPointerVelocity(): Vec;
|
|
4623
|
-
/**
|
|
4624
|
-
* @deprecated Use `getPointerVelocity()` instead.
|
|
4625
|
-
*/
|
|
4626
|
-
get pointerVelocity(): Vec;
|
|
4627
|
-
/* Excluded from this release type: setPointerVelocity */
|
|
4628
|
-
/**
|
|
4629
|
-
* A set containing the currently pressed keys.
|
|
4630
|
-
*/
|
|
4631
|
-
readonly keys: AtomSet<string>;
|
|
4632
|
-
/**
|
|
4633
|
-
* A set containing the currently pressed buttons.
|
|
4634
|
-
*/
|
|
4635
|
-
readonly buttons: AtomSet<number>;
|
|
4636
|
-
private _isPen;
|
|
4637
|
-
/**
|
|
4638
|
-
* Whether the input is from a pen.
|
|
4639
|
-
*/
|
|
4640
|
-
getIsPen(): boolean;
|
|
4641
|
-
/**
|
|
4642
|
-
* @deprecated Use `getIsPen()` instead.
|
|
4643
|
-
*/
|
|
4644
|
-
get isPen(): boolean;
|
|
4645
|
-
set isPen(isPen: boolean);
|
|
4646
|
-
/**
|
|
4647
|
-
* @param isPen - Whether the input is from a pen.
|
|
4648
|
-
*/
|
|
4649
|
-
setIsPen(isPen: boolean): void;
|
|
4650
|
-
private _shiftKey;
|
|
4651
|
-
/**
|
|
4652
|
-
* Whether the shift key is currently pressed.
|
|
4653
|
-
*/
|
|
4654
|
-
getShiftKey(): boolean;
|
|
4655
|
-
/**
|
|
4656
|
-
* @deprecated Use `getShiftKey()` instead.
|
|
4657
|
-
*/
|
|
4658
|
-
get shiftKey(): boolean;
|
|
4659
|
-
set shiftKey(shiftKey: boolean);
|
|
4660
|
-
/* Excluded from this release type: setShiftKey */
|
|
4661
|
-
private _metaKey;
|
|
4662
|
-
/**
|
|
4663
|
-
* Whether the meta key is currently pressed.
|
|
4664
|
-
*/
|
|
4665
|
-
getMetaKey(): boolean;
|
|
4666
|
-
/**
|
|
4667
|
-
* @deprecated Use `getMetaKey()` instead.
|
|
4668
|
-
*/
|
|
4669
|
-
get metaKey(): boolean;
|
|
4670
|
-
set metaKey(metaKey: boolean);
|
|
4671
|
-
/* Excluded from this release type: setMetaKey */
|
|
4672
|
-
private _ctrlKey;
|
|
4673
|
-
/**
|
|
4674
|
-
* Whether the ctrl or command key is currently pressed.
|
|
4675
|
-
*/
|
|
4676
|
-
getCtrlKey(): boolean;
|
|
4677
|
-
/**
|
|
4678
|
-
* @deprecated Use `getCtrlKey()` instead.
|
|
4679
|
-
*/
|
|
4680
|
-
get ctrlKey(): boolean;
|
|
4681
|
-
set ctrlKey(ctrlKey: boolean);
|
|
4682
|
-
/* Excluded from this release type: setCtrlKey */
|
|
4683
|
-
private _altKey;
|
|
4684
|
-
/**
|
|
4685
|
-
* Whether the alt or option key is currently pressed.
|
|
4686
|
-
*/
|
|
4687
|
-
getAltKey(): boolean;
|
|
4688
|
-
/**
|
|
4689
|
-
* @deprecated Use `getAltKey()` instead.
|
|
4690
|
-
*/
|
|
4691
|
-
get altKey(): boolean;
|
|
4692
|
-
set altKey(altKey: boolean);
|
|
4693
|
-
/* Excluded from this release type: setAltKey */
|
|
4694
|
-
/**
|
|
4695
|
-
* Is the accelerator key (cmd on mac, ctrl elsewhere) currently pressed.
|
|
4696
|
-
*/
|
|
4697
|
-
getAccelKey(): boolean;
|
|
4698
|
-
/**
|
|
4699
|
-
* @deprecated Use `getAccelKey()` instead.
|
|
4700
|
-
*/
|
|
4701
|
-
get accelKey(): boolean;
|
|
4702
|
-
private _isDragging;
|
|
4703
|
-
/**
|
|
4704
|
-
* Whether the user is dragging.
|
|
4705
|
-
*/
|
|
4706
|
-
getIsDragging(): boolean;
|
|
4707
|
-
/**
|
|
4708
|
-
* Soon to be deprecated, use `getIsDragging()` instead.
|
|
4709
|
-
*/
|
|
4710
|
-
get isDragging(): boolean;
|
|
4711
|
-
set isDragging(isDragging: boolean);
|
|
4712
|
-
/**
|
|
4713
|
-
* @param isDragging - Whether the user is dragging.
|
|
4714
|
-
*/
|
|
4715
|
-
setIsDragging(isDragging: boolean): void;
|
|
4716
|
-
private _isPointing;
|
|
4717
|
-
/**
|
|
4718
|
-
* Whether the user is pointing.
|
|
4719
|
-
*/
|
|
4720
|
-
getIsPointing(): boolean;
|
|
4721
|
-
/**
|
|
4722
|
-
* @deprecated Use `getIsPointing()` instead.
|
|
4723
|
-
*/
|
|
4724
|
-
get isPointing(): boolean;
|
|
4725
|
-
set isPointing(isPointing: boolean);
|
|
4726
|
-
/* Excluded from this release type: setIsPointing */
|
|
4727
|
-
private _isPinching;
|
|
4728
|
-
/**
|
|
4729
|
-
* Whether the user is pinching.
|
|
4730
|
-
*/
|
|
4731
|
-
getIsPinching(): boolean;
|
|
4732
|
-
/**
|
|
4733
|
-
* @deprecated Use `getIsPinching()` instead.
|
|
4734
|
-
*/
|
|
4735
|
-
get isPinching(): boolean;
|
|
4736
|
-
set isPinching(isPinching: boolean);
|
|
4737
|
-
/* Excluded from this release type: setIsPinching */
|
|
4738
|
-
private _isEditing;
|
|
4739
|
-
/**
|
|
4740
|
-
* Whether the user is editing.
|
|
4741
|
-
*/
|
|
4742
|
-
getIsEditing(): boolean;
|
|
4743
|
-
/**
|
|
4744
|
-
* @deprecated Use `getIsEditing()` instead.
|
|
4745
|
-
*/
|
|
4746
|
-
get isEditing(): boolean;
|
|
4747
|
-
set isEditing(isEditing: boolean);
|
|
4748
|
-
/**
|
|
4749
|
-
* @param isEditing - Whether the user is editing.
|
|
4750
|
-
*/
|
|
4751
|
-
setIsEditing(isEditing: boolean): void;
|
|
4752
|
-
private _isPanning;
|
|
4753
|
-
/**
|
|
4754
|
-
* Whether the user is panning.
|
|
4755
|
-
*/
|
|
4756
|
-
getIsPanning(): boolean;
|
|
4757
|
-
/**
|
|
4758
|
-
* @deprecated Use `getIsPanning()` instead.
|
|
4759
|
-
*/
|
|
4760
|
-
get isPanning(): boolean;
|
|
4761
|
-
set isPanning(isPanning: boolean);
|
|
4762
|
-
/* Excluded from this release type: setIsPanning */
|
|
4763
|
-
private _isSpacebarPanning;
|
|
4764
|
-
/**
|
|
4765
|
-
* Whether the user is spacebar panning.
|
|
4766
|
-
*/
|
|
4767
|
-
getIsSpacebarPanning(): boolean;
|
|
4768
|
-
/**
|
|
4769
|
-
* @deprecated Use `getIsSpacebarPanning()` instead.
|
|
4770
|
-
*/
|
|
4771
|
-
get isSpacebarPanning(): boolean;
|
|
4772
|
-
set isSpacebarPanning(isSpacebarPanning: boolean);
|
|
4773
|
-
/* Excluded from this release type: setIsSpacebarPanning */
|
|
4774
|
-
private _getHasCollaborators;
|
|
4775
|
-
/* Excluded from this release type: _velocityPrevPoint */
|
|
4776
|
-
/* Excluded from this release type: updatePointerVelocity */
|
|
4777
|
-
/* Excluded from this release type: updateFromEvent */
|
|
4778
|
-
toJson(): {
|
|
4779
|
-
altKey: boolean;
|
|
4780
|
-
buttons: number[];
|
|
4781
|
-
ctrlKey: boolean;
|
|
4782
|
-
currentPagePoint: VecModel;
|
|
4783
|
-
currentScreenPoint: VecModel;
|
|
4784
|
-
isDragging: boolean;
|
|
4785
|
-
isEditing: boolean;
|
|
4786
|
-
isPanning: boolean;
|
|
4787
|
-
isPen: boolean;
|
|
4788
|
-
isPinching: boolean;
|
|
4789
|
-
isPointing: boolean;
|
|
4790
|
-
isSpacebarPanning: boolean;
|
|
4791
|
-
keys: string[];
|
|
4792
|
-
metaKey: boolean;
|
|
4793
|
-
originPagePoint: VecModel;
|
|
4794
|
-
originScreenPoint: VecModel;
|
|
4795
|
-
pointerVelocity: VecModel;
|
|
4796
|
-
previousPagePoint: VecModel;
|
|
4797
|
-
previousScreenPoint: VecModel;
|
|
4798
|
-
shiftKey: boolean;
|
|
4799
|
-
};
|
|
4800
|
-
}
|
|
4801
|
-
|
|
4802
4534
|
/**
|
|
4803
4535
|
* Find the intersections between a circle and a circle.
|
|
4804
4536
|
*
|
|
@@ -4928,7 +4660,7 @@ export declare function kickoutOccludedShapes(editor: Editor, shapeIds: TLShapeI
|
|
|
4928
4660
|
export declare function linesIntersect(A: VecLike, B: VecLike, C: VecLike, D: VecLike): boolean;
|
|
4929
4661
|
|
|
4930
4662
|
/** @public @react */
|
|
4931
|
-
export declare function LoadingScreen({ children }: LoadingScreenProps):
|
|
4663
|
+
export declare function LoadingScreen({ children }: LoadingScreenProps): JSX_2.Element;
|
|
4932
4664
|
|
|
4933
4665
|
/** @public */
|
|
4934
4666
|
export declare interface LoadingScreenProps {
|
|
@@ -5046,7 +4778,7 @@ export declare function maybeSnapToGrid(point: Vec, editor: Editor): Vec;
|
|
|
5046
4778
|
*
|
|
5047
4779
|
* @public @react
|
|
5048
4780
|
*/
|
|
5049
|
-
export declare function MenuClickCapture(): false |
|
|
4781
|
+
export declare function MenuClickCapture(): false | JSX_2.Element;
|
|
5050
4782
|
|
|
5051
4783
|
/* Excluded from this release type: normalizeWheel */
|
|
5052
4784
|
|
|
@@ -5384,7 +5116,7 @@ export declare function setRuntimeOverrides(input: Partial<typeof runtime>): voi
|
|
|
5384
5116
|
export declare function setUserPreferences(user: TLUserPreferences): void;
|
|
5385
5117
|
|
|
5386
5118
|
/** @public */
|
|
5387
|
-
export declare abstract class ShapeUtil<Shape extends
|
|
5119
|
+
export declare abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknownShape> {
|
|
5388
5120
|
editor: Editor;
|
|
5389
5121
|
/** Configure this shape utils {@link ShapeUtil.options | `options`}. */
|
|
5390
5122
|
static configure<T extends TLShapeUtilConstructor<any, any>>(this: T, options: T extends new (...args: any[]) => {
|
|
@@ -5479,20 +5211,20 @@ export declare abstract class ShapeUtil<Shape extends TLShape = TLShape> {
|
|
|
5479
5211
|
* @param shape - The shape.
|
|
5480
5212
|
* @public
|
|
5481
5213
|
*/
|
|
5482
|
-
canSnap(
|
|
5214
|
+
canSnap(_shape: Shape): boolean;
|
|
5483
5215
|
/**
|
|
5484
5216
|
* Whether the shape can be tabbed to.
|
|
5485
5217
|
*
|
|
5486
5218
|
* @param shape - The shape.
|
|
5487
5219
|
* @public
|
|
5488
5220
|
*/
|
|
5489
|
-
canTabTo(
|
|
5221
|
+
canTabTo(_shape: Shape): boolean;
|
|
5490
5222
|
/**
|
|
5491
5223
|
* Whether the shape can be scrolled while editing.
|
|
5492
5224
|
*
|
|
5493
5225
|
* @public
|
|
5494
5226
|
*/
|
|
5495
|
-
canScroll(
|
|
5227
|
+
canScroll(_shape: Shape): boolean;
|
|
5496
5228
|
/**
|
|
5497
5229
|
* Whether the shape can be bound to. See {@link TLShapeUtilCanBindOpts} for details.
|
|
5498
5230
|
*
|
|
@@ -5504,37 +5236,31 @@ export declare abstract class ShapeUtil<Shape extends TLShape = TLShape> {
|
|
|
5504
5236
|
*
|
|
5505
5237
|
* @public
|
|
5506
5238
|
*/
|
|
5507
|
-
canEdit(
|
|
5239
|
+
canEdit(_shape: Shape): boolean;
|
|
5508
5240
|
/**
|
|
5509
5241
|
* Whether the shape can be resized.
|
|
5510
5242
|
*
|
|
5511
5243
|
* @public
|
|
5512
5244
|
*/
|
|
5513
|
-
canResize(
|
|
5245
|
+
canResize(_shape: Shape): boolean;
|
|
5514
5246
|
/**
|
|
5515
5247
|
* When the shape is resized, whether the shape's children should also be resized.
|
|
5516
5248
|
*
|
|
5517
5249
|
* @public
|
|
5518
5250
|
*/
|
|
5519
|
-
canResizeChildren(
|
|
5251
|
+
canResizeChildren(_shape: Shape): boolean;
|
|
5520
5252
|
/**
|
|
5521
5253
|
* Whether the shape can be edited in read-only mode.
|
|
5522
5254
|
*
|
|
5523
5255
|
* @public
|
|
5524
5256
|
*/
|
|
5525
|
-
canEditInReadonly(
|
|
5526
|
-
/**
|
|
5527
|
-
* Whether the shape can be edited while locked or while an ancestor is locked.
|
|
5528
|
-
*
|
|
5529
|
-
* @public
|
|
5530
|
-
*/
|
|
5531
|
-
canEditWhileLocked(shape: Shape): boolean;
|
|
5257
|
+
canEditInReadonly(_shape: Shape): boolean;
|
|
5532
5258
|
/**
|
|
5533
5259
|
* Whether the shape can be cropped.
|
|
5534
5260
|
*
|
|
5535
5261
|
* @public
|
|
5536
5262
|
*/
|
|
5537
|
-
canCrop(
|
|
5263
|
+
canCrop(_shape: Shape): boolean;
|
|
5538
5264
|
/**
|
|
5539
5265
|
* Whether the shape can participate in layout functions such as alignment or distribution.
|
|
5540
5266
|
*
|
|
@@ -5544,7 +5270,7 @@ export declare abstract class ShapeUtil<Shape extends TLShape = TLShape> {
|
|
|
5544
5270
|
*
|
|
5545
5271
|
* @public
|
|
5546
5272
|
*/
|
|
5547
|
-
canBeLaidOut(
|
|
5273
|
+
canBeLaidOut(_shape: Shape, _info: TLShapeUtilCanBeLaidOutOpts): boolean;
|
|
5548
5274
|
/**
|
|
5549
5275
|
* Whether this shape can be culled. By default, shapes are culled for
|
|
5550
5276
|
* performance reasons when they are outside of the viewport. Culled shapes are still rendered
|
|
@@ -5552,31 +5278,11 @@ export declare abstract class ShapeUtil<Shape extends TLShape = TLShape> {
|
|
|
5552
5278
|
*
|
|
5553
5279
|
* @param shape - The shape.
|
|
5554
5280
|
*/
|
|
5555
|
-
canCull(
|
|
5281
|
+
canCull(_shape: Shape): boolean;
|
|
5556
5282
|
/* Excluded from this release type: providesBackgroundForChildren */
|
|
5557
5283
|
/**
|
|
5558
5284
|
* Get the clip path to apply to this shape's children.
|
|
5559
5285
|
*
|
|
5560
|
-
* The returned points should define the **inner** clip boundary - the area where
|
|
5561
|
-
* children will be visible. If your shape has a stroke, you should inset the clip
|
|
5562
|
-
* path by half the stroke width so children are clipped to the inner edge of the
|
|
5563
|
-
* stroke rather than its center line.
|
|
5564
|
-
*
|
|
5565
|
-
* @example
|
|
5566
|
-
* ```ts
|
|
5567
|
-
* override getClipPath(shape: MyShape): Vec[] | undefined {
|
|
5568
|
-
* const strokeWidth = 2
|
|
5569
|
-
* const inset = strokeWidth / 2
|
|
5570
|
-
* // Return points inset by half the stroke width
|
|
5571
|
-
* return [
|
|
5572
|
-
* new Vec(inset, inset),
|
|
5573
|
-
* new Vec(shape.props.w - inset, inset),
|
|
5574
|
-
* new Vec(shape.props.w - inset, shape.props.h - inset),
|
|
5575
|
-
* new Vec(inset, shape.props.h - inset),
|
|
5576
|
-
* ]
|
|
5577
|
-
* }
|
|
5578
|
-
* ```
|
|
5579
|
-
*
|
|
5580
5286
|
* @param shape - The shape to get the clip path for
|
|
5581
5287
|
* @returns Array of points defining the clipping polygon in local coordinates, or undefined if no clipping
|
|
5582
5288
|
* @public
|
|
@@ -5601,37 +5307,37 @@ export declare abstract class ShapeUtil<Shape extends TLShape = TLShape> {
|
|
|
5601
5307
|
* @returns boolean indicating if this shape should hide in the minimap
|
|
5602
5308
|
* @public
|
|
5603
5309
|
*/
|
|
5604
|
-
hideInMinimap?(
|
|
5310
|
+
hideInMinimap?(_shape: Shape): boolean;
|
|
5605
5311
|
/**
|
|
5606
5312
|
* Whether the shape should hide its resize handles when selected.
|
|
5607
5313
|
*
|
|
5608
5314
|
* @public
|
|
5609
5315
|
*/
|
|
5610
|
-
hideResizeHandles(
|
|
5316
|
+
hideResizeHandles(_shape: Shape): boolean;
|
|
5611
5317
|
/**
|
|
5612
5318
|
* Whether the shape should hide its rotation handles when selected.
|
|
5613
5319
|
*
|
|
5614
5320
|
* @public
|
|
5615
5321
|
*/
|
|
5616
|
-
hideRotateHandle(
|
|
5322
|
+
hideRotateHandle(_shape: Shape): boolean;
|
|
5617
5323
|
/**
|
|
5618
5324
|
* Whether the shape should hide its selection bounds background when selected.
|
|
5619
5325
|
*
|
|
5620
5326
|
* @public
|
|
5621
5327
|
*/
|
|
5622
|
-
hideSelectionBoundsBg(
|
|
5328
|
+
hideSelectionBoundsBg(_shape: Shape): boolean;
|
|
5623
5329
|
/**
|
|
5624
5330
|
* Whether the shape should hide its selection bounds foreground when selected.
|
|
5625
5331
|
*
|
|
5626
5332
|
* @public
|
|
5627
5333
|
*/
|
|
5628
|
-
hideSelectionBoundsFg(
|
|
5334
|
+
hideSelectionBoundsFg(_shape: Shape): boolean;
|
|
5629
5335
|
/**
|
|
5630
5336
|
* Whether the shape's aspect ratio is locked.
|
|
5631
5337
|
*
|
|
5632
5338
|
* @public
|
|
5633
5339
|
*/
|
|
5634
|
-
isAspectRatioLocked(
|
|
5340
|
+
isAspectRatioLocked(_shape: Shape): boolean;
|
|
5635
5341
|
/**
|
|
5636
5342
|
* By default, the bounds of an image export are the bounds of all the shapes it contains, plus
|
|
5637
5343
|
* some padding. If an export includes a shape where `isExportBoundsContainer` is true, then the
|
|
@@ -5639,10 +5345,10 @@ export declare abstract class ShapeUtil<Shape extends TLShape = TLShape> {
|
|
|
5639
5345
|
* useful in cases like annotating on top of an image, where you usually want to avoid extra
|
|
5640
5346
|
* padding around the image if you don't need it.
|
|
5641
5347
|
*
|
|
5642
|
-
* @param
|
|
5348
|
+
* @param _shape - The shape to check
|
|
5643
5349
|
* @returns True if this shape should be treated as an export bounds container
|
|
5644
5350
|
*/
|
|
5645
|
-
isExportBoundsContainer(
|
|
5351
|
+
isExportBoundsContainer(_shape: Shape): boolean;
|
|
5646
5352
|
/* Excluded from this release type: backgroundComponent */
|
|
5647
5353
|
/**
|
|
5648
5354
|
* Get the interpolated props for an animating shape. This is an optional method.
|
|
@@ -5679,7 +5385,7 @@ export declare abstract class ShapeUtil<Shape extends TLShape = TLShape> {
|
|
|
5679
5385
|
* @param type - The shape type.
|
|
5680
5386
|
* @public
|
|
5681
5387
|
*/
|
|
5682
|
-
canReceiveNewChildrenOfType(
|
|
5388
|
+
canReceiveNewChildrenOfType(_shape: Shape, _type: TLShape['type']): boolean;
|
|
5683
5389
|
/**
|
|
5684
5390
|
* Get the shape as an SVG object.
|
|
5685
5391
|
*
|
|
@@ -5712,14 +5418,14 @@ export declare abstract class ShapeUtil<Shape extends TLShape = TLShape> {
|
|
|
5712
5418
|
* Get the geometry to use when snapping to this this shape in translate/resize operations. See
|
|
5713
5419
|
* {@link BoundsSnapGeometry} for details.
|
|
5714
5420
|
*/
|
|
5715
|
-
getBoundsSnapGeometry(
|
|
5421
|
+
getBoundsSnapGeometry(_shape: Shape): BoundsSnapGeometry;
|
|
5716
5422
|
/**
|
|
5717
5423
|
* Get the geometry to use when snapping handles to this shape. See {@link HandleSnapGeometry}
|
|
5718
5424
|
* for details.
|
|
5719
5425
|
*/
|
|
5720
|
-
getHandleSnapGeometry(
|
|
5721
|
-
getText(
|
|
5722
|
-
getAriaDescriptor(
|
|
5426
|
+
getHandleSnapGeometry(_shape: Shape): HandleSnapGeometry;
|
|
5427
|
+
getText(_shape: Shape): string | undefined;
|
|
5428
|
+
getAriaDescriptor(_shape: Shape): string | undefined;
|
|
5723
5429
|
/**
|
|
5724
5430
|
* A callback called just before a shape is created. This method provides a last chance to modify
|
|
5725
5431
|
* the created shape.
|
|
@@ -6214,7 +5920,7 @@ export declare const stopEventPropagation: (e: any) => any;
|
|
|
6214
5920
|
export declare function suffixSafeId(id: SafeId, suffix: string): SafeId;
|
|
6215
5921
|
|
|
6216
5922
|
/** @public @react */
|
|
6217
|
-
export declare function SVGContainer({ children, className, ...rest }: SVGContainerProps):
|
|
5923
|
+
export declare function SVGContainer({ children, className, ...rest }: SVGContainerProps): JSX_2.Element;
|
|
6218
5924
|
|
|
6219
5925
|
/** @public */
|
|
6220
5926
|
export declare type SVGContainerProps = React_2.ComponentProps<'svg'>;
|
|
@@ -6312,8 +6018,6 @@ export declare class TextManager {
|
|
|
6312
6018
|
}[];
|
|
6313
6019
|
}
|
|
6314
6020
|
|
|
6315
|
-
/* Excluded from this release type: TickManager */
|
|
6316
|
-
|
|
6317
6021
|
/**
|
|
6318
6022
|
* This is the TipTap editor! Docs are {@link https://tiptap.dev/docs}.
|
|
6319
6023
|
*
|
|
@@ -6337,7 +6041,7 @@ export declare type TLAnyBindingUtilConstructor = TLBindingUtilConstructor<any>;
|
|
|
6337
6041
|
export declare type TLAnyShapeUtilConstructor = TLShapeUtilConstructor<any>;
|
|
6338
6042
|
|
|
6339
6043
|
/** @public */
|
|
6340
|
-
export declare type TLBaseBoxShape =
|
|
6044
|
+
export declare type TLBaseBoxShape = TLBaseShape<string, {
|
|
6341
6045
|
h: number;
|
|
6342
6046
|
w: number;
|
|
6343
6047
|
}>;
|
|
@@ -6359,7 +6063,7 @@ export declare interface TLBaseExternalContent {
|
|
|
6359
6063
|
}
|
|
6360
6064
|
|
|
6361
6065
|
/** @public */
|
|
6362
|
-
export declare interface TLBindingUtilConstructor<T extends
|
|
6066
|
+
export declare interface TLBindingUtilConstructor<T extends TLUnknownBinding, U extends BindingUtil<T> = BindingUtil<T>> {
|
|
6363
6067
|
new (editor: Editor): U;
|
|
6364
6068
|
type: T['type'];
|
|
6365
6069
|
/** Validations for this binding's props. */
|
|
@@ -6865,33 +6569,6 @@ export declare interface TldrawOptions {
|
|
|
6865
6569
|
* Branding name of the app, currently only used for adding aria-label for the application.
|
|
6866
6570
|
*/
|
|
6867
6571
|
readonly branding?: string;
|
|
6868
|
-
/**
|
|
6869
|
-
* Whether to use debounced zoom level for certain rendering optimizations. When true,
|
|
6870
|
-
* `editor.getDebouncedZoomLevel()` returns a cached zoom value while the camera is moving,
|
|
6871
|
-
* reducing re-renders. When false, it always returns the current zoom level.
|
|
6872
|
-
*/
|
|
6873
|
-
readonly debouncedZoom: boolean;
|
|
6874
|
-
/**
|
|
6875
|
-
* The number of shapes that must be on the page for the debounced zoom level to be used.
|
|
6876
|
-
* Defaults to 300 shapes.
|
|
6877
|
-
*/
|
|
6878
|
-
readonly debouncedZoomThreshold: number;
|
|
6879
|
-
/**
|
|
6880
|
-
* Whether to allow spacebar panning. When true, the spacebar will pan the camera when held down.
|
|
6881
|
-
* When false, the spacebar will not pan the camera.
|
|
6882
|
-
*/
|
|
6883
|
-
readonly spacebarPanning: boolean;
|
|
6884
|
-
/**
|
|
6885
|
-
* The default padding (in pixels) used when zooming to fit content in the viewport.
|
|
6886
|
-
* This affects methods like `zoomToFit()`, `zoomToSelection()`, and `zoomToBounds()`.
|
|
6887
|
-
* The actual padding used is the minimum of this value and 28% of the viewport width.
|
|
6888
|
-
* Defaults to 128 pixels.
|
|
6889
|
-
*/
|
|
6890
|
-
readonly zoomToFitPadding: number;
|
|
6891
|
-
/**
|
|
6892
|
-
* The distance (in screen pixels) at which shapes snap to guides and other shapes.
|
|
6893
|
-
*/
|
|
6894
|
-
readonly snapThreshold: number;
|
|
6895
6572
|
}
|
|
6896
6573
|
|
|
6897
6574
|
/** @public */
|
|
@@ -6937,7 +6614,7 @@ export declare interface TLEditorComponents {
|
|
|
6937
6614
|
/** @public */
|
|
6938
6615
|
export declare interface TLEditorOptions {
|
|
6939
6616
|
/**
|
|
6940
|
-
* The Store instance to use for keeping the
|
|
6617
|
+
* The Store instance to use for keeping the app's data. This may be prepopulated, e.g. by loading
|
|
6941
6618
|
* from a server or database.
|
|
6942
6619
|
*/
|
|
6943
6620
|
store: TLStore;
|
|
@@ -7016,11 +6693,6 @@ export declare interface TLEditorSnapshot {
|
|
|
7016
6693
|
session: TLSessionStateSnapshot;
|
|
7017
6694
|
}
|
|
7018
6695
|
|
|
7019
|
-
/** @public */
|
|
7020
|
-
export declare interface TLEditStartInfo {
|
|
7021
|
-
type: 'click-header' | 'click' | 'double-click-corner' | 'double-click-edge' | 'double-click' | 'press_enter' | 'unknown';
|
|
7022
|
-
}
|
|
7023
|
-
|
|
7024
6696
|
/** @public */
|
|
7025
6697
|
export declare interface TLEmbedExternalContent<EmbedDefinition> extends TLBaseExternalContent {
|
|
7026
6698
|
type: 'embed';
|
|
@@ -7033,8 +6705,6 @@ export declare type TLEnterEventHandler = (info: any, from: string) => void;
|
|
|
7033
6705
|
|
|
7034
6706
|
/**
|
|
7035
6707
|
* An object that contains information about the current device and environment.
|
|
7036
|
-
* This object is not reactive and will not update automatically when the environment changes,
|
|
7037
|
-
* so only include values that are fixed, such as the user's browser and operating system.
|
|
7038
6708
|
*
|
|
7039
6709
|
* @public
|
|
7040
6710
|
*/
|
|
@@ -7049,17 +6719,6 @@ export declare const tlenv: {
|
|
|
7049
6719
|
isWebview: boolean;
|
|
7050
6720
|
};
|
|
7051
6721
|
|
|
7052
|
-
/**
|
|
7053
|
-
* An atom that contains information about the current device and environment.
|
|
7054
|
-
* This object is reactive and will update automatically when the environment changes.
|
|
7055
|
-
* Use it for values that may change over time, such as the pointer type.
|
|
7056
|
-
*
|
|
7057
|
-
* @public
|
|
7058
|
-
*/
|
|
7059
|
-
export declare const tlenvReactive: Atom< {
|
|
7060
|
-
isCoarsePointer: boolean;
|
|
7061
|
-
}, unknown>;
|
|
7062
|
-
|
|
7063
6722
|
/** @public */
|
|
7064
6723
|
export declare interface TLErrorBoundaryProps {
|
|
7065
6724
|
children: React_2.ReactNode;
|
|
@@ -7123,7 +6782,6 @@ export declare interface TLEventMap {
|
|
|
7123
6782
|
event: [TLEventInfo];
|
|
7124
6783
|
tick: [number];
|
|
7125
6784
|
frame: [number];
|
|
7126
|
-
resize: [BoxModel];
|
|
7127
6785
|
'select-all-text': [{
|
|
7128
6786
|
shapeId: TLShapeId;
|
|
7129
6787
|
}];
|
|
@@ -7138,7 +6796,6 @@ export declare interface TLEventMap {
|
|
|
7138
6796
|
'edited-shapes': [TLRecord[]];
|
|
7139
6797
|
'deleted-shapes': [TLShapeId[]];
|
|
7140
6798
|
edit: [];
|
|
7141
|
-
dispose: [];
|
|
7142
6799
|
}
|
|
7143
6800
|
|
|
7144
6801
|
/** @public */
|
|
@@ -7840,11 +7497,11 @@ export declare interface TLShapeUtilCanBeLaidOutOpts {
|
|
|
7840
7497
|
*
|
|
7841
7498
|
* @public
|
|
7842
7499
|
*/
|
|
7843
|
-
export declare interface TLShapeUtilCanBindOpts<Shape extends
|
|
7500
|
+
export declare interface TLShapeUtilCanBindOpts<Shape extends TLUnknownShape = TLUnknownShape> {
|
|
7844
7501
|
/** The type of shape referenced by the `fromId` of the binding. */
|
|
7845
|
-
fromShapeType:
|
|
7502
|
+
fromShapeType: string;
|
|
7846
7503
|
/** The type of shape referenced by the `toId` of the binding. */
|
|
7847
|
-
toShapeType:
|
|
7504
|
+
toShapeType: string;
|
|
7848
7505
|
/** The type of binding. */
|
|
7849
7506
|
bindingType: string;
|
|
7850
7507
|
}
|
|
@@ -7856,7 +7513,7 @@ export declare interface TLShapeUtilCanvasSvgDef {
|
|
|
7856
7513
|
}
|
|
7857
7514
|
|
|
7858
7515
|
/** @public */
|
|
7859
|
-
export declare interface TLShapeUtilConstructor<T extends
|
|
7516
|
+
export declare interface TLShapeUtilConstructor<T extends TLUnknownShape, U extends ShapeUtil<T> = ShapeUtil<T>> {
|
|
7860
7517
|
new (editor: Editor): U;
|
|
7861
7518
|
type: T['type'];
|
|
7862
7519
|
props?: RecordProps<T>;
|
|
@@ -8236,10 +7893,10 @@ export declare function useMaybeEditor(): Editor | null;
|
|
|
8236
7893
|
/* Excluded from this release type: useOnMount */
|
|
8237
7894
|
|
|
8238
7895
|
/** @public */
|
|
8239
|
-
export declare function usePassThroughMouseOverEvents(ref: RefObject<HTMLElement
|
|
7896
|
+
export declare function usePassThroughMouseOverEvents(ref: RefObject<HTMLElement>): void;
|
|
8240
7897
|
|
|
8241
7898
|
/** @public */
|
|
8242
|
-
export declare function usePassThroughWheelEvents(ref: RefObject<HTMLElement
|
|
7899
|
+
export declare function usePassThroughWheelEvents(ref: RefObject<HTMLElement>): void;
|
|
8243
7900
|
|
|
8244
7901
|
/**
|
|
8245
7902
|
* @returns The list of peer UserIDs
|
|
@@ -8347,7 +8004,7 @@ export declare function useTLSchemaFromUtils(opts: TLStoreSchemaOptions): StoreS
|
|
|
8347
8004
|
export declare function useTLStore(opts: TLStoreOptions): TLStore;
|
|
8348
8005
|
|
|
8349
8006
|
/** @public */
|
|
8350
|
-
export declare function useTransform(ref: React.RefObject<HTMLElement |
|
|
8007
|
+
export declare function useTransform(ref: React.RefObject<HTMLElement | SVGElement>, x?: number, y?: number, scale?: number, rotate?: number, additionalOffset?: VecLike): void;
|
|
8351
8008
|
|
|
8352
8009
|
/**
|
|
8353
8010
|
* React's useId hook returns a unique id for the component. However, it uses a colon in the id,
|