@solvapay/react 1.2.1 → 1.3.0-preview-cb8ad16e16ce8f8f357bd7f2e7068d85159df587
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 +11 -0
- package/dist/adapters/auth0.cjs +60 -0
- package/dist/adapters/auth0.d.cts +16 -0
- package/dist/adapters/auth0.d.ts +16 -0
- package/dist/adapters/auth0.js +15 -0
- package/dist/adapters/session-auth.cjs +49 -0
- package/dist/adapters/session-auth.d.cts +20 -0
- package/dist/adapters/session-auth.d.ts +20 -0
- package/dist/adapters/session-auth.js +6 -0
- package/dist/{chunk-XRNCDI2T.js → chunk-3UR4QQ5P.js} +1 -1
- package/dist/chunk-JTW665JR.js +25 -0
- package/dist/{chunk-Y2UAJG67.js → chunk-ORMHGGOU.js} +244 -73
- package/dist/{chunk-MYD6KTR2.js → chunk-WGDHMTDO.js} +1 -1
- package/dist/{index-DPoqku6R.d.cts → index-BwwdMBdt.d.ts} +20 -5
- package/dist/{index-Cs-QqpkJ.d.ts → index-kXLvp7EU.d.cts} +20 -5
- package/dist/index.cjs +294 -106
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +8 -3
- package/dist/mcp/index.cjs +328 -70
- package/dist/mcp/index.d.cts +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +131 -34
- package/dist/mcp/styles.css +39 -0
- package/dist/primitives/index.cjs +207 -38
- package/dist/primitives/index.d.cts +22 -5
- package/dist/primitives/index.d.ts +22 -5
- package/dist/primitives/index.js +6 -2
- package/dist/{shared-DpS2yEah.d.cts → shared-BNZAIWkU.d.cts} +196 -7
- package/dist/{shared-CXRbrNFw.d.ts → shared-lIhc8DS3.d.ts} +196 -7
- package/dist/styles.css +25 -0
- package/package.json +12 -7
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { S as SolvaPayProviderProps, P as PaymentFormProps, a as PrefillCustomer, T as TopupFormProps, C as CheckoutResult, b as Plan, A as ActivationResult, c as PurchaseStatus, d as SolvaPayContextValue, U as UsePlansOptions, e as UsePlansReturn, f as UsePlanOptions, g as UsePlanReturn, h as UseProductReturn, i as UseMerchantReturn, j as SolvaPayCopy, k as PurchaseStatusReturn, l as CancelResult, R as ReactivateResult, m as ActivatePlanResult, n as UseTopupOptions, o as UseTopupReturn, B as BalanceStatus, p as UseTopupAmountSelectorOptions, q as UseTopupAmountSelectorReturn, r as UsePaymentMethodReturn, s as SolvaPayTransport, t as PartialSolvaPayCopy, u as PurchaseInfo, v as Product, w as SolvaPayConfig } from './shared-
|
|
3
|
-
export { x as BootstrapPlanLike, y as CheckoutStep, z as CustomerPurchaseData, M as MandateContext, D as MandateTemplate, E as Merchant, F as PaymentError, G as PaymentIntentResult, H as PaymentMethodInfo, I as PaymentResult, J as PurchaseStatusValue, K as SuccessMeta, L as TopupPaymentResult, N as TransportBalanceResult, O as TransportCheckoutSessionResult, Q as TransportCustomerSessionResult, V as TransportLimitsResult, W as UnsupportedTransportMethodError } from './shared-
|
|
4
|
-
import { P as PaymentFormSummary, a as PaymentFormCustomerFields, b as PaymentFormPaymentElement, c as PaymentFormCardElement, d as PaymentFormMandateText, e as PaymentFormTermsCheckbox, f as PaymentFormSubmitButton, g as PaymentFormLoading, h as PaymentFormError, i as PaymentFormLegalFooter, j as PaywallStructuredContent, C as CheckoutVariant } from './index-
|
|
5
|
-
export { A as ActivationFlowStep, B as BalanceBadge, k as CancelPlanButton, l as CheckoutErrorPhase, m as CheckoutStatus, n as CheckoutSteps, o as CheckoutSummary, p as CheckoutSummaryProps, M as MandateText, q as MandateTextProps, r as PlanBadge, s as ProductBadge, t as PurchaseGate, U as UsageSnapshot, u as UseCheckoutFlowOptions, v as UseCheckoutFlowReturn, w as UseUsageReturn, x as deriveVariant, y as useCheckoutFlow, z as useCheckoutStepsContext, D as useUsage } from './index-
|
|
2
|
+
import { S as SolvaPayProviderProps, P as PaymentFormProps, a as PrefillCustomer, T as TopupFormProps, C as CheckoutResult, b as Plan, A as ActivationResult, c as PurchaseStatus, d as SolvaPayContextValue, U as UsePlansOptions, e as UsePlansReturn, f as UsePlanOptions, g as UsePlanReturn, h as UseProductReturn, i as UseMerchantReturn, j as SolvaPayCopy, k as PurchaseStatusReturn, l as CancelResult, R as ReactivateResult, m as ActivatePlanResult, n as UseTopupOptions, o as UseTopupReturn, B as BalanceStatus, p as UseTopupAmountSelectorOptions, q as UseTopupAmountSelectorReturn, r as UsePaymentMethodReturn, s as SolvaPayTransport, t as PartialSolvaPayCopy, u as PurchaseInfo, v as Product, w as SolvaPayConfig } from './shared-BNZAIWkU.cjs';
|
|
3
|
+
export { x as BootstrapPlanLike, y as CheckoutStep, z as CustomerPurchaseData, M as MandateContext, D as MandateTemplate, E as Merchant, F as PaymentError, G as PaymentIntentResult, H as PaymentMethodInfo, I as PaymentResult, J as PurchaseStatusValue, K as SuccessMeta, L as TopupPaymentResult, N as TransportBalanceResult, O as TransportCheckoutSessionResult, Q as TransportCustomerSessionResult, V as TransportLimitsResult, W as UnsupportedTransportMethodError } from './shared-BNZAIWkU.cjs';
|
|
4
|
+
import { P as PaymentFormSummary, a as PaymentFormCustomerFields, b as PaymentFormPaymentElement, c as PaymentFormCardElement, d as PaymentFormMandateText, e as PaymentFormTermsCheckbox, f as PaymentFormSubmitButton, g as PaymentFormLoading, h as PaymentFormError, i as PaymentFormLegalFooter, j as PaywallStructuredContent, C as CheckoutVariant } from './index-kXLvp7EU.cjs';
|
|
5
|
+
export { A as ActivationFlowStep, B as BalanceBadge, k as CancelPlanButton, l as CheckoutErrorPhase, m as CheckoutStatus, n as CheckoutSteps, o as CheckoutSummary, p as CheckoutSummaryProps, M as MandateText, q as MandateTextProps, r as PlanBadge, s as ProductBadge, t as PurchaseGate, U as UsageSnapshot, u as UseCheckoutFlowOptions, v as UseCheckoutFlowReturn, w as UseUsageReturn, x as deriveVariant, y as useCheckoutFlow, z as useCheckoutStepsContext, D as useUsage } from './index-kXLvp7EU.cjs';
|
|
6
6
|
import { PaymentIntent, Stripe, StripeElements } from '@stripe/stripe-js';
|
|
7
7
|
export { AuthAdapter, createAnonymousAuthAdapter, defaultAuthAdapter, getOrCreateAnonymousCustomerRef, resetAnonymousCustomerRef } from './adapters/auth.cjs';
|
|
8
|
+
export { SessionAuthAdapterOptions, createSessionAuthAdapter } from './adapters/session-auth.cjs';
|
|
8
9
|
import '@stripe/react-stripe-js';
|
|
9
10
|
import 'react/jsx-runtime';
|
|
10
11
|
|
|
@@ -603,6 +604,7 @@ interface UseCheckoutReturn {
|
|
|
603
604
|
declare function useCheckout(options: {
|
|
604
605
|
planRef?: string;
|
|
605
606
|
productRef?: string;
|
|
607
|
+
currency?: string;
|
|
606
608
|
customer?: PrefillCustomer;
|
|
607
609
|
}): UseCheckoutReturn;
|
|
608
610
|
|
|
@@ -1069,6 +1071,8 @@ type FormatPriceOptions = {
|
|
|
1069
1071
|
* Pass `''` to disable the zero-check and always render the numeric zero.
|
|
1070
1072
|
*/
|
|
1071
1073
|
free?: string;
|
|
1074
|
+
/** `symbol` (default) or `code` (e.g. USD 10 instead of $10). */
|
|
1075
|
+
currencyDisplay?: 'symbol' | 'code';
|
|
1072
1076
|
};
|
|
1073
1077
|
/**
|
|
1074
1078
|
* Number of minor units per one major unit of `currency`. 1 for zero-decimal
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { S as SolvaPayProviderProps, P as PaymentFormProps, a as PrefillCustomer, T as TopupFormProps, C as CheckoutResult, b as Plan, A as ActivationResult, c as PurchaseStatus, d as SolvaPayContextValue, U as UsePlansOptions, e as UsePlansReturn, f as UsePlanOptions, g as UsePlanReturn, h as UseProductReturn, i as UseMerchantReturn, j as SolvaPayCopy, k as PurchaseStatusReturn, l as CancelResult, R as ReactivateResult, m as ActivatePlanResult, n as UseTopupOptions, o as UseTopupReturn, B as BalanceStatus, p as UseTopupAmountSelectorOptions, q as UseTopupAmountSelectorReturn, r as UsePaymentMethodReturn, s as SolvaPayTransport, t as PartialSolvaPayCopy, u as PurchaseInfo, v as Product, w as SolvaPayConfig } from './shared-
|
|
3
|
-
export { x as BootstrapPlanLike, y as CheckoutStep, z as CustomerPurchaseData, M as MandateContext, D as MandateTemplate, E as Merchant, F as PaymentError, G as PaymentIntentResult, H as PaymentMethodInfo, I as PaymentResult, J as PurchaseStatusValue, K as SuccessMeta, L as TopupPaymentResult, N as TransportBalanceResult, O as TransportCheckoutSessionResult, Q as TransportCustomerSessionResult, V as TransportLimitsResult, W as UnsupportedTransportMethodError } from './shared-
|
|
4
|
-
import { P as PaymentFormSummary, a as PaymentFormCustomerFields, b as PaymentFormPaymentElement, c as PaymentFormCardElement, d as PaymentFormMandateText, e as PaymentFormTermsCheckbox, f as PaymentFormSubmitButton, g as PaymentFormLoading, h as PaymentFormError, i as PaymentFormLegalFooter, j as PaywallStructuredContent, C as CheckoutVariant } from './index-
|
|
5
|
-
export { A as ActivationFlowStep, B as BalanceBadge, k as CancelPlanButton, l as CheckoutErrorPhase, m as CheckoutStatus, n as CheckoutSteps, o as CheckoutSummary, p as CheckoutSummaryProps, M as MandateText, q as MandateTextProps, r as PlanBadge, s as ProductBadge, t as PurchaseGate, U as UsageSnapshot, u as UseCheckoutFlowOptions, v as UseCheckoutFlowReturn, w as UseUsageReturn, x as deriveVariant, y as useCheckoutFlow, z as useCheckoutStepsContext, D as useUsage } from './index-
|
|
2
|
+
import { S as SolvaPayProviderProps, P as PaymentFormProps, a as PrefillCustomer, T as TopupFormProps, C as CheckoutResult, b as Plan, A as ActivationResult, c as PurchaseStatus, d as SolvaPayContextValue, U as UsePlansOptions, e as UsePlansReturn, f as UsePlanOptions, g as UsePlanReturn, h as UseProductReturn, i as UseMerchantReturn, j as SolvaPayCopy, k as PurchaseStatusReturn, l as CancelResult, R as ReactivateResult, m as ActivatePlanResult, n as UseTopupOptions, o as UseTopupReturn, B as BalanceStatus, p as UseTopupAmountSelectorOptions, q as UseTopupAmountSelectorReturn, r as UsePaymentMethodReturn, s as SolvaPayTransport, t as PartialSolvaPayCopy, u as PurchaseInfo, v as Product, w as SolvaPayConfig } from './shared-lIhc8DS3.js';
|
|
3
|
+
export { x as BootstrapPlanLike, y as CheckoutStep, z as CustomerPurchaseData, M as MandateContext, D as MandateTemplate, E as Merchant, F as PaymentError, G as PaymentIntentResult, H as PaymentMethodInfo, I as PaymentResult, J as PurchaseStatusValue, K as SuccessMeta, L as TopupPaymentResult, N as TransportBalanceResult, O as TransportCheckoutSessionResult, Q as TransportCustomerSessionResult, V as TransportLimitsResult, W as UnsupportedTransportMethodError } from './shared-lIhc8DS3.js';
|
|
4
|
+
import { P as PaymentFormSummary, a as PaymentFormCustomerFields, b as PaymentFormPaymentElement, c as PaymentFormCardElement, d as PaymentFormMandateText, e as PaymentFormTermsCheckbox, f as PaymentFormSubmitButton, g as PaymentFormLoading, h as PaymentFormError, i as PaymentFormLegalFooter, j as PaywallStructuredContent, C as CheckoutVariant } from './index-BwwdMBdt.js';
|
|
5
|
+
export { A as ActivationFlowStep, B as BalanceBadge, k as CancelPlanButton, l as CheckoutErrorPhase, m as CheckoutStatus, n as CheckoutSteps, o as CheckoutSummary, p as CheckoutSummaryProps, M as MandateText, q as MandateTextProps, r as PlanBadge, s as ProductBadge, t as PurchaseGate, U as UsageSnapshot, u as UseCheckoutFlowOptions, v as UseCheckoutFlowReturn, w as UseUsageReturn, x as deriveVariant, y as useCheckoutFlow, z as useCheckoutStepsContext, D as useUsage } from './index-BwwdMBdt.js';
|
|
6
6
|
import { PaymentIntent, Stripe, StripeElements } from '@stripe/stripe-js';
|
|
7
7
|
export { AuthAdapter, createAnonymousAuthAdapter, defaultAuthAdapter, getOrCreateAnonymousCustomerRef, resetAnonymousCustomerRef } from './adapters/auth.js';
|
|
8
|
+
export { SessionAuthAdapterOptions, createSessionAuthAdapter } from './adapters/session-auth.js';
|
|
8
9
|
import '@stripe/react-stripe-js';
|
|
9
10
|
import 'react/jsx-runtime';
|
|
10
11
|
|
|
@@ -603,6 +604,7 @@ interface UseCheckoutReturn {
|
|
|
603
604
|
declare function useCheckout(options: {
|
|
604
605
|
planRef?: string;
|
|
605
606
|
productRef?: string;
|
|
607
|
+
currency?: string;
|
|
606
608
|
customer?: PrefillCustomer;
|
|
607
609
|
}): UseCheckoutReturn;
|
|
608
610
|
|
|
@@ -1069,6 +1071,8 @@ type FormatPriceOptions = {
|
|
|
1069
1071
|
* Pass `''` to disable the zero-check and always render the numeric zero.
|
|
1070
1072
|
*/
|
|
1071
1073
|
free?: string;
|
|
1074
|
+
/** `symbol` (default) or `code` (e.g. USD 10 instead of $10). */
|
|
1075
|
+
currencyDisplay?: 'symbol' | 'code';
|
|
1072
1076
|
};
|
|
1073
1077
|
/**
|
|
1074
1078
|
* Number of minor units per one major unit of `currency`. 1 for zero-decimal
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createSessionAuthAdapter
|
|
3
|
+
} from "./chunk-JTW665JR.js";
|
|
1
4
|
import {
|
|
2
5
|
CancelledPlanNotice,
|
|
3
6
|
CurrentPlanCard,
|
|
4
7
|
LaunchCustomerPortalButton,
|
|
5
8
|
UpdatePaymentMethodButton,
|
|
6
9
|
usePaymentMethod
|
|
7
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3UR4QQ5P.js";
|
|
8
11
|
import {
|
|
9
12
|
ActivationFlow,
|
|
10
13
|
CheckoutSteps,
|
|
@@ -17,7 +20,7 @@ import {
|
|
|
17
20
|
useCheckoutSteps,
|
|
18
21
|
useCreditGate,
|
|
19
22
|
usePaywallResolver
|
|
20
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-WGDHMTDO.js";
|
|
21
24
|
import {
|
|
22
25
|
AmountPicker,
|
|
23
26
|
BalanceBadge,
|
|
@@ -85,7 +88,7 @@ import {
|
|
|
85
88
|
useTopupAmountSelector,
|
|
86
89
|
useTransport,
|
|
87
90
|
useUsage
|
|
88
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-ORMHGGOU.js";
|
|
89
92
|
import {
|
|
90
93
|
createAnonymousAuthAdapter,
|
|
91
94
|
defaultAuthAdapter,
|
|
@@ -290,6 +293,7 @@ import { useCallback, useContext, useEffect, useMemo, useRef, useState as useSta
|
|
|
290
293
|
import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
291
294
|
var DefaultTree2 = () => /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
292
295
|
/* @__PURE__ */ jsx3(PlanSelector.Heading, { className: "solvapay-plan-selector-heading" }),
|
|
296
|
+
/* @__PURE__ */ jsx3(PlanSelector.CurrencySwitcher, { className: "solvapay-plan-selector-currency-switcher" }),
|
|
293
297
|
/* @__PURE__ */ jsx3(PlanSelector.Grid, { className: "solvapay-plan-selector-grid", children: /* @__PURE__ */ jsxs3(PlanSelector.Card, { className: "solvapay-plan-selector-card", children: [
|
|
294
298
|
/* @__PURE__ */ jsx3(PlanSelector.CardBadge, { className: "solvapay-plan-selector-card-badge" }),
|
|
295
299
|
/* @__PURE__ */ jsx3(PlanSelector.CardName, { className: "solvapay-plan-selector-card-name" }),
|
|
@@ -948,6 +952,7 @@ export {
|
|
|
948
952
|
confirmPayment,
|
|
949
953
|
createAnonymousAuthAdapter,
|
|
950
954
|
createHttpTransport,
|
|
955
|
+
createSessionAuthAdapter,
|
|
951
956
|
defaultAuthAdapter,
|
|
952
957
|
deriveVariant,
|
|
953
958
|
enCopy,
|