@umituz/react-native-ai-generation-content 1.74.2 → 1.74.3
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 +1 -1
- package/src/domains/generation/wizard/presentation/components/WizardStepRenderer.tsx +1 -1
- package/src/domains/generation/wizard/presentation/components/step-renderers/renderTextInputStep.tsx +4 -0
- package/src/domains/generation/wizard/presentation/screens/TextInputScreen.tsx +4 -2
- package/src/domains/generation/wizard/presentation/screens/TextInputScreen.types.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.74.
|
|
3
|
+
"version": "1.74.3",
|
|
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",
|
|
@@ -93,7 +93,7 @@ export const WizardStepRenderer: React.FC<WizardStepRendererProps> = ({
|
|
|
93
93
|
return renderPhotoUploadStep({ key: step.id, step, customData, onBack, onPhotoContinue, t, creditCost });
|
|
94
94
|
|
|
95
95
|
case StepType.TEXT_INPUT:
|
|
96
|
-
return renderTextInputStep({ key: step.id, step, customData, onBack, onPhotoContinue, t, alertMessages });
|
|
96
|
+
return renderTextInputStep({ key: step.id, step, customData, onBack, onPhotoContinue, t, alertMessages, creditCost });
|
|
97
97
|
|
|
98
98
|
case StepType.FEATURE_SELECTION:
|
|
99
99
|
return renderSelectionStep({ key: step.id, step, customData, onBack, onPhotoContinue, t, creditCost });
|
package/src/domains/generation/wizard/presentation/components/step-renderers/renderTextInputStep.tsx
CHANGED
|
@@ -17,6 +17,8 @@ export interface TextInputStepProps {
|
|
|
17
17
|
readonly onPhotoContinue: (stepId: string, image: UploadedImage) => void;
|
|
18
18
|
readonly t: (key: string) => string;
|
|
19
19
|
readonly alertMessages?: AlertMessages;
|
|
20
|
+
/** Calculated credit cost from parent */
|
|
21
|
+
readonly creditCost?: number;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
export function renderTextInputStep({
|
|
@@ -26,6 +28,7 @@ export function renderTextInputStep({
|
|
|
26
28
|
onPhotoContinue,
|
|
27
29
|
t,
|
|
28
30
|
alertMessages,
|
|
31
|
+
creditCost,
|
|
29
32
|
}: TextInputStepProps): React.ReactElement {
|
|
30
33
|
const textConfig = getTextInputConfig(step.config);
|
|
31
34
|
const titleKey = textConfig?.titleKey ?? `wizard.steps.${step.id}.title`;
|
|
@@ -53,6 +56,7 @@ export function renderTextInputStep({
|
|
|
53
56
|
multiline: textConfig?.multiline !== undefined ? textConfig.multiline : true,
|
|
54
57
|
}}
|
|
55
58
|
initialValue={existingText}
|
|
59
|
+
creditCost={creditCost}
|
|
56
60
|
onBack={onBack}
|
|
57
61
|
onContinue={(text) => {
|
|
58
62
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
AlertType,
|
|
18
18
|
AlertMode,
|
|
19
19
|
} from "@umituz/react-native-design-system";
|
|
20
|
-
import {
|
|
20
|
+
import { WizardContinueButton } from "../components/WizardContinueButton";
|
|
21
21
|
import { contentModerationService } from "../../../../../domains/content-moderation";
|
|
22
22
|
import type { TextInputScreenProps } from "./TextInputScreen.types";
|
|
23
23
|
|
|
@@ -33,6 +33,7 @@ export const TextInputScreen: React.FC<TextInputScreenProps> = ({
|
|
|
33
33
|
config,
|
|
34
34
|
examplePrompts = [],
|
|
35
35
|
initialValue = "",
|
|
36
|
+
creditCost,
|
|
36
37
|
onBack,
|
|
37
38
|
onContinue,
|
|
38
39
|
}) => {
|
|
@@ -99,10 +100,11 @@ export const TextInputScreen: React.FC<TextInputScreenProps> = ({
|
|
|
99
100
|
title=""
|
|
100
101
|
onBackPress={onBack}
|
|
101
102
|
rightElement={
|
|
102
|
-
<
|
|
103
|
+
<WizardContinueButton
|
|
103
104
|
label={translations.continueButton}
|
|
104
105
|
canContinue={canContinue}
|
|
105
106
|
onPress={handleContinue}
|
|
107
|
+
creditCost={creditCost}
|
|
106
108
|
/>
|
|
107
109
|
}
|
|
108
110
|
/>
|
|
@@ -25,6 +25,8 @@ export interface TextInputScreenProps {
|
|
|
25
25
|
readonly config?: TextInputScreenConfig;
|
|
26
26
|
readonly examplePrompts?: string[];
|
|
27
27
|
readonly initialValue?: string;
|
|
28
|
+
/** Calculated credit cost from parent */
|
|
29
|
+
readonly creditCost?: number;
|
|
28
30
|
readonly onBack: () => void;
|
|
29
31
|
readonly onContinue: (text: string) => void;
|
|
30
32
|
}
|