@umituz/react-native-ai-generation-content 1.17.297 → 1.17.298
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.
|
|
3
|
+
"version": "1.17.298",
|
|
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",
|
|
@@ -17,6 +17,8 @@ export { LoveMessageGeneratorScreen } from "./presentation/screens/LoveMessageGe
|
|
|
17
17
|
export { MessageListScreen } from "./presentation/screens/MessageListScreen";
|
|
18
18
|
export { PartnerProfileScreen } from "./presentation/screens/PartnerProfileScreen";
|
|
19
19
|
|
|
20
|
+
export { LoveMessageStack, type LoveMessageStackParamList } from "./presentation/navigation/LoveMessageStack";
|
|
21
|
+
|
|
20
22
|
export { ExploreHeader } from "./presentation/components/ExploreHeader";
|
|
21
23
|
export { LoveMessageHeroSection } from "./presentation/components/LoveMessageHeroSection";
|
|
22
24
|
export { CategoryGrid } from "./presentation/components/CategoryGrid";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Handles persistence of partner profile data
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import { PartnerProfile } from "../../domain/types";
|
|
6
|
+
import { storageRepository, unwrap } from "@umituz/react-native-design-system";
|
|
7
|
+
import type { PartnerProfile } from "../../domain/types";
|
|
8
8
|
|
|
9
9
|
const PARTNER_PROFILE_STORAGE_KEY = "love_message_partner_profile";
|
|
10
10
|
|
|
@@ -14,7 +14,9 @@ export const PartnerProfileRepository = {
|
|
|
14
14
|
*/
|
|
15
15
|
getProfile: async (): Promise<PartnerProfile | null> => {
|
|
16
16
|
try {
|
|
17
|
-
const
|
|
17
|
+
const result = await storageRepository.getString(PARTNER_PROFILE_STORAGE_KEY, null);
|
|
18
|
+
const data = unwrap(result, null);
|
|
19
|
+
|
|
18
20
|
if (data) {
|
|
19
21
|
return JSON.parse(data) as PartnerProfile;
|
|
20
22
|
}
|
|
@@ -29,7 +31,7 @@ export const PartnerProfileRepository = {
|
|
|
29
31
|
*/
|
|
30
32
|
saveProfile: async (profile: PartnerProfile): Promise<boolean> => {
|
|
31
33
|
try {
|
|
32
|
-
await
|
|
34
|
+
await storageRepository.setItem(PARTNER_PROFILE_STORAGE_KEY, JSON.stringify(profile));
|
|
33
35
|
return true;
|
|
34
36
|
} catch {
|
|
35
37
|
return false;
|
|
@@ -41,7 +43,7 @@ export const PartnerProfileRepository = {
|
|
|
41
43
|
*/
|
|
42
44
|
clearProfile: async (): Promise<boolean> => {
|
|
43
45
|
try {
|
|
44
|
-
await
|
|
46
|
+
await storageRepository.removeItem(PARTNER_PROFILE_STORAGE_KEY);
|
|
45
47
|
return true;
|
|
46
48
|
} catch {
|
|
47
49
|
return false;
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
StackNavigator,
|
|
9
|
+
type StackNavigatorConfig,
|
|
10
|
+
} from "@umituz/react-native-design-system";
|
|
8
11
|
import { LoveMessageExploreScreen } from "../screens/LoveMessageExploreScreen";
|
|
9
12
|
import { MessageListScreen } from "../screens/MessageListScreen";
|
|
10
13
|
import { LoveMessageGeneratorScreen } from "../screens/LoveMessageGeneratorScreen";
|
|
@@ -18,15 +21,19 @@ export type LoveMessageStackParamList = {
|
|
|
18
21
|
PartnerProfile: undefined;
|
|
19
22
|
};
|
|
20
23
|
|
|
21
|
-
const
|
|
24
|
+
const stackConfig: StackNavigatorConfig<LoveMessageStackParamList> = {
|
|
25
|
+
initialRouteName: "LoveMessageExplore",
|
|
26
|
+
screenOptions: {
|
|
27
|
+
headerShown: false,
|
|
28
|
+
},
|
|
29
|
+
screens: [
|
|
30
|
+
{ name: "LoveMessageExplore", component: LoveMessageExploreScreen },
|
|
31
|
+
{ name: "MessageList", component: MessageListScreen },
|
|
32
|
+
{ name: "MessageGenerator", component: LoveMessageGeneratorScreen },
|
|
33
|
+
{ name: "PartnerProfile", component: PartnerProfileScreen },
|
|
34
|
+
],
|
|
35
|
+
};
|
|
22
36
|
|
|
23
37
|
export const LoveMessageStack: React.FC = () => {
|
|
24
|
-
return
|
|
25
|
-
<Stack.Navigator screenOptions={{ headerShown: false }} initialRouteName="LoveMessageExplore">
|
|
26
|
-
<Stack.Screen name="LoveMessageExplore" component={LoveMessageExploreScreen} />
|
|
27
|
-
<Stack.Screen name="MessageList" component={MessageListScreen} />
|
|
28
|
-
<Stack.Screen name="MessageGenerator" component={LoveMessageGeneratorScreen} />
|
|
29
|
-
<Stack.Screen name="PartnerProfile" component={PartnerProfileScreen} />
|
|
30
|
-
</Stack.Navigator>
|
|
31
|
-
);
|
|
38
|
+
return <StackNavigator config={stackConfig} />;
|
|
32
39
|
};
|