@umituz/react-native-ai-generation-content 1.17.63 → 1.17.65
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/features/anime-selfie/presentation/components/AnimeSelfieFeature.tsx +2 -0
- package/src/features/face-swap/presentation/components/FaceSwapFeature.tsx +2 -0
- package/src/features/photo-restoration/presentation/components/PhotoRestoreFeature.tsx +2 -0
- package/src/features/photo-restoration/presentation/components/PhotoRestoreResultView.tsx +13 -25
- package/src/features/remove-background/presentation/components/RemoveBackgroundFeature.tsx +2 -0
- package/src/features/remove-object/presentation/components/RemoveObjectFeature.tsx +2 -0
- package/src/features/replace-background/presentation/components/ReplaceBackgroundFeature.tsx +12 -25
- package/src/features/upscaling/presentation/components/UpscaleFeature.tsx +28 -44
package/package.json
CHANGED
|
@@ -109,9 +109,11 @@ export const AnimeSelfieFeature: React.FC<AnimeSelfieFeatureProps> = ({
|
|
|
109
109
|
<AIGenerationForm
|
|
110
110
|
onGenerate={handleProcess}
|
|
111
111
|
isGenerating={feature.isProcessing}
|
|
112
|
+
progress={feature.progress}
|
|
112
113
|
translations={{
|
|
113
114
|
generateButton: translations.processButtonText,
|
|
114
115
|
generatingButton: translations.processingText,
|
|
116
|
+
progressTitle: translations.processingText,
|
|
115
117
|
}}
|
|
116
118
|
>
|
|
117
119
|
<PhotoUploadCard
|
|
@@ -108,9 +108,11 @@ export const FaceSwapFeature: React.FC<FaceSwapFeatureProps> = ({
|
|
|
108
108
|
<AIGenerationForm
|
|
109
109
|
onGenerate={handleProcess}
|
|
110
110
|
isGenerating={feature.isProcessing}
|
|
111
|
+
progress={feature.progress}
|
|
111
112
|
translations={{
|
|
112
113
|
generateButton: translations.processButtonText,
|
|
113
114
|
generatingButton: translations.processingText,
|
|
115
|
+
progressTitle: translations.processingText,
|
|
114
116
|
}}
|
|
115
117
|
>
|
|
116
118
|
<View style={styles.pickerContainer}>
|
|
@@ -107,9 +107,11 @@ export const PhotoRestoreFeature: React.FC<PhotoRestoreFeatureProps> = ({
|
|
|
107
107
|
<AIGenerationForm
|
|
108
108
|
onGenerate={handleProcess}
|
|
109
109
|
isGenerating={feature.isProcessing}
|
|
110
|
+
progress={feature.progress}
|
|
110
111
|
translations={{
|
|
111
112
|
generateButton: translations.processButtonText,
|
|
112
113
|
generatingButton: translations.processingText,
|
|
114
|
+
progressTitle: translations.processingText,
|
|
113
115
|
}}
|
|
114
116
|
>
|
|
115
117
|
<PhotoUploadCard
|
|
@@ -7,9 +7,9 @@ import React from "react";
|
|
|
7
7
|
import { View, StyleSheet } from "react-native";
|
|
8
8
|
import {
|
|
9
9
|
AtomicText,
|
|
10
|
-
AtomicButton,
|
|
11
10
|
useAppDesignTokens,
|
|
12
11
|
} from "@umituz/react-native-design-system";
|
|
12
|
+
import { AIGenerationResult } from "../../../../presentation/components/display/AIGenerationResult";
|
|
13
13
|
import { ComparisonSlider } from "../../../replace-background/presentation/components/ComparisonSlider";
|
|
14
14
|
import type { PhotoRestoreTranslations } from "../../domain/types";
|
|
15
15
|
|
|
@@ -38,14 +38,17 @@ export const PhotoRestoreResultView: React.FC<PhotoRestoreResultViewProps> = ({
|
|
|
38
38
|
const tokens = useAppDesignTokens();
|
|
39
39
|
|
|
40
40
|
return (
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
<AIGenerationResult
|
|
42
|
+
successText={translations.successText}
|
|
43
|
+
primaryAction={{
|
|
44
|
+
label: translations.saveButtonText,
|
|
45
|
+
onPress: onSave,
|
|
46
|
+
}}
|
|
47
|
+
secondaryAction={{
|
|
48
|
+
label: translations.tryAnotherText,
|
|
49
|
+
onPress: onReset,
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
49
52
|
<ComparisonSlider
|
|
50
53
|
originalUri={originalUri}
|
|
51
54
|
processedUri={processedUri}
|
|
@@ -59,22 +62,7 @@ export const PhotoRestoreResultView: React.FC<PhotoRestoreResultViewProps> = ({
|
|
|
59
62
|
>
|
|
60
63
|
Drag slider to compare
|
|
61
64
|
</AtomicText>
|
|
62
|
-
|
|
63
|
-
<View style={styles.actions}>
|
|
64
|
-
<AtomicButton
|
|
65
|
-
title={translations.saveButtonText}
|
|
66
|
-
onPress={onSave}
|
|
67
|
-
variant="primary"
|
|
68
|
-
size="lg"
|
|
69
|
-
/>
|
|
70
|
-
<AtomicButton
|
|
71
|
-
title={translations.tryAnotherText}
|
|
72
|
-
onPress={onReset}
|
|
73
|
-
variant="secondary"
|
|
74
|
-
size="lg"
|
|
75
|
-
/>
|
|
76
|
-
</View>
|
|
77
|
-
</View>
|
|
65
|
+
</AIGenerationResult>
|
|
78
66
|
);
|
|
79
67
|
};
|
|
80
68
|
|
|
@@ -109,9 +109,11 @@ export const RemoveBackgroundFeature: React.FC<RemoveBackgroundFeatureProps> = (
|
|
|
109
109
|
<AIGenerationForm
|
|
110
110
|
onGenerate={handleProcess}
|
|
111
111
|
isGenerating={feature.isProcessing}
|
|
112
|
+
progress={feature.progress}
|
|
112
113
|
translations={{
|
|
113
114
|
generateButton: translations.processButtonText,
|
|
114
115
|
generatingButton: translations.processingText,
|
|
116
|
+
progressTitle: translations.processingText,
|
|
115
117
|
}}
|
|
116
118
|
>
|
|
117
119
|
<PhotoUploadCard
|
|
@@ -108,9 +108,11 @@ export const RemoveObjectFeature: React.FC<RemoveObjectFeatureProps> = ({
|
|
|
108
108
|
<AIGenerationForm
|
|
109
109
|
onGenerate={handleProcess}
|
|
110
110
|
isGenerating={feature.isProcessing}
|
|
111
|
+
progress={feature.progress}
|
|
111
112
|
translations={{
|
|
112
113
|
generateButton: translations.processButtonText,
|
|
113
114
|
generatingButton: translations.processingText,
|
|
115
|
+
progressTitle: translations.processingText,
|
|
114
116
|
}}
|
|
115
117
|
>
|
|
116
118
|
<PhotoUploadCard
|
package/src/features/replace-background/presentation/components/ReplaceBackgroundFeature.tsx
CHANGED
|
@@ -8,12 +8,11 @@ import React, { useCallback, useMemo } from "react";
|
|
|
8
8
|
import { View, ScrollView, StyleSheet, Image, Dimensions } from "react-native";
|
|
9
9
|
import {
|
|
10
10
|
useAppDesignTokens,
|
|
11
|
-
AtomicText,
|
|
12
|
-
AtomicButton,
|
|
13
11
|
AtomicInput,
|
|
14
12
|
} from "@umituz/react-native-design-system";
|
|
15
13
|
import { PhotoUploadCard } from "../../../../presentation/components/PhotoUploadCard";
|
|
16
14
|
import { AIGenerationForm } from "../../../../presentation/components/AIGenerationForm";
|
|
15
|
+
import { AIGenerationResult } from "../../../../presentation/components/display/AIGenerationResult";
|
|
17
16
|
import { useReplaceBackgroundFeature } from "../hooks";
|
|
18
17
|
import type {
|
|
19
18
|
ReplaceBackgroundTranslations,
|
|
@@ -78,35 +77,23 @@ export const ReplaceBackgroundFeature: React.FC<ReplaceBackgroundFeatureProps> =
|
|
|
78
77
|
contentContainerStyle={styles.content}
|
|
79
78
|
showsVerticalScrollIndicator={false}
|
|
80
79
|
>
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
<AIGenerationResult
|
|
81
|
+
successText={translations.successText}
|
|
82
|
+
primaryAction={{
|
|
83
|
+
label: translations.saveButtonText,
|
|
84
|
+
onPress: handleSave,
|
|
85
|
+
}}
|
|
86
|
+
secondaryAction={{
|
|
87
|
+
label: translations.tryAnotherText,
|
|
88
|
+
onPress: feature.reset,
|
|
89
|
+
}}
|
|
84
90
|
>
|
|
85
|
-
{translations.successText}
|
|
86
|
-
</AtomicText>
|
|
87
|
-
|
|
88
|
-
<View style={styles.resultImageContainer}>
|
|
89
91
|
<Image
|
|
90
92
|
source={{ uri: feature.processedUrl }}
|
|
91
93
|
style={[styles.resultImage, { width: imageSize, height: imageSize }]}
|
|
92
94
|
resizeMode="contain"
|
|
93
95
|
/>
|
|
94
|
-
</
|
|
95
|
-
|
|
96
|
-
<View style={styles.resultActions}>
|
|
97
|
-
<AtomicButton
|
|
98
|
-
title={translations.saveButtonText}
|
|
99
|
-
onPress={handleSave}
|
|
100
|
-
variant="primary"
|
|
101
|
-
size="lg"
|
|
102
|
-
/>
|
|
103
|
-
<AtomicButton
|
|
104
|
-
title={translations.tryAnotherText}
|
|
105
|
-
onPress={feature.reset}
|
|
106
|
-
variant="secondary"
|
|
107
|
-
size="lg"
|
|
108
|
-
/>
|
|
109
|
-
</View>
|
|
96
|
+
</AIGenerationResult>
|
|
110
97
|
</ScrollView>
|
|
111
98
|
);
|
|
112
99
|
}
|
|
@@ -9,9 +9,9 @@ import { View, ScrollView, StyleSheet } from "react-native";
|
|
|
9
9
|
import {
|
|
10
10
|
useAppDesignTokens,
|
|
11
11
|
AtomicText,
|
|
12
|
-
AtomicButton,
|
|
13
12
|
} from "@umituz/react-native-design-system";
|
|
14
13
|
import { PhotoUploadCard } from "../../../../presentation/components/PhotoUploadCard";
|
|
14
|
+
import { AIGenerationForm } from "../../../../presentation/components/AIGenerationForm";
|
|
15
15
|
import { UpscaleResultView } from "./UpscaleResultView";
|
|
16
16
|
import { useUpscaleFeature } from "../hooks";
|
|
17
17
|
import type {
|
|
@@ -103,53 +103,37 @@ export const UpscaleFeature: React.FC<UpscaleFeatureProps> = ({
|
|
|
103
103
|
contentContainerStyle={styles.content}
|
|
104
104
|
showsVerticalScrollIndicator={false}
|
|
105
105
|
>
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
{
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
imageUri={feature.imageUri}
|
|
115
|
-
onPress={handleSelectImage}
|
|
116
|
-
isValidating={feature.isProcessing}
|
|
117
|
-
disabled={feature.isProcessing}
|
|
118
|
-
translations={photoTranslations}
|
|
119
|
-
config={{
|
|
120
|
-
aspectRatio: 1,
|
|
121
|
-
borderRadius: 24,
|
|
122
|
-
showValidationStatus: false,
|
|
123
|
-
allowChange: true,
|
|
106
|
+
<AIGenerationForm
|
|
107
|
+
onGenerate={handleProcess}
|
|
108
|
+
isGenerating={feature.isProcessing}
|
|
109
|
+
progress={feature.progress}
|
|
110
|
+
translations={{
|
|
111
|
+
generateButton: translations.processButtonText,
|
|
112
|
+
generatingButton: translations.processingText,
|
|
113
|
+
progressTitle: translations.processingText,
|
|
124
114
|
}}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
style={[
|
|
130
|
-
styles.errorContainer,
|
|
131
|
-
{ backgroundColor: `${tokens.colors.error}15` },
|
|
132
|
-
]}
|
|
115
|
+
>
|
|
116
|
+
<AtomicText
|
|
117
|
+
type="bodyLarge"
|
|
118
|
+
style={[styles.description, { color: tokens.colors.textSecondary }]}
|
|
133
119
|
>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
</AtomicText>
|
|
137
|
-
</View>
|
|
138
|
-
)}
|
|
120
|
+
{translations.description}
|
|
121
|
+
</AtomicText>
|
|
139
122
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
123
|
+
<PhotoUploadCard
|
|
124
|
+
imageUri={feature.imageUri}
|
|
125
|
+
onPress={handleSelectImage}
|
|
126
|
+
isValidating={feature.isProcessing}
|
|
127
|
+
disabled={feature.isProcessing}
|
|
128
|
+
translations={photoTranslations}
|
|
129
|
+
config={{
|
|
130
|
+
aspectRatio: 1,
|
|
131
|
+
borderRadius: 24,
|
|
132
|
+
showValidationStatus: false,
|
|
133
|
+
allowChange: true,
|
|
134
|
+
}}
|
|
151
135
|
/>
|
|
152
|
-
</
|
|
136
|
+
</AIGenerationForm>
|
|
153
137
|
</ScrollView>
|
|
154
138
|
|
|
155
139
|
{renderProcessingModal?.({ visible: feature.isProcessing, progress: feature.progress })}
|