@moonpay/platform-sdk-react-native 1.28.1 → 1.29.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/dist/index.d.cts CHANGED
@@ -7,6 +7,8 @@ export { CardResponse } from '@moonpay/platform-protocol/frames/add-card';
7
7
  import * as ApplePayFrame$1 from '@moonpay/platform-protocol/frames/apple-pay';
8
8
  export { ApplePayButtonSettings } from '@moonpay/platform-protocol/frames/apple-pay';
9
9
  export { Cancellation as ChallengeCancellation, CompleteResult as ChallengeCompleteResult, ErrorCode as ChallengeErrorCode, ResolvedResult as ChallengeResolvedResult } from '@moonpay/platform-protocol/frames/challenge';
10
+ import * as GooglePayFrame$1 from '@moonpay/platform-protocol/frames/google-pay';
11
+ export { GooglePayButtonSettings } from '@moonpay/platform-protocol/frames/google-pay';
10
12
  import { Connection } from '@moonpay/platform-protocol/models/connection';
11
13
  export { Connection, ConnectionStatus } from '@moonpay/platform-protocol/models/connection';
12
14
  import { Result } from '@moonpay/platform-protocol/result';
@@ -138,6 +140,11 @@ interface SetupBuyButtonOptions {
138
140
  externalTransactionId?: string;
139
141
  /** Styling for the Apple Pay button variant. Passed through to the frame, which is authoritative. */
140
142
  applePayButtonSettings?: ApplePayFrame$1.ApplePayButtonSettings;
143
+ /**
144
+ * Styling for the Google Pay button variant. Passed through to the frame, which is
145
+ * authoritative. Ignored when `headless` is set, since no button renders.
146
+ */
147
+ googlePayButtonSettings?: GooglePayFrame$1.GooglePayButtonSettings;
141
148
  /** Frame chrome. Defaults to the frame's own default (bare) when omitted. */
142
149
  presentation?: PresentationMode;
143
150
  /**
@@ -420,6 +427,8 @@ interface MoonPayBuyButtonProps {
420
427
  externalTransactionId?: string;
421
428
  /** Styling for the Apple Pay button variant. Passed through to the frame, which is authoritative. Mount-time only. */
422
429
  applePayButtonSettings?: ApplePayFrame$1.ApplePayButtonSettings;
430
+ /** Styling for the Google Pay button variant. Passed through to the frame, which is authoritative. Ignored when `headless` is set. Mount-time only. */
431
+ googlePayButtonSettings?: GooglePayFrame$1.GooglePayButtonSettings;
423
432
  /**
424
433
  * Render nothing visible and process the quote on load, the way the
425
434
  * deprecated `<MoonPayBuyFrame>` did. Mount-time only.
@@ -433,7 +442,7 @@ interface MoonPayBuyButtonProps {
433
442
  webViewProps?: Partial<WebViewProps>;
434
443
  }
435
444
  /** Inline card/buy button. Render it wherever it should appear in your layout. */
436
- declare function MoonPayBuyButton({ quote, externalTransactionId, applePayButtonSettings, headless, onEvent, style, webViewProps, }: MoonPayBuyButtonProps): JSX.Element;
445
+ declare function MoonPayBuyButton({ quote, externalTransactionId, applePayButtonSettings, googlePayButtonSettings, headless, onEvent, style, webViewProps, }: MoonPayBuyButtonProps): JSX.Element;
437
446
 
438
447
  interface MoonPayBuyFrameProps {
439
448
  /** Quote signature from getQuote(). Reactive — updates are pushed via setQuote without remounting. */
package/dist/index.d.ts CHANGED
@@ -7,6 +7,8 @@ export { CardResponse } from '@moonpay/platform-protocol/frames/add-card';
7
7
  import * as ApplePayFrame$1 from '@moonpay/platform-protocol/frames/apple-pay';
8
8
  export { ApplePayButtonSettings } from '@moonpay/platform-protocol/frames/apple-pay';
9
9
  export { Cancellation as ChallengeCancellation, CompleteResult as ChallengeCompleteResult, ErrorCode as ChallengeErrorCode, ResolvedResult as ChallengeResolvedResult } from '@moonpay/platform-protocol/frames/challenge';
10
+ import * as GooglePayFrame$1 from '@moonpay/platform-protocol/frames/google-pay';
11
+ export { GooglePayButtonSettings } from '@moonpay/platform-protocol/frames/google-pay';
10
12
  import { Connection } from '@moonpay/platform-protocol/models/connection';
11
13
  export { Connection, ConnectionStatus } from '@moonpay/platform-protocol/models/connection';
12
14
  import { Result } from '@moonpay/platform-protocol/result';
@@ -138,6 +140,11 @@ interface SetupBuyButtonOptions {
138
140
  externalTransactionId?: string;
139
141
  /** Styling for the Apple Pay button variant. Passed through to the frame, which is authoritative. */
140
142
  applePayButtonSettings?: ApplePayFrame$1.ApplePayButtonSettings;
143
+ /**
144
+ * Styling for the Google Pay button variant. Passed through to the frame, which is
145
+ * authoritative. Ignored when `headless` is set, since no button renders.
146
+ */
147
+ googlePayButtonSettings?: GooglePayFrame$1.GooglePayButtonSettings;
141
148
  /** Frame chrome. Defaults to the frame's own default (bare) when omitted. */
142
149
  presentation?: PresentationMode;
143
150
  /**
@@ -420,6 +427,8 @@ interface MoonPayBuyButtonProps {
420
427
  externalTransactionId?: string;
421
428
  /** Styling for the Apple Pay button variant. Passed through to the frame, which is authoritative. Mount-time only. */
422
429
  applePayButtonSettings?: ApplePayFrame$1.ApplePayButtonSettings;
430
+ /** Styling for the Google Pay button variant. Passed through to the frame, which is authoritative. Ignored when `headless` is set. Mount-time only. */
431
+ googlePayButtonSettings?: GooglePayFrame$1.GooglePayButtonSettings;
423
432
  /**
424
433
  * Render nothing visible and process the quote on load, the way the
425
434
  * deprecated `<MoonPayBuyFrame>` did. Mount-time only.
@@ -433,7 +442,7 @@ interface MoonPayBuyButtonProps {
433
442
  webViewProps?: Partial<WebViewProps>;
434
443
  }
435
444
  /** Inline card/buy button. Render it wherever it should appear in your layout. */
436
- declare function MoonPayBuyButton({ quote, externalTransactionId, applePayButtonSettings, headless, onEvent, style, webViewProps, }: MoonPayBuyButtonProps): JSX.Element;
445
+ declare function MoonPayBuyButton({ quote, externalTransactionId, applePayButtonSettings, googlePayButtonSettings, headless, onEvent, style, webViewProps, }: MoonPayBuyButtonProps): JSX.Element;
437
446
 
438
447
  interface MoonPayBuyFrameProps {
439
448
  /** Quote signature from getQuote(). Reactive — updates are pushed via setQuote without remounting. */
package/dist/index.js CHANGED
@@ -134,6 +134,9 @@ var buyButtonSpec = {
134
134
  signature: props.quote,
135
135
  ...props.externalTransactionId && { externalTransactionId: props.externalTransactionId },
136
136
  ...props.applePayButtonSettings && { applePayButtonSettings: props.applePayButtonSettings },
137
+ ...props.googlePayButtonSettings && {
138
+ googlePayButtonSettings: props.googlePayButtonSettings
139
+ },
137
140
  ...presentationParams(props.presentation)
138
141
  }),
139
142
  createCommands: createQuoteCommands,
@@ -829,6 +832,7 @@ async function setupBuyButton(deps, opts) {
829
832
  quote: opts.quote,
830
833
  externalTransactionId: opts.externalTransactionId,
831
834
  applePayButtonSettings: opts.applePayButtonSettings,
835
+ googlePayButtonSettings: opts.googlePayButtonSettings,
832
836
  presentation: opts.presentation
833
837
  }
834
838
  );
@@ -1578,6 +1582,7 @@ function MoonPayBuyButton({
1578
1582
  quote,
1579
1583
  externalTransactionId,
1580
1584
  applePayButtonSettings,
1585
+ googlePayButtonSettings,
1581
1586
  headless,
1582
1587
  onEvent,
1583
1588
  style,
@@ -1587,7 +1592,7 @@ function MoonPayBuyButton({
1587
1592
  MoonPayFrameView,
1588
1593
  {
1589
1594
  spec: headless ? headlessBuyButtonSpec : buyButtonSpec,
1590
- props: { quote, externalTransactionId, applePayButtonSettings },
1595
+ props: { quote, externalTransactionId, applePayButtonSettings, googlePayButtonSettings },
1591
1596
  style,
1592
1597
  defaultStyle: { height: 48 },
1593
1598
  onEvent,