@umituz/react-native-subscription 2.3.2 → 2.3.4

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.2",
3
+ "version": "2.3.4",
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
 
@@ -54,18 +54,39 @@ export const SubscriptionModalOverlay: React.FC<SubscriptionModalOverlayProps> =
54
54
  const tokens = useAppDesignTokens();
55
55
  const config = { ...DEFAULT_LAYOUT, ...layoutConfig };
56
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
+ }
57
69
 
58
70
  const isFullScreen = variant === "fullscreen";
59
71
 
60
- const getFullscreenContentStyle = (): ViewStyle => ({
61
- width: Math.min(SCREEN_WIDTH * (config.widthPercent ?? 0.92), config.maxWidth ?? 480),
62
- maxHeight: SCREEN_HEIGHT * (config.maxHeightPercent ?? 0.88),
63
- borderRadius: config.borderRadius ?? 32,
64
- overflow: "hidden",
65
- borderWidth: 2,
66
- borderColor: "rgba(255, 255, 255, 0.15)",
67
- backgroundColor: tokens.colors.backgroundPrimary,
68
- });
72
+ const getFullscreenContentStyle = (): ViewStyle => {
73
+ const width = Math.min(SCREEN_WIDTH * (config.widthPercent ?? 0.92), config.maxWidth ?? 480);
74
+ const height = SCREEN_HEIGHT * (config.maxHeightPercent ?? 0.88);
75
+
76
+ if (__DEV__) {
77
+ console.log("[SubscriptionModalOverlay] Content dimensions:", { width, height });
78
+ }
79
+
80
+ return {
81
+ width,
82
+ height, // Changed from maxHeight to height - this is critical!
83
+ borderRadius: config.borderRadius ?? 32,
84
+ overflow: "hidden",
85
+ borderWidth: 2,
86
+ borderColor: "rgba(255, 255, 255, 0.15)",
87
+ backgroundColor: tokens.colors.backgroundPrimary,
88
+ };
89
+ };
69
90
 
70
91
  if (isFullScreen) {
71
92
  return (
@@ -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 (