@umituz/react-native-ai-generation-content 1.17.83 → 1.17.86
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 -3
- package/src/domains/creations/presentation/components/CreationActions.tsx +3 -3
- package/src/domains/creations/presentation/components/CreationPreview.tsx +3 -2
- package/src/domains/face-detection/presentation/components/FaceValidationStatus.tsx +3 -2
- package/src/features/meme-generator/presentation/screens/MemeGeneratorScreen.tsx +2 -2
- package/src/features/replace-background/domain/entities/component.types.ts +0 -9
- package/src/features/replace-background/domain/entities/index.ts +0 -1
- package/src/features/replace-background/index.ts +0 -2
- package/src/features/replace-background/presentation/components/BackgroundFeature.tsx +3 -6
- package/src/features/replace-background/presentation/components/GenerateButton.tsx +3 -2
- package/src/features/replace-background/presentation/components/index.ts +0 -1
- package/src/presentation/components/AIGenerationProgressInline.tsx +4 -3
- package/src/presentation/components/PendingJobCard.tsx +5 -5
- package/src/presentation/components/PhotoUploadCard/PhotoUploadCard.tsx +2 -2
- package/src/presentation/components/buttons/GenerateButton.tsx +8 -7
- package/src/features/replace-background/presentation/components/ProcessingModal.tsx +0 -113
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.86",
|
|
4
4
|
"description": "Provider-agnostic AI generation orchestration for React Native",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"url": "git+https://github.com/umituz/react-native-ai-generation-content.git"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@umituz/react-native-animation": "*",
|
|
42
41
|
"@umituz/react-native-design-system": "*",
|
|
43
42
|
"@umituz/react-native-firebase": "*",
|
|
44
43
|
"@umituz/react-native-image": "*",
|
|
@@ -67,7 +66,6 @@
|
|
|
67
66
|
"@types/react": "~19.1.10",
|
|
68
67
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
69
68
|
"@typescript-eslint/parser": "^8.0.0",
|
|
70
|
-
"@umituz/react-native-animation": "*",
|
|
71
69
|
"@umituz/react-native-design-system": "latest",
|
|
72
70
|
"@umituz/react-native-firebase": "latest",
|
|
73
71
|
"@umituz/react-native-haptics": "latest",
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
View,
|
|
9
9
|
StyleSheet,
|
|
10
10
|
TouchableOpacity,
|
|
11
|
-
ActivityIndicator,
|
|
12
11
|
} from "react-native";
|
|
13
12
|
import {
|
|
14
13
|
useAppDesignTokens,
|
|
15
14
|
AtomicIcon,
|
|
15
|
+
AtomicSpinner,
|
|
16
16
|
} from "@umituz/react-native-design-system";
|
|
17
17
|
|
|
18
18
|
export interface CreationAction {
|
|
@@ -102,8 +102,8 @@ export function CreationActions({
|
|
|
102
102
|
activeOpacity={0.7}
|
|
103
103
|
>
|
|
104
104
|
{action.loading ? (
|
|
105
|
-
<
|
|
106
|
-
size="
|
|
105
|
+
<AtomicSpinner
|
|
106
|
+
size="sm"
|
|
107
107
|
color={action.filled ? tokens.colors.textInverse : tokens.colors.primary}
|
|
108
108
|
/>
|
|
109
109
|
) : (
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React, { useMemo } from "react";
|
|
7
|
-
import { View, StyleSheet, Image
|
|
7
|
+
import { View, StyleSheet, Image } from "react-native";
|
|
8
8
|
import {
|
|
9
9
|
useAppDesignTokens,
|
|
10
10
|
AtomicIcon,
|
|
11
|
+
AtomicSpinner,
|
|
11
12
|
} from "@umituz/react-native-design-system";
|
|
12
13
|
import type { CreationStatus, CreationTypeId } from "../../domain/types";
|
|
13
14
|
import { isInProgress } from "../../domain/utils";
|
|
@@ -86,7 +87,7 @@ export function CreationPreview({
|
|
|
86
87
|
<View style={styles.container}>
|
|
87
88
|
<View style={styles.loadingContainer}>
|
|
88
89
|
<View style={styles.loadingIcon}>
|
|
89
|
-
<
|
|
90
|
+
<AtomicSpinner size="lg" color="primary" />
|
|
90
91
|
</View>
|
|
91
92
|
</View>
|
|
92
93
|
</View>
|
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import * as React from "react";
|
|
9
|
-
import { View, StyleSheet
|
|
9
|
+
import { View, StyleSheet } from "react-native";
|
|
10
10
|
import {
|
|
11
11
|
AtomicText,
|
|
12
12
|
AtomicIcon,
|
|
13
|
+
AtomicSpinner,
|
|
13
14
|
useAppDesignTokens,
|
|
14
15
|
} from "@umituz/react-native-design-system";
|
|
15
16
|
import type { FaceValidationState } from "../../domain/entities/FaceDetection";
|
|
@@ -38,7 +39,7 @@ export const FaceValidationStatus: React.FC<FaceValidationStatusProps> = ({
|
|
|
38
39
|
<View
|
|
39
40
|
style={[styles.container, { backgroundColor: tokens.colors.surface }]}
|
|
40
41
|
>
|
|
41
|
-
<
|
|
42
|
+
<AtomicSpinner size="sm" color="primary" />
|
|
42
43
|
<AtomicText
|
|
43
44
|
style={[styles.text, { color: tokens.colors.textSecondary }]}
|
|
44
45
|
>
|
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
View,
|
|
4
4
|
StyleSheet,
|
|
5
5
|
Image,
|
|
6
|
-
ActivityIndicator,
|
|
7
6
|
Alert,
|
|
8
7
|
} from "react-native";
|
|
9
8
|
import {
|
|
@@ -11,6 +10,7 @@ import {
|
|
|
11
10
|
useAppDesignTokens,
|
|
12
11
|
AtomicIcon,
|
|
13
12
|
AtomicInput,
|
|
13
|
+
AtomicSpinner,
|
|
14
14
|
ScreenLayout,
|
|
15
15
|
ScreenHeader,
|
|
16
16
|
} from "@umituz/react-native-design-system";
|
|
@@ -109,7 +109,7 @@ export const MemeGeneratorScreen: React.FC<MemeGeneratorScreenProps> = ({
|
|
|
109
109
|
<View style={styles.content}>
|
|
110
110
|
<View style={styles.previewContainer}>
|
|
111
111
|
{isGenerating ? (
|
|
112
|
-
<
|
|
112
|
+
<AtomicSpinner size="lg" color="primary" />
|
|
113
113
|
) : generatedImage ? (
|
|
114
114
|
<Image
|
|
115
115
|
source={{ uri: generatedImage }}
|
|
@@ -58,15 +58,6 @@ export interface ErrorDisplayProps {
|
|
|
58
58
|
readonly error: string | null;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
/**
|
|
62
|
-
* Processing modal component props
|
|
63
|
-
*/
|
|
64
|
-
export interface ProcessingModalProps {
|
|
65
|
-
readonly visible: boolean;
|
|
66
|
-
readonly progress?: number;
|
|
67
|
-
readonly title?: string;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
61
|
/**
|
|
71
62
|
* Feature header component props
|
|
72
63
|
*/
|
|
@@ -17,7 +17,6 @@ export type {
|
|
|
17
17
|
GenerateButtonProps,
|
|
18
18
|
ResultDisplayProps,
|
|
19
19
|
ErrorDisplayProps,
|
|
20
|
-
ProcessingModalProps,
|
|
21
20
|
FeatureHeaderProps,
|
|
22
21
|
ModeSelectorProps,
|
|
23
22
|
ComparisonSliderProps,
|
|
@@ -50,7 +49,6 @@ export {
|
|
|
50
49
|
GenerateButton,
|
|
51
50
|
ResultDisplay,
|
|
52
51
|
ErrorDisplay,
|
|
53
|
-
ProcessingModal,
|
|
54
52
|
FeatureHeader,
|
|
55
53
|
ComparisonSlider,
|
|
56
54
|
ModeSelector,
|
|
@@ -16,7 +16,6 @@ import { PromptInput } from "./PromptInput";
|
|
|
16
16
|
import { GenerateButton } from "./GenerateButton";
|
|
17
17
|
import { ResultDisplay } from "./ResultDisplay";
|
|
18
18
|
import { ErrorDisplay } from "./ErrorDisplay";
|
|
19
|
-
import { ProcessingModal } from "./ProcessingModal";
|
|
20
19
|
import { FeatureHeader } from "./FeatureHeader";
|
|
21
20
|
import { useBackgroundFeature } from "../hooks";
|
|
22
21
|
import type { ImageSourcePropType } from "react-native";
|
|
@@ -35,6 +34,7 @@ export interface BackgroundFeatureProps {
|
|
|
35
34
|
readonly resetButtonText?: string;
|
|
36
35
|
readonly processingText?: string;
|
|
37
36
|
readonly placeholderText?: string;
|
|
37
|
+
readonly renderProcessingModal?: (props: { visible: boolean; progress: number; title?: string }) => React.ReactNode;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export const BackgroundFeature: React.FC<BackgroundFeatureProps> = ({
|
|
@@ -51,6 +51,7 @@ export const BackgroundFeature: React.FC<BackgroundFeatureProps> = ({
|
|
|
51
51
|
resetButtonText,
|
|
52
52
|
processingText,
|
|
53
53
|
placeholderText,
|
|
54
|
+
renderProcessingModal,
|
|
54
55
|
}) => {
|
|
55
56
|
const tokens = useAppDesignTokens();
|
|
56
57
|
const [prompt, setPrompt] = useState("");
|
|
@@ -130,11 +131,7 @@ export const BackgroundFeature: React.FC<BackgroundFeatureProps> = ({
|
|
|
130
131
|
/>
|
|
131
132
|
</ScrollView>
|
|
132
133
|
|
|
133
|
-
|
|
134
|
-
visible={feature.isProcessing}
|
|
135
|
-
progress={feature.progress}
|
|
136
|
-
title={processingText}
|
|
137
|
-
/>
|
|
134
|
+
{renderProcessingModal?.({ visible: feature.isProcessing, progress: feature.progress, title: processingText })}
|
|
138
135
|
</>
|
|
139
136
|
);
|
|
140
137
|
};
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React, { memo } from "react";
|
|
7
|
-
import { StyleSheet, TouchableOpacity
|
|
7
|
+
import { StyleSheet, TouchableOpacity } from "react-native";
|
|
8
8
|
import {
|
|
9
9
|
AtomicText,
|
|
10
10
|
AtomicIcon,
|
|
11
|
+
AtomicSpinner,
|
|
11
12
|
useAppDesignTokens,
|
|
12
13
|
} from "@umituz/react-native-design-system";
|
|
13
14
|
import type { GenerateButtonProps } from "../../domain/entities";
|
|
@@ -38,7 +39,7 @@ export const GenerateButton: React.FC<GenerateButtonProps> = memo(
|
|
|
38
39
|
]}
|
|
39
40
|
>
|
|
40
41
|
{isProcessing ? (
|
|
41
|
-
<
|
|
42
|
+
<AtomicSpinner size="sm" color={tokens.colors.backgroundPrimary} />
|
|
42
43
|
) : (
|
|
43
44
|
<>
|
|
44
45
|
<AtomicIcon
|
|
@@ -13,7 +13,6 @@ export { PromptInput } from "./PromptInput";
|
|
|
13
13
|
export { GenerateButton } from "./GenerateButton";
|
|
14
14
|
export { ResultDisplay } from "./ResultDisplay";
|
|
15
15
|
export { ErrorDisplay } from "./ErrorDisplay";
|
|
16
|
-
export { ProcessingModal } from "./ProcessingModal";
|
|
17
16
|
export { FeatureHeader } from "./FeatureHeader";
|
|
18
17
|
export { ComparisonSlider } from "./ComparisonSlider";
|
|
19
18
|
export { ModeSelector } from "./ModeSelector";
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import React from "react";
|
|
8
|
-
import { View,
|
|
8
|
+
import { View, StyleSheet } from "react-native";
|
|
9
9
|
import {
|
|
10
10
|
AtomicText,
|
|
11
11
|
useAppDesignTokens,
|
|
12
12
|
AtomicProgress,
|
|
13
|
+
AtomicSpinner,
|
|
13
14
|
} from "@umituz/react-native-design-system";
|
|
14
15
|
|
|
15
16
|
export interface AIGenerationProgressInlineProps {
|
|
@@ -39,8 +40,8 @@ export const AIGenerationProgressInline: React.FC<
|
|
|
39
40
|
|
|
40
41
|
return (
|
|
41
42
|
<View style={[styles.container, { backgroundColor: bgColor }]}>
|
|
42
|
-
<
|
|
43
|
-
|
|
43
|
+
<AtomicSpinner size="lg" color={primaryColor} />
|
|
44
|
+
|
|
44
45
|
{title && (
|
|
45
46
|
<AtomicText
|
|
46
47
|
type="bodyMedium"
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
|
-
import { View,
|
|
8
|
-
import { AtomicText, useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
7
|
+
import { View, StyleSheet } from "react-native";
|
|
8
|
+
import { AtomicText, AtomicSpinner, useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
9
9
|
import type { BackgroundJob } from "../../domain/entities/job.types";
|
|
10
10
|
import { PendingJobProgressBar } from "./PendingJobProgressBar";
|
|
11
11
|
import { PendingJobCardActions } from "./PendingJobCardActions";
|
|
@@ -96,9 +96,9 @@ export function PendingJobCard<TInput = unknown, TResult = unknown>({
|
|
|
96
96
|
<View style={styles.thumbnailWrapper}>
|
|
97
97
|
{renderThumbnail(job)}
|
|
98
98
|
{!isFailed && (
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
<AtomicSpinner
|
|
100
|
+
size="sm"
|
|
101
|
+
color="primary"
|
|
102
102
|
style={styles.loader}
|
|
103
103
|
/>
|
|
104
104
|
)}
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
StyleSheet,
|
|
13
13
|
Pressable,
|
|
14
14
|
TouchableOpacity,
|
|
15
|
-
ActivityIndicator,
|
|
16
15
|
type ViewStyle,
|
|
17
16
|
type StyleProp,
|
|
18
17
|
} from "react-native";
|
|
@@ -20,6 +19,7 @@ import { LinearGradient } from "expo-linear-gradient";
|
|
|
20
19
|
import {
|
|
21
20
|
AtomicText,
|
|
22
21
|
AtomicIcon,
|
|
22
|
+
AtomicSpinner,
|
|
23
23
|
useAppDesignTokens,
|
|
24
24
|
} from "@umituz/react-native-design-system";
|
|
25
25
|
|
|
@@ -201,7 +201,7 @@ export const PhotoUploadCard: React.FC<PhotoUploadCardProps> = ({
|
|
|
201
201
|
{isValidating ? (
|
|
202
202
|
<View style={styles.validatingContainer}>
|
|
203
203
|
<View style={styles.pulseRing} />
|
|
204
|
-
<
|
|
204
|
+
<AtomicSpinner size="lg" color="primary" />
|
|
205
205
|
<AtomicText style={styles.validatingText}>
|
|
206
206
|
{translations.analyzing || "Analyzing..."}
|
|
207
207
|
</AtomicText>
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import React from "react";
|
|
8
|
-
import { View, StyleSheet, TouchableOpacity,
|
|
8
|
+
import { View, StyleSheet, TouchableOpacity, type ViewStyle } from "react-native";
|
|
9
9
|
import {
|
|
10
10
|
AtomicText,
|
|
11
11
|
useAppDesignTokens,
|
|
12
12
|
AtomicIcon,
|
|
13
|
+
AtomicSpinner,
|
|
13
14
|
} from "@umituz/react-native-design-system";
|
|
14
15
|
import { LinearGradient } from "expo-linear-gradient";
|
|
15
16
|
|
|
@@ -69,7 +70,7 @@ export const GenerateButton: React.FC<GenerateButtonProps> = ({
|
|
|
69
70
|
>
|
|
70
71
|
<View style={styles.buttonContent}>
|
|
71
72
|
{isProcessing ? (
|
|
72
|
-
<
|
|
73
|
+
<AtomicSpinner size="sm" color="white" />
|
|
73
74
|
) : (
|
|
74
75
|
<AtomicIcon name={icon} customSize={20} customColor="#FFFFFF" />
|
|
75
76
|
)}
|
|
@@ -107,11 +108,11 @@ export const GenerateButton: React.FC<GenerateButtonProps> = ({
|
|
|
107
108
|
style={[styles.gradientButton, disabled && styles.disabledButton]}
|
|
108
109
|
>
|
|
109
110
|
<View style={styles.buttonContent}>
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
{isProcessing ? (
|
|
112
|
+
<AtomicSpinner size="sm" color="white" />
|
|
113
|
+
) : (
|
|
114
|
+
<AtomicIcon name={icon} customSize={iconSize} customColor="#FFF" />
|
|
115
|
+
)}
|
|
115
116
|
<AtomicText type="bodyLarge" style={styles.gradientButtonText}>
|
|
116
117
|
{finalDisplayText}
|
|
117
118
|
</AtomicText>
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Processing Modal Component
|
|
3
|
-
* @description Modal shown during processing with progress
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React, { memo } from "react";
|
|
7
|
-
import { Modal, View, StyleSheet, ActivityIndicator } from "react-native";
|
|
8
|
-
import {
|
|
9
|
-
AtomicText,
|
|
10
|
-
useAppDesignTokens,
|
|
11
|
-
} from "@umituz/react-native-design-system";
|
|
12
|
-
import type { ProcessingModalProps } from "../../domain/entities";
|
|
13
|
-
|
|
14
|
-
export const ProcessingModal: React.FC<ProcessingModalProps> = memo(
|
|
15
|
-
function ProcessingModal({ visible, progress = 0, title }) {
|
|
16
|
-
const tokens = useAppDesignTokens();
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<Modal
|
|
20
|
-
visible={visible}
|
|
21
|
-
transparent
|
|
22
|
-
animationType="fade"
|
|
23
|
-
statusBarTranslucent
|
|
24
|
-
>
|
|
25
|
-
<View style={styles.overlay}>
|
|
26
|
-
<View
|
|
27
|
-
style={[
|
|
28
|
-
styles.content,
|
|
29
|
-
{ backgroundColor: tokens.colors.surface },
|
|
30
|
-
]}
|
|
31
|
-
>
|
|
32
|
-
<ActivityIndicator
|
|
33
|
-
size="large"
|
|
34
|
-
color={tokens.colors.primary}
|
|
35
|
-
/>
|
|
36
|
-
{title && (
|
|
37
|
-
<AtomicText
|
|
38
|
-
|
|
39
|
-
style={[
|
|
40
|
-
styles.title,
|
|
41
|
-
{ color: tokens.colors.textPrimary },
|
|
42
|
-
]}
|
|
43
|
-
>
|
|
44
|
-
{title}
|
|
45
|
-
</AtomicText>
|
|
46
|
-
)}
|
|
47
|
-
{progress > 0 && (
|
|
48
|
-
<View style={styles.progressContainer}>
|
|
49
|
-
<View
|
|
50
|
-
style={[
|
|
51
|
-
styles.progressBar,
|
|
52
|
-
{ backgroundColor: tokens.colors.surfaceSecondary },
|
|
53
|
-
]}
|
|
54
|
-
>
|
|
55
|
-
<View
|
|
56
|
-
style={[
|
|
57
|
-
styles.progressFill,
|
|
58
|
-
{
|
|
59
|
-
backgroundColor: tokens.colors.primary,
|
|
60
|
-
width: `${Math.min(progress, 100)}%`,
|
|
61
|
-
},
|
|
62
|
-
]}
|
|
63
|
-
/>
|
|
64
|
-
</View>
|
|
65
|
-
<AtomicText
|
|
66
|
-
|
|
67
|
-
style={{ color: tokens.colors.textSecondary }}
|
|
68
|
-
>
|
|
69
|
-
{Math.round(progress)}%
|
|
70
|
-
</AtomicText>
|
|
71
|
-
</View>
|
|
72
|
-
)}
|
|
73
|
-
</View>
|
|
74
|
-
</View>
|
|
75
|
-
</Modal>
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
|
|
80
|
-
const styles = StyleSheet.create({
|
|
81
|
-
overlay: {
|
|
82
|
-
flex: 1,
|
|
83
|
-
backgroundColor: "rgba(0, 0, 0, 0.7)",
|
|
84
|
-
justifyContent: "center",
|
|
85
|
-
alignItems: "center",
|
|
86
|
-
},
|
|
87
|
-
content: {
|
|
88
|
-
padding: 32,
|
|
89
|
-
borderRadius: 20,
|
|
90
|
-
alignItems: "center",
|
|
91
|
-
minWidth: 200,
|
|
92
|
-
},
|
|
93
|
-
title: {
|
|
94
|
-
marginTop: 16,
|
|
95
|
-
textAlign: "center",
|
|
96
|
-
},
|
|
97
|
-
progressContainer: {
|
|
98
|
-
marginTop: 16,
|
|
99
|
-
alignItems: "center",
|
|
100
|
-
width: "100%",
|
|
101
|
-
},
|
|
102
|
-
progressBar: {
|
|
103
|
-
width: "100%",
|
|
104
|
-
height: 6,
|
|
105
|
-
borderRadius: 3,
|
|
106
|
-
overflow: "hidden",
|
|
107
|
-
marginBottom: 8,
|
|
108
|
-
},
|
|
109
|
-
progressFill: {
|
|
110
|
-
height: "100%",
|
|
111
|
-
borderRadius: 3,
|
|
112
|
-
},
|
|
113
|
-
});
|