solid-intlayer 7.2.0 → 7.2.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";var a=Object.create;var c=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var p=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var f=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of l(t))!m.call(e,i)&&i!==o&&c(e,i,{get:()=>t[i],enumerable:!(n=u(t,i))||n.enumerable});return e};var g=(e,t,o)=>(o=e!=null?a(p(e)):{},f(t||!e||!e.__esModule?c(o,"default",{value:e,enumerable:!0}):o,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("../../web-Ch-xTpJg.js"),d=require("@intlayer/config/built"),s=require("solid-js");require("@intlayer/editor");require("./contexts/ConfigurationContext.cjs");const q=require("./contexts/DictionariesRecordContext.cjs");require("./contexts/EditedContentContext.cjs");const I=require("./contexts/EditorEnabledContext.cjs"),L=require("./contexts/EditorProvider.cjs");require("./contexts/FocusDictionaryContext.cjs");require("./contexts/CommunicatorContext.cjs");const R=require("./contexts/useCrossURLPathState.cjs"),E=require("./contexts/useIframeClickInterceptor.cjs"),U=()=>{R.useCrossURLPathSetter(),E.useIframeClickInterceptor();const{setLocaleDictionaries:e}=q.useDictionariesRecordActions()??{};return s.onMount(()=>{import("@intlayer/unmerged-dictionaries-entry").then(t=>{const o=t.getUnmergedDictionaries(),n=Object.fromEntries(Object.values(o).flat().map(i=>[i.localId,i]));e?.(n)})}),[]},{editor:r}=d,_=()=>{const{enabled:e}=I.useEditorEnabled();return e()?s.createComponent(U,{}):[]},b=e=>s.createComponent(L.EditorProvider,{postMessage:t=>{typeof window>"u"||!(window.self!==window.top)||(r.applicationURL.length>0&&window?.postMessage(t,r.applicationURL),r.editorURL.length>0&&window.parent?.postMessage(t,r.editorURL),r.cmsURL.length>0&&window.parent?.postMessage(t,r.cmsURL))},get allowedOrigins(){return[r?.editorURL,r?.cmsURL,r?.applicationURL]},configuration:d,get children(){return[s.createComponent(_,{}),w.memo(()=>e.children)]}});exports.IntlayerEditorProvider=b;
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { m } from "../../web-mv0y5CK4.mjs";
|
|
1
|
+
import { m as p } from "../../web-mv0y5CK4.mjs";
|
|
2
2
|
import s from "@intlayer/config/built";
|
|
3
|
-
import {
|
|
4
|
-
import { createComponent as e, onMount as a } from "solid-js";
|
|
3
|
+
import { createComponent as r, onMount as a } from "solid-js";
|
|
5
4
|
import "@intlayer/editor";
|
|
6
5
|
import "./contexts/ConfigurationContext.mjs";
|
|
7
6
|
import { useDictionariesRecordActions as c } from "./contexts/DictionariesRecordContext.mjs";
|
|
8
7
|
import "./contexts/EditedContentContext.mjs";
|
|
9
8
|
import { useEditorEnabled as d } from "./contexts/EditorEnabledContext.mjs";
|
|
10
|
-
import { EditorProvider as
|
|
9
|
+
import { EditorProvider as l } from "./contexts/EditorProvider.mjs";
|
|
11
10
|
import "./contexts/FocusDictionaryContext.mjs";
|
|
12
11
|
import "./contexts/CommunicatorContext.mjs";
|
|
13
|
-
import { useCrossURLPathSetter as
|
|
12
|
+
import { useCrossURLPathSetter as f } from "./contexts/useCrossURLPathState.mjs";
|
|
14
13
|
import { useIframeClickInterceptor as u } from "./contexts/useIframeClickInterceptor.mjs";
|
|
15
14
|
const g = () => {
|
|
16
|
-
|
|
15
|
+
f(), u();
|
|
17
16
|
const {
|
|
18
17
|
setLocaleDictionaries: t
|
|
19
18
|
} = c() ?? {};
|
|
20
19
|
return a(() => {
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
import("@intlayer/unmerged-dictionaries-entry").then((e) => {
|
|
21
|
+
const i = e.getUnmergedDictionaries(), m = Object.fromEntries(Object.values(i).flat().map((n) => [n.localId, n]));
|
|
22
|
+
t?.(m);
|
|
23
|
+
});
|
|
23
24
|
}), [];
|
|
24
25
|
}, {
|
|
25
26
|
editor: o
|
|
@@ -27,21 +28,21 @@ const g = () => {
|
|
|
27
28
|
const {
|
|
28
29
|
enabled: t
|
|
29
30
|
} = d();
|
|
30
|
-
return t() ?
|
|
31
|
-
},
|
|
32
|
-
postMessage: (
|
|
31
|
+
return t() ? r(g, {}) : [];
|
|
32
|
+
}, O = (t) => r(l, {
|
|
33
|
+
postMessage: (e) => {
|
|
33
34
|
typeof window > "u" || !(window.self !== window.top) || (o.applicationURL.length > 0 && window?.postMessage(
|
|
34
|
-
|
|
35
|
+
e,
|
|
35
36
|
// Use to restrict the origin of the editor for security reasons.
|
|
36
37
|
// Correspond to the current application URL to synchronize the locales states.
|
|
37
38
|
o.applicationURL
|
|
38
39
|
), o.editorURL.length > 0 && window.parent?.postMessage(
|
|
39
|
-
|
|
40
|
+
e,
|
|
40
41
|
// Use to restrict the origin of the editor for security reasons.
|
|
41
42
|
// Correspond to the editor URL to synchronize the locales states.
|
|
42
43
|
o.editorURL
|
|
43
44
|
), o.cmsURL.length > 0 && window.parent?.postMessage(
|
|
44
|
-
|
|
45
|
+
e,
|
|
45
46
|
// Use to restrict the origin of the CMS for security reasons.
|
|
46
47
|
// Correspond to the CMS URL.
|
|
47
48
|
o.cmsURL
|
|
@@ -52,9 +53,9 @@ const g = () => {
|
|
|
52
53
|
},
|
|
53
54
|
configuration: s,
|
|
54
55
|
get children() {
|
|
55
|
-
return [
|
|
56
|
+
return [r(w, {}), p(() => t.children)];
|
|
56
57
|
}
|
|
57
58
|
});
|
|
58
59
|
export {
|
|
59
|
-
|
|
60
|
+
O as IntlayerEditorProvider
|
|
60
61
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-intlayer",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Solid applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -73,14 +73,14 @@
|
|
|
73
73
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@intlayer/api": "7.2.
|
|
77
|
-
"@intlayer/config": "7.2.
|
|
78
|
-
"@intlayer/core": "7.2.
|
|
79
|
-
"@intlayer/editor": "7.2.
|
|
80
|
-
"@intlayer/types": "7.2.
|
|
76
|
+
"@intlayer/api": "7.2.2",
|
|
77
|
+
"@intlayer/config": "7.2.2",
|
|
78
|
+
"@intlayer/core": "7.2.1",
|
|
79
|
+
"@intlayer/editor": "7.2.2",
|
|
80
|
+
"@intlayer/types": "7.2.2"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@intlayer/unmerged-dictionaries-entry": "7.2.
|
|
83
|
+
"@intlayer/unmerged-dictionaries-entry": "7.2.2",
|
|
84
84
|
"@solidjs/testing-library": "0.8.10",
|
|
85
85
|
"@testing-library/jest-dom": "6.9.1",
|
|
86
86
|
"@testing-library/user-event": "14.6.1",
|
|
@@ -89,13 +89,13 @@
|
|
|
89
89
|
"@utils/ts-config-types": "1.0.4",
|
|
90
90
|
"@utils/tsdown-config": "1.0.4",
|
|
91
91
|
"jsdom": "26.1.0",
|
|
92
|
-
"rimraf": "6.1.
|
|
93
|
-
"tsdown": "0.16.
|
|
92
|
+
"rimraf": "6.1.2",
|
|
93
|
+
"tsdown": "0.16.6",
|
|
94
94
|
"typescript": "5.9.3",
|
|
95
95
|
"vite": "7.2.2",
|
|
96
96
|
"vite-plugin-dts": "4.5.4",
|
|
97
97
|
"vite-plugin-solid": "2.11.6",
|
|
98
|
-
"vitest": "4.0.
|
|
98
|
+
"vitest": "4.0.12"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
101
|
"solid-js": ">=1.0.0"
|