@umituz/react-native-subscription 2.14.49 → 2.14.51

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.49",
3
+ "version": "2.14.51",
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,9 +28,9 @@ export interface PaywallModalProps {
28
28
  creditsLabel?: string;
29
29
  /** Hero image source (require or uri) */
30
30
  heroImage?: ImageSourcePropType;
31
- onSubscriptionPurchase?: (pkg: PurchasesPackage) => Promise<void>;
32
- onCreditsPurchase?: (packageId: string) => Promise<void>;
33
- onRestore?: () => Promise<void>;
31
+ onSubscriptionPurchase?: (pkg: PurchasesPackage) => Promise<void | boolean>;
32
+ onCreditsPurchase?: (packageId: string) => Promise<void | boolean>;
33
+ onRestore?: () => Promise<void | boolean>;
34
34
  }
35
35
 
36
36
  export const PaywallModal: React.FC<PaywallModalProps> = React.memo((props) => {
@@ -28,7 +28,7 @@ export interface BalanceCardProps {
28
28
  export const BalanceCard: React.FC<BalanceCardProps> = ({
29
29
  balance,
30
30
  translations,
31
- iconName = "Wallet",
31
+ iconName = "wallet",
32
32
  }) => {
33
33
  const tokens = useAppDesignTokens();
34
34
  const gradientColors = [
@@ -33,16 +33,16 @@ export interface TransactionItemProps {
33
33
 
34
34
  const getReasonIcon = (reason: TransactionReason): string => {
35
35
  const iconMap: Record<TransactionReason, string> = {
36
- purchase: "ShoppingCart",
37
- usage: "Zap",
38
- refund: "RotateCcw",
39
- bonus: "Gift",
40
- subscription: "Star",
41
- admin: "Shield",
42
- reward: "Award",
43
- expired: "Clock",
36
+ purchase: "shopping-cart",
37
+ usage: "zap",
38
+ refund: "rotate-ccw",
39
+ bonus: "gift",
40
+ subscription: "star",
41
+ admin: "shield",
42
+ reward: "award",
43
+ expired: "clock",
44
44
  };
45
- return iconMap[reason] || "Circle";
45
+ return iconMap[reason] || "circle";
46
46
  };
47
47
 
48
48
  const defaultDateFormatter = (timestamp: number): string => {
@@ -50,7 +50,7 @@ export const TransactionList: React.FC<TransactionListProps> = ({
50
50
  >
51
51
  {translations.title}
52
52
  </AtomicText>
53
- <AtomicIcon name="History" size="md" color="secondary" />
53
+ <AtomicIcon name="history" size="md" color="secondary" />
54
54
  </View>
55
55
 
56
56
  {loading ? (
@@ -65,7 +65,7 @@ export const TransactionList: React.FC<TransactionListProps> = ({
65
65
  </View>
66
66
  ) : transactions.length === 0 ? (
67
67
  <View style={styles.stateContainer}>
68
- <AtomicIcon name="Package" size="xl" color="secondary" />
68
+ <AtomicIcon name="inbox" size="xl" color="secondary" />
69
69
  <AtomicText
70
70
  type="bodyMedium"
71
71
  style={[styles.stateText, { color: tokens.colors.textSecondary }]}
@@ -8,8 +8,8 @@
8
8
 
9
9
  import React from "react";
10
10
  import { View, StyleSheet, ActivityIndicator, TouchableOpacity } from "react-native";
11
- import { useSafeAreaInsets } from "react-native-safe-area-context";
12
11
  import {
12
+ useSafeAreaInsets,
13
13
  useAppDesignTokens,
14
14
  AtomicText,
15
15
  AtomicIcon,
@@ -61,7 +61,7 @@ export const WalletScreen: React.FC<WalletScreenProps> = ({ config }) => {
61
61
  hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
62
62
  >
63
63
  <AtomicIcon
64
- name="ArrowLeft"
64
+ name="arrow-left"
65
65
  size="lg"
66
66
  customColor={tokens.colors.textPrimary}
67
67
  />