@umituz/react-native-ai-generation-content 1.23.0 → 1.23.1
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.23.
|
|
3
|
+
"version": "1.23.1",
|
|
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",
|
|
@@ -32,6 +32,29 @@ export const AIGenerateWizardFlow: React.FC<AIGenerateWizardFlowProps> = ({
|
|
|
32
32
|
t,
|
|
33
33
|
}) => {
|
|
34
34
|
const tokens = useAppDesignTokens();
|
|
35
|
+
|
|
36
|
+
// Transform WizardStyleOption[] to StyleOption[] format
|
|
37
|
+
const transformedStyles = React.useMemo(() =>
|
|
38
|
+
styleOptions.map((style) => ({
|
|
39
|
+
id: style.id,
|
|
40
|
+
name: style.label,
|
|
41
|
+
description: undefined,
|
|
42
|
+
icon: style.icon,
|
|
43
|
+
})),
|
|
44
|
+
[styleOptions]
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
// Transform PresetOption[] to StylePreset[] format
|
|
48
|
+
const transformedPresets = React.useMemo(() =>
|
|
49
|
+
presets.map((preset) => ({
|
|
50
|
+
id: preset.id,
|
|
51
|
+
name: preset.label,
|
|
52
|
+
emoji: preset.icon || "",
|
|
53
|
+
description: preset.prompt || "",
|
|
54
|
+
})),
|
|
55
|
+
[presets]
|
|
56
|
+
);
|
|
57
|
+
|
|
35
58
|
const {
|
|
36
59
|
currentStep,
|
|
37
60
|
setCurrentStep,
|
|
@@ -183,11 +206,11 @@ export const AIGenerateWizardFlow: React.FC<AIGenerateWizardFlowProps> = ({
|
|
|
183
206
|
heroSubtitle={translations.heroSubtitle}
|
|
184
207
|
isGenerating={isGenerating}
|
|
185
208
|
progress={progress}
|
|
186
|
-
presets={
|
|
209
|
+
presets={transformedPresets}
|
|
187
210
|
onPresetPress={() => { void handleGenerate(); }}
|
|
188
211
|
prompt={prompt}
|
|
189
212
|
onPromptChange={setPrompt}
|
|
190
|
-
styles={
|
|
213
|
+
styles={transformedStyles}
|
|
191
214
|
selectedStyle={selectedStyle}
|
|
192
215
|
onStyleSelect={setSelectedStyle}
|
|
193
216
|
duration={selectedDuration}
|
|
@@ -33,7 +33,7 @@ export interface AIGenerateWizardTranslations {
|
|
|
33
33
|
readonly maxFileSize: string;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export interface
|
|
36
|
+
export interface WizardStyleOption {
|
|
37
37
|
readonly id: string;
|
|
38
38
|
readonly label: string;
|
|
39
39
|
readonly icon?: string;
|
|
@@ -49,7 +49,7 @@ export interface PresetOption {
|
|
|
49
49
|
export interface AIGenerateWizardFlowProps {
|
|
50
50
|
readonly featureType: string;
|
|
51
51
|
readonly translations: AIGenerateWizardTranslations;
|
|
52
|
-
readonly styleOptions:
|
|
52
|
+
readonly styleOptions: WizardStyleOption[];
|
|
53
53
|
readonly presets: PresetOption[];
|
|
54
54
|
readonly durationOptions: number[];
|
|
55
55
|
readonly onGenerate: (data: {
|