@umituz/react-native-ai-generation-content 1.17.240 → 1.17.241

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.240",
3
+ "version": "1.17.241",
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",
@@ -6,21 +6,36 @@ import { AtomicText, AtomicIcon, useAppDesignTokens, type DesignTokens } from "@
6
6
  interface DetailActionsProps {
7
7
  readonly onShare: () => void;
8
8
  readonly onDelete: () => void;
9
+ readonly onViewResult?: () => void;
9
10
  readonly shareLabel: string;
10
11
  readonly deleteLabel: string;
12
+ readonly viewResultLabel?: string;
11
13
  }
12
14
 
13
15
  export const DetailActions: React.FC<DetailActionsProps> = ({
14
16
  onShare,
15
17
  onDelete,
18
+ onViewResult,
16
19
  shareLabel,
17
- deleteLabel
20
+ deleteLabel,
21
+ viewResultLabel
18
22
  }) => {
19
23
  const tokens = useAppDesignTokens();
20
24
  const styles = useStyles(tokens);
21
25
 
22
26
  return (
23
27
  <View style={styles.container}>
28
+ {onViewResult && viewResultLabel && (
29
+ <TouchableOpacity
30
+ style={[styles.button, styles.viewResultButton]}
31
+ onPress={onViewResult}
32
+ activeOpacity={0.7}
33
+ >
34
+ <AtomicIcon name="eye-outline" size="sm" color="onPrimary" />
35
+ <AtomicText style={styles.buttonText}>{viewResultLabel}</AtomicText>
36
+ </TouchableOpacity>
37
+ )}
38
+
24
39
  <TouchableOpacity
25
40
  style={[styles.button, styles.shareButton]}
26
41
  onPress={onShare}
@@ -48,6 +63,7 @@ const useStyles = (tokens: DesignTokens) => StyleSheet.create({
48
63
  container: {
49
64
  flexDirection: 'row',
50
65
  justifyContent: 'center',
66
+ flexWrap: 'wrap',
51
67
  gap: tokens.spacing.md,
52
68
  paddingHorizontal: tokens.spacing.lg,
53
69
  marginBottom: tokens.spacing.xxl,
@@ -57,10 +73,13 @@ const useStyles = (tokens: DesignTokens) => StyleSheet.create({
57
73
  alignItems: 'center',
58
74
  justifyContent: 'center',
59
75
  paddingVertical: 12,
60
- paddingHorizontal: 24,
76
+ paddingHorizontal: 20,
61
77
  borderRadius: 16,
62
78
  gap: 8,
63
- minWidth: 120,
79
+ minWidth: 110,
80
+ },
81
+ viewResultButton: {
82
+ backgroundColor: tokens.colors.primary,
64
83
  },
65
84
  shareButton: {
66
85
  backgroundColor: tokens.colors.primary,
@@ -21,6 +21,7 @@ interface CreationDetailScreenProps {
21
21
  readonly onClose: () => void;
22
22
  readonly onShare: (creation: Creation) => void;
23
23
  readonly onDelete: (creation: Creation) => void;
24
+ readonly onViewResult?: (creation: Creation) => void;
24
25
  readonly t: (key: string) => string;
25
26
  }
26
27
 
@@ -37,6 +38,7 @@ export const CreationDetailScreen: React.FC<CreationDetailScreenProps> = ({
37
38
  onClose,
38
39
  onShare,
39
40
  onDelete,
41
+ onViewResult,
40
42
  t
41
43
  }) => {
42
44
  const tokens = useAppDesignTokens();
@@ -100,8 +102,10 @@ export const CreationDetailScreen: React.FC<CreationDetailScreenProps> = ({
100
102
  <DetailActions
101
103
  onShare={() => onShare(creation)}
102
104
  onDelete={() => onDelete(creation)}
105
+ onViewResult={onViewResult ? () => onViewResult(creation) : undefined}
103
106
  shareLabel={t("result.shareButton")}
104
107
  deleteLabel={t("common.delete")}
108
+ viewResultLabel={onViewResult ? t("result.viewResult") : undefined}
105
109
  />
106
110
  </ScrollView>
107
111