diff --git a/packages/tldraw/api-report.md b/packages/tldraw/api-report.md index 0962a3756..1394ab6a9 100644 --- a/packages/tldraw/api-report.md +++ b/packages/tldraw/api-report.md @@ -9,6 +9,11 @@ import { ArrayOfValidator } from '@tldraw/editor'; import { BaseBoxShapeTool } from '@tldraw/editor'; import { BaseBoxShapeUtil } from '@tldraw/editor'; +import { BindingOnChangeOptions } from '@tldraw/editor'; +import { BindingOnCreateOptions } from '@tldraw/editor'; +import { BindingOnShapeChangeOptions } from '@tldraw/editor'; +import { BindingOnShapeIsolateOptions } from '@tldraw/editor'; +import { BindingUtil } from '@tldraw/editor'; import { Box } from '@tldraw/editor'; import { Circle2d } from '@tldraw/editor'; import { ComponentType } from 'react'; @@ -37,6 +42,7 @@ import { default as React_3 } from 'react'; import { ReactElement } from 'react'; import { ReactNode } from 'react'; import { ReadonlySharedStyleMap } from '@tldraw/editor'; +import { RecordProps } from '@tldraw/editor'; import { Rectangle2d } from '@tldraw/editor'; import { RecursivePartial } from '@tldraw/editor'; import { Result } from '@tldraw/editor'; @@ -50,6 +56,7 @@ import { T } from '@tldraw/editor'; import { TLAnyBindingUtilConstructor } from '@tldraw/editor'; import { TLAnyShapeUtilConstructor } from '@tldraw/editor'; import { TLArrowBinding } from '@tldraw/editor'; +import { TLArrowBindingProps } from '@tldraw/editor'; import { TLArrowShape } from '@tldraw/editor'; import { TLArrowShapeArrowheadStyle } from '@tldraw/editor'; import { TLAssetId } from '@tldraw/editor'; @@ -130,6 +137,28 @@ export function AlignMenuItems(): JSX_2.Element; // @public (undocumented) export function ArrangeMenuSubmenu(): JSX_2.Element | null; +// @public (undocumented) +export class ArrowBindingUtil extends BindingUtil { + // (undocumented) + getDefaultProps(): Partial; + // (undocumented) + static migrations: TLPropsMigrations; + // (undocumented) + onAfterChange({ bindingAfter }: BindingOnChangeOptions): void; + // (undocumented) + onAfterChangeFromShape({ shapeAfter, }: BindingOnShapeChangeOptions): void; + // (undocumented) + onAfterChangeToShape({ binding }: BindingOnShapeChangeOptions): void; + // (undocumented) + onAfterCreate({ binding }: BindingOnCreateOptions): void; + // (undocumented) + onBeforeIsolateFromShape({ binding, }: BindingOnShapeIsolateOptions): void; + // (undocumented) + static props: RecordProps; + // (undocumented) + static type: string; +} + // @public (undocumented) export function ArrowDownToolbarItem(): JSX_2.Element; diff --git a/packages/tldraw/src/index.ts b/packages/tldraw/src/index.ts index 519575acf..5ce07daa8 100644 --- a/packages/tldraw/src/index.ts +++ b/packages/tldraw/src/index.ts @@ -5,6 +5,7 @@ export * from '@tldraw/editor' export { getAssetFromIndexedDb, storeAssetInIndexedDb } from './lib/AssetBlobStore' export { Tldraw, type TLComponents, type TldrawProps } from './lib/Tldraw' export { TldrawImage, type TldrawImageProps } from './lib/TldrawImage' +export { ArrowBindingUtil } from './lib/bindings/arrow/ArrowBindingUtil' export { TldrawHandles } from './lib/canvas/TldrawHandles' export { TldrawScribble } from './lib/canvas/TldrawScribble' export { TldrawSelectionBackground } from './lib/canvas/TldrawSelectionBackground' diff --git a/packages/tldraw/src/lib/bindings/arrow/ArrowBindingUtil.ts b/packages/tldraw/src/lib/bindings/arrow/ArrowBindingUtil.ts index 2ccef16a6..ee457b5e9 100644 --- a/packages/tldraw/src/lib/bindings/arrow/ArrowBindingUtil.ts +++ b/packages/tldraw/src/lib/bindings/arrow/ArrowBindingUtil.ts @@ -24,6 +24,9 @@ import { } from '@tldraw/editor' import { getArrowBindings, getArrowInfo, removeArrowBinding } from '../../shapes/arrow/shared' +/** + * @public + */ export class ArrowBindingUtil extends BindingUtil { static override type = 'arrow'