@solvapay/react 2.6.0 → 2.7.0-preview-4417d6edf298ee5cacb48f9c358440ba5e8a66b7
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 +12 -0
- package/dist/{UsageMeter-Cxn3_A-q.d.cts → UsageMeter-7TlUFO4f.d.cts} +1 -1
- package/dist/{UsageMeter-sAFkX-Tz.d.ts → UsageMeter-DMXIqN6R.d.ts} +1 -1
- package/dist/{chunk-PLKII2BF.js → chunk-A4RMDNX2.js} +1 -1
- package/dist/{chunk-WVWUTOBU.js → chunk-NVIMOERI.js} +14 -2
- package/dist/{chunk-SISWCV4B.js → chunk-OSNWRO7K.js} +4 -3
- package/dist/{index-ykfNzPia.d.ts → index-Cw6HeErQ.d.ts} +1 -1
- package/dist/{index-CCNxvSm-.d.cts → index-FASAoYDW.d.cts} +1 -1
- package/dist/index.cjs +16 -4
- 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 +22 -6
- package/dist/mcp/index.d.cts +3 -2
- package/dist/mcp/index.d.ts +3 -2
- package/dist/mcp/index.js +11 -6
- package/dist/primitives/index.cjs +16 -4
- 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-CPlXBdC5.d.cts → useUsage-C7I5dNGM.d.cts} +5 -0
- package/dist/{useUsage-Bee4D9Hw.d.ts → useUsage-Chx6wiUC.d.ts} +5 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @solvapay/react changelog
|
|
2
2
|
|
|
3
|
+
## 2.7.0-preview-4417d6edf298ee5cacb48f9c358440ba5e8a66b7
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b3edfd8: Hybrid checkout tells the customer when usage past the included allowance is paid from credits, and the success step no longer says credits are ready before any are added.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [b3edfd8]
|
|
12
|
+
- @solvapay/core@1.8.0-preview-4417d6edf298ee5cacb48f9c358440ba5e8a66b7
|
|
13
|
+
- @solvapay/mcp-core@0.4.8-preview-4417d6edf298ee5cacb48f9c358440ba5e8a66b7
|
|
14
|
+
|
|
3
15
|
## 2.6.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -7371,6 +7371,7 @@ import { useCallback as useCallback21, useMemo as useMemo17, useRef as useRef9,
|
|
|
7371
7371
|
// src/primitives/checkout/shared.ts
|
|
7372
7372
|
import {
|
|
7373
7373
|
billingCycle as readBillingCycle,
|
|
7374
|
+
creditDrawnMeters,
|
|
7374
7375
|
creditsPerUnitFromBalance,
|
|
7375
7376
|
includedUnits,
|
|
7376
7377
|
meterName,
|
|
@@ -7475,6 +7476,16 @@ function inferIncludedUnits(plan) {
|
|
|
7475
7476
|
function planMeterName(plan) {
|
|
7476
7477
|
return meterName(plan);
|
|
7477
7478
|
}
|
|
7479
|
+
function recurringCreditNote(plan) {
|
|
7480
|
+
const [meter] = creditDrawnMeters(plan);
|
|
7481
|
+
if (!meter) return null;
|
|
7482
|
+
const cap = includedUnits(plan, meter);
|
|
7483
|
+
if (cap != null && cap > 0) {
|
|
7484
|
+
return `Usage past your ${cap.toLocaleString()} included ${meter} is paid from credits. Your balance is 0.`;
|
|
7485
|
+
}
|
|
7486
|
+
const noun = meter.charAt(0).toUpperCase() + meter.slice(1);
|
|
7487
|
+
return `${noun} are paid from credits. Your balance is 0.`;
|
|
7488
|
+
}
|
|
7478
7489
|
function shortCycle(cycle) {
|
|
7479
7490
|
if (!cycle) return "";
|
|
7480
7491
|
const lc = cycle.toLowerCase();
|
|
@@ -7716,12 +7727,13 @@ function useCheckoutFlow(opts) {
|
|
|
7716
7727
|
meterName: planMeterName(selectedPlanShape),
|
|
7717
7728
|
chargedTodayMinor: pricingOption.price ?? 0,
|
|
7718
7729
|
currency,
|
|
7719
|
-
nextRenewalLabel: null
|
|
7730
|
+
nextRenewalLabel: null,
|
|
7731
|
+
creditNote: balance.credits === 0 ? recurringCreditNote(selectedPlanShape) : null
|
|
7720
7732
|
};
|
|
7721
7733
|
setSuccessMeta(meta);
|
|
7722
7734
|
setStep("success");
|
|
7723
7735
|
onPurchaseSuccessRef.current?.(meta);
|
|
7724
|
-
}, [selectedPlanShape, selectedPlan, planSelection?.selectedCurrency]);
|
|
7736
|
+
}, [balance.credits, selectedPlanShape, selectedPlan, planSelection?.selectedCurrency]);
|
|
7725
7737
|
const advance = useCallback21(async () => {
|
|
7726
7738
|
if (step === "plan") {
|
|
7727
7739
|
await advanceFromPlan();
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
validateAutoRechargeForm,
|
|
53
53
|
withPaymentElementDefaults,
|
|
54
54
|
writeAutoRechargeCache
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-NVIMOERI.js";
|
|
56
56
|
|
|
57
57
|
// src/TopupForm.tsx
|
|
58
58
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -2714,7 +2714,7 @@ function Success({ className, children }) {
|
|
|
2714
2714
|
meta.plan.name ?? "Plan",
|
|
2715
2715
|
" active"
|
|
2716
2716
|
] }),
|
|
2717
|
-
/* @__PURE__ */ jsx8("p", { className: "solvapay-checkout-success-subheading", children: "Subscription is live
|
|
2717
|
+
/* @__PURE__ */ jsx8("p", { className: "solvapay-checkout-success-subheading", children: "Subscription is live." }),
|
|
2718
2718
|
/* @__PURE__ */ jsxs3("dl", { className: "solvapay-checkout-receipt", "data-variant": "recurring", children: [
|
|
2719
2719
|
/* @__PURE__ */ jsxs3("div", { className: "solvapay-checkout-receipt-row", children: [
|
|
2720
2720
|
/* @__PURE__ */ jsx8("dt", { children: "Plan" }),
|
|
@@ -2736,7 +2736,8 @@ function Success({ className, children }) {
|
|
|
2736
2736
|
/* @__PURE__ */ jsx8("dt", { children: "Next renewal" }),
|
|
2737
2737
|
/* @__PURE__ */ jsx8("dd", { children: meta.nextRenewalLabel })
|
|
2738
2738
|
] }) : null
|
|
2739
|
-
] })
|
|
2739
|
+
] }),
|
|
2740
|
+
meta.creditNote ? /* @__PURE__ */ jsx8("p", { className: "solvapay-checkout-success-subheading", children: meta.creditNote }) : null
|
|
2740
2741
|
] });
|
|
2741
2742
|
}
|
|
2742
2743
|
var RootWithEnv = forwardRef7(
|
|
@@ -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-Chx6wiUC.js';
|
|
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-C7I5dNGM.cjs';
|
|
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
|
@@ -8796,6 +8796,16 @@ function inferIncludedUnits(plan) {
|
|
|
8796
8796
|
function planMeterName(plan) {
|
|
8797
8797
|
return (0, import_core10.meterName)(plan);
|
|
8798
8798
|
}
|
|
8799
|
+
function recurringCreditNote(plan) {
|
|
8800
|
+
const [meter] = (0, import_core10.creditDrawnMeters)(plan);
|
|
8801
|
+
if (!meter) return null;
|
|
8802
|
+
const cap = (0, import_core10.includedUnits)(plan, meter);
|
|
8803
|
+
if (cap != null && cap > 0) {
|
|
8804
|
+
return `Usage past your ${cap.toLocaleString()} included ${meter} is paid from credits. Your balance is 0.`;
|
|
8805
|
+
}
|
|
8806
|
+
const noun = meter.charAt(0).toUpperCase() + meter.slice(1);
|
|
8807
|
+
return `${noun} are paid from credits. Your balance is 0.`;
|
|
8808
|
+
}
|
|
8799
8809
|
function shortCycle(cycle) {
|
|
8800
8810
|
if (!cycle) return "";
|
|
8801
8811
|
const lc = cycle.toLowerCase();
|
|
@@ -11189,12 +11199,13 @@ function useCheckoutFlow(opts) {
|
|
|
11189
11199
|
meterName: planMeterName(selectedPlanShape),
|
|
11190
11200
|
chargedTodayMinor: pricingOption.price ?? 0,
|
|
11191
11201
|
currency,
|
|
11192
|
-
nextRenewalLabel: null
|
|
11202
|
+
nextRenewalLabel: null,
|
|
11203
|
+
creditNote: balance.credits === 0 ? recurringCreditNote(selectedPlanShape) : null
|
|
11193
11204
|
};
|
|
11194
11205
|
setSuccessMeta(meta);
|
|
11195
11206
|
setStep("success");
|
|
11196
11207
|
onPurchaseSuccessRef.current?.(meta);
|
|
11197
|
-
}, [selectedPlanShape, selectedPlan, planSelection?.selectedCurrency]);
|
|
11208
|
+
}, [balance.credits, selectedPlanShape, selectedPlan, planSelection?.selectedCurrency]);
|
|
11198
11209
|
const advance = (0, import_react50.useCallback)(async () => {
|
|
11199
11210
|
if (step === "plan") {
|
|
11200
11211
|
await advanceFromPlan();
|
|
@@ -12107,7 +12118,7 @@ function Success({ className, children }) {
|
|
|
12107
12118
|
meta.plan.name ?? "Plan",
|
|
12108
12119
|
" active"
|
|
12109
12120
|
] }),
|
|
12110
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "solvapay-checkout-success-subheading", children: "Subscription is live
|
|
12121
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "solvapay-checkout-success-subheading", children: "Subscription is live." }),
|
|
12111
12122
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("dl", { className: "solvapay-checkout-receipt", "data-variant": "recurring", children: [
|
|
12112
12123
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "solvapay-checkout-receipt-row", children: [
|
|
12113
12124
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("dt", { children: "Plan" }),
|
|
@@ -12129,7 +12140,8 @@ function Success({ className, children }) {
|
|
|
12129
12140
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("dt", { children: "Next renewal" }),
|
|
12130
12141
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("dd", { children: meta.nextRenewalLabel })
|
|
12131
12142
|
] }) : null
|
|
12132
|
-
] })
|
|
12143
|
+
] }),
|
|
12144
|
+
meta.creditNote ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "solvapay-checkout-success-subheading", children: meta.creditNote }) : null
|
|
12133
12145
|
] });
|
|
12134
12146
|
}
|
|
12135
12147
|
var RootWithEnv = (0, import_react52.forwardRef)(
|
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-C7I5dNGM.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-C7I5dNGM.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-FASAoYDW.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-FASAoYDW.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-Chx6wiUC.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-Chx6wiUC.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-Cw6HeErQ.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-Cw6HeErQ.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-A4RMDNX2.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-OSNWRO7K.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-NVIMOERI.js";
|
|
104
104
|
import {
|
|
105
105
|
createAnonymousAuthAdapter,
|
|
106
106
|
defaultAuthAdapter,
|
package/dist/mcp/index.cjs
CHANGED
|
@@ -629,8 +629,11 @@ function defaultSuccessCopy(evt, locale) {
|
|
|
629
629
|
const amount = formatPrice(evt.amountMinor, evt.currency, { locale });
|
|
630
630
|
return `Topped up ${amount}. Ready to keep working.`;
|
|
631
631
|
}
|
|
632
|
-
case "plan-activated":
|
|
633
|
-
|
|
632
|
+
case "plan-activated": {
|
|
633
|
+
const activated = `Activated ${evt.planName ?? "plan"}.`;
|
|
634
|
+
if (!evt.creditNote) return activated;
|
|
635
|
+
return `${activated} ${evt.creditNote} Call \`account\` with \`view: 'topup'\` to add credits.`;
|
|
636
|
+
}
|
|
634
637
|
default: {
|
|
635
638
|
const _never = evt;
|
|
636
639
|
void _never;
|
|
@@ -3498,6 +3501,16 @@ function inferIncludedUnits(plan) {
|
|
|
3498
3501
|
function planMeterName(plan) {
|
|
3499
3502
|
return (0, import_core6.meterName)(plan);
|
|
3500
3503
|
}
|
|
3504
|
+
function recurringCreditNote(plan) {
|
|
3505
|
+
const [meter] = (0, import_core6.creditDrawnMeters)(plan);
|
|
3506
|
+
if (!meter) return null;
|
|
3507
|
+
const cap = (0, import_core6.includedUnits)(plan, meter);
|
|
3508
|
+
if (cap != null && cap > 0) {
|
|
3509
|
+
return `Usage past your ${cap.toLocaleString()} included ${meter} is paid from credits. Your balance is 0.`;
|
|
3510
|
+
}
|
|
3511
|
+
const noun = meter.charAt(0).toUpperCase() + meter.slice(1);
|
|
3512
|
+
return `${noun} are paid from credits. Your balance is 0.`;
|
|
3513
|
+
}
|
|
3501
3514
|
function shortCycle(cycle) {
|
|
3502
3515
|
if (!cycle) return "";
|
|
3503
3516
|
const lc = cycle.toLowerCase();
|
|
@@ -6806,12 +6819,13 @@ function useCheckoutFlow(opts) {
|
|
|
6806
6819
|
meterName: planMeterName(selectedPlanShape),
|
|
6807
6820
|
chargedTodayMinor: pricingOption.price ?? 0,
|
|
6808
6821
|
currency,
|
|
6809
|
-
nextRenewalLabel: null
|
|
6822
|
+
nextRenewalLabel: null,
|
|
6823
|
+
creditNote: balance.credits === 0 ? recurringCreditNote(selectedPlanShape) : null
|
|
6810
6824
|
};
|
|
6811
6825
|
setSuccessMeta(meta);
|
|
6812
6826
|
setStep("success");
|
|
6813
6827
|
onPurchaseSuccessRef.current?.(meta);
|
|
6814
|
-
}, [selectedPlanShape, selectedPlan, planSelection?.selectedCurrency]);
|
|
6828
|
+
}, [balance.credits, selectedPlanShape, selectedPlan, planSelection?.selectedCurrency]);
|
|
6815
6829
|
const advance = (0, import_react30.useCallback)(async () => {
|
|
6816
6830
|
if (step === "plan") {
|
|
6817
6831
|
await advanceFromPlan();
|
|
@@ -11282,7 +11296,7 @@ var SuccessStep = (0, import_react50.memo)(function SuccessStep2({ meta, cx: cx2
|
|
|
11282
11296
|
meta.plan.name ?? "Plan",
|
|
11283
11297
|
" active"
|
|
11284
11298
|
] }),
|
|
11285
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: cx2.muted, children: "Subscription is live
|
|
11299
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: cx2.muted, children: "Subscription is live." }),
|
|
11286
11300
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("dl", { className: "solvapay-mcp-checkout-receipt", "data-variant": "recurring", children: [
|
|
11287
11301
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "solvapay-mcp-checkout-receipt-row", children: [
|
|
11288
11302
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("dt", { children: "Plan" }),
|
|
@@ -11305,6 +11319,7 @@ var SuccessStep = (0, import_react50.memo)(function SuccessStep2({ meta, cx: cx2
|
|
|
11305
11319
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("dd", { children: meta.nextRenewalLabel })
|
|
11306
11320
|
] }) : null
|
|
11307
11321
|
] }),
|
|
11322
|
+
meta.creditNote ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: cx2.muted, children: meta.creditNote }) : null,
|
|
11308
11323
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("p", { className: `${cx2.muted} solvapay-mcp-checkout-manage-pointer`.trim(), children: [
|
|
11309
11324
|
"Manage from ",
|
|
11310
11325
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("code", { children: "/manage_account" })
|
|
@@ -11751,7 +11766,8 @@ function McpCheckoutBody({
|
|
|
11751
11766
|
});
|
|
11752
11767
|
void bridge.notifySuccess({
|
|
11753
11768
|
kind: "plan-activated",
|
|
11754
|
-
planName: meta.plan.name ?? null
|
|
11769
|
+
planName: meta.plan.name ?? null,
|
|
11770
|
+
...meta.branch === "recurring" && meta.creditNote ? { creditNote: meta.creditNote } : {}
|
|
11755
11771
|
});
|
|
11756
11772
|
}
|
|
11757
11773
|
onPurchaseSuccess?.();
|
package/dist/mcp/index.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { w as SolvaPayTransport, a1 as SolvaPayProviderInitial, D as SolvaPayConfig, B as BootstrapPlanLike, y as PurchaseInfo, a2 as CreditActivityType, a3 as CreditActivityEntry, H as Merchant } from '../useUsage-
|
|
1
|
+
import { w as SolvaPayTransport, a1 as SolvaPayProviderInitial, D as SolvaPayConfig, B as BootstrapPlanLike, y as PurchaseInfo, a2 as CreditActivityType, a3 as CreditActivityEntry, H as Merchant } from '../useUsage-C7I5dNGM.cjs';
|
|
2
2
|
import { TOOL_FOR_VIEW, SolvaPayMcpViewKind, BootstrapMerchant, BootstrapProduct, BootstrapPlan, BootstrapCustomer } from '@solvapay/mcp-core';
|
|
3
3
|
export { MCP_TOOL_NAMES, McpToolName } from '@solvapay/mcp-core';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { PricingOptionLike, PricedLike, BalancePegLike } from '@solvapay/core';
|
|
7
|
-
import { U as UsageMeterRootProps } from '../UsageMeter-
|
|
7
|
+
import { U as UsageMeterRootProps } from '../UsageMeter-7TlUFO4f.cjs';
|
|
8
8
|
import '@stripe/stripe-js';
|
|
9
9
|
import '../adapters/auth.cjs';
|
|
10
10
|
|
|
@@ -239,6 +239,7 @@ type McpSuccessEvent = {
|
|
|
239
239
|
} | {
|
|
240
240
|
kind: 'plan-activated';
|
|
241
241
|
planName: string | null;
|
|
242
|
+
creditNote?: string | null;
|
|
242
243
|
};
|
|
243
244
|
type McpMessageOnSuccess = (evt: McpSuccessEvent) => string | null;
|
|
244
245
|
interface McpBridgeValue {
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { w as SolvaPayTransport, a1 as SolvaPayProviderInitial, D as SolvaPayConfig, B as BootstrapPlanLike, y as PurchaseInfo, a2 as CreditActivityType, a3 as CreditActivityEntry, H as Merchant } from '../useUsage-
|
|
1
|
+
import { w as SolvaPayTransport, a1 as SolvaPayProviderInitial, D as SolvaPayConfig, B as BootstrapPlanLike, y as PurchaseInfo, a2 as CreditActivityType, a3 as CreditActivityEntry, H as Merchant } from '../useUsage-Chx6wiUC.js';
|
|
2
2
|
import { TOOL_FOR_VIEW, SolvaPayMcpViewKind, BootstrapMerchant, BootstrapProduct, BootstrapPlan, BootstrapCustomer } from '@solvapay/mcp-core';
|
|
3
3
|
export { MCP_TOOL_NAMES, McpToolName } from '@solvapay/mcp-core';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { PricingOptionLike, PricedLike, BalancePegLike } from '@solvapay/core';
|
|
7
|
-
import { U as UsageMeterRootProps } from '../UsageMeter-
|
|
7
|
+
import { U as UsageMeterRootProps } from '../UsageMeter-DMXIqN6R.js';
|
|
8
8
|
import '@stripe/stripe-js';
|
|
9
9
|
import '../adapters/auth.js';
|
|
10
10
|
|
|
@@ -239,6 +239,7 @@ type McpSuccessEvent = {
|
|
|
239
239
|
} | {
|
|
240
240
|
kind: 'plan-activated';
|
|
241
241
|
planName: string | null;
|
|
242
|
+
creditNote?: string | null;
|
|
242
243
|
};
|
|
243
244
|
type McpMessageOnSuccess = (evt: McpSuccessEvent) => string | null;
|
|
244
245
|
interface McpBridgeValue {
|
package/dist/mcp/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ExternalLinkGlyph,
|
|
3
3
|
LaunchCustomerPortalButton,
|
|
4
4
|
paymentMethodCache
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-A4RMDNX2.js";
|
|
6
6
|
import {
|
|
7
7
|
AmountPicker,
|
|
8
8
|
BalanceBadge,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
useTransport,
|
|
58
58
|
useUsage,
|
|
59
59
|
validateAutoRechargeForm
|
|
60
|
-
} from "../chunk-
|
|
60
|
+
} from "../chunk-NVIMOERI.js";
|
|
61
61
|
import "../chunk-UMXOAUW7.js";
|
|
62
62
|
import "../chunk-MLKGABMK.js";
|
|
63
63
|
|
|
@@ -473,8 +473,11 @@ function defaultSuccessCopy(evt, locale) {
|
|
|
473
473
|
const amount = formatPrice(evt.amountMinor, evt.currency, { locale });
|
|
474
474
|
return `Topped up ${amount}. Ready to keep working.`;
|
|
475
475
|
}
|
|
476
|
-
case "plan-activated":
|
|
477
|
-
|
|
476
|
+
case "plan-activated": {
|
|
477
|
+
const activated = `Activated ${evt.planName ?? "plan"}.`;
|
|
478
|
+
if (!evt.creditNote) return activated;
|
|
479
|
+
return `${activated} ${evt.creditNote} Call \`account\` with \`view: 'topup'\` to add credits.`;
|
|
480
|
+
}
|
|
478
481
|
default: {
|
|
479
482
|
const _never = evt;
|
|
480
483
|
void _never;
|
|
@@ -3537,7 +3540,7 @@ var SuccessStep = memo5(function SuccessStep2({ meta, cx: cx2 }) {
|
|
|
3537
3540
|
meta.plan.name ?? "Plan",
|
|
3538
3541
|
" active"
|
|
3539
3542
|
] }),
|
|
3540
|
-
/* @__PURE__ */ jsx25("p", { className: cx2.muted, children: "Subscription is live
|
|
3543
|
+
/* @__PURE__ */ jsx25("p", { className: cx2.muted, children: "Subscription is live." }),
|
|
3541
3544
|
/* @__PURE__ */ jsxs18("dl", { className: "solvapay-mcp-checkout-receipt", "data-variant": "recurring", children: [
|
|
3542
3545
|
/* @__PURE__ */ jsxs18("div", { className: "solvapay-mcp-checkout-receipt-row", children: [
|
|
3543
3546
|
/* @__PURE__ */ jsx25("dt", { children: "Plan" }),
|
|
@@ -3560,6 +3563,7 @@ var SuccessStep = memo5(function SuccessStep2({ meta, cx: cx2 }) {
|
|
|
3560
3563
|
/* @__PURE__ */ jsx25("dd", { children: meta.nextRenewalLabel })
|
|
3561
3564
|
] }) : null
|
|
3562
3565
|
] }),
|
|
3566
|
+
meta.creditNote ? /* @__PURE__ */ jsx25("p", { className: cx2.muted, children: meta.creditNote }) : null,
|
|
3563
3567
|
/* @__PURE__ */ jsxs18("p", { className: `${cx2.muted} solvapay-mcp-checkout-manage-pointer`.trim(), children: [
|
|
3564
3568
|
"Manage from ",
|
|
3565
3569
|
/* @__PURE__ */ jsx25("code", { children: "/manage_account" })
|
|
@@ -4006,7 +4010,8 @@ function McpCheckoutBody({
|
|
|
4006
4010
|
});
|
|
4007
4011
|
void bridge.notifySuccess({
|
|
4008
4012
|
kind: "plan-activated",
|
|
4009
|
-
planName: meta.plan.name ?? null
|
|
4013
|
+
planName: meta.plan.name ?? null,
|
|
4014
|
+
...meta.branch === "recurring" && meta.creditNote ? { creditNote: meta.creditNote } : {}
|
|
4010
4015
|
});
|
|
4011
4016
|
}
|
|
4012
4017
|
onPurchaseSuccess?.();
|
|
@@ -8528,6 +8528,16 @@ function inferIncludedUnits(plan) {
|
|
|
8528
8528
|
function planMeterName(plan) {
|
|
8529
8529
|
return (0, import_core9.meterName)(plan);
|
|
8530
8530
|
}
|
|
8531
|
+
function recurringCreditNote(plan) {
|
|
8532
|
+
const [meter] = (0, import_core9.creditDrawnMeters)(plan);
|
|
8533
|
+
if (!meter) return null;
|
|
8534
|
+
const cap = (0, import_core9.includedUnits)(plan, meter);
|
|
8535
|
+
if (cap != null && cap > 0) {
|
|
8536
|
+
return `Usage past your ${cap.toLocaleString()} included ${meter} is paid from credits. Your balance is 0.`;
|
|
8537
|
+
}
|
|
8538
|
+
const noun = meter.charAt(0).toUpperCase() + meter.slice(1);
|
|
8539
|
+
return `${noun} are paid from credits. Your balance is 0.`;
|
|
8540
|
+
}
|
|
8531
8541
|
function shortCycle(cycle) {
|
|
8532
8542
|
if (!cycle) return "";
|
|
8533
8543
|
const lc = cycle.toLowerCase();
|
|
@@ -8769,12 +8779,13 @@ function useCheckoutFlow(opts) {
|
|
|
8769
8779
|
meterName: planMeterName(selectedPlanShape),
|
|
8770
8780
|
chargedTodayMinor: pricingOption.price ?? 0,
|
|
8771
8781
|
currency,
|
|
8772
|
-
nextRenewalLabel: null
|
|
8782
|
+
nextRenewalLabel: null,
|
|
8783
|
+
creditNote: balance.credits === 0 ? recurringCreditNote(selectedPlanShape) : null
|
|
8773
8784
|
};
|
|
8774
8785
|
setSuccessMeta(meta);
|
|
8775
8786
|
setStep("success");
|
|
8776
8787
|
onPurchaseSuccessRef.current?.(meta);
|
|
8777
|
-
}, [selectedPlanShape, selectedPlan, planSelection?.selectedCurrency]);
|
|
8788
|
+
}, [balance.credits, selectedPlanShape, selectedPlan, planSelection?.selectedCurrency]);
|
|
8778
8789
|
const advance = (0, import_react39.useCallback)(async () => {
|
|
8779
8790
|
if (step === "plan") {
|
|
8780
8791
|
await advanceFromPlan();
|
|
@@ -9402,7 +9413,7 @@ function Success({ className, children }) {
|
|
|
9402
9413
|
meta.plan.name ?? "Plan",
|
|
9403
9414
|
" active"
|
|
9404
9415
|
] }),
|
|
9405
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "solvapay-checkout-success-subheading", children: "Subscription is live
|
|
9416
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "solvapay-checkout-success-subheading", children: "Subscription is live." }),
|
|
9406
9417
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("dl", { className: "solvapay-checkout-receipt", "data-variant": "recurring", children: [
|
|
9407
9418
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "solvapay-checkout-receipt-row", children: [
|
|
9408
9419
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("dt", { children: "Plan" }),
|
|
@@ -9424,7 +9435,8 @@ function Success({ className, children }) {
|
|
|
9424
9435
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("dt", { children: "Next renewal" }),
|
|
9425
9436
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("dd", { children: meta.nextRenewalLabel })
|
|
9426
9437
|
] }) : null
|
|
9427
|
-
] })
|
|
9438
|
+
] }),
|
|
9439
|
+
meta.creditNote ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "solvapay-checkout-success-subheading", children: meta.creditNote }) : null
|
|
9428
9440
|
] });
|
|
9429
9441
|
}
|
|
9430
9442
|
var RootWithEnv = (0, import_react40.forwardRef)(
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React, { Ref } from 'react';
|
|
3
|
-
import { b as Plan, z as Product, s as UseTopupAmountSelectorReturn, y as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, u as AutoRechargeConfig } from '../useUsage-
|
|
4
|
-
export { B as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../useUsage-
|
|
3
|
+
import { b as Plan, z as Product, s as UseTopupAmountSelectorReturn, y as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, u as AutoRechargeConfig } from '../useUsage-C7I5dNGM.cjs';
|
|
4
|
+
export { B as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../useUsage-C7I5dNGM.cjs';
|
|
5
5
|
import { TaxBreakdown, BusinessDetailsInput } from '@solvapay/core';
|
|
6
|
-
import { A as AutoRechargeInputPayload, F as AmountInputUnit, G as AutoRechargeFormState, l as PaywallStructuredContent } from '../index-
|
|
7
|
-
export { H as ActivationFlow, I as ActivationFlowActivateButton, J as ActivationFlowActivated, K as ActivationFlowAmountPicker, L as ActivationFlowContinueButton, N as ActivationFlowError, O as ActivationFlowLoading, Q as ActivationFlowRetrying, R as ActivationFlowRoot, m as ActivationFlowStep, S as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, T as CheckoutStepsAmountContinueButton, V as CheckoutStepsAmountPicker, W as CheckoutStepsBackLink, X as CheckoutStepsIfStep, Y as CheckoutStepsPayment, Z as CheckoutStepsPlanContinueButton, _ as CheckoutStepsPlanGrid, $ as CheckoutStepsRoot, a0 as CheckoutStepsStepHeading, a1 as CheckoutStepsStepMessage, a2 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a3 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, a4 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a5 as PurchaseGateAllowed, a6 as PurchaseGateBlocked, a7 as PurchaseGateError, a8 as PurchaseGateLoading, a9 as PurchaseGateRoot, aa as useActivationFlow, E as useCheckoutStepsContext, ab as usePurchaseGate } from '../index-
|
|
6
|
+
import { A as AutoRechargeInputPayload, F as AmountInputUnit, G as AutoRechargeFormState, l as PaywallStructuredContent } from '../index-FASAoYDW.cjs';
|
|
7
|
+
export { H as ActivationFlow, I as ActivationFlowActivateButton, J as ActivationFlowActivated, K as ActivationFlowAmountPicker, L as ActivationFlowContinueButton, N as ActivationFlowError, O as ActivationFlowLoading, Q as ActivationFlowRetrying, R as ActivationFlowRoot, m as ActivationFlowStep, S as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, T as CheckoutStepsAmountContinueButton, V as CheckoutStepsAmountPicker, W as CheckoutStepsBackLink, X as CheckoutStepsIfStep, Y as CheckoutStepsPayment, Z as CheckoutStepsPlanContinueButton, _ as CheckoutStepsPlanGrid, $ as CheckoutStepsRoot, a0 as CheckoutStepsStepHeading, a1 as CheckoutStepsStepMessage, a2 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a3 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, a4 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a5 as PurchaseGateAllowed, a6 as PurchaseGateBlocked, a7 as PurchaseGateError, a8 as PurchaseGateLoading, a9 as PurchaseGateRoot, aa as useActivationFlow, E as useCheckoutStepsContext, ab as usePurchaseGate } from '../index-FASAoYDW.cjs';
|
|
8
8
|
import { PaymentElement } from '@stripe/react-stripe-js';
|
|
9
9
|
import { Stripe, StripeElements } from '@stripe/stripe-js';
|
|
10
|
-
export { a as UsageMeter, B as UsageMeterBar, b as UsageMeterClassNames, E as UsageMeterEmpty, L as UsageMeterLabel, c as UsageMeterLoading, P as UsageMeterPercentage, R as UsageMeterResetsIn, d as UsageMeterRoot, U as UsageMeterRootProps, u as useUsageMeter } from '../UsageMeter-
|
|
10
|
+
export { a as UsageMeter, B as UsageMeterBar, b as UsageMeterClassNames, E as UsageMeterEmpty, L as UsageMeterLabel, c as UsageMeterLoading, P as UsageMeterPercentage, R as UsageMeterResetsIn, d as UsageMeterRoot, U as UsageMeterRootProps, u as useUsageMeter } from '../UsageMeter-7TlUFO4f.cjs';
|
|
11
11
|
import '../adapters/auth.cjs';
|
|
12
12
|
|
|
13
13
|
type PlanPricingOption = {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React, { Ref } from 'react';
|
|
3
|
-
import { b as Plan, z as Product, s as UseTopupAmountSelectorReturn, y as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, u as AutoRechargeConfig } from '../useUsage-
|
|
4
|
-
export { B as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../useUsage-
|
|
3
|
+
import { b as Plan, z as Product, s as UseTopupAmountSelectorReturn, y as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, u as AutoRechargeConfig } from '../useUsage-Chx6wiUC.js';
|
|
4
|
+
export { B as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../useUsage-Chx6wiUC.js';
|
|
5
5
|
import { TaxBreakdown, BusinessDetailsInput } from '@solvapay/core';
|
|
6
|
-
import { A as AutoRechargeInputPayload, F as AmountInputUnit, G as AutoRechargeFormState, l as PaywallStructuredContent } from '../index-
|
|
7
|
-
export { H as ActivationFlow, I as ActivationFlowActivateButton, J as ActivationFlowActivated, K as ActivationFlowAmountPicker, L as ActivationFlowContinueButton, N as ActivationFlowError, O as ActivationFlowLoading, Q as ActivationFlowRetrying, R as ActivationFlowRoot, m as ActivationFlowStep, S as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, T as CheckoutStepsAmountContinueButton, V as CheckoutStepsAmountPicker, W as CheckoutStepsBackLink, X as CheckoutStepsIfStep, Y as CheckoutStepsPayment, Z as CheckoutStepsPlanContinueButton, _ as CheckoutStepsPlanGrid, $ as CheckoutStepsRoot, a0 as CheckoutStepsStepHeading, a1 as CheckoutStepsStepMessage, a2 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a3 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, a4 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a5 as PurchaseGateAllowed, a6 as PurchaseGateBlocked, a7 as PurchaseGateError, a8 as PurchaseGateLoading, a9 as PurchaseGateRoot, aa as useActivationFlow, E as useCheckoutStepsContext, ab as usePurchaseGate } from '../index-
|
|
6
|
+
import { A as AutoRechargeInputPayload, F as AmountInputUnit, G as AutoRechargeFormState, l as PaywallStructuredContent } from '../index-Cw6HeErQ.js';
|
|
7
|
+
export { H as ActivationFlow, I as ActivationFlowActivateButton, J as ActivationFlowActivated, K as ActivationFlowAmountPicker, L as ActivationFlowContinueButton, N as ActivationFlowError, O as ActivationFlowLoading, Q as ActivationFlowRetrying, R as ActivationFlowRoot, m as ActivationFlowStep, S as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, T as CheckoutStepsAmountContinueButton, V as CheckoutStepsAmountPicker, W as CheckoutStepsBackLink, X as CheckoutStepsIfStep, Y as CheckoutStepsPayment, Z as CheckoutStepsPlanContinueButton, _ as CheckoutStepsPlanGrid, $ as CheckoutStepsRoot, a0 as CheckoutStepsStepHeading, a1 as CheckoutStepsStepMessage, a2 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a3 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, a4 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a5 as PurchaseGateAllowed, a6 as PurchaseGateBlocked, a7 as PurchaseGateError, a8 as PurchaseGateLoading, a9 as PurchaseGateRoot, aa as useActivationFlow, E as useCheckoutStepsContext, ab as usePurchaseGate } from '../index-Cw6HeErQ.js';
|
|
8
8
|
import { PaymentElement } from '@stripe/react-stripe-js';
|
|
9
9
|
import { Stripe, StripeElements } from '@stripe/stripe-js';
|
|
10
|
-
export { a as UsageMeter, B as UsageMeterBar, b as UsageMeterClassNames, E as UsageMeterEmpty, L as UsageMeterLabel, c as UsageMeterLoading, P as UsageMeterPercentage, R as UsageMeterResetsIn, d as UsageMeterRoot, U as UsageMeterRootProps, u as useUsageMeter } from '../UsageMeter-
|
|
10
|
+
export { a as UsageMeter, B as UsageMeterBar, b as UsageMeterClassNames, E as UsageMeterEmpty, L as UsageMeterLabel, c as UsageMeterLoading, P as UsageMeterPercentage, R as UsageMeterResetsIn, d as UsageMeterRoot, U as UsageMeterRootProps, u as useUsageMeter } from '../UsageMeter-DMXIqN6R.js';
|
|
11
11
|
import '../adapters/auth.js';
|
|
12
12
|
|
|
13
13
|
type PlanPricingOption = {
|
package/dist/primitives/index.js
CHANGED
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
useCreditGate,
|
|
90
90
|
usePaywallNotice,
|
|
91
91
|
usePurchaseGate
|
|
92
|
-
} from "../chunk-
|
|
92
|
+
} from "../chunk-OSNWRO7K.js";
|
|
93
93
|
import {
|
|
94
94
|
AmountPicker,
|
|
95
95
|
AmountPickerConfirm,
|
|
@@ -175,7 +175,7 @@ import {
|
|
|
175
175
|
usePlanSelector,
|
|
176
176
|
useTopupForm,
|
|
177
177
|
useUsageMeter
|
|
178
|
-
} from "../chunk-
|
|
178
|
+
} from "../chunk-NVIMOERI.js";
|
|
179
179
|
import "../chunk-UMXOAUW7.js";
|
|
180
180
|
import "../chunk-MLKGABMK.js";
|
|
181
181
|
export {
|
|
@@ -5482,6 +5482,11 @@ type SuccessMeta = {
|
|
|
5482
5482
|
chargedTodayMinor: number;
|
|
5483
5483
|
currency: string;
|
|
5484
5484
|
nextRenewalLabel: string | null;
|
|
5485
|
+
/**
|
|
5486
|
+
* Set when usage past the allowance is paid from credits and the wallet
|
|
5487
|
+
* is empty. `null` when the plan does not draw credits or the wallet is funded.
|
|
5488
|
+
*/
|
|
5489
|
+
creditNote: string | null;
|
|
5485
5490
|
};
|
|
5486
5491
|
|
|
5487
5492
|
interface UseUsageReturn {
|
|
@@ -5482,6 +5482,11 @@ type SuccessMeta = {
|
|
|
5482
5482
|
chargedTodayMinor: number;
|
|
5483
5483
|
currency: string;
|
|
5484
5484
|
nextRenewalLabel: string | null;
|
|
5485
|
+
/**
|
|
5486
|
+
* Set when usage past the allowance is paid from credits and the wallet
|
|
5487
|
+
* is empty. `null` when the plan does not draw credits or the wallet is funded.
|
|
5488
|
+
*/
|
|
5489
|
+
creditNote: string | null;
|
|
5485
5490
|
};
|
|
5486
5491
|
|
|
5487
5492
|
interface UseUsageReturn {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solvapay/react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0-preview-4417d6edf298ee5cacb48f9c358440ba5e8a66b7",
|
|
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.8-preview-4417d6edf298ee5cacb48f9c358440ba5e8a66b7",
|
|
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.
|
|
72
|
+
"@solvapay/core": "1.8.0-preview-4417d6edf298ee5cacb48f9c358440ba5e8a66b7"
|
|
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.4.
|
|
89
|
-
"@solvapay/server": "2.10.
|
|
88
|
+
"@solvapay/mcp-core": "0.4.8-preview-4417d6edf298ee5cacb48f9c358440ba5e8a66b7",
|
|
89
|
+
"@solvapay/server": "2.10.1-preview-4417d6edf298ee5cacb48f9c358440ba5e8a66b7",
|
|
90
90
|
"@solvapay/test-utils": "0.0.0"
|
|
91
91
|
},
|
|
92
92
|
"scripts": {
|