import { type ReactiveController, type ReactiveControllerHost } from 'lit'; import { type DraggingInfo } from './overlay-factory.js'; import { type EdgelessDraggableElementHost, type EdgelessDraggableElementOptions, type ElementInfo, type OverlayLayer } from './types.js'; interface ReactiveState { cancelled: boolean; draggingElement: ElementInfo | null; dragOut: boolean | null; } interface EventCache { onMouseUp?: (e: MouseEvent) => void; onMouseMove?: (e: MouseEvent) => void; onTouchMove?: (e: TouchEvent) => void; onTouchEnd?: (e: TouchEvent) => void; } export declare class EdgelessDraggableElementController implements ReactiveController { host: EdgelessDraggableElementHost & ReactiveControllerHost; options: EdgelessDraggableElementOptions; clearTimeout: ReturnType | null; events: EventCache; info: DraggingInfo; overlay: OverlayLayer | null; states: ReactiveState; constructor(host: EdgelessDraggableElementHost & ReactiveControllerHost, options: EdgelessDraggableElementOptions); get gfx(): import("@blocksuite/std/gfx").GfxController; /** * let overlay shape animate back to the original position */ private _animateCancelDrop; private _createOverlay; private _onDragEnd; private _onDragMove; private _onDragStart; /** * Update overlay shape scale according to the current zoom level */ private _updateOverlayScale; /** * @internal */ private _updateState; private _updateStates; /** * Cancel the current dragging & animate even if dragOut */ cancel(): void; /** * Same as {@link cancel} but without animation */ cancelWithoutAnimation(): void; /** * A workaround to apply click event manually */ clickToDrag(target: HTMLElement, startPos: { x: number; y: number; }): void; dragAndMoveTo(target: HTMLElement, to: { x: number; y: number; }): void; hostConnected(): void; hostDisconnected(): void; onMouseDown(e: MouseEvent, elementInfo: ElementInfo): void; onTouchStart(e: TouchEvent, elementInfo: ElementInfo): void; removeAllEvents(): void; reset(): void; updateElementInfo(elementInfo: Partial>): void; } export {}; //# sourceMappingURL=draggable-element.controller.d.ts.map