@umituz/react-native-ai-generation-content 1.17.62 → 1.17.64

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.17.62",
3
+ "version": "1.17.64",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -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
- <View style={styles.container}>
42
- <AtomicText
43
- type="headlineMedium"
44
- style={[styles.title, { color: tokens.colors.success }]}
45
- >
46
- {translations.successText}
47
- </AtomicText>
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
 
@@ -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
- <AtomicText
82
- type="headlineMedium"
83
- style={[styles.successText, { color: tokens.colors.success }]}
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
- </View>
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
  }
package/src/index.ts CHANGED
@@ -288,6 +288,7 @@ export {
288
288
  GenerateButton,
289
289
  // Display
290
290
  ResultDisplay,
291
+ AIGenerationResult,
291
292
  ErrorDisplay,
292
293
  // Headers
293
294
  FeatureHeader,
@@ -345,6 +346,8 @@ export type {
345
346
  // Display
346
347
  ResultDisplayProps,
347
348
  ResultDisplayAction,
349
+ AIGenerationResultProps,
350
+ AIGenerationResultAction,
348
351
  ErrorDisplayProps,
349
352
  // Headers
350
353
  FeatureHeaderProps,