@solvapay/react 1.1.0-preview-d96ae270f27dacde3573fb555c740dfcc988e2ed → 1.1.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @solvapay/react changelog
2
2
 
3
- ## 1.1.0-preview-d96ae270f27dacde3573fb555c740dfcc988e2ed
3
+ ## 1.1.0
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -129,6 +129,19 @@ pickPlanButton}` and `currentPlan.startedOn` copy keys.
129
129
  while the button additionally required a non-zero `activePurchase.amount`,
130
130
  so a customer on a paid-but-zero-amount purchase would see a hint pointing
131
131
  at a CTA that never rendered. The two now share a single gate.
132
+ - d4e27df: Remove the inline refresh icon from the `<McpAccountView>` section label
133
+ row. `<McpAppShell>` already re-fetches the bootstrap once on mount, so
134
+ the user-visible button was redundant — re-opening the iframe is the
135
+ only refresh moment that actually matters in practice.
136
+ - `<McpAccountView>` no longer accepts an `onRefresh` prop. The bare
137
+ `CURRENT PLAN AND USAGE` label now sits directly above the plan card.
138
+ - `<McpAppShell>` keeps `onRefreshBootstrap` and the mount-time refresh;
139
+ it just stops threading it into the account view.
140
+ - Removed `sectionLabelRow` and `refreshButton` slots from
141
+ `McpViewClassNames` and the matching `solvapay-mcp-section-label-row`
142
+ / `solvapay-mcp-refresh-button` CSS rules.
143
+ - Removed the `account.refreshLabel` copy key.
144
+
132
145
  - 1d81e43: Three small MCP polish fixes for the host iframe surfaces:
133
146
  - **`<McpTopupView>` Pay-with-card step.** Collapsed the duplicated back
134
147
  affordance (top `← Back to my account` + bottom `← Change amount`)
@@ -241,7 +254,7 @@ pickPlanButton}` and `currentPlan.startedOn` copy keys.
241
254
  `solvapay-mcp-topup-amount-hero` / `solvapay-mcp-topup-balance-context`).
242
255
 
243
256
  - Updated dependencies [7f33787]
244
- - @solvapay/mcp-core@0.2.1-preview-d96ae270f27dacde3573fb555c740dfcc988e2ed
257
+ - @solvapay/mcp-core@0.2.1
245
258
 
246
259
  From `1.0.10` onwards this changelog is generated by
247
260
  [changesets](https://github.com/changesets/changesets) — prior entries
@@ -432,7 +432,6 @@ var enCopy = {
432
432
  },
433
433
  account: {
434
434
  currentPlanAndUsage: "Current plan and usage",
435
- refreshLabel: "Refresh",
436
435
  payAsYouGoTitle: "You're on pay-as-you-go credits",
437
436
  payAsYouGoBody: "Top up to keep going, or pick a plan for predictable monthly billing.",
438
437
  noPlanTitle: "You don't have an active plan",
@@ -13,7 +13,7 @@ import {
13
13
  usePurchaseStatus,
14
14
  useSolvaPay,
15
15
  useTransport
16
- } from "./chunk-6QATW634.js";
16
+ } from "./chunk-BB6F7RRD.js";
17
17
 
18
18
  // src/hooks/usePaymentMethod.ts
19
19
  import { useCallback, useEffect, useState } from "react";
@@ -16,7 +16,7 @@ import {
16
16
  useProduct,
17
17
  usePurchase,
18
18
  useTopupAmountSelector
19
- } from "./chunk-6QATW634.js";
19
+ } from "./chunk-BB6F7RRD.js";
20
20
 
21
21
  // src/TopupForm.tsx
