@solvapay/react 2.5.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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-DwwQ-jAO.cjs';
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-CPlXBdC5.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-YX-icS_X.cjs';
7
+ import { U as UsageMeterRootProps } from '../UsageMeter-Cxn3_A-q.cjs';
8
8
  import '@stripe/stripe-js';
9
9
  import '../adapters/auth.cjs';
10
10
 
@@ -281,10 +281,10 @@ declare function useMcpBridge(): McpBridgeValue;
281
281
  /**
282
282
  * Bootstrap helper for SolvaPay MCP Apps.
283
283
  *
284
- * `fetchMcpBootstrap(app)` — kicks off the MCP session by invoking the
285
- * `open_*` tool matching the host's invocation context and returns the
284
+ * `fetchMcpBootstrap(app)` — replays the account viewer and returns the
286
285
  * view discriminator + bootstrap payload every view needs (merchant,
287
- * product, plans, and customer snapshot).
286
+ * product, plans, and customer snapshot). The payload's `view` is the
287
+ * surface; `fallbackViewFromHost` applies only when a payload omits it.
288
288
  */
289
289
 
290
290
  /**
@@ -422,16 +422,14 @@ type HostEntryClassification = {
422
422
  */
423
423
  declare function classifyHostEntry(app: McpAppBootstrapLike): HostEntryClassification;
424
424
  /**
425
- * Kick off the MCP session by calling the `open_*` tool that matches the
426
- * host's invocation context. Returns the bootstrap payload every view
427
- * needs (product ref, publishable key, return url) along with the view
428
- * discriminator so the top-level router can pick the right screen.
425
+ * Replay the account viewer for a fresh bootstrap snapshot. Returns the
426
+ * payload every view needs (product ref, publishable key, return url)
427
+ * along with the view discriminator so the top-level router can pick
428
+ * the right screen.
429
429
  *
430
- * Used for intent-tool iframe entries and for `refreshInitial` after a
431
- * committed action (purchase, topup, etc.). Data-tool iframe entries
432
- * (paywall/nudge) bypass this helper; `<McpApp>` consumes the initial
433
- * `ui/notifications/tool-result` directly via
434
- * `parseBootstrapFromToolResult` so the merchant tool is not re-called.
430
+ * Used for transport-tool iframe entries and for `refreshInitial` after
431
+ * a committed action (purchase, topup, etc.). The payload's `view` is
432
+ * the surface; `fallbackViewFromHost` applies only when it is omitted.
435
433
  */
436
434
  declare function fetchMcpBootstrap(app: McpAppBootstrapLike): Promise<McpBootstrap>;
437
435
  /**
@@ -439,8 +437,9 @@ declare function fetchMcpBootstrap(app: McpAppBootstrapLike): Promise<McpBootstr
439
437
  *
440
438
  * Used when the host scrubs `structuredContent` from the opening
441
439
  * `toolresult` notification (e.g. MCPJam) so the widget can recover
442
- * without replaying the intent tool. The view is resolved locally from
443
- * host context — the resource body is view-agnostic.
440
+ * without replaying the viewer. The payload's `view` is the surface —
441
+ * the server stamps the same default the viewer picks when `view` is
442
+ * omitted.
444
443
  *
445
444
  * Throws when `readServerResource` is unavailable, the resource body is
446
445
  * missing, or parsing fails. Callers fall back to `fetchMcpBootstrap`.
@@ -716,7 +715,15 @@ interface McpViewClassNames {
716
715
  awaitingHeader?: string;
717
716
  balanceRow?: string;
718
717
  amountPicker?: string;
718
+ /**
719
+ * @deprecated Quick amounts render as `.solvapay-mcp-preset-tile`s.
720
+ * Slot retained for integrator overrides that still target it.
721
+ */
719
722
  amountOptions?: string;
723
+ /**
724
+ * @deprecated Quick amounts render as `.solvapay-mcp-preset-tile`s.
725
+ * Slot retained for integrator overrides that still target it.
726
+ */
720
727
  amountOption?: string;
721
728
  amountCustom?: string;
