@umituz/react-native-ai-generation-content 1.17.254 → 1.17.255

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.254",
3
+ "version": "1.17.255",
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",
@@ -28,7 +28,7 @@ export function useCreationCardActions({
28
28
  if (callbacks.onDownload && isDownloadAvailable && creation.output) {
29
29
  result.push({
30
30
  id: "download",
31
- icon: "Download",
31
+ icon: "download",
32
32
  onPress: () => callbacks.onDownload?.(creation),
33
33
  });
34
34
  }
@@ -62,7 +62,7 @@ export function useCreationCardActions({
62
62
  if (callbacks.onPostToFeed && canPostToFeed) {
63
63
  result.push({
64
64
  id: "post",
65
- icon: "Send",
65
+ icon: "send",
66
66
  filled: true,
67
67
  onPress: () => callbacks.onPostToFeed?.(creation),
68
68
  });
@@ -2,7 +2,7 @@
2
2
  * Love Message Configuration
3
3
  */
4
4
 
5
- import { MessageType, MessageTone, LoveLanguage } from "../types";
5
+ import { MessageType, MessageTone, LoveLanguage } from "./types";
6
6
 
7
7
  export interface MessageTypeConfig {
8
8
  type: MessageType;
@@ -18,7 +18,7 @@ export { MessageListScreen } from "./presentation/screens/MessageListScreen";
18
18
  export { PartnerProfileScreen } from "./presentation/screens/PartnerProfileScreen";
19
19
 
20
20
  export { ExploreHeader } from "./presentation/components/ExploreHeader";
21
- export { HeroSection } from "./presentation/components/HeroSection";
21
+ export { LoveMessageHeroSection } from "./presentation/components/LoveMessageHeroSection";
22
22
  export { CategoryGrid } from "./presentation/components/CategoryGrid";
23
23
  export { TrendingSection } from "./presentation/components/TrendingSection";
24
24
  export { GeneratorHeader } from "./presentation/components/GeneratorHeader";
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { buildLoveMessagePrompt } from "../prompts/messagePromptBuilder";
6
6
  import { MessageGenerationParams } from "../../domain/types";
7
- import { providerRegistry } from "../../../index";
7
+ import { providerRegistry } from "../../../../infrastructure/services";
8
8
  import { PartnerProfileRepository } from "../persistence/PartnerProfileRepository";
9
9
 
10
10
  export const generateLoveMessage = async (
@@ -11,7 +11,7 @@ import {
11
11
  } from "@umituz/react-native-design-system";
12
12
  import { useLocalization } from "@umituz/react-native-localization";
13
13
 
14
- export const HeroSection: React.FC = () => {
14
+ export const LoveMessageHeroSection: React.FC = () => {
15
15
  const tokens = useAppDesignTokens();
16
16
  const { t } = useLocalization();
17
17
 
@@ -7,8 +7,7 @@ import { useNavigation } from "@react-navigation/native";
7
7
  import { PartnerProfile } from "../../domain/types";
8
8
  import { PartnerProfileRepository } from "../../infrastructure/persistence/PartnerProfileRepository";
9
9
 
10
- export const usePartnerProfile = () => {
11
- const navigation = useNavigation();
10
+ export const usePartnerProfile = (onBack: () => void) => {
12
11
  const [profile, setProfile] = useState<PartnerProfile>({
13
12
  name: "",
14
13
  nickname: "",
@@ -32,15 +31,14 @@ export const usePartnerProfile = () => {
32
31
  const handleSave = useCallback(async () => {
33
32
  const success = await PartnerProfileRepository.saveProfile(profile);
34
33
  if (success) {
35
- navigation.goBack();
34
+ onBack();
36
35
  }
37
- }, [profile, navigation]);
36
+ }, [profile, onBack]);
38
37
 
39
38
  return {
40
39
  profile,
41
40
  setProfile,
42
41
  isLoading,
43
42
  handleSave,
44
- navigation,
45
43
  };
46
44
  };
@@ -14,7 +14,7 @@ import {
14
14
  import { useLocalization } from "@umituz/react-native-localization";
15
15
  import { useNavigation } from "@react-navigation/native";
16
16
  import { ExploreHeader } from "../components/ExploreHeader";
17
- import { HeroSection } from "../components/HeroSection";
17
+ import { LoveMessageHeroSection } from "../components/LoveMessageHeroSection";
18
18
  import { CategoryGrid } from "../components/CategoryGrid";
19
19
  import { TrendingSection } from "../components/TrendingSection";
20
20
 
@@ -39,9 +39,9 @@ export const LoveMessageExploreScreen: FC<LoveMessageExploreScreenProps> = ({
39
39
 
40
40
  <ScrollView
41
41
  showsVerticalScrollIndicator={false}
42
- contentContainerStyle={{ paddingBottom: bottom + 100 }}
42
+ contentContainerStyle={{ paddingBottom: bottom + 120 }}
43
43
  >
44
- <HeroSection />
44
+ <LoveMessageHeroSection />
45
45
 
46
46
  <CategoryGrid
47
47
  onCategoryPress={onNavigateToCategory}
@@ -51,19 +51,6 @@ export const LoveMessageExploreScreen: FC<LoveMessageExploreScreenProps> = ({
51
51
  onViewAll={onNavigateToTrending}
52
52
  />
53
53
  </ScrollView>
54
-
55
- {/* Floating Action Button */}
56
- <View style={[styles.fabContainer, { bottom: bottom + tokens.spacing.lg }]}>
57
- <Pressable
58
- onPress={onNavigateToGenerator}
59
- style={[styles.fab, { backgroundColor: tokens.colors.primary }]}
60
- >
61
- <AtomicIcon name="sparkles" color="onPrimary" size="sm" />
62
- <AtomicText type="labelLarge" color="onPrimary" style={styles.fabText}>
63
- {t("loveMessage.explore.generateMagic")}
64
- </AtomicText>
65
- </Pressable>
66
- </View>
67
54
  </View>
68
55
  );
69
56
  };
@@ -72,18 +59,17 @@ const styles = StyleSheet.create({
72
59
  container: { flex: 1 },
73
60
  fabContainer: {
74
61
  position: 'absolute',
75
- left: 20,
76
- right: 20,
62
+ left: 0,
63
+ right: 0,
77
64
  alignItems: 'center',
65
+ zIndex: 10,
78
66
  },
79
67
  fab: {
80
- flexDirection: 'row',
68
+ width: 64,
69
+ height: 64,
70
+ borderRadius: 32,
81
71
  alignItems: 'center',
82
72
  justifyContent: 'center',
83
- paddingVertical: 18,
84
- paddingHorizontal: 32,
85
- borderRadius: 32,
86
- gap: 12,
73
+ elevation: 8,
87
74
  },
88
- fabText: { fontWeight: 'bold', letterSpacing: 1 },
89
75
  });
@@ -12,13 +12,13 @@ import {
12
12
  useSafeAreaInsets,
13
13
  } from "@umituz/react-native-design-system";
14
14
  import { useLocalization } from "@umituz/react-native-localization";
15
- import { useNavigation } from "@react-navigation/native";
16
15
  import { ProgressDots } from "../components/ProgressDots";
17
16
  import { MessageResult } from "../components/MessageResult";
18
17
  import { GeneratorHeader } from "../components/GeneratorHeader";
19
18
  import { StepPartner } from "../components/StepPartner";
20
19
  import { StepVibe } from "../components/StepVibe";
21
20
  import { StepDetails } from "../components/StepDetails";
21
+ import { MessageType } from "../../domain/types";
22
22
  import { useLoveMessageGenerator, GeneratorStep } from "../hooks/useLoveMessageGenerator";
23
23
 
24
24
  interface LoveMessageGeneratorScreenProps {
@@ -16,18 +16,22 @@ import { LOVE_LANGUAGES } from "../../domain/constants";
16
16
  import { usePartnerProfile } from "../hooks/usePartnerProfile";
17
17
  import { FieldInput } from "../components/FieldInput";
18
18
 
19
- export const PartnerProfileScreen: FC = () => {
19
+ interface PartnerProfileScreenProps {
20
+ onBack: () => void;
21
+ }
22
+
23
+ export const PartnerProfileScreen: FC<PartnerProfileScreenProps> = ({ onBack }) => {
20
24
  const tokens = useAppDesignTokens();
21
25
  const { top, bottom } = useSafeAreaInsets();
22
26
  const { t } = useLocalization();
23
- const p = usePartnerProfile();
27
+ const p = usePartnerProfile(onBack);
24
28
 
25
29
  if (p.isLoading) return null;
26
30
 
27
31
  return (
28
32
  <View style={[styles.container, { backgroundColor: tokens.colors.backgroundPrimary }]}>
29
33
  <View style={[styles.header, { paddingTop: top + tokens.spacing.md }]}>
30
- <AtomicButton icon="arrow-back" onPress={() => p.navigation.goBack()} variant="text" size="sm" />
34
+ <AtomicButton icon="arrow-back" onPress={onBack} variant="text" size="sm" />
31
35
  <View style={styles.headerTitle}>
32
36
  <AtomicText type="headlineSmall" color="textPrimary" style={styles.headerText}>
33
37
  {t("loveMessage.partnerProfile.title")}