22
22
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -2851,8 +2851,6 @@ interface SolvaPayCopy {
2851
2851
  account: {
2852
2852
  /** Section label above the active plan card. Uppercased in CSS. */
2853
2853
  currentPlanAndUsage: string;
2854
- /** aria-label for the inline refresh icon button. */
2855
- refreshLabel: string;
2856
2854
  /** Heading for the in-card pay-as-you-go credits state. */
2857
2855
  payAsYouGoTitle: string;
2858
2856
  /** Body copy for the in-card pay-as-you-go credits state. */
@@ -2851,8 +2851,6 @@ interface SolvaPayCopy {
2851
2851
  account: {
2852
2852
  /** Section label above the active plan card. Uppercased in CSS. */
2853
2853
  currentPlanAndUsage: string;
2854
- /** aria-label for the inline refresh icon button. */
2855
- refreshLabel: string;
2856
2854
  /** Heading for the in-card pay-as-you-go credits state. */
2857
2855
  payAsYouGoTitle: string;
2858
2856
  /** Body copy for the in-card pay-as-you-go credits state. */
package/dist/index.cjs CHANGED
@@ -558,7 +558,6 @@ var enCopy = {
558
558
  },
559
559
  account: {
560
560
  currentPlanAndUsage: "Current plan and usage",
561
- refreshLabel: "Refresh",
562
561
  payAsYouGoTitle: "You're on pay-as-you-go credits",
563
562
  payAsYouGoBody: "Top up to keep going, or pick a plan for predictable monthly billing.",
564
563
  noPlanTitle: "You don't have an active plan",
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, 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 './index-rJ22uZFv.cjs';
3
- export { x as CustomerPurchaseData, M as MandateContext, y as MandateTemplate, z as Merchant, D as PaymentError, E as PaymentIntentResult, F as PaymentMethodInfo, G as PaymentResult, H as PurchaseStatusValue, I as TopupPaymentResult, J as TransportBalanceResult, K as TransportCheckoutSessionResult, L as TransportCustomerSessionResult, N as UnsupportedTransportMethodError } from './index-rJ22uZFv.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 './useUsage-OTdrmeBc.cjs';
5
- export { A as ActivationFlowStep, B as BalanceBadge, k as CancelPlanButton, l as CheckoutSummary, m as CheckoutSummaryProps, M as MandateText, n as MandateTextProps, o as PlanBadge, p as ProductBadge, q as PurchaseGate, U as UsageSnapshot, r as UseUsageReturn, s as deriveVariant, u as useUsage } from './useUsage-OTdrmeBc.cjs';
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 './index-B2hZOto3.cjs';
3
+ export { x as CustomerPurchaseData, M as MandateContext, y as MandateTemplate, z as Merchant, D as PaymentError, E as PaymentIntentResult, F as PaymentMethodInfo, G as PaymentResult, H as PurchaseStatusValue, I as TopupPaymentResult, J as TransportBalanceResult, K as TransportCheckoutSessionResult, L as TransportCustomerSessionResult, N as UnsupportedTransportMethodError } from './index-B2hZOto3.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 './useUsage-xAm6kcYC.cjs';
5
+ export { A as ActivationFlowStep, B as BalanceBadge, k as CancelPlanButton, l as CheckoutSummary, m as CheckoutSummaryProps, M as MandateText, n as MandateTextProps, o as PlanBadge, p as ProductBadge, q as PurchaseGate, U as UsageSnapshot, r as UseUsageReturn, s as deriveVariant, u as useUsage } from './useUsage-xAm6kcYC.cjs';
6
6
  import { PaymentIntent, Stripe, StripeElements } from '@stripe/stripe-js';
7
7
  export { AuthAdapter, defaultAuthAdapter } from './adapters/auth.cjs';
8
8
  import '@stripe/react-stripe-js';
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, 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 './index-tdY-Y2Yq.js';
3
- export { x as CustomerPurchaseData, M as MandateContext, y as MandateTemplate, z as Merchant, D as PaymentError, E as PaymentIntentResult, F as PaymentMethodInfo, G as PaymentResult, H as PurchaseStatusValue, I as TopupPaymentResult, J as TransportBalanceResult, K as TransportCheckoutSessionResult, L as TransportCustomerSessionResult, N as UnsupportedTransportMethodError } from './index-tdY-Y2Yq.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 './useUsage-DH11XgDH.js';
5
- export { A as ActivationFlowStep, B as BalanceBadge, k as CancelPlanButton, l as CheckoutSummary, m as CheckoutSummaryProps, M as MandateText, n as MandateTextProps, o as PlanBadge, p as ProductBadge, q as PurchaseGate, U as UsageSnapshot, r as UseUsageReturn, s as deriveVariant, u as useUsage } from './useUsage-DH11XgDH.js';
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 './index-C1ViKxpl.js';
3
+ export { x as CustomerPurchaseData, M as MandateContext, y as MandateTemplate, z as Merchant, D as PaymentError, E as PaymentIntentResult, F as PaymentMethodInfo, G as PaymentResult, H as PurchaseStatusValue, I as TopupPaymentResult, J as TransportBalanceResult, K as TransportCheckoutSessionResult, L as TransportCustomerSessionResult, N as UnsupportedTransportMethodError } from './index-C1ViKxpl.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 './useUsage-BKHsPSHN.js';
5
+ export { A as ActivationFlowStep, B as BalanceBadge, k as CancelPlanButton, l as CheckoutSummary, m as CheckoutSummaryProps, M as MandateText, n as MandateTextProps, o as PlanBadge, p as ProductBadge, q as PurchaseGate, U as UsageSnapshot, r as UseUsageReturn, s as deriveVariant, u as useUsage } from './useUsage-BKHsPSHN.js';
6
6
  import { PaymentIntent, Stripe, StripeElements } from '@stripe/stripe-js';
7
7
  export { AuthAdapter, defaultAuthAdapter } from './adapters/auth.js';
8
8
  import '@stripe/react-stripe-js';
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  LaunchCustomerPortalButton,
4
4
  UpdatePaymentMethodButton,
5
5
  usePaymentMethod
6
- } from "./chunk-Q2BYKMBC.js";
6
+ } from "./chunk-XYBKLHT2.js";
7
7
  import {
8
8
  ActivationFlow,
9
9
  CreditGate,
@@ -14,7 +14,7 @@ import {
14
14
  useActivationFlow,
15
15
  useCreditGate,
16
16
  usePaywallResolver
17
- } from "./chunk-47OEUJDF.js";
17
+ } from "./chunk-ZUITUQXA.js";
18
18
  import {
19
19
  AmountPicker,
20
20
  BalanceBadge,
@@ -82,7 +82,7 @@ import {
82
82
  useTopupAmountSelector,
83
83
  useTransport,
84
84
  useUsage
85
- } from "./chunk-6QATW634.js";
85
+ } from "./chunk-BB6F7RRD.js";
86
86
  import {
87
87
  defaultAuthAdapter
88
88
  } from "./chunk-OUSEQRCT.js";
@@ -1012,7 +1012,6 @@ var enCopy = {
1012
1012
  },
1013
1013
  account: {
1014
1014
  currentPlanAndUsage: "Current plan and usage",
1015
- refreshLabel: "Refresh",
1016
1015
  payAsYouGoTitle: "You're on pay-as-you-go credits",
1017
1016
  payAsYouGoBody: "Top up to keep going, or pick a plan for predictable monthly billing.",
1018
1017
  noPlanTitle: "You don't have an active plan",
@@ -3402,9 +3401,7 @@ var DEFAULT_MCP_CLASS_NAMES = {
3402
3401
  productHeader: "solvapay-mcp-product-header",
3403
3402
  productName: "solvapay-mcp-product-name",
3404
3403
  productDescription: "solvapay-mcp-product-description",
3405
- sectionLabelRow: "solvapay-mcp-section-label-row",
3406
- sectionLabel: "solvapay-mcp-section-label",
3407
- refreshButton: "solvapay-mcp-refresh-button"
3404
+ sectionLabel: "solvapay-mcp-section-label"
3408
3405
  };
3409
3406
  function resolveMcpClassNames(overrides) {
3410
3407
  if (!overrides) return DEFAULT_MCP_CLASS_NAMES;
@@ -3563,12 +3560,11 @@ function McpAccountView({
3563
3560
  classNames,
3564
3561
  onTopup,
3565
3562
  onChangePlan,
3566
- onRefresh,
3567
3563
  hideDetailCards
3568
3564
  }) {
3569
3565
  const cx = resolveMcpClassNames(classNames);
3570
3566
  const copy = useCopy();
3571
- const { loading, isRefetching, hasPaidPurchase, activePurchase } = usePurchase();
3567
+ const { loading, hasPaidPurchase, activePurchase } = usePurchase();
3572
3568
  const { shouldShowCancelledNotice } = usePurchaseStatus();
3573
3569
  const { credits } = useBalance();
3574
3570
  if (loading) {
@@ -3581,25 +3577,12 @@ function McpAccountView({
3581
3577
  );
3582
3578
  const productName = product?.name ?? activePurchase?.productName ?? null;
3583
3579
  const productDescription = product?.description ?? null;
3584
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "solvapay-mcp-account", "data-refreshing": isRefetching ? "true" : void 0, children: [
3580
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "solvapay-mcp-account", children: [
3585
3581
  productName ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("header", { className: cx.productHeader, "data-solvapay-mcp-product-header": "", children: [
3586
3582
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h1", { className: cx.productName, children: productName }),
3587
3583
  productDescription ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: cx.productDescription, children: productDescription }) : null
3588
3584
  ] }) : null,
3589
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cx.sectionLabelRow, children: [
3590
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: cx.sectionLabel, "data-solvapay-mcp-section-label": "", children: copy.account.currentPlanAndUsage }),
3591
- onRefresh ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3592
- "button",
3593
- {
3594
- type: "button",
3595
- className: cx.refreshButton,
3596
- onClick: () => void onRefresh(),
3597
- "aria-label": copy.account.refreshLabel,
3598
- "data-solvapay-mcp-refresh-button": "",
3599
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RefreshGlyph, {})
3600
- }
3601
- ) : null
3602
- ] }),
3585
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: cx.sectionLabel, "data-solvapay-mcp-section-label": "", children: copy.account.currentPlanAndUsage }),
3603
3586
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cx.card, children: [
3604
3587
  hasPaidPurchase ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
3605
3588
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
@@ -3650,26 +3633,6 @@ function McpAccountView({
3650
3633
  ] }) : null
