@umituz/react-native-ai-generation-content 1.20.2 → 1.20.4

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.
Files changed (31) hide show
  1. package/package.json +1 -1
  2. package/src/features/ai-hug/domain/types/ai-hug.types.ts +1 -16
  3. package/src/features/ai-hug/domain/types/index.ts +0 -6
  4. package/src/features/ai-hug/index.ts +2 -10
  5. package/src/features/ai-kiss/domain/types/ai-kiss.types.ts +1 -16
  6. package/src/features/ai-kiss/domain/types/index.ts +0 -6
  7. package/src/features/ai-kiss/index.ts +2 -10
  8. package/src/features/anime-selfie/domain/types/anime-selfie.types.ts +1 -20
  9. package/src/features/anime-selfie/domain/types/index.ts +0 -7
  10. package/src/features/anime-selfie/index.ts +2 -11
  11. package/src/features/face-swap/domain/types/face-swap.types.ts +0 -9
  12. package/src/features/face-swap/domain/types/index.ts +0 -5
  13. package/src/features/face-swap/index.ts +2 -6
  14. package/src/features/hd-touch-up/index.ts +2 -8
  15. package/src/features/hd-touch-up/presentation/hooks/index.ts +1 -5
  16. package/src/features/hd-touch-up/presentation/hooks/useHDTouchUpFeature.ts +5 -28
  17. package/src/features/image-to-image/domain/types/partials/hook.types.ts +1 -3
  18. package/src/features/image-to-image/presentation/hooks/useSingleImageFeature.ts +10 -7
  19. package/src/features/photo-restoration/index.ts +2 -10
  20. package/src/features/photo-restoration/presentation/hooks/index.ts +1 -5
  21. package/src/features/photo-restoration/presentation/hooks/usePhotoRestoreFeature.ts +5 -28
  22. package/src/features/remove-background/presentation/hooks/index.ts +1 -6
  23. package/src/features/remove-background/presentation/hooks/useRemoveBackgroundFeature.ts +4 -12
  24. package/src/features/remove-object/domain/types/index.ts +0 -6
  25. package/src/features/remove-object/domain/types/remove-object.types.ts +1 -16
  26. package/src/features/remove-object/index.ts +5 -9
  27. package/src/features/replace-background/domain/types/index.ts +0 -6
  28. package/src/features/replace-background/domain/types/replace-background.types.ts +0 -15
  29. package/src/features/replace-background/index.ts +6 -9
  30. package/src/features/upscaling/presentation/hooks/index.ts +1 -2
  31. package/src/features/upscaling/presentation/hooks/useUpscaleFeature.ts +4 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-generation-content",
3
- "version": "1.20.2",
3
+ "version": "1.20.4",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * AI Hug Feature Types
3
- * Request, Result, Config types for AI hug video generation
3
+ * Extends dual-image-video types for AI hug video generation
4
4
  */
5
5
 
