@umituz/react-native-ai-generation-content 1.83.15 → 1.83.16
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.83.
|
|
3
|
+
"version": "1.83.16",
|
|
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",
|
|
@@ -40,8 +40,8 @@ export function CreationCard({
|
|
|
40
40
|
if (__DEV__) {
|
|
41
41
|
console.log("[CreationCard] RENDER", {
|
|
42
42
|
creationId: creation.id,
|
|
43
|
-
hasOnPress: !!callbacks
|
|
44
|
-
callbacksKeys: Object.keys(callbacks),
|
|
43
|
+
hasOnPress: !!callbacks?.onPress,
|
|
44
|
+
callbacksKeys: callbacks ? Object.keys(callbacks) : [],
|
|
45
45
|
status: creation.status,
|
|
46
46
|
type: creation.type,
|
|
47
47
|
output: creation.output,
|
|
@@ -54,7 +54,7 @@ export function CreationCard({
|
|
|
54
54
|
const title = titleText || getCreationTitle(creation.prompt, creation.type as CreationTypeId);
|
|
55
55
|
const formattedDate = useCreationDateFormatter(creation.createdAt, formatDate);
|
|
56
56
|
const actions = useCreationCardActions({
|
|
57
|
-
callbacks,
|
|
57
|
+
callbacks: callbacks ?? EMPTY_CALLBACKS,
|
|
58
58
|
creation,
|
|
59
59
|
isSharing,
|
|
60
60
|
isDownloadAvailable,
|
|
@@ -65,10 +65,10 @@ export function CreationCard({
|
|
|
65
65
|
if (__DEV__) {
|
|
66
66
|
console.log("[CreationCard] handlePress TRIGGERED", {
|
|
67
67
|
creationId: creation.id,
|
|
68
|
-
hasOnPress: !!callbacks
|
|
68
|
+
hasOnPress: !!callbacks?.onPress,
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
callbacks
|
|
71
|
+
callbacks?.onPress?.(creation);
|
|
72
72
|
}, [callbacks, creation]);
|
|
73
73
|
|
|
74
74
|
const styles = useMemo(
|
|
@@ -109,7 +109,7 @@ export function CreationCard({
|
|
|
109
109
|
}
|
|
110
110
|
}, [creation.id]);
|
|
111
111
|
|
|
112
|
-
const isDisabled = !callbacks
|
|
112
|
+
const isDisabled = !callbacks?.onPress;
|
|
113
113
|
|
|
114
114
|
if (__DEV__ && isDisabled) {
|
|
115
115
|
console.log("[CreationCard] WARNING: Card is DISABLED - onPress is falsy");
|
|
@@ -120,7 +120,7 @@ export function CreationCard({
|
|
|
120
120
|
style={styles.card}
|
|
121
121
|
onPress={handlePress}
|
|
122
122
|
onPressIn={handlePressIn}
|
|
123
|
-
activeOpacity={callbacks
|
|
123
|
+
activeOpacity={callbacks?.onPress ? 0.7 : 1}
|
|
124
124
|
disabled={isDisabled}
|
|
125
125
|
>
|
|
126
126
|
<View style={styles.previewContainer} pointerEvents="box-none">
|