3651
3634
  ] });
3652
3635
  }
3653
- function RefreshGlyph() {
3654
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
3655
- "svg",
3656
- {
3657
- width: "14",
3658
- height: "14",
3659
- viewBox: "0 0 24 24",
3660
- fill: "none",
3661
- stroke: "currentColor",
3662
- strokeWidth: "2",
3663
- strokeLinecap: "round",
3664
- strokeLinejoin: "round",
3665
- "aria-hidden": "true",
3666
- children: [
3667
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M21 12a9 9 0 1 1-3.5-7.1" }),
3668
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("polyline", { points: "21 4 21 10 15 10" })
3669
- ]
3670
- }
3671
- );
3672
- }
3673
3636
 
3674
3637
  // src/mcp/views/McpCheckoutView.tsx
3675
3638
  var import_react46 = __toESM(require("react"), 1);
@@ -7461,7 +7424,6 @@ function McpViewRouter({
7461
7424
  product: bootstrap.product,
7462
7425
  onTopup: goTopup,
7463
7426
  onChangePlan: goCheckout,
7464
- onRefresh: onRefreshBootstrap,
7465
7427
  hideDetailCards: suppressDetailCards
7466
7428
  }
7467
7429
  );
@@ -1,4 +1,4 @@
1
- import { s as SolvaPayTransport, O as SolvaPayProviderInitial, w as SolvaPayConfig, z as Merchant } from '../index-rJ22uZFv.cjs';
1
+ import { s as SolvaPayTransport, O as SolvaPayProviderInitial, w as SolvaPayConfig, z as Merchant } from '../index-B2hZOto3.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';
@@ -529,12 +529,8 @@ interface McpViewClassNames {
529
529
  productName?: string;
530
530
  /** `<p>` rendering the optional product description. */
531
531
  productDescription?: string;
532
- /** Row holding the section label + optional refresh icon button. */
533
- sectionLabelRow?: string;
534
532
  /** Uppercased muted label (e.g. `CURRENT PLAN AND USAGE`). */
535
533
  sectionLabel?: string;
536
- /** Refresh icon button on the section label row. */
537
- refreshButton?: string;
538
534
  }
