@moonpay/platform-sdk-react-native 1.0.3 → 1.2.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/README.md CHANGED
@@ -61,6 +61,8 @@ export function App() {
61
61
 
62
62
  `MoonPayProvider` also accepts optional `apiBaseUrl` and `frameBaseUrl` props that point the SDK at a different MoonPay environment — useful if MoonPay gives you test endpoints during onboarding. Leave them unset to use production.
63
63
 
64
+ Pass an optional `theme={{ appearance: 'light' | 'dark' }}` to render every MoonPay frame in light or dark mode. Omit it to follow the customer's system preference. The connect flow can override it per call (`client.connect({ theme })` or `<MoonPayConnect theme={...} />`).
65
+
64
66
  **3. Check the connection and connect the customer:**
65
67
 
66
68
  ```tsx
package/dist/index.cjs CHANGED
@@ -220,7 +220,9 @@ var connectSpec = {
220
220
  buildParams: (ctx, props, publicKey) => ({
221
221
  sessionToken: ctx.sessionToken,
222
222
  publicKey,
223
- ...props.theme?.appearance && { appearance: props.theme.appearance }
223
+ // Per-call override; `applyThemeParam` in the engine fills the client
224
+ // default for connect (and every other visible frame) when this is absent.
225
+ ...(0, import_platform_sdk_core.themeParams)(props.theme)
224
226
  }),
225
227
  onMessageEffect: applyCredentialsOnComplete,
226
228
  mapMessage: (msg) => {
@@ -416,7 +418,7 @@ var connectionResetSpec = {
416
418
  };
417
419
 
418
420
  // src/frame-view.tsx
419
- var import_react3 = require("react");
421
+ var import_react4 = require("react");
420
422
  var import_react_native3 = require("react-native");
421
423
 
422
424
  // src/frame-component.tsx
@@ -521,11 +523,12 @@ function createFrameSession(spec, ctx, props, overrides = {}) {
521
523
  const generated = `${spec.channelPrefix}-${Date.now()}`;
522
524
  const channelId = spec.resolveChannelId ? spec.resolveChannelId(props, generated) : generated;
523
525
  const keyPair = spec.needsKeyPair ? (0, import_platform_sdk_core2.generateKeyPair)() : void 0;
524
- const url = spec.buildUrl ? spec.buildUrl(ctx, props, channelId, keyPair?.publicKey) : (0, import_platform_sdk_core2.buildFrameUrl)(
526
+ const builtUrl = spec.buildUrl ? spec.buildUrl(ctx, props, channelId, keyPair?.publicKey) : (0, import_platform_sdk_core2.buildFrameUrl)(
525
527
  spec.path,
526
528
  { ...spec.buildParams?.(ctx, props, keyPair?.publicKey), channelId },
527
529
  { frameBaseUrl: ctx.frameBaseUrl }
528
530
  );
531
+ const url = spec.hidden ? builtUrl : (0, import_platform_sdk_core2.applyThemeParam)(builtUrl, ctx.theme);
529
532
  const transport = (overrides.createTransport ?? (() => new WebViewTransport()))();
530
533
  let resolvedHandle = null;
531
534
  let rejectDisposed;
@@ -617,8 +620,7 @@ function createFrameSession(spec, ctx, props, overrides = {}) {
617
620
 
618
621
  // src/provider.tsx
619
622
  var import_platform_sdk_core3 = require("@moonpay/platform-sdk-core");
620
- var import_react2 = require("react");
621
- var import_react_native2 = require("react-native");
623
+ var import_react3 = require("react");
622
624
 
623
625
  // src/methods/add-card.ts
624
626
  var import_result = require("@moonpay/platform-protocol/result");
@@ -907,23 +909,189 @@ function createMountSession(specCtx, host) {
907
909
  };
908
910
  }
909
911
 
910
- // src/provider.tsx
912
+ // src/VisibleFrameSlotSheet.tsx
913
+ var import_react2 = require("react");
914
+ var import_react_native2 = require("react-native");
911
915
  var import_jsx_runtime2 = require("react/jsx-runtime");
912
- var MoonPayContext = (0, import_react2.createContext)(null);
916
+ function animateSheet(value, toValue, onDone) {
917
+ const animation = import_react_native2.Platform.OS === "android" ? import_react_native2.Animated.timing(value, {
918
+ toValue,
919
+ duration: 250,
920
+ easing: import_react_native2.Easing.out(import_react_native2.Easing.exp),
921
+ useNativeDriver: true
922
+ }) : import_react_native2.Animated.spring(value, {
923
+ toValue,
924
+ damping: 500,
925
+ stiffness: 1e3,
926
+ mass: 3,
927
+ overshootClamping: true,
928
+ restDisplacementThreshold: 10,
929
+ restSpeedThreshold: 10,
930
+ useNativeDriver: true
931
+ });
932
+ animation.start(onDone);
933
+ }
934
+ function VisibleFrameSlotSheet({
935
+ slot,
936
+ onClose
937
+ }) {
938
+ const { height } = (0, import_react_native2.useWindowDimensions)();
939
+ const sheetHeight = Math.round(height * 0.9);
940
+ const translateY = (0, import_react2.useRef)(new import_react_native2.Animated.Value(sheetHeight)).current;
941
+ const [frameReady, setFrameReady] = (0, import_react2.useState)(false);
942
+ const onCloseRef = (0, import_react2.useRef)(onClose);
943
+ onCloseRef.current = onClose;
944
+ const closingRef = (0, import_react2.useRef)(false);
945
+ const close = (0, import_react2.useCallback)(() => {
946
+ if (closingRef.current)
947
+ return;
948
+ closingRef.current = true;
949
+ animateSheet(translateY, sheetHeight, ({ finished }) => {
950
+ if (finished)
951
+ onCloseRef.current();
952
+ });
953
+ }, [translateY, sheetHeight]);
954
+ const panResponder = (0, import_react2.useMemo)(
955
+ () => import_react_native2.PanResponder.create({
956
+ // Claim the gesture only for a clearly downward drag — never on a tap
957
+ // (so the handle's onPress still fires) or a mostly-horizontal swipe.
958
+ onMoveShouldSetPanResponder: (_evt, { dy, dx }) => dy > 5 && dy > Math.abs(dx),
959
+ onPanResponderGrant: () => {
960
+ translateY.stopAnimation(() => {
961
+ translateY.extractOffset();
962
+ });
963
+ },
964
+ // Track the finger downward; clamp upward travel to the open position.
965
+ onPanResponderMove: (_evt, { dy }) => {
966
+ translateY.setValue(Math.max(0, dy));
967
+ },
968
+ onPanResponderRelease: (_evt, { dy, vy }) => {
969
+ translateY.flattenOffset();
970
+ const draggedPastThreshold = dy > sheetHeight * 0.35;
971
+ const flungDownFast = vy > 0.5;
972
+ if (draggedPastThreshold || flungDownFast) {
973
+ close();
974
+ } else {
975
+ animateSheet(translateY, 0);
976
+ }
977
+ },
978
+ // Another responder stole the gesture: settle to a known state.
979
+ onPanResponderTerminate: () => {
980
+ translateY.flattenOffset();
981
+ animateSheet(translateY, 0);
982
+ }
983
+ }),
984
+ [translateY, sheetHeight, close]
985
+ );
986
+ (0, import_react2.useEffect)(() => {
987
+ animateSheet(translateY, 0);
988
+ }, [translateY]);
989
+ (0, import_react2.useEffect)(() => {
990
+ const unsubscribe = slot.transport.onMessage((msg) => {
991
+ if (msg.kind === "ready")
992
+ setFrameReady(true);
993
+ else if (msg.kind === "complete" || msg.kind === "error")
994
+ close();
995
+ });
996
+ return unsubscribe;
997
+ }, [slot.transport, close]);
998
+ const backdropOpacity = translateY.interpolate({
999
+ inputRange: [0, sheetHeight],
1000
+ outputRange: [1, 0],
1001
+ extrapolate: "clamp"
1002
+ });
1003
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Modal, { visible: true, transparent: true, animationType: "none", onRequestClose: close, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.View, { style: styles.root, children: [
1004
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Animated.View, { style: [styles.backdrop, { opacity: backdropOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1005
+ import_react_native2.Pressable,
1006
+ {
1007
+ style: import_react_native2.StyleSheet.absoluteFill,
1008
+ accessibilityRole: "button",
1009
+ accessibilityLabel: "Close",
1010
+ onPress: close
1011
+ }
1012
+ ) }),
1013
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_native2.Animated.View, { style: [styles.sheet, { height: sheetHeight, transform: [{ translateY }] }], children: [
1014
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MoonPayFrame, { transport: slot.transport }),
1015
+ !frameReady && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { style: styles.loading, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.ActivityIndicator, { size: "large", color: "#000" }) }),
1016
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { style: styles.handleArea, ...panResponder.panHandlers, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1017
+ import_react_native2.Pressable,
1018
+ {
1019
+ onPress: close,
1020
+ accessibilityRole: "button",
1021
+ accessibilityLabel: "Close",
1022
+ hitSlop: 12,
1023
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { style: styles.handleBar })
1024
+ }
1025
+ ) })
1026
+ ] })
1027
+ ] }) });
1028
+ }
1029
+ var styles = import_react_native2.StyleSheet.create({
1030
+ root: {
1031
+ flex: 1,
1032
+ justifyContent: "flex-end"
1033
+ },
1034
+ // Dimmed backdrop covering the whole screen; fades with the sheet position.
1035
+ backdrop: {
1036
+ ...import_react_native2.StyleSheet.absoluteFillObject,
1037
+ backgroundColor: "rgba(0, 0, 0, 0.5)"
1038
+ },
1039
+ // Bottom sheet: ~90% of the screen (height applied inline), rounded top
1040
+ // corners. The 10% gap keeps the frame clear of the status bar / notch
1041
+ // without depending on react-native-safe-area-context.
1042
+ sheet: {
1043
+ backgroundColor: "#fff",
1044
+ borderTopLeftRadius: 24,
1045
+ borderTopRightRadius: 24,
1046
+ overflow: "hidden"
1047
+ },
1048
+ // Opaque cover with a centered spinner, shown until the frame is ready.
1049
+ loading: {
1050
+ ...import_react_native2.StyleSheet.absoluteFillObject,
1051
+ backgroundColor: "#fff",
1052
+ alignItems: "center",
1053
+ justifyContent: "center"
1054
+ },
1055
+ // Drag-to-dismiss strip pinned across the top of the sheet, floating over the
1056
+ // frame. Tall enough to be an easy grab target without eating much of the UI.
1057
+ handleArea: {
1058
+ position: "absolute",
1059
+ top: 0,
1060
+ left: 0,
1061
+ right: 0,
1062
+ height: 28,
1063
+ alignItems: "center",
1064
+ justifyContent: "center",
1065
+ zIndex: 1,
1066
+ elevation: 2
1067
+ },
1068
+ // The visible pill.
1069
+ handleBar: {
1070
+ width: 36,
1071
+ height: 5,
1072
+ borderRadius: 3,
1073
+ backgroundColor: "rgba(0, 0, 0, 0.2)"
1074
+ }
1075
+ });
1076
+
1077
+ // src/provider.tsx
1078
+ var import_jsx_runtime3 = require("react/jsx-runtime");
1079
+ var MoonPayContext = (0, import_react3.createContext)(null);
913
1080
  function MoonPayProvider({
914
1081
  sessionToken,
915
1082
  apiBaseUrl,
916
1083
  frameBaseUrl,
1084
+ theme,
917
1085
  children
918
1086
  }) {
919
- const [frameSlots, setFrameSlots] = (0, import_react2.useState)([]);
920
- const addSlot = (0, import_react2.useCallback)((slot) => {
1087
+ const [frameSlots, setFrameSlots] = (0, import_react3.useState)([]);
1088
+ const addSlot = (0, import_react3.useCallback)((slot) => {
921
1089
  setFrameSlots((prev) => [...prev, slot]);
922
1090
  }, []);
923
- const removeSlot = (0, import_react2.useCallback)((id) => {
1091
+ const removeSlot = (0, import_react3.useCallback)((id) => {
924
1092
  setFrameSlots((prev) => prev.filter((s) => s.id !== id));
925
1093
  }, []);
926
- const coreRef = (0, import_react2.useRef)(null);
1094
+ const coreRef = (0, import_react3.useRef)(null);
927
1095
  if (!coreRef.current) {
928
1096
  coreRef.current = (0, import_platform_sdk_core3.createClientCore)({
929
1097
  apiBaseUrl,
@@ -932,33 +1100,31 @@ function MoonPayProvider({
932
1100
  });
933
1101
  }
934
1102
  const core = coreRef.current;
935
- const client = (0, import_react2.useMemo)(() => {
936
- const specCtx = { sessionToken, core, frameBaseUrl };
1103
+ const client = (0, import_react3.useMemo)(() => {
1104
+ const specCtx = { sessionToken, core, frameBaseUrl, theme };
937
1105
  return createRNClient({
938
1106
  mountSession: createMountSession(specCtx, { addSlot, removeSlot }),
939
1107
  core
940
1108
  });
941
- }, [sessionToken, frameBaseUrl, core, addSlot, removeSlot]);
942
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(MoonPayContext.Provider, { value: { client, sessionToken, core, frameBaseUrl }, children: [
1109
+ }, [sessionToken, frameBaseUrl, core, addSlot, removeSlot, theme?.appearance]);
1110
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(MoonPayContext.Provider, { value: { client, sessionToken, core, frameBaseUrl, theme }, children: [
943
1111
  children,
944
- frameSlots.filter((slot) => slot.hidden).map((slot) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MoonPayFrame, { transport: slot.transport, hidden: true }, slot.id)),
945
- frameSlots.filter((slot) => !slot.hidden).map((slot) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
946
- import_react_native2.Modal,
1112
+ frameSlots.filter((slot) => slot.hidden).map((slot) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(MoonPayFrame, { transport: slot.transport, hidden: true }, slot.id)),
1113
+ frameSlots.filter((slot) => !slot.hidden).map((slot) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1114
+ VisibleFrameSlotSheet,
947
1115
  {
948
- visible: true,
949
- animationType: "slide",
950
- onRequestClose: () => {
1116
+ slot,
1117
+ onClose: () => {
951
1118
  slot.dispose();
952
1119
  removeSlot(slot.id);
953
- },
954
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MoonPayFrame, { transport: slot.transport })
1120
+ }
955
1121
  },
956
1122
  slot.id
957
1123
  ))
958
1124
  ] });
959
1125
  }
960
1126
  function useMoonPayContext() {
961
- const ctx = (0, import_react2.useContext)(MoonPayContext);
1127
+ const ctx = (0, import_react3.useContext)(MoonPayContext);
962
1128
  if (!ctx) {
963
1129
  throw new Error("useMoonPay must be used within a <MoonPayProvider>");
964
1130
  }
@@ -969,7 +1135,7 @@ function useMoonPay() {
969
1135
  }
970
1136
 
971
1137
  // src/frame-view.tsx
972
- var import_jsx_runtime3 = require("react/jsx-runtime");
1138
+ var import_jsx_runtime4 = require("react/jsx-runtime");
973
1139
  function applyReactiveProps(spec, keys, props, applied, handle) {
974
1140
  for (const key of keys) {
975
1141
  const next = props[key];
@@ -986,12 +1152,12 @@ function MoonPayFrameView({
986
1152
  defaultStyle,
987
1153
  onEvent
988
1154
  }) {
989
- const { sessionToken, core, frameBaseUrl } = useMoonPayContext();
990
- const [transport, setTransport] = (0, import_react3.useState)(null);
991
- const handleRef = (0, import_react3.useRef)(null);
992
- const onEventRef = (0, import_react3.useRef)(onEvent);
1155
+ const { sessionToken, core, frameBaseUrl, theme } = useMoonPayContext();
1156
+ const [transport, setTransport] = (0, import_react4.useState)(null);
1157
+ const handleRef = (0, import_react4.useRef)(null);
1158
+ const onEventRef = (0, import_react4.useRef)(onEvent);
993
1159
  onEventRef.current = onEvent;
994
- const propsRef = (0, import_react3.useRef)(props);
1160
+ const propsRef = (0, import_react4.useRef)(props);
995
1161
  propsRef.current = props;
996
1162
  const reactiveKeys = Object.keys(spec.reactiveProps ?? {});
997
1163
  const mountProps = {};
@@ -1002,8 +1168,8 @@ function MoonPayFrameView({
1002
1168
  }
1003
1169
  const mountKey = JSON.stringify(mountProps);
1004
1170
  const liveKey = JSON.stringify(liveProps);
1005
- const appliedRef = (0, import_react3.useRef)({});
1006
- (0, import_react3.useEffect)(() => {
1171
+ const appliedRef = (0, import_react4.useRef)({});
1172
+ (0, import_react4.useEffect)(() => {
1007
1173
  let disposed = false;
1008
1174
  let session;
1009
1175
  const applied = {};
@@ -1012,7 +1178,11 @@ function MoonPayFrameView({
1012
1178
  }
1013
1179
  appliedRef.current = applied;
1014
1180
  try {
1015
- session = createFrameSession(spec, { sessionToken, core, frameBaseUrl }, propsRef.current);
1181
+ session = createFrameSession(
1182
+ spec,
1183
+ { sessionToken, core, frameBaseUrl, theme },
1184
+ propsRef.current
1185
+ );
1016
1186
  } catch (e) {
1017
1187
  onEventRef.current?.(
1018
1188
  spec.errorEvent(e instanceof Error ? e.message : "Failed to create frame")
@@ -1042,23 +1212,23 @@ function MoonPayFrameView({
1042
1212
  setTransport(null);
1043
1213
  };
1044
1214
  }, [mountKey, spec, sessionToken, core, frameBaseUrl]);
1045
- (0, import_react3.useEffect)(() => {
1215
+ (0, import_react4.useEffect)(() => {
1046
1216
  const handle = handleRef.current;
1047
1217
  if (!handle)
1048
1218
  return;
1049
1219
  applyReactiveProps(spec, reactiveKeys, propsRef.current, appliedRef.current, handle);
1050
1220
  }, [liveKey]);
1051
1221
  if (spec.hidden) {
1052
- return transport ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(MoonPayFrame, { transport, hidden: true }) : null;
1222
+ return transport ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(MoonPayFrame, { transport, hidden: true }) : null;
1053
1223
  }
1054
1224
  const resolvedStyle = { ...defaultStyle, ...style };
1055
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style: resolvedStyle, children: transport ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(MoonPayFrame, { transport }) : null });
1225
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native3.View, { style: resolvedStyle, children: transport ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(MoonPayFrame, { transport }) : null });
1056
1226
  }
1057
1227
 
1058
1228
  // src/components/add-card.tsx
1059
- var import_jsx_runtime4 = require("react/jsx-runtime");
1229
+ var import_jsx_runtime5 = require("react/jsx-runtime");
1060
1230
  function MoonPayAddCard({ onEvent, style }) {
1061
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1231
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1062
1232
  MoonPayFrameView,
1063
1233
  {
1064
1234
  spec: addCardSpec,
@@ -1071,13 +1241,13 @@ function MoonPayAddCard({ onEvent, style }) {
1071
1241
  }
1072
1242
 
1073
1243
  // src/components/apple-pay-button.tsx
1074
- var import_jsx_runtime5 = require("react/jsx-runtime");
1244
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1075
1245
  function MoonPayApplePayButton({
1076
1246
  quote,
1077
1247
  onEvent,
1078
1248
  style
1079
1249
  }) {
1080
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1250
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1081
1251
  MoonPayFrameView,
1082
1252
  {
1083
1253
  spec: applePaySpec,
@@ -1090,9 +1260,9 @@ function MoonPayApplePayButton({
1090
1260
  }
1091
1261
 
1092
1262
  // src/components/auth.tsx
1093
- var import_jsx_runtime6 = require("react/jsx-runtime");
1263
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1094
1264
  function MoonPayAuth({ onEvent, style }) {
1095
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1265
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1096
1266
  MoonPayFrameView,
1097
1267
  {
1098
1268
  spec: authSpec,
@@ -1105,9 +1275,9 @@ function MoonPayAuth({ onEvent, style }) {
1105
1275
  }
1106
1276
 
1107
1277
  // src/components/buy-button.tsx
1108
- var import_jsx_runtime7 = require("react/jsx-runtime");
1278
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1109
1279
  function MoonPayBuyButton({ quote, onEvent, style }) {
1110
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1280
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1111
1281
  MoonPayFrameView,
1112
1282
  {
1113
1283
  spec: buyButtonSpec,
@@ -1120,13 +1290,13 @@ function MoonPayBuyButton({ quote, onEvent, style }) {
1120
1290
  }
1121
1291
 
1122
1292
  // src/components/buy-frame.tsx
1123
- var import_jsx_runtime8 = require("react/jsx-runtime");
1293
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1124
1294
  function MoonPayBuyFrame({
1125
1295
  quote,
1126
1296
  externalTransactionId,
1127
1297
  onEvent
1128
1298
  }) {
1129
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1299
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1130
1300
  MoonPayFrameView,
1131
1301
  {
1132
1302
  spec: buySpec,
@@ -1138,9 +1308,9 @@ function MoonPayBuyFrame({
1138
1308
  }
1139
1309
 
1140
1310
  // src/components/challenge.tsx
1141
- var import_jsx_runtime9 = require("react/jsx-runtime");
1311
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1142
1312
  function MoonPayChallenge({ url, onEvent, style }) {
1143
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1313
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1144
1314
  MoonPayFrameView,
1145
1315
  {
1146
1316
  spec: challengeSpec,
@@ -1153,9 +1323,9 @@ function MoonPayChallenge({ url, onEvent, style }) {
1153
1323
  }
1154
1324
 
1155
1325
  // src/components/connect.tsx
1156
- var import_jsx_runtime10 = require("react/jsx-runtime");
1326
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1157
1327
  function MoonPayConnect({ theme, onEvent, style }) {
1158
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1328
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1159
1329
  MoonPayFrameView,
1160
1330
  {
1161
1331
  spec: connectSpec,
@@ -1168,12 +1338,12 @@ function MoonPayConnect({ theme, onEvent, style }) {
1168
1338
  }
1169
1339
 
1170
1340
  // src/components/connection-check.tsx
1171
- var import_jsx_runtime11 = require("react/jsx-runtime");
1341
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1172
1342
  function MoonPayConnectionCheck({
1173
1343
  skipKyc,
1174
1344
  onEvent
1175
1345
  }) {
1176
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1346
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1177
1347
  MoonPayFrameView,
1178
1348
  {
1179
1349
  spec: connectionCheckSpec,
@@ -1185,20 +1355,20 @@ function MoonPayConnectionCheck({
1185
1355
  }
1186
1356
 
1187
1357
  // src/components/connection-reset.tsx
1188
- var import_jsx_runtime12 = require("react/jsx-runtime");
1358
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1189
1359
  function MoonPayConnectionReset({ onEvent }) {
1190
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MoonPayFrameView, { spec: connectionResetSpec, props: {}, defaultStyle: {}, onEvent });
1360
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MoonPayFrameView, { spec: connectionResetSpec, props: {}, defaultStyle: {}, onEvent });
1191
1361
  }
1192
1362
 
1193
1363
  // src/components/google-pay-button.tsx
1194
- var import_jsx_runtime13 = require("react/jsx-runtime");
1364
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1195
1365
  function MoonPayGooglePayButton({
1196
1366
  quote,
1197
1367
  externalTransactionId,
1198
1368
  onEvent,
1199
1369
  style
1200
1370
  }) {
1201
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1371
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1202
1372
  MoonPayFrameView,
1203
1373
  {
1204
1374
  spec: googlePaySpec,
@@ -1211,9 +1381,9 @@ function MoonPayGooglePayButton({
1211
1381
  }
1212
1382
 
1213
1383
  // src/components/widget.tsx
1214
- var import_jsx_runtime14 = require("react/jsx-runtime");
1384
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1215
1385
  function MoonPayWidget({ quote, onEvent, style }) {
1216
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1386
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1217
1387
  MoonPayFrameView,
1218
1388
  {
1219
1389
  spec: widgetSpec,