@umituz/react-native-ai-generation-content 1.26.18 → 1.26.19
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.26.
|
|
3
|
+
"version": "1.26.19",
|
|
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",
|
|
@@ -95,6 +95,7 @@ export interface ScenarioMainCategory {
|
|
|
95
95
|
readonly descriptionKey?: string;
|
|
96
96
|
readonly icon?: string;
|
|
97
97
|
readonly emoji?: string;
|
|
98
|
+
readonly image?: string;
|
|
98
99
|
readonly order: number;
|
|
99
100
|
readonly subCategoryIds: readonly string[];
|
|
100
101
|
}
|
|
@@ -105,6 +106,7 @@ export interface ScenarioSubCategory {
|
|
|
105
106
|
readonly descriptionKey?: string;
|
|
106
107
|
readonly icon?: string;
|
|
107
108
|
readonly emoji?: string;
|
|
109
|
+
readonly image?: string;
|
|
108
110
|
readonly mainCategoryId: string;
|
|
109
111
|
readonly scenarioCategories: readonly string[];
|
|
110
112
|
readonly order: number;
|
|
@@ -5,15 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
import React, { useMemo, useCallback, useEffect } from "react";
|
|
7
7
|
import {
|
|
8
|
-
View,
|
|
9
8
|
FlatList,
|
|
10
9
|
StyleSheet,
|
|
11
|
-
TouchableOpacity,
|
|
12
10
|
type ListRenderItemInfo,
|
|
13
11
|
} from "react-native";
|
|
14
12
|
import {
|
|
15
|
-
|
|
16
|
-
AtomicIcon,
|
|
13
|
+
AtomicCard,
|
|
17
14
|
useAppDesignTokens,
|
|
18
15
|
ScreenLayout,
|
|
19
16
|
type DesignTokens,
|
|
@@ -68,60 +65,22 @@ export const MainCategoryScreen: React.FC<MainCategoryScreenProps> = ({
|
|
|
68
65
|
const title = t(item.titleKey);
|
|
69
66
|
const description = item.descriptionKey ? t(item.descriptionKey) : "";
|
|
70
67
|
|
|
68
|
+
// Always use AtomicCard now as we moved to visual cards
|
|
71
69
|
return (
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
]}
|
|
70
|
+
<AtomicCard
|
|
71
|
+
image={item.image}
|
|
72
|
+
// Fallback to emoji/icon if no image (though we expect images now)
|
|
73
|
+
leftIcon={!item.image && !item.emoji ? (item.icon as any) : undefined}
|
|
74
|
+
title={title}
|
|
75
|
+
subtitle={description}
|
|
76
|
+
imageAspectRatio={1.5}
|
|
80
77
|
onPress={() => handleCategoryPress(item.id)}
|
|
81
|
-
activeOpacity={0.7}
|
|
82
78
|
testID={`main-category-${item.id}`}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
<View
|
|
86
|
-
style={[
|
|
87
|
-
styles.iconContainer,
|
|
88
|
-
{ backgroundColor: tokens.colors.surfaceVariant },
|
|
89
|
-
]}
|
|
90
|
-
>
|
|
91
|
-
{item.emoji ? (
|
|
92
|
-
<AtomicText style={styles.emoji}>{item.emoji}</AtomicText>
|
|
93
|
-
) : (
|
|
94
|
-
<AtomicIcon name={item.icon as never} size="lg" color="primary" />
|
|
95
|
-
)}
|
|
96
|
-
</View>
|
|
97
|
-
<View style={styles.textContent}>
|
|
98
|
-
<AtomicText
|
|
99
|
-
style={[styles.title, { color: tokens.colors.textPrimary }]}
|
|
100
|
-
>
|
|
101
|
-
{title}
|
|
102
|
-
</AtomicText>
|
|
103
|
-
{description ? (
|
|
104
|
-
<AtomicText
|
|
105
|
-
style={[
|
|
106
|
-
styles.description,
|
|
107
|
-
{ color: tokens.colors.textSecondary },
|
|
108
|
-
]}
|
|
109
|
-
numberOfLines={2}
|
|
110
|
-
>
|
|
111
|
-
{description}
|
|
112
|
-
</AtomicText>
|
|
113
|
-
) : null}
|
|
114
|
-
</View>
|
|
115
|
-
<AtomicIcon
|
|
116
|
-
name="chevron-forward"
|
|
117
|
-
size="md"
|
|
118
|
-
color="textSecondary"
|
|
119
|
-
/>
|
|
120
|
-
</View>
|
|
121
|
-
</TouchableOpacity>
|
|
79
|
+
style={{ marginBottom: tokens.spacing.md }}
|
|
80
|
+
/>
|
|
122
81
|
);
|
|
123
82
|
},
|
|
124
|
-
[t, tokens,
|
|
83
|
+
[t, tokens, handleCategoryPress]
|
|
125
84
|
);
|
|
126
85
|
|
|
127
86
|
return (
|
|
@@ -153,7 +112,6 @@ export const MainCategoryScreen: React.FC<MainCategoryScreenProps> = ({
|
|
|
153
112
|
</ScreenLayout>
|
|
154
113
|
);
|
|
155
114
|
};
|
|
156
|
-
|
|
157
115
|
const createStyles = (tokens: DesignTokens) =>
|
|
158
116
|
StyleSheet.create({
|
|
159
117
|
listContent: {
|
|
@@ -161,38 +119,4 @@ const createStyles = (tokens: DesignTokens) =>
|
|
|
161
119
|
paddingBottom: tokens.spacing.xl,
|
|
162
120
|
gap: tokens.spacing.sm,
|
|
163
121
|
},
|
|
164
|
-
card: {
|
|
165
|
-
borderRadius: tokens.borders.radius.lg,
|
|
166
|
-
borderWidth: 1,
|
|
167
|
-
overflow: "hidden",
|
|
168
|
-
},
|
|
169
|
-
cardContent: {
|
|
170
|
-
flexDirection: "row",
|
|
171
|
-
alignItems: "center",
|
|
172
|
-
padding: tokens.spacing.md,
|
|
173
|
-
},
|
|
174
|
-
iconContainer: {
|
|
175
|
-
width: 56,
|
|
176
|
-
height: 56,
|
|
177
|
-
borderRadius: 28,
|
|
178
|
-
justifyContent: "center",
|
|
179
|
-
alignItems: "center",
|
|
180
|
-
marginRight: tokens.spacing.md,
|
|
181
|
-
},
|
|
182
|
-
emoji: {
|
|
183
|
-
fontSize: 28,
|
|
184
|
-
},
|
|
185
|
-
textContent: {
|
|
186
|
-
flex: 1,
|
|
187
|
-
marginRight: tokens.spacing.sm,
|
|
188
|
-
},
|
|
189
|
-
title: {
|
|
190
|
-
fontSize: 17,
|
|
191
|
-
fontWeight: "700",
|
|
192
|
-
marginBottom: 2,
|
|
193
|
-
},
|
|
194
|
-
description: {
|
|
195
|
-
fontSize: 14,
|
|
196
|
-
lineHeight: 18,
|
|
197
|
-
},
|
|
198
122
|
});
|
|
@@ -5,15 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
import React, { useMemo, useCallback, useEffect } from "react";
|
|
7
7
|
import {
|
|
8
|
-
View,
|
|
9
8
|
FlatList,
|
|
10
9
|
StyleSheet,
|
|
11
|
-
TouchableOpacity,
|
|
12
10
|
type ListRenderItemInfo,
|
|
13
11
|
} from "react-native";
|
|
14
12
|
import {
|
|
15
|
-
|
|
16
|
-
AtomicIcon,
|
|
13
|
+
AtomicCard,
|
|
17
14
|
useAppDesignTokens,
|
|
18
15
|
ScreenLayout,
|
|
19
16
|
type DesignTokens,
|
|
@@ -87,59 +84,21 @@ export const SubCategoryScreen: React.FC<SubCategoryScreenProps> = ({
|
|
|
87
84
|
const description = item.descriptionKey ? t(item.descriptionKey) : "";
|
|
88
85
|
|
|
89
86
|
return (
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
87
|
+
<AtomicCard
|
|
88
|
+
image={item.image}
|
|
89
|
+
leftIcon={!item.emoji ? (item.icon as any) : undefined}
|
|
90
|
+
badge={item.emoji}
|
|
91
|
+
title={title}
|
|
92
|
+
subtitle={description}
|
|
93
|
+
// Smaller aspect ratio for subcategories if they have images, or standard if not
|
|
94
|
+
imageAspectRatio={item.image ? 1.5 : undefined}
|
|
98
95
|
onPress={() => handleSubCategoryPress(item.id)}
|
|
99
|
-
activeOpacity={0.7}
|
|
100
96
|
testID={`sub-category-${item.id}`}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
<View
|
|
104
|
-
style={[
|
|
105
|
-
styles.iconContainer,
|
|
106
|
-
{ backgroundColor: tokens.colors.surfaceVariant },
|
|
107
|
-
]}
|
|
108
|
-
>
|
|
109
|
-
{item.emoji ? (
|
|
110
|
-
<AtomicText style={styles.emoji}>{item.emoji}</AtomicText>
|
|
111
|
-
) : (
|
|
112
|
-
<AtomicIcon name={item.icon as never} size="lg" color="primary" />
|
|
113
|
-
)}
|
|
114
|
-
</View>
|
|
115
|
-
<View style={styles.textContent}>
|
|
116
|
-
<AtomicText
|
|
117
|
-
style={[styles.title, { color: tokens.colors.textPrimary }]}
|
|
118
|
-
>
|
|
119
|
-
{title}
|
|
120
|
-
</AtomicText>
|
|
121
|
-
{description ? (
|
|
122
|
-
<AtomicText
|
|
123
|
-
style={[
|
|
124
|
-
styles.description,
|
|
125
|
-
{ color: tokens.colors.textSecondary },
|
|
126
|
-
]}
|
|
127
|
-
numberOfLines={2}
|
|
128
|
-
>
|
|
129
|
-
{description}
|
|
130
|
-
</AtomicText>
|
|
131
|
-
) : null}
|
|
132
|
-
</View>
|
|
133
|
-
<AtomicIcon
|
|
134
|
-
name="chevron-forward"
|
|
135
|
-
size="md"
|
|
136
|
-
color="textSecondary"
|
|
137
|
-
/>
|
|
138
|
-
</View>
|
|
139
|
-
</TouchableOpacity>
|
|
97
|
+
style={{ marginBottom: tokens.spacing.md }}
|
|
98
|
+
/>
|
|
140
99
|
);
|
|
141
100
|
},
|
|
142
|
-
[t, tokens,
|
|
101
|
+
[t, tokens, handleSubCategoryPress]
|
|
143
102
|
);
|
|
144
103
|
|
|
145
104
|
return (
|
|
@@ -179,38 +138,4 @@ const createStyles = (tokens: DesignTokens) =>
|
|
|
179
138
|
paddingBottom: tokens.spacing.xl,
|
|
180
139
|
gap: tokens.spacing.sm,
|
|
181
140
|
},
|
|
182
|
-
card: {
|
|
183
|
-
borderRadius: tokens.borders.radius.lg,
|
|
184
|
-
borderWidth: 1,
|
|
185
|
-
overflow: "hidden",
|
|
186
|
-
},
|
|
187
|
-
cardContent: {
|
|
188
|
-
flexDirection: "row",
|
|
189
|
-
alignItems: "center",
|
|
190
|
-
padding: tokens.spacing.md,
|
|
191
|
-
},
|
|
192
|
-
iconContainer: {
|
|
193
|
-
width: 56,
|
|
194
|
-
height: 56,
|
|
195
|
-
borderRadius: 28,
|
|
196
|
-
justifyContent: "center",
|
|
197
|
-
alignItems: "center",
|
|
198
|
-
marginRight: tokens.spacing.md,
|
|
199
|
-
},
|
|
200
|
-
emoji: {
|
|
201
|
-
fontSize: 28,
|
|
202
|
-
},
|
|
203
|
-
textContent: {
|
|
204
|
-
flex: 1,
|
|
205
|
-
marginRight: tokens.spacing.sm,
|
|
206
|
-
},
|
|
207
|
-
title: {
|
|
208
|
-
fontSize: 17,
|
|
209
|
-
fontWeight: "700",
|
|
210
|
-
marginBottom: 2,
|
|
211
|
-
},
|
|
212
|
-
description: {
|
|
213
|
-
fontSize: 14,
|
|
214
|
-
lineHeight: 18,
|
|
215
|
-
},
|
|
216
141
|
});
|