@solvapay/react 2.5.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/{UsageMeter-YX-icS_X.d.cts → UsageMeter-Cxn3_A-q.d.cts} +1 -1
- package/dist/{UsageMeter-Cg9IAFvV.d.ts → UsageMeter-sAFkX-Tz.d.ts} +1 -1
- package/dist/{chunk-BI5MJT24.js → chunk-PLKII2BF.js} +1 -1
- package/dist/{chunk-IZPE4LKU.js → chunk-SISWCV4B.js} +1 -1
- package/dist/{chunk-67GJCZZU.js → chunk-WVWUTOBU.js} +44 -8
- package/dist/{index-B8rb25FF.d.cts → index-CCNxvSm-.d.cts} +1 -1
- package/dist/{index-DBd1TLZA.d.ts → index-ykfNzPia.d.ts} +1 -1
- package/dist/index.cjs +44 -8
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/mcp/index.cjs +618 -544
- package/dist/mcp/index.d.cts +23 -16
- package/dist/mcp/index.d.ts +23 -16
- package/dist/mcp/index.js +427 -385
- package/dist/mcp/styles.css +63 -94
- package/dist/primitives/index.cjs +44 -8
- package/dist/primitives/index.d.cts +5 -5
- package/dist/primitives/index.d.ts +5 -5
- package/dist/primitives/index.js +2 -2
- package/dist/{useUsage-DwFZIuQW.d.ts → useUsage-Bee4D9Hw.d.ts} +28 -35
- package/dist/{useUsage-DwwQ-jAO.d.cts → useUsage-CPlXBdC5.d.cts} +28 -35
- package/package.json +3 -3
package/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-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-
|
|
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)` —
|
|
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
|
-
*
|
|
426
|
-
*
|
|
427
|
-
*
|
|
428
|
-
*
|
|
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
|
|
431
|
-
* committed action (purchase, topup, etc.).
|
|
432
|
-
*
|
|
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
|
|
443
|
-
*
|
|
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;
|
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-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-
|
|
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)` —
|
|
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
|
-
*
|
|
426
|
-
*
|
|
427
|
-
*
|
|
428
|
-
*
|
|
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
|
|
431
|
-
* committed action (purchase, topup, etc.).
|
|
432
|
-
*
|
|
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
|
|
443
|
-
*
|
|
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;
|