@umituz/react-native-ai-generation-content 1.83.21 → 1.83.23

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.21",
3
+ "version": "1.83.23",
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",
@@ -18,10 +18,15 @@ export const GalleryScreenHeader: React.FC<GalleryScreenHeaderProps> = ({ title,
18
18
 
19
19
  return (
20
20
  <View style={styles.screenHeader}>
21
- <TouchableOpacity onPress={onBack} style={styles.backButton}>
21
+ <TouchableOpacity
22
+ onPress={onBack}
23
+ style={styles.backButton}
24
+ activeOpacity={0.6}
25
+ hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }}
26
+ >
22
27
  <AtomicIcon
23
- name="chevron-left"
24
- customSize={28}
28
+ name="chevron-back"
29
+ customSize={24}
25
30
  customColor={tokens.colors.textPrimary}
26
31
  />
27
32
  </TouchableOpacity>
@@ -46,9 +51,12 @@ const createStyles = (tokens: DesignTokens) =>
46
51
  gap: tokens.spacing.md,
47
52
  },
48
53
  backButton: {
49
- padding: tokens.spacing.xs,
54
+ width: 40,
55
+ height: 40,
56
+ justifyContent: "center",
57
+ alignItems: "center",
50
58
  },
51
59
  placeholder: {
52
- width: 36,
60
+ width: 40,
53
61
  },
54
62
  });
@@ -34,6 +34,7 @@ export function CreationsGalleryScreen({
34
34
  onBack,
35
35
  onTryAgain,
36
36
  getCreationTitle,
37
+ onCreationPress,
37
38
  }: CreationsGalleryScreenProps) {
38
39
  const tokens = useAppDesignTokens();
39
40
 
@@ -96,13 +97,13 @@ export function CreationsGalleryScreen({
96
97
  creation={item}
97
98
  titleText={getItemTitle(item)}
98
99
  callbacks={{
99
- onPress: () => callbacks.handleCardPress(item),
100
+ onPress: () => onCreationPress ? onCreationPress(item) : callbacks.handleCardPress(item),
100
101
  onShare: async () => callbacks.handleShareCard(item),
101
102
  onDelete: () => callbacks.handleDelete(item),
102
103
  onFavorite: () => callbacks.handleFavorite(item),
103
104
  }}
104
105
  />
105
- ), [callbacks, getItemTitle]);
106
+ ), [callbacks, getItemTitle, onCreationPress]);
106
107
 
107
108
  const hasScreenHeader = Boolean(onBack);
108
109
 
@@ -20,4 +20,6 @@ export interface CreationsGalleryScreenProps {
20
20
  readonly onTryAgain?: () => void;
21
21
  /** Function to get dynamic title from creation metadata */
22
22
  readonly getCreationTitle?: (creation: { type: string; metadata?: Record<string, unknown> }) => string;
23
+ /** Custom handler when a creation card is pressed. When provided, overrides the built-in preview. */
24
+ readonly onCreationPress?: (creation: { id: string; uri: string; type: string; originalUri?: string; output?: { imageUrl?: string; videoUrl?: string }; metadata?: Record<string, unknown> }) => void;
23
25
  }