@intlayer/editor-react 5.1.8 → 5.2.0
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/ChangedContentContext.cjs +0 -10
- package/dist/cjs/ChangedContentContext.cjs.map +1 -1
- package/dist/cjs/CommunicatorContext.cjs +17 -3
- package/dist/cjs/CommunicatorContext.cjs.map +1 -1
- package/dist/esm/ChangedContentContext.mjs +0 -10
- package/dist/esm/ChangedContentContext.mjs.map +1 -1
- package/dist/esm/CommunicatorContext.mjs +7 -3
- package/dist/esm/CommunicatorContext.mjs.map +1 -1
- package/dist/types/ChangedContentContext.d.ts.map +1 -1
- package/dist/types/CommunicatorContext.d.ts.map +1 -1
- package/dist/types/EditedContentContext.d.ts.map +1 -1
- package/dist/types/EditorEnabledContext.d.ts.map +1 -1
- package/dist/types/useCrossFrameMessageListener.d.ts.map +1 -1
- package/dist/types/useCrossFrameState.d.ts.map +1 -1
- package/dist/types/useCrossURLPathState.d.ts.map +1 -1
- package/package.json +9 -9
|
@@ -61,21 +61,11 @@ const ChangedContentProvider = ({ children }) => {
|
|
|
61
61
|
};
|
|
62
62
|
const useChangedContentActions = () => {
|
|
63
63
|
const context = (0, import_react.useContext)(ChangedContentActionsContext);
|
|
64
|
-
if (!context) {
|
|
65
|
-
throw new Error(
|
|
66
|
-
"useChangedContent must be used within an ChangedContentProvider"
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
64
|
return context;
|
|
70
65
|
};
|
|
71
66
|
const useChangedContent = () => {
|
|
72
67
|
const stateContext = (0, import_react.useContext)(ChangedContentStateContext);
|
|
73
68
|
const actionContext = useChangedContentActions();
|
|
74
|
-
if (!stateContext) {
|
|
75
|
-
throw new Error(
|
|
76
|
-
"useChangedContent must be used within an ChangedContentProvider"
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
69
|
return { ...stateContext, ...actionContext };
|
|
80
70
|
};
|
|
81
71
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ChangedContentContext.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary } from '@intlayer/core';\nimport {\n createContext,\n useContext,\n useState,\n type FC,\n type PropsWithChildren,\n} from 'react';\nimport type { DictionaryContent } from './DictionariesRecordContext';\n\ntype ChangedContentStateContextType = {\n changedContent: Record<Dictionary['key'], Dictionary> | undefined;\n};\n\nconst ChangedContentStateContext = createContext<\n ChangedContentStateContextType | undefined\n>(undefined);\n\ntype ChangedContentActionsContextType = {\n setChangedContent: (\n dictionaryKey: Dictionary['key'],\n newValue: Dictionary['content']\n ) => void;\n};\n\nconst ChangedContentActionsContext = createContext<\n ChangedContentActionsContextType | undefined\n>(undefined);\n\nexport const ChangedContentProvider: FC<PropsWithChildren> = ({ children }) => {\n const [changedContent, setChangedContentState] = useState<DictionaryContent>(\n {}\n );\n\n const setChangedContent = (\n dictionaryKey: Dictionary['key'],\n newValue: Dictionary['content']\n ) => {\n setChangedContentState((prev) => ({\n ...prev,\n [dictionaryKey]: {\n ...prev?.[dictionaryKey],\n content: newValue,\n },\n }));\n };\n\n return (\n <ChangedContentStateContext.Provider\n value={{\n changedContent,\n }}\n >\n <ChangedContentActionsContext.Provider\n value={{\n setChangedContent,\n }}\n >\n {children}\n </ChangedContentActionsContext.Provider>\n </ChangedContentStateContext.Provider>\n );\n};\n\nexport const useChangedContentActions = () => {\n const context = useContext(ChangedContentActionsContext);\n\n
|
|
1
|
+
{"version":3,"sources":["../../src/ChangedContentContext.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary } from '@intlayer/core';\nimport {\n createContext,\n useContext,\n useState,\n type FC,\n type PropsWithChildren,\n} from 'react';\nimport type { DictionaryContent } from './DictionariesRecordContext';\n\ntype ChangedContentStateContextType = {\n changedContent: Record<Dictionary['key'], Dictionary> | undefined;\n};\n\nconst ChangedContentStateContext = createContext<\n ChangedContentStateContextType | undefined\n>(undefined);\n\ntype ChangedContentActionsContextType = {\n setChangedContent: (\n dictionaryKey: Dictionary['key'],\n newValue: Dictionary['content']\n ) => void;\n};\n\nconst ChangedContentActionsContext = createContext<\n ChangedContentActionsContextType | undefined\n>(undefined);\n\nexport const ChangedContentProvider: FC<PropsWithChildren> = ({ children }) => {\n const [changedContent, setChangedContentState] = useState<DictionaryContent>(\n {}\n );\n\n const setChangedContent = (\n dictionaryKey: Dictionary['key'],\n newValue: Dictionary['content']\n ) => {\n setChangedContentState((prev) => ({\n ...prev,\n [dictionaryKey]: {\n ...prev?.[dictionaryKey],\n content: newValue,\n },\n }));\n };\n\n return (\n <ChangedContentStateContext.Provider\n value={{\n changedContent,\n }}\n >\n <ChangedContentActionsContext.Provider\n value={{\n setChangedContent,\n }}\n >\n {children}\n </ChangedContentActionsContext.Provider>\n </ChangedContentStateContext.Provider>\n );\n};\n\nexport const useChangedContentActions = () => {\n const context = useContext(ChangedContentActionsContext);\n\n return context;\n};\n\nexport const useChangedContent = () => {\n const stateContext = useContext(ChangedContentStateContext);\n const actionContext = useChangedContentActions();\n\n return { ...stateContext, ...actionContext };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuDM;AApDN,mBAMO;AAOP,MAAM,iCAA6B,4BAEjC,MAAS;AASX,MAAM,mCAA+B,4BAEnC,MAAS;AAEJ,MAAM,yBAAgD,CAAC,EAAE,SAAS,MAAM;AAC7E,QAAM,CAAC,gBAAgB,sBAAsB,QAAI;AAAA,IAC/C,CAAC;AAAA,EACH;AAEA,QAAM,oBAAoB,CACxB,eACA,aACG;AACH,2BAAuB,CAAC,UAAU;AAAA,MAChC,GAAG;AAAA,MACH,CAAC,aAAa,GAAG;AAAA,QACf,GAAG,OAAO,aAAa;AAAA,QACvB,SAAS;AAAA,MACX;AAAA,IACF,EAAE;AAAA,EACJ;AAEA,SACE;AAAA,IAAC,2BAA2B;AAAA,IAA3B;AAAA,MACC,OAAO;AAAA,QACL;AAAA,MACF;AAAA,MAEA;AAAA,QAAC,6BAA6B;AAAA,QAA7B;AAAA,UACC,OAAO;AAAA,YACL;AAAA,UACF;AAAA,UAEC;AAAA;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;AAEO,MAAM,2BAA2B,MAAM;AAC5C,QAAM,cAAU,yBAAW,4BAA4B;AAEvD,SAAO;AACT;AAEO,MAAM,oBAAoB,MAAM;AACrC,QAAM,mBAAe,yBAAW,0BAA0B;AAC1D,QAAM,gBAAgB,yBAAyB;AAE/C,SAAO,EAAE,GAAG,cAAc,GAAG,cAAc;AAC7C;","names":[]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __export = (target, all) => {
|
|
8
10
|
for (var name in all)
|
|
@@ -16,6 +18,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
18
|
}
|
|
17
19
|
return to;
|
|
18
20
|
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
19
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
30
|
var CommunicatorContext_exports = {};
|
|
21
31
|
__export(CommunicatorContext_exports, {
|
|
@@ -24,13 +34,17 @@ __export(CommunicatorContext_exports, {
|
|
|
24
34
|
});
|
|
25
35
|
module.exports = __toCommonJS(CommunicatorContext_exports);
|
|
26
36
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
-
var
|
|
37
|
+
var import_built = __toESM(require("@intlayer/config/built"));
|
|
28
38
|
var import_react = require("react");
|
|
29
39
|
var import_uuid = require("uuid");
|
|
30
|
-
const { editor } =
|
|
40
|
+
const { editor } = import_built.default;
|
|
31
41
|
const CommunicatorContext = (0, import_react.createContext)({
|
|
32
42
|
postMessage: () => null,
|
|
33
|
-
allowedOrigins: [
|
|
43
|
+
allowedOrigins: [
|
|
44
|
+
editor?.applicationURL,
|
|
45
|
+
editor?.editorURL,
|
|
46
|
+
editor?.cmsURL
|
|
47
|
+
],
|
|
34
48
|
senderId: ""
|
|
35
49
|
});
|
|
36
50
|
const CommunicatorProvider = ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/CommunicatorContext.tsx"],"sourcesContent":["'use client';\n\nimport
|
|
1
|
+
{"version":3,"sources":["../../src/CommunicatorContext.tsx"],"sourcesContent":["'use client';\n\nimport configuration from '@intlayer/config/built';\n\nimport {\n createContext,\n useContext,\n useMemo,\n useRef,\n type FC,\n type PropsWithChildren,\n} from 'react';\nimport { v4 as uuid } from 'uuid'; // if you prefer a UUID library\n\nexport type UseCrossPlatformStateProps = {\n postMessage: typeof window.postMessage;\n allowedOrigins?: string[];\n senderId: string;\n};\n\nconst { editor } = configuration;\n\nconst CommunicatorContext = createContext<UseCrossPlatformStateProps>({\n postMessage: () => null,\n allowedOrigins: [\n editor?.applicationURL,\n editor?.editorURL,\n editor?.cmsURL,\n ] as string[],\n senderId: '',\n});\n\nexport type CommunicatorProviderProps = PropsWithChildren<\n Omit<UseCrossPlatformStateProps, 'senderId'>\n>;\n\nexport const CommunicatorProvider: FC<CommunicatorProviderProps> = ({\n children,\n allowedOrigins,\n postMessage,\n}) => {\n // Create a stable, unique ID for the lifetime of this app/iframe instance.\n const senderIdRef = useRef(uuid());\n\n const value = useMemo(\n () => ({ postMessage, allowedOrigins, senderId: senderIdRef.current }),\n [postMessage, allowedOrigins, senderIdRef.current]\n );\n\n return (\n <CommunicatorContext.Provider value={value}>\n {children}\n </CommunicatorContext.Provider>\n );\n};\n\nexport const useCommunicator = () => useContext(CommunicatorContext);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkDI;AAhDJ,mBAA0B;AAE1B,mBAOO;AACP,kBAA2B;AAQ3B,MAAM,EAAE,OAAO,IAAI,aAAAA;AAEnB,MAAM,0BAAsB,4BAA0C;AAAA,EACpE,aAAa,MAAM;AAAA,EACnB,gBAAgB;AAAA,IACd,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV;AAAA,EACA,UAAU;AACZ,CAAC;AAMM,MAAM,uBAAsD,CAAC;AAAA,EAClE;AAAA,EACA;AAAA,EACA;AACF,MAAM;AAEJ,QAAM,kBAAc,yBAAO,YAAAC,IAAK,CAAC;AAEjC,QAAM,YAAQ;AAAA,IACZ,OAAO,EAAE,aAAa,gBAAgB,UAAU,YAAY,QAAQ;AAAA,IACpE,CAAC,aAAa,gBAAgB,YAAY,OAAO;AAAA,EACnD;AAEA,SACE,4CAAC,oBAAoB,UAApB,EAA6B,OAC3B,UACH;AAEJ;AAEO,MAAM,kBAAkB,UAAM,yBAAW,mBAAmB;","names":["configuration","uuid"]}
|
|
@@ -40,21 +40,11 @@ const ChangedContentProvider = ({ children }) => {
|
|
|
40
40
|
};
|
|
41
41
|
const useChangedContentActions = () => {
|
|
42
42
|
const context = useContext(ChangedContentActionsContext);
|
|
43
|
-
if (!context) {
|
|
44
|
-
throw new Error(
|
|
45
|
-
"useChangedContent must be used within an ChangedContentProvider"
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
43
|
return context;
|
|
49
44
|
};
|
|
50
45
|
const useChangedContent = () => {
|
|
51
46
|
const stateContext = useContext(ChangedContentStateContext);
|
|
52
47
|
const actionContext = useChangedContentActions();
|
|
53
|
-
if (!stateContext) {
|
|
54
|
-
throw new Error(
|
|
55
|
-
"useChangedContent must be used within an ChangedContentProvider"
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
48
|
return { ...stateContext, ...actionContext };
|
|
59
49
|
};
|
|
60
50
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ChangedContentContext.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary } from '@intlayer/core';\nimport {\n createContext,\n useContext,\n useState,\n type FC,\n type PropsWithChildren,\n} from 'react';\nimport type { DictionaryContent } from './DictionariesRecordContext';\n\ntype ChangedContentStateContextType = {\n changedContent: Record<Dictionary['key'], Dictionary> | undefined;\n};\n\nconst ChangedContentStateContext = createContext<\n ChangedContentStateContextType | undefined\n>(undefined);\n\ntype ChangedContentActionsContextType = {\n setChangedContent: (\n dictionaryKey: Dictionary['key'],\n newValue: Dictionary['content']\n ) => void;\n};\n\nconst ChangedContentActionsContext = createContext<\n ChangedContentActionsContextType | undefined\n>(undefined);\n\nexport const ChangedContentProvider: FC<PropsWithChildren> = ({ children }) => {\n const [changedContent, setChangedContentState] = useState<DictionaryContent>(\n {}\n );\n\n const setChangedContent = (\n dictionaryKey: Dictionary['key'],\n newValue: Dictionary['content']\n ) => {\n setChangedContentState((prev) => ({\n ...prev,\n [dictionaryKey]: {\n ...prev?.[dictionaryKey],\n content: newValue,\n },\n }));\n };\n\n return (\n <ChangedContentStateContext.Provider\n value={{\n changedContent,\n }}\n >\n <ChangedContentActionsContext.Provider\n value={{\n setChangedContent,\n }}\n >\n {children}\n </ChangedContentActionsContext.Provider>\n </ChangedContentStateContext.Provider>\n );\n};\n\nexport const useChangedContentActions = () => {\n const context = useContext(ChangedContentActionsContext);\n\n
|
|
1
|
+
{"version":3,"sources":["../../src/ChangedContentContext.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary } from '@intlayer/core';\nimport {\n createContext,\n useContext,\n useState,\n type FC,\n type PropsWithChildren,\n} from 'react';\nimport type { DictionaryContent } from './DictionariesRecordContext';\n\ntype ChangedContentStateContextType = {\n changedContent: Record<Dictionary['key'], Dictionary> | undefined;\n};\n\nconst ChangedContentStateContext = createContext<\n ChangedContentStateContextType | undefined\n>(undefined);\n\ntype ChangedContentActionsContextType = {\n setChangedContent: (\n dictionaryKey: Dictionary['key'],\n newValue: Dictionary['content']\n ) => void;\n};\n\nconst ChangedContentActionsContext = createContext<\n ChangedContentActionsContextType | undefined\n>(undefined);\n\nexport const ChangedContentProvider: FC<PropsWithChildren> = ({ children }) => {\n const [changedContent, setChangedContentState] = useState<DictionaryContent>(\n {}\n );\n\n const setChangedContent = (\n dictionaryKey: Dictionary['key'],\n newValue: Dictionary['content']\n ) => {\n setChangedContentState((prev) => ({\n ...prev,\n [dictionaryKey]: {\n ...prev?.[dictionaryKey],\n content: newValue,\n },\n }));\n };\n\n return (\n <ChangedContentStateContext.Provider\n value={{\n changedContent,\n }}\n >\n <ChangedContentActionsContext.Provider\n value={{\n setChangedContent,\n }}\n >\n {children}\n </ChangedContentActionsContext.Provider>\n </ChangedContentStateContext.Provider>\n );\n};\n\nexport const useChangedContentActions = () => {\n const context = useContext(ChangedContentActionsContext);\n\n return context;\n};\n\nexport const useChangedContent = () => {\n const stateContext = useContext(ChangedContentStateContext);\n const actionContext = useChangedContentActions();\n\n return { ...stateContext, ...actionContext };\n};\n"],"mappings":";AAuDM;AApDN;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAOP,MAAM,6BAA6B,cAEjC,MAAS;AASX,MAAM,+BAA+B,cAEnC,MAAS;AAEJ,MAAM,yBAAgD,CAAC,EAAE,SAAS,MAAM;AAC7E,QAAM,CAAC,gBAAgB,sBAAsB,IAAI;AAAA,IAC/C,CAAC;AAAA,EACH;AAEA,QAAM,oBAAoB,CACxB,eACA,aACG;AACH,2BAAuB,CAAC,UAAU;AAAA,MAChC,GAAG;AAAA,MACH,CAAC,aAAa,GAAG;AAAA,QACf,GAAG,OAAO,aAAa;AAAA,QACvB,SAAS;AAAA,MACX;AAAA,IACF,EAAE;AAAA,EACJ;AAEA,SACE;AAAA,IAAC,2BAA2B;AAAA,IAA3B;AAAA,MACC,OAAO;AAAA,QACL;AAAA,MACF;AAAA,MAEA;AAAA,QAAC,6BAA6B;AAAA,QAA7B;AAAA,UACC,OAAO;AAAA,YACL;AAAA,UACF;AAAA,UAEC;AAAA;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;AAEO,MAAM,2BAA2B,MAAM;AAC5C,QAAM,UAAU,WAAW,4BAA4B;AAEvD,SAAO;AACT;AAEO,MAAM,oBAAoB,MAAM;AACrC,QAAM,eAAe,WAAW,0BAA0B;AAC1D,QAAM,gBAAgB,yBAAyB;AAE/C,SAAO,EAAE,GAAG,cAAc,GAAG,cAAc;AAC7C;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
3
|
+
import configuration from "@intlayer/config/built";
|
|
4
4
|
import {
|
|
5
5
|
createContext,
|
|
6
6
|
useContext,
|
|
@@ -8,10 +8,14 @@ import {
|
|
|
8
8
|
useRef
|
|
9
9
|
} from "react";
|
|
10
10
|
import { v4 as uuid } from "uuid";
|
|
11
|
-
const { editor } =
|
|
11
|
+
const { editor } = configuration;
|
|
12
12
|
const CommunicatorContext = createContext({
|
|
13
13
|
postMessage: () => null,
|
|
14
|
-
allowedOrigins: [
|
|
14
|
+
allowedOrigins: [
|
|
15
|
+
editor?.applicationURL,
|
|
16
|
+
editor?.editorURL,
|
|
17
|
+
editor?.cmsURL
|
|
18
|
+
],
|
|
15
19
|
senderId: ""
|
|
16
20
|
});
|
|
17
21
|
const CommunicatorProvider = ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/CommunicatorContext.tsx"],"sourcesContent":["'use client';\n\nimport
|
|
1
|
+
{"version":3,"sources":["../../src/CommunicatorContext.tsx"],"sourcesContent":["'use client';\n\nimport configuration from '@intlayer/config/built';\n\nimport {\n createContext,\n useContext,\n useMemo,\n useRef,\n type FC,\n type PropsWithChildren,\n} from 'react';\nimport { v4 as uuid } from 'uuid'; // if you prefer a UUID library\n\nexport type UseCrossPlatformStateProps = {\n postMessage: typeof window.postMessage;\n allowedOrigins?: string[];\n senderId: string;\n};\n\nconst { editor } = configuration;\n\nconst CommunicatorContext = createContext<UseCrossPlatformStateProps>({\n postMessage: () => null,\n allowedOrigins: [\n editor?.applicationURL,\n editor?.editorURL,\n editor?.cmsURL,\n ] as string[],\n senderId: '',\n});\n\nexport type CommunicatorProviderProps = PropsWithChildren<\n Omit<UseCrossPlatformStateProps, 'senderId'>\n>;\n\nexport const CommunicatorProvider: FC<CommunicatorProviderProps> = ({\n children,\n allowedOrigins,\n postMessage,\n}) => {\n // Create a stable, unique ID for the lifetime of this app/iframe instance.\n const senderIdRef = useRef(uuid());\n\n const value = useMemo(\n () => ({ postMessage, allowedOrigins, senderId: senderIdRef.current }),\n [postMessage, allowedOrigins, senderIdRef.current]\n );\n\n return (\n <CommunicatorContext.Provider value={value}>\n {children}\n </CommunicatorContext.Provider>\n );\n};\n\nexport const useCommunicator = () => useContext(CommunicatorContext);\n"],"mappings":";AAkDI;AAhDJ,OAAO,mBAAmB;AAE1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,MAAM,YAAY;AAQ3B,MAAM,EAAE,OAAO,IAAI;AAEnB,MAAM,sBAAsB,cAA0C;AAAA,EACpE,aAAa,MAAM;AAAA,EACnB,gBAAgB;AAAA,IACd,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV;AAAA,EACA,UAAU;AACZ,CAAC;AAMM,MAAM,uBAAsD,CAAC;AAAA,EAClE;AAAA,EACA;AAAA,EACA;AACF,MAAM;AAEJ,QAAM,cAAc,OAAO,KAAK,CAAC;AAEjC,QAAM,QAAQ;AAAA,IACZ,OAAO,EAAE,aAAa,gBAAgB,UAAU,YAAY,QAAQ;AAAA,IACpE,CAAC,aAAa,gBAAgB,YAAY,OAAO;AAAA,EACnD;AAEA,SACE,oBAAC,oBAAoB,UAApB,EAA6B,OAC3B,UACH;AAEJ;AAEO,MAAM,kBAAkB,MAAM,WAAW,mBAAmB;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangedContentContext.d.ts","sourceRoot":"","sources":["../../src/ChangedContentContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAIL,KAAK,EAAE,EACP,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAWf,KAAK,gCAAgC,GAAG;IACtC,iBAAiB,EAAE,CACjB,aAAa,EAAE,UAAU,CAAC,KAAK,CAAC,EAChC,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC,KAC5B,IAAI,CAAC;CACX,CAAC;AAMF,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,iBAAiB,CAiCxD,CAAC;AAEF,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"ChangedContentContext.d.ts","sourceRoot":"","sources":["../../src/ChangedContentContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAIL,KAAK,EAAE,EACP,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAWf,KAAK,gCAAgC,GAAG;IACtC,iBAAiB,EAAE,CACjB,aAAa,EAAE,UAAU,CAAC,KAAK,CAAC,EAChC,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC,KAC5B,IAAI,CAAC;CACX,CAAC;AAMF,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,iBAAiB,CAiCxD,CAAC;AAEF,eAAO,MAAM,wBAAwB,wCAIpC,CAAC;AAEF,eAAO,MAAM,iBAAiB;uBAnDT,CACjB,aAAa,EAAE,UAAU,CAAC,KAAK,CAAC,EAChC,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC,KAC5B,IAAI;oBAXO,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,SAAS;CAgElE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommunicatorContext.d.ts","sourceRoot":"","sources":["../../src/CommunicatorContext.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommunicatorContext.d.ts","sourceRoot":"","sources":["../../src/CommunicatorContext.tsx"],"names":[],"mappings":"AAIA,OAAO,EAKL,KAAK,EAAE,EACP,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAGf,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,EAAE,OAAO,MAAM,CAAC,WAAW,CAAC;IACvC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAcF,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CACvD,IAAI,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAC7C,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAkB9D,CAAC;AAEF,eAAO,MAAM,eAAe,kCAAwC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditedContentContext.d.ts","sourceRoot":"","sources":["../../src/EditedContentContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,OAAO,EAIb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,KAAK,QAAQ,EAGb,KAAK,c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AAC,EAChC,OAAO,EAAE,OAAO,EAAE,KACf,IAAI;0BACa,CAAC,aAAa,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,IAAI;kCAClC,CAAC,aAAa,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,IAAI;wBACpD,MAAM,IAAI;2BACP,CACrB,aAAa,EAAE,UAAU,CAAC,KAAK,CAAC,EAChC,OAAO,EAAE,OAAO,EAAE,KACf,WAAW,GAAG,SAAS;mBArDb,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,SAAS;CAwSjE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorEnabledContext.d.ts","sourceRoot":"","sources":["../../src/EditorEnabledContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,EAAE,EACP,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AACf,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,sBAAsB,CAAC;AAG9B,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAMF,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"EditorEnabledContext.d.ts","sourceRoot":"","sources":["../../src/EditorEnabledContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,EAAE,EACP,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AACf,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,sBAAsB,CAAC;AAG9B,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAMF,eAAO,MAAM,qBAAqB,GAAI,UAAU,sBAAsB,6FACP,CAAC;AAEhE,eAAO,MAAM,yBAAyB,GAAI,CAAC,EACzC,mBAAmB,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,uBAKnC,CAAC;AAEJ,eAAO,MAAM,wBAAwB,GAAI,CAAC,EACxC,mBAAmB,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,uBAEyC,CAAC;AAEhF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,iBAAiB,CAWvD,CAAC;AAEF,eAAO,MAAM,gBAAgB,+BAAyC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,4BAA4B,GAAI,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;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,4BAA4B,GAAI,CAAC,EAC5C,KAAK,GAAG,UAAU,EAAE,GAAG,GAAG,UAAU,OAAO,GAAG,GAAG,UAAU,MAAM,EACjE,mBAAmB,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,EACpC,cAAc,GAAG,aAoDiB,CAAC,KAAK,IAKzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCrossFrameState.d.ts","sourceRoot":"","sources":["../../src/useCrossFrameState.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAEhF,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAOF;;;;;GAKG;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"useCrossFrameState.d.ts","sourceRoot":"","sources":["../../src/useCrossFrameState.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAEhF,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAOF;;;;;GAKG;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAClC,KAAK,GAAG,UAAU,EAAE,EACpB,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAC5B,UAAU,sBAAsB,KAC/B,CAAC,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,aA6FjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCrossURLPathState.d.ts","sourceRoot":"","sources":["../../src/useCrossURLPathState.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"useCrossURLPathState.d.ts","sourceRoot":"","sources":["../../src/useCrossURLPathState.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,oBAAoB,GAC/B,eAAe,MAAM,EACrB,UAAU,sBAAsB,2FACmC,CAAC;AAEtE,eAAO,MAAM,qBAAqB,GAAI,eAAe,MAAM,2FA8D1D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/editor-react",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
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/
|
|
56
|
-
"@intlayer/core": "5.
|
|
57
|
-
"@intlayer/
|
|
55
|
+
"@intlayer/config": "5.2.0",
|
|
56
|
+
"@intlayer/core": "5.2.0",
|
|
57
|
+
"@intlayer/editor": "5.2.0"
|
|
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-types": "1.0.4",
|
|
72
|
-
"@utils/ts-config": "1.0.4",
|
|
73
71
|
"@utils/eslint-config": "1.0.4",
|
|
72
|
+
"@utils/ts-config": "1.0.4",
|
|
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/config": "5.
|
|
80
|
-
"@intlayer/
|
|
81
|
-
"@intlayer/
|
|
79
|
+
"@intlayer/config": "5.2.0",
|
|
80
|
+
"@intlayer/editor": "5.2.0",
|
|
81
|
+
"@intlayer/core": "5.2.0"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=14.18"
|