romaine
Version:
React OpenCV Manipulation and Image Narration & Editing
43 lines • 1.4 kB
TypeScript
import { RomaineState } from ".";
import { ContourCoordinates } from "../../components";
export declare type RomaineCommands = "crop" | "perspective-crop" | "rotate-right" | "rotate-left" | "full-reset" | "undo" | "redo" | "preview" | "flip-horizontal" | "flip-vertical" | "scale";
export declare type RomaineModes = null | RomaineCommands;
export interface ModeAction {
type: "MODE";
payload: RomaineModes;
}
export interface AngleAction {
type: "ANGLE";
payload: number;
}
export interface ScaleAction {
type: "SCALE";
payload: {
width: number;
height: number;
};
}
export interface ImageUpdateAction {
type: "IMAGE-UPDATE";
payload: {
width: number;
height: number;
id: string | null;
};
}
export interface HistoryAction {
type: "HISTORY";
payload: {
cmd: "PUSH" | "CLEAR" | "UNDO" | "REDO";
};
}
export interface CropPointsAction {
type: "CROP_POINTS";
payload: ContourCoordinates | undefined;
}
export declare type RomaineReducer = {
type: "JOIN_PAYLOAD" | "REMOVE_CROPPER";
payload?: any;
} | ModeAction | AngleAction | ScaleAction | HistoryAction | CropPointsAction | ImageUpdateAction;
export declare const romaineReducer: (state: RomaineState, action: RomaineReducer) => RomaineState;
//# sourceMappingURL=romaineReducer.d.ts.map