539
535
  /**
540
536
  * Resolve a `McpViewClassNames` partial against the defaults — consumer
@@ -563,12 +559,6 @@ interface McpAccountViewProps {
563
559
  * switch to the checkout surface.
564
560
  */
565
561
  onChangePlan?: () => void;
566
- /**
567
- * Refresh the bootstrap snapshot when the user clicks the inline
568
- * refresh icon on the section label row. Optional — when unset the
569
- * icon button is hidden.
570
- */
571
- onRefresh?: () => void | Promise<void>;
572
562
  /**
573
563
  * Skip the Customer + Seller detail cards. `<McpAppShell>` sets this
574
564
  * to `true` at the wide-iframe breakpoint because the same cards
@@ -576,7 +566,7 @@ interface McpAccountViewProps {
576
566
  */
577
567
  hideDetailCards?: boolean;
578
568
  }
579
- declare function McpAccountView({ product, classNames, onTopup, onChangePlan, onRefresh, hideDetailCards, }: McpAccountViewProps): react_jsx_runtime.JSX.Element;
569
+ declare function McpAccountView({ product, classNames, onTopup, onChangePlan, hideDetailCards, }: McpAccountViewProps): react_jsx_runtime.JSX.Element;
580
570
 
581
571
  /**
582
572
  * Shared types and pure helpers for the MCP checkout state machine.
@@ -1,4 +1,4 @@
1
- import { s as SolvaPayTransport, O as SolvaPayProviderInitial, w as SolvaPayConfig, z as Merchant } from '../index-tdY-Y2Yq.js';
1
+ import { s as SolvaPayTransport, O as SolvaPayProviderInitial, w as SolvaPayConfig, z as Merchant } from '../index-C1ViKxpl.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';
@@ -529,12 +529,8 @@ interface McpViewClassNames {
529
529
  productName?: string;
530
530
  /** `<p>` rendering the optional product description. */
531
531
  productDescription?: string;
532
- /** Row holding the section label + optional refresh icon button. */
533
- sectionLabelRow?: string;
534
532
  /** Uppercased muted label (e.g. `CURRENT PLAN AND USAGE`). */
535
533
  sectionLabel?: string;
536
- /** Refresh icon button on the section label row. */
537
- refreshButton?: string;
538
534
  }
539
535
  /**
540
536
  * Resolve a `McpViewClassNames` partial against the defaults — consumer
@@ -563,12 +559,6 @@ interface McpAccountViewProps {
563
559
  * switch to the checkout surface.
564
560
  */
