@umituz/react-native-ai-generation-content 1.17.0 → 1.17.2

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 (156) hide show
  1. package/package.json +13 -14
  2. package/src/domains/creations/domain/entities/Creation.ts +33 -2
  3. package/src/domains/creations/domain/entities/index.ts +1 -1
  4. package/src/domains/creations/domain/types/creation-categories.ts +133 -0
  5. package/src/domains/creations/domain/types/creation-filter.ts +131 -0
  6. package/src/domains/creations/domain/types/creation-types.ts +63 -0
  7. package/src/domains/creations/domain/types/index.ts +44 -0
  8. package/src/domains/creations/domain/utils/creation-helpers.ts +134 -0
  9. package/src/domains/creations/domain/utils/index.ts +8 -0
  10. package/src/domains/creations/domain/utils/preview-helpers.ts +84 -0
  11. package/src/domains/creations/domain/utils/status-helpers.ts +90 -0
  12. package/src/domains/creations/index.ts +95 -21
  13. package/src/domains/creations/infrastructure/repositories/CreationsRepository.ts +14 -1
  14. package/src/domains/creations/presentation/components/CreationActions.tsx +120 -0
  15. package/src/domains/creations/presentation/components/CreationBadges.tsx +111 -0
  16. package/src/domains/creations/presentation/components/CreationCard.tsx +201 -102
  17. package/src/domains/creations/presentation/components/CreationPreview.tsx +117 -0
  18. package/src/domains/creations/presentation/components/CreationsFilterBar.tsx +254 -0
  19. package/src/domains/creations/presentation/components/CreationsGrid.tsx +121 -68
  20. package/src/domains/creations/presentation/components/CreationsHomeCard.tsx +1 -1
  21. package/src/domains/creations/presentation/components/index.ts +23 -3
  22. package/src/domains/creations/presentation/hooks/index.ts +1 -0
  23. package/src/domains/creations/presentation/hooks/useAdvancedFilter.ts +261 -0
  24. package/src/domains/creations/presentation/screens/CreationsGalleryScreen.tsx +8 -6
  25. package/src/domains/face-detection/infrastructure/validators/faceValidator.ts +1 -1
  26. package/src/domains/prompts/infrastructure/services/PromptGenerationService.ts +1 -1
  27. package/src/domains/prompts/presentation/hooks/useFaceSwap.ts +2 -2
  28. package/src/domains/prompts/presentation/hooks/usePromptGeneration.ts +4 -4
  29. package/src/features/ai-hug/domain/index.ts +5 -0
  30. package/src/features/ai-hug/domain/types/ai-hug.types.ts +72 -0
  31. package/src/features/ai-hug/domain/types/index.ts +14 -0
  32. package/src/features/ai-hug/index.ts +27 -0
  33. package/src/features/ai-hug/infrastructure/index.ts +5 -0
  34. package/src/features/ai-hug/infrastructure/services/ai-hug-executor.ts +96 -0
  35. package/src/features/ai-hug/infrastructure/services/index.ts +6 -0
  36. package/src/features/ai-hug/presentation/hooks/index.ts +9 -0
  37. package/src/features/ai-hug/presentation/hooks/useAIHugFeature.ts +157 -0
  38. package/src/features/ai-hug/presentation/index.ts +5 -0
  39. package/src/features/ai-kiss/domain/index.ts +5 -0
  40. package/src/features/ai-kiss/domain/types/ai-kiss.types.ts +72 -0
  41. package/src/features/ai-kiss/domain/types/index.ts +14 -0
  42. package/src/features/ai-kiss/index.ts +27 -0
  43. package/src/features/ai-kiss/infrastructure/index.ts +5 -0
  44. package/src/features/ai-kiss/infrastructure/services/ai-kiss-executor.ts +96 -0
  45. package/src/features/ai-kiss/infrastructure/services/index.ts +6 -0
  46. package/src/features/ai-kiss/presentation/hooks/index.ts +9 -0
  47. package/src/features/ai-kiss/presentation/hooks/useAIKissFeature.ts +157 -0
  48. package/src/features/ai-kiss/presentation/index.ts +5 -0
  49. package/src/features/anime-selfie/domain/index.ts +5 -0
  50. package/src/features/anime-selfie/domain/types/anime-selfie.types.ts +72 -0
  51. package/src/features/anime-selfie/domain/types/index.ts +15 -0
  52. package/src/features/anime-selfie/index.ts +28 -0
  53. package/src/features/anime-selfie/infrastructure/index.ts +5 -0
  54. package/src/features/anime-selfie/infrastructure/services/anime-selfie-executor.ts +95 -0
  55. package/src/features/anime-selfie/infrastructure/services/index.ts +6 -0
  56. package/src/features/anime-selfie/presentation/hooks/index.ts +9 -0
  57. package/src/features/anime-selfie/presentation/hooks/useAnimeSelfieFeature.ts +138 -0
  58. package/src/features/anime-selfie/presentation/index.ts +5 -0
  59. package/src/features/background/domain/types/index.ts +15 -0
  60. package/src/features/background/domain/types/replace-background.types.ts +82 -0
  61. package/src/features/background/index.ts +31 -3
  62. package/src/features/background/infrastructure/index.ts +5 -0
  63. package/src/features/background/infrastructure/services/index.ts +6 -0
  64. package/src/features/background/infrastructure/services/replace-background-executor.ts +95 -0
  65. package/src/features/background/presentation/hooks/index.ts +6 -1
  66. package/src/features/background/presentation/hooks/useReplaceBackgroundFeature.ts +160 -0
  67. package/src/features/face-swap/domain/index.ts +5 -0
  68. package/src/features/face-swap/domain/types/face-swap.types.ts +72 -0
  69. package/src/features/face-swap/domain/types/index.ts +14 -0
  70. package/src/features/face-swap/index.ts +27 -1
  71. package/src/features/face-swap/infrastructure/index.ts +5 -0
  72. package/src/features/face-swap/infrastructure/services/face-swap-executor.ts +96 -0
  73. package/src/features/face-swap/infrastructure/services/index.ts +6 -0
  74. package/src/features/face-swap/presentation/hooks/index.ts +9 -0
  75. package/src/features/face-swap/presentation/hooks/useFaceSwapFeature.ts +157 -0
  76. package/src/features/face-swap/presentation/index.ts +5 -0
  77. package/src/features/image-to-video/domain/index.ts +1 -0
  78. package/src/features/image-to-video/domain/types/image-to-video.types.ts +71 -0
  79. package/src/features/image-to-video/domain/types/index.ts +10 -0
  80. package/src/features/image-to-video/index.ts +27 -0
  81. package/src/features/image-to-video/infrastructure/index.ts +1 -0
  82. package/src/features/image-to-video/infrastructure/services/image-to-video-executor.ts +112 -0
  83. package/src/features/image-to-video/infrastructure/services/index.ts +5 -0
  84. package/src/features/image-to-video/presentation/hooks/index.ts +5 -0
  85. package/src/features/image-to-video/presentation/hooks/useImageToVideoFeature.ts +121 -0
  86. package/src/features/image-to-video/presentation/index.ts +1 -0
  87. package/src/features/photo-restoration/domain/types/index.ts +2 -5
  88. package/src/features/photo-restoration/domain/types/photo-restore.types.ts +14 -0
  89. package/src/features/photo-restoration/index.ts +3 -8
  90. package/src/features/photo-restoration/infrastructure/services/index.ts +1 -6
  91. package/src/features/photo-restoration/infrastructure/services/photo-restore-executor.ts +64 -30
  92. package/src/features/photo-restoration/presentation/hooks/usePhotoRestoreFeature.ts +11 -6
  93. package/src/features/remove-background/domain/index.ts +5 -0
  94. package/src/features/remove-background/domain/types/index.ts +14 -0
  95. package/src/features/remove-background/domain/types/remove-background.types.ts +69 -0
  96. package/src/features/remove-background/index.ts +27 -0
  97. package/src/features/remove-background/infrastructure/index.ts +5 -0
  98. package/src/features/remove-background/infrastructure/services/index.ts +6 -0
  99. package/src/features/remove-background/infrastructure/services/remove-background-executor.ts +95 -0
  100. package/src/features/remove-background/presentation/hooks/index.ts +9 -0
  101. package/src/features/remove-background/presentation/hooks/useRemoveBackgroundFeature.ts +137 -0
  102. package/src/features/remove-background/presentation/index.ts +5 -0
  103. package/src/features/remove-object/domain/index.ts +5 -0
  104. package/src/features/remove-object/domain/types/index.ts +14 -0
  105. package/src/features/remove-object/domain/types/remove-object.types.ts +77 -0
  106. package/src/features/remove-object/index.ts +27 -0
  107. package/src/features/remove-object/infrastructure/index.ts +5 -0
  108. package/src/features/remove-object/infrastructure/services/index.ts +6 -0
  109. package/src/features/remove-object/infrastructure/services/remove-object-executor.ts +99 -0
  110. package/src/features/remove-object/presentation/hooks/index.ts +9 -0
  111. package/src/features/remove-object/presentation/hooks/useRemoveObjectFeature.ts +168 -0
  112. package/src/features/remove-object/presentation/index.ts +5 -0
  113. package/src/features/text-to-image/domain/index.ts +1 -0
  114. package/src/features/text-to-image/domain/types/index.ts +10 -0
  115. package/src/features/text-to-image/domain/types/text-to-image.types.ts +66 -0
  116. package/src/features/text-to-image/index.ts +27 -1
  117. package/src/features/text-to-image/infrastructure/index.ts +1 -0
  118. package/src/features/text-to-image/infrastructure/services/index.ts +5 -0
  119. package/src/features/text-to-image/infrastructure/services/text-to-image-executor.ts +113 -0
  120. package/src/features/text-to-image/presentation/hooks/index.ts +5 -0
  121. package/src/features/text-to-image/presentation/hooks/useTextToImageFeature.ts +111 -0
  122. package/src/features/text-to-image/presentation/index.ts +1 -0
  123. package/src/features/text-to-video/domain/index.ts +1 -0
  124. package/src/features/text-to-video/domain/types/index.ts +10 -0
  125. package/src/features/text-to-video/domain/types/text-to-video.types.ts +65 -0
  126. package/src/features/text-to-video/index.ts +27 -1
  127. package/src/features/text-to-video/infrastructure/index.ts +1 -0
  128. package/src/features/text-to-video/infrastructure/services/index.ts +5 -0
  129. package/src/features/text-to-video/infrastructure/services/text-to-video-executor.ts +108 -0
  130. package/src/features/text-to-video/presentation/hooks/index.ts +5 -0
  131. package/src/features/text-to-video/presentation/hooks/useTextToVideoFeature.ts +111 -0
  132. package/src/features/text-to-video/presentation/index.ts +1 -0
  133. package/src/features/text-to-voice/domain/index.ts +1 -0
  134. package/src/features/text-to-voice/domain/types/index.ts +10 -0
  135. package/src/features/text-to-voice/domain/types/text-to-voice.types.ts +65 -0
  136. package/src/features/text-to-voice/index.ts +27 -0
  137. package/src/features/text-to-voice/infrastructure/index.ts +1 -0
  138. package/src/features/text-to-voice/infrastructure/services/index.ts +5 -0
  139. package/src/features/text-to-voice/infrastructure/services/text-to-voice-executor.ts +111 -0
  140. package/src/features/text-to-voice/presentation/hooks/index.ts +5 -0
  141. package/src/features/text-to-voice/presentation/hooks/useTextToVoiceFeature.ts +105 -0
  142. package/src/features/text-to-voice/presentation/index.ts +1 -0
  143. package/src/features/upscaling/domain/types/index.ts +0 -1
  144. package/src/features/upscaling/domain/types/upscale.types.ts +14 -0
  145. package/src/features/upscaling/index.ts +3 -11
  146. package/src/features/upscaling/infrastructure/services/index.ts +1 -6
  147. package/src/features/upscaling/infrastructure/services/upscale-executor.ts +64 -30
  148. package/src/features/upscaling/presentation/hooks/useUpscaleFeature.ts +12 -7
  149. package/src/index.ts +63 -0
  150. package/src/features/face-swap/domain/entities.ts +0 -48
  151. package/src/features/photo-restoration/domain/types/provider.types.ts +0 -23
  152. package/src/features/photo-restoration/infrastructure/services/photo-restore-provider-registry.ts +0 -77
  153. package/src/features/text-to-image/domain/entities.ts +0 -58
  154. package/src/features/text-to-video/domain/entities.ts +0 -52
  155. package/src/features/upscaling/domain/types/provider.types.ts +0 -23
  156. package/src/features/upscaling/infrastructure/services/upscale-provider-registry.ts +0 -77
