@umituz/react-native-ai-generation-content 1.17.273 → 1.17.275

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.273",
3
+ "version": "1.17.275",
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",
@@ -97,10 +97,12 @@ export function CreationActions({
97
97
  action.filled && styles.actionButtonFilled,
98
98
  action.disabled && styles.actionButtonDisabled,
99
99
  ]}
100
- onPress={action.onPress}
100
+ onPress={(e) => {
101
+ e.stopPropagation();
102
+ action.onPress();
103
+ }}
101
104
  disabled={action.disabled || action.loading}
102
105
  activeOpacity={0.7}
103
- hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }}
104
106
  >
105
107
  {action.loading ? (
106
108
  <AtomicSpinner
@@ -33,6 +33,15 @@ export function CreationCard({
33
33
  }: CreationCardProps) {
34
34
  const tokens = useAppDesignTokens();
35
35
 
36
+ // Debug: Log at render time to verify callbacks
37
+ if (__DEV__) {
38
+ console.log("[CreationCard] RENDER", {
39
+ creationId: creation.id,
40
+ hasOnPress: !!callbacks.onPress,
41
+ callbacksKeys: Object.keys(callbacks),
42
+ });
43
+ }
44
+
36
45
  const previewUrl = getPreviewUrl(creation.output) || creation.uri;
37
46
  const title = getCreationTitle(creation.prompt, creation.type as CreationTypeId);
38
47
  const formattedDate = useCreationDateFormatter(creation.createdAt, formatDate);
@@ -45,6 +54,12 @@ export function CreationCard({
45
54
  });
46
55
 
47
56
  const handlePress = useCallback(() => {
57
+ if (__DEV__) {
58
+ console.log("[CreationCard] handlePress TRIGGERED", {
59
+ creationId: creation.id,
60
+ hasOnPress: !!callbacks.onPress,
61
+ });
62
+ }
48
63
  callbacks.onPress?.(creation);
49
64
  }, [callbacks, creation]);
50
65
 
@@ -80,14 +95,27 @@ export function CreationCard({
80
95
  [tokens]
81
96
  );
82
97
 
98
+ const handlePressIn = useCallback(() => {
99
+ if (__DEV__) {
100
+ console.log("[CreationCard] PRESS_IN detected", { creationId: creation.id });
101
+ }
102
+ }, [creation.id]);
103
+
104
+ const isDisabled = !callbacks.onPress;
105
+
106
+ if (__DEV__ && isDisabled) {
107
+ console.log("[CreationCard] WARNING: Card is DISABLED - onPress is falsy");
108
+ }
109
+
83
110
  return (
84
111
  <TouchableOpacity
85
112
  style={styles.card}
86
113
  onPress={handlePress}
114
+ onPressIn={handlePressIn}
87
115
  activeOpacity={callbacks.onPress ? 0.7 : 1}
88
- disabled={!callbacks.onPress}
116
+ disabled={isDisabled}
89
117
  >
90
- <View style={styles.previewContainer}>
118
+ <View style={styles.previewContainer} pointerEvents="box-none">
91
119
  <CreationPreview
92
120
  uri={previewUrl}
93
121
  status={creation.status || "completed"}
@@ -103,9 +131,9 @@ export function CreationCard({
103
131
  )}
104
132
  </View>
105
133
 
106
- <View style={styles.content}>
107
- <View style={styles.header}>
108
- <View style={styles.titleContainer}>
134
+ <View style={styles.content} pointerEvents="box-none">
135
+ <View style={styles.header} pointerEvents="box-none">
136
+ <View style={styles.titleContainer} pointerEvents="box-none">
109
137
  <AtomicText type="bodyMedium" style={styles.title} numberOfLines={2}>
110
138
  {title}
111
139
  </AtomicText>
@@ -103,17 +103,27 @@ export function CreationsGalleryScreen({
103
103
  return buttons;
104
104
  }, [showStatusFilter, showMediaFilter, filters, t, config.translations]);
105
105
 
106
+ const handleCardPress = useCallback((item: Creation) => {
107
+ if (__DEV__) {
108
+ console.log("[CreationsGalleryScreen] Card pressed", {
109
+ creationId: item.id,
110
+ hasOnViewResult: !!onViewResult
111
+ });
112
+ }
113
+ onViewResult?.(item);
114
+ }, [onViewResult]);
115
+
106
116
  const renderItem = useCallback(({ item }: { item: Creation }) => (
107
117
  <CreationCard
108
118
  creation={item}
109
119
  callbacks={{
110
- onPress: () => onViewResult?.(item),
120
+ onPress: () => handleCardPress(item),
111
121
  onShare: async () => handleShare(item),
112
122
  onDelete: () => handleDelete(item),
113
123
  onFavorite: () => handleFavorite(item, !item.isFavorite),
114
124
  }}
115
125
  />
116
- ), [handleShare, handleDelete, handleFavorite, onViewResult]);
126
+ ), [handleShare, handleDelete, handleFavorite, handleCardPress]);
117
127
 
118
128
  const renderHeader = useMemo(() => {
119
129
  if ((!creations || creations.length === 0) && !isLoading) return null;