import type { FileWithBlobUrl } from '../../../core/files'; import type { ImageEditorDynamicAspectRatio } from './types'; export type CropAndResizeOptions = { /** Fixed aspect ratio, or dynamic selector, or omit for free crop. */ aspectRatio?: number | ImageEditorDynamicAspectRatio; /** Crop/scale mode inside the editor canvas. @default 'cover' */ mode?: 'contain' | 'cover'; /** Fill color in `contain` mode (transparent letterbox by default). */ fillColor?: string; /** * After cropping, downscale to fit these limits. `max1` / `max2` are not tied to width / * height — the longer side matches the larger limit. Pass `false` to disable resize. * @default `{ max1: 1600, max2: 1000 }` */ resize?: { max1: number; max2: number; } | false; }; /** * Opens the kit's image editor dialog, lets the user crop, and (optionally) downscales the * result before returning. Composable opt-in helper — call it explicitly from a consumer's * select handler when image cropping is needed before upload. * * Returns `null` when the user cancels the dialog. * * @example * ```ts * const cropped = await cropAndResizeImage(file, { * aspectRatio: 1, * resize: { max1: 400, max2: 400 } * }); * if (cropped) store.add(cropped); * ``` */ export declare const cropAndResizeImage: (file: File, options?: CropAndResizeOptions) => Promise;