@paywithglide/glide-react 0.0.24 → 0.0.25

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/glide.js CHANGED
@@ -72,7 +72,7 @@ class F extends v {
72
72
  super(`${i.charAt(0).toUpperCase()}${i.slice(1).toLowerCase()} size (${t}) exceeds padding size (${e}).`, { name: "SizeExceedsPaddingSizeError" });
73
73
  }
74
74
  }
75
- function k(s, { dir: t, size: e = 32 } = {}) {
75
+ function E(s, { dir: t, size: e = 32 } = {}) {
76
76
  return typeof s == "string" ? te(s, { dir: t, size: e }) : se(s, { dir: t, size: e });
77
77
  }
78
78
  function te(s, { dir: t, size: e = 32 } = {}) {
@@ -126,14 +126,14 @@ function ne(s, t = {}) {
126
126
  }
127
127
  function ae(s, t = {}) {
128
128
  const e = `0x${Number(s)}`;
129
- return typeof t.size == "number" ? (V(e, { size: t.size }), k(e, { size: t.size })) : e;
129
+ return typeof t.size == "number" ? (V(e, { size: t.size }), E(e, { size: t.size })) : e;
130
130
  }
131
131
  function q(s, t = {}) {
132
132
  let e = "";
133
133
  for (let r = 0; r < s.length; r++)
134
134
  e += oe[s[r]];
135
135
  const i = `0x${e}`;
136
- return typeof t.size == "number" ? (V(i, { size: t.size }), k(i, { dir: "right", size: t.size })) : i;
136
+ return typeof t.size == "number" ? (V(i, { size: t.size }), E(i, { dir: "right", size: t.size })) : i;
137
137
  }
138
138
  function ce(s, t = {}) {
139
139
  const { signed: e, size: i } = t, r = BigInt(s);
@@ -151,7 +151,7 @@ function ce(s, t = {}) {
151
151
  });
152
152
  }
153
153
  const a = `0x${(e && r < 0 ? (1n << BigInt(i * 8)) + BigInt(r) : r).toString(16)}`;
154
- return i ? k(a, { size: i }) : a;
154
+ return i ? E(a, { size: i }) : a;
155
155
  }
156
156
  const de = /* @__PURE__ */ new TextEncoder();
157
157
  function le(s, t = {}) {
@@ -173,7 +173,7 @@ class S {
173
173
  }
174
174
  });
