@umituz/react-native-subscription 2.14.98 → 2.14.100

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.
Files changed (92) hide show
  1. package/README.md +211 -395
  2. package/package.json +1 -1
  3. package/src/application/README.md +46 -225
  4. package/src/application/ports/README.md +42 -97
  5. package/src/domain/README.md +36 -384
  6. package/src/domain/constants/README.md +0 -56
  7. package/src/domain/entities/README.md +43 -169
  8. package/src/domain/errors/README.md +33 -287
  9. package/src/domain/value-objects/README.md +43 -179
  10. package/src/domains/README.md +52 -0
  11. package/src/domains/README.md.bak +274 -0
  12. package/src/domains/config/README.md +93 -383
  13. package/src/domains/config/domain/README.md +37 -0
  14. package/src/domains/config/domain/entities/README.md +41 -0
  15. package/src/domains/paywall/README.md +99 -369
  16. package/src/domains/paywall/components/README.md +34 -178
  17. package/src/domains/paywall/entities/README.md +34 -193
  18. package/src/domains/paywall/hooks/README.md +34 -122
  19. package/src/domains/wallet/README.md +34 -275
  20. package/src/domains/wallet/README.md.bak +209 -0
  21. package/src/domains/wallet/domain/README.md +34 -101
  22. package/src/domains/wallet/domain/entities/README.md +34 -115
  23. package/src/domains/wallet/domain/errors/README.md +34 -151
  24. package/src/domains/wallet/infrastructure/README.md +34 -89
  25. package/src/domains/wallet/presentation/components/README.md +34 -224
  26. package/src/domains/wallet/presentation/hooks/README.md +34 -248
  27. package/src/infrastructure/README.md +37 -496
  28. package/src/infrastructure/mappers/README.md +0 -13
  29. package/src/infrastructure/repositories/README.md +74 -360
  30. package/src/infrastructure/services/README.md +95 -370
  31. package/src/presentation/README.md +123 -408
  32. package/src/presentation/README.md.bak +172 -0
  33. package/src/presentation/components/README.md +151 -179
  34. package/src/presentation/components/README.md.bak +217 -0
  35. package/src/presentation/components/details/CreditRow.md +65 -310
  36. package/src/presentation/components/details/DetailRow.md +63 -255
  37. package/src/presentation/components/details/PremiumDetailsCard.md +65 -238
  38. package/src/presentation/components/details/PremiumStatusBadge.md +64 -239
  39. package/src/presentation/components/details/README.md +97 -447
  40. package/src/presentation/components/feedback/PaywallFeedbackModal.md +63 -287
  41. package/src/presentation/components/feedback/README.md +97 -445
  42. package/src/presentation/components/paywall/PaywallModal.md +66 -416
  43. package/src/presentation/components/paywall/README.md +50 -186
  44. package/src/presentation/components/sections/README.md +97 -466
  45. package/src/presentation/components/sections/SubscriptionSection.md +92 -244
  46. package/src/presentation/hooks/README.md +154 -741
  47. package/src/presentation/hooks/useAuthAwarePurchase.md +58 -325
  48. package/src/presentation/hooks/useAuthGate.md +61 -375
  49. package/src/presentation/hooks/useAuthSubscriptionSync.md +66 -370
  50. package/src/presentation/hooks/useCreditChecker.md +73 -378
  51. package/src/presentation/hooks/useCredits.md +74 -313
  52. package/src/presentation/hooks/useCredits.md.bak +231 -0
  53. package/src/presentation/hooks/useCreditsGate.md +66 -318
  54. package/src/presentation/hooks/useDeductCredit.md +96 -156
  55. package/src/presentation/hooks/useDevTestCallbacks.md +63 -394
  56. package/src/presentation/hooks/useFeatureGate.md +105 -150
  57. package/src/presentation/hooks/useFeatureGate.md.bak +284 -0
  58. package/src/presentation/hooks/useInitializeCredits.md +64 -430
  59. package/src/presentation/hooks/usePaywall.md +61 -306
  60. package/src/presentation/hooks/usePaywallOperations.md +64 -458
  61. package/src/presentation/hooks/usePaywallVisibility.md +67 -316
  62. package/src/presentation/hooks/usePremium.md +84 -226
  63. package/src/presentation/hooks/usePremiumGate.md +60 -395
  64. package/src/presentation/hooks/usePremiumWithCredits.md +64 -401
  65. package/src/presentation/hooks/useSubscription.md +66 -422
  66. package/src/presentation/hooks/useSubscriptionDetails.md +65 -410
  67. package/src/presentation/hooks/useSubscriptionGate.md +80 -164
  68. package/src/presentation/hooks/useSubscriptionSettingsConfig.md +66 -346
  69. package/src/presentation/hooks/useSubscriptionStatus.md +66 -396
  70. package/src/presentation/hooks/useUserTier.md +63 -328
  71. package/src/presentation/hooks/useUserTierWithRepository.md +64 -424
  72. package/src/presentation/screens/README.md +48 -190
  73. package/src/presentation/types/README.md +0 -16
  74. package/src/presentation/utils/README.md +0 -21
  75. package/src/revenuecat/README.md +99 -518
  76. package/src/revenuecat/application/README.md +43 -0
  77. package/src/revenuecat/application/ports/README.md +41 -0
  78. package/src/revenuecat/domain/README.md +42 -141
  79. package/src/revenuecat/domain/constants/README.md +41 -0
  80. package/src/revenuecat/domain/entities/README.md +42 -0
  81. package/src/revenuecat/domain/errors/README.md +47 -191
  82. package/src/revenuecat/domain/types/README.md +41 -0
  83. package/src/revenuecat/domain/value-objects/README.md +41 -0
  84. package/src/revenuecat/infrastructure/README.md +41 -0
  85. package/src/revenuecat/infrastructure/config/README.md +32 -23
  86. package/src/revenuecat/infrastructure/handlers/README.md +41 -0
  87. package/src/revenuecat/infrastructure/managers/README.md +34 -42
  88. package/src/revenuecat/infrastructure/services/README.md +42 -0
  89. package/src/revenuecat/infrastructure/utils/README.md +41 -0
  90. package/src/revenuecat/presentation/README.md +42 -0
  91. package/src/revenuecat/presentation/hooks/README.md +29 -35
  92. package/src/utils/README.md +38 -525
