@umituz/react-native-ai-generation-content 1.25.4 → 1.25.6

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.25.4",
3
+ "version": "1.25.6",
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",
@@ -86,15 +86,15 @@ export const detectFeatureType = (scenarioId: string): FeatureType => {
86
86
 
87
87
  /**
88
88
  * Config Factory for COUPLE features (2 photos)
89
+ * Generic numbered steps - labels come from translations
89
90
  */
90
91
  const createCoupleConfig = (scenarioId: string): WizardFeatureConfig => ({
91
92
  id: scenarioId,
92
93
  name: scenarioId,
93
94
  steps: [
94
95
  {
95
- id: "photo_a",
96
+ id: "photo_1",
96
97
  type: "photo_upload",
97
- label: "First Partner",
98
98
  titleKey: "photoUpload.step1.title",
99
99
  subtitleKey: "photoUpload.step1.subtitle",
100
100
  showFaceDetection: true,
@@ -102,9 +102,8 @@ const createCoupleConfig = (scenarioId: string): WizardFeatureConfig => ({
102
102
  required: true,
103
103
  },
104
104
  {
105
- id: "photo_b",
105
+ id: "photo_2",
106
106
  type: "photo_upload",
107
- label: "Second Partner",
108
107
  titleKey: "photoUpload.step2.title",
109
108
  subtitleKey: "photoUpload.step2.subtitle",
110
109
  showFaceDetection: true,
@@ -116,15 +115,15 @@ const createCoupleConfig = (scenarioId: string): WizardFeatureConfig => ({
116
115
 
117
116
  /**
118
117
  * Config Factory for SINGLE_PHOTO features (1 photo)
118
+ * Generic single photo step - label comes from translation
119
119
  */
120
120
  const createSinglePhotoConfig = (scenarioId: string): WizardFeatureConfig => ({
121
121
  id: scenarioId,
122
122
  name: scenarioId,
123
123
  steps: [
124
124
  {
125
- id: "photo",
125
+ id: "photo_1",
126
126
  type: "photo_upload",
127
- label: "Your Photo",
128
127
  titleKey: "photoUpload.single.title",
129
128
  subtitleKey: "photoUpload.single.subtitle",
130
129
  showFaceDetection: false,
@@ -166,15 +165,15 @@ const createTextBasedConfig = (scenarioId: string): WizardFeatureConfig => ({
166
165
 
167
166
  /**
168
167
  * Config Factory for FACE_SWAP features (2 photos, different context)
168
+ * Generic numbered steps - labels come from translations
169
169
  */
170
170
  const createFaceSwapConfig = (scenarioId: string): WizardFeatureConfig => ({
171
171
  id: scenarioId,
172
172
  name: scenarioId,
173
173
  steps: [
174
174
  {
175
- id: "source_photo",
175
+ id: "photo_1",
176
176
  type: "photo_upload",
177
- label: "Source Face",
178
177
  titleKey: "faceSwap.source.title",
179
178
  subtitleKey: "faceSwap.source.subtitle",
180
179
  showFaceDetection: true,
@@ -182,9 +181,8 @@ const createFaceSwapConfig = (scenarioId: string): WizardFeatureConfig => ({
182
181
  required: true,
183
182
  },
184
183
  {
185
- id: "target_photo",
184
+ id: "photo_2",
186
185
  type: "photo_upload",
187
- label: "Target Photo",
188
186
  titleKey: "faceSwap.target.title",
189
187
  subtitleKey: "faceSwap.target.subtitle",
190
188
  showFaceDetection: false,
@@ -26,7 +26,7 @@ export interface BaseStepConfig {
26
26
  */
27
27
  export interface PhotoUploadStepConfig extends BaseStepConfig {
28
28
  readonly type: "photo_upload";
29
- readonly label?: string; // "Partner A", "Your Photo", etc.
29
+ readonly label?: string; // "Photo 1", "Photo 2", "Your Photo", etc.
30
30
  readonly showFaceDetection?: boolean;
31
31
  readonly showNameInput?: boolean;
32
32
  readonly showPhotoTips?: boolean;
@@ -117,11 +117,12 @@ export const buildWizardConfigFromScenario = (
117
117
  ): WizardFeatureConfig => {
118
118
  const steps: WizardStepConfig[] = [];
119
119
 
120
- // Add photo upload steps (dynamic count!)
120
+ // Add photo upload steps (max 2 photos)
121
121
  if (config.photoCount && config.photoCount > 0) {
122
- for (let i = 0; i < config.photoCount; i++) {
122
+ const maxPhotos = Math.min(config.photoCount, 2); // Max 2 photos
123
+ for (let i = 0; i < maxPhotos; i++) {
123
124
  steps.push({
124
- id: `photo_${i}`,
125
+ id: `photo_${i + 1}`,
125
126
  type: "photo_upload",
126
127
  label: config.photoLabels?.[i] || `Photo ${i + 1}`,
127
128
  showFaceDetection: true,
@@ -182,18 +183,17 @@ export const buildWizardConfigFromScenario = (
182
183
 
183
184
  /**
184
185
  * Pre-configured scenarios for common use cases
186
+ * Labels should be provided from main app via photoLabels parameter
185
187
  */
186
188
  export const WIZARD_PRESETS = {
187
- // Couple/Partner features (2 photos)
188
- COUPLE: {
189
+ // Two photo features (couple, comparison, etc.)
190
+ TWO_PHOTOS: {
189
191
  photoCount: 2,
190
- photoLabels: ["First Partner", "Second Partner"],
191
192
  },
192
193
 
193
194
  // Single photo features
194
195
  SINGLE_PHOTO: {
195
196
  photoCount: 1,
196
- photoLabels: ["Your Photo"],
197
197
  requireStyleSelection: true,
198
198
  requireDurationSelection: true,
199
199
  },
@@ -205,10 +205,4 @@ export const WIZARD_PRESETS = {
205
205
  requireStyleSelection: true,
206
206
  requireDurationSelection: true,
207
207
  },
208
-
209
- // Face swap (2 photos, specific requirements)
210
- FACE_SWAP: {
211
- photoCount: 2,
212
- photoLabels: ["Source Face", "Target Face"],
213
- },
214
208
  } as const;