UNPKG

advanced-cropper

Version:

The core of the advanced cropper libraries family

42 lines (41 loc) 2.44 kB
import { Coordinates, CoreSettings, CropperState, InitializedCropperState, InitializeSettings } from "../types/index"; declare function isInitializedState(state: CropperState | null): state is InitializedCropperState; declare function getAreaSizeRestrictions(state: CropperState, settings: CoreSettings): { minWidth: number; maxWidth: number; minHeight: number; maxHeight: number; }; declare function getAreaPositionRestrictions(state: CropperState, settings: CoreSettings): import("../types/index").Limits; declare function getSizeRestrictions(state: CropperState, settings: CoreSettings): { minWidth: number; maxWidth: number; minHeight: number; maxHeight: number; }; declare function getPositionRestrictions(state: CropperState, settings: CoreSettings): import("../types/index").Limits; declare function getCoefficient(state: CropperState): number; declare function getStencilCoordinates(state: CropperState | null): { left: number; top: number; width: number; height: number; }; declare function getAspectRatio(state: CropperState, settings: CoreSettings): import("../types/index").AspectRatio; declare function getDefaultCoordinates(state: CropperState, settings: CoreSettings & InitializeSettings): Partial<Coordinates> | ((state: CropperState, settings: CoreSettings) => Partial<Coordinates> | null) | import("../types/index").CoordinatesTransform[] | null; declare function getDefaultVisibleArea(state: CropperState, settings: CoreSettings & InitializeSettings): Coordinates; declare function getDefaultTransforms(state: CropperState, settings: CoreSettings & InitializeSettings): { flip: { horizontal: boolean; vertical: boolean; }; rotate: number; }; declare function getTransformedImageSize(state: CropperState): { width: number; height: number; }; declare function getMinimumSize(state: CropperState): number; declare function getRoundedCoordinates(state: CropperState, settings: CoreSettings): Coordinates | null; declare function isConsistentState(state: CropperState, settings: CoreSettings): boolean; export { isInitializedState, getAreaSizeRestrictions, getAreaPositionRestrictions, getSizeRestrictions, getPositionRestrictions, getCoefficient, getStencilCoordinates, getAspectRatio, getDefaultCoordinates, getDefaultVisibleArea, getDefaultTransforms, getTransformedImageSize, getMinimumSize, getRoundedCoordinates, isConsistentState };