@@ -2,189 +2,53 @@
2
2
 
3
3
  UI components specifically designed for paywall and subscription upgrade screens.
4
4
 
5
- ## Overview
6
-
7
- This directory contains specialized components for displaying paywalls, package selection, and subscription upgrade prompts.
8
-
9
- ## Components
10
-
11
- ### PaywallModal
12
- Modal overlay for paywall display.
13
-
14
- ```typescript
15
- interface PaywallModalProps {
16
- visible: boolean;
17
- onClose: () => void;
18
- onPurchase: (pkg: Package) => void;
19
- configuration: PaywallConfig;
20
- restorePurchases?: () => void;
21
- }
22
- ```
23
-
24
- **Features:**
25
- - Modal overlay with backdrop dismissal
26
- - Animated entry and exit
27
- - Close button
28
- - Responsive layout
29
- - Loading states
30
-
31
- ### PackageCard
32
- Individual subscription package display.
33
-
34
- ```typescript
35
- interface PackageCardProps {
36
- package: Package;
37
- selected?: boolean;
38
- onSelect: () => void;
39
- displayMode?: 'card' | 'list' | 'minimal';
40
- }
41
- ```
42
-
43
- **Display Modes:**
44
- - **card**: Full featured card with all details
45
- - **list**: Compact list item
46
- - **minimal**: Minimal version for tight spaces
47
-
48
- ### FeatureComparison
49
- Comparison table showing features across packages.
50
-
51
- ```typescript
52
- interface FeatureComparisonProps {
53
- packages: Package[];
54
- features: string[];
55
- highlightPackage?: string;
56
- }
57
- ```
58
-
59
- ### SocialProofBar
60
- Social proof element showing user count and ratings.
61
-
62
- ```typescript
63
- interface SocialProofBarProps {
64
- userCount?: number;
65
- rating?: number;
66
- style?: 'compact' | 'expanded';
67
- }
68
- ```
69
-
70
- ### CTAButton
71
- Call-to-action button for purchase.
72
-
73
- ```typescript
74
- interface CTAButtonProps {
75
- package: Package;
76
- onPress: () => void;
77
- disabled?: boolean;
78
- loading?: boolean;
79
- }
80
- ```
81
-
82
- ## Usage Examples
83
-
84
- ### Basic Paywall
85
-
86
- ```typescript
87
- import { PaywallModal } from './components/PaywallModal';
88
-
89
- function PaywallFlow() {
90
- const [visible, setVisible] = useState(false);
91
-
92
- return (
93
- <>
94
- <Button onPress={() => setVisible(true)}>Show Paywall</Button>
95
-
96
- <PaywallModal
97
- visible={visible}
98
- onClose={() => setVisible(false)}
99
- onPurchase={handlePurchase}
100
- configuration={paywallConfig}
101
- />
102
- </>
103
- );
104
- }
105
- ```
106
-
107
- ### Package Selection
108
-
109
- ```typescript
110
- import { PackageCard } from './components/PackageCard';
111
-
112
- function PackageSelection() {
113
- const [selected, setSelected] = useState('premium_annual');
114
-
115
- return (
116
- <ScrollView horizontal>
117
- {packages.map(pkg => (
118
- <PackageCard
119
- key={pkg.identifier}
120
- package={pkg}
121
- selected={selected === pkg.identifier}
122
- onSelect={() => setSelected(pkg.identifier)}
123
- />
124
- ))}
125
- </ScrollView>
126
- );
127
- }
128
- ```
129
-
130
- ### Feature Comparison
131
-
132
- ```typescript
133
- import { FeatureComparison } from './components/FeatureComparison';
134
-
135
- function PaywallComparison() {
136
- const features = [
137
- 'Unlimited Access',
138
- 'Ad-Free',
139
- 'Priority Support',
140
- 'AI Features',
141
- ];
142
-
143
- return (
144
- <FeatureComparison
145
- packages={packages}
146
- features={features}
147
- highlightPackage="premium_annual"
148
- />
149
- );
150
- }
151
- ```
152
-
153
- ## Component Styling
154
-
155
- Components use design tokens for consistent styling:
156
-
157
- ```typescript
158
- import { useAppDesignTokens } from '@umituz/react-native-design-system';
159
-
160
- const tokens = useAppDesignTokens();
161
-
162
- const cardStyles = StyleSheet.create({
163
- card: {
164
- backgroundColor: tokens.colors.surface,
165
- borderRadius: tokens.radius.xl,
166
- padding: tokens.spacing.xl,
167
- shadowColor: tokens.colors.shadow,
168
- shadowOffset: { width: 0, height: 2 },
169
- shadowOpacity: 0.1,
170
- shadowRadius: 8,
171
- },
172
- });
173
- ```
174
-
175
- ## Best Practices
176
-
177
- 1. **Visual Hierarchy**: Highlight recommended packages clearly
178
- 2. **Clear Pricing**: Show price, period, and per-month equivalent
179
- 3. **Feature Clarity**: Make features easy to understand
180
- 4. **Social Proof**: Include ratings, reviews, user counts
181
- 5. **Trust Signals**: Show guarantees, badges, certifications
182
- 6. **Mobile First**: Optimize for mobile screens
183
- 7. **Performance**: Lazy load images, avoid expensive animations
184
- 8. **Accessibility**: Support screen readers, proper touch targets
185
-
186
- ## Related
187
-
188
- - [Paywall README](../../../domains/paywall/README.md)
189
- - [usePaywallVisibility](../../hooks/usePaywallVisibility.md)
190
- - [PaywallOperations](../../hooks/usePaywallOperations.md)
5
+ ## Location
6
+
7
+ `src/presentation/components/paywall/`
8
+
9
+ ## Strategy
10
+
11
+ Specialized components for displaying paywalls, package selection, and subscription upgrade prompts. These components handle the visual presentation of subscription offers and user purchase flows.
12
+
13
+ ## Restrictions
14
+
15
+ ### REQUIRED
16
+
17
+ - Must use design tokens for consistent styling
18
+ - Must support multiple display modes (card, list, minimal)
19
+ - Must include loading states
20
+ - Must handle accessibility requirements
21
+ - Must support screen readers
22
+ - Must provide proper touch targets
23
+
24
+ ### PROHIBITED
25
+
26
+ - MUST NOT hardcode pricing or product information
27
+ - MUST NOT bypass payment validation
28
+ - MUST NOT expose RevenueCat implementation details
29
+ - MUST NOT create custom payment flows outside approved patterns
30
+
31
+ ### CRITICAL
32
+
33
+ - All purchase flows MUST go through RevenueCat
34
+ - Never log or transmit sensitive payment information
35
+ - Always handle errors gracefully with user-friendly messages
36
+ - Must support cancellation and refund flows
37
+
38
+ ## AI Agent Guidelines
39
+
40
+ When modifying paywall components:
41
+ 1. Maintain visual hierarchy for recommended packages
42
+ 2. Ensure clear pricing display (price, period, per-month equivalent)
43
+ 3. Keep features easy to understand
44
+ 4. Include social proof elements (ratings, reviews, user counts)
45
+ 5. Add trust signals (guarantees, badges, certifications)
46
+ 6. Optimize for mobile screens
47
+ 7. Lazy load images and avoid expensive animations
48
+ 8. Always support accessibility standards
49
+
50
+ ## Related Documentation
51
+
52
+ - [Paywall Domain](../../../domains/paywall/README.md)
53
+ - [Paywall Hooks](../../hooks/README.md)
54
+ - [RevenueCat Integration](../../../revenuecat/README.md)