@umituz/react-native-ai-generation-content 1.17.240 → 1.17.242
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.
|
|
3
|
+
"version": "1.17.242",
|
|
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:
|
|
76
|
+
paddingHorizontal: 20,
|
|
61
77
|
borderRadius: 16,
|
|
62
78
|
gap: 8,
|
|
63
|
-
minWidth:
|
|
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
|
|
|
@@ -31,6 +31,7 @@ interface CreationsGalleryScreenProps {
|
|
|
31
31
|
readonly onEmptyAction?: () => void;
|
|
32
32
|
readonly emptyActionLabel?: string;
|
|
33
33
|
readonly showFilter?: boolean;
|
|
34
|
+
readonly onViewResult?: (creation: Creation) => void;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
export function CreationsGalleryScreen({
|
|
@@ -43,6 +44,7 @@ export function CreationsGalleryScreen({
|
|
|
43
44
|
onEmptyAction,
|
|
44
45
|
emptyActionLabel,
|
|
45
46
|
showFilter = config.showFilter ?? true,
|
|
47
|
+
onViewResult,
|
|
46
48
|
}: CreationsGalleryScreenProps) {
|
|
47
49
|
const insets = useSafeAreaInsets();
|
|
48
50
|
const tokens = useAppDesignTokens();
|
|
@@ -155,7 +157,7 @@ export function CreationsGalleryScreen({
|
|
|
155
157
|
), [isLoading, creations, filters.isFiltered, tokens, t, config, emptyActionLabel, onEmptyAction, filters.clearAllFilters]);
|
|
156
158
|
|
|
157
159
|
if (selectedCreation) {
|
|
158
|
-
return <CreationDetailScreen creation={selectedCreation} config={config} onClose={() => setSelectedCreation(null)} onShare={handleShare} onDelete={handleDelete} t={t} />;
|
|
160
|
+
return <CreationDetailScreen creation={selectedCreation} config={config} onClose={() => setSelectedCreation(null)} onShare={handleShare} onDelete={handleDelete} onViewResult={onViewResult} t={t} />;
|
|
159
161
|
}
|
|
160
162
|
|
|
161
163
|
return (
|