import type { TLPage, TLUser, TLPageState, TLBinding, TLBoundsCorner, TLBoundsEdge, TLShape, TLHandle, TLSnapLine, TLPinchEventHandler, TLKeyboardEventHandler, TLPointerEventHandler, TLWheelEventHandler, TLCanvasEventHandler, TLBoundsEventHandler, TLBoundsHandleEventHandler, TLShapeBlurHandler, TLShapeCloneHandler, TLAsset } from 'sn-wb-tldraw-core'; export declare class TDEventHandler { onPinchStart?: TLPinchEventHandler; onPinchEnd?: TLPinchEventHandler; onPinch?: TLPinchEventHandler; onKeyDown?: TLKeyboardEventHandler; onKeyUp?: TLKeyboardEventHandler; onPointerMove?: TLPointerEventHandler; onPointerUp?: TLPointerEventHandler; onPan?: TLWheelEventHandler; onZoom?: TLWheelEventHandler; onPointerDown?: TLPointerEventHandler; onPointCanvas?: TLCanvasEventHandler; onDoubleClickCanvas?: TLCanvasEventHandler; onRightPointCanvas?: TLCanvasEventHandler; onDragCanvas?: TLCanvasEventHandler; onReleaseCanvas?: TLCanvasEventHandler; onPointShape?: TLPointerEventHandler; onDoubleClickShape?: TLPointerEventHandler; onRightPointShape?: TLPointerEventHandler; onDragShape?: TLPointerEventHandler; onHoverShape?: TLPointerEventHandler; onUnhoverShape?: TLPointerEventHandler; onReleaseShape?: TLPointerEventHandler; onPointBounds?: TLBoundsEventHandler; onDoubleClickBounds?: TLBoundsEventHandler; onRightPointBounds?: TLBoundsEventHandler; onDragBounds?: TLBoundsEventHandler; onHoverBounds?: TLBoundsEventHandler; onUnhoverBounds?: TLBoundsEventHandler; onReleaseBounds?: TLBoundsEventHandler; onPointBoundsHandle?: TLBoundsHandleEventHandler; onDoubleClickBoundsHandle?: TLBoundsHandleEventHandler; onRightPointBoundsHandle?: TLBoundsHandleEventHandler; onDragBoundsHandle?: TLBoundsHandleEventHandler; onHoverBoundsHandle?: TLBoundsHandleEventHandler; onUnhoverBoundsHandle?: TLBoundsHandleEventHandler; onReleaseBoundsHandle?: TLBoundsHandleEventHandler; onPointHandle?: TLPointerEventHandler; onDoubleClickHandle?: TLPointerEventHandler; onRightPointHandle?: TLPointerEventHandler; onDragHandle?: TLPointerEventHandler; onHoverHandle?: TLPointerEventHandler; onUnhoverHandle?: TLPointerEventHandler; onReleaseHandle?: TLPointerEventHandler; onShapeBlur?: TLShapeBlurHandler; onShapeClone?: TLShapeCloneHandler; } export interface TDSnapshot { settings: { isCadSelectMode: boolean; isDarkMode: boolean; isDebugMode: boolean; isPenMode: boolean; isReadonlyMode: boolean; isZoomSnap: boolean; nudgeDistanceSmall: number; nudgeDistanceLarge: number; isFocusMode: boolean; isSnapping: boolean; showRotateHandles: boolean; showBindingHandles: boolean; showCloneHandles: boolean; showGrid: boolean; }; appState: { currentStyle: TextShapeStyles; currentStickyStyle: ShapeStyles; currentShapeStyle: ShapeStyles; currentDrawStyle: ShapeStyles; currentHighlighterStyle: ShapeStyles; currentSectionStyle: ShapeStyles; currentPageId: string; hoveredId?: string; activeTool: TDToolType; isToolLocked: boolean; isEmptyCanvas: boolean; isMenuOpen: boolean; status: string; snapLines: TLSnapLine[]; isLoading: boolean; disableAssets: boolean; selectByContain?: boolean; selectedSticker: string; currentStickerPoint: number[]; user: any; isOpen: { [key: string]: boolean; }; defaultOpen: boolean; isTemplateLibrary: boolean; showTimer: boolean; selectedStickyText: string; currentTemplate: string; isTemplateEditMode: boolean; stashForEditing: string; currentEditingTemplate: any; isPreview: Boolean; members: any; hasMention: boolean; mentionedUsers: any; commentMessage: string; }; document: TDDocument; room?: { id: string; userId: string; users: Record; }; } export declare type TldrawPatch = Patch; export declare type TldrawCommand = Command; export interface TDFile { name: string; fileHandle: FileSystemHandle | null; document: TDDocument; assets: Record; } export interface TDDocument { id: string; name: string; version: number; pages: Record; pageStates: Record; assets: TDAssets; } export declare type TDPage = TLPage; export declare type PagePartial = { shapes: Patch; bindings: Patch; sections: Patch; }; export interface TDMeta { isDarkMode: boolean; } export interface TransformInfo { type: TLBoundsEdge | TLBoundsCorner; initialShape: T; scaleX: number; scaleY: number; transformOrigin: number[]; } export declare enum TDUserStatus { Idle = "idle", Connecting = "connecting", Connected = "connected", Disconnected = "disconnected" } export interface TDUser extends TLUser { activeShapes: TDShape[]; status: TDUserStatus; } export declare type Theme = 'dark' | 'light'; export declare enum SessionType { Transform = "transform", Translate = "translate", TransformSingle = "transformSingle", Brush = "brush", Arrow = "arrow", Draw = "draw", Erase = "erase", Rotate = "rotate", Handle = "handle", Grid = "grid", Connector = "connector" } export declare enum TDStatus { Idle = "idle", PointingHandle = "pointingHandle", PointingBounds = "pointingBounds", PointingBoundsHandle = "pointingBoundsHandle", TranslatingLabel = "translatingLabel", TranslatingHandle = "translatingHandle", Translating = "translating", Transforming = "transforming", Rotating = "rotating", Pinching = "pinching", Brushing = "brushing", Creating = "creating", EditingText = "editing-text" } export declare type TDToolType = 'select' | 'erase' | 'move' | TDShapeType.Text | TDShapeType.Draw | TDShapeType.Ellipse | TDShapeType.Rectangle | TDShapeType.Triangle | TDShapeType.Line | TDShapeType.Arrow | TDShapeType.Sticky | TDShapeType.Sticker | TDShapeType.Section | TDShapeType.Highlighter | TDShapeType.Connector | TDShapeType.Comment; export declare type Easing = 'linear' | 'easeInQuad' | 'easeOutQuad' | 'easeInOutQuad' | 'easeInCubic' | 'easeOutCubic' | 'easeInOutCubic' | 'easeInQuart' | 'easeOutQuart' | 'easeInOutQuart' | 'easeInQuint' | 'easeOutQuint' | 'easeInOutQuint' | 'easeInSine' | 'easeOutSine' | 'easeInOutSine' | 'easeInExpo' | 'easeOutExpo' | 'easeInOutExpo'; export declare enum MoveType { Backward = "backward", Forward = "forward", ToFront = "toFront", ToBack = "toBack" } export declare enum AlignType { Top = "top", CenterVertical = "centerVertical", Bottom = "bottom", Left = "left", CenterHorizontal = "centerHorizontal", Right = "right" } export declare enum StretchType { Horizontal = "horizontal", Vertical = "vertical" } export declare enum DistributeType { Horizontal = "horizontal", Vertical = "vertical" } export declare enum FlipType { Horizontal = "horizontal", Vertical = "vertical" } export declare enum TDShapeType { Sticky = "sticky", Ellipse = "ellipse", Rectangle = "rectangle", Triangle = "triangle", Draw = "draw", Arrow = "arrow", Line = "line", Text = "text", Group = "group", Image = "image", Video = "video", Sticker = "sticker", Link = "link", Embed = "embed", Section = "section", File = "file", Highlighter = "highlighter", Lesson = "lesson", Connector = "connector", Comment = "comment" } export declare enum Decoration { Arrow = "arrow" } export interface TDBaseShape extends TLShape { style: TextShapeStyles; type: TDShapeType; label?: string; handles?: Record; } export interface DrawShape extends TDBaseShape { type: TDShapeType.Draw; points: number[][]; isComplete: boolean; } export interface HighlighterShape extends TDBaseShape { type: TDShapeType.Highlighter; points: number[][]; isComplete: boolean; } export interface TDHandle extends TLHandle { canBind?: boolean; bindingId?: string; } export interface RectangleShape extends TDBaseShape { type: TDShapeType.Rectangle; size: number[]; label?: string; labelPoint?: number[]; } export interface EllipseShape extends TDBaseShape { type: TDShapeType.Ellipse; radius: number[]; label?: string; labelPoint?: number[]; } export interface TriangleShape extends TDBaseShape { type: TDShapeType.Triangle; size: number[]; label?: string; labelPoint?: number[]; } export interface ArrowShape extends TDBaseShape { type: TDShapeType.Arrow; bend: number; handles: { start: TDHandle; bend: TDHandle; end: TDHandle; }; decorations?: { start?: Decoration; end?: Decoration; middle?: Decoration; }; label?: string; labelPoint?: number[]; } export interface ConnectorShape extends TDBaseShape { type: TDShapeType.Connector; handles: { start: TDHandle; end: TDHandle; }; decorations?: { start?: Decoration; end?: Decoration; middle?: Decoration; }; label?: string; labelPoint?: number[]; } export interface ArrowBinding extends TLBinding { handleId: keyof ArrowShape['handles']; distance: number; point: number[]; } export interface ConnectorBinding extends TLBinding { handleId: keyof ConnectorShape['handles']; distance: number; point: number[]; } export declare type TDBinding = ArrowBinding; export interface ImageShape extends TDBaseShape { type: TDShapeType.Image; size: number[]; assetId: string; } export interface StickerShape extends TDBaseShape { type: TDShapeType.Sticker; size: number[]; assetId: string; svg: string; } export interface VideoShape extends TDBaseShape { type: TDShapeType.Video; size: number[]; assetId: string; isPlaying: boolean; currentTime: number; } export interface TextShape extends TDBaseShape { type: TDShapeType.Text; text: string; } export interface StickyShape extends TDBaseShape { type: TDShapeType.Sticky; size: number[]; text: string; user: string; } export interface CommentShape extends TDBaseShape { type: TDShapeType.Comment; size: number[]; user: any; comments: any[]; currentComment: string; isOpen: boolean; } export interface LinkShape extends TDBaseShape { type: TDShapeType.Link; size: number[]; url: string; title: string | undefined; imageUrl: string | undefined; description: string | undefined; } export interface FileShape extends TDBaseShape { type: TDShapeType.File; size: number[]; url: string; title: string; icon: string; avatarUrl: any[]; firstName: string; time: string; fileType: string; fileIcon: string; } export interface LessonShape extends TDBaseShape { type: TDShapeType.Lesson; size: number[]; title: string; imageUrl: string; description: string; url: string; } export interface EmbedShape extends TDBaseShape { type: TDShapeType.Embed; size: number[]; src: string; faviconSrc: string; } export interface SectionShape extends TDBaseShape { type: TDShapeType.Section; size: number[]; children: string[]; label?: string; labelPoint?: number[]; } export interface GroupShape extends TDBaseShape { type: TDShapeType.Group; size: number[]; children: string[]; } export declare type TDShape = RectangleShape | EllipseShape | TriangleShape | DrawShape | ArrowShape | TextShape | GroupShape | StickyShape | ImageShape | VideoShape | StickerShape | LinkShape | EmbedShape | SectionShape | FileShape | HighlighterShape | LessonShape | ConnectorShape | CommentShape; export declare enum ColorStyle { White = "white", Black = "black", Green = "green", Blue = "blue", Pink = "pink", Violet = "violet", Red = "red", Orange = "orange", Yellow = "yellow" } export declare enum SizeStyle { Small = "small", Medium = "medium", Large = "large" } export declare enum DashStyle { Draw = "draw", Solid = "solid", Dashed = "dashed", Dotted = "dotted" } export declare enum FontSize { Small = "small", Medium = "medium", Large = "large", ExtraLarge = "extraLarge" } export declare enum AlignStyle { Start = "start", Middle = "middle", End = "end", Justify = "justify" } export declare enum TextWeight { Normal = "normal", Bold = "bold" } export declare enum ListType { None = "none", Bullet = "bullet", Numbered = "numbered" } export declare enum FontStyle { Script = "script", Sans = "sans", Serif = "erif", Mono = "mono", Graphik = "Graphik Web" } export declare type ShapeStyles = { color: ColorStyle; size: SizeStyle; dash: DashStyle; font?: FontStyle; textAlign?: AlignStyle; isFilled?: boolean; scale?: number; }; export declare type TextShapeStyles = { color: ColorStyle; size: SizeStyle; dash: DashStyle; font?: FontStyle; textAlign?: AlignStyle; isFilled?: boolean; scale?: number; textWeight: TextWeight; listType: ListType; textDecoration: string; fontStyle: string; bounds: number[]; }; export declare enum TDAssetType { Image = "image", Video = "video" } export interface TDImageAsset extends TLAsset { type: TDAssetType.Image; src: string; size: number[]; } export interface TDVideoAsset extends TLAsset { type: TDAssetType.Video; src: string; size: number[]; } export declare type TDAsset = TDImageAsset | TDVideoAsset; export declare type TDAssets = Record; export declare enum TDExportTypes { PNG = "png", JPG = "jpeg", WEBP = "webp", PDF = "pdf", SVG = "svg", JSON = "json" } export interface TDExport { currentPageId: string; name: string; shapes: TDShape[]; assets: TDAssets; type: TDExportTypes; size: number[]; serialized?: string; } export declare type ParametersExceptFirst = F extends (arg0: any, ...rest: infer R) => any ? R : never; export declare type ExceptFirst = T extends [any, ...infer U] ? U : never; export declare type ExceptFirstTwo = T extends [any, any, ...infer U] ? U : never; export declare type PropsOfType = { [K in keyof TDShape]: TDShape[K] extends any ? (TDShape[K] extends U ? K : never) : never; }[keyof TDShape]; export declare type Difference = A extends B ? never : C; export declare type Intersection = A extends B ? C : never; export declare type FilteredKeys = { [P in keyof T]: T[P] extends U ? P : never; }[keyof T]; export declare type RequiredKeys = { [K in keyof T]-?: Difference, Pick, K>; }[keyof T]; export declare type MembersWithRequiredKey = { [P in keyof T]: Intersection, T[P]>; }[keyof T]; export declare type MappedByType = { [P in T['type']]: T extends any ? (P extends T['type'] ? T : never) : never; }; export declare type ShapesWithProp = MembersWithRequiredKey, U>; export declare type Patch = Partial<{ [P in keyof T]: Patch; }>; export interface Command { id?: string; before: Patch; after: Patch; } export interface FileWithHandle extends File { handle?: FileSystemHandle; } export interface FileWithDirectoryHandle extends File { directoryHandle?: FileSystemHandle; } export interface FileSystemHandlePermissionDescriptor { mode?: 'read' | 'readwrite'; } export interface FileSystemHandle { readonly kind: 'file' | 'directory'; readonly name: string; isSameEntry: (other: FileSystemHandle) => Promise; queryPermission: (descriptor?: FileSystemHandlePermissionDescriptor) => Promise; requestPermission: (descriptor?: FileSystemHandlePermissionDescriptor) => Promise; } //# sourceMappingURL=types.d.ts.map