vue-pincher
Version:
Vue 3 image cropper component
51 lines (50 loc) • 1.76 kB
TypeScript
import type { Region } from "./crop";
type __VLS_Props = {
image: ImageBitmap;
readonly?: boolean;
showGrid?: boolean;
trimTo?: Region;
attention?: Region[];
};
/**
* Resets image view to default state.
* @param lazy If true, the reset will be requested but not performed immediately.
* This is useful for performance optimization when multiple manipulations are performed in a short time.
* The reset will be performed on the next resize event.
* If false, the reset will be performed immediately.
*/
declare function reset(lazy?: boolean): void;
declare function rotate(delta: number): void;
declare function rotateTo(angle: number): void;
declare function showRegion(region: Region): void;
type __VLS_ModelProps = {
modelValue?: {
angle: number;
offsetX: number;
offsetY: number;
scale: number;
};
};
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
rotate: typeof rotate;
rotateTo: typeof rotateTo;
reset: typeof reset;
showRegion: typeof showRegion;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
"update:modelValue": (value: {
angle: number;
offsetX: number;
offsetY: number;
scale: number;
}) => any;
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
"onUpdate:modelValue"?: ((value: {
angle: number;
offsetX: number;
offsetY: number;
scale: number;
}) => any) | undefined;
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
declare const _default: typeof __VLS_export;
export default _default;