@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Y as components, b as Plan, P as PaymentFormProps, a as PrefillCustomer, A as ActivationResult, q as UseTopupAmountSelectorReturn, y as CheckoutStep, K as SuccessMeta } from './shared-
|
|
1
|
+
import { Y as components, b as Plan, P as PaymentFormProps, a as PrefillCustomer, A as ActivationResult, q as UseTopupAmountSelectorReturn, y as CheckoutStep, K as SuccessMeta } from './shared-lIhc8DS3.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PaymentElement, CardElement } from '@stripe/react-stripe-js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -534,11 +534,12 @@ interface UseCheckoutFlowReturn {
|
|
|
534
534
|
/** Returns the active branch — `null` when no plan is selected. */
|
|
535
535
|
branch: 'payg' | 'recurring' | null;
|
|
536
536
|
/**
|
|
537
|
-
* Currency for the PAYG topup branch, resolved
|
|
538
|
-
*
|
|
537
|
+
* Currency for the PAYG topup branch, resolved in order:
|
|
538
|
+
* top-up step override → plan-picker `preferredCurrency` (when
|
|
539
|
+
* supported) → `topupCurrency` option or `merchant.defaultCurrency`.
|
|
539
540
|
* `null` while the merchant is still loading and no explicit
|
|
540
|
-
* option was passed.
|
|
541
|
-
* topups are merchant-wide, not plan-specific.
|
|
541
|
+
* option was passed. Plan `currency` / `selectedCurrency` are never
|
|
542
|
+
* consulted — credit topups are merchant-wide, not plan-specific.
|
|
542
543
|
*/
|
|
543
544
|
topupCurrency: string | null;
|
|
544
545
|
/**
|
|
@@ -547,6 +548,20 @@ interface UseCheckoutFlowReturn {
|
|
|
547
548
|
* misleading default while the merchant fetch is in flight.
|
|
548
549
|
*/
|
|
549
550
|
topupCurrencyReady: boolean;
|
|
551
|
+
/**
|
|
552
|
+
* Full set of currencies the customer may pay topups in — the
|
|
553
|
+
* merchant's `supportedTopupCurrencies` (which already includes the
|
|
554
|
+
* default) or, for single-currency merchants, just the resolved
|
|
555
|
+
* `topupCurrency`. Always uppercased and deduped. The amount step
|
|
556
|
+
* renders a switcher only when this has more than one entry.
|
|
557
|
+
*/
|
|
558
|
+
topupCurrencies: string[];
|
|
559
|
+
/**
|
|
560
|
+
* Override the topup currency from a picker. Accepts any code in
|
|
561
|
+
* `topupCurrencies`; ignored otherwise. Resets to the merchant default
|
|
562
|
+
* resolution on `reset()`.
|
|
563
|
+
*/
|
|
564
|
+
setTopupCurrency: (code: string) => void;
|
|
550
565
|
/**
|
|
551
566
|
* Whether the current step has a meaningful previous step to return
|
|
552
567
|
* to. `<CheckoutSteps.BackLink>` reads this to suppress itself when
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Y as components, b as Plan, P as PaymentFormProps, a as PrefillCustomer, A as ActivationResult, q as UseTopupAmountSelectorReturn, y as CheckoutStep, K as SuccessMeta } from './shared-
|
|
1
|
+
import { Y as components, b as Plan, P as PaymentFormProps, a as PrefillCustomer, A as ActivationResult, q as UseTopupAmountSelectorReturn, y as CheckoutStep, K as SuccessMeta } from './shared-BNZAIWkU.cjs';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PaymentElement, CardElement } from '@stripe/react-stripe-js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -534,11 +534,12 @@ interface UseCheckoutFlowReturn {
|
|
|
534
534
|
/** Returns the active branch — `null` when no plan is selected. */
|
|
535
535
|
branch: 'payg' | 'recurring' | null;
|
|
536
536
|
/**
|
|
537
|
-
* Currency for the PAYG topup branch, resolved
|
|
538
|
-
*
|
|
537
|
+
* Currency for the PAYG topup branch, resolved in order:
|
|
538
|
+
* top-up step override → plan-picker `preferredCurrency` (when
|
|
539
|
+
* supported) → `topupCurrency` option or `merchant.defaultCurrency`.
|
|
539
540
|
* `null` while the merchant is still loading and no explicit
|
|
540
|
-
* option was passed.
|
|
541
|
-
* topups are merchant-wide, not plan-specific.
|
|
541
|
+
* option was passed. Plan `currency` / `selectedCurrency` are never
|
|
542
|
+
* consulted — credit topups are merchant-wide, not plan-specific.
|
|
542
543
|
*/
|
|
543
544
|
topupCurrency: string | null;
|
|
544
545
|
/**
|
|
@@ -547,6 +548,20 @@ interface UseCheckoutFlowReturn {
|
|
|
547
548
|
* misleading default while the merchant fetch is in flight.
|
|
548
549
|
*/
|
|
549
550
|
topupCurrencyReady: boolean;
|
|
551
|
+
/**
|
|
552
|
+
* Full set of currencies the customer may pay topups in — the
|
|
553
|
+
* merchant's `supportedTopupCurrencies` (which already includes the
|
|
554
|
+
* default) or, for single-currency merchants, just the resolved
|
|
555
|
+
* `topupCurrency`. Always uppercased and deduped. The amount step
|
|
556
|
+
* renders a switcher only when this has more than one entry.
|
|
557
|
+
*/
|
|
558
|
+
topupCurrencies: string[];
|
|
559
|
+
/**
|
|
560
|
+
* Override the topup currency from a picker. Accepts any code in
|
|
561
|
+
* `topupCurrencies`; ignored otherwise. Resets to the merchant default
|
|
562
|
+
* resolution on `reset()`.
|
|
563
|
+
*/
|
|
564
|
+
setTopupCurrency: (code: string) => void;
|
|
550
565
|
/**
|
|
551
566
|
* Whether the current step has a meaningful previous step to return
|
|
552
567
|
* to. `<CheckoutSteps.BackLink>` reads this to suppress itself when
|