565
561
  onChangePlan?: () => void;
566
- /**
567
- * Refresh the bootstrap snapshot when the user clicks the inline
568
- * refresh icon on the section label row. Optional — when unset the
569
- * icon button is hidden.
570
- */
571
- onRefresh?: () => void | Promise<void>;
572
562
  /**
573
563
  * Skip the Customer + Seller detail cards. `<McpAppShell>` sets this
574
564
  * to `true` at the wide-iframe breakpoint because the same cards
@@ -576,7 +566,7 @@ interface McpAccountViewProps {
576
566
  */
577
567
  hideDetailCards?: boolean;
578
568
  }
579
- declare function McpAccountView({ product, classNames, onTopup, onChangePlan, onRefresh, hideDetailCards, }: McpAccountViewProps): react_jsx_runtime.JSX.Element;
569
+ declare function McpAccountView({ product, classNames, onTopup, onChangePlan, hideDetailCards, }: McpAccountViewProps): react_jsx_runtime.JSX.Element;
580
570
 
581
571
  /**
582
572
  * Shared types and pure helpers for the MCP checkout state machine.
package/dist/mcp/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  ExternalLinkGlyph,
4
4
  LaunchCustomerPortalButton,
5
5
  paymentMethodCache
6
- } from "../chunk-Q2BYKMBC.js";
6
+ } from "../chunk-XYBKLHT2.js";
7
7
  import {
8
8
  isPaygPlan
9
9
  } from "../chunk-PLPNLBDA.js";
@@ -33,7 +33,7 @@ import {
33
33
  usePurchase,
34
34
  usePurchaseStatus,
35
35
  useTransport
36
- } from "../chunk-6QATW634.js";
36
+ } from "../chunk-BB6F7RRD.js";
37
37
  import "../chunk-OUSEQRCT.js";
38
38
 
39
39
  // src/mcp/adapter.ts
@@ -552,9 +552,7 @@ var DEFAULT_MCP_CLASS_NAMES = {
552
552
  productHeader: "solvapay-mcp-product-header",
553
553
  productName: "solvapay-mcp-product-name",
554
554
  productDescription: "solvapay-mcp-product-description",
555
- sectionLabelRow: "solvapay-mcp-section-label-row",
556
- sectionLabel: "solvapay-mcp-section-label",
557
- refreshButton: "solvapay-mcp-refresh-button"
555
+ sectionLabel: "solvapay-mcp-section-label"
558
556
  };
559
557
  function resolveMcpClassNames(overrides) {
560
558
  if (!overrides) return DEFAULT_MCP_CLASS_NAMES;
@@ -713,12 +711,11 @@ function McpAccountView({
713
711
  classNames,
714
712
  onTopup,
715
713
  onChangePlan,
716
- onRefresh,
717
714
  hideDetailCards
718
715
  }) {
719
716
  const cx = resolveMcpClassNames(classNames);
720
717
  const copy = useCopy();
721
- const { loading, isRefetching, hasPaidPurchase, activePurchase } = usePurchase();
718
+ const { loading, hasPaidPurchase, activePurchase } = usePurchase();
722
719
  const { shouldShowCancelledNotice } = usePurchaseStatus();
723
720
  const { credits } = useBalance();
724
721
  if (loading) {
@@ -731,25 +728,12 @@ function McpAccountView({
731
728
  );
732
729
  const productName = product?.name ?? activePurchase?.productName ?? null;
733
730
  const productDescription = product?.description ?? null;
734
- return /* @__PURE__ */ jsxs2("div", { className: "solvapay-mcp-account", "data-refreshing": isRefetching ? "true" : void 0, children: [
731
+ return /* @__PURE__ */ jsxs2("div", { className: "solvapay-mcp-account", children: [
735
732
  productName ? /* @__PURE__ */ jsxs2("header", { className: cx.productHeader, "data-solvapay-mcp-product-header": "", children: [
736
733
  /* @__PURE__ */ jsx3("h1", { className: cx.productName, children: productName }),
737
734
  productDescription ? /* @__PURE__ */ jsx3("p", { className: cx.productDescription, children: productDescription }) : null
738
735
  ] }) : null,
739
- /* @__PURE__ */ jsxs2("div", { className: cx.sectionLabelRow, children: [
740
- /* @__PURE__ */ jsx3("span", { className: cx.sectionLabel, "data-solvapay-mcp-section-label": "", children: copy.account.currentPlanAndUsage }),
741
- onRefresh ? /* @__PURE__ */ jsx3(
742
- "button",
743
- {
744
- type: "button",
745
- className: cx.refreshButton,
746
- onClick: () => void onRefresh(),
747
- "aria-label": copy.account.refreshLabel,
748
- "data-solvapay-mcp-refresh-button": "",
749
- children: /* @__PURE__ */ jsx3(RefreshGlyph, {})
750
- }
751
- ) : null
752
- ] }),
736
+ /* @__PURE__ */ jsx3("span", { className: cx.sectionLabel, "data-solvapay-mcp-section-label": "", children: copy.account.currentPlanAndUsage }),
753
737
  /* @__PURE__ */ jsxs2("div", { className: cx.card, children: [
754
738
  hasPaidPurchase ? /* @__PURE__ */ jsxs2(Fragment, { children: [
755
739
  /* @__PURE__ */ jsx3(
@@ -800,26 +784,6 @@ function McpAccountView({
800
784
  ] }) : null
801
785
  ] });
802
786
  }
803
- function RefreshGlyph() {
804
- return /* @__PURE__ */ jsxs2(
805
- "svg",
806
- {
807
- width: "14",
808
- height: "14",
809
- viewBox: "0 0 24 24",
810
- fill: "none",
811
- stroke: "currentColor",
812
- strokeWidth: "2",
813
- strokeLinecap: "round",
814
- strokeLinejoin: "round",
815
- "aria-hidden": "true",
816
- children: [
817
- /* @__PURE__ */ jsx3("path", { d: "M21 12a9 9 0 1 1-3.5-7.1" }),
818
- /* @__PURE__ */ jsx3("polyline", { points: "21 4 21 10 15 10" })
819
- ]
820
- }
821
- );
822
- }
823
787
 
824
788
  // src/mcp/views/McpCheckoutView.tsx
825
789
  import React9, { useCallback as useCallback3, useEffect as useEffect4, useMemo as useMemo3, useRef as useRef2, useState as useState5 } from "react";
@@ -2205,7 +2169,6 @@ function McpViewRouter({
2205
2169
  product: bootstrap.product,
2206
2170
  onTopup: goTopup,
2207
2171
  onChangePlan: goCheckout,
2208
- onRefresh: onRefreshBootstrap,
2209
2172
  hideDetailCards: suppressDetailCards
2210
2173
  }
2211
2174
  );
@@ -617,21 +617,14 @@ body {
617
617
  line-height: 1.5;
618
618
  }
619
619
 
620
- /* Section label rhythm — uppercased label, optional inline refresh
621
- * icon button on the right. Matches the hosted manage page's
622
- * `CURRENT PLAN AND USAGE` row. */
623
- .solvapay-mcp-section-label-row {
624
- display: flex;
625
- align-items: center;
626
- justify-content: space-between;
627
- gap: 12px;
620
+ /* Section label — uppercased over-line above the plan card. Matches
621
+ * the hosted manage page's `CURRENT PLAN AND USAGE` row. */
622
+ .solvapay-mcp-section-label {
623
+ display: block;
628
624
  padding: 4px 4px 0;
629
- /* Pull the row tighter to the card below so the section label reads as
630
- * an over-line for the card, not a free-floating hairline. */
625
+ /* Pull the label tighter to the card below so it reads as an
626
+ * over-line for the card, not a free-floating hairline. */
631
627
  margin-bottom: -4px;
632
- }
633
-
634
- .solvapay-mcp-section-label {
635
628
  font-size: 11px;
636
629
  font-weight: 600;
637
630
  letter-spacing: 0.08em;
@@ -639,43 +632,6 @@ body {
639
632
  color: var(--color-text-secondary, #475569);
640
633
  }
641
634
 
642
- .solvapay-mcp-refresh-button {
643
- display: inline-flex;
644
- align-items: center;
645
- justify-content: center;
646
- width: 24px;
647
- height: 24px;
648
- padding: 0;
649
- border: 0;
650
- border-radius: 6px;
651
- background: transparent;
652
- color: var(--color-text-secondary, #475569);
653
- cursor: pointer;
654
- transition:
655
- background-color 120ms ease,
656
- color 120ms ease;
657
- }
658
-
659
- .solvapay-mcp-refresh-button:hover {
660
- background: var(--color-background-secondary, #f1f5f9);
661
- color: var(--color-text-primary, #0f172a);
662
- }
663
-
664
- .solvapay-mcp-refresh-button:focus-visible {
665
- outline: 2px solid var(--color-border-focus, #2563eb);
666
- outline-offset: 2px;
667
- }
668
-
669
- .solvapay-mcp-account[data-refreshing='true'] .solvapay-mcp-refresh-button svg {
670
- animation: solvapay-mcp-spin 800ms linear infinite;
671
- }
672
-
673
- @keyframes solvapay-mcp-spin {
674
- to {
675
- transform: rotate(360deg);
676
- }
677
- }
678
-
679
635
  .solvapay-mcp-detail-grid {
680
636
  display: flex;
681
637
  flex-direction: column;
@@ -688,7 +688,6 @@ var enCopy = {
688
688
  },
689
689
  account: {
690
690
  currentPlanAndUsage: "Current plan and usage",
691
- refreshLabel: "Refresh",
692
691
  payAsYouGoTitle: "You're on pay-as-you-go credits",
693
692
  payAsYouGoBody: "Top up to keep going, or pick a plan for predictable monthly billing.",
694
693
  noPlanTitle: "You don't have an active plan",
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { Ref } from 'react';
3
- import { b as Plan, v as Product, q as UseTopupAmountSelectorReturn, u as PurchaseInfo, T as TopupFormProps } from '../index-rJ22uZFv.cjs';
4
- import { j as PaywallStructuredContent, U as UsageSnapshot } from '../useUsage-OTdrmeBc.cjs';
5
- export { t as ActivationFlow, v as ActivationFlowActivateButton, w as ActivationFlowActivated, x as ActivationFlowAmountPicker, y as ActivationFlowContinueButton, z as ActivationFlowError, D as ActivationFlowLoading, E as ActivationFlowRetrying, F as ActivationFlowRoot, A as ActivationFlowStep, G as ActivationFlowSummary, B as BalanceBadge, k as CancelPlanButton, M as MandateText, n as MandateTextProps, H as PaymentForm, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, I as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, e as PaymentFormTermsCheckbox, o as PlanBadge, p as ProductBadge, q as PurchaseGate, J as PurchaseGateAllowed, K as PurchaseGateBlocked, L as PurchaseGateError, N as PurchaseGateLoading, O as PurchaseGateRoot, Q as useActivationFlow, R as usePurchaseGate } from '../useUsage-OTdrmeBc.cjs';
3
+ import { b as Plan, v as Product, q as UseTopupAmountSelectorReturn, u as PurchaseInfo, T as TopupFormProps } from '../index-B2hZOto3.cjs';
4
+ import { j as PaywallStructuredContent, U as UsageSnapshot } from '../useUsage-xAm6kcYC.cjs';
5
+ export { t as ActivationFlow, v as ActivationFlowActivateButton, w as ActivationFlowActivated, x as ActivationFlowAmountPicker, y as ActivationFlowContinueButton, z as ActivationFlowError, D as ActivationFlowLoading, E as ActivationFlowRetrying, F as ActivationFlowRoot, A as ActivationFlowStep, G as ActivationFlowSummary, B as BalanceBadge, k as CancelPlanButton, M as MandateText, n as MandateTextProps, H as PaymentForm, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, I as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, e as PaymentFormTermsCheckbox, o as PlanBadge, p as ProductBadge, q as PurchaseGate, J as PurchaseGateAllowed, K as PurchaseGateBlocked, L as PurchaseGateError, N as PurchaseGateLoading, O as PurchaseGateRoot, Q as useActivationFlow, R as usePurchaseGate } from '../useUsage-xAm6kcYC.cjs';
6
6
  import { PaymentElement } from '@stripe/react-stripe-js';
7
7
  import { Stripe, StripeElements } from '@stripe/stripe-js';
8
8
  import '../adapters/auth.cjs';
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { Ref } from 'react';
3
- import { b as Plan, v as Product, q as UseTopupAmountSelectorReturn, u as PurchaseInfo, T as TopupFormProps } from '../index-tdY-Y2Yq.js';
4
- import { j as PaywallStructuredContent, U as UsageSnapshot } from '../useUsage-DH11XgDH.js';
5
- export { t as ActivationFlow, v as ActivationFlowActivateButton, w as ActivationFlowActivated, x as ActivationFlowAmountPicker, y as ActivationFlowContinueButton, z as ActivationFlowError, D as ActivationFlowLoading, E as ActivationFlowRetrying, F as ActivationFlowRoot, A as ActivationFlowStep, G as ActivationFlowSummary, B as BalanceBadge, k as CancelPlanButton, M as MandateText, n as MandateTextProps, H as PaymentForm, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, I as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, e as PaymentFormTermsCheckbox, o as PlanBadge, p as ProductBadge, q as PurchaseGate, J as PurchaseGateAllowed, K as PurchaseGateBlocked, L as PurchaseGateError, N as PurchaseGateLoading, O as PurchaseGateRoot, Q as useActivationFlow, R as usePurchaseGate } from '../useUsage-DH11XgDH.js';
3
+ import { b as Plan, v as Product, q as UseTopupAmountSelectorReturn, u as PurchaseInfo, T as TopupFormProps } from '../index-C1ViKxpl.js';
4
+ import { j as PaywallStructuredContent, U as UsageSnapshot } from '../useUsage-BKHsPSHN.js';
5
+ export { t as ActivationFlow, v as ActivationFlowActivateButton, w as ActivationFlowActivated, x as ActivationFlowAmountPicker, y as ActivationFlowContinueButton, z as ActivationFlowError, D as ActivationFlowLoading, E as ActivationFlowRetrying, F as ActivationFlowRoot, A as ActivationFlowStep, G as ActivationFlowSummary, B as BalanceBadge, k as CancelPlanButton, M as MandateText, n as MandateTextProps, H as PaymentForm, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, I as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, e as PaymentFormTermsCheckbox, o as PlanBadge, p as ProductBadge, q as PurchaseGate, J as PurchaseGateAllowed, K as PurchaseGateBlocked, L as PurchaseGateError, N as PurchaseGateLoading, O as PurchaseGateRoot, Q as useActivationFlow, R as usePurchaseGate } from '../useUsage-BKHsPSHN.js';
6
6
  import { PaymentElement } from '@stripe/react-stripe-js';
7
7
  import { Stripe, StripeElements } from '@stripe/stripe-js';
8
8
  import '../adapters/auth.js';
@@ -28,7 +28,7 @@ import {
28
28
  useCreditGate,
29
29
  usePaywallResolver,
30
30
  usePurchaseGate
31
- } from "../chunk-47OEUJDF.js";
31
+ } from "../chunk-ZUITUQXA.js";
32
32
  import {
33
33
  isPaygPlan
34
34
  } from "../chunk-PLPNLBDA.js";
@@ -110,7 +110,7 @@ import {
110
110
  usePlanSelector,
111
111
  useTopupForm,
112
112
  useUsageMeter
113
- } from "../chunk-6QATW634.js";
113
+ } from "../chunk-BB6F7RRD.js";
114
114
  import "../chunk-OUSEQRCT.js";
115
115
 
116
116
  // src/primitives/PaywallNotice.tsx
@@ -1,4 +1,4 @@
1
- import { Q as components, b as Plan, P as PaymentFormProps, a as PrefillCustomer, A as ActivationResult, q as UseTopupAmountSelectorReturn } from './index-tdY-Y2Yq.js';
1
+ import { Q as components, b as Plan, P as PaymentFormProps, a as PrefillCustomer, A as ActivationResult, q as UseTopupAmountSelectorReturn } from './index-C1ViKxpl.js';
2
2
  import React from 'react';
3
3
  import { PaymentElement, CardElement } from '@stripe/react-stripe-js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { Q as components, b as Plan, P as PaymentFormProps, a as PrefillCustomer, A as ActivationResult, q as UseTopupAmountSelectorReturn } from './index-rJ22uZFv.cjs';
1
+ import { Q as components, b as Plan, P as PaymentFormProps, a as PrefillCustomer, A as ActivationResult, q as UseTopupAmountSelectorReturn } from './index-B2hZOto3.cjs';
2
2
  import React from 'react';
3
3
  import { PaymentElement, CardElement } from '@stripe/react-stripe-js';
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solvapay/react",
3
- "version": "1.1.0-preview-d96ae270f27dacde3573fb555c740dfcc988e2ed",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -54,7 +54,7 @@
54
54
  "peerDependencies": {
55
55
  "react": "^18.2.0 || ^19.0.0",
56
56
  "react-dom": "^18.2.0 || ^19.0.0",
57
- "@solvapay/mcp-core": "0.2.1-preview-d96ae270f27dacde3573fb555c740dfcc988e2ed"
57
+ "@solvapay/mcp-core": "0.2.1"
58
58
  },
59
59
  "peerDependenciesMeta": {
60
60
  "@solvapay/mcp-core": {
@@ -79,9 +79,9 @@
79
79
  "react-dom": "^19.2.4",
80
80
  "typescript": "^5.9.3",
81
81
  "vitest": "^4.1.2",
82
- "@solvapay/mcp-core": "0.2.1-preview-d96ae270f27dacde3573fb555c740dfcc988e2ed",
83
- "@solvapay/server": "1.0.9-preview-d96ae270f27dacde3573fb555c740dfcc988e2ed",
84
- "@solvapay/test-utils": "0.0.0"
82
+ "@solvapay/server": "1.0.9",
83
+ "@solvapay/test-utils": "0.0.0",
84
+ "@solvapay/mcp-core": "0.2.1"
85
85
  },
86
86
  "scripts": {
87
87
  "build": "tsup src/index.tsx src/primitives/index.ts src/adapters/auth.ts src/mcp/index.ts --format esm,cjs --dts --tsconfig tsconfig.build.json && cp src/styles.css dist/styles.css && mkdir -p dist/mcp && cp src/mcp/styles.css dist/mcp/styles.css",