@intlayer/editor-react 5.1.5 → 5.1.6
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.
|
@@ -35,15 +35,7 @@ const useConfigurationState = () => (0, import_useCrossFrameState.useCrossFrameS
|
|
|
35
35
|
emit: true
|
|
36
36
|
});
|
|
37
37
|
const ConfigurationProvider = ({ children, configuration }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConfigurationStatesContext.Provider, { value: configuration, children });
|
|
38
|
-
const useConfiguration = () =>
|
|
39
|
-
const statesContext = (0, import_react.useContext)(ConfigurationStatesContext);
|
|
40
|
-
if (!statesContext) {
|
|
41
|
-
throw new Error(
|
|
42
|
-
"useConfigurationStates must be used within a ConfigurationProvider"
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
return statesContext;
|
|
46
|
-
};
|
|
38
|
+
const useConfiguration = () => (0, import_react.useContext)(ConfigurationStatesContext);
|
|
47
39
|
// Annotate the CommonJS export names for ESM import in node:
|
|
48
40
|
0 && (module.exports = {
|
|
49
41
|
ConfigurationProvider,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ConfigurationContext.tsx"],"sourcesContent":["'use client';\n\nimport { type IntlayerConfig } from '@intlayer/config/client';\nimport {\n type FC,\n type PropsWithChildren,\n createContext,\n useContext,\n} from 'react';\nimport { useCrossFrameState } from './useCrossFrameState';\n\nconst ConfigurationStatesContext = createContext<IntlayerConfig | undefined>(\n undefined\n);\n\nexport const useConfigurationState = () =>\n useCrossFrameState<IntlayerConfig>('INTLAYER_CONFIGURATION', undefined, {\n receive: false,\n emit: true,\n });\n\nexport type ConfigurationProviderProps = {\n configuration?: IntlayerConfig;\n};\n\nexport const ConfigurationProvider: FC<\n PropsWithChildren<ConfigurationProviderProps>\n> = ({ children, configuration }) => (\n <ConfigurationStatesContext.Provider value={configuration}>\n {children}\n </ConfigurationStatesContext.Provider>\n);\n\nexport const useConfiguration = () =>
|
|
1
|
+
{"version":3,"sources":["../../src/ConfigurationContext.tsx"],"sourcesContent":["'use client';\n\nimport { type IntlayerConfig } from '@intlayer/config/client';\nimport {\n type FC,\n type PropsWithChildren,\n createContext,\n useContext,\n} from 'react';\nimport { useCrossFrameState } from './useCrossFrameState';\n\nconst ConfigurationStatesContext = createContext<IntlayerConfig | undefined>(\n undefined\n);\n\nexport const useConfigurationState = () =>\n useCrossFrameState<IntlayerConfig>('INTLAYER_CONFIGURATION', undefined, {\n receive: false,\n emit: true,\n });\n\nexport type ConfigurationProviderProps = {\n configuration?: IntlayerConfig;\n};\n\nexport const ConfigurationProvider: FC<\n PropsWithChildren<ConfigurationProviderProps>\n> = ({ children, configuration }) => (\n <ConfigurationStatesContext.Provider value={configuration}>\n {children}\n </ConfigurationStatesContext.Provider>\n);\n\nexport const useConfiguration = () => useContext(ConfigurationStatesContext);\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4BE;AAzBF,mBAKO;AACP,gCAAmC;AAEnC,MAAM,iCAA6B;AAAA,EACjC;AACF;AAEO,MAAM,wBAAwB,UACnC,8CAAmC,0BAA0B,QAAW;AAAA,EACtE,SAAS;AAAA,EACT,MAAM;AACR,CAAC;AAMI,MAAM,wBAET,CAAC,EAAE,UAAU,cAAc,MAC7B,4CAAC,2BAA2B,UAA3B,EAAoC,OAAO,eACzC,UACH;AAGK,MAAM,mBAAmB,UAAM,yBAAW,0BAA0B;","names":[]}
|
|
@@ -13,15 +13,7 @@ const useConfigurationState = () => useCrossFrameState("INTLAYER_CONFIGURATION",
|
|
|
13
13
|
emit: true
|
|
14
14
|
});
|
|
15
15
|
const ConfigurationProvider = ({ children, configuration }) => /* @__PURE__ */ jsx(ConfigurationStatesContext.Provider, { value: configuration, children });
|
|
16
|
-
const useConfiguration = () =>
|
|
17
|
-
const statesContext = useContext(ConfigurationStatesContext);
|
|
18
|
-
if (!statesContext) {
|
|
19
|
-
throw new Error(
|
|
20
|
-
"useConfigurationStates must be used within a ConfigurationProvider"
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
return statesContext;
|
|
24
|
-
};
|
|
16
|
+
const useConfiguration = () => useContext(ConfigurationStatesContext);
|
|
25
17
|
export {
|
|
26
18
|
ConfigurationProvider,
|
|
27
19
|
useConfiguration,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ConfigurationContext.tsx"],"sourcesContent":["'use client';\n\nimport { type IntlayerConfig } from '@intlayer/config/client';\nimport {\n type FC,\n type PropsWithChildren,\n createContext,\n useContext,\n} from 'react';\nimport { useCrossFrameState } from './useCrossFrameState';\n\nconst ConfigurationStatesContext = createContext<IntlayerConfig | undefined>(\n undefined\n);\n\nexport const useConfigurationState = () =>\n useCrossFrameState<IntlayerConfig>('INTLAYER_CONFIGURATION', undefined, {\n receive: false,\n emit: true,\n });\n\nexport type ConfigurationProviderProps = {\n configuration?: IntlayerConfig;\n};\n\nexport const ConfigurationProvider: FC<\n PropsWithChildren<ConfigurationProviderProps>\n> = ({ children, configuration }) => (\n <ConfigurationStatesContext.Provider value={configuration}>\n {children}\n </ConfigurationStatesContext.Provider>\n);\n\nexport const useConfiguration = () =>
|
|
1
|
+
{"version":3,"sources":["../../src/ConfigurationContext.tsx"],"sourcesContent":["'use client';\n\nimport { type IntlayerConfig } from '@intlayer/config/client';\nimport {\n type FC,\n type PropsWithChildren,\n createContext,\n useContext,\n} from 'react';\nimport { useCrossFrameState } from './useCrossFrameState';\n\nconst ConfigurationStatesContext = createContext<IntlayerConfig | undefined>(\n undefined\n);\n\nexport const useConfigurationState = () =>\n useCrossFrameState<IntlayerConfig>('INTLAYER_CONFIGURATION', undefined, {\n receive: false,\n emit: true,\n });\n\nexport type ConfigurationProviderProps = {\n configuration?: IntlayerConfig;\n};\n\nexport const ConfigurationProvider: FC<\n PropsWithChildren<ConfigurationProviderProps>\n> = ({ children, configuration }) => (\n <ConfigurationStatesContext.Provider value={configuration}>\n {children}\n </ConfigurationStatesContext.Provider>\n);\n\nexport const useConfiguration = () => useContext(ConfigurationStatesContext);\n"],"mappings":";AA4BE;AAzBF;AAAA,EAGE;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;AAEnC,MAAM,6BAA6B;AAAA,EACjC;AACF;AAEO,MAAM,wBAAwB,MACnC,mBAAmC,0BAA0B,QAAW;AAAA,EACtE,SAAS;AAAA,EACT,MAAM;AACR,CAAC;AAMI,MAAM,wBAET,CAAC,EAAE,UAAU,cAAc,MAC7B,oBAAC,2BAA2B,UAA3B,EAAoC,OAAO,eACzC,UACH;AAGK,MAAM,mBAAmB,MAAM,WAAW,0BAA0B;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurationContext.d.ts","sourceRoot":"","sources":["../../src/ConfigurationContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EACL,KAAK,EAAE,EACP,KAAK,iBAAiB,EAGvB,MAAM,OAAO,CAAC;AAOf,eAAO,MAAM,qBAAqB,kGAI9B,CAAC;AAEL,MAAM,MAAM,0BAA0B,GAAG;IACvC,aAAa,CAAC,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CACpC,iBAAiB,CAAC,0BAA0B,CAAC,CAK9C,CAAC;AAEF,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ConfigurationContext.d.ts","sourceRoot":"","sources":["../../src/ConfigurationContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EACL,KAAK,EAAE,EACP,KAAK,iBAAiB,EAGvB,MAAM,OAAO,CAAC;AAOf,eAAO,MAAM,qBAAqB,kGAI9B,CAAC;AAEL,MAAM,MAAM,0BAA0B,GAAG;IACvC,aAAa,CAAC,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CACpC,iBAAiB,CAAC,0BAA0B,CAAC,CAK9C,CAAC;AAEF,eAAO,MAAM,gBAAgB,sBAA+C,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.6",
|
|
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.6",
|
|
56
|
+
"@intlayer/core": "5.1.6",
|
|
57
|
+
"@intlayer/editor": "5.1.6"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/node": "^22.10.6",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"react": ">=16.0.0",
|
|
78
78
|
"react-dom": ">=16.0.0",
|
|
79
|
-
"@intlayer/config": "5.1.
|
|
80
|
-
"@intlayer/
|
|
81
|
-
"@intlayer/
|
|
79
|
+
"@intlayer/config": "5.1.6",
|
|
80
|
+
"@intlayer/core": "5.1.6",
|
|
81
|
+
"@intlayer/editor": "5.1.6"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=14.18"
|