@@ -1,48 +0,0 @@
1
- /**
2
- * Face Swap Domain Entities
3
- */
4
-
5
- export interface FaceSwapConfig {
6
- /**
7
- * Enhance the face details after swapping
8
- * @default true
9
- */
10
- enhanceFace?: boolean;
11
-
12
- /**
13
- * Preserve the skin tone of the target image
14
- * @default true
15
- */
16
- preserveSkinTone?: boolean;
17
- }
18
-
19
- export interface FaceSwapRequest {
20
- /**
21
- * The target image where the face will be swapped TO.
22
- * Can be a Base64 string or a remote URL.
23
- */
24
- targetImage: string;
25
-
26
- /**
27
- * The source image containing the face to swap FROM.
28
- * Can be a Base64 string or a remote URL.
29
- */
30
- sourceImage: string;
31
-
32
- /**
33
- * Optional configuration for the swap process
34
- */
35
- options?: FaceSwapConfig;
36
- }
37
-
38
- export interface FaceSwapResult {
39
- /**
40
- * URL or Base64 of the resulting image
41
- */
42
- imageUrl: string;
43
-
44
- /**
45
- * Metadata about the generation
46
- */
47
- metadata?: Record<string, unknown>;
48
- }
@@ -1,23 +0,0 @@
1
- /**
2
- * Photo Restore Provider Types
3
- * Interface for provider implementations
4
- */
5
-
6
- import type { PhotoRestoreRequest, PhotoRestoreResult } from "./photo-restore.types";
7
-
8
- export interface IPhotoRestoreProvider {
9
- readonly providerId: string;
10
- readonly providerName: string;
11
-
12
- isAvailable(): boolean;
13
-
14
- restore(
15
- request: PhotoRestoreRequest,
16
- onProgress?: (progress: number) => void,
17
- ): Promise<PhotoRestoreResult>;
18
- }
19
-
20
- export interface PhotoRestoreProviderEntry {
21
- provider: IPhotoRestoreProvider;
22
- priority: number;
23
- }
@@ -1,77 +0,0 @@
1
- /**
2
- * Photo Restore Provider Registry
3
- * Manages registered photo restore providers
4
- */
5
-
6
- import type {
7
- IPhotoRestoreProvider,
8
- PhotoRestoreProviderEntry,
9
- } from "../../domain/types";
10
-
11
- declare const __DEV__: boolean;
12
-
13
- class PhotoRestoreProviderRegistry {
14
- private providers: Map<string, PhotoRestoreProviderEntry> = new Map();
15
- private defaultProviderId: string | null = null;
16
-
17
- register(provider: IPhotoRestoreProvider, priority = 0): void {
18
- this.providers.set(provider.providerId, { provider, priority });
19
-
20
- if (__DEV__) {
21
- // eslint-disable-next-line no-console
22
- console.log(
23
- `[PhotoRestoreRegistry] Registered provider: ${provider.providerId}`,
24
- );
25
- }
26
- }
27
-
28
- unregister(providerId: string): void {
29
- this.providers.delete(providerId);
30
- }
31
-
32
- setDefault(providerId: string): void {
33
- if (!this.providers.has(providerId)) {
34
- throw new Error(`Provider ${providerId} not registered`);
35
- }
36
- this.defaultProviderId = providerId;
37
- }
38
-
39
- get(providerId?: string): IPhotoRestoreProvider | null {
40
- const id = providerId || this.defaultProviderId;
41
- if (!id) return this.getHighestPriority();
42
-
43
- const entry = this.providers.get(id);
44
- return entry?.provider || null;
45
- }
46
-
47
- getAvailable(): IPhotoRestoreProvider | null {
48
- const sorted = this.getSortedProviders();
49
- return sorted.find((p) => p.isAvailable()) || null;
50
- }
51
-
52
- hasProvider(providerId: string): boolean {
53
- return this.providers.has(providerId);
54
- }
55
-
56
- getProviderIds(): string[] {
57
- return Array.from(this.providers.keys());
58
- }
59
-
60
- private getHighestPriority(): IPhotoRestoreProvider | null {
61
- const sorted = this.getSortedProviders();
62
- return sorted[0] || null;
63
- }
64
-
65
- private getSortedProviders(): IPhotoRestoreProvider[] {
66
- return Array.from(this.providers.values())
67
- .sort((a, b) => b.priority - a.priority)
68
- .map((entry) => entry.provider);
69
- }
70
-
71
- reset(): void {
72
- this.providers.clear();
73
- this.defaultProviderId = null;
74
- }
75
- }
76
-
77
- export const photoRestoreProviderRegistry = new PhotoRestoreProviderRegistry();
@@ -1,58 +0,0 @@
1
- /**
2
- * Text-to-Image Domain Entities
3
- */
4
-
5
- export interface TextToImageConfig {
6
- /**
7
- * Width of the generated image
8
- * @default 1024
9
- */
10
- width?: number;
11
-
12
- /**
13
- * Height of the generated image
14
- * @default 1024
15
- */
16
- height?: number;
17
-
18
- /**
19
- * Number of inference steps
20
- * @default 30
21
- */
22
- steps?: number;
23
-
24
- /**
25
- * Guidance scale
26
- * @default 7.5
27
- */
28
- guidanceScale?: number;
29
- }
30
-
31
- export interface TextToImageRequest {
32
- /**
33
- * The description of the image to generate
34
- */
35
- prompt: string;
36
-
37
- /**
38
- * Negative prompt for what to avoid
39
- */
40
- negativePrompt?: string;
41
-
42
- /**
43
- * Optional configuration
44
- */
45
- options?: TextToImageConfig;
46
- }
47
-
48
- export interface TextToImageResult {
49
- /**
50
- * The generated image URL or Base64
51
- */
52
- imageUrl: string;
53
-
54
- /**
55
- * Metadata about the generation
56
- */
57
- metadata?: Record<string, unknown>;
58
- }
@@ -1,52 +0,0 @@
1
- /**
2
- * Text to Video Domain Entities
3
- */
4
-
5
- export interface TextToVideoConfig {
6
- /**
7
- * Duration of the video in seconds
8
- * @default 4
9
- */
10
- duration?: number;
11
-
12
- /**
13
- * FPS of the generated video
14
- * @default 24
15
- */
16
- fps?: number;
17
-
18
- /**
19
- * Guidance scale
20
- * @default 7.5
21
- */
22
- guidanceScale?: number;
23
- }
24
-
25
- export interface TextToVideoRequest {
26
- /**
27
- * The text prompt to generate video from
28
- */
29
- prompt: string;
30
-
31
- /**
32
- * Negative prompt
33
- */
34
- negativePrompt?: string;
35
-
36
- /**
37
- * Optional configuration
38
- */
39
- options?: TextToVideoConfig;
40
- }
41
-
42
- export interface TextToVideoResult {
43
- /**
44
- * The generated video URL
45
- */
46
- videoUrl: string;
47
-
48
- /**
49
- * Metadata about the generation
50
- */
51
- metadata?: Record<string, unknown>;
52
- }
@@ -1,23 +0,0 @@
1
- /**
2
- * Upscale Provider Types
3
- * Interface for provider implementations
4
- */
5
-
6
- import type { UpscaleRequest, UpscaleResult } from "./upscale.types";
7
-
8
- export interface IUpscaleProvider {
9
- readonly providerId: string;
10
- readonly providerName: string;
11
-
12
- isAvailable(): boolean;
13
-
14
- upscale(
15
- request: UpscaleRequest,
16
- onProgress?: (progress: number) => void,
17
- ): Promise<UpscaleResult>;
18
- }
19
-
20
- export interface UpscaleProviderEntry {
21
- provider: IUpscaleProvider;
22
- priority: number;
23
- }
@@ -1,77 +0,0 @@
1
- /**
2
- * Upscale Provider Registry
3
- * Manages registered upscale providers
4
- */
5
-
6
- import type {
7
- IUpscaleProvider,
8
- UpscaleProviderEntry,
9
- } from "../../domain/types";
10
-
11
- declare const __DEV__: boolean;
12
-
13
- class UpscaleProviderRegistry {
14
- private providers: Map<string, UpscaleProviderEntry> = new Map();
15
- private defaultProviderId: string | null = null;
16
-
17
- register(provider: IUpscaleProvider, priority = 0): void {
18
- this.providers.set(provider.providerId, { provider, priority });
19
-
20
- if (__DEV__) {
21
- // eslint-disable-next-line no-console
22
- console.log(
23
- `[UpscaleRegistry] Registered provider: ${provider.providerId}`,
24
- );
25
- }
26
- }
27
-
28
- unregister(providerId: string): void {
29
- this.providers.delete(providerId);
30
- }
31
-
32
- setDefault(providerId: string): void {
33
- if (!this.providers.has(providerId)) {
34
- throw new Error(`Provider ${providerId} not registered`);
35
- }
36
- this.defaultProviderId = providerId;
37
- }
38
-
39
- get(providerId?: string): IUpscaleProvider | null {
40
- const id = providerId || this.defaultProviderId;
41
- if (!id) return this.getHighestPriority();
42
-
43
- const entry = this.providers.get(id);
44
- return entry?.provider || null;
45
- }
46
-
47
- getAvailable(): IUpscaleProvider | null {
48
- const sorted = this.getSortedProviders();
49
- return sorted.find((p) => p.isAvailable()) || null;
50
- }
51
-
52
- hasProvider(providerId: string): boolean {
53
- return this.providers.has(providerId);
54
- }
55
-
56
- getProviderIds(): string[] {
57
- return Array.from(this.providers.keys());
58
- }
59
-
60
- private getHighestPriority(): IUpscaleProvider | null {
61
- const sorted = this.getSortedProviders();
62
- return sorted[0] || null;
63
- }
64
-
65
- private getSortedProviders(): IUpscaleProvider[] {
66
- return Array.from(this.providers.values())
67
- .sort((a, b) => b.priority - a.priority)
68
- .map((entry) => entry.provider);
69
- }
70
-
71
- reset(): void {
72
- this.providers.clear();
73
- this.defaultProviderId = null;
74
- }
75
- }
76
-
77
- export const upscaleProviderRegistry = new UpscaleProviderRegistry();