@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.
- package/README.md +211 -395
- package/package.json +1 -1
- package/src/application/README.md +46 -225
- package/src/application/ports/README.md +42 -97
- package/src/domain/README.md +36 -384
- package/src/domain/constants/README.md +0 -56
- package/src/domain/entities/README.md +43 -169
- package/src/domain/errors/README.md +33 -287
- package/src/domain/value-objects/README.md +43 -179
- package/src/domains/README.md +52 -0
- package/src/domains/README.md.bak +274 -0
- package/src/domains/config/README.md +93 -383
- package/src/domains/config/domain/README.md +37 -0
- package/src/domains/config/domain/entities/README.md +41 -0
- package/src/domains/paywall/README.md +99 -369
- package/src/domains/paywall/components/README.md +34 -178
- package/src/domains/paywall/entities/README.md +34 -193
- package/src/domains/paywall/hooks/README.md +34 -122
- package/src/domains/wallet/README.md +34 -275
- package/src/domains/wallet/README.md.bak +209 -0
- package/src/domains/wallet/domain/README.md +34 -101
- package/src/domains/wallet/domain/entities/README.md +34 -115
- package/src/domains/wallet/domain/errors/README.md +34 -151
- package/src/domains/wallet/infrastructure/README.md +34 -89
- package/src/domains/wallet/presentation/components/README.md +34 -224
- package/src/domains/wallet/presentation/hooks/README.md +34 -248
- package/src/infrastructure/README.md +37 -496
- package/src/infrastructure/mappers/README.md +0 -13
- package/src/infrastructure/repositories/README.md +74 -360
- package/src/infrastructure/services/README.md +95 -370
- package/src/presentation/README.md +123 -408
- package/src/presentation/README.md.bak +172 -0
- package/src/presentation/components/README.md +151 -179
- package/src/presentation/components/README.md.bak +217 -0
- package/src/presentation/components/details/CreditRow.md +65 -310
- package/src/presentation/components/details/DetailRow.md +63 -255
- package/src/presentation/components/details/PremiumDetailsCard.md +65 -238
- package/src/presentation/components/details/PremiumStatusBadge.md +64 -239
- package/src/presentation/components/details/README.md +97 -447
- package/src/presentation/components/feedback/PaywallFeedbackModal.md +63 -287
- package/src/presentation/components/feedback/README.md +97 -445
- package/src/presentation/components/paywall/PaywallModal.md +66 -416
- package/src/presentation/components/paywall/README.md +50 -186
- package/src/presentation/components/sections/README.md +97 -466
- package/src/presentation/components/sections/SubscriptionSection.md +92 -244
- package/src/presentation/hooks/README.md +154 -741
- package/src/presentation/hooks/useAuthAwarePurchase.md +58 -325
- package/src/presentation/hooks/useAuthGate.md +61 -375
- package/src/presentation/hooks/useAuthSubscriptionSync.md +66 -370
- package/src/presentation/hooks/useCreditChecker.md +73 -378
- package/src/presentation/hooks/useCredits.md +74 -313
- package/src/presentation/hooks/useCredits.md.bak +231 -0
- package/src/presentation/hooks/useCreditsGate.md +66 -318
- package/src/presentation/hooks/useDeductCredit.md +96 -156
- package/src/presentation/hooks/useDevTestCallbacks.md +63 -394
- package/src/presentation/hooks/useFeatureGate.md +105 -150
- package/src/presentation/hooks/useFeatureGate.md.bak +284 -0
- package/src/presentation/hooks/useInitializeCredits.md +64 -430
- package/src/presentation/hooks/usePaywall.md +61 -306
- package/src/presentation/hooks/usePaywallOperations.md +64 -458
- package/src/presentation/hooks/usePaywallVisibility.md +67 -316
- package/src/presentation/hooks/usePremium.md +84 -226
- package/src/presentation/hooks/usePremiumGate.md +60 -395
- package/src/presentation/hooks/usePremiumWithCredits.md +64 -401
- package/src/presentation/hooks/useSubscription.md +66 -422
- package/src/presentation/hooks/useSubscriptionDetails.md +65 -410
- package/src/presentation/hooks/useSubscriptionGate.md +80 -164
- package/src/presentation/hooks/useSubscriptionSettingsConfig.md +66 -346
- package/src/presentation/hooks/useSubscriptionStatus.md +66 -396
- package/src/presentation/hooks/useUserTier.md +63 -328
- package/src/presentation/hooks/useUserTierWithRepository.md +64 -424
- package/src/presentation/screens/README.md +48 -190
- package/src/presentation/types/README.md +0 -16
- package/src/presentation/utils/README.md +0 -21
- package/src/revenuecat/README.md +99 -518
- package/src/revenuecat/application/README.md +43 -0
- package/src/revenuecat/application/ports/README.md +41 -0
- package/src/revenuecat/domain/README.md +42 -141
- package/src/revenuecat/domain/constants/README.md +41 -0
- package/src/revenuecat/domain/entities/README.md +42 -0
- package/src/revenuecat/domain/errors/README.md +47 -191
- package/src/revenuecat/domain/types/README.md +41 -0
- package/src/revenuecat/domain/value-objects/README.md +41 -0
- package/src/revenuecat/infrastructure/README.md +41 -0
- package/src/revenuecat/infrastructure/config/README.md +32 -23
- package/src/revenuecat/infrastructure/handlers/README.md +41 -0
- package/src/revenuecat/infrastructure/managers/README.md +34 -42
- package/src/revenuecat/infrastructure/services/README.md +42 -0
- package/src/revenuecat/infrastructure/utils/README.md +41 -0
- package/src/revenuecat/presentation/README.md +42 -0
- package/src/revenuecat/presentation/hooks/README.md +29 -35
- 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
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
###
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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)
|