import { ViewProps } from 'react-native'; import React from 'react'; export interface ImageAdjustments { brightness?: number; contrast?: number; saturation?: number; exposure?: number; highlights?: number; shadows?: number; temperature?: number; tint?: number; sharpness?: number; noiseReduction?: number; vignette?: number; } export type FilterPreset = 'vintage' | 'dramatic' | 'mono' | 'noir' | 'fade' | 'chrome' | 'process' | 'transfer' | 'instant' | 'warm' | 'cool'; export interface FilterOptions { type: FilterPreset; intensity?: number; } export interface CropParams { x: number; y: number; width: number; height: number; } export interface ResizeParams { width: number; height: number; } export type ExportFormat = 'jpeg' | 'png' | 'heic'; export interface ExportOptions { format?: ExportFormat; quality?: number; maxDimension?: number; } export interface ExportResult { success: boolean; uri: string; size: number; } export interface ImageLoadedEvent { width: number; height: number; } export interface ImageSource { uri?: string; path?: string; } /** * LUT (Look-Up Table) options for color grading */ export interface LUTOptions { name: string; filePath: string; } export interface LUTApplyOptions { name: string; intensity?: number; } export declare const ImageEditorModule: { /** * Load an image from a file path or URI */ loadImage(path: string): Promise; /** * Apply adjustments to the current image */ applyAdjustments(adjustments: ImageAdjustments): Promise<{ success: boolean; }>; /** * Apply a preset filter */ applyFilter(filterType: FilterPreset, intensity?: number): Promise<{ success: boolean; }>; /** * Crop the image to the specified rectangle */ crop(params: CropParams): Promise; /** * Rotate the image by the specified angle (in radians) */ rotate(angle: number): Promise<{ success: boolean; }>; /** * Flip the image horizontally */ flipHorizontal(): Promise<{ success: boolean; }>; /** * Flip the image vertically */ flipVertical(): Promise<{ success: boolean; }>; /** * Resize the image to the specified dimensions */ resize(params: ResizeParams): Promise<{ success: boolean; }>; /** * Undo the last operation * @returns true if undo was successful */ undo(): boolean; /** * Redo the last undone operation * @returns true if redo was successful */ redo(): boolean; /** * Check if undo is available */ canUndo(): boolean; /** * Check if redo is available */ canRedo(): boolean; /** * Export the current image */ export(options?: ExportOptions): Promise; /** * Get list of available filter presets */ getAvailableFilters(): FilterPreset[]; /** * Load a LUT (Look-Up Table) from a .cube file for later use * @param options LUT loading options */ loadLUT(options: LUTOptions): Promise<{ success: boolean; name: string; }>; /** * Apply a previously loaded LUT to the current image * @param options LUT application options */ applyLUT(options: LUTApplyOptions): Promise<{ success: boolean; intensity: number; }>; /** * Clear all cached LUTs from memory */ clearLUTCache(): void; /** * Reset the editor and clear the current image */ reset(): void; addImageLoadedListener(listener: (event: ImageLoadedEvent) => void): any; addImageUpdatedListener(listener: () => void): any; addExportProgressListener(listener: (progress: number) => void): any; addErrorListener(listener: (event: { error: string; }) => void): any; }; export interface ImageEditorViewProps extends ViewProps { /** * Image source to load */ source?: ImageSource; /** * Adjustments to apply */ adjustments?: ImageAdjustments; /** * Filter to apply */ filter?: FilterOptions; /** * Enable drawing mode */ drawingEnabled?: boolean; /** * Drawing brush size */ drawingBrushSize?: number; /** * Drawing color (hex string) */ drawingColor?: string; /** * Called when the view is ready */ onReady?: () => void; /** * Called when an image is loaded */ onImageLoaded?: (event: { nativeEvent: ImageLoadedEvent; }) => void; /** * Called when the image changes */ onImageChanged?: (event: { nativeEvent: ImageLoadedEvent; }) => void; /** * Called when an error occurs */ onError?: (event: { nativeEvent: { error: string; }; }) => void; } /** * Native image editor view component */ export declare class ImageEditorView extends React.Component { private nativeRef; /** * Crop the image */ crop(params: CropParams): Promise; /** * Rotate the image */ rotate(angle: number): Promise; /** * Flip horizontally */ flipHorizontal(): Promise; /** * Flip vertically */ flipVertical(): Promise; /** * Undo last operation */ undo(): Promise; /** * Redo last operation */ redo(): Promise; /** * Export the current image */ export(options?: ExportOptions): Promise; render(): React.JSX.Element; } export { ImageEditorUI, ImageEditorUIPresets } from './ImageEditorUI'; export type { ImageEditorUIProps, ImageEditorUIConfig, ImageEditorUIRef } from './ImageEditorUI'; declare const _default: { ImageEditorModule: { /** * Load an image from a file path or URI */ loadImage(path: string): Promise; /** * Apply adjustments to the current image */ applyAdjustments(adjustments: ImageAdjustments): Promise<{ success: boolean; }>; /** * Apply a preset filter */ applyFilter(filterType: FilterPreset, intensity?: number): Promise<{ success: boolean; }>; /** * Crop the image to the specified rectangle */ crop(params: CropParams): Promise; /** * Rotate the image by the specified angle (in radians) */ rotate(angle: number): Promise<{ success: boolean; }>; /** * Flip the image horizontally */ flipHorizontal(): Promise<{ success: boolean; }>; /** * Flip the image vertically */ flipVertical(): Promise<{ success: boolean; }>; /** * Resize the image to the specified dimensions */ resize(params: ResizeParams): Promise<{ success: boolean; }>; /** * Undo the last operation * @returns true if undo was successful */ undo(): boolean; /** * Redo the last undone operation * @returns true if redo was successful */ redo(): boolean; /** * Check if undo is available */ canUndo(): boolean; /** * Check if redo is available */ canRedo(): boolean; /** * Export the current image */ export(options?: ExportOptions): Promise; /** * Get list of available filter presets */ getAvailableFilters(): FilterPreset[]; /** * Load a LUT (Look-Up Table) from a .cube file for later use * @param options LUT loading options */ loadLUT(options: LUTOptions): Promise<{ success: boolean; name: string; }>; /** * Apply a previously loaded LUT to the current image * @param options LUT application options */ applyLUT(options: LUTApplyOptions): Promise<{ success: boolean; intensity: number; }>; /** * Clear all cached LUTs from memory */ clearLUTCache(): void; /** * Reset the editor and clear the current image */ reset(): void; addImageLoadedListener(listener: (event: ImageLoadedEvent) => void): any; addImageUpdatedListener(listener: () => void): any; addExportProgressListener(listener: (progress: number) => void): any; addErrorListener(listener: (event: { error: string; }) => void): any; }; ImageEditorView: typeof ImageEditorView; }; export default _default;