175
175
  I(this, "iframeEventHandler", async (t) => {
176
- var i, r, o, c, a, n, p, h, u, m, f, g, d, y, w, b, x, E, U, z, M, T, D, A, G, j, B, C, W, H, L, O;
176
+ var i, r, o, c, a, n, p, h, u, m, f, g, d, b, w, y, x, k, U, z, M, T, D, A, G, j, B, C, W, H, L, O;
177
177
  const e = t.data;
178
178
  switch (e.type) {
179
179
  case "sendInit": {
@@ -246,13 +246,13 @@ class S {
246
246
  break;
247
247
  }
248
248
  case "success":
249
- (y = (d = this.opts) == null ? void 0 : d.onSuccess) == null || y.call(d, e.hash);
249
+ (b = (d = this.opts) == null ? void 0 : d.onSuccess) == null || b.call(d, e.hash);
250
250
  break;
251
251
  case "close":
252
- this.removeIframe(), this.destroy(), (b = (w = this.opts) == null ? void 0 : w.onClose) == null || b.call(w);
252
+ this.removeIframe(), this.destroy(), (y = (w = this.opts) == null ? void 0 : w.onClose) == null || y.call(w);
253
253
  break;
254
254
  case "setMode":
255
- (E = (x = this.opts) == null ? void 0 : x.onSetMode) == null || E.call(x, e.mode);
255
+ (k = (x = this.opts) == null ? void 0 : x.onSetMode) == null || k.call(x, e.mode);
256
256
  break;
257
257
  case "switchChain":
258
258
  if (!this.opts.walletProvider)
@@ -406,10 +406,10 @@ const ue = ({
406
406
  onClose: f,
407
407
  autoCloseOnSuccess: g,
408
408
  popupsBlocked: d,
409
- baseUrl: y,
409
+ baseUrl: b,
410
410
  debug: w
411
411
  }) => {
412
- const b = P(() => new S({
412
+ const y = P(() => new S({
413
413
  app: s,
414
414
  recipient: t,
415
415
  preferGaslessPayment: e,
@@ -426,7 +426,7 @@ const ue = ({
426
426
  onClose: f,
427
427
  autoCloseOnSuccess: g,
428
428
  popupsBlocked: d,
429
- baseUrl: y,
429
+ baseUrl: b,
430
430
  debug: w
431
431
  }), [
432
432
  s,
@@ -445,13 +445,13 @@ const ue = ({
445
445
  f,
446
446
  g,
447
447
  d,
448
- y,
448
+ b,
449
449
  w
450
450
  ]);
451
451
  return {
452
- openGlideDeposit: b.open,
453
- externalUrl: b.externalUrl,
454
- opts: b.opts
452
+ openGlideDeposit: y.open,
453
+ externalUrl: y.externalUrl,
454
+ opts: y.opts
455
455
  };
456
456
  }, me = ({
457
457
  app: s,
@@ -470,10 +470,10 @@ const ue = ({
470
470
  onClose: f,
471
471
  autoCloseOnSuccess: g,
472
472
  popupsBlocked: d,
473
- baseUrl: y,
473
+ baseUrl: b,
474
474
  debug: w
475
475
  }) => {
476
- const b = P(() => new S({
476
+ const y = P(() => new S({
477
477
  app: s,
478
478
  preferGaslessPayment: t,
479
479
  excludeChainIds: e,
@@ -491,7 +491,7 @@ const ue = ({
491
491
  onClose: f,
492
492
  autoCloseOnSuccess: g,
493
493
  popupsBlocked: d,
494
- baseUrl: y,
494
+ baseUrl: b,
495
495
  debug: w
496
496
  }), [
497
497
  s,
@@ -510,13 +510,13 @@ const ue = ({
510
510
  f,
511
511
  g,
512
512
  d,
513
- y,
513
+ b,
514
514
  w
515
515
  ]);
516
516
  return {
517
- openGlidePay: b.open,
518
- externalUrl: b.externalUrl,
519
- opts: b.opts
517
+ openGlidePay: y.open,
518
+ externalUrl: y.externalUrl,
519
+ opts: y.opts
520
520
  };
521
521
  }, fe = ({
522
522
  app: s,
@@ -534,7 +534,9 @@ const ue = ({
534
534
  onSuccess: m,
535
535
  onClose: f,
536
536
  autoCloseOnSuccess: g,
537
- baseUrl: d
537
+ popupsBlocked: d,
538
+ baseUrl: b,
539
+ debug: w
538
540
  }) => {
539
541
  const y = P(() => new S({
540
542
  app: s,
@@ -553,7 +555,9 @@ const ue = ({
553
555
  onSuccess: m,
554
556
  onClose: f,
555
557
  autoCloseOnSuccess: g,
556
- baseUrl: d
558
+ popupsBlocked: d,
559
+ baseUrl: b,
560
+ debug: w
557
561
  }), [
558
562
  s,
559
563
  t,
@@ -570,7 +574,9 @@ const ue = ({
570
574
  m,
571
575
  f,
572
576
  g,
573
- d
577
+ d,
578
+ b,
579
+ w
574
580
  ]);
575
581
  return {
576
582
  openGlideCall: y.open,
@@ -25,9 +25,11 @@ interface UseGlideCallProps {
25
25
  onSuccess?: (hash: Hex) => void;
26
26
  onClose?: () => void;
27
27
  autoCloseOnSuccess?: boolean;
28
+ popupsBlocked?: boolean;
28
29
  baseUrl?: string;
30
+ debug?: boolean;
29
31
  }
30
- export declare const useGlideCall: ({ app, evm, approval, preferGaslessPayment, excludeChainIds, excludeCurrencyTiers, excludeFundingSources, sessionMetadata, theme, walletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, baseUrl, }: UseGlideCallProps) => {
32
+ export declare const useGlideCall: ({ app, evm, approval, preferGaslessPayment, excludeChainIds, excludeCurrencyTiers, excludeFundingSources, sessionMetadata, theme, walletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, popupsBlocked, baseUrl, debug, }: UseGlideCallProps) => {
31
33
  openGlideCall: () => void;
32
34
  externalUrl: string;
33
35
  opts: import('./GlideDeposit.ts').GlideDepositOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paywithglide/glide-react",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"