@umituz/react-native-subscription 2.43.16 → 2.43.18
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.18",
|
|
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",
|
|
@@ -76,10 +76,9 @@ export interface ManagedSubscriptionFlowProps {
|
|
|
76
76
|
*/
|
|
77
77
|
import {
|
|
78
78
|
SubscriptionFlowProvider,
|
|
79
|
-
useSubscriptionFlowStatus
|
|
80
|
-
useSubscriptionFlowStore
|
|
79
|
+
useSubscriptionFlowStatus
|
|
81
80
|
} from "../providers/SubscriptionFlowProvider";
|
|
82
|
-
import { SubscriptionFlowStatus } from "../useSubscriptionFlow";
|
|
81
|
+
import { useSubscriptionFlowStore, SubscriptionFlowStatus } from "../useSubscriptionFlow";
|
|
83
82
|
|
|
84
83
|
const ManagedSubscriptionFlowInner = React.memo<ManagedSubscriptionFlowProps>(({
|
|
85
84
|
children,
|
|
@@ -96,7 +95,13 @@ const ManagedSubscriptionFlowInner = React.memo<ManagedSubscriptionFlowProps>(({
|
|
|
96
95
|
const { isInitialized: isSplashComplete } = useSplashFlow({
|
|
97
96
|
duration: splash?.duration || 0,
|
|
98
97
|
});
|
|
99
|
-
|
|
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
|
+
|
|
100
105
|
const [isNavReady, setIsNavReady] = useState(false);
|
|
101
106
|
|
|
102
107
|
// Mark navigation tree as ready after splash and localization
|
|
@@ -188,33 +193,24 @@ const ManagedSubscriptionFlowInner = React.memo<ManagedSubscriptionFlowProps>(({
|
|
|
188
193
|
});
|
|
189
194
|
}
|
|
190
195
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
isSyncing={isSyncing}
|
|
210
|
-
onPurchase={purchasePackage}
|
|
211
|
-
onRestore={restorePurchase}
|
|
212
|
-
onClose={closePostOnboardingPaywall}
|
|
213
|
-
/>
|
|
214
|
-
);
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
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
|
+
);
|
|
218
214
|
}
|
|
219
215
|
|
|
220
216
|
// 3. Application Content + Overlays
|