@umituz/react-native-subscription 2.37.111 → 2.37.112

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.37.111",
3
+ "version": "2.37.112",
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",
@@ -1,4 +1,4 @@
1
- import type { SubscriptionStatusType } from "./PremiumStatusBadge";
1
+ import type { SubscriptionStatusType } from "./PremiumStatusBadge.types";
2
2
  import type { CreditInfo } from "../../../core/types";
3
3
 
4
4
  export type { CreditInfo };
@@ -7,20 +7,11 @@ import React, { useMemo } from "react";
7
7
  import { View, StyleSheet } from "react-native";
8
8
  import { AtomicText } from "@umituz/react-native-design-system/atoms";
9
9
  import { useAppDesignTokens } from "@umituz/react-native-design-system/theme";
10
- import {
11
- SUBSCRIPTION_STATUS,
12
- type SubscriptionStatusType
13
- } from "../../../core/SubscriptionConstants";
10
+ import { SUBSCRIPTION_STATUS } from "../../../core/SubscriptionConstants";
11
+ import type { PremiumStatusBadgeProps } from "./PremiumStatusBadge.types";
12
+ import type { SubscriptionStatusType } from "../../../core/SubscriptionConstants";
14
13
 
15
- export type { SubscriptionStatusType };
16
-
17
- export interface PremiumStatusBadgeProps {
18
- status: SubscriptionStatusType;
19
- activeLabel: string;
20
- expiredLabel: string;
21
- noneLabel: string;
22
- canceledLabel: string;
23
- }
14
+ export type { PremiumStatusBadgeProps };
24
15
 
