@qwanyx/stack 0.2.70 → 0.2.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ImageEditor.d.ts +22 -0
- package/dist/index.cjs.js +47 -47
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +5056 -4832
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ImageEditor Component
|
|
3
|
+
* Simple image editor with crop and rotation
|
|
4
|
+
* Receives an image URL, returns edited image as Blob
|
|
5
|
+
*/
|
|
6
|
+
export interface ImageEditorProps {
|
|
7
|
+
/** Image source URL */
|
|
8
|
+
src: string;
|
|
9
|
+
/** Called when save is clicked with the edited image blob */
|
|
10
|
+
onSave: (blob: Blob) => void;
|
|
11
|
+
/** Called when cancel is clicked */
|
|
12
|
+
onCancel?: () => void;
|
|
13
|
+
/** Initial aspect ratio */
|
|
14
|
+
aspectRatio?: '4/3' | '16/9' | '1/1' | '3/4' | '9/16' | 'free';
|
|
15
|
+
/** Output format */
|
|
16
|
+
outputFormat?: 'image/jpeg' | 'image/png' | 'image/webp';
|
|
17
|
+
/** Output quality (0-1) for jpeg/webp */
|
|
18
|
+
outputQuality?: number;
|
|
19
|
+
/** Theme */
|
|
20
|
+
theme?: 'light' | 'dark';
|
|
21
|
+
}
|
|
22
|
+
export declare function ImageEditor({ src, onSave, onCancel, aspectRatio: initialAspectRatio, outputFormat, outputQuality, theme, }: ImageEditorProps): import("react/jsx-runtime").JSX.Element;
|