/// import { ClipRect } from "./ImageCropper"; /** * Read image from input type file * @param event The for event triggered by selecting an image * @returns A promise that resolves with the image as data URI string */ export declare function readImage(event: React.FormEvent): Promise; export interface Coordinates { x: number; y: number; } export interface Movement { movementX: number; movementY: number; } /** * Gets the X and Y distance that the cursor has travelled * @param event The mouse movement event * Returns an object of x and y movements */ export declare function getMovement(event: MouseEvent | TouchEvent): Movement; /** * A move event handler * @param event The mouse move event * @param setPos The position setter function * @param imgRef The image element */ export declare function moveHandler(event: MouseEvent | TouchEvent, img: HTMLImageElement, setPos: React.Dispatch>): void; export declare type Position = "top-left" | "top-right" | "bottom-left" | "bottom-right"; export declare function resizeHandler(event: MouseEvent | TouchEvent, position: Position, img: HTMLImageElement, setPos: React.Dispatch>): void; export declare function addListener(event: React.MouseEvent | React.TouchEvent, callback: (...args: any[]) => void): void; /** * @param url The source image * @param x The x coordinates of the crop box * @param y The y coordinates of the crop box * @param width The width of the crop box * @param height The height of the crop box * @param imgContainer The image HTML element containing the original image * @return {Promise} A Promise that resolves with the resulting image as a canvas element */ export declare function crop(url: string, x: number, y: number, width: number, height: number, imgContainer: HTMLImageElement): Promise;