import { TLBounds, TLTransformInfo, TLPageState } from '@tldraw/core'; import { TDSnapshot, ShapesWithProp, TDShape, TDBinding, TDPage, TldrawCommand, ArrowShape, ConnectorShape } from '../types'; import type { TDShapeUtil } from './shapes/TDShapeUtil'; export declare class TLDR { static getShapeUtil(type: T['type']): TDShapeUtil; static getShapeUtil(shape: T): TDShapeUtil; static getSelectedShapes(data: TDSnapshot, pageId: string): TDShape[]; static screenToWorld(data: TDSnapshot, point: number[]): number[]; static getCameraZoom(zoom: number): number; static getPage(data: TDSnapshot, pageId: string): TDPage; static getPageState(data: TDSnapshot, pageId: string): TLPageState; static getSelectedIds(data: TDSnapshot, pageId: string): string[]; static getShapes(data: TDSnapshot, pageId: string): TDShape[]; static getCamera(data: TDSnapshot, pageId: string): TLPageState['camera']; static getShape(data: TDSnapshot, shapeId: string, pageId: string): T; static getCenter(shape: T): number[]; static getBounds(shape: T): import("sn-wb-tldraw-core").TLBounds; static getRotatedBounds(shape: T): import("sn-wb-tldraw-core").TLBounds; static getSelectedBounds(data: TDSnapshot): TLBounds; static getParentId(data: TDSnapshot, id: string, pageId: string): string; static getDocumentBranch(data: TDSnapshot, id: string, pageId: string): string[]; static getSelectedBranchSnapshot(data: TDSnapshot, pageId: string, fn: (shape: TDShape) => K): ({ id: string; } & K)[]; static getSelectedBranchSnapshot(data: TDSnapshot, pageId: string): TDShape[]; static getSelectedShapeSnapshot(data: TDSnapshot, pageId: string): TDShape[]; static getSelectedShapeSnapshot(data: TDSnapshot, pageId: string, fn?: (shape: TDShape) => K): ({ id: string; } & K)[]; static getAllEffectedShapeIds(data: TDSnapshot, ids: string[], pageId: string): string[]; static getLinkedShapeIds(data: TDSnapshot, pageId: string, direction: 'center' | 'left' | 'right', includeArrows?: boolean): string[]; static getChildIndexAbove(data: TDSnapshot, id: string, pageId: string): number; static getBeforeShape(shape: T, change: Partial): Partial; static mutateShapes(data: TDSnapshot, ids: string[], fn: (shape: T, i: number) => Partial | void, pageId: string): { before: Record>; after: Record>; data: TDSnapshot; }; static createShapes(data: TDSnapshot, shapes: TDShape[], pageId: string): TldrawCommand; static deleteShapes(data: TDSnapshot, shapes: TDShape[] | string[], pageId?: string): TldrawCommand; static onSessionComplete(shape: T): T; static onChildrenChange(data: TDSnapshot, shape: T, pageId: string): T | undefined; static connectConnectorToShape(page: TDPage, connectorShape: ConnectorShape): void; static updateArrowBindings(page: TDPage, arrowShape: ArrowShape): void | Partial | undefined; static transform(shape: T, bounds: TLBounds, info: TLTransformInfo): T; static transformSingle(shape: T, bounds: TLBounds, info: TLTransformInfo): T; /** * Rotate a shape around an origin point. * @param shape a shape. * @param center the shape's center in page space. * @param origin the page point to rotate around. * @param rotation the amount to rotate the shape. */ static getRotatedShapeMutation(shape: T, // in page space center: number[], // in page space origin: number[], // in page space (probably the center of common bounds) delta: number): Partial | void; static updateParents(data: TDSnapshot, pageId: string, changedShapeIds: string[]): void; static getBinding(data: TDSnapshot, id: string, pageId: string): TDBinding; static getBindings(data: TDSnapshot, pageId: string): TDBinding[]; static getBindableShapeIds(data: TDSnapshot): string[]; static getBindingsWithShapeIds(data: TDSnapshot, ids: string[], pageId: string): TDBinding[]; static getRelatedBindings(data: TDSnapshot, ids: string[], pageId: string): TDBinding[]; static copyStringToClipboard: (string: string) => void; static flattenShape: (data: TDSnapshot, shape: TDShape) => TDShape[]; static flattenPage: (data: TDSnapshot, pageId: string) => TDShape[]; static getTopChildIndex: (data: TDSnapshot, pageId: string) => number; static fixNewLines: RegExp; static normalizeText(text: string): string; static assertShapeHasProperty

(shape: TDShape, prop: P): asserts shape is ShapesWithProp

; static warn(e: any): void; static error(e: any): void; } //# sourceMappingURL=TLDR.d.ts.map