@umituz/react-native-subscription 2.14.28 → 2.14.30
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-subscription",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.30",
|
|
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",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"@umituz/react-native-localization": "latest",
|
|
40
40
|
"@umituz/react-native-sentry": "latest",
|
|
41
41
|
"expo-constants": ">=16.0.0",
|
|
42
|
+
"expo-image": ">=2.0.0",
|
|
42
43
|
"expo-linear-gradient": ">=14.0.0",
|
|
43
44
|
"firebase": ">=10.0.0",
|
|
44
45
|
"react": ">=18.2.0",
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
"eslint-plugin-react": "^7.37.5",
|
|
63
64
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
64
65
|
"expo-constants": "~16.0.0",
|
|
66
|
+
"expo-image": "~3.0.0",
|
|
65
67
|
"expo-linear-gradient": "~15.0.0",
|
|
66
68
|
"firebase": "^10.0.0",
|
|
67
69
|
"react": "19.1.0",
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React, { useState, useCallback } from "react";
|
|
7
|
-
import { View, ScrollView, StyleSheet, TouchableOpacity, ActivityIndicator, Linking } from "react-native";
|
|
7
|
+
import { View, ScrollView, StyleSheet, TouchableOpacity, ActivityIndicator, Linking, type ImageSourcePropType } from "react-native";
|
|
8
8
|
import { BaseModal, useAppDesignTokens, AtomicText, AtomicIcon } from "@umituz/react-native-design-system";
|
|
9
|
+
import { Image } from "expo-image";
|
|
9
10
|
import type { PurchasesPackage } from "react-native-purchases";
|
|
10
11
|
import { PlanCard } from "./PlanCard";
|
|
11
12
|
import { CreditCard } from "./CreditCard";
|
|
@@ -24,6 +25,8 @@ export interface PaywallModalProps {
|
|
|
24
25
|
bestValueIdentifier?: string;
|
|
25
26
|
creditAmounts?: Record<string, number>;
|
|
26
27
|
creditsLabel?: string;
|
|
28
|
+
/** Hero image source (require or uri) */
|
|
29
|
+
heroImage?: ImageSourcePropType;
|
|
27
30
|
onSubscriptionPurchase?: (pkg: PurchasesPackage) => Promise<void>;
|
|
28
31
|
onCreditsPurchase?: (packageId: string) => Promise<void>;
|
|
29
32
|
onRestore?: () => Promise<void>;
|
|
@@ -43,6 +46,7 @@ export const PaywallModal: React.FC<PaywallModalProps> = React.memo((props) => {
|
|
|
43
46
|
bestValueIdentifier,
|
|
44
47
|
creditAmounts,
|
|
45
48
|
creditsLabel,
|
|
49
|
+
heroImage,
|
|
46
50
|
onSubscriptionPurchase,
|
|
47
51
|
onCreditsPurchase,
|
|
48
52
|
onRestore,
|
|
@@ -117,6 +121,16 @@ export const PaywallModal: React.FC<PaywallModalProps> = React.memo((props) => {
|
|
|
117
121
|
</TouchableOpacity>
|
|
118
122
|
|
|
119
123
|
<ScrollView showsVerticalScrollIndicator={false} contentContainerStyle={styles.scroll}>
|
|
124
|
+
{heroImage && (
|
|
125
|
+
<View style={styles.heroContainer}>
|
|
126
|
+
<Image
|
|
127
|
+
source={heroImage}
|
|
128
|
+
style={styles.heroImage}
|
|
129
|
+
contentFit="cover"
|
|
130
|
+
transition={300}
|
|
131
|
+
/>
|
|
132
|
+
</View>
|
|
133
|
+
)}
|
|
120
134
|
<View style={styles.header}>
|
|
121
135
|
<AtomicText type="headlineMedium" style={[styles.title, { color: tokens.colors.textPrimary }]}>
|
|
122
136
|
{translations.title}
|
|
@@ -228,6 +242,8 @@ const styles = StyleSheet.create({
|
|
|
228
242
|
container: { flex: 1 },
|
|
229
243
|
closeBtn: { position: "absolute", top: 12, right: 12, width: 32, height: 32, borderRadius: 16, justifyContent: "center", alignItems: "center", zIndex: 10 },
|
|
230
244
|
scroll: { flexGrow: 1, padding: 16, paddingTop: 48, paddingBottom: 32 },
|
|
245
|
+
heroContainer: { alignItems: "center", marginBottom: 16, marginTop: -24 },
|
|
246
|
+
heroImage: { width: 200, height: 200, borderRadius: 16 },
|
|
231
247
|
header: { alignItems: "center", marginBottom: 12 },
|
|
232
248
|
title: { fontWeight: "700", textAlign: "center", marginBottom: 4 },
|
|
233
249
|
subtitle: { textAlign: "center" },
|