@umituz/react-native-ai-generation-content 1.17.51 → 1.17.54

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.17.51",
3
+ "version": "1.17.54",
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,86 @@
1
+ import React from "react";
2
+ import { StyleSelector } from "./selectors/StyleSelector";
3
+ import { DurationSelector } from "./selectors/DurationSelector";
4
+ import { PromptInput } from "./PromptInput";
5
+ import { GenerateButton } from "./buttons/GenerateButton";
6
+ import type { StyleOption } from "./selectors/types";
7
+
8
+ export interface AIGenerationFormTranslations {
9
+ promptTitle: string;
10
+ promptPlaceholder: string;
11
+ styleTitle: string;
12
+ durationTitle: string;
13
+ generateButton: string;
14
+ generatingButton: string;
15
+ }
16
+
17
+ export interface AIGenerationFormProps {
18
+ prompt: string;
19
+ onPromptChange: (text: string) => void;
20
+
21
+ styles: StyleOption[];
22
+ selectedStyle: string;
23
+ onStyleSelect: (styleId: string) => void;
24
+
25
+ duration: number;
26
+ durationOptions: readonly number[];
27
+ onDurationSelect: (duration: number) => void;
28
+
29
+ onGenerate: () => void;
30
+ isGenerating: boolean;
31
+
32
+ translations: AIGenerationFormTranslations;
33
+ }
34
+
35
+ export const AIGenerationForm: React.FC<AIGenerationFormProps> = ({
36
+ prompt,
37
+ onPromptChange,
38
+
39
+ styles,
40
+ selectedStyle,
41
+ onStyleSelect,
42
+
43
+ duration,
44
+ durationOptions,
45
+ onDurationSelect,
46
+
47
+ onGenerate,
48
+ isGenerating,
49
+
50
+ translations,
51
+ }) => {
52
+ return (
53
+ <>
54
+ <PromptInput
55
+ title={translations.promptTitle}
56
+ placeholder={translations.promptPlaceholder}
57
+ value={prompt}
58
+ onChangeText={onPromptChange}
59
+ />
60
+
61
+ <StyleSelector
62
+ styles={styles}
63
+ selectedStyle={selectedStyle}
64
+ onStyleSelect={onStyleSelect}
65
+ title={translations.styleTitle}
66
+ />
67
+
68
+ <DurationSelector
69
+ duration={duration}
70
+ durationOptions={durationOptions}
71
+ onDurationSelect={onDurationSelect}
72
+ title={translations.durationTitle}
73
+ />
74
+
75
+ <GenerateButton
76
+ onPress={onGenerate}
77
+ isProcessing={isGenerating}
78
+ isDisabled={!prompt.trim()}
79
+ text={translations.generateButton}
80
+ processingText={translations.generatingButton}
81
+ variant="solid"
82
+ icon="sparkles-outline"
83
+ />
84
+ </>
85
+ );
86
+ };
@@ -8,6 +8,7 @@ export { AIGenerationProgressInline } from "./AIGenerationProgressInline";
8
8
  export { PromptInput } from "./PromptInput";
9
9
  export { AIGenerationHero } from "./AIGenerationHero";
10
10
  export * from "./StylePresetsGrid";
11
+ export * from "./AIGenerationForm";
11
12
 
12
13
  export type {
13
14
  GenerationProgressModalProps,