25
16
  export const PremiumStatusBadge: React.FC<PremiumStatusBadgeProps> = ({
26
17
  status,
@@ -0,0 +1,11 @@
1
+ import type { SubscriptionStatusType } from "../../../../core/SubscriptionConstants";
2
+
3
+ export type { SubscriptionStatusType };
4
+
5
+ export interface PremiumStatusBadgeProps {
6
+ status: SubscriptionStatusType;
7
+ activeLabel: string;
8
+ expiredLabel: string;
9
+ noneLabel: string;
10
+ canceledLabel: string;
11
+ }
@@ -6,6 +6,9 @@ import { useAppDesignTokens } from "@umituz/react-native-design-system/theme";
6
6
  import { usePaywallFeedback } from "../../../../../presentation/hooks/feedback/usePaywallFeedback";
7
7
  import { createPaywallFeedbackStyles } from "./paywallFeedbackStyles";
8
8
  import { FeedbackOption } from "./FeedbackOption";
9
+ import type { PaywallFeedbackTranslations, PaywallFeedbackModalProps } from "./PaywallFeedbackModal.types";
10
+
11
+ export type { PaywallFeedbackTranslations, PaywallFeedbackModalProps };
9
12
 
10
13
  const FEEDBACK_OPTION_IDS = [
11
14
  "too_expensive",
@@ -15,27 +18,6 @@ const FEEDBACK_OPTION_IDS = [
15
18
  "other",
16
19
  ] as const;
17
20
 
18
- export interface PaywallFeedbackTranslations {
19
- title: string;
20
- subtitle: string;
21
- submit: string;
22
- otherPlaceholder: string;
23
- reasons: {
24
- too_expensive: string;
25
- no_need: string;
26
- trying_out: string;
27
- technical_issues: string;
28
- other: string;
29
- };
30
- }
31
-
32
- export interface PaywallFeedbackModalProps {
33
- translations: PaywallFeedbackTranslations;
34
- visible: boolean;
35
- onClose: () => void;
36
- onSubmit: (reason: string) => void;
37
- }
38
-
39
21
  export const PaywallFeedbackModal: React.FC<PaywallFeedbackModalProps> = React.memo(({
40
22
  translations,
41
23
  visible,
@@ -0,0 +1,20 @@
1
+ export interface PaywallFeedbackTranslations {
2
+ title: string;
3
+ subtitle: string;
4
+ submit: string;
5
+ otherPlaceholder: string;
6
+ reasons: {
7
+ too_expensive: string;
8
+ no_need: string;
9
+ trying_out: string;
10
+ technical_issues: string;
11
+ other: string;
12
+ };
13
+ }
14
+
15
+ export interface PaywallFeedbackModalProps {
16
+ translations: PaywallFeedbackTranslations;
17
+ visible: boolean;
18
+ onClose: () => void;
19
+ onSubmit: (reason: string) => void;
20
+ }
@@ -9,11 +9,9 @@ import { View, Modal, StyleSheet } from "react-native";
9
9
  import { AtomicSpinner, AtomicText } from "@umituz/react-native-design-system/atoms";
10
10
  import { useAppDesignTokens } from "@umituz/react-native-design-system/theme";
11
11
  import { usePurchaseLoadingStore, selectIsPurchasing } from "../../stores/purchaseLoadingStore";
12
+ import type { PurchaseLoadingOverlayProps } from "./PurchaseLoadingOverlay.types";
12
13
 
13
- export interface PurchaseLoadingOverlayProps {
14
- /** Loading message to display */
15
- loadingText?: string;
16
- }
14
+ export type { PurchaseLoadingOverlayProps };
17
15
 
18
16
  export const PurchaseLoadingOverlay: React.FC<PurchaseLoadingOverlayProps> = React.memo(
19
17
  ({ loadingText }) => {
@@ -0,0 +1,4 @@
1
+ export interface PurchaseLoadingOverlayProps {
2
+ /** Loading message to display */
3
+ loadingText?: string;
4
+ }
@@ -6,41 +6,10 @@
6
6
 
7
7
  import React from "react";
8
8
  import { View, TouchableOpacity } from "react-native";
9
- import type { StyleProp, ViewStyle } from "react-native";
10
- import {
11
- PremiumDetailsCard,
12
- type CreditInfo,
13
- type PremiumDetailsTranslations,
14
- } from "../details/PremiumDetailsCard";
15
- import type { SubscriptionStatusType } from "../details/PremiumStatusBadge";
9
+ import { PremiumDetailsCard } from "../details/PremiumDetailsCard";
10
+ import type { SubscriptionSectionConfig, SubscriptionSectionProps } from "./SubscriptionSection.types";
16
11
 
17
- export interface SubscriptionSectionConfig {
18
- /** Subscription status type */
19
- statusType: SubscriptionStatusType;
20
- /** Whether user has premium */
21
- isPremium: boolean;
22
- /** Formatted expiration date string */
23
- expirationDate?: string | null;
24
- /** Formatted purchase date string */
25
- purchaseDate?: string | null;
26
- /** Days remaining until expiration */
27
- daysRemaining?: number | null;
28
- /** Credit info array (app-specific, passed from app) */
29
- credits?: CreditInfo[];
30
- /** All translations (app must provide these) */
31
- translations: PremiumDetailsTranslations;
32
- /** Handler for manage subscription button */
33
- onManageSubscription?: () => void;
34
- /** Handler for upgrade button */
35
- onUpgrade?: () => void;
36
- /** Handler for when section is tapped (navigate to detail screen) */
37
- onPress?: () => void;
38
- }
39
-
40
- export interface SubscriptionSectionProps {
41
- config: SubscriptionSectionConfig;
42
- containerStyle?: StyleProp<ViewStyle>;
43
- }
12
+ export type { SubscriptionSectionConfig, SubscriptionSectionProps };
44
13
 
45
14
  export const SubscriptionSection: React.FC<SubscriptionSectionProps> = ({
46
15
  config,
@@ -0,0 +1,22 @@
1
+ import type { StyleProp, ViewStyle } from "react-native";
2
+ import type { SubscriptionStatusType } from "../../../../core/SubscriptionConstants";
3
+ import type { CreditInfo } from "../../../../core/types";
4
+ import type { PremiumDetailsTranslations } from "../details/PremiumDetailsCardTypes";
5
+
6
+ export interface SubscriptionSectionConfig {
7
+ statusType: SubscriptionStatusType;
8
+ isPremium: boolean;
9
+ expirationDate?: string | null;
10
+ purchaseDate?: string | null;
11
+ daysRemaining?: number | null;
12
+ credits?: CreditInfo[];
13
+ translations: PremiumDetailsTranslations;
14
+ onManageSubscription?: () => void;
15
+ onUpgrade?: () => void;
16
+ onPress?: () => void;
17
+ }
18
+
19
+ export interface SubscriptionSectionProps {
20
+ config: SubscriptionSectionConfig;
21
+ containerStyle?: StyleProp<ViewStyle>;
22
+ }
@@ -10,17 +10,9 @@ import { View, StyleSheet } from "react-native";
10
10
 
11
11
  import { AtomicText, AtomicIcon } from "@umituz/react-native-design-system/atoms";
12
12
  import { useAppDesignTokens } from "@umituz/react-native-design-system/theme";
13
+ import type { BalanceCardTranslations, BalanceCardProps } from "./BalanceCard.types";
13
14
 
14
- export interface BalanceCardTranslations {
15
- balanceLabel: string;
16
- availableCredits: string;
17
- }
18
-
19
- interface BalanceCardProps {
20
- balance: number;
21
- translations: BalanceCardTranslations;
22
- iconName?: string;
23
- }
15
+ export type { BalanceCardTranslations };
24
16
 
25
17
  export const BalanceCard: React.FC<BalanceCardProps> = ({
26
18
  balance,
@@ -0,0 +1,10 @@
1
+ export interface BalanceCardTranslations {
2
+ balanceLabel: string;
3
+ availableCredits: string;
4
+ }
5
+
6
+ export interface BalanceCardProps {
7
+ balance: number;
8
+ translations: BalanceCardTranslations;
9
+ iconName?: string;
10
+ }
@@ -2,26 +2,13 @@ import React from "react";
2
2
  import { View, ScrollView } from "react-native";
3
3
  import { AtomicText, AtomicIcon } from "@umituz/react-native-design-system/atoms";
4
4
  import { useAppDesignTokens } from "@umituz/react-native-design-system/theme";
5
- import type { CreditLog } from "../../domain/types/transaction.types";
6
5
  import { TransactionItem } from "./TransactionItem";
7
- import type { TransactionItemTranslations } from "./TransactionItem.types";
8
6
  import { transactionListStyles } from "./TransactionList.styles";
9
7
  import { LoadingState, EmptyState } from "./TransactionListStates";
10
8
  import { DEFAULT_TRANSACTION_LIST_MAX_HEIGHT } from "./TransactionList.constants";
9
+ import type { TransactionListTranslations, TransactionListProps } from "./TransactionList.types";
11
10
 
12
- export interface TransactionListTranslations extends TransactionItemTranslations {
13
- title: string;
14
- empty: string;
15
- loading: string;
16
- }
17
-
18
- interface TransactionListProps {
19
- transactions: CreditLog[];
20
- loading: boolean;
21
- translations: TransactionListTranslations;
22
- maxHeight?: number;
23
- dateFormatter?: (timestamp: number) => string;
24
- }
11
+ export type { TransactionListTranslations };
25
12
 
26
13
  export const TransactionList: React.FC<TransactionListProps> = ({
27
14
  transactions,
@@ -0,0 +1,16 @@
1
+ import type { CreditLog } from "../../domain/types/transaction.types";
2
+ import type { TransactionItemTranslations } from "./TransactionItem.types";
3
+
4
+ export interface TransactionListTranslations extends TransactionItemTranslations {
5
+ title: string;
6
+ empty: string;
7
+ loading: string;
8
+ }
9
+
10
+ export interface TransactionListProps {
11
+ transactions: CreditLog[];
12
+ loading: boolean;
13
+ translations: TransactionListTranslations;
14
+ maxHeight?: number;
15
+ dateFormatter?: (timestamp: number) => string;
16
+ }
package/src/index.ts CHANGED
@@ -49,7 +49,8 @@ export * from "./presentation/hooks/feedback/useFeedbackSubmit";
49
49
 
50
50
  // Presentation Layer - Components
51
51
  export * from "./domains/subscription/presentation/components/details/PremiumDetailsCard";
52
- export * from "./domains/subscription/presentation/components/details/PremiumStatusBadge";
52
+ export { PremiumStatusBadge } from "./domains/subscription/presentation/components/details/PremiumStatusBadge";
53
+ export type { PremiumStatusBadgeProps } from "./domains/subscription/presentation/components/details/PremiumStatusBadge.types";
53
54
  export * from "./domains/subscription/presentation/components/sections/SubscriptionSection";
54
55
  export * from "./domains/subscription/presentation/components/feedback/PaywallFeedbackModal";
55
56
  export * from "./domains/subscription/presentation/screens/SubscriptionDetailScreen";