@solvapay/react 2.1.1 → 2.2.0-preview-11dbbe603cd1b9a44cc41b5eee3686bc4000f97f
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/CHANGELOG.md +23 -2
- package/dist/{chunk-HQH6KSXJ.js → chunk-EWB43JVC.js} +5 -2
- package/dist/{chunk-QXNNMNCV.js → chunk-M6O7ZWNP.js} +136 -51
- package/dist/{chunk-LL6AYSTC.js → chunk-WISTNSUH.js} +371 -317
- package/dist/{index-CBWGkBqF.d.ts → index-APG9WYgS.d.cts} +33 -5
- package/dist/{index-SylJb9Rh.d.cts → index-ofZwGvIZ.d.ts} +33 -5
- package/dist/index.cjs +1455 -1319
- package/dist/index.d.cts +82 -17
- package/dist/index.d.ts +82 -17
- package/dist/index.js +9 -3
- package/dist/mcp/index.cjs +1561 -1345
- package/dist/mcp/index.d.cts +176 -129
- package/dist/mcp/index.d.ts +176 -129
- package/dist/mcp/index.js +178 -92
- package/dist/mcp/styles.css +39 -14
- package/dist/primitives/index.cjs +822 -786
- package/dist/primitives/index.d.cts +4 -4
- package/dist/primitives/index.d.ts +4 -4
- package/dist/primitives/index.js +2 -2
- package/dist/{shared-D0hmT1qU.d.cts → shared-BQbMyX5V.d.cts} +14 -1
- package/dist/{shared-CUl6mTC1.d.ts → shared-DJdsOLag.d.ts} +14 -1
- package/dist/styles.css +20 -0
- package/package.json +5 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React, { Ref } from 'react';
|
|
3
|
-
import { b as Plan,
|
|
4
|
-
export {
|
|
3
|
+
import { b as Plan, z as Product, s as UseTopupAmountSelectorReturn, y as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, u as AutoRechargeConfig } from '../shared-BQbMyX5V.cjs';
|
|
4
|
+
export { B as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../shared-BQbMyX5V.cjs';
|
|
5
5
|
import { TaxBreakdown, BusinessDetailsInput } from '@solvapay/core';
|
|
6
|
-
import { A as AutoRechargeInputPayload, I as AmountInputUnit, J as AutoRechargeFormState, l as PaywallStructuredContent, U as UsageSnapshot } from '../index-
|
|
7
|
-
export { K as ActivationFlow, L as ActivationFlowActivateButton, N as ActivationFlowActivated, O as ActivationFlowAmountPicker, Q as ActivationFlowContinueButton, R as ActivationFlowError, S as ActivationFlowLoading, T as ActivationFlowRetrying, V as ActivationFlowRoot, m as ActivationFlowStep, W as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, X as CheckoutStepsAmountContinueButton, Y as CheckoutStepsAmountPicker, Z as CheckoutStepsBackLink, _ as CheckoutStepsIfStep, $ as CheckoutStepsPayment, a0 as CheckoutStepsPlanContinueButton, a1 as CheckoutStepsPlanGrid, a2 as CheckoutStepsRoot, a3 as CheckoutStepsStepHeading, a4 as CheckoutStepsStepMessage, a5 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a6 as PaymentForm, j as PaymentFormBusinessDetails, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, a7 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a8 as PurchaseGateAllowed, a9 as PurchaseGateBlocked, aa as PurchaseGateError, ab as PurchaseGateLoading, ac as PurchaseGateRoot, ad as useActivationFlow, G as useCheckoutStepsContext, ae as usePurchaseGate } from '../index-
|
|
6
|
+
import { A as AutoRechargeInputPayload, I as AmountInputUnit, J as AutoRechargeFormState, l as PaywallStructuredContent, U as UsageSnapshot } from '../index-APG9WYgS.cjs';
|
|
7
|
+
export { K as ActivationFlow, L as ActivationFlowActivateButton, N as ActivationFlowActivated, O as ActivationFlowAmountPicker, Q as ActivationFlowContinueButton, R as ActivationFlowError, S as ActivationFlowLoading, T as ActivationFlowRetrying, V as ActivationFlowRoot, m as ActivationFlowStep, W as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, X as CheckoutStepsAmountContinueButton, Y as CheckoutStepsAmountPicker, Z as CheckoutStepsBackLink, _ as CheckoutStepsIfStep, $ as CheckoutStepsPayment, a0 as CheckoutStepsPlanContinueButton, a1 as CheckoutStepsPlanGrid, a2 as CheckoutStepsRoot, a3 as CheckoutStepsStepHeading, a4 as CheckoutStepsStepMessage, a5 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a6 as PaymentForm, j as PaymentFormBusinessDetails, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, a7 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a8 as PurchaseGateAllowed, a9 as PurchaseGateBlocked, aa as PurchaseGateError, ab as PurchaseGateLoading, ac as PurchaseGateRoot, ad as useActivationFlow, G as useCheckoutStepsContext, ae as usePurchaseGate } from '../index-APG9WYgS.cjs';
|
|
8
8
|
import { PaymentElement } from '@stripe/react-stripe-js';
|
|
9
9
|
import { Stripe, StripeElements } from '@stripe/stripe-js';
|
|
10
10
|
import '../adapters/auth.cjs';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React, { Ref } from 'react';
|
|
3
|
-
import { b as Plan,
|
|
4
|
-
export {
|
|
3
|
+
import { b as Plan, z as Product, s as UseTopupAmountSelectorReturn, y as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, u as AutoRechargeConfig } from '../shared-DJdsOLag.js';
|
|
4
|
+
export { B as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../shared-DJdsOLag.js';
|
|
5
5
|
import { TaxBreakdown, BusinessDetailsInput } from '@solvapay/core';
|
|
6
|
-
import { A as AutoRechargeInputPayload, I as AmountInputUnit, J as AutoRechargeFormState, l as PaywallStructuredContent, U as UsageSnapshot } from '../index-
|
|
7
|
-
export { K as ActivationFlow, L as ActivationFlowActivateButton, N as ActivationFlowActivated, O as ActivationFlowAmountPicker, Q as ActivationFlowContinueButton, R as ActivationFlowError, S as ActivationFlowLoading, T as ActivationFlowRetrying, V as ActivationFlowRoot, m as ActivationFlowStep, W as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, X as CheckoutStepsAmountContinueButton, Y as CheckoutStepsAmountPicker, Z as CheckoutStepsBackLink, _ as CheckoutStepsIfStep, $ as CheckoutStepsPayment, a0 as CheckoutStepsPlanContinueButton, a1 as CheckoutStepsPlanGrid, a2 as CheckoutStepsRoot, a3 as CheckoutStepsStepHeading, a4 as CheckoutStepsStepMessage, a5 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a6 as PaymentForm, j as PaymentFormBusinessDetails, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, a7 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a8 as PurchaseGateAllowed, a9 as PurchaseGateBlocked, aa as PurchaseGateError, ab as PurchaseGateLoading, ac as PurchaseGateRoot, ad as useActivationFlow, G as useCheckoutStepsContext, ae as usePurchaseGate } from '../index-
|
|
6
|
+
import { A as AutoRechargeInputPayload, I as AmountInputUnit, J as AutoRechargeFormState, l as PaywallStructuredContent, U as UsageSnapshot } from '../index-ofZwGvIZ.js';
|
|
7
|
+
export { K as ActivationFlow, L as ActivationFlowActivateButton, N as ActivationFlowActivated, O as ActivationFlowAmountPicker, Q as ActivationFlowContinueButton, R as ActivationFlowError, S as ActivationFlowLoading, T as ActivationFlowRetrying, V as ActivationFlowRoot, m as ActivationFlowStep, W as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, X as CheckoutStepsAmountContinueButton, Y as CheckoutStepsAmountPicker, Z as CheckoutStepsBackLink, _ as CheckoutStepsIfStep, $ as CheckoutStepsPayment, a0 as CheckoutStepsPlanContinueButton, a1 as CheckoutStepsPlanGrid, a2 as CheckoutStepsRoot, a3 as CheckoutStepsStepHeading, a4 as CheckoutStepsStepMessage, a5 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a6 as PaymentForm, j as PaymentFormBusinessDetails, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, a7 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a8 as PurchaseGateAllowed, a9 as PurchaseGateBlocked, aa as PurchaseGateError, ab as PurchaseGateLoading, ac as PurchaseGateRoot, ad as useActivationFlow, G as useCheckoutStepsContext, ae as usePurchaseGate } from '../index-ofZwGvIZ.js';
|
|
8
8
|
import { PaymentElement } from '@stripe/react-stripe-js';
|
|
9
9
|
import { Stripe, StripeElements } from '@stripe/stripe-js';
|
|
10
10
|
import '../adapters/auth.js';
|
package/dist/primitives/index.js
CHANGED
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
useCreditGate,
|
|
89
89
|
usePaywallNotice,
|
|
90
90
|
usePurchaseGate
|
|
91
|
-
} from "../chunk-
|
|
91
|
+
} from "../chunk-EWB43JVC.js";
|
|
92
92
|
import {
|
|
93
93
|
AmountPicker,
|
|
94
94
|
AmountPickerConfirm,
|
|
@@ -175,7 +175,7 @@ import {
|
|
|
175
175
|
usePlanSelector,
|
|
176
176
|
useTopupForm,
|
|
177
177
|
useUsageMeter
|
|
178
|
-
} from "../chunk-
|
|
178
|
+
} from "../chunk-WISTNSUH.js";
|
|
179
179
|
import "../chunk-UMXOAUW7.js";
|
|
180
180
|
import "../chunk-MLKGABMK.js";
|
|
181
181
|
export {
|
|
@@ -4074,6 +4074,15 @@ interface SolvaPayCopy {
|
|
|
4074
4074
|
validIndefinitely: string;
|
|
4075
4075
|
/** "Started {date}" — purchase start-date line on `<CurrentPlanCard>`. */
|
|
4076
4076
|
startedOn: string;
|
|
4077
|
+
/**
|
|
4078
|
+
* Field labels rendered above the otherwise bare values on
|
|
4079
|
+
* `<CurrentPlanCard showFieldLabels>`. A price, a usage rate and a
|
|
4080
|
+
* credit balance are all "a number with a currency" — without a
|
|
4081
|
+
* label the customer cannot tell which one they are reading.
|
|
4082
|
+
*/
|
|
4083
|
+
priceFieldLabel: string;
|
|
4084
|
+
rateFieldLabel: string;
|
|
4085
|
+
balanceFieldLabel: string;
|
|
4077
4086
|
paymentMethod: string;
|
|
4078
4087
|
paymentMethodExpires: string;
|
|
4079
4088
|
noPaymentMethod: string;
|
|
@@ -4117,6 +4126,10 @@ interface SolvaPayCopy {
|
|
|
4117
4126
|
seePlansButton: string;
|
|
4118
4127
|
/** Primary CTA on the no-plan state that switches to the Plan tab. */
|
|
4119
4128
|
pickPlanButton: string;
|
|
4129
|
+
/** CTA on a free active plan that opens checkout to pick a paid plan. */
|
|
4130
|
+
upgradeButton: string;
|
|
4131
|
+
/** CTA on a non-free active plan that opens checkout to switch plans. */
|
|
4132
|
+
changePlanButton: string;
|
|
4120
4133
|
};
|
|
4121
4134
|
customerPortal: {
|
|
4122
4135
|
launchButton: string;
|
|
@@ -5210,4 +5223,4 @@ type SuccessMeta = {
|
|
|
5210
5223
|
nextRenewalLabel: string | null;
|
|
5211
5224
|
};
|
|
5212
5225
|
|
|
5213
|
-
export { type components as $, type ActivationResult as A, type
|
|
5226
|
+
export { type components as $, type ActivationResult as A, type BootstrapPlanLike as B, type CheckoutResult as C, type SolvaPayConfig as D, type CheckoutStep as E, type CustomerPurchaseData as F, type MandateTemplate as G, type Merchant as H, type PaymentError as I, type PaymentIntentResult as J, type PaymentMethodInfo as K, type PaymentResult as L, type MandateContext as M, type PurchaseStatusValue as N, type SuccessMeta as O, type PaymentFormProps as P, type TopupPaymentResult as Q, type ReactivateResult as R, type SolvaPayProviderProps as S, type TopupFormProps as T, type UsePlansOptions as U, type TransportBalanceResult as V, type TransportCheckoutSessionResult as W, type TransportCustomerSessionResult as X, type TransportLimitsResult as Y, UnsupportedTransportMethodError as Z, type SolvaPayProviderInitial as _, type PrefillCustomer as a, type AutoRechargeInput as a0, type AutoRechargeDisplayBlock as a1, type Plan as b, type SaveAutoRechargeResponse as c, type PurchaseStatus as d, type SolvaPayContextValue as e, type UsePlansReturn as f, type UsePlanOptions as g, type UsePlanReturn as h, type UseProductReturn as i, type UseMerchantReturn as j, type SolvaPayCopy as k, type PurchaseStatusReturn as l, type CancelResult as m, type ActivatePlanResult as n, type UseTopupOptions as o, type UseTopupReturn as p, type BalanceStatus as q, type UseTopupAmountSelectorOptions as r, type UseTopupAmountSelectorReturn as s, type UsePaymentMethodReturn as t, type AutoRechargeConfig as u, type SaveAutoRechargeInput as v, type SolvaPayTransport as w, type PartialSolvaPayCopy as x, type PurchaseInfo as y, type Product as z };
|
|
@@ -4074,6 +4074,15 @@ interface SolvaPayCopy {
|
|
|
4074
4074
|
validIndefinitely: string;
|
|
4075
4075
|
/** "Started {date}" — purchase start-date line on `<CurrentPlanCard>`. */
|
|
4076
4076
|
startedOn: string;
|
|
4077
|
+
/**
|
|
4078
|
+
* Field labels rendered above the otherwise bare values on
|
|
4079
|
+
* `<CurrentPlanCard showFieldLabels>`. A price, a usage rate and a
|
|
4080
|
+
* credit balance are all "a number with a currency" — without a
|
|
4081
|
+
* label the customer cannot tell which one they are reading.
|
|
4082
|
+
*/
|
|
4083
|
+
priceFieldLabel: string;
|
|
4084
|
+
rateFieldLabel: string;
|
|
4085
|
+
balanceFieldLabel: string;
|
|
4077
4086
|
paymentMethod: string;
|
|
4078
4087
|
paymentMethodExpires: string;
|
|
4079
4088
|
noPaymentMethod: string;
|
|
@@ -4117,6 +4126,10 @@ interface SolvaPayCopy {
|
|
|
4117
4126
|
seePlansButton: string;
|
|
4118
4127
|
/** Primary CTA on the no-plan state that switches to the Plan tab. */
|
|
4119
4128
|
pickPlanButton: string;
|
|
4129
|
+
/** CTA on a free active plan that opens checkout to pick a paid plan. */
|
|
4130
|
+
upgradeButton: string;
|
|
4131
|
+
/** CTA on a non-free active plan that opens checkout to switch plans. */
|
|
4132
|
+
changePlanButton: string;
|
|
4120
4133
|
};
|
|
4121
4134
|
customerPortal: {
|
|
4122
4135
|
launchButton: string;
|
|
@@ -5210,4 +5223,4 @@ type SuccessMeta = {
|
|
|
5210
5223
|
nextRenewalLabel: string | null;
|
|
5211
5224
|
};
|
|
5212
5225
|
|
|
5213
|
-
export { type components as $, type ActivationResult as A, type
|
|
5226
|
+
export { type components as $, type ActivationResult as A, type BootstrapPlanLike as B, type CheckoutResult as C, type SolvaPayConfig as D, type CheckoutStep as E, type CustomerPurchaseData as F, type MandateTemplate as G, type Merchant as H, type PaymentError as I, type PaymentIntentResult as J, type PaymentMethodInfo as K, type PaymentResult as L, type MandateContext as M, type PurchaseStatusValue as N, type SuccessMeta as O, type PaymentFormProps as P, type TopupPaymentResult as Q, type ReactivateResult as R, type SolvaPayProviderProps as S, type TopupFormProps as T, type UsePlansOptions as U, type TransportBalanceResult as V, type TransportCheckoutSessionResult as W, type TransportCustomerSessionResult as X, type TransportLimitsResult as Y, UnsupportedTransportMethodError as Z, type SolvaPayProviderInitial as _, type PrefillCustomer as a, type AutoRechargeInput as a0, type AutoRechargeDisplayBlock as a1, type Plan as b, type SaveAutoRechargeResponse as c, type PurchaseStatus as d, type SolvaPayContextValue as e, type UsePlansReturn as f, type UsePlanOptions as g, type UsePlanReturn as h, type UseProductReturn as i, type UseMerchantReturn as j, type SolvaPayCopy as k, type PurchaseStatusReturn as l, type CancelResult as m, type ActivatePlanResult as n, type UseTopupOptions as o, type UseTopupReturn as p, type BalanceStatus as q, type UseTopupAmountSelectorOptions as r, type UseTopupAmountSelectorReturn as s, type UsePaymentMethodReturn as t, type AutoRechargeConfig as u, type SaveAutoRechargeInput as v, type SolvaPayTransport as w, type PartialSolvaPayCopy as x, type PurchaseInfo as y, type Product as z };
|
package/dist/styles.css
CHANGED
|
@@ -1869,6 +1869,26 @@
|
|
|
1869
1869
|
font-variant-numeric: tabular-nums;
|
|
1870
1870
|
}
|
|
1871
1871
|
|
|
1872
|
+
/* Captioned value pair (`showFieldLabels`). The label rides directly
|
|
1873
|
+
* above its value, so the pair needs a tighter gap than the card's
|
|
1874
|
+
* line-to-line rhythm — otherwise the caption reads as a sibling fact
|
|
1875
|
+
* rather than as the value's label. */
|
|
1876
|
+
[data-solvapay-current-plan-field],
|
|
1877
|
+
.solvapay-current-plan-field {
|
|
1878
|
+
display: flex;
|
|
1879
|
+
flex-direction: column;
|
|
1880
|
+
gap: 0.125rem;
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
[data-solvapay-current-plan-field-label],
|
|
1884
|
+
.solvapay-current-plan-field-label {
|
|
1885
|
+
font-size: 0.6875rem;
|
|
1886
|
+
font-weight: 600;
|
|
1887
|
+
letter-spacing: 0.06em;
|
|
1888
|
+
text-transform: uppercase;
|
|
1889
|
+
color: var(--solvapay-muted-foreground);
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1872
1892
|
[data-solvapay-current-plan-next-billing],
|
|
1873
1893
|
[data-solvapay-current-plan-expires],
|
|
1874
1894
|
.solvapay-current-plan-date-line {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solvapay/react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-preview-11dbbe603cd1b9a44cc41b5eee3686bc4000f97f",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"directory": "packages/react"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@solvapay/mcp-core": "
|
|
60
|
+
"@solvapay/mcp-core": "0.4.0-preview-11dbbe603cd1b9a44cc41b5eee3686bc4000f97f",
|
|
61
61
|
"react": "^18.2.0 || ^19.0.0",
|
|
62
62
|
"react-dom": "^18.2.0 || ^19.0.0"
|
|
63
63
|
},
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@stripe/react-stripe-js": "^6.0.0",
|
|
71
71
|
"@stripe/stripe-js": "^9.0.0",
|
|
72
|
-
"@solvapay/core": "1.6.0"
|
|
72
|
+
"@solvapay/core": "1.6.0-preview-11dbbe603cd1b9a44cc41b5eee3686bc4000f97f"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@testing-library/dom": "^10.4.1",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"react-dom": "^19.2.5",
|
|
86
86
|
"typescript": "^5.9.3",
|
|
87
87
|
"vitest": "^4.1.2",
|
|
88
|
-
"@solvapay/mcp-core": "0.
|
|
89
|
-
"@solvapay/server": "2.
|
|
88
|
+
"@solvapay/mcp-core": "0.4.0-preview-11dbbe603cd1b9a44cc41b5eee3686bc4000f97f",
|
|
89
|
+
"@solvapay/server": "2.4.0-preview-11dbbe603cd1b9a44cc41b5eee3686bc4000f97f",
|
|
90
90
|
"@solvapay/test-utils": "0.0.0"
|
|
91
91
|
},
|
|
92
92
|
"scripts": {
|