@umituz/react-native-ai-generation-content 1.12.29 → 1.12.31

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-generation-content",
3
- "version": "1.12.29",
3
+ "version": "1.12.31",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Default Image Processing Modes
3
+ * Pre-configured modes for common image processing tasks
4
+ * Apps can use these defaults or provide their own configurations
5
+ */
6
+
7
+ import type { ImageProcessingMode, ModeCatalog, ModeConfig } from "../entities/processing-modes.types";
8
+
9
+ export const DEFAULT_PROCESSING_MODES: ModeCatalog = {
10
+ clean_white: {
11
+ id: "clean_white",
12
+ icon: "square",
13
+ cost: 1,
14
+ premium: false,
15
+ requiresPrompt: false,
16
+ aiPrompt: `Replace the background with a clean, pure white background.
17
+ Keep the subject perfectly intact with professional edges.
18
+ Add subtle shadows beneath the subject for a grounded look.
19
+ This should look like a professional product or portrait photo.`,
20
+ },
21
+ portrait_blur: {
22
+ id: "portrait_blur",
23
+ icon: "person",
24
+ cost: 1,
25
+ premium: false,
26
+ requiresPrompt: false,
27
+ aiPrompt: `Create a professional portrait with a beautifully blurred background (bokeh effect).
28
+ Keep the subject in sharp focus with clean edges.
29
+ The background should have a soft, creamy blur similar to f/1.4 depth of field.
30
+ Maintain natural skin tones and lighting on the subject.`,
31
+ },
32
+ creative_scene: {
33
+ id: "creative_scene",
34
+ icon: "image",
35
+ cost: 2,
36
+ premium: false,
37
+ requiresPrompt: true,
38
+ aiPrompt: `Transform this image by placing the subject in a new creative scene.
39
+ The subject must remain completely unchanged - same pose, expression, clothing.
40
+ Seamlessly blend the subject into the new background with matched lighting.
41
+ Create a professional, realistic composite that looks natural.`,
42
+ },
43
+ transparent: {
44
+ id: "transparent",
45
+ icon: "remove-circle",
46
+ cost: 1,
47
+ premium: false,
48
+ requiresPrompt: false,
49
+ aiPrompt: `Remove the background completely from this image.
50
+ Keep the main subject perfectly intact with clean edges.
51
+ Output should have a transparent or solid white background.
52
+ Maintain all original details, colors, and lighting on the subject.`,
53
+ },
54
+ enhance: {
55
+ id: "enhance",
56
+ icon: "sparkles",
57
+ cost: 2,
58
+ premium: false,
59
+ requiresPrompt: false,
60
+ aiPrompt: `Enhance this image with professional quality improvements.
61
+ Improve lighting, color balance, and overall image quality.
62
+ Remove any imperfections while maintaining natural appearance.
63
+ The result should look professionally retouched but realistic.`,
64
+ },
65
+ remove_object: {
66
+ id: "remove_object",
67
+ icon: "trash",
68
+ cost: 2,
69
+ premium: true,
70
+ requiresPrompt: true,
71
+ aiPrompt: `Remove unwanted objects from this image.
72
+ Fill the removed areas with appropriate background content.
73
+ The result should look natural with no visible artifacts.
74
+ Maintain the overall composition and quality of the image.`,
75
+ },
76
+ replace_object: {
77
+ id: "replace_object",
78
+ icon: "swap-horizontal",
79
+ cost: 3,
80
+ premium: true,
81
+ requiresPrompt: true,
82
+ aiPrompt: `Replace the specified object in this image with a new one.
83
+ The replacement should blend naturally with the scene.
84
+ Match the lighting, perspective, and style of the original.
85
+ Ensure the result looks realistic and professionally edited.`,
86
+ },
87
+ relight: {
88
+ id: "relight",
89
+ icon: "sunny",
90
+ cost: 2,
91
+ premium: true,
92
+ requiresPrompt: true,
93
+ aiPrompt: `Relight this image with professional studio lighting.
94
+ Apply dramatic, flattering light that enhances the subject.
95
+ Add subtle shadows and highlights for depth and dimension.
96
+ The result should look like a professional studio photograph.`,
97
+ },
98
+ };
99
+
100
+ /**
101
+ * Get mode configuration by ID
102
+ * Returns default transparent mode if not found
103
+ */
104
+ export const getModeConfig = (
105
+ mode: string,
106
+ customModes?: ModeCatalog
107
+ ): ModeConfig => {
108
+ const modes = customModes || DEFAULT_PROCESSING_MODES;
109
+ const key = mode.replace("-", "_") as ImageProcessingMode;
110
+ return modes[key] || DEFAULT_PROCESSING_MODES.transparent;
111
+ };
112
+
113
+ /**
114
+ * Filter modes by premium status
115
+ */
116
+ export const getFreeModes = (modes: ModeCatalog = DEFAULT_PROCESSING_MODES): ModeCatalog => {
117
+ return Object.fromEntries(
118
+ Object.entries(modes).filter(([, config]) => !config.premium)
119
+ );
120
+ };
121
+
122
+ /**
123
+ * Filter modes by premium status
124
+ */
125
+ export const getPremiumModes = (modes: ModeCatalog = DEFAULT_PROCESSING_MODES): ModeCatalog => {
126
+ return Object.fromEntries(
127
+ Object.entries(modes).filter(([, config]) => config.premium)
128
+ );
129
+ };
130
+
131
+ /**
132
+ * Get modes that require custom prompts
133
+ */
134
+ export const getPromptRequiredModes = (modes: ModeCatalog = DEFAULT_PROCESSING_MODES): ModeCatalog => {
135
+ return Object.fromEntries(
136
+ Object.entries(modes).filter(([, config]) => config.requiresPrompt)
137
+ );
138
+ };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Image Processing Mode Types
3
+ * Generic types for image processing modes across apps
4
+ */
5
+
6
+ export type ImageProcessingMode =
7
+ | "clean_white"
8
+ | "portrait_blur"
9
+ | "creative_scene"
10
+ | "transparent"
11
+ | "enhance"
12
+ | "remove_object"
13
+ | "replace_object"
14
+ | "relight";
15
+
16
+ export interface ModeConfig {
17
+ readonly id: string;
18
+ readonly icon: string;
19
+ readonly cost: number;
20
+ readonly premium: boolean;
21
+ readonly requiresPrompt: boolean;
22
+ readonly aiPrompt: string;
23
+ }
24
+
25
+ export interface ModeCatalog {
26
+ readonly [key: string]: ModeConfig;
27
+ }
package/src/index.ts CHANGED
@@ -60,6 +60,24 @@ export type {
60
60
 
61
61
  export { DEFAULT_POLLING_CONFIG, DEFAULT_PROGRESS_STAGES, DEFAULT_QUEUE_CONFIG } from "./domain/entities";
62
62
 
63
+ // =============================================================================
64
+ // DOMAIN LAYER - Processing Modes
65
+ // =============================================================================
66
+
67
+ export type {
68
+ ImageProcessingMode,
69
+ ModeConfig,
70
+ ModeCatalog,
71
+ } from "./domain/entities/processing-modes.types";
72
+
73
+ export {
74
+ DEFAULT_PROCESSING_MODES,
75
+ getModeConfig,
76
+ getFreeModes,
77
+ getPremiumModes,
78
+ getPromptRequiredModes,
79
+ } from "./domain/constants/processing-modes.constants";
80
+
63
81
  // =============================================================================
64
82
  // INFRASTRUCTURE LAYER - Services
65
83
  // =============================================================================