@dynamic-labs/utils 4.9.2-preview.0 → 4.9.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
 
2
- ### [4.9.2-preview.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.1...v4.9.2-preview.0) (2025-03-11)
2
+ ### [4.9.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.1...v4.9.2) (2025-03-12)
3
+
4
+
5
+ ### Features
6
+
7
+ * **QNTM-2951:** update sdk styles ([#8214](https://github.com/dynamic-labs/dynamic-auth/issues/8214)) ([45cefa8](https://github.com/dynamic-labs/dynamic-auth/commit/45cefa82bdaad769c63ffeab4fb48f88ac855461))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * embedded widget race condition that would show both embedded and non-embedded widgets at the same time ([#8208](https://github.com/dynamic-labs/dynamic-auth/issues/8208)) ([031fb77](https://github.com/dynamic-labs/dynamic-auth/commit/031fb775c10daa383bf56ab7ba5fa4cf6ae9451c))
13
+ * **iframe-setup:** require the initial parent url when using an iframe ([#8268](https://github.com/dynamic-labs/dynamic-auth/issues/8268)) ([258e8a1](https://github.com/dynamic-labs/dynamic-auth/commit/258e8a128c31b8695518f9943bc74de9fce63196))
14
+ * improve WalletConnect experience ([#8201](https://github.com/dynamic-labs/dynamic-auth/issues/8201)) ([a09b16d](https://github.com/dynamic-labs/dynamic-auth/commit/a09b16de2ccd3cbba89f70a8ded4b7656f09f807)), closes [#8202](https://github.com/dynamic-labs/dynamic-auth/issues/8202) [#8207](https://github.com/dynamic-labs/dynamic-auth/issues/8207)
15
+ * prevent closing modal when mfa view is required ([#8156](https://github.com/dynamic-labs/dynamic-auth/issues/8156)) ([c34b245](https://github.com/dynamic-labs/dynamic-auth/commit/c34b24509e3f96046e72150b055d9c820f98706f))
3
16
 
4
17
  ### [4.9.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.0...v4.9.1) (2025-03-11)
5
18
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.9.2-preview.0";
6
+ var version = "4.9.2";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.9.2-preview.0";
2
+ var version = "4.9.2";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/utils",
3
- "version": "4.9.2-preview.0",
3
+ "version": "4.9.2",
4
4
  "description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
- "@dynamic-labs/sdk-api-core": "0.0.638",
21
+ "@dynamic-labs/sdk-api-core": "0.0.640",
22
22
  "tldts": "6.0.16",
23
- "@dynamic-labs/assert-package-version": "4.9.2-preview.0",
24
- "@dynamic-labs/logger": "4.9.2-preview.0",
25
- "@dynamic-labs/types": "4.9.2-preview.0",
23
+ "@dynamic-labs/assert-package-version": "4.9.2",
24
+ "@dynamic-labs/logger": "4.9.2",
25
+ "@dynamic-labs/types": "4.9.2",
26
26
  "buffer": "6.0.3",
27
27
  "eventemitter3": "5.0.1"
28
28
  },
@@ -8,6 +8,8 @@ var getInitialParentURL = require('./utils/getInitialParentURL/getInitialParentU
8
8
  var setupPlatformEventsService = require('./utils/setupPlatformEventsService/setupPlatformEventsService.cjs');
9
9
 
10
10
  const setupInsideIframe = () => {
11
+ if (typeof window === 'undefined')
12
+ return;
11
13
  // Get the initial parent URL
12
14
  const initialParentURL = getInitialParentURL.getInitialParentURL();
13
15
  // Setup services
@@ -4,6 +4,8 @@ import { getInitialParentURL } from './utils/getInitialParentURL/getInitialParen
4
4
  import { setupPlatformEventsService } from './utils/setupPlatformEventsService/setupPlatformEventsService.js';
5
5
 
6
6
  const setupInsideIframe = () => {
7
+ if (typeof window === 'undefined')
8
+ return;
7
9
  // Get the initial parent URL
8
10
  const initialParentURL = getInitialParentURL();
9
11
  // Setup services
@@ -3,10 +3,27 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
+ const missingParentURLMessage = `Parent URL is required
7
+
8
+ You must pass the parent URL to the iframe using the following query parameter:
9
+
10
+ ?initial-parent-url=<encoded-parent-url>
11
+
12
+ Example:
13
+
14
+ const iframeUrl = new URL('https://my-iframe.com');
15
+
16
+ iframeUrl.searchParams.set('initial-parent-url', window.location.href);
17
+
18
+ <iframe src="\${iframeUrl.toString()}"></iframe>
19
+
20
+ For more information, see the documentation:
21
+ https://npmjs.com/package/@dynamic-labs/iframe-setup
22
+ `;
6
23
  const getInitialParentURL = () => {
7
24
  const initialParentURL = new URLSearchParams(window.location.search).get('initial-parent-url');
8
25
  if (!initialParentURL) {
9
- throw new Error('Parent URL is required');
26
+ throw new Error(missingParentURLMessage);
10
27
  }
11
28
  return new URL(decodeURIComponent(initialParentURL));
12
29
  };
@@ -1,8 +1,25 @@
1
1
  'use client'
2
+ const missingParentURLMessage = `Parent URL is required
3
+
4
+ You must pass the parent URL to the iframe using the following query parameter:
5
+
6
+ ?initial-parent-url=<encoded-parent-url>
7
+
8
+ Example:
9
+
10
+ const iframeUrl = new URL('https://my-iframe.com');
11
+
12
+ iframeUrl.searchParams.set('initial-parent-url', window.location.href);
13
+
14
+ <iframe src="\${iframeUrl.toString()}"></iframe>
15
+
16
+ For more information, see the documentation:
17
+ https://npmjs.com/package/@dynamic-labs/iframe-setup
18
+ `;
2
19
  const getInitialParentURL = () => {
3
20
  const initialParentURL = new URLSearchParams(window.location.search).get('initial-parent-url');
4
21
  if (!initialParentURL) {
5
- throw new Error('Parent URL is required');
22
+ throw new Error(missingParentURLMessage);
6
23
  }
7
24
  return new URL(decodeURIComponent(initialParentURL));
8
25
  };