mainstack-payments 2.0.9 → 2.1.9

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,5 +1,5 @@
1
1
  import { jsxs as i, jsx as a } from "react/jsx-runtime";
2
- import { u as z, a as H, v as M, b as N, c as B, E as R, C as $ } from "./index-DSWwVekW.js";
2
+ import { u as z, a as H, v as M, b as N, c as B, E as R, C as $ } from "./index-Cw2Ampzx.js";
3
3
  import { toast as w, BodyText as j, ChevronRightIcon as k } from "mainstack-design-system";
4
4
  import { u as V } from "./payments-B3Hm80pK.js";
5
5
  import { memo as Z, useState as D, useCallback as L } from "react";
@@ -1,5 +1,5 @@
1
1
  import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
- import { u as S, a as z, C as M, v as N, b as $, c as j, E as B } from "./index-DSWwVekW.js";
2
+ import { u as S, a as z, C as M, v as N, b as $, c as j, E as B } from "./index-Cw2Ampzx.js";
3
3
  import { BodyText as R, ChevronRightIcon as T, toast as h } from "mainstack-design-system";
4
4
  import { u as Z } from "./payments-B3Hm80pK.js";
5
5
  import { useState as k } from "react";
@@ -9113,7 +9113,7 @@ const Um = (e) => /* @__PURE__ */ p(
9113
9113
  },
9114
9114
  children: /* @__PURE__ */ s("div", { className: "mpl:overflow-hidden", children: a })
9115
9115
  }
9116
- ), jm = fa(() => Promise.resolve().then(() => qm)), Km = fa(() => Promise.resolve().then(() => np)), zm = fa(() => import("./CashAppPayment-C-wjlUU1.js")), Vm = fa(() => import("./CryptoPayments-LMf_zapd.js")), Hm = fa(() => Promise.resolve().then(() => Qm)), Zm = fa(
9116
+ ), jm = fa(() => Promise.resolve().then(() => qm)), Km = fa(() => Promise.resolve().then(() => np)), zm = fa(() => import("./CashAppPayment-Bky3IPBo.js")), Vm = fa(() => import("./CryptoPayments-BkVRR6Nl.js")), Hm = fa(() => Promise.resolve().then(() => Qm)), Zm = fa(
9117
9117
  () => Promise.resolve().then(() => op)
9118
9118
  ), Wm = fa(
9119
9119
  () => Promise.resolve().then(() => lp).then((e) => ({
@@ -9169,7 +9169,7 @@ const Um = (e) => /* @__PURE__ */ p(
9169
9169
  ip: ve,
9170
9170
  shouldApplyTax: de,
9171
9171
  paymentModel: be = "default",
9172
- cryptoRedirectUrl: Y,
9172
+ walletRedirectUrl: Y,
9173
9173
  isFreeTrial: Te,
9174
9174
  itemsList: ce,
9175
9175
  isPowerUser: Be,
@@ -1,4 +1,4 @@
1
- import { d as e, e as t, S as n, M as y, f as P, P as m, g as o, h as r, W as u, c as i, b as c, i as l, j as d, k, u as C, a as M, l as h, m as F } from "./index-DSWwVekW.js";
1
+ import { d as e, e as t, S as n, M as y, f as P, P as m, g as o, h as r, W as u, c as i, b as c, i as l, j as d, k, u as C, a as M, l as h, m as F } from "./index-Cw2Ampzx.js";
2
2
  export {
3
3
  e as CheckoutForm,
4
4
  t as ContactForm,
@@ -78,14 +78,20 @@ type TCustomizations = {
78
78
  type TContactFields = {
79
79
  phoneNumberRequired: boolean;
80
80
  };
81
- type TCryptoPaymentConfig = {
81
+ type TWalletPaymentConfig = {
82
+ userAllowsCryptoPayment: boolean;
83
+ userAllowsWalletPayment: boolean;
84
+ walletRedirectUrl: string;
85
+ } | {
82
86
  userAllowsCryptoPayment: true;
83
- cryptoRedirectUrl: string;
87
+ userAllowsWalletPayment: true;
88
+ walletRedirectUrl: string;
84
89
  } | {
85
90
  userAllowsCryptoPayment: false;
86
- cryptoRedirectUrl?: string;
91
+ userAllowsWalletPayment: false;
92
+ walletRedirectUrl?: string;
87
93
  };
88
- type TPaymentConfig = TCryptoPaymentConfig & {
94
+ type TPaymentConfig = TWalletPaymentConfig & {
89
95
  currency: string;
90
96
  amount: number;
91
97
  metadata: TClientMetadata;
@@ -97,7 +103,6 @@ type TPaymentConfig = TCryptoPaymentConfig & {
97
103
  productBaseUrl: string;
98
104
  feeBaseUrl: string;
99
105
  accountId: string;
100
- userAllowsWalletPayment: boolean;
101
106
  userAllowsCardPayment: boolean;
102
107
  merchantBearsTax?: boolean;
103
108
  STRIPE_SECRET_KEY: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mainstack-payments",
3
3
  "type": "module",
4
- "version": "2.0.9",
4
+ "version": "2.1.9",
5
5
  "main": "build/mainstack-payments.js",
6
6
  "types": "build/src/index.d.ts",
7
7
  "style": "build/index.css",