@umituz/react-native-subscription 2.27.25 → 2.27.27
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.27.
|
|
3
|
+
"version": "2.27.27",
|
|
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",
|
|
@@ -3,20 +3,11 @@
|
|
|
3
3
|
* Creates a ready-to-use InitModule for app initialization
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import type { InitModule } from '@umituz/react-native-design-system';
|
|
6
7
|
import { initializeSubscription, type SubscriptionInitConfig } from '../infrastructure/services/SubscriptionInitializer';
|
|
7
8
|
|
|
8
9
|
declare const __DEV__: boolean;
|
|
9
10
|
|
|
10
|
-
/**
|
|
11
|
-
* InitModule interface (from @umituz/react-native-design-system)
|
|
12
|
-
*/
|
|
13
|
-
export interface InitModule {
|
|
14
|
-
name: string;
|
|
15
|
-
init: () => Promise<boolean>;
|
|
16
|
-
critical?: boolean;
|
|
17
|
-
dependsOn?: string[];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
11
|
export interface SubscriptionInitModuleConfig extends Omit<SubscriptionInitConfig, 'apiKey'> {
|
|
21
12
|
/**
|
|
22
13
|
* RevenueCat API key getter function
|
|
@@ -48,6 +48,9 @@ export interface UsePaywallVisibilityResult {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export function usePaywallVisibility(): UsePaywallVisibilityResult {
|
|
51
|
+
if (typeof __DEV__ !== 'undefined' && __DEV__) {
|
|
52
|
+
console.log('[usePaywallVisibility] Hook called');
|
|
53
|
+
}
|
|
51
54
|
const state = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
52
55
|
|
|
53
56
|
const setShowPaywall = useCallback((visible: boolean, source?: PurchaseSource) => {
|
|
@@ -33,6 +33,9 @@ export interface UsePremiumResult {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export const usePremium = (): UsePremiumResult => {
|
|
36
|
+
if (typeof __DEV__ !== 'undefined' && __DEV__) {
|
|
37
|
+
console.log('[usePremium] Hook called');
|
|
38
|
+
}
|
|
36
39
|
const { isPremium: subscriptionActive, isLoading: statusLoading } = useSubscriptionStatus();
|
|
37
40
|
const { credits, isLoading: creditsLoading } = useCredits();
|
|
38
41
|
|