@umituz/react-native-ai-generation-content 1.27.6 → 1.27.8

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.27.6",
3
+ "version": "1.27.8",
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,10 +1,13 @@
1
1
  /**
2
2
  * Scenario validation utility
3
3
  * Validates that scenario has required fields for wizard generation
4
+ * NOTE: aiPrompt is optional - can come from wizard data (text_input step)
4
5
  */
5
6
 
6
7
  import type { WizardScenarioData } from "../hooks/useWizardGeneration";
7
8
 
9
+ declare const __DEV__: boolean;
10
+
8
11
  export interface ScenarioValidationResult {
9
12
  isValid: boolean;
10
13
  error?: string;
@@ -13,6 +16,7 @@ export interface ScenarioValidationResult {
13
16
 
14
17
  /**
15
18
  * Validates scenario data for wizard generation
19
+ * aiPrompt is optional - for TEXT_INPUT scenarios, prompt comes from wizard data
16
20
  * @throws Error if scenario is invalid
17
21
  */
18
22
  export const validateScenario = (
@@ -23,8 +27,6 @@ export const validateScenario = (
23
27
  hasScenario: !!scenario,
24
28
  scenarioId: scenario?.id,
25
29
  hasAiPrompt: !!scenario?.aiPrompt,
26
- aiPromptLength: scenario?.aiPrompt?.length,
27
- hasModel: !!scenario?.model,
28
30
  outputType: scenario?.outputType,
29
31
  });
30
32
  }
@@ -33,22 +35,12 @@ export const validateScenario = (
33
35
  throw new Error("[validateScenario] Scenario is required");
34
36
  }
35
37
 
36
- if (!scenario.aiPrompt || scenario.aiPrompt.trim() === "") {
37
- if (typeof __DEV__ !== "undefined" && __DEV__) {
38
- console.error("[validateScenario] CRITICAL: Scenario missing aiPrompt!", {
39
- scenarioId: scenario.id,
40
- aiPrompt: scenario.aiPrompt,
41
- });
42
- }
43
- throw new Error(`[validateScenario] Scenario "${scenario.id}" must have aiPrompt field`);
44
- }
45
-
38
+ // aiPrompt is optional - for TEXT_INPUT scenarios, prompt comes from wizard data
46
39
  if (typeof __DEV__ !== "undefined" && __DEV__) {
47
40
  console.log("[validateScenario] Validation passed", {
48
41
  scenarioId: scenario.id,
49
- model: scenario.model,
50
42
  outputType: scenario.outputType,
51
- promptLength: scenario.aiPrompt.length,
43
+ hasPrompt: !!scenario.aiPrompt,
52
44
  });
53
45
  }
54
46
 
@@ -1,138 +1,104 @@
1
1
  /**
2
- * Wizard Configurations for ALL Scenarios
3
- * Auto-detects feature type and generates appropriate config
4
- * Supports overrides for customization
2
+ * Wizard Configurations - App-Agnostic
3
+ * Classifies features by INPUT REQUIREMENTS, not app-specific scenarios
4
+ * Apps can override inputType or provide custom step configurations
5
5
  */
6
6
 
7
7
  import type { WizardFeatureConfig } from "../../generation/wizard/domain/entities/wizard-config.types";
8
8
 
9
+ declare const __DEV__: boolean;
10
+
9
11
  /**
10
- * Feature Type Classification
11
- * Determines wizard flow based on scenario characteristics
12
+ * Input Type Classification
13
+ * Based on what inputs the wizard needs (photos, text)
14
+ * NOT based on app-specific scenario names
12
15
  */
13
- export enum FeatureType {
14
- COUPLE = "couple", // 2 photos - romantic/partner scenarios
15
- SINGLE_PHOTO = "single_photo", // 1 photo - editing/transformation
16
- FACE_SWAP = "face_swap", // 2 photos - face replacement
17
- TEXT_BASED = "text_based", // 0 photos - text-to-media
16
+ export enum WizardInputType {
17
+ /** Two images required (any two-person/two-image scenario) */
18
+ DUAL_IMAGE = "dual_image",
19
+ /** Single image required */
20
+ SINGLE_IMAGE = "single_image",
21
+ /** Text input only, no images */
22
+ TEXT_INPUT = "text_input",
23
+ /** Two images with face detection (face swap scenarios) */
24
+ DUAL_IMAGE_FACE = "dual_image_face",
18
25
  }
19
26
 
27
+ /** @deprecated Use WizardInputType instead */
28
+ export const FeatureType = WizardInputType;
29
+
20
30
  /**
21
- * Feature Detection Patterns
22
- * Regex patterns to auto-detect feature type from scenario ID
31
+ * Generic Input Detection Patterns
32
+ * Only patterns that describe input/output, NOT app-specific scenarios
23
33
  */
24
- const FEATURE_PATTERNS: Record<FeatureType, RegExp[]> = {
25
- [FeatureType.COUPLE]: [
26
- /kiss/i, // romantic-kiss, ai-kiss, first-kiss, etc.
27
- /hug/i, // ai-hug, back-hug, bear-hug, etc.
28
- /couple/i, // couple-future, couple-ai-baby
29
- /partner/i, // partner scenarios
30
- /wedding/i, // wedding scenarios
31
- /anniversary/i,
32
- /dance/i, // first-dance, etc.
33
- /together/i,
34
- /embrace/i,
35
- /romance/i,
36
- /love/i,
37
- /relationship/i,
38
- /years/i, // 5-years, 10-years (couple-future)
39
- /age/i, // old-age (couple-future)
40
- /future.*child/i, // future-child
41
- /parenthood/i,
42
- /proposal/i,
43
- /engagement/i,
34
+ const INPUT_PATTERNS: Record<WizardInputType, RegExp[]> = {
35
+ [WizardInputType.DUAL_IMAGE]: [
36
+ // Empty - app must specify explicitly for dual image scenarios
37
+ // This prevents accidental matches with app-specific terms
44
38
  ],
45
39
 
46
- [FeatureType.SINGLE_PHOTO]: [
47
- /background.*remove/i,
48
- /remove.*background/i,
49
- /photo.*restore/i,
50
- /restore.*photo/i,
40
+ [WizardInputType.SINGLE_IMAGE]: [
41
+ /^image-to-video$/i,
51
42
  /upscale/i,
52
- /hd.*touch/i,
53
- /touch.*up/i,
43
+ /restore/i,
54
44
  /enhance/i,
55
- /anime.*selfie/i,
56
- /selfie.*anime/i,
57
- /image.*to.*video/i,
58
- /remove.*object/i,
59
- /object.*remove/i,
45
+ /remove-background/i,
46
+ /background-remove/i,
47
+ /remove-object/i,
48
+ /hd-touch/i,
49
+ /anime-selfie/i,
60
50
  ],
61
51
 
62
- [FeatureType.TEXT_BASED]: [
63
- /text.*to.*video/i,
64
- /text.*to.*image/i,
65
- /prompt.*to/i,
52
+ [WizardInputType.TEXT_INPUT]: [
53
+ /^text-to-video$/i,
54
+ /^text-to-image$/i,
55
+ /prompt-to/i,
66
56
  ],
67
57
 
68
- [FeatureType.FACE_SWAP]: [
69
- /face.*swap/i,
70
- /swap.*face/i,
58
+ [WizardInputType.DUAL_IMAGE_FACE]: [
59
+ /face-swap/i,
60
+ /swap-face/i,
71
61
  ],
72
62
  };
73
63
 
74
64
  /**
75
- * Detect feature type from scenario ID
65
+ * Detect input type from scenario ID
66
+ * Only matches generic I/O patterns
67
+ * Returns SINGLE_IMAGE as safe default
76
68
  */
77
- export const detectFeatureType = (scenarioId: string): FeatureType => {
78
- for (const [type, patterns] of Object.entries(FEATURE_PATTERNS)) {
69
+ export const detectWizardInputType = (scenarioId: string): WizardInputType => {
70
+ // Check patterns in priority order: TEXT_INPUT, SINGLE_IMAGE, DUAL_IMAGE_FACE
71
+ // DUAL_IMAGE has no patterns - must be explicitly specified
72
+ const checkOrder: WizardInputType[] = [
73
+ WizardInputType.TEXT_INPUT,
74
+ WizardInputType.DUAL_IMAGE_FACE,
75
+ WizardInputType.SINGLE_IMAGE,
76
+ ];
77
+
78
+ for (const type of checkOrder) {
79
+ const patterns = INPUT_PATTERNS[type];
79
80
  if (patterns.some((pattern) => pattern.test(scenarioId))) {
80
- return type as FeatureType;
81
+ return type;
81
82
  }
82
83
  }
83
- // Default: COUPLE (most common in AI video generation apps)
84
- return FeatureType.COUPLE;
85
- };
86
-
87
- /**
88
- * Romantic Mood Options for Couple Scenarios
89
- */
90
- const ROMANTIC_MOOD_OPTIONS = [
91
- { id: "romantic", label: "Romantic", icon: "❤️", value: "romantic" },
92
- { id: "mysterious", label: "Mysterious", icon: "🌙", value: "mysterious" },
93
- { id: "magical", label: "Magical", icon: "✨", value: "magical" },
94
- { id: "energetic", label: "Energetic", icon: "⚡", value: "energetic" },
95
- { id: "melancholic", label: "Melancholic", icon: "☁️", value: "melancholic" },
96
- { id: "passionate", label: "Passionate", icon: "🔥", value: "passionate" },
97
- { id: "nostalgic", label: "Nostalgic", icon: "📷", value: "nostalgic" },
98
- { id: "futuristic", label: "Futuristic", icon: "🚀", value: "futuristic" },
99
- ];
100
-
101
- /**
102
- * Art Style Options for Couple Scenarios
103
- */
104
- const ART_STYLE_OPTIONS = [
105
- { id: "original", label: "Original", icon: "🖼️", value: "original" },
106
- { id: "cubism", label: "Cubism", icon: "🔷", value: "cubism" },
107
- { id: "popArt", label: "Pop Art", icon: "🎨", value: "pop_art" },
108
- { id: "impressionism", label: "Impressionism", icon: "🖌️", value: "impressionism" },
109
- { id: "surrealism", label: "Surrealism", icon: "👁️", value: "surrealism" },
110
- { id: "renaissance", label: "Renaissance", icon: "🎭", value: "renaissance" },
111
- ];
112
84
 
113
- /**
114
- * Artist Style Options for Couple Scenarios
115
- */
116
- const ARTIST_STYLE_OPTIONS = [
117
- { id: "vanGogh", label: "Van Gogh", icon: "🖌️", value: "van_gogh" },
118
- { id: "picasso", label: "Picasso", icon: "🔷", value: "picasso" },
119
- { id: "fridaKahlo", label: "Frida Kahlo", icon: "🌺", value: "frida_kahlo" },
120
- { id: "daVinci", label: "Da Vinci", icon: "🎨", value: "da_vinci" },
121
- ];
85
+ // Safe default: SINGLE_IMAGE (most common use case)
86
+ return WizardInputType.SINGLE_IMAGE;
87
+ };
122
88
 
123
89
  /**
124
- * Config Factory for COUPLE features (2 photos + style selections)
125
- * Generic sequential labels for two-person scenarios
90
+ * Config Factory: DUAL_IMAGE (2 photos required)
91
+ * Generic labels - apps provide translations
126
92
  */
127
- const createCoupleConfig = (scenarioId: string): WizardFeatureConfig => ({
93
+ const createDualImageConfig = (scenarioId: string): WizardFeatureConfig => ({
128
94
  id: scenarioId,
129
95
  name: scenarioId,
130
96
  steps: [
131
97
  {
132
98
  id: "photo_1",
133
99
  type: "photo_upload",
134
- titleKey: "photoUpload.couple.step1.title",
135
- subtitleKey: "photoUpload.couple.step1.subtitle",
100
+ titleKey: "photoUpload.first.title",
101
+ subtitleKey: "photoUpload.first.subtitle",
136
102
  showFaceDetection: true,
137
103
  showPhotoTips: true,
138
104
  required: true,
@@ -140,50 +106,19 @@ const createCoupleConfig = (scenarioId: string): WizardFeatureConfig => ({
140
106
  {
141
107
  id: "photo_2",
142
108
  type: "photo_upload",
143
- titleKey: "photoUpload.couple.step2.title",
144
- subtitleKey: "photoUpload.couple.step2.subtitle",
109
+ titleKey: "photoUpload.second.title",
110
+ subtitleKey: "photoUpload.second.subtitle",
145
111
  showFaceDetection: true,
146
112
  showPhotoTips: true,
147
113
  required: true,
148
114
  },
149
- {
150
- id: "romantic_mood",
151
- type: "selection",
152
- selectionType: "custom",
153
- titleKey: "selection.romanticMood.title",
154
- subtitleKey: "selection.romanticMood.subtitle",
155
- options: ROMANTIC_MOOD_OPTIONS,
156
- multiSelect: true,
157
- required: false,
158
- },
159
- {
160
- id: "art_style",
161
- type: "selection",
162
- selectionType: "style",
163
- titleKey: "selection.artStyle.title",
164
- subtitleKey: "selection.artStyle.subtitle",
165
- options: ART_STYLE_OPTIONS,
166
- multiSelect: false,
167
- required: false,
168
- },
169
- {
170
- id: "artist_style",
171
- type: "selection",
172
- selectionType: "custom",
173
- titleKey: "selection.artistStyle.title",
174
- subtitleKey: "selection.artistStyle.subtitle",
175
- options: ARTIST_STYLE_OPTIONS,
176
- multiSelect: false,
177
- required: false,
178
- },
179
115
  ],
180
116
  });
181
117
 
182
118
  /**
183
- * Config Factory for SINGLE_PHOTO features (1 photo)
184
- * Generic single photo step - label comes from translation
119
+ * Config Factory: SINGLE_IMAGE (1 photo required)
185
120
  */
186
- const createSinglePhotoConfig = (scenarioId: string): WizardFeatureConfig => ({
121
+ const createSingleImageConfig = (scenarioId: string): WizardFeatureConfig => ({
187
122
  id: scenarioId,
188
123
  name: scenarioId,
189
124
  steps: [
@@ -200,9 +135,9 @@ const createSinglePhotoConfig = (scenarioId: string): WizardFeatureConfig => ({
200
135
  });
201
136
 
202
137
  /**
203
- * Config Factory for TEXT_BASED features (0 photos, text input)
138
+ * Config Factory: TEXT_INPUT (text only, no photos)
204
139
  */
205
- const createTextBasedConfig = (scenarioId: string): WizardFeatureConfig => ({
140
+ const createTextInputConfig = (scenarioId: string): WizardFeatureConfig => ({
206
141
  id: scenarioId,
207
142
  name: scenarioId,
208
143
  steps: [
@@ -217,31 +152,21 @@ const createTextBasedConfig = (scenarioId: string): WizardFeatureConfig => ({
217
152
  multiline: true,
218
153
  required: true,
219
154
  },
220
- {
221
- id: "style_selection",
222
- type: "selection",
223
- selectionType: "style",
224
- titleKey: "styleSelection.title",
225
- subtitleKey: "styleSelection.subtitle",
226
- options: [], // Provided by app/feature
227
- required: false,
228
- },
229
155
  ],
230
156
  });
231
157
 
232
158
  /**
233
- * Config Factory for FACE_SWAP features (2 photos)
234
- * Specific labels for face replacement scenarios
159
+ * Config Factory: DUAL_IMAGE_FACE (2 photos with face detection)
235
160
  */
236
- const createFaceSwapConfig = (scenarioId: string): WizardFeatureConfig => ({
161
+ const createDualImageFaceConfig = (scenarioId: string): WizardFeatureConfig => ({
237
162
  id: scenarioId,
238
163
  name: scenarioId,
239
164
  steps: [
240
165
  {
241
166
  id: "photo_1",
242
167
  type: "photo_upload",
243
- titleKey: "photoUpload.faceSwap.step1.title",
244
- subtitleKey: "photoUpload.faceSwap.step1.subtitle",
168
+ titleKey: "photoUpload.source.title",
169
+ subtitleKey: "photoUpload.source.subtitle",
245
170
  showFaceDetection: true,
246
171
  showPhotoTips: true,
247
172
  required: true,
@@ -249,8 +174,8 @@ const createFaceSwapConfig = (scenarioId: string): WizardFeatureConfig => ({
249
174
  {
250
175
  id: "photo_2",
251
176
  type: "photo_upload",
252
- titleKey: "photoUpload.faceSwap.step2.title",
253
- subtitleKey: "photoUpload.faceSwap.step2.subtitle",
177
+ titleKey: "photoUpload.target.title",
178
+ subtitleKey: "photoUpload.target.subtitle",
254
179
  showFaceDetection: false,
255
180
  showPhotoTips: true,
256
181
  required: true,
@@ -261,36 +186,27 @@ const createFaceSwapConfig = (scenarioId: string): WizardFeatureConfig => ({
261
186
  /**
262
187
  * Config Factories Registry
263
188
  */
264
- const FEATURE_CONFIG_FACTORIES: Record<FeatureType, (id: string) => WizardFeatureConfig> = {
265
- [FeatureType.COUPLE]: createCoupleConfig,
266
- [FeatureType.SINGLE_PHOTO]: createSinglePhotoConfig,
267
- [FeatureType.TEXT_BASED]: createTextBasedConfig,
268
- [FeatureType.FACE_SWAP]: createFaceSwapConfig,
189
+ const CONFIG_FACTORIES: Record<WizardInputType, (id: string) => WizardFeatureConfig> = {
190
+ [WizardInputType.DUAL_IMAGE]: createDualImageConfig,
191
+ [WizardInputType.SINGLE_IMAGE]: createSingleImageConfig,
192
+ [WizardInputType.TEXT_INPUT]: createTextInputConfig,
193
+ [WizardInputType.DUAL_IMAGE_FACE]: createDualImageFaceConfig,
269
194
  };
270
195
 
271
196
  /**
272
197
  * Explicit Wizard Configs (Optional)
273
- * Define specific configs for scenarios that need custom flows
274
- * Most scenarios will use auto-generated configs from factories
198
+ * Apps can register custom configs for specific scenario IDs
275
199
  */
276
- export const SCENARIO_WIZARD_CONFIGS: Record<string, WizardFeatureConfig> = {
277
- // Add custom configs here only if needed
278
- // Example:
279
- // "special-scenario": {
280
- // id: "special-scenario",
281
- // steps: [...custom steps]
282
- // }
283
- };
200
+ export const SCENARIO_WIZARD_CONFIGS: Record<string, WizardFeatureConfig> = {};
284
201
 
285
202
  /**
286
- * Merge config overrides
203
+ * Merge config with overrides
287
204
  */
288
205
  const mergeConfigOverrides = (
289
206
  config: WizardFeatureConfig,
290
207
  overrides?: Partial<WizardFeatureConfig>,
291
208
  ): WizardFeatureConfig => {
292
209
  if (!overrides) return config;
293
-
294
210
  return {
295
211
  ...config,
296
212
  ...overrides,
@@ -299,81 +215,97 @@ const mergeConfigOverrides = (
299
215
  };
300
216
 
301
217
  /**
302
- * Apply configuration options to filter/modify steps
303
- */
304
- const applyConfigOptions = (
305
- config: WizardFeatureConfig,
306
- options?: WizardConfigOptions,
307
- ): WizardFeatureConfig => {
308
- if (!options) return config;
309
-
310
- let steps = [...config.steps];
311
-
312
- // Filter out style selection steps if disabled
313
- if (options.disableStyleSelections) {
314
- const styleStepIds = ["romantic_mood", "art_style", "artist_style"];
315
- steps = steps.filter((step) => !styleStepIds.includes(step.id));
316
-
317
- if (typeof __DEV__ !== "undefined" && __DEV__) {
318
- console.log("[WizardConfig] Style selections disabled", {
319
- filteredStepIds: styleStepIds,
320
- remainingSteps: steps.map((s) => s.id),
321
- });
322
- }
323
- }
324
-
325
- return {
326
- ...config,
327
- steps,
328
- };
329
- };
330
-
331
- /**
332
- * Configuration Options for Wizard Behavior
218
+ * Configuration Options
333
219
  */
334
220
  export interface WizardConfigOptions {
335
- readonly disableStyleSelections?: boolean; // Disable romantic mood, art style, artist style
221
+ /** Explicit input type - highest priority */
222
+ readonly inputType?: WizardInputType;
223
+ /** Additional steps to append */
224
+ readonly additionalSteps?: WizardFeatureConfig["steps"];
225
+ /** Custom overrides */
226
+ readonly overrides?: Partial<WizardFeatureConfig>;
336
227
  }
337
228
 
338
229
  /**
339
230
  * Get wizard config for a scenario
340
- * 1. Check for explicit config in SCENARIO_WIZARD_CONFIGS
341
- * 2. Auto-detect feature type and generate config
342
- * 3. Apply overrides if provided
343
- * 4. Apply options to disable certain steps
344
231
  *
345
- * This means ALL scenarios work automatically!
232
+ * Priority:
233
+ * 1. Explicit inputType in options (highest)
234
+ * 2. Explicit config in SCENARIO_WIZARD_CONFIGS
235
+ * 3. Auto-detect from scenario ID patterns
236
+ *
237
+ * @example
238
+ * // Auto-detect from ID
239
+ * getScenarioWizardConfig("text-to-video")
240
+ *
241
+ * // Explicit input type for app-specific scenarios
242
+ * getScenarioWizardConfig("ai-kiss", { inputType: WizardInputType.DUAL_IMAGE })
346
243
  */
347
244
  export const getScenarioWizardConfig = (
348
245
  scenarioId: string,
349
246
  options?: WizardConfigOptions,
350
- overrides?: Partial<WizardFeatureConfig>,
351
247
  ): WizardFeatureConfig => {
352
- // 1. Explicit config (highest priority)
248
+ // 1. Explicit inputType (highest priority)
249
+ if (options?.inputType) {
250
+ const factory = CONFIG_FACTORIES[options.inputType];
251
+ let config = factory(scenarioId);
252
+ config = mergeConfigOverrides(config, options.overrides);
253
+
254
+ if (options.additionalSteps) {
255
+ config = { ...config, steps: [...config.steps, ...options.additionalSteps] };
256
+ }
257
+
258
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
259
+ console.log("[WizardConfig] Using explicit inputType", {
260
+ scenarioId,
261
+ inputType: options.inputType,
262
+ });
263
+ }
264
+
265
+ return config;
266
+ }
267
+
268
+ // 2. Explicit config in registry
353
269
  if (SCENARIO_WIZARD_CONFIGS[scenarioId]) {
354
- const config = mergeConfigOverrides(SCENARIO_WIZARD_CONFIGS[scenarioId], overrides);
355
- return applyConfigOptions(config, options);
270
+ let config = SCENARIO_WIZARD_CONFIGS[scenarioId];
271
+ config = mergeConfigOverrides(config, options?.overrides);
272
+
273
+ if (options?.additionalSteps) {
274
+ config = { ...config, steps: [...config.steps, ...options.additionalSteps] };
275
+ }
276
+
277
+ return config;
356
278
  }
357
279
 
358
- // 2. Auto-detect feature type
359
- const featureType = detectFeatureType(scenarioId);
280
+ // 3. Auto-detect from scenario ID
281
+ const inputType = detectWizardInputType(scenarioId);
360
282
 
361
283
  if (typeof __DEV__ !== "undefined" && __DEV__) {
362
- console.log("[WizardConfig] Auto-detected feature type", {
284
+ console.log("[WizardConfig] Auto-detected inputType", {
363
285
  scenarioId,
364
- featureType,
286
+ inputType,
365
287
  });
366
288
  }
367
289
 
368
- // 3. Generate config from factory
369
- const factory = FEATURE_CONFIG_FACTORIES[featureType];
370
- const config = factory(scenarioId);
290
+ const factory = CONFIG_FACTORIES[inputType];
291
+ let config = factory(scenarioId);
292
+ config = mergeConfigOverrides(config, options?.overrides);
371
293
 
372
- // 4. Apply overrides
373
- const configWithOverrides = mergeConfigOverrides(config, overrides);
294
+ if (options?.additionalSteps) {
295
+ config = { ...config, steps: [...config.steps, ...options.additionalSteps] };
296
+ }
374
297
 
375
- // 5. Apply options (disable steps)
376
- return applyConfigOptions(configWithOverrides, options);
298
+ return config;
299
+ };
300
+
301
+ /**
302
+ * Register a custom wizard config for a scenario
303
+ */
304
+ export const registerWizardConfig = (
305
+ scenarioId: string,
306
+ config: WizardFeatureConfig,
307
+ ): void => {
308
+ SCENARIO_WIZARD_CONFIGS[scenarioId] = config;
377
309
  };
378
310
 
379
311
  /**
@@ -384,8 +316,14 @@ export const hasExplicitConfig = (scenarioId: string): boolean => {
384
316
  };
385
317
 
386
318
  /**
387
- * Get feature type for a scenario
319
+ * Get input type for a scenario
388
320
  */
389
- export const getScenarioFeatureType = (scenarioId: string): FeatureType => {
390
- return detectFeatureType(scenarioId);
321
+ export const getScenarioWizardInputType = (scenarioId: string): WizardInputType => {
322
+ return detectWizardInputType(scenarioId);
391
323
  };
324
+
325
+ /** @deprecated Use getScenarioWizardInputType instead */
326
+ export const getScenarioFeatureType = getScenarioWizardInputType;
327
+
328
+ /** @deprecated Use detectWizardInputType instead */
329
+ export const detectFeatureType = detectWizardInputType;
@@ -14,13 +14,18 @@ export { SCENARIOS } from "./infrastructure/ScenariosData";
14
14
  // Utils
15
15
  export { createStoryTemplate } from "./infrastructure/utils/scenario-utils";
16
16
 
17
- // Wizard Configurations - Auto-detects feature type and generates config
17
+ // Wizard Configurations - App-agnostic, classifies by INPUT REQUIREMENTS
18
18
  export {
19
- FeatureType,
19
+ WizardInputType,
20
20
  SCENARIO_WIZARD_CONFIGS,
21
- detectFeatureType,
21
+ detectWizardInputType,
22
22
  getScenarioWizardConfig,
23
23
  hasExplicitConfig,
24
+ getScenarioWizardInputType,
25
+ registerWizardConfig,
26
+ // Deprecated (backward compatibility)
27
+ FeatureType,
28
+ detectFeatureType,
24
29
  getScenarioFeatureType,
25
30
  } from "./configs/wizard-configs";
26
31