@umituz/react-native-ai-generation-content 1.17.274 → 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.274",
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);
@@ -46,9 +55,9 @@ export function CreationCard({
46
55
 
47
56
  const handlePress = useCallback(() => {
48
57
  if (__DEV__) {
49
- console.log("[CreationCard] handlePress called", {
58
+ console.log("[CreationCard] handlePress TRIGGERED", {
50
59
  creationId: creation.id,
51
- hasOnPress: !!callbacks.onPress
60
+ hasOnPress: !!callbacks.onPress,
52
61
  });
53
62
  }
54
63
  callbacks.onPress?.(creation);
@@ -86,14 +95,27 @@ export function CreationCard({
86
95
  [tokens]
87
96
  );
88
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
+
89
110
  return (
90
111
  <TouchableOpacity
91
112
  style={styles.card}
92
113
  onPress={handlePress}
114
+ onPressIn={handlePressIn}
93
115
  activeOpacity={callbacks.onPress ? 0.7 : 1}
94
- disabled={!callbacks.onPress}
116
+ disabled={isDisabled}
95
117
  >
96
- <View style={styles.previewContainer}>
118
+ <View style={styles.previewContainer} pointerEvents="box-none">
97
119
  <CreationPreview
98
120
  uri={previewUrl}
99
121
  status={creation.status || "completed"}
@@ -109,9 +131,9 @@ export function CreationCard({
109
131
  )}
110
132
  </View>
111
133
 
112
- <View style={styles.content}>
113
- <View style={styles.header}>
114
- <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">
115
137
  <AtomicText type="bodyMedium" style={styles.title} numberOfLines={2}>
116
138
  {title}
117
139
  </AtomicText>