722
729
  topupForm?: string;
@@ -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-DwFZIuQW.js';
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-Bee4D9Hw.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-Cg9IAFvV.js';
7
+ import { U as UsageMeterRootProps } from '../UsageMeter-sAFkX-Tz.js';
8
8
  import '@stripe/stripe-js';
9
9
  import '../adapters/auth.js';
10
10
 
@@ -281,10 +281,10 @@ declare function useMcpBridge(): McpBridgeValue;
281
281
  /**
282
282
  * Bootstrap helper for SolvaPay MCP Apps.
283
283
  *
284
- * `fetchMcpBootstrap(app)` — kicks off the MCP session by invoking the
285
- * `open_*` tool matching the host's invocation context and returns the
284
+ * `fetchMcpBootstrap(app)` — replays the account viewer and returns the
286
285
  * view discriminator + bootstrap payload every view needs (merchant,
287
- * product, plans, and customer snapshot).
286
+ * product, plans, and customer snapshot). The payload's `view` is the
287
+ * surface; `fallbackViewFromHost` applies only when a payload omits it.
288
288
  */
289
289
 
290
290
  /**
@@ -422,16 +422,14 @@ type HostEntryClassification = {
422
422
  */
423
423
  declare function classifyHostEntry(app: McpAppBootstrapLike): HostEntryClassification;
424
424
  /**
425
- * Kick off the MCP session by calling the `open_*` tool that matches the
426
- * host's invocation context. Returns the bootstrap payload every view
427
- * needs (product ref, publishable key, return url) along with the view
428
- * discriminator so the top-level router can pick the right screen.
425
+ * Replay the account viewer for a fresh bootstrap snapshot. Returns the
426
+ * payload every view needs (product ref, publishable key, return url)
427
+ * along with the view discriminator so the top-level router can pick
428
+ * the right screen.
429
429
  *
430
- * Used for intent-tool iframe entries and for `refreshInitial` after a
431
- * committed action (purchase, topup, etc.). Data-tool iframe entries
432
- * (paywall/nudge) bypass this helper; `<McpApp>` consumes the initial
433
- * `ui/notifications/tool-result` directly via
434
- * `parseBootstrapFromToolResult` so the merchant tool is not re-called.
430
+ * Used for transport-tool iframe entries and for `refreshInitial` after
431
+ * a committed action (purchase, topup, etc.). The payload's `view` is
432
+ * the surface; `fallbackViewFromHost` applies only when it is omitted.
435
433
  */
436
434
  declare function fetchMcpBootstrap(app: McpAppBootstrapLike): Promise<McpBootstrap>;
437
435
  /**
@@ -439,8 +437,9 @@ declare function fetchMcpBootstrap(app: McpAppBootstrapLike): Promise<McpBootstr
439
437
  *
440
438
  * Used when the host scrubs `structuredContent` from the opening
441
439
  * `toolresult` notification (e.g. MCPJam) so the widget can recover
442
- * without replaying the intent tool. The view is resolved locally from
443
- * host context — the resource body is view-agnostic.
440
+ * without replaying the viewer. The payload's `view` is the surface —
441
+ * the server stamps the same default the viewer picks when `view` is
442
+ * omitted.
444
443
  *
445
444
  * Throws when `readServerResource` is unavailable, the resource body is
446
445
  * missing, or parsing fails. Callers fall back to `fetchMcpBootstrap`.
@@ -716,7 +715,15 @@ interface McpViewClassNames {
716
715
  awaitingHeader?: string;
717
716
  balanceRow?: string;
718
717
  amountPicker?: string;
718
+ /**
719
+ * @deprecated Quick amounts render as `.solvapay-mcp-preset-tile`s.
720
+ * Slot retained for integrator overrides that still target it.
721
+ */
719
722
  amountOptions?: string;
723
+ /**
724
+ * @deprecated Quick amounts render as `.solvapay-mcp-preset-tile`s.
725
+ * Slot retained for integrator overrides that still target it.
726
+ */
720
727
  amountOption?: string;
721
728
  amountCustom?: string;
722
729
  topupForm?: string;