@umituz/react-native-ai-generation-content 1.17.243 → 1.17.244

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.243",
3
+ "version": "1.17.244",
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",
@@ -4,9 +4,10 @@
4
4
  */
5
5
 
6
6
  import React, { useMemo } from "react";
7
- import { StyleSheet, View } from "react-native";
7
+ import { StyleSheet, View, TouchableOpacity, ActivityIndicator } from "react-native";
8
8
  import {
9
- AtomicButton,
9
+ AtomicIcon,
10
+ AtomicText,
10
11
  useAppDesignTokens,
11
12
  } from "@umituz/react-native-design-system";
12
13
  import type { ResultActionBarProps } from "../types/result-preview.types";
@@ -19,9 +20,7 @@ export const ResultActionBar: React.FC<ResultActionBarProps> = ({
19
20
  onTryAgain,
20
21
  onRate,
21
22
  saveButtonText,
22
- saveButtonLoadingText,
23
23
  shareButtonText,
24
- shareButtonLoadingText,
25
24
  tryAgainButtonText,
26
25
  rateButtonText,
27
26
  }) => {
@@ -32,17 +31,37 @@ export const ResultActionBar: React.FC<ResultActionBarProps> = ({
32
31
  StyleSheet.create({
33
32
  container: {
34
33
  marginTop: tokens.spacing.xl,
35
- gap: tokens.spacing.md,
34
+ paddingHorizontal: tokens.spacing.md,
36
35
  },
37
- buttonRow: {
36
+ gridContainer: {
38
37
  flexDirection: "row",
38
+ justifyContent: "space-between",
39
39
  gap: tokens.spacing.md,
40
40
  },
41
- button: {
41
+ actionButton: {
42
42
  flex: 1,
43
+ alignItems: "center",
44
+ gap: tokens.spacing.sm,
45
+ },
46
+ iconContainer: {
47
+ width: 56,
48
+ height: 56,
49
+ borderRadius: 28,
50
+ alignItems: "center",
51
+ justifyContent: "center",
52
+ },
53
+ iconContainerSecondary: {
54
+ backgroundColor: tokens.colors.backgroundSecondary,
55
+ borderWidth: 1,
56
+ borderColor: tokens.colors.borderPrimary,
57
+ },
58
+ iconContainerPrimary: {
59
+ backgroundColor: tokens.colors.primary,
43
60
  },
44
- fullWidthButton: {
45
- width: "100%",
61
+ label: {
62
+ fontSize: 12,
63
+ fontWeight: "500",
64
+ color: tokens.colors.textSecondary,
46
65
  },
47
66
  }),
48
67
  [tokens],
@@ -50,40 +69,51 @@ export const ResultActionBar: React.FC<ResultActionBarProps> = ({
50
69
 
51
70
  return (
52
71
  <View style={styles.container}>
53
- <View style={styles.buttonRow}>
54
- <AtomicButton
55
- title={isSaving ? saveButtonLoadingText : saveButtonText}
72
+ <View style={styles.gridContainer}>
73
+ <TouchableOpacity
74
+ style={styles.actionButton}
56
75
  onPress={onDownload}
57
76
  disabled={isSaving}
58
- variant="outline"
59
- icon="download"
60
- style={styles.button}
61
- />
62
- <AtomicButton
63
- title={isSharing ? shareButtonLoadingText : shareButtonText}
77
+ >
78
+ <View style={[styles.iconContainer, styles.iconContainerSecondary]}>
79
+ {isSaving ? (
80
+ <ActivityIndicator color={tokens.colors.primary} />
81
+ ) : (
82
+ <AtomicIcon name="download" size="md" color="textPrimary" />
83
+ )}
84
+ </View>
85
+ <AtomicText style={styles.label}>{saveButtonText}</AtomicText>
86
+ </TouchableOpacity>
87
+
88
+ <TouchableOpacity
89
+ style={styles.actionButton}
64
90
  onPress={onShare}
65
91
  disabled={isSharing}
66
- variant="primary"
67
- icon="share-social"
68
- style={styles.button}
69
- />
70
- </View>
71
- <View style={styles.buttonRow}>
72
- <AtomicButton
73
- title={tryAgainButtonText}
74
- onPress={onTryAgain}
75
- variant="outline"
76
- icon="refresh"
77
- style={styles.button}
78
- />
92
+ >
93
+ <View style={[styles.iconContainer, styles.iconContainerPrimary]}>
94
+ {isSharing ? (
95
+ <ActivityIndicator color="#FFFFFF" />
96
+ ) : (
97
+ <AtomicIcon name="share" size="md" color="white" />
98
+ )}
99
+ </View>
100
+ <AtomicText style={styles.label}>{shareButtonText}</AtomicText>
101
+ </TouchableOpacity>
102
+
103
+ <TouchableOpacity style={styles.actionButton} onPress={onTryAgain}>
104
+ <View style={[styles.iconContainer, styles.iconContainerSecondary]}>
105
+ <AtomicIcon name="refresh-cw" size="md" color="textPrimary" />
106
+ </View>
107
+ <AtomicText style={styles.label}>{tryAgainButtonText}</AtomicText>
108
+ </TouchableOpacity>
109
+
79
110
  {onRate && rateButtonText && (
80
- <AtomicButton
81
- title={rateButtonText}
82
- onPress={onRate}
83
- variant="primary"
84
- icon="star"
85
- style={styles.button}
86
- />
111
+ <TouchableOpacity style={styles.actionButton} onPress={onRate}>
112
+ <View style={[styles.iconContainer, styles.iconContainerSecondary]}>
113
+ <AtomicIcon name="thumbs-up" size="md" color="textPrimary" />
114
+ </View>
115
+ <AtomicText style={styles.label}>{rateButtonText}</AtomicText>
116
+ </TouchableOpacity>
87
117
  )}
88
118
  </View>
89
119
  </View>
@@ -11,7 +11,7 @@ import type { ResultImageCardProps } from "../types/result-preview.types";
11
11
  export const ResultImageCard: React.FC<ResultImageCardProps> = ({
12
12
  imageUrl,
13
13
  style,
14
- rounded = true,
14
+ rounded = false,
15
15
  }) => {
16
16
  const tokens = useAppDesignTokens();
17
17
 
@@ -21,7 +21,7 @@ export const ResultImageCard: React.FC<ResultImageCardProps> = ({
21
21
  container: {
22
22
  width: "100%",
23
23
  aspectRatio: 3 / 4,
24
- borderRadius: rounded ? tokens.borders.radius.xl : 0,
24
+ borderRadius: rounded ? tokens.borders.radius.xl : tokens.borders.radius.lg,
25
25
  overflow: "hidden",
26
26
  backgroundColor: tokens.colors.backgroundSecondary,
27
27
  },