@umituz/react-native-ai-generation-content 1.17.245 → 1.17.246

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.245",
3
+ "version": "1.17.246",
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",
@@ -1,15 +1,12 @@
1
-
2
1
  import React from 'react';
3
2
  import { View, StyleSheet, TouchableOpacity } from 'react-native';
4
- import { AtomicText, AtomicIcon, useAppDesignTokens, type DesignTokens } from "@umituz/react-native-design-system";
3
+ import { AtomicIcon, useAppDesignTokens, type DesignTokens } from "@umituz/react-native-design-system";
5
4
 
6
5
  interface DetailHeaderProps {
7
- readonly title: string;
8
- readonly date: string;
9
6
  readonly onClose: () => void;
10
7
  }
11
8
 
12
- export const DetailHeader: React.FC<DetailHeaderProps> = ({ title, date, onClose }) => {
9
+ export const DetailHeader: React.FC<DetailHeaderProps> = ({ onClose }) => {
13
10
  const tokens = useAppDesignTokens();
14
11
  const styles = useStyles(tokens);
15
12
 
@@ -18,62 +15,21 @@ export const DetailHeader: React.FC<DetailHeaderProps> = ({ title, date, onClose
18
15
  <TouchableOpacity style={styles.closeButton} onPress={onClose}>
19
16
  <AtomicIcon name="arrow-back" size="md" color="onSurface" />
20
17
  </TouchableOpacity>
21
-
22
- <View style={styles.titleContainer}>
23
- <AtomicText style={styles.title}>{title}</AtomicText>
24
- <View style={styles.dateBadge}>
25
- <AtomicIcon name="calendar-outline" size="md" color="primary" />
26
- <AtomicText style={styles.dateText}>{date}</AtomicText>
27
- </View>
28
- </View>
29
-
30
- <View style={styles.placeholder} />
31
18
  </View>
32
19
  );
33
20
  };
34
21
 
35
22
  const useStyles = (tokens: DesignTokens) => StyleSheet.create({
36
23
  headerContainer: {
37
- flexDirection: 'row',
38
- alignItems: 'center',
39
- paddingTop: tokens.spacing.sm,
40
- paddingBottom: tokens.spacing.md,
41
- paddingHorizontal: tokens.spacing.md,
24
+ paddingVertical: tokens.spacing.xs,
25
+ paddingHorizontal: tokens.spacing.sm,
42
26
  backgroundColor: tokens.colors.background,
43
- borderBottomWidth: 1,
44
- borderBottomColor: tokens.colors.border,
45
- zIndex: 10,
46
27
  },
47
28
  closeButton: {
48
29
  padding: tokens.spacing.xs,
49
- marginRight: tokens.spacing.sm,
50
- },
51
- titleContainer: {
52
- flex: 1,
53
- alignItems: 'center',
54
- },
55
- title: {
56
- fontSize: 18,
57
- fontWeight: '700',
58
- color: tokens.colors.textPrimary,
59
- marginBottom: 4,
60
- textAlign: 'center',
61
- },
62
- dateBadge: {
63
- flexDirection: 'row',
64
- alignItems: 'center',
65
- gap: 4,
66
- paddingHorizontal: 10,
67
- paddingVertical: 4,
68
- borderRadius: 12,
69
- backgroundColor: tokens.colors.primary + '15',
70
- },
71
- dateText: {
72
- fontSize: 12,
73
- fontWeight: '600',
74
- color: tokens.colors.primary,
75
- },
76
- placeholder: {
77
30
  width: 40,
31
+ height: 40,
32
+ alignItems: 'center',
33
+ justifyContent: 'center',
78
34
  },
79
35
  });
@@ -39,7 +39,8 @@ export const DetailImage: React.FC<DetailImageProps> = ({ uri, onPress }) => {
39
39
  const styles = StyleSheet.create({
40
40
  container: {
41
41
  paddingHorizontal: HORIZONTAL_PADDING,
42
- marginVertical: 16,
42
+ marginTop: 8,
43
+ marginBottom: 12,
43
44
  },
44
45
  frame: {
45
46
  borderRadius: 16,
@@ -0,0 +1,51 @@
1
+ import React from 'react';
2
+ import { View, StyleSheet } from 'react-native';
3
+ import { AtomicText, AtomicIcon, useAppDesignTokens, type DesignTokens } from "@umituz/react-native-design-system";
4
+
5
+ interface DetailInfoProps {
6
+ readonly title: string;
7
+ readonly date: string;
8
+ }
9
+
10
+ export const DetailInfo: React.FC<DetailInfoProps> = ({ title, date }) => {
11
+ const tokens = useAppDesignTokens();
12
+ const styles = useStyles(tokens);
13
+
14
+ return (
15
+ <View style={styles.container}>
16
+ <AtomicText style={styles.title}>{title}</AtomicText>
17
+ <View style={styles.dateBadge}>
18
+ <AtomicIcon name="calendar-outline" size="sm" color="primary" />
19
+ <AtomicText style={styles.dateText}>{date}</AtomicText>
20
+ </View>
21
+ </View>
22
+ );
23
+ };
24
+
25
+ const useStyles = (tokens: DesignTokens) => StyleSheet.create({
26
+ container: {
27
+ paddingHorizontal: tokens.spacing.md,
28
+ paddingVertical: tokens.spacing.sm,
29
+ gap: tokens.spacing.xs,
30
+ },
31
+ title: {
32
+ fontSize: 18,
33
+ fontWeight: '700',
34
+ color: tokens.colors.textPrimary,
35
+ },
36
+ dateBadge: {
37
+ flexDirection: 'row',
38
+ alignItems: 'center',
39
+ gap: 6,
40
+ alignSelf: 'flex-start',
41
+ paddingHorizontal: 12,
42
+ paddingVertical: 6,
43
+ borderRadius: 12,
44
+ backgroundColor: tokens.colors.primary + '15',
45
+ },
46
+ dateText: {
47
+ fontSize: 13,
48
+ fontWeight: '600',
49
+ color: tokens.colors.primary,
50
+ },
51
+ });
@@ -6,6 +6,7 @@ import type { Creation } from '../../domain/entities/Creation';
6
6
  import type { CreationsConfig } from '../../domain/value-objects/CreationsConfig';
7
7
  import { hasVideoContent, getPreviewUrl } from '../../domain/utils';
8
8
  import { DetailHeader } from '../components/CreationDetail/DetailHeader';
9
+ import { DetailInfo } from '../components/CreationDetail/DetailInfo';
9
10
  import { DetailImage } from '../components/CreationDetail/DetailImage';
10
11
  import { DetailVideo } from '../components/CreationDetail/DetailVideo';
11
12
  import { DetailStory } from '../components/CreationDetail/DetailStory';
@@ -78,15 +79,11 @@ export const CreationDetailScreen: React.FC<CreationDetailScreenProps> = ({
78
79
  return (
79
80
  <View style={[styles.container, { backgroundColor: tokens.colors.background }]}>
80
81
  <View style={{ paddingTop: insets.top }}>
81
- <DetailHeader
82
- title={title}
83
- date={date}
84
- onClose={onClose}
85
- />
82
+ <DetailHeader onClose={onClose} />
86
83
  </View>
87
84
  <ScrollView
88
85
  style={styles.scrollView}
89
- contentContainerStyle={[styles.scrollContent, { paddingBottom: insets.bottom + 32 }]}
86
+ contentContainerStyle={[styles.scrollContent, { paddingBottom: insets.bottom + 24 }]}
90
87
  showsVerticalScrollIndicator={false}
91
88
  >
92
89
  {isVideo ? (
@@ -95,6 +92,8 @@ export const CreationDetailScreen: React.FC<CreationDetailScreenProps> = ({
95
92
  <DetailImage uri={creation.uri} onPress={handleImagePress} />
96
93
  )}
97
94
 
95
+ <DetailInfo title={title} date={date} />
96
+
98
97
  {story ? (
99
98
  <DetailStory story={story} />
100
99
  ) : null}
@@ -129,6 +128,6 @@ const styles = StyleSheet.create({
129
128
  flex: 1,
130
129
  },
131
130
  scrollContent: {
132
- paddingTop: 8,
131
+ paddingTop: 4,
133
132
  },
134
133
  });