@umituz/react-native-ai-generation-content 1.17.121 → 1.17.123
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 +11 -11
- package/src/domains/creations/domain/entities/Creation.ts +1 -1
- package/src/domains/creations/infrastructure/repositories/CreationsWriter.ts +1 -1
- package/src/index.ts +2 -0
- package/src/presentation/components/headers/CreditBadge.tsx +58 -0
- package/src/presentation/components/headers/index.ts +1 -0
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.123",
|
|
4
4
|
"description": "Provider-agnostic AI generation orchestration for React Native",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"url": "git+https://github.com/umituz/react-native-ai-generation-content.git"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@umituz/react-native-design-system": "
|
|
42
|
-
"@umituz/react-native-firebase": "
|
|
43
|
-
"@umituz/react-native-image": "
|
|
44
|
-
"@umituz/react-native-offline": "
|
|
45
|
-
"@umituz/react-native-tanstack": "
|
|
46
|
-
"@umituz/react-native-timezone": "
|
|
47
|
-
"@umituz/react-native-uuid": "
|
|
41
|
+
"@umituz/react-native-design-system": "latest",
|
|
42
|
+
"@umituz/react-native-firebase": "latest",
|
|
43
|
+
"@umituz/react-native-image": "latest",
|
|
44
|
+
"@umituz/react-native-offline": "latest",
|
|
45
|
+
"@umituz/react-native-tanstack": "latest",
|
|
46
|
+
"@umituz/react-native-timezone": "latest",
|
|
47
|
+
"@umituz/react-native-uuid": "latest"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@react-navigation/native": ">=6.0.0",
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
"@umituz/react-native-design-system": "latest",
|
|
71
71
|
"@umituz/react-native-firebase": "latest",
|
|
72
72
|
"@umituz/react-native-haptics": "latest",
|
|
73
|
-
"@umituz/react-native-image": "
|
|
73
|
+
"@umituz/react-native-image": "latest",
|
|
74
74
|
"@umituz/react-native-localization": "latest",
|
|
75
|
-
"@umituz/react-native-offline": "
|
|
75
|
+
"@umituz/react-native-offline": "latest",
|
|
76
76
|
"@umituz/react-native-storage": "latest",
|
|
77
77
|
"@umituz/react-native-tanstack": "latest",
|
|
78
78
|
"@umituz/react-native-timezone": "latest",
|
|
79
|
-
"@umituz/react-native-uuid": "
|
|
79
|
+
"@umituz/react-native-uuid": "latest",
|
|
80
80
|
"eslint": "^9.0.0",
|
|
81
81
|
"expo-application": "^7.0.8",
|
|
82
82
|
"expo-clipboard": "^8.0.8",
|
|
@@ -46,7 +46,7 @@ export interface CreationDocument {
|
|
|
46
46
|
readonly transformationType?: string;
|
|
47
47
|
readonly type?: string;
|
|
48
48
|
readonly status?: string;
|
|
49
|
-
readonly output?: CreationOutput;
|
|
49
|
+
readonly output?: CreationOutput | null;
|
|
50
50
|
readonly isShared: boolean;
|
|
51
51
|
readonly isFavorite?: boolean;
|
|
52
52
|
readonly createdAt: FirebaseTimestamp | Date;
|
package/src/index.ts
CHANGED
|
@@ -321,6 +321,7 @@ export {
|
|
|
321
321
|
// Headers
|
|
322
322
|
FeatureHeader,
|
|
323
323
|
AIGenScreenHeader,
|
|
324
|
+
CreditBadge,
|
|
324
325
|
|
|
325
326
|
// Photo Upload
|
|
326
327
|
PhotoUploadCard,
|
|
@@ -380,6 +381,7 @@ export type {
|
|
|
380
381
|
FeatureHeaderProps,
|
|
381
382
|
AIGenScreenHeaderProps,
|
|
382
383
|
NavigationButtonType,
|
|
384
|
+
CreditBadgeProps,
|
|
383
385
|
|
|
384
386
|
// Photo Upload
|
|
385
387
|
PhotoUploadCardProps,
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View, StyleSheet } from "react-native";
|
|
3
|
+
import {
|
|
4
|
+
AtomicText,
|
|
5
|
+
AtomicIcon,
|
|
6
|
+
useAppDesignTokens,
|
|
7
|
+
} from "@umituz/react-native-design-system";
|
|
8
|
+
|
|
9
|
+
export interface CreditBadgeProps {
|
|
10
|
+
readonly credits: number;
|
|
11
|
+
readonly iconName?: string;
|
|
12
|
+
readonly compact?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const CreditBadge: React.FC<CreditBadgeProps> = ({
|
|
16
|
+
credits,
|
|
17
|
+
iconName = "flash",
|
|
18
|
+
compact = false,
|
|
19
|
+
}) => {
|
|
20
|
+
const tokens = useAppDesignTokens();
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<View
|
|
24
|
+
style={[
|
|
25
|
+
styles.container,
|
|
26
|
+
compact && styles.compact,
|
|
27
|
+
{ backgroundColor: tokens.colors.surface },
|
|
28
|
+
]}
|
|
29
|
+
>
|
|
30
|
+
<AtomicIcon name={iconName} size="sm" color="warning" />
|
|
31
|
+
<AtomicText
|
|
32
|
+
type={compact ? "labelSmall" : "labelMedium"}
|
|
33
|
+
style={[styles.text, { color: tokens.colors.textPrimary }]}
|
|
34
|
+
>
|
|
35
|
+
{credits}
|
|
36
|
+
</AtomicText>
|
|
37
|
+
</View>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const styles = StyleSheet.create({
|
|
42
|
+
container: {
|
|
43
|
+
flexDirection: "row",
|
|
44
|
+
alignItems: "center",
|
|
45
|
+
paddingHorizontal: 10,
|
|
46
|
+
paddingVertical: 6,
|
|
47
|
+
borderRadius: 16,
|
|
48
|
+
gap: 4,
|
|
49
|
+
},
|
|
50
|
+
compact: {
|
|
51
|
+
paddingHorizontal: 8,
|
|
52
|
+
paddingVertical: 4,
|
|
53
|
+
borderRadius: 12,
|
|
54
|
+
},
|
|
55
|
+
text: {
|
|
56
|
+
fontWeight: "600",
|
|
57
|
+
},
|
|
58
|
+
});
|