@solvapay/react 1.4.0 → 1.6.0-preview-bce51e8fd57d2364798f1c44904f4d30268d7bb6
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 +35 -0
- package/dist/{chunk-SUHDOG7Q.js → chunk-6PR6VZ2V.js} +11 -10
- package/dist/{chunk-6RR4J74H.js → chunk-6WNULHI4.js} +1365 -377
- package/dist/{chunk-GFWMLRR3.js → chunk-IQPQAOUS.js} +7 -1
- package/dist/{index-CDvQcobx.d.cts → index-D9TS-Yth.d.cts} +112 -16
- package/dist/{index-w_VMlKm5.d.ts → index-smKnceoo.d.ts} +112 -16
- package/dist/index.cjs +2070 -1083
- package/dist/index.d.cts +53 -12
- package/dist/index.d.ts +53 -12
- package/dist/index.js +53 -34
- package/dist/mcp/index.cjs +1695 -584
- package/dist/mcp/index.d.cts +14 -2
- package/dist/mcp/index.d.ts +14 -2
- package/dist/mcp/index.js +274 -121
- package/dist/mcp/styles.css +62 -0
- package/dist/primitives/index.cjs +1741 -761
- package/dist/primitives/index.d.cts +151 -21
- package/dist/primitives/index.d.ts +151 -21
- package/dist/primitives/index.js +18 -2
- package/dist/{shared-D8raw1Nv.d.ts → shared-DckbpRUA.d.ts} +1836 -1280
- package/dist/{shared-LcjvX4fD.d.cts → shared-DxwFqEr8.d.cts} +1836 -1280
- package/dist/styles.css +177 -5
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @solvapay/react changelog
|
|
2
2
|
|
|
3
|
+
## 1.6.0-preview-bce51e8fd57d2364798f1c44904f4d30268d7bb6
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ede9365: Add business purchase support for credit top-ups: shared BusinessDetails validation in core, TopupForm.BusinessDetails/Summary primitives, attachTopupBusinessDetails server SDK method, and checkout-demo example wiring.
|
|
8
|
+
- 215d045: Add business purchase / VAT support to plan checkout (`PaymentForm.BusinessDetails`, tax-aware summary, attach-before-confirm) and MCP embedded surfaces via the new `attach_business_details` transport tool.
|
|
9
|
+
- 6de3d97: Surface seller VAT / tax identity in the SDK. The merchant contract now exposes optional `companyNumber`, `taxId`, and `vatNumber`, and `McpSellerDetailsCard` renders a country-smart tax-identifier row (VAT number for EU/GB, EIN/Tax ID otherwise) plus a company-number line with org-vs-tax de-duplication.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- b5515d3: Fix PAYG plan display in `CurrentPlanCard` and `UsageMeter`: show the plan name and credit-based usage instead of misleading unlimited usage for usage-based purchases.
|
|
14
|
+
- Updated dependencies [ede9365]
|
|
15
|
+
- Updated dependencies [215d045]
|
|
16
|
+
- @solvapay/core@1.2.0-preview-bce51e8fd57d2364798f1c44904f4d30268d7bb6
|
|
17
|
+
- @solvapay/mcp-core@0.2.8-preview-bce51e8fd57d2364798f1c44904f4d30268d7bb6
|
|
18
|
+
|
|
19
|
+
## 1.5.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- 853e13f: Gate payment success on real confirmation while keeping legacy Card Element APIs as deprecated compatibility shims.
|
|
24
|
+
|
|
25
|
+
**Deprecated (`@solvapay/react`):**
|
|
26
|
+
- `StripePaymentFormWrapper`, `PaymentForm.CardElement` / `PaymentFormCardElement`, and `ConfirmPaymentMode: 'card-element'` remain available but are deprecated — migrate to `PaymentForm.PaymentElement` with the Payment Element. These APIs will be removed in the next major release.
|
|
27
|
+
- `errors.cardElementMissing` is restored alongside `errors.paymentElementMissing` for Card Element callers.
|
|
28
|
+
|
|
29
|
+
**Added:**
|
|
30
|
+
- `paymentIntentReturn` helpers and return-path resume in `PaymentForm` / `TopupForm`.
|
|
31
|
+
- `processing` is treated as pending (not error) in `confirmPayment`, `reconcilePayment`, and backend `/process`.
|
|
32
|
+
- `ConfirmPaymentResult` adds a `pending` status for async payment methods.
|
|
33
|
+
- `confirmPayment` accepts optional `mode` (defaults to `'payment-element'`).
|
|
34
|
+
|
|
35
|
+
**`@solvapay/server`:**
|
|
36
|
+
- `ProcessPaymentResult` and `TopupProcessResult` include a `processing` status.
|
|
37
|
+
|
|
3
38
|
## 1.4.0
|
|
4
39
|
|
|
5
40
|
### Minor Changes
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
usePurchaseStatus,
|
|
15
15
|
useSolvaPay,
|
|
16
16
|
useTransport
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6WNULHI4.js";
|
|
18
18
|
|
|
19
19
|
// src/components/CancelledPlanNotice.tsx
|
|
20
20
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -433,8 +433,9 @@ var CurrentPlanCard = ({
|
|
|
433
433
|
const isUsageBased = planType === "usage-based";
|
|
434
434
|
const amount = activePurchase.originalAmount ?? activePurchase.amount ?? 0;
|
|
435
435
|
const currency = activePurchase.currency ?? "usd";
|
|
436
|
-
const
|
|
437
|
-
const
|
|
436
|
+
const rawCycle = activePurchase.billingCycle ?? activePurchase.planSnapshot?.billingCycle ?? void 0;
|
|
437
|
+
const cycleKey = rawCycle && rawCycle in copy.currentPlan.cycleUnit ? rawCycle : void 0;
|
|
438
|
+
const intervalLabel = cycleKey ? copy.currentPlan.cycleUnit[cycleKey] ?? rawCycle : rawCycle;
|
|
438
439
|
const priceLabel = formatPrice(amount, currency, {
|
|
439
440
|
interval: intervalLabel
|
|
440
441
|
});
|
|
@@ -448,7 +449,7 @@ var CurrentPlanCard = ({
|
|
|
448
449
|
const shouldShowPaymentMethod = !hidePaymentMethod && paymentMethod !== null;
|
|
449
450
|
const showCancelButton = !hideCancelButton && !activePurchase.cancelledAt && !shouldShowCancelledNotice;
|
|
450
451
|
return /* @__PURE__ */ jsxs4(
|
|
451
|
-
"
|
|
452
|
+
"section",
|
|
452
453
|
{
|
|
453
454
|
className: rootClass,
|
|
454
455
|
"data-solvapay-current-plan-card": "",
|
|
@@ -464,7 +465,7 @@ var CurrentPlanCard = ({
|
|
|
464
465
|
}
|
|
465
466
|
),
|
|
466
467
|
productContext && !hideProductContext && /* @__PURE__ */ jsx5(
|
|
467
|
-
"
|
|
468
|
+
"p",
|
|
468
469
|
{
|
|
469
470
|
className: overrides?.productContext ?? "solvapay-current-plan-product-context",
|
|
470
471
|
"data-solvapay-current-plan-product-context": "",
|
|
@@ -472,7 +473,7 @@ var CurrentPlanCard = ({
|
|
|
472
473
|
}
|
|
473
474
|
),
|
|
474
475
|
/* @__PURE__ */ jsx5(
|
|
475
|
-
"
|
|
476
|
+
"h3",
|
|
476
477
|
{
|
|
477
478
|
className: overrides?.planName ?? "solvapay-current-plan-name",
|
|
478
479
|
"data-solvapay-current-plan-name": "",
|
|
@@ -480,7 +481,7 @@ var CurrentPlanCard = ({
|
|
|
480
481
|
}
|
|
481
482
|
),
|
|
482
483
|
/* @__PURE__ */ jsx5(
|
|
483
|
-
"
|
|
484
|
+
"p",
|
|
484
485
|
{
|
|
485
486
|
className: overrides?.price ?? "solvapay-current-plan-price",
|
|
486
487
|
"data-solvapay-current-plan-price": "",
|
|
@@ -516,7 +517,7 @@ var CurrentPlanCard = ({
|
|
|
516
517
|
}
|
|
517
518
|
),
|
|
518
519
|
isUsageBased && !hideUsageMeter && /* @__PURE__ */ jsx5(
|
|
519
|
-
"
|
|
520
|
+
"section",
|
|
520
521
|
{
|
|
521
522
|
className: overrides?.usageMeter ?? "solvapay-current-plan-usage-meter",
|
|
522
523
|
"data-solvapay-current-plan-usage-meter": "",
|
|
@@ -530,7 +531,7 @@ var CurrentPlanCard = ({
|
|
|
530
531
|
}
|
|
531
532
|
),
|
|
532
533
|
isUsageBased && /* @__PURE__ */ jsx5(
|
|
533
|
-
"
|
|
534
|
+
"p",
|
|
534
535
|
{
|
|
535
536
|
className: overrides?.balanceLine ?? "solvapay-current-plan-balance-line",
|
|
536
537
|
"data-solvapay-current-plan-balance-line": "",
|
|
@@ -545,7 +546,7 @@ var CurrentPlanCard = ({
|
|
|
545
546
|
}
|
|
546
547
|
),
|
|
547
548
|
/* @__PURE__ */ jsxs4(
|
|
548
|
-
"
|
|
549
|
+
"section",
|
|
549
550
|
{
|
|
550
551
|
className: overrides?.actions ?? "solvapay-current-plan-actions",
|
|
551
552
|
"data-solvapay-current-plan-actions": "",
|