UNPKG

react-advanced-cropper

Version:

The react cropper library that gives the possibility to create croppers exactly suited for your website design

63 lines (62 loc) 2.01 kB
import { ReactNode, CSSProperties, Component, RefObject } from 'react'; import { DebouncedFunction, ImageTransform, Point, SimpleTouch } from 'advanced-cropper'; interface Props { onTransform?: (transform: ImageTransform) => void; onTransformEnd?: () => void; onEvent?: (transformEvent: TransformableImageEvent, nativeEvent: Event) => unknown; disabled?: boolean; touchMove?: boolean; mouseMove?: boolean; touchScale?: boolean; touchRotate?: boolean; wheelScale?: boolean | { ratio: number; }; timeout?: number; children?: ReactNode; className?: string; style?: CSSProperties; preventDefault?: boolean; } export declare class TransformableImageEvent { constructor({ active }: { active: boolean; }); preventDefault(): void; defaultPrevented: boolean; active: boolean; } export declare class TransformableImage extends Component<Props> { touches: (SimpleTouch & { identifier?: number; })[]; transforming: boolean; anchor: Point; container: RefObject<HTMLDivElement>; debouncedProcessEnd: DebouncedFunction<TransformableImage['processEnd']>; static defaultProps: { touchMove: boolean; mouseMove: boolean; touchScale: boolean; touchRotate: boolean; wheelScale: boolean; timeout: number; }; constructor(props: Props); processMove: (newTouches: SimpleTouch[]) => void; processEnd: () => void; processStart: () => void; processEvent: (nativeEvent: Event) => boolean; onWheel: (event: WheelEvent) => void; onTouchStart: (event: TouchEvent) => void; onTouchEnd: (event: TouchEvent) => void; onTouchMove: (event: TouchEvent) => void; onMouseDown: (event: MouseEvent) => void; onMouseMove: (event: MouseEvent) => void; onMouseUp: () => void; shouldComponentUpdate(): boolean; componentWillUnmount(): void; componentDidMount(): void; render(): JSX.Element; } export {};