6
6
  import type {
@@ -9,21 +9,6 @@ import type {
9
9
  DualImageVideoTranslations,
10
10
  } from "../../../shared/dual-image-video";
11
11
 
12
- export interface AIHugOptions {
13
- intensity?: "gentle" | "warm" | "tight";
14
- preserveFaces?: boolean;
15
- }
16
-
17
- export interface AIHugRequest {
18
- sourceImageUri: string;
19
- targetImageUri: string;
20
- sourceImageBase64?: string;
21
- targetImageBase64?: string;
22
- userId: string;
23
- prompt?: string;
24
- options?: AIHugOptions;
25
- }
26
-
27
12
  export interface AIHugResult {
28
13
  success: boolean;
29
14
  videoUrl?: string;
@@ -1,10 +1,4 @@
1
- /**
2
- * AI Hug Domain Types Index
3
- */
4
-
5
1
  export type {
6
- AIHugOptions,
7
- AIHugRequest,
8
2
  AIHugResult,
9
3
  AIHugFeatureState,
10
4
  AIHugTranslations,
@@ -1,13 +1,10 @@
1
1
  /**
2
- export * from "./presentation/components";
3
2
  * AI Hug Feature
4
3
  * Provider-agnostic AI hug video generation feature
5
4
  */
6
5
 
7
6
  // Domain Types
8
7
  export type {
9
- AIHugOptions,
10
- AIHugRequest,
11
8
  AIHugResult,
12
9
  AIHugFeatureState,
13
10
  AIHugTranslations,
@@ -16,12 +13,7 @@ export type {
16
13
  } from "./domain";
17
14
 
18
15
  // Presentation Hooks
19
- export { useAIHugFeature } from "./presentation";
20
- export type {
21
- UseAIHugFeatureProps,
22
- UseAIHugFeatureReturn,
23
- } from "./presentation";
16
+ export { useAIHugFeature, type UseAIHugFeatureProps } from "./presentation";
24
17
 
25
18
  // Presentation Components
26
- export { AIHugFeature } from "./presentation";
27
- export type { AIHugFeatureProps } from "./presentation";
19
+ export { AIHugFeature, type AIHugFeatureProps } from "./presentation";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * AI Kiss Feature Types
3
- * Request, Result, Config types for AI kiss video generation
3
+ * Extends dual-image-video types for AI kiss video generation
4
4
  */
5
5
 
6
6
  import type {
@@ -9,21 +9,6 @@ import type {
9
9
  DualImageVideoTranslations,
10
10
  } from "../../../shared/dual-image-video";
11
11
 
12
- export interface AIKissOptions {
13
- style?: "romantic" | "cheek" | "forehead";
14
- preserveFaces?: boolean;
15
- }
16
-
17
- export interface AIKissRequest {
18
- sourceImageUri: string;
19
- targetImageUri: string;
20
- sourceImageBase64?: string;
21
- targetImageBase64?: string;
22
- userId: string;
23
- prompt?: string;
24
- options?: AIKissOptions;
25
- }
26
-
27
12
  export interface AIKissResult {
28
13
  success: boolean;
29
14
  videoUrl?: string;
@@ -1,10 +1,4 @@
1
- /**
2
- * AI Kiss Domain Types Index
3
- */
4
-
5
1
  export type {
6
- AIKissOptions,
7
- AIKissRequest,
8
2
  AIKissResult,
9
3
  AIKissFeatureState,
10
4
  AIKissTranslations,
@@ -1,13 +1,10 @@
1
1
  /**
2
- export * from "./presentation/components";
3
2
  * AI Kiss Feature
4
3
  * Provider-agnostic AI kiss video generation feature
5
4
  */
6
5
 
7
6
  // Domain Types
8
7
  export type {
9
- AIKissOptions,
10
- AIKissRequest,
11
8
  AIKissResult,
12
9
  AIKissFeatureState,
13
10
  AIKissTranslations,
@@ -16,12 +13,7 @@ export type {
16
13
  } from "./domain";
17
14
 
18
15
  // Presentation Hooks
19
- export { useAIKissFeature } from "./presentation";
20
- export type {
21
- UseAIKissFeatureProps,
22
- UseAIKissFeatureReturn,
23
- } from "./presentation";
16
+ export { useAIKissFeature, type UseAIKissFeatureProps } from "./presentation";
24
17
 
25
18
  // Presentation Components
26
- export { AIKissFeature } from "./presentation";
27
- export type { AIKissFeatureProps } from "./presentation";
19
+ export { AIKissFeature, type AIKissFeatureProps } from "./presentation";
@@ -1,23 +1,9 @@
1
1
  /**
2
2
  * Anime Selfie Feature Types
3
- * Request, Result, Config types for anime selfie generation
4
3
  */
5
4
 
6
5
  export type AnimeSelfieStyle = "anime" | "manga" | "cartoon" | "disney" | "pixar";
7
6
 
8
- export interface AnimeSelfieOptions {
9
- style?: AnimeSelfieStyle;
10
- preserveBackground?: boolean;
11
- enhanceDetails?: boolean;
12
- }
13
-
14
- export interface AnimeSelfieRequest {
15
- imageUri: string;
16
- imageBase64?: string;
17
- userId: string;
18
- options?: AnimeSelfieOptions;
19
- }
20
-
21
7
  export interface AnimeSelfieResult {
22
8
  success: boolean;
23
9
  imageUrl?: string;
@@ -27,11 +13,6 @@ export interface AnimeSelfieResult {
27
13
  creationId?: string;
28
14
  }
29
15
 
30
- export interface AnimeSelfieProcessingStartData {
31
- creationId: string;
32
- imageUri: string;
33
- }
34
-
35
16
  export interface AnimeSelfieFeatureState {
36
17
  imageUri: string | null;
37
18
  processedUrl: string | null;
@@ -65,7 +46,7 @@ export interface AnimeSelfieFeatureConfig {
65
46
  extractResult?: AnimeSelfieResultExtractor;
66
47
  prepareImage: (imageUri: string) => Promise<string>;
67
48
  onImageSelect?: (uri: string) => void;
68
- onProcessingStart?: (data: AnimeSelfieProcessingStartData) => void;
49
+ onProcessingStart?: (data: { creationId: string; imageUri: string }) => void;
69
50
  onProcessingComplete?: (result: AnimeSelfieResult) => void;
70
51
  onError?: (error: string, creationId?: string) => void;
71
52
  }
@@ -1,13 +1,6 @@
1
- /**
2
- * Anime Selfie Domain Types Index
3
- */
4
-
5
1
  export type {
6
2
  AnimeSelfieStyle,
7
- AnimeSelfieOptions,
8
- AnimeSelfieRequest,
9
3
  AnimeSelfieResult,
10
- AnimeSelfieProcessingStartData,
11
4
  AnimeSelfieFeatureState,
12
5
  AnimeSelfieTranslations,
13
6
  AnimeSelfieResultExtractor,
@@ -1,5 +1,4 @@
1
1
  /**
2
- export * from "./presentation/components";
3
2
  * Anime Selfie Feature
4
3
  * Provider-agnostic anime selfie generation feature
5
4
  */
@@ -7,10 +6,7 @@ export * from "./presentation/components";
7
6
  // Domain Types
8
7
  export type {
9
8
  AnimeSelfieStyle,
10
- AnimeSelfieOptions,
11
- AnimeSelfieRequest,
12
9
  AnimeSelfieResult,
13
- AnimeSelfieProcessingStartData,
14
10
  AnimeSelfieFeatureState,
15
11
  AnimeSelfieTranslations,
16
12
  AnimeSelfieFeatureConfig,
@@ -18,12 +14,7 @@ export type {
18
14
  } from "./domain";
19
15
 
20
16
  // Presentation Hooks
21
- export { useAnimeSelfieFeature } from "./presentation";
22
- export type {
23
- UseAnimeSelfieFeatureProps,
24
- UseAnimeSelfieFeatureReturn,
25
- } from "./presentation";
17
+ export { useAnimeSelfieFeature, type UseAnimeSelfieFeatureProps } from "./presentation";
26
18
 
27
19
  // Presentation Components
28
- export { AnimeSelfieFeature } from "./presentation";
29
- export type { AnimeSelfieFeatureProps } from "./presentation";
20
+ export { AnimeSelfieFeature, type AnimeSelfieFeatureProps } from "./presentation";
@@ -15,15 +15,6 @@ export interface FaceSwapOptions {
15
15
  preserveSkinTone?: boolean;
16
16
  }
17
17
 
18
- export interface FaceSwapRequest {
19
- sourceImageUri: string;
20
- targetImageUri: string;
21
- sourceImageBase64?: string;
22
- targetImageBase64?: string;
23
- userId: string;
24
- options?: FaceSwapOptions;
25
- }
26
-
27
18
  export type FaceSwapResult = BaseImageResult;
28
19
 
29
20
  export type FaceSwapFeatureState = BaseDualImageState;
@@ -1,10 +1,5 @@
1
- /**
2
- * Face Swap Domain Types Index
3
- */
4
-
5
1
  export type {
6
2
  FaceSwapOptions,
7
- FaceSwapRequest,
8
3
  FaceSwapResult,
9
4
  FaceSwapFeatureState,
10
5
  FaceSwapTranslations,
@@ -1,5 +1,4 @@
1
1
  /**
2
- export * from "./presentation/components";
3
2
  * Face Swap Feature
4
3
  * Provider-agnostic face swap generation feature
5
4
  */
@@ -7,7 +6,6 @@ export * from "./presentation/components";
7
6
  // Domain Types
8
7
  export type {
9
8
  FaceSwapOptions,
10
- FaceSwapRequest,
11
9
  FaceSwapResult,
12
10
  FaceSwapFeatureState,
13
11
  FaceSwapTranslations,
@@ -15,9 +13,7 @@ export type {
15
13
  } from "./domain";
16
14
 
17
15
  // Presentation Hooks
18
- export { useFaceSwapFeature } from "./presentation";
19
- export type { UseFaceSwapFeatureProps } from "./presentation";
16
+ export { useFaceSwapFeature, type UseFaceSwapFeatureProps } from "./presentation";
20
17
 
21
18
  // Presentation Components
22
- export { FaceSwapFeature } from "./presentation";
23
- export type { FaceSwapFeatureProps } from "./presentation";
19
+ export { FaceSwapFeature, type FaceSwapFeatureProps } from "./presentation";
@@ -1,5 +1,4 @@
1
1
  /**
2
- export * from "./presentation/components";
3
2
  * HD Touch Up Feature
4
3
  * Provider-agnostic HD enhancement feature
5
4
  */
@@ -16,12 +15,7 @@ export type {
16
15
  } from "./domain";
17
16
 
18
17
  // Presentation Hooks
19
- export { useHDTouchUpFeature } from "./presentation";
20
- export type {
21
- UseHDTouchUpFeatureProps,
22
- UseHDTouchUpFeatureReturn,
23
- } from "./presentation";
18
+ export { useHDTouchUpFeature, type UseHDTouchUpFeatureProps } from "./presentation";
24
19
 
25
20
  // Presentation Components
26
- export { HDTouchUpFeature } from "./presentation";
27
- export type { HDTouchUpFeatureProps } from "./presentation";
21
+ export { HDTouchUpFeature, type HDTouchUpFeatureProps } from "./presentation";
@@ -1,5 +1 @@
1
- export { useHDTouchUpFeature } from "./useHDTouchUpFeature";
2
- export type {
3
- UseHDTouchUpFeatureProps,
4
- UseHDTouchUpFeatureReturn,
5
- } from "./useHDTouchUpFeature";
1
+ export { useHDTouchUpFeature, type UseHDTouchUpFeatureProps } from "./useHDTouchUpFeature";
@@ -1,15 +1,10 @@
1
1
  /**
2
2
  * useHDTouchUpFeature Hook
3
3
  * Uses base single image hook for HD touch up
4
- * Uses centralized orchestrator for credit/error handling
5
4
  */
6
5
 
7
- import {
8
- useSingleImageFeature,
9
- type BaseSingleImageHookReturn,
10
- } from "../../../image-to-image";
11
- import type { AlertMessages } from "../../../../presentation/hooks/generation";
12
- import type { HDTouchUpFeatureConfig } from "../../domain/types";
6
+ import { useSingleImageFeature, type BaseSingleImageHookReturn } from "../../../image-to-image";
7
+ import type { HDTouchUpFeatureConfig, HDTouchUpResult } from "../../domain/types";
13
8
 
14
9
  export interface UseHDTouchUpFeatureProps {
15
10
  config: HDTouchUpFeatureConfig;
@@ -18,29 +13,11 @@ export interface UseHDTouchUpFeatureProps {
18
13
  onBeforeProcess?: () => Promise<boolean>;
19
14
  }
20
15
 
21
- export interface UseHDTouchUpFeatureOptions {
22
- /** Alert messages for error handling */
23
- alertMessages?: AlertMessages;
24
- /** User ID for credit operations */
25
- userId?: string;
26
- /** Callback when credits are exhausted */
27
- onCreditsExhausted?: () => void;
28
- }
29
-
30
- export interface UseHDTouchUpFeatureReturn extends BaseSingleImageHookReturn {}
31
-
32
- export function useHDTouchUpFeature(
33
- props: UseHDTouchUpFeatureProps,
34
- options?: UseHDTouchUpFeatureOptions,
35
- ): UseHDTouchUpFeatureReturn {
16
+ export function useHDTouchUpFeature(props: UseHDTouchUpFeatureProps): BaseSingleImageHookReturn {
36
17
  const { config, onSelectImage, onSaveImage, onBeforeProcess } = props;
37
18
 
38
- // Cast config to any to bypass strict type checking while maintaining runtime behavior
39
- return useSingleImageFeature(
19
+ return useSingleImageFeature<HDTouchUpFeatureConfig, HDTouchUpResult>(
40
20
  { config: config as never, onSelectImage, onSaveImage, onBeforeProcess },
41
- {
42
- buildInput: (imageBase64) => ({ imageBase64 }),
43
- ...options,
44
- },
21
+ { buildInput: (imageBase64) => ({ imageBase64 }) },
45
22
  );
46
23
  }
@@ -9,9 +9,7 @@ import type { BaseSingleImageState, BaseDualImageState } from "./state.types";
9
9
  /**
10
10
  * Base hook props for single image features
11
11
  */
12
- export interface BaseSingleImageHookProps<
13
- TConfig extends SingleImageConfig = SingleImageConfig,
14
- > {
12
+ export interface BaseSingleImageHookProps<TConfig = SingleImageConfig> {
15
13
  config: TConfig;
16
14
  onSelectImage: () => Promise<string | null>;
17
15
  onSaveImage: (imageUrl: string) => Promise<void>;
@@ -19,7 +19,7 @@ import type {
19
19
  BaseImageResult,
20
20
  } from "../../domain/types";
21
21
 
22
- export interface SingleImageFeatureOptions<TConfig extends SingleImageConfig> {
22
+ export interface SingleImageFeatureOptions<TConfig = SingleImageConfig> {
23
23
  buildInput?: (imageBase64: string, config: TConfig) => Record<string, unknown>;
24
24
  /** Alert messages for error handling */
25
25
  alertMessages?: AlertMessages;
@@ -43,13 +43,16 @@ interface SingleImageInput {
43
43
  }
44
44
 
45
45
  export function useSingleImageFeature<
46
- TConfig extends SingleImageConfig = SingleImageConfig,
47
- TResult extends BaseImageResult = BaseImageResult,
46
+ TConfig = SingleImageConfig,
47
+ TResult = BaseImageResult,
48
48
  >(
49
49
  props: BaseSingleImageHookProps<TConfig>,
50
50
  options?: SingleImageFeatureOptions<TConfig>,
51
51
  ): BaseSingleImageHookReturn {
52
- const { config, onSelectImage, onSaveImage, onBeforeProcess } = props;
52
+ const { config: rawConfig, onSelectImage, onSaveImage, onBeforeProcess } = props;
53
+
54
+ // Cast config to base type for internal usage
55
+ const config = rawConfig as unknown as SingleImageConfig;
53
56
 
54
57
  // Image selection state (separate from orchestrator state)
55
58
  const [imageUri, setImageUri] = useState<string | null>(null);
@@ -73,7 +76,7 @@ export function useSingleImageFeature<
73
76
  // Notify completion with creationId
74
77
  const creationId = creationIdRef.current;
75
78
  if (creationId) {
76
- config.onProcessingComplete?.({ ...result, creationId } as unknown as TResult);
79
+ config.onProcessingComplete?.({ ...result, creationId } as BaseImageResult);
77
80
  }
78
81
 
79
82
  return result.imageUrl;
@@ -124,14 +127,14 @@ export function useSingleImageFeature<
124
127
  const imageBase64 = await config.prepareImage(imageUri);
125
128
 
126
129
  const input: SingleImageInput = options?.buildInput
127
- ? { imageBase64, options: options.buildInput(imageBase64, config) }
130
+ ? { imageBase64, options: options.buildInput(imageBase64, rawConfig) }
128
131
  : { imageBase64 };
129
132
 
130
133
  await orchestrator.generate(input);
131
134
  } catch (error) {
132
135
  // Error already handled by orchestrator
133
136
  }
134
- }, [imageUri, config, options, onBeforeProcess, orchestrator]);
137
+ }, [imageUri, config, rawConfig, options, onBeforeProcess, orchestrator]);
135
138
 
136
139
  const save = useCallback(async () => {
137
140
  if (!orchestrator.result) return;
@@ -1,5 +1,4 @@
1
1
  /**
2
- export * from "./presentation/components";
3
2
  * Photo Restoration Feature
4
3
  * Provider-agnostic photo restoration feature
5
4
  */
@@ -16,15 +15,8 @@ export type {
16
15
  } from "./domain";
17
16
 
18
17
  // Presentation Hooks
19
- export { usePhotoRestoreFeature } from "./presentation";
20
- export type {
21
- UsePhotoRestoreFeatureProps,
22
- UsePhotoRestoreFeatureReturn,
23
- } from "./presentation";
18
+ export { usePhotoRestoreFeature, type UsePhotoRestoreFeatureProps } from "./presentation";
24
19
 
25
20
  // Presentation Components
26
21
  export { PhotoRestoreFeature, PhotoRestoreResultView } from "./presentation";
27
- export type {
28
- PhotoRestoreFeatureProps,
29
- PhotoRestoreResultViewProps,
30
- } from "./presentation";
22
+ export type { PhotoRestoreFeatureProps, PhotoRestoreResultViewProps } from "./presentation";
@@ -1,5 +1 @@
1
- export { usePhotoRestoreFeature } from "./usePhotoRestoreFeature";
2
- export type {
3
- UsePhotoRestoreFeatureProps,
4
- UsePhotoRestoreFeatureReturn,
5
- } from "./usePhotoRestoreFeature";
1
+ export { usePhotoRestoreFeature, type UsePhotoRestoreFeatureProps } from "./usePhotoRestoreFeature";
@@ -1,15 +1,10 @@
1
1
  /**
2
2
  * usePhotoRestoreFeature Hook
3
3
  * Uses base single image hook for photo restoration
4
- * Uses centralized orchestrator for credit/error handling
5
4
  */
6
5
 
7
- import {
8
- useSingleImageFeature,
9
- type BaseSingleImageHookReturn,
10
- } from "../../../image-to-image";
11
- import type { AlertMessages } from "../../../../presentation/hooks/generation";
12
- import type { PhotoRestoreFeatureConfig } from "../../domain/types";
6
+ import { useSingleImageFeature, type BaseSingleImageHookReturn } from "../../../image-to-image";
7
+ import type { PhotoRestoreFeatureConfig, PhotoRestoreResult } from "../../domain/types";
13
8
 
14
9
  export interface UsePhotoRestoreFeatureProps {
15
10
  config: PhotoRestoreFeatureConfig;
@@ -18,29 +13,11 @@ export interface UsePhotoRestoreFeatureProps {
18
13
  onBeforeProcess?: () => Promise<boolean>;
19
14
  }
20
15
 
21
- export interface UsePhotoRestoreFeatureOptions {
22
- /** Alert messages for error handling */
23
- alertMessages?: AlertMessages;
24
- /** User ID for credit operations */
25
- userId?: string;
26
- /** Callback when credits are exhausted */
27
- onCreditsExhausted?: () => void;
28
- }
29
-
30
- export interface UsePhotoRestoreFeatureReturn extends BaseSingleImageHookReturn {}
31
-
32
- export function usePhotoRestoreFeature(
33
- props: UsePhotoRestoreFeatureProps,
34
- options?: UsePhotoRestoreFeatureOptions,
35
- ): UsePhotoRestoreFeatureReturn {
16
+ export function usePhotoRestoreFeature(props: UsePhotoRestoreFeatureProps): BaseSingleImageHookReturn {
36
17
  const { config, onSelectImage, onSaveImage, onBeforeProcess } = props;
37
18
 
38
- // Cast config to any to bypass strict type checking while maintaining runtime behavior
39
- return useSingleImageFeature(
19
+ return useSingleImageFeature<PhotoRestoreFeatureConfig, PhotoRestoreResult>(
40
20
  { config: config as never, onSelectImage, onSaveImage, onBeforeProcess },
41
- {
42
- buildInput: (imageBase64) => ({ imageBase64 }),
43
- ...options,
44
- },
21
+ { buildInput: (imageBase64) => ({ imageBase64 }) },
45
22
  );
46
23
  }
@@ -1,6 +1 @@
1
- /**
2
- * Remove Background Presentation Hooks Index
3
- */
4
-
5
- export { useRemoveBackgroundFeature } from "./useRemoveBackgroundFeature";
6
- export type { UseRemoveBackgroundFeatureProps } from "./useRemoveBackgroundFeature";
1
+ export { useRemoveBackgroundFeature, type UseRemoveBackgroundFeatureProps } from "./useRemoveBackgroundFeature";
@@ -3,14 +3,8 @@
3
3
  * Uses base single image hook for background removal
4
4
  */
5
5
 
6
- import {
7
- useSingleImageFeature,
8
- type BaseSingleImageHookReturn,
9
- } from "../../../image-to-image";
10
- import type {
11
- RemoveBackgroundFeatureConfig,
12
- RemoveBackgroundResult,
13
- } from "../../domain/types";
6
+ import { useSingleImageFeature, type BaseSingleImageHookReturn } from "../../../image-to-image";
7
+ import type { RemoveBackgroundFeatureConfig, RemoveBackgroundResult } from "../../domain/types";
14
8
 
15
9
  export interface UseRemoveBackgroundFeatureProps {
16
10
  config: RemoveBackgroundFeatureConfig;
@@ -19,13 +13,11 @@ export interface UseRemoveBackgroundFeatureProps {
19
13
  onBeforeProcess?: () => Promise<boolean>;
20
14
  }
21
15
 
22
- export function useRemoveBackgroundFeature(
23
- props: UseRemoveBackgroundFeatureProps,
24
- ): BaseSingleImageHookReturn {
16
+ export function useRemoveBackgroundFeature(props: UseRemoveBackgroundFeatureProps): BaseSingleImageHookReturn {
25
17
  const { config, onSelectImage, onSaveImage, onBeforeProcess } = props;
26
18
 
27
19
  return useSingleImageFeature<RemoveBackgroundFeatureConfig, RemoveBackgroundResult>(
28
- { config, onSelectImage, onSaveImage, onBeforeProcess },
20
+ { config: config as never, onSelectImage, onSaveImage, onBeforeProcess },
29
21
  {
30
22
  buildInput: (imageBase64, cfg) => ({
31
23
  imageBase64,
@@ -1,10 +1,4 @@
1
- /**
2
- * Remove Object Domain Types Index
3
- */
4
-
5
1
  export type {
6
- RemoveObjectOptions,
7
- RemoveObjectRequest,
8
2
  RemoveObjectResult,
9
3
  RemoveObjectFeatureState,
10
4
  RemoveObjectTranslations,
@@ -1,23 +1,8 @@
1
1
  /**
2
2
  * Remove Object Feature Types
3
- * Request, Result, Config types for object removal (inpainting)
3
+ * Types for object removal (inpainting)
4
4
  */
5
5
 
6
- export interface RemoveObjectOptions {
7
- prompt?: string;
8
- maskBase64?: string;
9
- fillBackground?: boolean;
10
- }
11
-
12
- export interface RemoveObjectRequest {
13
- imageUri: string;
14
- imageBase64?: string;
15
- maskBase64?: string;
16
- prompt?: string;
17
- userId: string;
18
- options?: RemoveObjectOptions;
19
- }
20
-
21
6
  export interface RemoveObjectResult {
22
7
  success: boolean;
23
8
  imageUrl?: string;
@@ -1,13 +1,10 @@
1
1
  /**
2
- export * from "./presentation/components";
3
2
  * Remove Object Feature
4
3
  * Provider-agnostic object removal (inpainting) feature
5
4
  */
6
5
 
7
6
  // Domain Types
8
7
  export type {
9
- RemoveObjectOptions,
10
- RemoveObjectRequest,
11
8
  RemoveObjectResult,
12
9
  RemoveObjectFeatureState,
13
10
  RemoveObjectTranslations,
@@ -16,12 +13,11 @@ export type {
16
13
  } from "./domain";
17
14
 
18
15
  // Presentation Hooks
19
- export { useRemoveObjectFeature } from "./presentation";
20
- export type {
21
- UseRemoveObjectFeatureProps,
22
- UseRemoveObjectFeatureReturn,
16
+ export {
17
+ useRemoveObjectFeature,
18
+ type UseRemoveObjectFeatureProps,
19
+ type UseRemoveObjectFeatureReturn,
23
20
  } from "./presentation";
24
21
 
25
22
  // Presentation Components
26
- export { RemoveObjectFeature } from "./presentation";
27
- export type { RemoveObjectFeatureProps } from "./presentation";
23
+ export { RemoveObjectFeature, type RemoveObjectFeatureProps } from "./presentation";
@@ -1,11 +1,5 @@
1
- /**
2
- * Replace Background Domain Types Index
3
- */
4
-
5
1
  export type {
6
2
  ReplaceBackgroundMode,
7
- ReplaceBackgroundOptions,
8
- ReplaceBackgroundRequest,
9
3
  ReplaceBackgroundResult,
10
4
  ReplaceBackgroundFeatureState,
11
5
  ReplaceBackgroundTranslations,
@@ -16,21 +16,6 @@ export type ReplaceBackgroundMode =
16
16
  | "creative-scene"
17
17
  | "solid-color";
18
18
 
19
- export interface ReplaceBackgroundOptions {
20
- mode?: ReplaceBackgroundMode;
21
- prompt?: string;
22
- backgroundColor?: string;
23
- blurIntensity?: number;
24
- }
25
-
26
- export interface ReplaceBackgroundRequest {
27
- imageUri: string;
28
- imageBase64?: string;
29
- userId: string;
30
- prompt?: string;
31
- options?: ReplaceBackgroundOptions;
32
- }
33
-
34
19
  export type ReplaceBackgroundResult = BaseImageResult;
35
20
 
36
21
  export interface ReplaceBackgroundFeatureState extends BaseImageWithPromptState {
@@ -1,13 +1,11 @@
1
1
  /**
2
2
  * Replace Background Feature
3
- * AI-powered background replacement feature for React Native
3
+ * AI-powered background replacement feature
4
4
  */
5
5
 
6
6
  // Domain Types
7
7
  export type {
8
8
  ReplaceBackgroundMode,
9
- ReplaceBackgroundOptions,
10
- ReplaceBackgroundRequest,
11
9
  ReplaceBackgroundResult,
12
10
  ReplaceBackgroundFeatureState,
13
11
  ReplaceBackgroundTranslations,
@@ -15,12 +13,11 @@ export type {
15
13
  } from "./domain/types";
16
14
 
17
15
  // Presentation Components
18
- export { ReplaceBackgroundFeature } from "./presentation/components";
19
- export type { ReplaceBackgroundFeatureProps } from "./presentation/components";
16
+ export { ReplaceBackgroundFeature, type ReplaceBackgroundFeatureProps } from "./presentation/components";
20
17
 
21
18
  // Presentation Hooks
22
- export { useReplaceBackgroundFeature } from "./presentation/hooks";
23
- export type {
24
- UseReplaceBackgroundFeatureProps,
25
- UseReplaceBackgroundFeatureReturn,
19
+ export {
20
+ useReplaceBackgroundFeature,
21
+ type UseReplaceBackgroundFeatureProps,
22
+ type UseReplaceBackgroundFeatureReturn,
26
23
  } from "./presentation/hooks";
@@ -1,2 +1 @@
1
- export { useUpscaleFeature } from "./useUpscaleFeature";
2
- export type { UseUpscaleFeatureProps } from "./useUpscaleFeature";
1
+ export { useUpscaleFeature, type UseUpscaleFeatureProps } from "./useUpscaleFeature";
@@ -1,12 +1,9 @@
1
1
  /**
2
2
  * useUpscaleFeature Hook
3
- * Uses base single image hook with upscale-specific options
3
+ * Uses base single image hook for image upscaling
4
4
  */
5
5
 
6
- import {
7
- useSingleImageFeature,
8
- type BaseSingleImageHookReturn,
9
- } from "../../../image-to-image";
6
+ import { useSingleImageFeature, type BaseSingleImageHookReturn } from "../../../image-to-image";
10
7
  import type { UpscaleFeatureConfig, UpscaleResult } from "../../domain/types";
11
8
 
12
9
  export interface UseUpscaleFeatureProps {
@@ -16,13 +13,11 @@ export interface UseUpscaleFeatureProps {
16
13
  onBeforeProcess?: () => Promise<boolean>;
17
14
  }
18
15
 
19
- export function useUpscaleFeature(
20
- props: UseUpscaleFeatureProps,
21
- ): BaseSingleImageHookReturn {
16
+ export function useUpscaleFeature(props: UseUpscaleFeatureProps): BaseSingleImageHookReturn {
22
17
  const { config, onSelectImage, onSaveImage, onBeforeProcess } = props;
23
18
 
24
19
  return useSingleImageFeature<UpscaleFeatureConfig, UpscaleResult>(
25
- { config, onSelectImage, onSaveImage, onBeforeProcess },
20
+ { config: config as never, onSelectImage, onSaveImage, onBeforeProcess },
26
21
  {
27
22
  buildInput: (imageBase64, cfg) => ({
28
23
  imageBase64,