@umituz/react-native-ai-generation-content 1.17.60 → 1.17.61
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
|
@@ -5,6 +5,7 @@ import { AspectRatioSelector } from "./selectors/AspectRatioSelector";
|
|
|
5
5
|
import { PromptInput } from "./PromptInput";
|
|
6
6
|
import { GenerateButton } from "./buttons/GenerateButton";
|
|
7
7
|
import { ExamplePrompts } from "./prompts/ExamplePrompts";
|
|
8
|
+
import { AIGenerationProgressInline } from "./AIGenerationProgressInline";
|
|
8
9
|
import type { StyleOption } from "./selectors/types";
|
|
9
10
|
import type { AspectRatioOption } from "./selectors/types";
|
|
10
11
|
|
|
@@ -17,6 +18,8 @@ export interface AIGenerationFormTranslations {
|
|
|
17
18
|
examplePromptsTitle?: string;
|
|
18
19
|
generateButton: string;
|
|
19
20
|
generatingButton: string;
|
|
21
|
+
progressTitle?: string;
|
|
22
|
+
progressHint?: string;
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
export interface AIGenerationFormProps extends PropsWithChildren {
|
|
@@ -47,6 +50,9 @@ export interface AIGenerationFormProps extends PropsWithChildren {
|
|
|
47
50
|
isGenerating: boolean;
|
|
48
51
|
hideGenerateButton?: boolean;
|
|
49
52
|
|
|
53
|
+
// Optional: Generation Progress
|
|
54
|
+
progress?: number;
|
|
55
|
+
|
|
50
56
|
// Custom Generate Button Props
|
|
51
57
|
generateButtonProps?: {
|
|
52
58
|
costLabel?: string;
|
|
@@ -81,6 +87,7 @@ export const AIGenerationForm: React.FC<AIGenerationFormProps> = ({
|
|
|
81
87
|
onGenerate,
|
|
82
88
|
isGenerating,
|
|
83
89
|
hideGenerateButton,
|
|
90
|
+
progress,
|
|
84
91
|
|
|
85
92
|
generateButtonProps,
|
|
86
93
|
|
|
@@ -136,6 +143,14 @@ export const AIGenerationForm: React.FC<AIGenerationFormProps> = ({
|
|
|
136
143
|
|
|
137
144
|
{/* Custom children injected here */}
|
|
138
145
|
{children}
|
|
146
|
+
|
|
147
|
+
{isGenerating && progress !== undefined && (
|
|
148
|
+
<AIGenerationProgressInline
|
|
149
|
+
progress={progress}
|
|
150
|
+
title={translations.progressTitle || translations.generatingButton}
|
|
151
|
+
hint={translations.progressHint}
|
|
152
|
+
/>
|
|
153
|
+
)}
|
|
139
154
|
|
|
140
155
|
{!hideGenerateButton && (
|
|
141
156
|
<GenerateButton
|