@umituz/react-native-subscription 2.43.17 → 2.43.19
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.43.
|
|
3
|
+
"version": "2.43.19",
|
|
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",
|
|
@@ -95,7 +95,13 @@ const ManagedSubscriptionFlowInner = React.memo<ManagedSubscriptionFlowProps>(({
|
|
|
95
95
|
const { isInitialized: isSplashComplete } = useSplashFlow({
|
|
96
96
|
duration: splash?.duration || 0,
|
|
97
97
|
});
|
|
98
|
-
|
|
98
|
+
|
|
99
|
+
// Hooks for paywall (called at component level, not inside conditional render)
|
|
100
|
+
const { isPremium, isSyncing, credits } = usePremiumStatus();
|
|
101
|
+
const { packages } = usePremiumPackages();
|
|
102
|
+
const { purchasePackage, restorePurchase } = usePremiumActions();
|
|
103
|
+
const { closePostOnboardingPaywall } = useSubscriptionFlowStore();
|
|
104
|
+
|
|
99
105
|
const [isNavReady, setIsNavReady] = useState(false);
|
|
100
106
|
|
|
101
107
|
// Mark navigation tree as ready after splash and localization
|
|
@@ -187,33 +193,24 @@ const ManagedSubscriptionFlowInner = React.memo<ManagedSubscriptionFlowProps>(({
|
|
|
187
193
|
});
|
|
188
194
|
}
|
|
189
195
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
isSyncing={isSyncing}
|
|
209
|
-
onPurchase={purchasePackage}
|
|
210
|
-
onRestore={restorePurchase}
|
|
211
|
-
onClose={closePostOnboardingPaywall}
|
|
212
|
-
/>
|
|
213
|
-
);
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
return <PostOnboardingPaywall />;
|
|
196
|
+
return (
|
|
197
|
+
<PaywallScreen
|
|
198
|
+
translations={paywall.translations}
|
|
199
|
+
legalUrls={paywall.legalUrls}
|
|
200
|
+
features={paywall.features}
|
|
201
|
+
bestValueIdentifier={paywall.bestValueIdentifier}
|
|
202
|
+
creditsLabel={paywall.creditsLabel}
|
|
203
|
+
heroImage={paywall.heroImage}
|
|
204
|
+
source="onboarding"
|
|
205
|
+
packages={packages}
|
|
206
|
+
isPremium={isPremium}
|
|
207
|
+
credits={credits}
|
|
208
|
+
isSyncing={isSyncing}
|
|
209
|
+
onPurchase={purchasePackage}
|
|
210
|
+
onRestore={restorePurchase}
|
|
211
|
+
onClose={closePostOnboardingPaywall}
|
|
212
|
+
/>
|
|
213
|
+
);
|
|
217
214
|
}
|
|
218
215
|
|
|
219
216
|
// 3. Application Content + Overlays
|
|
@@ -84,6 +84,7 @@ export const useSubscriptionFlowStore = createStore<SubscriptionFlowState, Subsc
|
|
|
84
84
|
showPostOnboardingPaywall: false,
|
|
85
85
|
paywallShown: true,
|
|
86
86
|
status: SubscriptionFlowStatus.READY,
|
|
87
|
+
showFeedback: true, // Show feedback screen when paywall is closed
|
|
87
88
|
});
|
|
88
89
|
subscriptionEventBus.emit(FLOW_EVENTS.PAYWALL_CLOSED, { timestamp: Date.now() });
|
|
89
90
|
},
|