infinity-forge
Version:
14 lines (13 loc) • 687 B
TypeScript
import { ImageDimensions, ResizeDirection, DisplayCropArea } from '../shared/types.js';
interface UseCropInteractionsProps {
imageDimensions: ImageDimensions;
cropArea: DisplayCropArea;
setCropArea: (area: DisplayCropArea | ((prev: DisplayCropArea) => DisplayCropArea)) => void;
aspectRatio: number | null;
imageRef: React.RefObject<HTMLImageElement>;
}
export declare function useCropInteractions({ imageDimensions, cropArea, setCropArea, aspectRatio, imageRef, }: UseCropInteractionsProps): {
handleStart: (e: React.MouseEvent | React.TouchEvent, action: "move" | "resize", direction?: ResizeDirection) => void;
getDisplayScale: () => number;
};
export {};