@reevit/core 0.4.7 → 0.5.0

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 CHANGED
@@ -13,7 +13,7 @@ npm install @reevit/core
13
13
  - **ReevitAPIClient**: A lightweight, promise-based client for interacting with the Reevit backend.
14
14
  - **State Machine**: Framework-agnostic logic for managing checkout flows.
15
15
  - **Utilities**: Amount formatting, phone validation, network detection, and more.
16
- - **Types**: Comprehensive TypeScript definitions for the entire Reevit ecosystem.
16
+ - **Types**: Comprehensive TypeScript definitions for the entire Reevit ecosystem (Card, Mobile Money, Bank Transfer, Apple Pay, Google Pay).
17
17
  - **Styles**: Shared CSS for the "Unified Payment Widget" appearance.
18
18
 
19
19
  ## Usage (Low-level API)
package/dist/index.d.mts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Reevit Core Types
3
3
  * Shared type definitions for all Reevit SDKs
4
4
  */
5
- type PaymentMethod = 'card' | 'mobile_money' | 'bank_transfer';
5
+ type PaymentMethod = 'card' | 'mobile_money' | 'bank_transfer' | 'apple_pay' | 'google_pay';
6
6
  type MobileMoneyNetwork = 'mtn' | 'vodafone' | 'airteltigo';
7
7
  type PSPType = 'paystack' | 'hubtel' | 'flutterwave' | 'stripe' | 'monnify' | 'mpesa';
8
8
  /** Payment source type - indicates where the payment originated from */
@@ -113,6 +113,14 @@ interface ReevitTheme {
113
113
  pspSelectorBorderColor?: string;
114
114
  /** Use border-only style for PSP selector (no filled background) */
115
115
  pspSelectorUseBorder?: boolean;
116
+ /** Selected PSP background color */
117
+ selectedBackgroundColor?: string;
118
+ /** Selected PSP primary text color */
119
+ selectedTextColor?: string;
120
+ /** Selected PSP description/muted text color */
121
+ selectedDescriptionColor?: string;
122
+ /** Selected PSP border color */
123
+ selectedBorderColor?: string;
116
124
  }
117
125
  interface PSPConfig {
118
126
  id: string;
@@ -159,7 +167,7 @@ interface PaymentIntent {
159
167
  /** Currency code */
160
168
  currency: string;
161
169
  /** Payment status */
162
- status: 'pending' | 'processing' | 'succeeded' | 'failed' | 'cancelled';
170
+ status: 'pending' | 'requires_action' | 'processing' | 'succeeded' | 'failed' | 'canceled' | 'cancelled';
163
171
  /** Recommended PSP based on routing rules */
164
172
  recommendedPsp: PSPType;
165
173
  /** Available payment methods for this intent */
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Reevit Core Types
3
3
  * Shared type definitions for all Reevit SDKs
4
4
  */
5
- type PaymentMethod = 'card' | 'mobile_money' | 'bank_transfer';
5
+ type PaymentMethod = 'card' | 'mobile_money' | 'bank_transfer' | 'apple_pay' | 'google_pay';
6
6
  type MobileMoneyNetwork = 'mtn' | 'vodafone' | 'airteltigo';
7
7
  type PSPType = 'paystack' | 'hubtel' | 'flutterwave' | 'stripe' | 'monnify' | 'mpesa';
8
8
  /** Payment source type - indicates where the payment originated from */
@@ -113,6 +113,14 @@ interface ReevitTheme {
113
113
  pspSelectorBorderColor?: string;
114
114
  /** Use border-only style for PSP selector (no filled background) */
115
115
  pspSelectorUseBorder?: boolean;
116
+ /** Selected PSP background color */
117
+ selectedBackgroundColor?: string;
118
+ /** Selected PSP primary text color */
119
+ selectedTextColor?: string;
120
+ /** Selected PSP description/muted text color */
121
+ selectedDescriptionColor?: string;
122
+ /** Selected PSP border color */
123
+ selectedBorderColor?: string;
116
124
  }
117
125
  interface PSPConfig {
118
126
  id: string;
@@ -159,7 +167,7 @@ interface PaymentIntent {
159
167
  /** Currency code */
160
168
  currency: string;
161
169
  /** Payment status */
162
- status: 'pending' | 'processing' | 'succeeded' | 'failed' | 'cancelled';
170
+ status: 'pending' | 'requires_action' | 'processing' | 'succeeded' | 'failed' | 'canceled' | 'cancelled';
163
171
  /** Recommended PSP based on routing rules */
164
172
  recommendedPsp: PSPType;
165
173
  /** Available payment methods for this intent */
package/dist/styles.css CHANGED
@@ -74,7 +74,7 @@
74
74
  border: 1px solid var(--reevit-border);
75
75
  box-shadow: var(--reevit-shadow);
76
76
  width: 100%;
77
- max-width: 380px;
77
+ max-width: 360px;
78
78
  max-height: 90vh;
79
79
  overflow: hidden;
80
80
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reevit/core",
3
- "version": "0.4.7",
3
+ "version": "0.5.0",
4
4
  "description": "Core utilities and API client for Reevit payment SDKs",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -17,7 +17,8 @@
17
17
  "scripts": {
18
18
  "build": "tsup",
19
19
  "dev": "tsup --watch",
20
- "typecheck": "tsc --noEmit"
20
+ "typecheck": "tsc --noEmit",
21
+ "prepublishOnly": "npm run build"
21
22
  },
22
23
  "keywords": ["reevit", "payments", "africa", "sdk"],
23
24
  "author": "Reevit",