import type { ImgCropper } from './img-cropper.svelte'; type Props = { src: string; cropper: ImgCropper; /** Show the built-in Apply/Cancel crop controls @default true */ showControls?: boolean; }; /** * Image cropper view based on CropperJS v2 web components. * * Renders a canvas with crop selection, rotation, zoom, and reset capabilities. * The container fills 100% width and height of its parent; the image is centered inside. * The component itself uses `overflow: visible` — the parent element should set * `overflow: hidden` to clip the shadow overlay at its boundaries. * * #### Modes * * The behavior is determined by the `ImgCropper` instance passed via the `cropper` prop: * * - **`cover`** — the image always fills the canvas completely. The crop selection * defines the visible area. After save, the result is the selected region at * natural image resolution. * - **`contain`** — the image is fitted inside the canvas with optional fill color * for empty space. After crop, the canvas shrinks to match the cropped area's * aspect ratio. After save, the result includes the fill color background. * * #### Aspect ratio * * Aspect ratio is configured on the `ImgCropper` instance via the `aspectRatio` option: * * - **Fixed number** (e.g. `16/9`) — locks the crop selection to this ratio. * - **Dynamic object** (`ImgCropperDynamicAspectRatio`) — provides a list of `supported` * ratios and an optional `initial` value. The toolbar renders a ratio popover when * multiple options are available. `allowFreeCrop: true` adds a free-ratio option * that lets the user draw an unconstrained selection. * - **Omitted** — defaults to free crop (no ratio constraint on the selection). * * #### Shadow overlay * * When `showImageShadow` is enabled on the cropper instance, a dark semi-transparent * `box-shadow` is applied directly to the `` element, extending beyond * the canvas bounds so the surrounding area is dimmed. The parent element should set * `overflow: hidden` to clip the shadow at its boundaries. * * ### CSS Custom Properties * None — canvas background, shadow, and sizing are controlled by the `ImgCropper` instance. */ declare const Cmp: import("svelte").Component; type Cmp = ReturnType; export default Cmp;