@intlayer/editor-react 5.1.3 → 5.1.4
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/cjs/useCrossFrameMessageListener.cjs +19 -1
- package/dist/cjs/useCrossFrameMessageListener.cjs.map +1 -1
- package/dist/esm/useCrossFrameMessageListener.mjs +19 -1
- package/dist/esm/useCrossFrameMessageListener.mjs.map +1 -1
- package/dist/types/useCrossFrameMessageListener.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -24,6 +24,24 @@ __export(useCrossFrameMessageListener_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(useCrossFrameMessageListener_exports);
|
|
25
25
|
var import_react = require("react");
|
|
26
26
|
var import_CommunicatorContext = require('./CommunicatorContext.cjs');
|
|
27
|
+
const compareUrls = (url1, url2) => {
|
|
28
|
+
try {
|
|
29
|
+
const parsedUrl1 = new URL(url1);
|
|
30
|
+
const parsedUrl2 = new URL(url2);
|
|
31
|
+
if (parsedUrl1.protocol !== parsedUrl2.protocol || parsedUrl1.hostname !== parsedUrl2.hostname || parsedUrl1.port !== parsedUrl2.port) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
const path1 = parsedUrl1.pathname.replace(/\/$/, "");
|
|
35
|
+
const path2 = parsedUrl2.pathname.replace(/\/$/, "");
|
|
36
|
+
if (path1 !== "" && path2 !== "" && path1 !== path2) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
return true;
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error("Invalid URL(s)", error);
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
27
45
|
const useCrossFrameMessageListener = (key, onEventTriggered) => {
|
|
28
46
|
const { allowedOrigins, postMessage, senderId } = (0, import_CommunicatorContext.useCommunicator)();
|
|
29
47
|
(0, import_react.useEffect)(() => {
|
|
@@ -32,7 +50,7 @@ const useCrossFrameMessageListener = (key, onEventTriggered) => {
|
|
|
32
50
|
const { type, data, senderId: msgSenderId } = event.data;
|
|
33
51
|
if (type !== key) return;
|
|
34
52
|
if (msgSenderId === senderId) return;
|
|
35
|
-
if (typeof allowedOrigins === "undefined" || allowedOrigins?.
|
|
53
|
+
if (typeof allowedOrigins === "undefined" || allowedOrigins?.some((url) => compareUrls(url, event.origin)) || allowedOrigins?.includes("*")) {
|
|
36
54
|
onEventTriggered(data);
|
|
37
55
|
}
|
|
38
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/useCrossFrameMessageListener.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { useCommunicator } from './CommunicatorContext';\nimport { type MessageKey } from './messageKey';\n\n/**\n * useCrossFrameMessageListener\n *\n * This React hook listens for messages sent via the `postMessage` API and triggers a callback\n * whenever a message of the specified type (`key`) is received. It is useful for synchronizing\n * state or events across different windows, iframes, or contexts.\n *\n * @template S - The type of the data payload in the message.\n * @param {`${MessageKey}` | `${MessageKey}/post` | `${MessageKey}/get`} key - A unique identifier for the message type to listen for.\n * @param {(data: S) => void} [onEventTriggered] - A callback function triggered when a message\n * with the specified key is received. The callback receives the message data as its argument.\n *\n * @returns {{ postMessage: (data: S) => void }} An object containing a `postMessage` function\n * that allows broadcasting messages with the specified key and data.\n */\nexport const useCrossFrameMessageListener = <S,>(\n key: `${MessageKey}` | `${MessageKey}/post` | `${MessageKey}/get`,\n onEventTriggered?: (data: S) => void\n) => {\n const { allowedOrigins, postMessage, senderId } = useCommunicator();\n\n useEffect(() => {\n if (onEventTriggered) {\n /**\n * Message handler to process incoming messages.\n *\n * - **Message Filtering:** Ensures only messages with the specified `key` are processed.\n * - **Origin Validation:** Checks that the origin of the message is within the allowed origins.\n *\n * @param {MessageEvent<{ type: string; data: S }>} event - The incoming message event object.\n */\n const handleMessage = (\n event: MessageEvent<{ type: string; data: S; senderId: string }>\n ) => {\n const { type, data, senderId: msgSenderId } = event.data;\n\n // Ignore messages that do not match the current key\n if (type !== key) return;\n\n // Ignore messages from myself\n if (msgSenderId === senderId) return;\n\n // Check if the message origin is allowed\n if (\n typeof allowedOrigins === 'undefined' ||\n allowedOrigins?.
|
|
1
|
+
{"version":3,"sources":["../../src/useCrossFrameMessageListener.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { useCommunicator } from './CommunicatorContext';\nimport { type MessageKey } from './messageKey';\n\n/**\n * Compare two URLs for equality.\n * This function is used to determine if a message originates from the same origin.\n *\n * ```js\n * // Example usage\n * console.log(compareUrls(\"http://localhost:5173/\", \"http://localhost:5173\")); // true\n * console.log(compareUrls(\"http://localhost:5173\", \"http://localhost:5173?myParam=true\")); // true\n * console.log(compareUrls(\"http://localhost:5173/subpath\", \"http://localhost:5173\")); // true\n * console.log(compareUrls(\"http://localhost:5172\", \"http://localhost:5173\")); // false\n * ```\n *\n * @param url1 - The first URL to compare.\n * @param url2 - The second URL to compare.\n * @returns Whether the two URLs are equal.\n */\nconst compareUrls = (url1: string, url2: string): boolean => {\n try {\n const parsedUrl1 = new URL(url1);\n const parsedUrl2 = new URL(url2);\n\n // Compare protocol, hostname, and port\n if (\n parsedUrl1.protocol !== parsedUrl2.protocol ||\n parsedUrl1.hostname !== parsedUrl2.hostname ||\n parsedUrl1.port !== parsedUrl2.port\n ) {\n return false;\n }\n\n // One URL should not have a subpath while the other does\n const path1 = parsedUrl1.pathname.replace(/\\/$/, ''); // Remove trailing slash\n const path2 = parsedUrl2.pathname.replace(/\\/$/, '');\n\n if (path1 !== '' && path2 !== '' && path1 !== path2) {\n return false;\n }\n\n return true;\n } catch (error) {\n console.error('Invalid URL(s)', error);\n return false;\n }\n};\n\n/**\n * useCrossFrameMessageListener\n *\n * This React hook listens for messages sent via the `postMessage` API and triggers a callback\n * whenever a message of the specified type (`key`) is received. It is useful for synchronizing\n * state or events across different windows, iframes, or contexts.\n *\n * @template S - The type of the data payload in the message.\n * @param {`${MessageKey}` | `${MessageKey}/post` | `${MessageKey}/get`} key - A unique identifier for the message type to listen for.\n * @param {(data: S) => void} [onEventTriggered] - A callback function triggered when a message\n * with the specified key is received. The callback receives the message data as its argument.\n *\n * @returns {{ postMessage: (data: S) => void }} An object containing a `postMessage` function\n * that allows broadcasting messages with the specified key and data.\n */\nexport const useCrossFrameMessageListener = <S,>(\n key: `${MessageKey}` | `${MessageKey}/post` | `${MessageKey}/get`,\n onEventTriggered?: (data: S) => void\n) => {\n const { allowedOrigins, postMessage, senderId } = useCommunicator();\n\n useEffect(() => {\n if (onEventTriggered) {\n /**\n * Message handler to process incoming messages.\n *\n * - **Message Filtering:** Ensures only messages with the specified `key` are processed.\n * - **Origin Validation:** Checks that the origin of the message is within the allowed origins.\n *\n * @param {MessageEvent<{ type: string; data: S }>} event - The incoming message event object.\n */\n const handleMessage = (\n event: MessageEvent<{ type: string; data: S; senderId: string }>\n ) => {\n const { type, data, senderId: msgSenderId } = event.data;\n\n // Ignore messages that do not match the current key\n if (type !== key) return;\n\n // Ignore messages from myself\n if (msgSenderId === senderId) return;\n\n // Check if the message origin is allowed\n if (\n typeof allowedOrigins === 'undefined' ||\n allowedOrigins?.some((url) => compareUrls(url, event.origin)) ||\n allowedOrigins?.includes('*')\n ) {\n // Update the local state with the received data\n onEventTriggered(data);\n }\n };\n\n window.addEventListener('message', handleMessage);\n\n // Clean up the event listener on unmount\n return () => window.removeEventListener('message', handleMessage);\n }\n }, [allowedOrigins, postMessage, senderId]);\n\n /**\n * A wrapper function around the `postMessage` function to broadcast messages efficiently.\n *\n * - **Encapsulation:** Ensures the `postMessage` function is scoped to the provided key.\n * - **Ease of Use:** Simplifies broadcasting messages with consistent type and format.\n *\n * @param {S} data - The data payload to include in the message.\n * @returns {void}\n */\n const postMessageWrapper: (data: S) => void = useCallback(\n (data) => {\n postMessage({ type: key, data, senderId });\n },\n [postMessage, key, senderId]\n );\n\n return useMemo(() => postMessageWrapper, [postMessageWrapper]);\n};\n"],"mappings":";;;;;;;;;;;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AS,CAAC;AAAA,IAC3C;AAAA,IACA,CAAC,aAAa,KAAK,QAAQ;AAAA,EAC7B;AAEA,aAAO,sBAAQ,MAAM,oBAAoB,CAAC,kBAAkB,CAAC;AAC/D;","names":[]}
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useCallback, useEffect, useMemo } from "react";
|
|
3
3
|
import { useCommunicator } from "./CommunicatorContext.mjs";
|
|
4
|
+
const compareUrls = (url1, url2) => {
|
|
5
|
+
try {
|
|
6
|
+
const parsedUrl1 = new URL(url1);
|
|
7
|
+
const parsedUrl2 = new URL(url2);
|
|
8
|
+
if (parsedUrl1.protocol !== parsedUrl2.protocol || parsedUrl1.hostname !== parsedUrl2.hostname || parsedUrl1.port !== parsedUrl2.port) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
const path1 = parsedUrl1.pathname.replace(/\/$/, "");
|
|
12
|
+
const path2 = parsedUrl2.pathname.replace(/\/$/, "");
|
|
13
|
+
if (path1 !== "" && path2 !== "" && path1 !== path2) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
return true;
|
|
17
|
+
} catch (error) {
|
|
18
|
+
console.error("Invalid URL(s)", error);
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
4
22
|
const useCrossFrameMessageListener = (key, onEventTriggered) => {
|
|
5
23
|
const { allowedOrigins, postMessage, senderId } = useCommunicator();
|
|
6
24
|
useEffect(() => {
|
|
@@ -9,7 +27,7 @@ const useCrossFrameMessageListener = (key, onEventTriggered) => {
|
|
|
9
27
|
const { type, data, senderId: msgSenderId } = event.data;
|
|
10
28
|
if (type !== key) return;
|
|
11
29
|
if (msgSenderId === senderId) return;
|
|
12
|
-
if (typeof allowedOrigins === "undefined" || allowedOrigins?.
|
|
30
|
+
if (typeof allowedOrigins === "undefined" || allowedOrigins?.some((url) => compareUrls(url, event.origin)) || allowedOrigins?.includes("*")) {
|
|
13
31
|
onEventTriggered(data);
|
|
14
32
|
}
|
|
15
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/useCrossFrameMessageListener.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { useCommunicator } from './CommunicatorContext';\nimport { type MessageKey } from './messageKey';\n\n/**\n * useCrossFrameMessageListener\n *\n * This React hook listens for messages sent via the `postMessage` API and triggers a callback\n * whenever a message of the specified type (`key`) is received. It is useful for synchronizing\n * state or events across different windows, iframes, or contexts.\n *\n * @template S - The type of the data payload in the message.\n * @param {`${MessageKey}` | `${MessageKey}/post` | `${MessageKey}/get`} key - A unique identifier for the message type to listen for.\n * @param {(data: S) => void} [onEventTriggered] - A callback function triggered when a message\n * with the specified key is received. The callback receives the message data as its argument.\n *\n * @returns {{ postMessage: (data: S) => void }} An object containing a `postMessage` function\n * that allows broadcasting messages with the specified key and data.\n */\nexport const useCrossFrameMessageListener = <S,>(\n key: `${MessageKey}` | `${MessageKey}/post` | `${MessageKey}/get`,\n onEventTriggered?: (data: S) => void\n) => {\n const { allowedOrigins, postMessage, senderId } = useCommunicator();\n\n useEffect(() => {\n if (onEventTriggered) {\n /**\n * Message handler to process incoming messages.\n *\n * - **Message Filtering:** Ensures only messages with the specified `key` are processed.\n * - **Origin Validation:** Checks that the origin of the message is within the allowed origins.\n *\n * @param {MessageEvent<{ type: string; data: S }>} event - The incoming message event object.\n */\n const handleMessage = (\n event: MessageEvent<{ type: string; data: S; senderId: string }>\n ) => {\n const { type, data, senderId: msgSenderId } = event.data;\n\n // Ignore messages that do not match the current key\n if (type !== key) return;\n\n // Ignore messages from myself\n if (msgSenderId === senderId) return;\n\n // Check if the message origin is allowed\n if (\n typeof allowedOrigins === 'undefined' ||\n allowedOrigins?.
|
|
1
|
+
{"version":3,"sources":["../../src/useCrossFrameMessageListener.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useMemo } from 'react';\nimport { useCommunicator } from './CommunicatorContext';\nimport { type MessageKey } from './messageKey';\n\n/**\n * Compare two URLs for equality.\n * This function is used to determine if a message originates from the same origin.\n *\n * ```js\n * // Example usage\n * console.log(compareUrls(\"http://localhost:5173/\", \"http://localhost:5173\")); // true\n * console.log(compareUrls(\"http://localhost:5173\", \"http://localhost:5173?myParam=true\")); // true\n * console.log(compareUrls(\"http://localhost:5173/subpath\", \"http://localhost:5173\")); // true\n * console.log(compareUrls(\"http://localhost:5172\", \"http://localhost:5173\")); // false\n * ```\n *\n * @param url1 - The first URL to compare.\n * @param url2 - The second URL to compare.\n * @returns Whether the two URLs are equal.\n */\nconst compareUrls = (url1: string, url2: string): boolean => {\n try {\n const parsedUrl1 = new URL(url1);\n const parsedUrl2 = new URL(url2);\n\n // Compare protocol, hostname, and port\n if (\n parsedUrl1.protocol !== parsedUrl2.protocol ||\n parsedUrl1.hostname !== parsedUrl2.hostname ||\n parsedUrl1.port !== parsedUrl2.port\n ) {\n return false;\n }\n\n // One URL should not have a subpath while the other does\n const path1 = parsedUrl1.pathname.replace(/\\/$/, ''); // Remove trailing slash\n const path2 = parsedUrl2.pathname.replace(/\\/$/, '');\n\n if (path1 !== '' && path2 !== '' && path1 !== path2) {\n return false;\n }\n\n return true;\n } catch (error) {\n console.error('Invalid URL(s)', error);\n return false;\n }\n};\n\n/**\n * useCrossFrameMessageListener\n *\n * This React hook listens for messages sent via the `postMessage` API and triggers a callback\n * whenever a message of the specified type (`key`) is received. It is useful for synchronizing\n * state or events across different windows, iframes, or contexts.\n *\n * @template S - The type of the data payload in the message.\n * @param {`${MessageKey}` | `${MessageKey}/post` | `${MessageKey}/get`} key - A unique identifier for the message type to listen for.\n * @param {(data: S) => void} [onEventTriggered] - A callback function triggered when a message\n * with the specified key is received. The callback receives the message data as its argument.\n *\n * @returns {{ postMessage: (data: S) => void }} An object containing a `postMessage` function\n * that allows broadcasting messages with the specified key and data.\n */\nexport const useCrossFrameMessageListener = <S,>(\n key: `${MessageKey}` | `${MessageKey}/post` | `${MessageKey}/get`,\n onEventTriggered?: (data: S) => void\n) => {\n const { allowedOrigins, postMessage, senderId } = useCommunicator();\n\n useEffect(() => {\n if (onEventTriggered) {\n /**\n * Message handler to process incoming messages.\n *\n * - **Message Filtering:** Ensures only messages with the specified `key` are processed.\n * - **Origin Validation:** Checks that the origin of the message is within the allowed origins.\n *\n * @param {MessageEvent<{ type: string; data: S }>} event - The incoming message event object.\n */\n const handleMessage = (\n event: MessageEvent<{ type: string; data: S; senderId: string }>\n ) => {\n const { type, data, senderId: msgSenderId } = event.data;\n\n // Ignore messages that do not match the current key\n if (type !== key) return;\n\n // Ignore messages from myself\n if (msgSenderId === senderId) return;\n\n // Check if the message origin is allowed\n if (\n typeof allowedOrigins === 'undefined' ||\n allowedOrigins?.some((url) => compareUrls(url, event.origin)) ||\n allowedOrigins?.includes('*')\n ) {\n // Update the local state with the received data\n onEventTriggered(data);\n }\n };\n\n window.addEventListener('message', handleMessage);\n\n // Clean up the event listener on unmount\n return () => window.removeEventListener('message', handleMessage);\n }\n }, [allowedOrigins, postMessage, senderId]);\n\n /**\n * A wrapper function around the `postMessage` function to broadcast messages efficiently.\n *\n * - **Encapsulation:** Ensures the `postMessage` function is scoped to the provided key.\n * - **Ease of Use:** Simplifies broadcasting messages with consistent type and format.\n *\n * @param {S} data - The data payload to include in the message.\n * @returns {void}\n */\n const postMessageWrapper: (data: S) => void = useCallback(\n (data) => {\n postMessage({ type: key, data, senderId });\n },\n [postMessage, key, senderId]\n );\n\n return useMemo(() => postMessageWrapper, [postMessageWrapper]);\n};\n"],"mappings":";AAEA,SAAS,aAAa,WAAW,eAAe;AAChD,SAAS,uBAAuB;AAmBhC,MAAM,cAAc,CAAC,MAAc,SAA0B;AAC3D,MAAI;AACF,UAAM,aAAa,IAAI,IAAI,IAAI;AAC/B,UAAM,aAAa,IAAI,IAAI,IAAI;AAG/B,QACE,WAAW,aAAa,WAAW,YACnC,WAAW,aAAa,WAAW,YACnC,WAAW,SAAS,WAAW,MAC/B;A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,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"useCrossFrameMessageListener.d.ts","sourceRoot":"","sources":["../../src/useCrossFrameMessageListener.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AA+C/C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,4BAA4B,GAAI,CAAC,OACvC,GAAG,UAAU,EAAE,GAAG,GAAG,UAAU,OAAO,GAAG,GAAG,UAAU,MAAM,qBAC9C,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,YAoDH,CAAC,KAAK,IAQxC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/editor-react",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Provides the states, contexts, hooks and components to interact with the Intlayer editor for a React application",
|
|
6
6
|
"keywords": [
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
],
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"uuid": "^11.0.5",
|
|
55
|
-
"@intlayer/config": "5.1.
|
|
56
|
-
"@intlayer/core": "5.1.
|
|
57
|
-
"@intlayer/editor": "5.1.
|
|
55
|
+
"@intlayer/config": "5.1.4",
|
|
56
|
+
"@intlayer/core": "5.1.4",
|
|
57
|
+
"@intlayer/editor": "5.1.4"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/node": "^22.10.6",
|
|
@@ -68,17 +68,17 @@
|
|
|
68
68
|
"tsc-alias": "^1.8.10",
|
|
69
69
|
"tsup": "^8.3.5",
|
|
70
70
|
"typescript": "^5.7.3",
|
|
71
|
-
"@utils/ts-config": "1.0.4",
|
|
72
71
|
"@utils/eslint-config": "1.0.4",
|
|
72
|
+
"@utils/ts-config": "1.0.4",
|
|
73
73
|
"@utils/ts-config-types": "1.0.4",
|
|
74
74
|
"@utils/tsup-config": "1.0.4"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"react": ">=16.0.0",
|
|
78
78
|
"react-dom": ">=16.0.0",
|
|
79
|
-
"@intlayer/
|
|
80
|
-
"@intlayer/
|
|
81
|
-
"@intlayer/
|
|
79
|
+
"@intlayer/core": "5.1.4",
|
|
80
|
+
"@intlayer/editor": "5.1.4",
|
|
81
|
+
"@intlayer/config": "5.1.4"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=14.18"
|