@solvapay/react 2.5.0 → 2.6.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/CHANGELOG.md +17 -0
- package/dist/{UsageMeter-YX-icS_X.d.cts → UsageMeter-Cxn3_A-q.d.cts} +1 -1
- package/dist/{UsageMeter-Cg9IAFvV.d.ts → UsageMeter-sAFkX-Tz.d.ts} +1 -1
- package/dist/{chunk-BI5MJT24.js → chunk-PLKII2BF.js} +1 -1
- package/dist/{chunk-IZPE4LKU.js → chunk-SISWCV4B.js} +1 -1
- package/dist/{chunk-67GJCZZU.js → chunk-WVWUTOBU.js} +44 -8
- package/dist/{index-B8rb25FF.d.cts → index-CCNxvSm-.d.cts} +1 -1
- package/dist/{index-DBd1TLZA.d.ts → index-ykfNzPia.d.ts} +1 -1
- package/dist/index.cjs +44 -8
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/mcp/index.cjs +618 -544
- package/dist/mcp/index.d.cts +23 -16
- package/dist/mcp/index.d.ts +23 -16
- package/dist/mcp/index.js +427 -385
- package/dist/mcp/styles.css +63 -94
- package/dist/primitives/index.cjs +44 -8
- package/dist/primitives/index.d.cts +5 -5
- package/dist/primitives/index.d.ts +5 -5
- package/dist/primitives/index.js +2 -2
- package/dist/{useUsage-DwFZIuQW.d.ts → useUsage-Bee4D9Hw.d.ts} +28 -35
- package/dist/{useUsage-DwwQ-jAO.d.cts → useUsage-CPlXBdC5.d.cts} +28 -35
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @solvapay/react changelog
|
|
2
2
|
|
|
3
|
+
## 2.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 07ca69e: `UsageSnapshot.used` is `number | null`. `PurchaseInfo.usage` is the billing period only (`periodStart`, `periodEnd`).
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 97c6831: The account widget opens on the view the server stamped instead of flashing the plan picker. An opening tool result replaces an in-flight fallback fetch, so `/upgrade` and `/topup` land on the surface that was requested.
|
|
12
|
+
- 8e1cc26: The account view shows the signed-in email and customer ref, including on the inline widget. The fullscreen footer includes the customer ref.
|
|
13
|
+
- 66bd47f: The MCP checkout's hosted-checkout handoff ("Complete your {plan} purchase" on hosts that block embedded payments) now spaces its back-link, heading, explanation and CTA with the shared stack gap instead of rendering them flush against each other.
|
|
14
|
+
- c3e6ae4: A hybrid plan (a recurring fee plus metered usage, such as Basic at $19/month) now goes through card payment in the MCP checkout instead of the pay-as-you-go activation path. Pay-as-you-go activation also honours the backend status, so `payment_required` surfaces an error instead of a "Plan activated" receipt.
|
|
15
|
+
- 335fd64: The MCP widget footer now reads `Provided by SolvaPay Terms Privacy` as one muted line with no `·` separators. `Provided by SolvaPay` is plain text instead of a link to solvapay.com; Terms and Privacy still link to SolvaPay's legal pages. The `<LegalFooter>` primitive's separator span now carries `data-solvapay-legal-footer-separator` so shells can style or hide it; its default rendering is unchanged.
|
|
16
|
+
- 760e8db: The MCP widget no longer paints its own outer card border and radius, or a 16px gutter on `#root`. This fixes the double frame on Claude Desktop and ChatGPT, which frame the iframe themselves. The legal footer now sits directly under the surface card with a 16px bottom inset instead of floating 36px below the last control and flush against the host frame. The widget root also declares `scrollbar-width: none`: inline frames are sized to the content by the host, and Chromium (Claude Desktop) could otherwise keep a thumbless root scrollbar after a view grew in place, stealing 15px of layout width. Inline chrome, card and shell no longer cap themselves at a centered 760px: the host draws its frame at the full column width, so the cap showed as empty margins inside that frame on wide Claude Desktop windows.
|
|
17
|
+
- b5b6754: The MCP widget legal footer now follows the widget's type scale. The shared footer sizes in rem, which assumes a 16px root; the widget root is 14px, so the line was larger than the shell's 12px.
|
|
18
|
+
- 939f6f9: The MCP checkout "How many credits?" step uses the same full-width preset tiles as the top-up view. The old `.solvapay-mcp-amount-option` chip styles are removed; `amountOptions` and `amountOption` className slots remain but are unused.
|
|
19
|
+
|
|
3
20
|
## 2.5.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -633,6 +633,7 @@ var enCopy = {
|
|
|
633
633
|
soldBy: "Sold by {merchant}",
|
|
634
634
|
fullHistory: "Full history",
|
|
635
635
|
fullAccount: "Full account",
|
|
636
|
+
signedInAs: "Signed in as",
|
|
636
637
|
creditActivityEyebrow: "Credit activity",
|
|
637
638
|
chargesEyebrow: "Charges for this product",
|
|
638
639
|
creditActivityCaption: "Every credit event on your account, newest first, including other products and top-ups. Credits are shared, so the balance only makes sense account-wide.",
|
|
@@ -1638,7 +1639,7 @@ var LegalFooter = forwardRef(
|
|
|
1638
1639
|
children: copy.legalFooter.terms
|
|
1639
1640
|
}
|
|
1640
1641
|
),
|
|
1641
|
-
/* @__PURE__ */ jsx5("span", { "aria-hidden": "true", children: " \xB7 " }),
|
|
1642
|
+
/* @__PURE__ */ jsx5("span", { "data-solvapay-legal-footer-separator": "", "aria-hidden": "true", children: " \xB7 " }),
|
|
1642
1643
|
/* @__PURE__ */ jsx5(
|
|
1643
1644
|
"a",
|
|
1644
1645
|
{
|
|
@@ -6765,8 +6766,8 @@ function deriveUsage(purchase, limits) {
|
|
|
6765
6766
|
const hasFiniteCap = limits.unlimited === false && limits.remaining !== null;
|
|
6766
6767
|
const remaining = hasFiniteCap ? limits.remaining : null;
|
|
6767
6768
|
const total = typeof limits.limit === "number" && limits.limit > 0 ? limits.limit : null;
|
|
6768
|
-
const used = typeof limits.used === "number" ? limits.used : total !== null && remaining !== null ? Math.max(0, total - remaining) :
|
|
6769
|
-
const percentUsed = total !== null && total > 0 ? Math.min(100, Math.round(used / total * 1e4) / 100) : null;
|
|
6769
|
+
const used = typeof limits.used === "number" ? limits.used : total !== null && remaining !== null ? Math.max(0, total - remaining) : null;
|
|
6770
|
+
const percentUsed = total !== null && total > 0 && used !== null ? Math.min(100, Math.round(used / total * 1e4) / 100) : null;
|
|
6770
6771
|
return {
|
|
6771
6772
|
meterRef: limits.meterName,
|
|
6772
6773
|
total,
|
|
@@ -6959,7 +6960,7 @@ var Label = forwardRef11(function UsageMeterLabel({ className, children, ...rest
|
|
|
6959
6960
|
);
|
|
6960
6961
|
}
|
|
6961
6962
|
const unit = ctx.usage.meterRef ?? "requests";
|
|
6962
|
-
const label = ctx.usage.total !== null ? interpolate(copy.usage.usedLabel, {
|
|
6963
|
+
const label = ctx.usage.total !== null && ctx.usage.used !== null ? interpolate(copy.usage.usedLabel, {
|
|
6963
6964
|
used: String(ctx.usage.used),
|
|
6964
6965
|
total: String(ctx.usage.total),
|
|
6965
6966
|
unit
|
|
@@ -7379,7 +7380,7 @@ import {
|
|
|
7379
7380
|
|
|
7380
7381
|
// src/utils/isPayg.ts
|
|
7381
7382
|
function isPaygPlan(plan) {
|
|
7382
|
-
return plan?.type === "usage-based"
|
|
7383
|
+
return plan?.type === "usage-based";
|
|
7383
7384
|
}
|
|
7384
7385
|
|
|
7385
7386
|
// src/primitives/checkout/shared.ts
|
|
@@ -7502,6 +7503,7 @@ function useCheckoutFlow(opts) {
|
|
|
7502
7503
|
const planCtx = usePlanSelector();
|
|
7503
7504
|
const planSelection = usePlanSelection();
|
|
7504
7505
|
const transport = useTransport();
|
|
7506
|
+
const copy = useCopy();
|
|
7505
7507
|
const locale = useLocale();
|
|
7506
7508
|
const balance = useBalance();
|
|
7507
7509
|
const { creditsPerMinorUnit, displayExchangeRate, adjustBalance } = balance;
|
|
@@ -7557,7 +7559,23 @@ function useCheckoutFlow(opts) {
|
|
|
7557
7559
|
setError(null);
|
|
7558
7560
|
setStatus("activating");
|
|
7559
7561
|
try {
|
|
7560
|
-
await transport.activatePlan({ productRef, planRef: selectedPlanRef });
|
|
7562
|
+
const result = await transport.activatePlan({ productRef, planRef: selectedPlanRef });
|
|
7563
|
+
switch (result.status) {
|
|
7564
|
+
case "activated":
|
|
7565
|
+
case "already_active":
|
|
7566
|
+
case "already_purchased":
|
|
7567
|
+
break;
|
|
7568
|
+
case "topup_required":
|
|
7569
|
+
setStatus("idle");
|
|
7570
|
+
setStep("amount");
|
|
7571
|
+
return true;
|
|
7572
|
+
case "payment_required":
|
|
7573
|
+
throw new Error(copy.activation.paymentRequired);
|
|
7574
|
+
case "invalid":
|
|
7575
|
+
throw new Error(result.message ?? copy.activation.invalidConfiguration);
|
|
7576
|
+
default:
|
|
7577
|
+
throw new Error(copy.activation.unexpectedResponse);
|
|
7578
|
+
}
|
|
7561
7579
|
const credits = await balance.refetch() ?? balance.credits;
|
|
7562
7580
|
if (credits == null) {
|
|
7563
7581
|
throw new Error("Credit balance is unavailable");
|
|
@@ -7583,7 +7601,17 @@ function useCheckoutFlow(opts) {
|
|
|
7583
7601
|
onErrorRef.current?.(wrapped, "activate");
|
|
7584
7602
|
return false;
|
|
7585
7603
|
}
|
|
7586
|
-
}, [
|
|
7604
|
+
}, [
|
|
7605
|
+
balance,
|
|
7606
|
+
copy.activation.invalidConfiguration,
|
|
7607
|
+
copy.activation.paymentRequired,
|
|
7608
|
+
copy.activation.unexpectedResponse,
|
|
7609
|
+
locale,
|
|
7610
|
+
productRef,
|
|
7611
|
+
selectedPlanRef,
|
|
7612
|
+
selectedPlanShape,
|
|
7613
|
+
transport
|
|
7614
|
+
]);
|
|
7587
7615
|
const advanceFromPlan = useCallback21(async () => {
|
|
7588
7616
|
if (!selectedPlanShape || !selectedPlanRef) return;
|
|
7589
7617
|
if (branch === "payg") {
|
|
@@ -7621,7 +7649,15 @@ function useCheckoutFlow(opts) {
|
|
|
7621
7649
|
}
|
|
7622
7650
|
setError(null);
|
|
7623
7651
|
setStep("payment");
|
|
7624
|
-
}, [
|
|
7652
|
+
}, [
|
|
7653
|
+
balance,
|
|
7654
|
+
branch,
|
|
7655
|
+
locale,
|
|
7656
|
+
planCtx.currentPlanRef,
|
|
7657
|
+
runActivate,
|
|
7658
|
+
selectedPlanRef,
|
|
7659
|
+
selectedPlanShape
|
|
7660
|
+
]);
|
|
7625
7661
|
const recordPaygSuccess = useCallback21(
|
|
7626
7662
|
(creditsAddedFromBackend) => {
|
|
7627
7663
|
if (!selectedPlanShape || selectedAmountMinor == null) return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a4 as components, b as Plan, P as PaymentFormProps, a as PrefillCustomer, A as ActivationResult, s as UseTopupAmountSelectorReturn, a5 as AutoRechargeInput, u as AutoRechargeConfig, a6 as AutoRechargeDisplayBlock, E as CheckoutStep, O as SuccessMeta } from './useUsage-
|
|
1
|
+
import { a4 as components, b as Plan, P as PaymentFormProps, a as PrefillCustomer, A as ActivationResult, s as UseTopupAmountSelectorReturn, a5 as AutoRechargeInput, u as AutoRechargeConfig, a6 as AutoRechargeDisplayBlock, E as CheckoutStep, O as SuccessMeta } from './useUsage-CPlXBdC5.cjs';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PaymentElement, CardElement } from '@stripe/react-stripe-js';
|
|
4
4
|
import { TaxBreakdown } from '@solvapay/core';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a4 as components, b as Plan, P as PaymentFormProps, a as PrefillCustomer, A as ActivationResult, s as UseTopupAmountSelectorReturn, a5 as AutoRechargeInput, u as AutoRechargeConfig, a6 as AutoRechargeDisplayBlock, E as CheckoutStep, O as SuccessMeta } from './useUsage-
|
|
1
|
+
import { a4 as components, b as Plan, P as PaymentFormProps, a as PrefillCustomer, A as ActivationResult, s as UseTopupAmountSelectorReturn, a5 as AutoRechargeInput, u as AutoRechargeConfig, a6 as AutoRechargeDisplayBlock, E as CheckoutStep, O as SuccessMeta } from './useUsage-Bee4D9Hw.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PaymentElement, CardElement } from '@stripe/react-stripe-js';
|
|
4
4
|
import { TaxBreakdown } from '@solvapay/core';
|
package/dist/index.cjs
CHANGED
|
@@ -880,6 +880,7 @@ var enCopy = {
|
|
|
880
880
|
soldBy: "Sold by {merchant}",
|
|
881
881
|
fullHistory: "Full history",
|
|
882
882
|
fullAccount: "Full account",
|
|
883
|
+
signedInAs: "Signed in as",
|
|
883
884
|
creditActivityEyebrow: "Credit activity",
|
|
884
885
|
chargesEyebrow: "Charges for this product",
|
|
885
886
|
creditActivityCaption: "Every credit event on your account, newest first, including other products and top-ups. Credits are shared, so the balance only makes sense account-wide.",
|
|
@@ -1872,7 +1873,7 @@ var LegalFooter = (0, import_react5.forwardRef)(
|
|
|
1872
1873
|
children: copy.legalFooter.terms
|
|
1873
1874
|
}
|
|
1874
1875
|
),
|
|
1875
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { "aria-hidden": "true", children: " \xB7 " }),
|
|
1876
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { "data-solvapay-legal-footer-separator": "", "aria-hidden": "true", children: " \xB7 " }),
|
|
1876
1877
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1877
1878
|
"a",
|
|
1878
1879
|
{
|
|
@@ -8403,8 +8404,8 @@ function deriveUsage(purchase, limits) {
|
|
|
8403
8404
|
const hasFiniteCap = limits.unlimited === false && limits.remaining !== null;
|
|
8404
8405
|
const remaining = hasFiniteCap ? limits.remaining : null;
|
|
8405
8406
|
const total = typeof limits.limit === "number" && limits.limit > 0 ? limits.limit : null;
|
|
8406
|
-
const used = typeof limits.used === "number" ? limits.used : total !== null && remaining !== null ? Math.max(0, total - remaining) :
|
|
8407
|
-
const percentUsed = total !== null && total > 0 ? Math.min(100, Math.round(used / total * 1e4) / 100) : null;
|
|
8407
|
+
const used = typeof limits.used === "number" ? limits.used : total !== null && remaining !== null ? Math.max(0, total - remaining) : null;
|
|
8408
|
+
const percentUsed = total !== null && total > 0 && used !== null ? Math.min(100, Math.round(used / total * 1e4) / 100) : null;
|
|
8408
8409
|
return {
|
|
8409
8410
|
meterRef: limits.meterName,
|
|
8410
8411
|
total,
|
|
@@ -8596,7 +8597,7 @@ var Label = (0, import_react45.forwardRef)(function UsageMeterLabel({ className,
|
|
|
8596
8597
|
);
|
|
8597
8598
|
}
|
|
8598
8599
|
const unit = ctx.usage.meterRef ?? "requests";
|
|
8599
|
-
const label = ctx.usage.total !== null ? interpolate(copy.usage.usedLabel, {
|
|
8600
|
+
const label = ctx.usage.total !== null && ctx.usage.used !== null ? interpolate(copy.usage.usedLabel, {
|
|
8600
8601
|
used: String(ctx.usage.used),
|
|
8601
8602
|
total: String(ctx.usage.total),
|
|
8602
8603
|
unit
|
|
@@ -8700,7 +8701,7 @@ var import_core10 = require("@solvapay/core");
|
|
|
8700
8701
|
|
|
8701
8702
|
// src/utils/isPayg.ts
|
|
8702
8703
|
function isPaygPlan(plan) {
|
|
8703
|
-
return plan?.type === "usage-based"
|
|
8704
|
+
return plan?.type === "usage-based";
|
|
8704
8705
|
}
|
|
8705
8706
|
|
|
8706
8707
|
// src/primitives/checkout/shared.ts
|
|
@@ -10975,6 +10976,7 @@ function useCheckoutFlow(opts) {
|
|
|
10975
10976
|
const planCtx = usePlanSelector();
|
|
10976
10977
|
const planSelection = usePlanSelection();
|
|
10977
10978
|
const transport = useTransport();
|
|
10979
|
+
const copy = useCopy();
|
|
10978
10980
|
const locale = useLocale();
|
|
10979
10981
|
const balance = useBalance();
|
|
10980
10982
|
const { creditsPerMinorUnit, displayExchangeRate, adjustBalance } = balance;
|
|
@@ -11030,7 +11032,23 @@ function useCheckoutFlow(opts) {
|
|
|
11030
11032
|
setError(null);
|
|
11031
11033
|
setStatus("activating");
|
|
11032
11034
|
try {
|
|
11033
|
-
await transport.activatePlan({ productRef, planRef: selectedPlanRef });
|
|
11035
|
+
const result = await transport.activatePlan({ productRef, planRef: selectedPlanRef });
|
|
11036
|
+
switch (result.status) {
|
|
11037
|
+
case "activated":
|
|
11038
|
+
case "already_active":
|
|
11039
|
+
case "already_purchased":
|
|
11040
|
+
break;
|
|
11041
|
+
case "topup_required":
|
|
11042
|
+
setStatus("idle");
|
|
11043
|
+
setStep("amount");
|
|
11044
|
+
return true;
|
|
11045
|
+
case "payment_required":
|
|
11046
|
+
throw new Error(copy.activation.paymentRequired);
|
|
11047
|
+
case "invalid":
|
|
11048
|
+
throw new Error(result.message ?? copy.activation.invalidConfiguration);
|
|
11049
|
+
default:
|
|
11050
|
+
throw new Error(copy.activation.unexpectedResponse);
|
|
11051
|
+
}
|
|
11034
11052
|
const credits = await balance.refetch() ?? balance.credits;
|
|
11035
11053
|
if (credits == null) {
|
|
11036
11054
|
throw new Error("Credit balance is unavailable");
|
|
@@ -11056,7 +11074,17 @@ function useCheckoutFlow(opts) {
|
|
|
11056
11074
|
onErrorRef.current?.(wrapped, "activate");
|
|
11057
11075
|
return false;
|
|
11058
11076
|
}
|
|
11059
|
-
}, [
|
|
11077
|
+
}, [
|
|
11078
|
+
balance,
|
|
11079
|
+
copy.activation.invalidConfiguration,
|
|
11080
|
+
copy.activation.paymentRequired,
|
|
11081
|
+
copy.activation.unexpectedResponse,
|
|
11082
|
+
locale,
|
|
11083
|
+
productRef,
|
|
11084
|
+
selectedPlanRef,
|
|
11085
|
+
selectedPlanShape,
|
|
11086
|
+
transport
|
|
11087
|
+
]);
|
|
11060
11088
|
const advanceFromPlan = (0, import_react50.useCallback)(async () => {
|
|
11061
11089
|
if (!selectedPlanShape || !selectedPlanRef) return;
|
|
11062
11090
|
if (branch === "payg") {
|
|
@@ -11094,7 +11122,15 @@ function useCheckoutFlow(opts) {
|
|
|
11094
11122
|
}
|
|
11095
11123
|
setError(null);
|
|
11096
11124
|
setStep("payment");
|
|
11097
|
-
}, [
|
|
11125
|
+
}, [
|
|
11126
|
+
balance,
|
|
11127
|
+
branch,
|
|
11128
|
+
locale,
|
|
11129
|
+
planCtx.currentPlanRef,
|
|
11130
|
+
runActivate,
|
|
11131
|
+
selectedPlanRef,
|
|
11132
|
+
selectedPlanShape
|
|
11133
|
+
]);
|
|
11098
11134
|
const recordPaygSuccess = (0, import_react50.useCallback)(
|
|
11099
11135
|
(creditsAddedFromBackend) => {
|
|
11100
11136
|
if (!selectedPlanShape || selectedAmountMinor == null) return;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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, B as BootstrapPlanLike, c as SaveAutoRechargeResponse, d as PurchaseStatus, e as SolvaPayContextValue, U as UsePlansOptions, f as UsePlansReturn, g as UsePlanOptions, h as UsePlanReturn, i as UseProductReturn, j as UseMerchantReturn, k as SolvaPayCopy, l as PurchaseStatusReturn, m as CancelResult, R as ReactivateResult, n as ActivatePlanResult, o as UseTopupOptions, p as UseTopupReturn, q as BalanceStatus, r as UseTopupAmountSelectorOptions, s as UseTopupAmountSelectorReturn, t as UsePaymentMethodReturn, u as AutoRechargeConfig, v as SaveAutoRechargeInput, w as SolvaPayTransport, x as PartialSolvaPayCopy, y as PurchaseInfo, z as Product, D as SolvaPayConfig } from './useUsage-
|
|
3
|
-
export { E as CheckoutStep, F as CustomerPurchaseData, M as MandateContext, G as MandateTemplate, H as Merchant, I as PaymentError, J as PaymentIntentResult, K as PaymentMethodInfo, L as PaymentResult, N as PurchaseStatusValue, O as SuccessMeta, Q as TopupPaymentResult, V as TransportBalanceResult, W as TransportCheckoutSessionResult, X as TransportCustomerSessionResult, Y as TransportLimitsResult, Z as UnsupportedTransportMethodError, _ as UsageSnapshot, $ as UseUsageReturn, a0 as useUsage } from './useUsage-
|
|
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 PaymentFormBusinessDetails, k as PaymentFormTaxSummary, A as AutoRechargeInputPayload, l as PaywallStructuredContent, C as CheckoutVariant } from './index-
|
|
5
|
-
export { m as ActivationFlowStep, B as BalanceBadge, n as CancelPlanButton, o as CheckoutErrorPhase, p as CheckoutStatus, q as CheckoutSteps, r as CheckoutSummary, s as CheckoutSummaryProps, M as MandateText, t as MandateTextProps, u as PlanBadge, v as ProductBadge, w as PurchaseGate, U as UseCheckoutFlowOptions, x as UseCheckoutFlowReturn, y as configToAutoRechargeInput, z as deriveVariant, D as useCheckoutFlow, E as useCheckoutStepsContext } 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, B as BootstrapPlanLike, c as SaveAutoRechargeResponse, d as PurchaseStatus, e as SolvaPayContextValue, U as UsePlansOptions, f as UsePlansReturn, g as UsePlanOptions, h as UsePlanReturn, i as UseProductReturn, j as UseMerchantReturn, k as SolvaPayCopy, l as PurchaseStatusReturn, m as CancelResult, R as ReactivateResult, n as ActivatePlanResult, o as UseTopupOptions, p as UseTopupReturn, q as BalanceStatus, r as UseTopupAmountSelectorOptions, s as UseTopupAmountSelectorReturn, t as UsePaymentMethodReturn, u as AutoRechargeConfig, v as SaveAutoRechargeInput, w as SolvaPayTransport, x as PartialSolvaPayCopy, y as PurchaseInfo, z as Product, D as SolvaPayConfig } from './useUsage-CPlXBdC5.cjs';
|
|
3
|
+
export { E as CheckoutStep, F as CustomerPurchaseData, M as MandateContext, G as MandateTemplate, H as Merchant, I as PaymentError, J as PaymentIntentResult, K as PaymentMethodInfo, L as PaymentResult, N as PurchaseStatusValue, O as SuccessMeta, Q as TopupPaymentResult, V as TransportBalanceResult, W as TransportCheckoutSessionResult, X as TransportCustomerSessionResult, Y as TransportLimitsResult, Z as UnsupportedTransportMethodError, _ as UsageSnapshot, $ as UseUsageReturn, a0 as useUsage } from './useUsage-CPlXBdC5.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 PaymentFormBusinessDetails, k as PaymentFormTaxSummary, A as AutoRechargeInputPayload, l as PaywallStructuredContent, C as CheckoutVariant } from './index-CCNxvSm-.cjs';
|
|
5
|
+
export { m as ActivationFlowStep, B as BalanceBadge, n as CancelPlanButton, o as CheckoutErrorPhase, p as CheckoutStatus, q as CheckoutSteps, r as CheckoutSummary, s as CheckoutSummaryProps, M as MandateText, t as MandateTextProps, u as PlanBadge, v as ProductBadge, w as PurchaseGate, U as UseCheckoutFlowOptions, x as UseCheckoutFlowReturn, y as configToAutoRechargeInput, z as deriveVariant, D as useCheckoutFlow, E as useCheckoutStepsContext } from './index-CCNxvSm-.cjs';
|
|
6
6
|
import { PaymentIntent, Stripe, StripeElements } from '@stripe/stripe-js';
|
|
7
7
|
import { BusinessDetailsInput, TaxBreakdown } from '@solvapay/core';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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, B as BootstrapPlanLike, c as SaveAutoRechargeResponse, d as PurchaseStatus, e as SolvaPayContextValue, U as UsePlansOptions, f as UsePlansReturn, g as UsePlanOptions, h as UsePlanReturn, i as UseProductReturn, j as UseMerchantReturn, k as SolvaPayCopy, l as PurchaseStatusReturn, m as CancelResult, R as ReactivateResult, n as ActivatePlanResult, o as UseTopupOptions, p as UseTopupReturn, q as BalanceStatus, r as UseTopupAmountSelectorOptions, s as UseTopupAmountSelectorReturn, t as UsePaymentMethodReturn, u as AutoRechargeConfig, v as SaveAutoRechargeInput, w as SolvaPayTransport, x as PartialSolvaPayCopy, y as PurchaseInfo, z as Product, D as SolvaPayConfig } from './useUsage-
|
|
3
|
-
export { E as CheckoutStep, F as CustomerPurchaseData, M as MandateContext, G as MandateTemplate, H as Merchant, I as PaymentError, J as PaymentIntentResult, K as PaymentMethodInfo, L as PaymentResult, N as PurchaseStatusValue, O as SuccessMeta, Q as TopupPaymentResult, V as TransportBalanceResult, W as TransportCheckoutSessionResult, X as TransportCustomerSessionResult, Y as TransportLimitsResult, Z as UnsupportedTransportMethodError, _ as UsageSnapshot, $ as UseUsageReturn, a0 as useUsage } from './useUsage-
|
|
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 PaymentFormBusinessDetails, k as PaymentFormTaxSummary, A as AutoRechargeInputPayload, l as PaywallStructuredContent, C as CheckoutVariant } from './index-
|
|
5
|
-
export { m as ActivationFlowStep, B as BalanceBadge, n as CancelPlanButton, o as CheckoutErrorPhase, p as CheckoutStatus, q as CheckoutSteps, r as CheckoutSummary, s as CheckoutSummaryProps, M as MandateText, t as MandateTextProps, u as PlanBadge, v as ProductBadge, w as PurchaseGate, U as UseCheckoutFlowOptions, x as UseCheckoutFlowReturn, y as configToAutoRechargeInput, z as deriveVariant, D as useCheckoutFlow, E as useCheckoutStepsContext } 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, B as BootstrapPlanLike, c as SaveAutoRechargeResponse, d as PurchaseStatus, e as SolvaPayContextValue, U as UsePlansOptions, f as UsePlansReturn, g as UsePlanOptions, h as UsePlanReturn, i as UseProductReturn, j as UseMerchantReturn, k as SolvaPayCopy, l as PurchaseStatusReturn, m as CancelResult, R as ReactivateResult, n as ActivatePlanResult, o as UseTopupOptions, p as UseTopupReturn, q as BalanceStatus, r as UseTopupAmountSelectorOptions, s as UseTopupAmountSelectorReturn, t as UsePaymentMethodReturn, u as AutoRechargeConfig, v as SaveAutoRechargeInput, w as SolvaPayTransport, x as PartialSolvaPayCopy, y as PurchaseInfo, z as Product, D as SolvaPayConfig } from './useUsage-Bee4D9Hw.js';
|
|
3
|
+
export { E as CheckoutStep, F as CustomerPurchaseData, M as MandateContext, G as MandateTemplate, H as Merchant, I as PaymentError, J as PaymentIntentResult, K as PaymentMethodInfo, L as PaymentResult, N as PurchaseStatusValue, O as SuccessMeta, Q as TopupPaymentResult, V as TransportBalanceResult, W as TransportCheckoutSessionResult, X as TransportCustomerSessionResult, Y as TransportLimitsResult, Z as UnsupportedTransportMethodError, _ as UsageSnapshot, $ as UseUsageReturn, a0 as useUsage } from './useUsage-Bee4D9Hw.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 PaymentFormBusinessDetails, k as PaymentFormTaxSummary, A as AutoRechargeInputPayload, l as PaywallStructuredContent, C as CheckoutVariant } from './index-ykfNzPia.js';
|
|
5
|
+
export { m as ActivationFlowStep, B as BalanceBadge, n as CancelPlanButton, o as CheckoutErrorPhase, p as CheckoutStatus, q as CheckoutSteps, r as CheckoutSummary, s as CheckoutSummaryProps, M as MandateText, t as MandateTextProps, u as PlanBadge, v as ProductBadge, w as PurchaseGate, U as UseCheckoutFlowOptions, x as UseCheckoutFlowReturn, y as configToAutoRechargeInput, z as deriveVariant, D as useCheckoutFlow, E as useCheckoutStepsContext } from './index-ykfNzPia.js';
|
|
6
6
|
import { PaymentIntent, Stripe, StripeElements } from '@stripe/stripe-js';
|
|
7
7
|
import { BusinessDetailsInput, TaxBreakdown } from '@solvapay/core';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
LaunchCustomerPortalButton,
|
|
6
6
|
usePaymentMethod
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PLKII2BF.js";
|
|
8
8
|
import {
|
|
9
9
|
ActivationFlow,
|
|
10
10
|
AutoRecharge,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
useCheckoutSteps,
|
|
21
21
|
useCreditGate,
|
|
22
22
|
usePaywallResolver
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-SISWCV4B.js";
|
|
24
24
|
import {
|
|
25
25
|
AmountPicker,
|
|
26
26
|
BalanceBadge,
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
useTopupAmountSelector,
|
|
101
101
|
useTransport,
|
|
102
102
|
useUsage
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-WVWUTOBU.js";
|
|
104
104
|
import {
|
|
105
105
|
createAnonymousAuthAdapter,
|
|
106
106
|
defaultAuthAdapter,
|