@solvapay/react 2.2.2-preview-cf2672297243fbf98ba33872a7348aca170e7b01 → 2.2.2
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 +1 -16
- package/dist/{UsageMeter-CCWxdw12.d.ts → UsageMeter-BZWfC5KX.d.ts} +1 -1
- package/dist/{UsageMeter-wjQ1xFpP.d.cts → UsageMeter-BiujMmVR.d.cts} +1 -1
- package/dist/{chunk-3OR5EEP4.js → chunk-4UFQDYG5.js} +1 -1
- package/dist/{chunk-JVBZHE7B.js → chunk-GPP4MY3I.js} +205 -33
- package/dist/{chunk-C4QZGH7X.js → chunk-KUH3SNWZ.js} +41 -225
- package/dist/{index-CLYaY7rM.d.cts → index-B5QUesJE.d.cts} +1 -1
- package/dist/{index-ZnFJaFNZ.d.ts → index-BAYpUp5R.d.ts} +1 -1
- package/dist/index.cjs +2 -4
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/mcp/index.cjs +2232 -1890
- package/dist/mcp/index.d.cts +23 -36
- package/dist/mcp/index.d.ts +23 -36
- package/dist/mcp/index.js +772 -766
- package/dist/primitives/index.cjs +2 -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-BpIrBHDT.d.cts → useUsage-CRd_E6J3.d.cts} +52 -37
- package/dist/{useUsage-SizdkzW3.d.ts → useUsage-DSPWQ37m.d.ts} +52 -37
- package/package.json +4 -4
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-CRd_E6J3.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-BiujMmVR.cjs';
|
|
8
8
|
import '@stripe/stripe-js';
|
|
9
9
|
import '../adapters/auth.cjs';
|
|
10
10
|
|
|
@@ -100,7 +100,7 @@ declare function createMcpAppAdapter(app: McpAppLike): SolvaPayTransport;
|
|
|
100
100
|
*
|
|
101
101
|
* ## Flow
|
|
102
102
|
*
|
|
103
|
-
* 1. `loadStripe(publishableKey)` with a ≤
|
|
103
|
+
* 1. `loadStripe(publishableKey)` with a ≤3s timeout. Reject /
|
|
104
104
|
* timeout → `'blocked'` (covers `script-src` blocks and slow
|
|
105
105
|
* CDNs).
|
|
106
106
|
* 2. `stripe.elements({ mode: 'setup', currency: 'usd' })` +
|
|
@@ -114,16 +114,14 @@ declare function createMcpAppAdapter(app: McpAppLike): SolvaPayTransport;
|
|
|
114
114
|
* - stripe-domain `frame-src` violation → `'blocked'`.
|
|
115
115
|
* - `loaderror` → `'blocked'`.
|
|
116
116
|
* - `ready` → `'ready'` (but only when no violation has fired).
|
|
117
|
-
* - ≤
|
|
117
|
+
* - ≤2s element-mount timeout → `'blocked'`.
|
|
118
118
|
* 5. Always tear down (element unmount + host node removed +
|
|
119
119
|
* listener removed) on resolve, effect cleanup, and defensively
|
|
120
120
|
* on re-renders.
|
|
121
121
|
*
|
|
122
|
-
* Total worst-case budget ≤
|
|
123
|
-
* up to
|
|
124
|
-
*
|
|
125
|
-
* at the payment step — so a slow cold load is no longer user-visible.
|
|
126
|
-
* Public return type unchanged: `'loading' | 'ready' | 'blocked'`.
|
|
122
|
+
* Total worst-case budget ≤ 5s (script load up to 3s + iframe mount
|
|
123
|
+
* up to 2s). Public return type unchanged: `'loading' | 'ready' |
|
|
124
|
+
* 'blocked'`.
|
|
127
125
|
*
|
|
128
126
|
* Note on the key: `publishableKey` is SolvaPay's **platform** Stripe pk
|
|
129
127
|
* (same one the backend returns from `create_payment_intent`). It is used
|
|
@@ -137,11 +135,6 @@ declare function createMcpAppAdapter(app: McpAppLike): SolvaPayTransport;
|
|
|
137
135
|
* merchant's own publishable key is never involved.
|
|
138
136
|
*/
|
|
139
137
|
type StripeProbeState = 'loading' | 'ready' | 'blocked';
|
|
140
|
-
/**
|
|
141
|
-
* @internal Test-only: clear the session probe cache. Do not use in
|
|
142
|
-
* application code.
|
|
143
|
-
*/
|
|
144
|
-
declare function resetStripeProbeCacheForTests(): void;
|
|
145
138
|
declare function useStripeProbe(publishableKey: string | null): StripeProbeState;
|
|
146
139
|
|
|
147
140
|
declare function useHostLocale(): string;
|
|
@@ -312,11 +305,6 @@ interface McpBootstrap {
|
|
|
312
305
|
plans: BootstrapPlan[];
|
|
313
306
|
/** Per-customer snapshot — null when the bootstrap call was unauthenticated. */
|
|
314
307
|
customer: BootstrapCustomer | null;
|
|
315
|
-
/**
|
|
316
|
-
* Hosted portal URL that opens the auto-recharge form. Null when no
|
|
317
|
-
* portal session could be minted.
|
|
318
|
-
*/
|
|
319
|
-
autoRechargeUrl?: string | null;
|
|
320
308
|
}
|
|
321
309
|
/**
|
|
322
310
|
* Extended `McpAppLike` shape used by `fetchMcpBootstrap` — the base adapter
|
|
@@ -782,15 +770,10 @@ interface McpAccountViewProps {
|
|
|
782
770
|
*/
|
|
783
771
|
onTopup?: () => void;
|
|
784
772
|
/**
|
|
785
|
-
*
|
|
786
|
-
*
|
|
787
|
-
*/
|
|
788
|
-
autoRecharge?: BootstrapCustomer['autoRecharge'] | null;
|
|
789
|
-
/**
|
|
790
|
-
* Hosted portal URL that opens the auto-recharge form. The row
|
|
791
|
-
* renders status without an action when this is missing.
|
|
773
|
+
* Called when the user clicks "Turn on" or "Manage" on the
|
|
774
|
+
* auto-recharge row. Wired by the shell to the dedicated view.
|
|
792
775
|
*/
|
|
793
|
-
|
|
776
|
+
onAutoRecharge?: () => void;
|
|
794
777
|
/**
|
|
795
778
|
* Called when the user clicks "Pick a plan" or Change plan.
|
|
796
779
|
* Wired by the shell to switch to checkout.
|
|
@@ -802,14 +785,21 @@ interface McpAccountViewProps {
|
|
|
802
785
|
*/
|
|
803
786
|
plans?: readonly PlanLike[];
|
|
804
787
|
}
|
|
805
|
-
declare function McpAccountView({ product, productRef, classNames, onTopup,
|
|
788
|
+
declare function McpAccountView({ product, productRef, classNames, onTopup, onAutoRecharge, onChangePlan, plans, }: McpAccountViewProps): react_jsx_runtime.JSX.Element;
|
|
789
|
+
|
|
790
|
+
interface McpAutoRechargeViewProps {
|
|
791
|
+
classNames?: McpViewClassNames;
|
|
792
|
+
/** Wired by the shell to return to the account surface. */
|
|
793
|
+
onBack?: () => void;
|
|
794
|
+
}
|
|
795
|
+
declare function McpAutoRechargeView({ classNames, onBack }: McpAutoRechargeViewProps): react_jsx_runtime.JSX.Element;
|
|
806
796
|
|
|
807
797
|
interface McpCheckoutViewProps {
|
|
808
798
|
productRef: string;
|
|
809
799
|
/**
|
|
810
800
|
* Stripe publishable key used by `useStripeProbe` to detect CSP-blocked
|
|
811
|
-
* hosts. Pass `null` to skip the probe
|
|
812
|
-
*
|
|
801
|
+
* hosts. Pass `null` to skip the probe and render the hosted fallback
|
|
802
|
+
* directly.
|
|
813
803
|
*/
|
|
814
804
|
publishableKey?: string | null;
|
|
815
805
|
returnUrl: string;
|
|
@@ -861,11 +851,7 @@ interface McpCheckoutViewProps {
|
|
|
861
851
|
declare function McpCheckoutView({ productRef, publishableKey, returnUrl, onPurchaseSuccess, onRequestTopup: _onRequestTopup, fromPaywall, paywallKind, plans, onClose, onBack, initialPlanRef, autoAdvance, classNames, children, }: McpCheckoutViewProps): react_jsx_runtime.JSX.Element;
|
|
862
852
|
|
|
863
853
|
interface McpTopupViewProps {
|
|
864
|
-
/**
|
|
865
|
-
* Stripe publishable key used by `useStripeProbe`. Pass `null` to skip
|
|
866
|
-
* the probe: the amount step still renders, and the hosted portal
|
|
867
|
-
* handoff is forced only at the payment step.
|
|
868
|
-
*/
|
|
854
|
+
/** Public SDK contract — null means "no key supplied". Normalized internally. */
|
|
869
855
|
publishableKey?: string | null;
|
|
870
856
|
returnUrl: string;
|
|
871
857
|
/**
|
|
@@ -1024,6 +1010,7 @@ interface McpAppViewOverrides {
|
|
|
1024
1010
|
checkout?: React.ComponentType<McpCheckoutViewProps>;
|
|
1025
1011
|
account?: React.ComponentType<McpAccountViewProps>;
|
|
1026
1012
|
topup?: React.ComponentType<McpTopupViewProps>;
|
|
1013
|
+
autoRecharge?: React.ComponentType<McpAutoRechargeViewProps>;
|
|
1027
1014
|
}
|
|
1028
1015
|
interface McpAppProps {
|
|
1029
1016
|
app: McpAppFull;
|
|
@@ -1605,4 +1592,4 @@ declare function mcpUsageWarningAt(remaining: number | null | undefined): number
|
|
|
1605
1592
|
type McpUsageMeterProps = Omit<UsageMeterRootProps, 'warningAt' | 'criticalAt'>;
|
|
1606
1593
|
declare function McpUsageMeter({ usageOverride, className, children, ...rest }: McpUsageMeterProps): React.ReactElement;
|
|
1607
1594
|
|
|
1608
|
-
export { ACCOUNT_STATES, type AccountLimitsLike, type AccountPurchaseLike, type AccountState, type AccountStateInput, type ActivationStrategy, type ActiveProduct, type ActivityStripKind, AmountLadder, type AmountLadderRow, AppHeader, type AppHeaderMode, type AppHeaderProps, type AppToolResultEvents, AttributionFooter, BackLink, type BackLinkProps, CREDIT_ACTIVITY_TYPE_LABELS, DEFAULT_DISPLAY_MODE_STATE, Eyebrow, FactBand, type FactBandItem, Field, HOSTS_WITH_MERCHANT_CHROME, type HostEntryClassification, LedgerRow, LineItem, MCP_DISPLAY_MODES, MCP_HOSTED_MIN_WIDTH, MCP_USAGE_CRITICAL_AT, MCP_USAGE_WARNING_AT, McpAccountView, type McpAccountViewProps, McpApp, type McpAppBootstrapLike, type McpAppFull, type McpAppLike, type McpAppProps, McpAppShell, type McpAppShellProps, type McpAppViewOverrides, type McpBootstrap, type McpBridgeAppLike, McpBridgeProvider, type McpBridgeProviderProps, type McpBridgeValue, McpCheckoutView, type McpCheckoutViewProps, type McpContainerDimensions, type McpDisplayMode, McpDisplayModeProvider, type McpDisplayModeProviderProps, type McpDisplayModeState, McpHostInfoProvider, type McpHostInfoProviderProps, type McpHostedRail, type McpMessageOnSuccess, McpPayingAs, type McpPayingAsProps, type McpSafeAreaInsets, type McpSuccessEvent, type McpTabKind, type McpToolResult, McpTopupView, type McpTopupViewProps, type McpUiHostContextLike, McpUsageMeter, type McpUsageMeterProps, type McpView, type McpViewClassNames, type McpViewKind, McpViewRouter, type McpViewRouterProps, type MeterTone, type NotifyModelContextParams, type OneTimeDisplay, type PeriodDisplay, Pill, type PlanActions, type PlanActionsInput, type PlanLike, PlanRow, type PlanShape, PresetTile, type PurchaseSnapshotLike, type RateDisplay, type RemainingDisplay, SOLVAPAY_MCP_APP_CAPABILITIES, SOLVAPAY_TRANSPORT_TOOL_NAMES, Section, type SendMessageParams, SplitRow, StatusDot, StatusPill, type StatusPillTone, type StripeProbeState, Toggle, type WaitForInitialToolResultOptions, type WaitForInitialToolResultResult, allowanceMeterUnit, classifyHostEntry, createMcpAppAdapter, daysUntil, deriveActiveProducts, fetchMcpBootstrap, fetchMcpBootstrapViaResource, findCatalogPlan, formatAllowanceTerms, formatMerchantPlace, formatProductTerms, formatSince, hostSafeAreaPadding, hostWidthPx, isMcpDisplayMode, isTransportToolName, mapChargeRow, mapCreditActivityRow, mcpUsageWarningAt, mergePlanSnapshot, parseBootstrapFromToolResult, planConsequence, readDisplayModeState, remainingCap,
|
|
1595
|
+
export { ACCOUNT_STATES, type AccountLimitsLike, type AccountPurchaseLike, type AccountState, type AccountStateInput, type ActivationStrategy, type ActiveProduct, type ActivityStripKind, AmountLadder, type AmountLadderRow, AppHeader, type AppHeaderMode, type AppHeaderProps, type AppToolResultEvents, AttributionFooter, BackLink, type BackLinkProps, CREDIT_ACTIVITY_TYPE_LABELS, DEFAULT_DISPLAY_MODE_STATE, Eyebrow, FactBand, type FactBandItem, Field, HOSTS_WITH_MERCHANT_CHROME, type HostEntryClassification, LedgerRow, LineItem, MCP_DISPLAY_MODES, MCP_HOSTED_MIN_WIDTH, MCP_USAGE_CRITICAL_AT, MCP_USAGE_WARNING_AT, McpAccountView, type McpAccountViewProps, McpApp, type McpAppBootstrapLike, type McpAppFull, type McpAppLike, type McpAppProps, McpAppShell, type McpAppShellProps, type McpAppViewOverrides, McpAutoRechargeView, type McpAutoRechargeViewProps, type McpBootstrap, type McpBridgeAppLike, McpBridgeProvider, type McpBridgeProviderProps, type McpBridgeValue, McpCheckoutView, type McpCheckoutViewProps, type McpContainerDimensions, type McpDisplayMode, McpDisplayModeProvider, type McpDisplayModeProviderProps, type McpDisplayModeState, McpHostInfoProvider, type McpHostInfoProviderProps, type McpHostedRail, type McpMessageOnSuccess, McpPayingAs, type McpPayingAsProps, type McpSafeAreaInsets, type McpSuccessEvent, type McpTabKind, type McpToolResult, McpTopupView, type McpTopupViewProps, type McpUiHostContextLike, McpUsageMeter, type McpUsageMeterProps, type McpView, type McpViewClassNames, type McpViewKind, McpViewRouter, type McpViewRouterProps, type MeterTone, type NotifyModelContextParams, type OneTimeDisplay, type PeriodDisplay, Pill, type PlanActions, type PlanActionsInput, type PlanLike, PlanRow, type PlanShape, PresetTile, type PurchaseSnapshotLike, type RateDisplay, type RemainingDisplay, SOLVAPAY_MCP_APP_CAPABILITIES, SOLVAPAY_TRANSPORT_TOOL_NAMES, Section, type SendMessageParams, SplitRow, StatusDot, StatusPill, type StatusPillTone, type StripeProbeState, Toggle, type WaitForInitialToolResultOptions, type WaitForInitialToolResultResult, allowanceMeterUnit, classifyHostEntry, createMcpAppAdapter, daysUntil, deriveActiveProducts, fetchMcpBootstrap, fetchMcpBootstrapViaResource, findCatalogPlan, formatAllowanceTerms, formatMerchantPlace, formatProductTerms, formatSince, hostSafeAreaPadding, hostWidthPx, isMcpDisplayMode, isTransportToolName, mapChargeRow, mapCreditActivityRow, mcpUsageWarningAt, mergePlanSnapshot, parseBootstrapFromToolResult, planConsequence, readDisplayModeState, remainingCap, resolveAccountState, resolveActivationStrategy, resolveActivityStrip, resolveHostedRail, resolveMcpClassNames, resolveMerchantStrip, resolveMeterTone, resolveOneTimeDisplay, resolvePeriodDisplay, resolvePlanActions, resolvePlanShape, resolveRateDisplay, resolveRemaining, sanitizeDecimalInput, seedMcpCaches, statusPillTone, useDisplayMode, useHostLocale, useHostName, useMcpBridge, useMcpToolResult, useStripeProbe, waitForInitialToolResult, websiteHostLabel };
|
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-DSPWQ37m.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-BZWfC5KX.js';
|
|
8
8
|
import '@stripe/stripe-js';
|
|
9
9
|
import '../adapters/auth.js';
|
|
10
10
|
|
|
@@ -100,7 +100,7 @@ declare function createMcpAppAdapter(app: McpAppLike): SolvaPayTransport;
|
|
|
100
100
|
*
|
|
101
101
|
* ## Flow
|
|
102
102
|
*
|
|
103
|
-
* 1. `loadStripe(publishableKey)` with a ≤
|
|
103
|
+
* 1. `loadStripe(publishableKey)` with a ≤3s timeout. Reject /
|
|
104
104
|
* timeout → `'blocked'` (covers `script-src` blocks and slow
|
|
105
105
|
* CDNs).
|
|
106
106
|
* 2. `stripe.elements({ mode: 'setup', currency: 'usd' })` +
|
|
@@ -114,16 +114,14 @@ declare function createMcpAppAdapter(app: McpAppLike): SolvaPayTransport;
|
|
|
114
114
|
* - stripe-domain `frame-src` violation → `'blocked'`.
|
|
115
115
|
* - `loaderror` → `'blocked'`.
|
|
116
116
|
* - `ready` → `'ready'` (but only when no violation has fired).
|
|
117
|
-
* - ≤
|
|
117
|
+
* - ≤2s element-mount timeout → `'blocked'`.
|
|
118
118
|
* 5. Always tear down (element unmount + host node removed +
|
|
119
119
|
* listener removed) on resolve, effect cleanup, and defensively
|
|
120
120
|
* on re-renders.
|
|
121
121
|
*
|
|
122
|
-
* Total worst-case budget ≤
|
|
123
|
-
* up to
|
|
124
|
-
*
|
|
125
|
-
* at the payment step — so a slow cold load is no longer user-visible.
|
|
126
|
-
* Public return type unchanged: `'loading' | 'ready' | 'blocked'`.
|
|
122
|
+
* Total worst-case budget ≤ 5s (script load up to 3s + iframe mount
|
|
123
|
+
* up to 2s). Public return type unchanged: `'loading' | 'ready' |
|
|
124
|
+
* 'blocked'`.
|
|
127
125
|
*
|
|
128
126
|
* Note on the key: `publishableKey` is SolvaPay's **platform** Stripe pk
|
|
129
127
|
* (same one the backend returns from `create_payment_intent`). It is used
|
|
@@ -137,11 +135,6 @@ declare function createMcpAppAdapter(app: McpAppLike): SolvaPayTransport;
|
|
|
137
135
|
* merchant's own publishable key is never involved.
|
|
138
136
|
*/
|
|
139
137
|
type StripeProbeState = 'loading' | 'ready' | 'blocked';
|
|
140
|
-
/**
|
|
141
|
-
* @internal Test-only: clear the session probe cache. Do not use in
|
|
142
|
-
* application code.
|
|
143
|
-
*/
|
|
144
|
-
declare function resetStripeProbeCacheForTests(): void;
|
|
145
138
|
declare function useStripeProbe(publishableKey: string | null): StripeProbeState;
|
|
146
139
|
|
|
147
140
|
declare function useHostLocale(): string;
|
|
@@ -312,11 +305,6 @@ interface McpBootstrap {
|
|
|
312
305
|
plans: BootstrapPlan[];
|
|
313
306
|
/** Per-customer snapshot — null when the bootstrap call was unauthenticated. */
|
|
314
307
|
customer: BootstrapCustomer | null;
|
|
315
|
-
/**
|
|
316
|
-
* Hosted portal URL that opens the auto-recharge form. Null when no
|
|
317
|
-
* portal session could be minted.
|
|
318
|
-
*/
|
|
319
|
-
autoRechargeUrl?: string | null;
|
|
320
308
|
}
|
|
321
309
|
/**
|
|
322
310
|
* Extended `McpAppLike` shape used by `fetchMcpBootstrap` — the base adapter
|
|
@@ -782,15 +770,10 @@ interface McpAccountViewProps {
|
|
|
782
770
|
*/
|
|
783
771
|
onTopup?: () => void;
|
|
784
772
|
/**
|
|
785
|
-
*
|
|
786
|
-
*
|
|
787
|
-
*/
|
|
788
|
-
autoRecharge?: BootstrapCustomer['autoRecharge'] | null;
|
|
789
|
-
/**
|
|
790
|
-
* Hosted portal URL that opens the auto-recharge form. The row
|
|
791
|
-
* renders status without an action when this is missing.
|
|
773
|
+
* Called when the user clicks "Turn on" or "Manage" on the
|
|
774
|
+
* auto-recharge row. Wired by the shell to the dedicated view.
|
|
792
775
|
*/
|
|
793
|
-
|
|
776
|
+
onAutoRecharge?: () => void;
|
|
794
777
|
/**
|
|
795
778
|
* Called when the user clicks "Pick a plan" or Change plan.
|
|
796
779
|
* Wired by the shell to switch to checkout.
|
|
@@ -802,14 +785,21 @@ interface McpAccountViewProps {
|
|
|
802
785
|
*/
|
|
803
786
|
plans?: readonly PlanLike[];
|
|
804
787
|
}
|
|
805
|
-
declare function McpAccountView({ product, productRef, classNames, onTopup,
|
|
788
|
+
declare function McpAccountView({ product, productRef, classNames, onTopup, onAutoRecharge, onChangePlan, plans, }: McpAccountViewProps): react_jsx_runtime.JSX.Element;
|
|
789
|
+
|
|
790
|
+
interface McpAutoRechargeViewProps {
|
|
791
|
+
classNames?: McpViewClassNames;
|
|
792
|
+
/** Wired by the shell to return to the account surface. */
|
|
793
|
+
onBack?: () => void;
|
|
794
|
+
}
|
|
795
|
+
declare function McpAutoRechargeView({ classNames, onBack }: McpAutoRechargeViewProps): react_jsx_runtime.JSX.Element;
|
|
806
796
|
|
|
807
797
|
interface McpCheckoutViewProps {
|
|
808
798
|
productRef: string;
|
|
809
799
|
/**
|
|
810
800
|
* Stripe publishable key used by `useStripeProbe` to detect CSP-blocked
|
|
811
|
-
* hosts. Pass `null` to skip the probe
|
|
812
|
-
*
|
|
801
|
+
* hosts. Pass `null` to skip the probe and render the hosted fallback
|
|
802
|
+
* directly.
|
|
813
803
|
*/
|
|
814
804
|
publishableKey?: string | null;
|
|
815
805
|
returnUrl: string;
|
|
@@ -861,11 +851,7 @@ interface McpCheckoutViewProps {
|
|
|
861
851
|
declare function McpCheckoutView({ productRef, publishableKey, returnUrl, onPurchaseSuccess, onRequestTopup: _onRequestTopup, fromPaywall, paywallKind, plans, onClose, onBack, initialPlanRef, autoAdvance, classNames, children, }: McpCheckoutViewProps): react_jsx_runtime.JSX.Element;
|
|
862
852
|
|
|
863
853
|
interface McpTopupViewProps {
|
|
864
|
-
/**
|
|
865
|
-
* Stripe publishable key used by `useStripeProbe`. Pass `null` to skip
|
|
866
|
-
* the probe: the amount step still renders, and the hosted portal
|
|
867
|
-
* handoff is forced only at the payment step.
|
|
868
|
-
*/
|
|
854
|
+
/** Public SDK contract — null means "no key supplied". Normalized internally. */
|
|
869
855
|
publishableKey?: string | null;
|
|
870
856
|
returnUrl: string;
|
|
871
857
|
/**
|
|
@@ -1024,6 +1010,7 @@ interface McpAppViewOverrides {
|
|
|
1024
1010
|
checkout?: React.ComponentType<McpCheckoutViewProps>;
|
|
1025
1011
|
account?: React.ComponentType<McpAccountViewProps>;
|
|
1026
1012
|
topup?: React.ComponentType<McpTopupViewProps>;
|
|
1013
|
+
autoRecharge?: React.ComponentType<McpAutoRechargeViewProps>;
|
|
1027
1014
|
}
|
|
1028
1015
|
interface McpAppProps {
|
|
1029
1016
|
app: McpAppFull;
|
|
@@ -1605,4 +1592,4 @@ declare function mcpUsageWarningAt(remaining: number | null | undefined): number
|
|
|
1605
1592
|
type McpUsageMeterProps = Omit<UsageMeterRootProps, 'warningAt' | 'criticalAt'>;
|
|
1606
1593
|
declare function McpUsageMeter({ usageOverride, className, children, ...rest }: McpUsageMeterProps): React.ReactElement;
|
|
1607
1594
|
|
|
1608
|
-
export { ACCOUNT_STATES, type AccountLimitsLike, type AccountPurchaseLike, type AccountState, type AccountStateInput, type ActivationStrategy, type ActiveProduct, type ActivityStripKind, AmountLadder, type AmountLadderRow, AppHeader, type AppHeaderMode, type AppHeaderProps, type AppToolResultEvents, AttributionFooter, BackLink, type BackLinkProps, CREDIT_ACTIVITY_TYPE_LABELS, DEFAULT_DISPLAY_MODE_STATE, Eyebrow, FactBand, type FactBandItem, Field, HOSTS_WITH_MERCHANT_CHROME, type HostEntryClassification, LedgerRow, LineItem, MCP_DISPLAY_MODES, MCP_HOSTED_MIN_WIDTH, MCP_USAGE_CRITICAL_AT, MCP_USAGE_WARNING_AT, McpAccountView, type McpAccountViewProps, McpApp, type McpAppBootstrapLike, type McpAppFull, type McpAppLike, type McpAppProps, McpAppShell, type McpAppShellProps, type McpAppViewOverrides, type McpBootstrap, type McpBridgeAppLike, McpBridgeProvider, type McpBridgeProviderProps, type McpBridgeValue, McpCheckoutView, type McpCheckoutViewProps, type McpContainerDimensions, type McpDisplayMode, McpDisplayModeProvider, type McpDisplayModeProviderProps, type McpDisplayModeState, McpHostInfoProvider, type McpHostInfoProviderProps, type McpHostedRail, type McpMessageOnSuccess, McpPayingAs, type McpPayingAsProps, type McpSafeAreaInsets, type McpSuccessEvent, type McpTabKind, type McpToolResult, McpTopupView, type McpTopupViewProps, type McpUiHostContextLike, McpUsageMeter, type McpUsageMeterProps, type McpView, type McpViewClassNames, type McpViewKind, McpViewRouter, type McpViewRouterProps, type MeterTone, type NotifyModelContextParams, type OneTimeDisplay, type PeriodDisplay, Pill, type PlanActions, type PlanActionsInput, type PlanLike, PlanRow, type PlanShape, PresetTile, type PurchaseSnapshotLike, type RateDisplay, type RemainingDisplay, SOLVAPAY_MCP_APP_CAPABILITIES, SOLVAPAY_TRANSPORT_TOOL_NAMES, Section, type SendMessageParams, SplitRow, StatusDot, StatusPill, type StatusPillTone, type StripeProbeState, Toggle, type WaitForInitialToolResultOptions, type WaitForInitialToolResultResult, allowanceMeterUnit, classifyHostEntry, createMcpAppAdapter, daysUntil, deriveActiveProducts, fetchMcpBootstrap, fetchMcpBootstrapViaResource, findCatalogPlan, formatAllowanceTerms, formatMerchantPlace, formatProductTerms, formatSince, hostSafeAreaPadding, hostWidthPx, isMcpDisplayMode, isTransportToolName, mapChargeRow, mapCreditActivityRow, mcpUsageWarningAt, mergePlanSnapshot, parseBootstrapFromToolResult, planConsequence, readDisplayModeState, remainingCap,
|
|
1595
|
+
export { ACCOUNT_STATES, type AccountLimitsLike, type AccountPurchaseLike, type AccountState, type AccountStateInput, type ActivationStrategy, type ActiveProduct, type ActivityStripKind, AmountLadder, type AmountLadderRow, AppHeader, type AppHeaderMode, type AppHeaderProps, type AppToolResultEvents, AttributionFooter, BackLink, type BackLinkProps, CREDIT_ACTIVITY_TYPE_LABELS, DEFAULT_DISPLAY_MODE_STATE, Eyebrow, FactBand, type FactBandItem, Field, HOSTS_WITH_MERCHANT_CHROME, type HostEntryClassification, LedgerRow, LineItem, MCP_DISPLAY_MODES, MCP_HOSTED_MIN_WIDTH, MCP_USAGE_CRITICAL_AT, MCP_USAGE_WARNING_AT, McpAccountView, type McpAccountViewProps, McpApp, type McpAppBootstrapLike, type McpAppFull, type McpAppLike, type McpAppProps, McpAppShell, type McpAppShellProps, type McpAppViewOverrides, McpAutoRechargeView, type McpAutoRechargeViewProps, type McpBootstrap, type McpBridgeAppLike, McpBridgeProvider, type McpBridgeProviderProps, type McpBridgeValue, McpCheckoutView, type McpCheckoutViewProps, type McpContainerDimensions, type McpDisplayMode, McpDisplayModeProvider, type McpDisplayModeProviderProps, type McpDisplayModeState, McpHostInfoProvider, type McpHostInfoProviderProps, type McpHostedRail, type McpMessageOnSuccess, McpPayingAs, type McpPayingAsProps, type McpSafeAreaInsets, type McpSuccessEvent, type McpTabKind, type McpToolResult, McpTopupView, type McpTopupViewProps, type McpUiHostContextLike, McpUsageMeter, type McpUsageMeterProps, type McpView, type McpViewClassNames, type McpViewKind, McpViewRouter, type McpViewRouterProps, type MeterTone, type NotifyModelContextParams, type OneTimeDisplay, type PeriodDisplay, Pill, type PlanActions, type PlanActionsInput, type PlanLike, PlanRow, type PlanShape, PresetTile, type PurchaseSnapshotLike, type RateDisplay, type RemainingDisplay, SOLVAPAY_MCP_APP_CAPABILITIES, SOLVAPAY_TRANSPORT_TOOL_NAMES, Section, type SendMessageParams, SplitRow, StatusDot, StatusPill, type StatusPillTone, type StripeProbeState, Toggle, type WaitForInitialToolResultOptions, type WaitForInitialToolResultResult, allowanceMeterUnit, classifyHostEntry, createMcpAppAdapter, daysUntil, deriveActiveProducts, fetchMcpBootstrap, fetchMcpBootstrapViaResource, findCatalogPlan, formatAllowanceTerms, formatMerchantPlace, formatProductTerms, formatSince, hostSafeAreaPadding, hostWidthPx, isMcpDisplayMode, isTransportToolName, mapChargeRow, mapCreditActivityRow, mcpUsageWarningAt, mergePlanSnapshot, parseBootstrapFromToolResult, planConsequence, readDisplayModeState, remainingCap, resolveAccountState, resolveActivationStrategy, resolveActivityStrip, resolveHostedRail, resolveMcpClassNames, resolveMerchantStrip, resolveMeterTone, resolveOneTimeDisplay, resolvePeriodDisplay, resolvePlanActions, resolvePlanShape, resolveRateDisplay, resolveRemaining, sanitizeDecimalInput, seedMcpCaches, statusPillTone, useDisplayMode, useHostLocale, useHostName, useMcpBridge, useMcpToolResult, useStripeProbe, waitForInitialToolResult, websiteHostLabel };
|