@umituz/react-native-subscription 2.3.1 → 2.3.3

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.3.1",
3
+ "version": "2.3.3",
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",
@@ -97,6 +97,26 @@ export const SubscriptionModal: React.FC<SubscriptionModalProps> = React.memo((p
97
97
  onClose,
98
98
  });
99
99
 
100
+ // Debug logging in development
101
+ if (__DEV__) {
102
+ console.log("[SubscriptionModal] State:", {
103
+ visible,
104
+ variant,
105
+ isLoading,
106
+ packagesCount: packages?.length ?? 0,
107
+ packagesData: packages?.map(p => ({
108
+ id: p?.identifier,
109
+ price: p?.product?.priceString,
110
+ title: p?.product?.title,
111
+ })),
112
+ featuresCount: features?.length ?? 0,
113
+ title,
114
+ subtitle: subtitle?.substring(0, 50),
115
+ hasTokens: !!tokens,
116
+ selectedPkg: selectedPkg?.identifier ?? null,
117
+ isProcessing,
118
+ });
119
+ }
100
120
 
101
121
  if (!visible) return null;
102
122
 
@@ -22,10 +22,6 @@ export const SubscriptionModalHeader: React.FC<SubscriptionModalHeaderProps> = (
22
22
  }) => {
23
23
  const tokens = useAppDesignTokens();
24
24
 
25
- if (__DEV__) {
26
- console.log("[SubscriptionModalHeader] Rendering", { title, variant, hasSubtitle: !!subtitle });
27
- }
28
-
29
25
  return (
30
26
  <View style={styles.header}>
31
27
  <TouchableOpacity
@@ -10,7 +10,6 @@ import {
10
10
  StyleSheet,
11
11
  TouchableOpacity,
12
12
  Dimensions,
13
- Platform,
14
13
  ViewStyle,
15
14
  } from "react-native";
16
15
  import { useAppDesignTokens } from "@umituz/react-native-design-system";
@@ -55,6 +54,18 @@ export const SubscriptionModalOverlay: React.FC<SubscriptionModalOverlayProps> =
55
54
  const tokens = useAppDesignTokens();
56
55
  const config = { ...DEFAULT_LAYOUT, ...layoutConfig };
57
56
 
57
+ // Debug logging in development
58
+ if (__DEV__) {
59
+ console.log("[SubscriptionModalOverlay] State:", {
60
+ visible,
61
+ variant,
62
+ config,
63
+ screenWidth: SCREEN_WIDTH,
64
+ screenHeight: SCREEN_HEIGHT,
65
+ backgroundColor: tokens?.colors?.backgroundPrimary ?? "NO_TOKEN",
66
+ hasChildren: !!children,
67
+ });
68
+ }
58
69
 
59
70
  const isFullScreen = variant === "fullscreen";
60
71
 
@@ -63,20 +74,9 @@ export const SubscriptionModalOverlay: React.FC<SubscriptionModalOverlayProps> =
63
74
  maxHeight: SCREEN_HEIGHT * (config.maxHeightPercent ?? 0.88),
64
75
  borderRadius: config.borderRadius ?? 32,
65
76
  overflow: "hidden",
66
- borderWidth: 1,
67
- borderColor: "rgba(255, 255, 255, 0.08)",
68
- backgroundColor: tokens.colors.surface,
69
- ...Platform.select({
70
- ios: {
71
- shadowColor: "#000",
72
- shadowOffset: { width: 0, height: 16 },
73
- shadowOpacity: 0.5,
74
- shadowRadius: 32,
75
- },
76
- android: {
77
- elevation: 16,
78
- },
79
- }),
77
+ borderWidth: 2,
78
+ borderColor: "rgba(255, 255, 255, 0.15)",
79
+ backgroundColor: tokens.colors.backgroundPrimary,
80
80
  });
81
81
 
82
82
  if (isFullScreen) {
@@ -166,16 +166,5 @@ const styles = StyleSheet.create({
166
166
  overflow: "hidden",
167
167
  borderWidth: 1,
168
168
  borderColor: "rgba(255, 255, 255, 0.1)",
169
- ...Platform.select({
170
- ios: {
171
- shadowColor: "#000",
172
- shadowOffset: { width: 0, height: 12 },
173
- shadowOpacity: 0.4,
174
- shadowRadius: 24,
175
- },
176
- android: {
177
- elevation: 12,
178
- },
179
- }),
180
169
  },
181
170
  });
@@ -27,6 +27,18 @@ export const SubscriptionPackageList: React.FC<SubscriptionPackageListProps> = R
27
27
  const hasPackages = packages.length > 0;
28
28
  const showLoading = isLoading && !hasPackages;
29
29
 
30
+ // Debug logging in development
31
+ if (__DEV__) {
32
+ console.log("[SubscriptionPackageList] State:", {
33
+ isLoading,
34
+ hasPackages,
35
+ showLoading,
36
+ packagesCount: packages?.length ?? 0,
37
+ loadingText,
38
+ emptyText,
39
+ selectedPkgId: selectedPkg?.identifier ?? null,
40
+ });
41
+ }
30
42
 
31
43
  if (showLoading) {
32
44
  return (