@umituz/react-native-ai-generation-content 1.17.239 → 1.17.240
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.240",
|
|
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",
|
|
@@ -30,6 +30,8 @@ export interface Creation {
|
|
|
30
30
|
readonly createdAt: Date;
|
|
31
31
|
readonly isShared: boolean;
|
|
32
32
|
readonly isFavorite: boolean;
|
|
33
|
+
readonly rating?: number;
|
|
34
|
+
readonly ratedAt?: Date;
|
|
33
35
|
// Extended fields for job-based creations
|
|
34
36
|
readonly status?: CreationStatus;
|
|
35
37
|
readonly output?: CreationOutput;
|
|
@@ -49,6 +51,8 @@ export interface CreationDocument {
|
|
|
49
51
|
readonly output?: CreationOutput | null;
|
|
50
52
|
readonly isShared: boolean;
|
|
51
53
|
readonly isFavorite?: boolean;
|
|
54
|
+
readonly rating?: number;
|
|
55
|
+
readonly ratedAt?: FirebaseTimestamp | Date;
|
|
52
56
|
readonly createdAt: FirebaseTimestamp | Date;
|
|
53
57
|
readonly completedAt?: FirebaseTimestamp | Date;
|
|
54
58
|
}
|
|
@@ -78,6 +82,13 @@ export function mapDocumentToCreation(
|
|
|
78
82
|
data.uri ||
|
|
79
83
|
"";
|
|
80
84
|
|
|
85
|
+
let ratedAtDate: Date | undefined;
|
|
86
|
+
if (data.ratedAt instanceof Date) {
|
|
87
|
+
ratedAtDate = data.ratedAt;
|
|
88
|
+
} else if (data.ratedAt && typeof data.ratedAt === "object" && "toDate" in data.ratedAt && typeof data.ratedAt.toDate === "function") {
|
|
89
|
+
ratedAtDate = data.ratedAt.toDate();
|
|
90
|
+
}
|
|
91
|
+
|
|
81
92
|
return {
|
|
82
93
|
id,
|
|
83
94
|
uri,
|
|
@@ -88,6 +99,8 @@ export function mapDocumentToCreation(
|
|
|
88
99
|
createdAt: creationDate,
|
|
89
100
|
isShared: data.isShared ?? false,
|
|
90
101
|
isFavorite: data.isFavorite ?? false,
|
|
102
|
+
rating: data.rating,
|
|
103
|
+
ratedAt: ratedAtDate,
|
|
91
104
|
status: data.status as CreationStatus | undefined,
|
|
92
105
|
output: data.output ?? undefined,
|
|
93
106
|
};
|
|
@@ -55,7 +55,7 @@ export const ResultActionBar: React.FC<ResultActionBarProps> = ({
|
|
|
55
55
|
title={isSaving ? saveButtonLoadingText : saveButtonText}
|
|
56
56
|
onPress={onDownload}
|
|
57
57
|
disabled={isSaving}
|
|
58
|
-
variant="
|
|
58
|
+
variant="outline"
|
|
59
59
|
icon="download"
|
|
60
60
|
style={styles.button}
|
|
61
61
|
/>
|
|
@@ -63,7 +63,7 @@ export const ResultActionBar: React.FC<ResultActionBarProps> = ({
|
|
|
63
63
|
title={isSharing ? shareButtonLoadingText : shareButtonText}
|
|
64
64
|
onPress={onShare}
|
|
65
65
|
disabled={isSharing}
|
|
66
|
-
variant="
|
|
66
|
+
variant="primary"
|
|
67
67
|
icon="share-social"
|
|
68
68
|
style={styles.button}
|
|
69
69
|
/>
|
|
@@ -72,7 +72,7 @@ export const ResultActionBar: React.FC<ResultActionBarProps> = ({
|
|
|
72
72
|
<AtomicButton
|
|
73
73
|
title={tryAgainButtonText}
|
|
74
74
|
onPress={onTryAgain}
|
|
75
|
-
variant="
|
|
75
|
+
variant="outline"
|
|
76
76
|
icon="refresh"
|
|
77
77
|
style={styles.button}
|
|
78
78
|
/>
|
|
@@ -80,7 +80,7 @@ export const ResultActionBar: React.FC<ResultActionBarProps> = ({
|
|
|
80
80
|
<AtomicButton
|
|
81
81
|
title={rateButtonText}
|
|
82
82
|
onPress={onRate}
|
|
83
|
-
variant="
|
|
83
|
+
variant="primary"
|
|
84
84
|
icon="star"
|
|
85
85
|
style={styles.button}
|
|
86
86
|
/>
|