@blotoutio/providers-blotout-wallet-sdk 0.66.0 → 0.67.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/providers-blotout-wallet-sdk",
3
- "version": "0.66.0",
3
+ "version": "0.67.1",
4
4
  "description": "Blotout Wallet SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",
@@ -16,15 +16,20 @@
16
16
  "import": "./index.mjs",
17
17
  "default": "./index.js"
18
18
  },
19
+ "./core.js": {
20
+ "require": "./core.cjs.js",
21
+ "import": "./core.mjs",
22
+ "default": "./core.js"
23
+ },
24
+ "./ui.js": {
25
+ "require": "./ui.cjs.js",
26
+ "import": "./ui.mjs",
27
+ "default": "./ui.js"
28
+ },
19
29
  "./stores/shopify/index.js": {
20
30
  "require": "./stores/shopify/index.cjs.js",
21
31
  "import": "./stores/shopify/index.mjs",
22
32
  "default": "./stores/shopify/index.js"
23
- },
24
- "./stores/demo/index.js": {
25
- "require": "./stores/demo/index.cjs.js",
26
- "import": "./stores/demo/index.mjs",
27
- "default": "./stores/demo/index.js"
28
33
  }
29
34
  },
30
35
  "repository": {
@@ -32,11 +37,17 @@
32
37
  "url": "git+https://github.com/blotoutio/edgetag-sdk.git"
33
38
  },
34
39
  "files": [
40
+ "package.json",
41
+ "README.md",
35
42
  "index.js",
36
43
  "index.cjs.js",
37
44
  "index.mjs",
38
- "package.json",
39
- "README.md",
45
+ "core.js",
46
+ "core.cjs.js",
47
+ "core.mjs",
48
+ "ui.js",
49
+ "ui.cjs.js",
50
+ "ui.mjs",
40
51
  "stores/shopify/index.js",
41
52
  "stores/shopify/index.cjs.js",
42
53
  "stores/shopify/index.mjs"
@@ -39,9 +39,11 @@ const delay = (n, resolvedValue) => new Promise((resolve) => setTimeout(() => re
39
39
  const cartTokenCookie = 'cart';
40
40
  const cartTokenTwoCookie = 'cart2';
41
41
 
42
- var _a;
42
+ var _a$1;
43
43
  const registryKey = Symbol.for('blotout-wallet');
44
- (_a = window[registryKey]) !== null && _a !== void 0 ? _a : (window[registryKey] = {});
44
+ if (typeof window != 'undefined') {
45
+ (_a$1 = window[registryKey]) !== null && _a$1 !== void 0 ? _a$1 : (window[registryKey] = {});
46
+ }
45
47
 
46
48
  const getCookieValue = (key) => {
47
49
  var _a;
@@ -79,7 +81,8 @@ const parseCookies = (cookie) => {
79
81
  }));
80
82
  };
81
83
 
82
- // eslint-disable-next-line @nx/enforce-module-boundaries
84
+ var _a, _b;
85
+ var _c;
83
86
  const MAX_RETRY_COUNT = 3;
84
87
  const RETRY_DELAY = 500;
85
88
  const ERROR_PATTERNS = {
@@ -161,4 +164,8 @@ const createShopApi = (fetchOverride = window.fetch) => ({
161
164
  : null;
162
165
  },
163
166
  });
164
- window[registryKey].storeAPIFactory = createShopApi;
167
+ if (typeof window != 'undefined') {
168
+ (_a = window[registryKey]) !== null && _a !== void 0 ? _a : (window[registryKey] = {});
169
+ // if a custom implementation is already present, don't override it
170
+ (_b = (_c = window[registryKey]).storeAPIFactory) !== null && _b !== void 0 ? _b : (_c.storeAPIFactory = createShopApi);
171
+ }
@@ -40,9 +40,11 @@
40
40
  const cartTokenCookie = 'cart';
41
41
  const cartTokenTwoCookie = 'cart2';
42
42
 
43
- var _a;
43
+ var _a$1;
44
44
  const registryKey = Symbol.for('blotout-wallet');
45
- (_a = window[registryKey]) !== null && _a !== void 0 ? _a : (window[registryKey] = {});
45
+ if (typeof window != 'undefined') {
46
+ (_a$1 = window[registryKey]) !== null && _a$1 !== void 0 ? _a$1 : (window[registryKey] = {});
47
+ }
46
48
 
47
49
  const getCookieValue = (key) => {
48
50
  var _a;
@@ -80,7 +82,8 @@
80
82
  }));
81
83
  };
82
84
 
83
- // eslint-disable-next-line @nx/enforce-module-boundaries
85
+ var _a, _b;
86
+ var _c;
84
87
  const MAX_RETRY_COUNT = 3;
85
88
  const RETRY_DELAY = 500;
86
89
  const ERROR_PATTERNS = {
@@ -162,6 +165,10 @@
162
165
  : null;
163
166
  },
164
167
  });
165
- window[registryKey].storeAPIFactory = createShopApi;
168
+ if (typeof window != 'undefined') {
169
+ (_a = window[registryKey]) !== null && _a !== void 0 ? _a : (window[registryKey] = {});
170
+ // if a custom implementation is already present, don't override it
171
+ (_b = (_c = window[registryKey]).storeAPIFactory) !== null && _b !== void 0 ? _b : (_c.storeAPIFactory = createShopApi);
172
+ }
166
173
 
167
174
  })();
@@ -37,9 +37,11 @@ const delay = (n, resolvedValue) => new Promise((resolve) => setTimeout(() => re
37
37
  const cartTokenCookie = 'cart';
38
38
  const cartTokenTwoCookie = 'cart2';
39
39
 
40
- var _a;
40
+ var _a$1;
41
41
  const registryKey = Symbol.for('blotout-wallet');
42
- (_a = window[registryKey]) !== null && _a !== void 0 ? _a : (window[registryKey] = {});
42
+ if (typeof window != 'undefined') {
43
+ (_a$1 = window[registryKey]) !== null && _a$1 !== void 0 ? _a$1 : (window[registryKey] = {});
44
+ }
43
45
 
44
46
  const getCookieValue = (key) => {
45
47
  var _a;
@@ -77,7 +79,8 @@ const parseCookies = (cookie) => {
77
79
  }));
78
80
  };
79
81
 
80
- // eslint-disable-next-line @nx/enforce-module-boundaries
82
+ var _a, _b;
83
+ var _c;
81
84
  const MAX_RETRY_COUNT = 3;
82
85
  const RETRY_DELAY = 500;
83
86
  const ERROR_PATTERNS = {
@@ -159,4 +162,8 @@ const createShopApi = (fetchOverride = window.fetch) => ({
159
162
  : null;
160
163
  },
161
164
  });
162
- window[registryKey].storeAPIFactory = createShopApi;
165
+ if (typeof window != 'undefined') {
166
+ (_a = window[registryKey]) !== null && _a !== void 0 ? _a : (window[registryKey] = {});
167
+ // if a custom implementation is already present, don't override it
168
+ (_b = (_c = window[registryKey]).storeAPIFactory) !== null && _b !== void 0 ? _b : (_c.storeAPIFactory = createShopApi);
169
+ }