@umituz/react-native-subscription 2.2.36 → 2.2.38
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 +2 -6
- package/src/presentation/components/details/PremiumDetailsCard.tsx +1 -1
- package/src/presentation/components/details/PremiumStatusBadge.tsx +1 -1
- package/src/presentation/components/feedback/PaywallFeedbackModal.tsx +2 -2
- package/src/presentation/components/feedback/paywallFeedbackStyles.ts +1 -1
- package/src/presentation/components/paywall/CreditsPackageCard.tsx +2 -2
- package/src/presentation/components/paywall/CreditsTabContent.tsx +2 -2
- package/src/presentation/components/paywall/PaywallFeatureItem.tsx +2 -2
- package/src/presentation/components/paywall/PaywallHeader.tsx +2 -2
- package/src/presentation/components/paywall/PaywallLegalFooter.tsx +2 -2
- package/src/presentation/components/paywall/PaywallModal.tsx +1 -1
- package/src/presentation/components/paywall/PaywallTabBar.tsx +2 -2
- package/src/presentation/components/paywall/SubscriptionFooter.tsx +2 -2
- package/src/presentation/components/paywall/SubscriptionModal.tsx +1 -1
- package/src/presentation/components/paywall/SubscriptionModalHeader.tsx +2 -2
- package/src/presentation/components/paywall/SubscriptionModalOverlay.tsx +1 -1
- package/src/presentation/components/paywall/SubscriptionPackageList.tsx +2 -2
- package/src/presentation/components/paywall/SubscriptionPlanCard.tsx +2 -2
- package/src/presentation/components/paywall/SubscriptionTabContent.tsx +1 -1
- package/src/presentation/screens/SubscriptionDetailScreen.tsx +1 -1
- package/src/presentation/screens/components/CreditItem.tsx +1 -1
- package/src/presentation/screens/components/CreditsList.tsx +1 -1
- package/src/presentation/screens/components/SubscriptionActions.tsx +1 -1
- package/src/presentation/screens/components/SubscriptionHeader.tsx +1 -1
- package/src/revenuecat/infrastructure/services/OfferingsFetcher.ts +2 -7
- package/src/revenuecat/infrastructure/services/PurchaseHandler.ts +1 -5
- package/src/revenuecat/infrastructure/services/RestoreHandler.ts +1 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-subscription",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.38",
|
|
4
4
|
"description": "Complete subscription management with RevenueCat, paywall UI, and credits system for React Native apps",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -28,8 +28,6 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@tanstack/react-query": ">=5.0.0",
|
|
31
|
-
"@umituz/react-native-design-system-atoms": "*",
|
|
32
|
-
"@umituz/react-native-design-system-theme": "*",
|
|
33
31
|
"@umituz/react-native-firestore": "*",
|
|
34
32
|
"@umituz/react-native-legal": "*",
|
|
35
33
|
"expo-constants": ">=18.0.0",
|
|
@@ -43,8 +41,6 @@
|
|
|
43
41
|
"@tanstack/react-query": "^5.0.0",
|
|
44
42
|
"@types/node": "^25.0.3",
|
|
45
43
|
"@types/react": "~19.1.0",
|
|
46
|
-
"@umituz/react-native-design-system-atoms": "^1.19.0",
|
|
47
|
-
"@umituz/react-native-design-system-theme": "latest",
|
|
48
44
|
"@umituz/react-native-firestore": "latest",
|
|
49
45
|
"@umituz/react-native-legal": "^2.1.2",
|
|
50
46
|
"@umituz/react-native-localization": "^3.5.8",
|
|
@@ -63,4 +59,4 @@
|
|
|
63
59
|
"README.md",
|
|
64
60
|
"LICENSE"
|
|
65
61
|
]
|
|
66
|
-
}
|
|
62
|
+
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { View, Text, StyleSheet, TouchableOpacity } from "react-native";
|
|
9
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
9
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
10
10
|
import {
|
|
11
11
|
PremiumStatusBadge,
|
|
12
12
|
type SubscriptionStatusType,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, Text, StyleSheet } from "react-native";
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
8
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
9
9
|
|
|
10
10
|
export type SubscriptionStatusType = "active" | "expired" | "none";
|
|
11
11
|
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
KeyboardAvoidingView,
|
|
14
14
|
Platform,
|
|
15
15
|
} from "react-native";
|
|
16
|
-
import { AtomicText } from "@umituz/react-native-design-system
|
|
17
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
16
|
+
import { AtomicText } from "@umituz/react-native-design-system";
|
|
17
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
18
18
|
import { useLocalization } from "@umituz/react-native-localization";
|
|
19
19
|
import { usePaywallFeedback } from "../../hooks/feedback/usePaywallFeedback";
|
|
20
20
|
import { createPaywallFeedbackStyles } from "./paywallFeedbackStyles";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { StyleSheet } from "react-native";
|
|
7
|
-
import type { DesignTokens } from "@umituz/react-native-design-system
|
|
7
|
+
import type { DesignTokens } from "@umituz/react-native-design-system";
|
|
8
8
|
|
|
9
9
|
export const createPaywallFeedbackStyles = (
|
|
10
10
|
tokens: DesignTokens,
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, StyleSheet, TouchableOpacity } from "react-native";
|
|
8
|
-
import { AtomicText } from "@umituz/react-native-design-system
|
|
9
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
8
|
+
import { AtomicText } from "@umituz/react-native-design-system";
|
|
9
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
10
10
|
import type { CreditsPackage } from "../../../domain/entities/paywall/CreditsPackage";
|
|
11
11
|
|
|
12
12
|
interface CreditsPackageCardProps {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, StyleSheet, ScrollView } from "react-native";
|
|
8
|
-
import { AtomicText, AtomicButton } from "@umituz/react-native-design-system
|
|
9
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
8
|
+
import { AtomicText, AtomicButton } from "@umituz/react-native-design-system";
|
|
9
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
10
10
|
import { useLocalization } from "@umituz/react-native-localization";
|
|
11
11
|
import { CreditsPackageCard } from "./CreditsPackageCard";
|
|
12
12
|
import { PaywallLegalFooter } from "./PaywallLegalFooter";
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import React, { useMemo } from "react";
|
|
7
7
|
import { View, StyleSheet } from "react-native";
|
|
8
|
-
import { AtomicText, AtomicIcon } from "@umituz/react-native-design-system
|
|
9
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
8
|
+
import { AtomicText, AtomicIcon } from "@umituz/react-native-design-system";
|
|
9
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
10
10
|
|
|
11
11
|
interface PaywallFeatureItemProps {
|
|
12
12
|
icon: string;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, TouchableOpacity, StyleSheet } from "react-native";
|
|
8
|
-
import { AtomicText, AtomicIcon } from "@umituz/react-native-design-system
|
|
9
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
8
|
+
import { AtomicText, AtomicIcon } from "@umituz/react-native-design-system";
|
|
9
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
10
10
|
|
|
11
11
|
interface PaywallHeaderProps {
|
|
12
12
|
title: string;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, StyleSheet, TouchableOpacity, Linking } from "react-native";
|
|
8
|
-
import { AtomicText } from "@umituz/react-native-design-system
|
|
9
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
8
|
+
import { AtomicText } from "@umituz/react-native-design-system";
|
|
9
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
10
10
|
|
|
11
11
|
interface PaywallLegalFooterProps {
|
|
12
12
|
termsText?: string;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import React, { useEffect } from "react";
|
|
7
7
|
import { View, Modal, StyleSheet, TouchableOpacity, Dimensions } from "react-native";
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
8
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
9
9
|
import { useLocalization } from "@umituz/react-native-localization";
|
|
10
10
|
import type { PurchasesPackage } from "react-native-purchases";
|
|
11
11
|
import { usePaywall } from "../../hooks/usePaywall";
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, TouchableOpacity, StyleSheet } from "react-native";
|
|
8
|
-
import { AtomicText } from "@umituz/react-native-design-system
|
|
9
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
8
|
+
import { AtomicText } from "@umituz/react-native-design-system";
|
|
9
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
10
10
|
import type { PaywallTabType } from "../../../domain/entities/paywall/PaywallTab";
|
|
11
11
|
|
|
12
12
|
interface PaywallTabBarProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View, StyleSheet, TouchableOpacity } from "react-native";
|
|
3
|
-
import { AtomicButton, AtomicText } from "@umituz/react-native-design-system
|
|
4
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
3
|
+
import { AtomicButton, AtomicText } from "@umituz/react-native-design-system";
|
|
4
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
5
5
|
import { PaywallLegalFooter } from "./PaywallLegalFooter";
|
|
6
6
|
|
|
7
7
|
interface SubscriptionFooterProps {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, StyleSheet, ScrollView } from "react-native";
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
8
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
9
9
|
import type { PurchasesPackage } from "react-native-purchases";
|
|
10
10
|
|
|
11
11
|
import { SubscriptionModalHeader } from "./SubscriptionModalHeader";
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { View, StyleSheet, TouchableOpacity } from "react-native";
|
|
7
|
-
import { AtomicText } from "@umituz/react-native-design-system
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
7
|
+
import { AtomicText } from "@umituz/react-native-design-system";
|
|
8
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
9
9
|
|
|
10
10
|
interface SubscriptionModalHeaderProps {
|
|
11
11
|
title: string;
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
Platform,
|
|
14
14
|
ViewStyle,
|
|
15
15
|
} from "react-native";
|
|
16
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
16
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
17
17
|
|
|
18
18
|
const { height: SCREEN_HEIGHT, width: SCREEN_WIDTH } = Dimensions.get("window");
|
|
19
19
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View, StyleSheet, ActivityIndicator } from "react-native";
|
|
3
|
-
import { AtomicText } from "@umituz/react-native-design-system
|
|
4
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
3
|
+
import { AtomicText } from "@umituz/react-native-design-system";
|
|
4
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
5
5
|
import type { PurchasesPackage } from "react-native-purchases";
|
|
6
6
|
import { SubscriptionPlanCard } from "./SubscriptionPlanCard";
|
|
7
7
|
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, TouchableOpacity, StyleSheet } from "react-native";
|
|
8
8
|
import type { PurchasesPackage } from "react-native-purchases";
|
|
9
|
-
import { AtomicText } from "@umituz/react-native-design-system
|
|
10
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
9
|
+
import { AtomicText } from "@umituz/react-native-design-system";
|
|
10
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
11
11
|
import { formatPrice } from "../../../utils/priceUtils";
|
|
12
12
|
import { useLocalization } from "@umituz/react-native-localization";
|
|
13
13
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import React, { useMemo } from "react";
|
|
7
7
|
import { View, StyleSheet, ScrollView } from "react-native";
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
8
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
9
9
|
import { useLocalization } from "@umituz/react-native-localization";
|
|
10
10
|
import type { PurchasesPackage } from "react-native-purchases";
|
|
11
11
|
import { PaywallFeaturesList } from "./PaywallFeaturesList";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { ScrollView, StyleSheet } from "react-native";
|
|
9
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
9
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
10
10
|
import { SubscriptionHeader } from "./components/SubscriptionHeader";
|
|
11
11
|
import { CreditsList } from "./components/CreditsList";
|
|
12
12
|
import { SubscriptionActions } from "./components/SubscriptionActions";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, Text, StyleSheet } from "react-native";
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
8
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
9
9
|
|
|
10
10
|
interface CreditItemProps {
|
|
11
11
|
label: string;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, Text, StyleSheet } from "react-native";
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
8
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
9
9
|
import { CreditItem } from "./CreditItem";
|
|
10
10
|
import type { CreditInfo } from "../../components/details/PremiumDetailsCard";
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, Text, StyleSheet, TouchableOpacity } from "react-native";
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
8
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
9
9
|
|
|
10
10
|
interface SubscriptionActionsProps {
|
|
11
11
|
isPremium: boolean;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, Text, StyleSheet } from "react-native";
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system
|
|
8
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
9
9
|
import {
|
|
10
10
|
PremiumStatusBadge,
|
|
11
11
|
type SubscriptionStatusType,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import Purchases, { type PurchasesOffering } from "react-native-purchases";
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
|
|
9
9
|
export interface OfferingsFetcherDeps {
|
|
10
10
|
isInitialized: () => boolean;
|
|
@@ -28,12 +28,7 @@ export async function fetchOfferings(
|
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
if (__DEV__) {
|
|
33
|
-
console.log("[RevenueCat] fetchOfferings() - ExpoGo without test store");
|
|
34
|
-
}
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
31
|
+
|
|
37
32
|
|
|
38
33
|
try {
|
|
39
34
|
const offerings = await Purchases.getOfferings();
|
|
@@ -7,7 +7,6 @@ import Purchases, { type PurchasesPackage } from "react-native-purchases";
|
|
|
7
7
|
import type { PurchaseResult } from "../../application/ports/IRevenueCatService";
|
|
8
8
|
import {
|
|
9
9
|
RevenueCatPurchaseError,
|
|
10
|
-
RevenueCatExpoGoError,
|
|
11
10
|
RevenueCatInitializationError,
|
|
12
11
|
} from "../../domain/errors/RevenueCatError";
|
|
13
12
|
import type { RevenueCatConfig } from "../../domain/value-objects/RevenueCatConfig";
|
|
@@ -15,7 +14,6 @@ import {
|
|
|
15
14
|
isUserCancelledError,
|
|
16
15
|
getErrorMessage,
|
|
17
16
|
} from "../../domain/types/RevenueCatTypes";
|
|
18
|
-
import { isExpoGo } from "../utils/ExpoGoDetector";
|
|
19
17
|
import {
|
|
20
18
|
syncPremiumStatus,
|
|
21
19
|
notifyPurchaseCompleted,
|
|
@@ -52,9 +50,7 @@ export async function handlePurchase(
|
|
|
52
50
|
throw new RevenueCatInitializationError();
|
|
53
51
|
}
|
|
54
52
|
|
|
55
|
-
|
|
56
|
-
throw new RevenueCatExpoGoError();
|
|
57
|
-
}
|
|
53
|
+
|
|
58
54
|
|
|
59
55
|
const consumableIds = deps.config.consumableProductIdentifiers || [];
|
|
60
56
|
const isConsumable = isConsumableProduct(pkg, consumableIds);
|
|
@@ -7,12 +7,10 @@ import Purchases from "react-native-purchases";
|
|
|
7
7
|
import type { RestoreResult } from "../../application/ports/IRevenueCatService";
|
|
8
8
|
import {
|
|
9
9
|
RevenueCatRestoreError,
|
|
10
|
-
RevenueCatExpoGoError,
|
|
11
10
|
RevenueCatInitializationError,
|
|
12
11
|
} from "../../domain/errors/RevenueCatError";
|
|
13
12
|
import type { RevenueCatConfig } from "../../domain/value-objects/RevenueCatConfig";
|
|
14
13
|
import { getErrorMessage } from "../../domain/types/RevenueCatTypes";
|
|
15
|
-
import { isExpoGo } from "../utils/ExpoGoDetector";
|
|
16
14
|
import {
|
|
17
15
|
syncPremiumStatus,
|
|
18
16
|
notifyRestoreCompleted,
|
|
@@ -35,9 +33,7 @@ export async function handleRestore(
|
|
|
35
33
|
throw new RevenueCatInitializationError();
|
|
36
34
|
}
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
throw new RevenueCatExpoGoError();
|
|
40
|
-
}
|
|
36
|
+
|
|
41
37
|
|
|
42
38
|
try {
|
|
43
39
|
const customerInfo = await Purchases.restorePurchases();
|