@coincircuit/checkout 0.3.0 → 0.4.1

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.
@@ -43,11 +43,10 @@ function createMessageListener(allowedOrigin, handlers) {
43
43
  }
44
44
 
45
45
  // src/utils.ts
46
- var DEFAULT_BASE_URL = "http://localhost:3002";
46
+ var DEFAULT_BASE_URL = "https://checkout.coincircuit.io";
47
47
  var ALLOWED_BASE_URLS = [
48
48
  "https://checkout.coincircuit.io",
49
- "https://sandbox-checkout.coincircuit.io",
50
- "http://localhost:3002"
49
+ "https://sandbox-checkout.coincircuit.io"
51
50
  ];
52
51
  function validateBaseUrl(url) {
53
52
  const normalized = url.replace(/\/+$/, "");
@@ -305,7 +304,7 @@ var CoinCircuitCheckout = class {
305
304
  "Checkout failed to load."
306
305
  );
307
306
  this.close();
308
- }, 15e3);
307
+ }, 3e4);
309
308
  iframe.addEventListener("error", () => {
310
309
  if (this.loadTimeout) clearTimeout(this.loadTimeout);
311
310
  console.error(`[CoinCircuit] iframe error after ${Math.round(performance.now() - this.openedAt)}ms`);
package/dist/index.cjs CHANGED
@@ -74,11 +74,10 @@ function createMessageListener(allowedOrigin, handlers) {
74
74
  }
75
75
 
76
76
  // src/utils.ts
77
- var DEFAULT_BASE_URL = "http://localhost:3002";
77
+ var DEFAULT_BASE_URL = "https://checkout.coincircuit.io";
78
78
  var ALLOWED_BASE_URLS = [
79
79
  "https://checkout.coincircuit.io",
80
- "https://sandbox-checkout.coincircuit.io",
81
- "http://localhost:3002"
80
+ "https://sandbox-checkout.coincircuit.io"
82
81
  ];
83
82
  function validateBaseUrl(url) {
84
83
  const normalized = url.replace(/\/+$/, "");
@@ -336,7 +335,7 @@ var CoinCircuitCheckout = class {
336
335
  "Checkout failed to load."
337
336
  );
338
337
  this.close();
339
- }, 15e3);
338
+ }, 3e4);
340
339
  iframe.addEventListener("error", () => {
341
340
  if (this.loadTimeout) clearTimeout(this.loadTimeout);
342
341
  console.error(`[CoinCircuit] iframe error after ${Math.round(performance.now() - this.openedAt)}ms`);
package/dist/index.d.cts CHANGED
@@ -79,7 +79,7 @@ interface CheckoutEventHandlers {
79
79
  */
80
80
  declare function createMessageListener(allowedOrigin: string, handlers: CheckoutEventHandlers): () => void;
81
81
 
82
- declare const DEFAULT_BASE_URL = "http://localhost:3002";
82
+ declare const DEFAULT_BASE_URL = "https://checkout.coincircuit.io";
83
83
  /**
84
84
  * Builds the checkout URL with embed flag.
85
85
  */
package/dist/index.d.ts CHANGED
@@ -79,7 +79,7 @@ interface CheckoutEventHandlers {
79
79
  */
80
80
  declare function createMessageListener(allowedOrigin: string, handlers: CheckoutEventHandlers): () => void;
81
81
 
82
- declare const DEFAULT_BASE_URL = "http://localhost:3002";
82
+ declare const DEFAULT_BASE_URL = "https://checkout.coincircuit.io";
83
83
  /**
84
84
  * Builds the checkout URL with embed flag.
85
85
  */
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  buildCheckoutUrl,
6
6
  createMessageListener,
7
7
  extractOrigin
8
- } from "./chunk-IC5IZ3JH.js";
8
+ } from "./chunk-CUKGHBBE.js";
9
9
  export {
10
10
  CHECKOUT_MESSAGE_TYPES,
11
11
  CoinCircuitCheckout,
package/dist/react.cjs CHANGED
@@ -70,11 +70,10 @@ function createMessageListener(allowedOrigin, handlers) {
70
70
  }
71
71
 
72
72
  // src/utils.ts
73
- var DEFAULT_BASE_URL = "http://localhost:3002";
73
+ var DEFAULT_BASE_URL = "https://checkout.coincircuit.io";
74
74
  var ALLOWED_BASE_URLS = [
75
75
  "https://checkout.coincircuit.io",
76
- "https://sandbox-checkout.coincircuit.io",
77
- "http://localhost:3002"
76
+ "https://sandbox-checkout.coincircuit.io"
78
77
  ];
79
78
  function validateBaseUrl(url) {
80
79
  const normalized = url.replace(/\/+$/, "");
@@ -332,7 +331,7 @@ var CoinCircuitCheckout = class {
332
331
  "Checkout failed to load."
333
332
  );
334
333
  this.close();
335
- }, 15e3);
334
+ }, 3e4);
336
335
  iframe.addEventListener("error", () => {
337
336
  if (this.loadTimeout) clearTimeout(this.loadTimeout);
338
337
  console.error(`[CoinCircuit] iframe error after ${Math.round(performance.now() - this.openedAt)}ms`);
package/dist/react.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CoinCircuitCheckout
3
- } from "./chunk-IC5IZ3JH.js";
3
+ } from "./chunk-CUKGHBBE.js";
4
4
 
5
5
  // src/react.ts
6
6
  import { useRef, useCallback, useEffect, createElement } from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coincircuit/checkout",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Embed CoinCircuit checkout in your site via iframe, with vanilla JS and React support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",