vue-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.
- package/dist/cjs/client/installIntlayer.cjs +1 -1
- package/dist/cjs/editor/dictionariesRecord.cjs +1 -1
- package/dist/cjs/editor/editorLocale.cjs +1 -1
- package/dist/cjs/plugins.cjs +1 -1
- package/dist/esm/client/installIntlayer.mjs +2 -3
- package/dist/esm/editor/dictionariesRecord.mjs +18 -16
- package/dist/esm/editor/editorLocale.mjs +2 -3
- package/dist/esm/plugins.mjs +4 -5
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@intlayer/config/built"),i=require("vue");require("@intlayer/core");require("@intlayer/editor");require("@intlayer/types");require("../editor/communicator.cjs");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@intlayer/config/built"),i=require("vue");require("@intlayer/core");require("@intlayer/editor");require("@intlayer/types");require("../editor/communicator.cjs");require("./useLocaleStorage.cjs");const y=require("../editor/installIntlayerEditor.cjs"),o=Symbol("intlayer");let r=null;const a=(t,n=!0)=>{if(r)return r;const{defaultLocale:l}=s.internationalization??{},e=i.ref(t??l),c=u=>{e.value=u};return r={locale:i.readonly(e),setLocale:c,isCookieEnabled:n},r},d=(t,n,l=!0)=>{const e=a(n,l);t.provide(o,e),y.installIntlayerEditor(t,e)};exports.INTLAYER_SYMBOL=o;exports.createIntlayerClient=a;exports.installIntlayer=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";var u=Object.create;var n=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var I=(e,i,t,r)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of R(i))!C.call(e,o)&&o!==t&&n(e,o,{get:()=>i[o],enumerable:!(r=D(i,o))||r.enumerable});return e};var S=(e,i,t)=>(t=e!=null?u(m(e)):{},I(i||!e||!e.__esModule?n(t,"default",{value:e,enumerable:!0}):t,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("@intlayer/editor"),s=require("vue"),E=require("./createSharedComposable.cjs"),L=require("./useCrossFrameState.cjs");let c=null;const l=Symbol("intlayerDictionariesRecord"),d=()=>{if(c)return c;const e=s.ref(void 0);return c={localeDictionaries:s.readonly(e),setLocaleDictionaries:i=>{e.value=i??{}},setLocaleDictionary(i){e.value={...e.value,[i.localId]:i}}},c},_=e=>{const i=d();import("@intlayer/unmerged-dictionaries-entry").then(t=>{const r=t.getUnmergedDictionaries(),o=Object.fromEntries(Object.values(r).flat().map(a=>[a.localId,a]));i.setLocaleDictionaries(o)}),e.provide(l,i)},O=E.createSharedComposable(()=>{const e=s.inject(l);if(!e)throw new Error("DictionariesRecord state not found");const[i,t]=L.useCrossFrameState(v.MessageKey.INTLAYER_LOCALE_DICTIONARIES_CHANGED,void 0);s.watch(e.localeDictionaries,r=>{t(r)},{immediate:!0})});exports.createDictionaryRecordClient=d;exports.installDictionariesRecord=_;exports.useDictionariesRecord=O;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@intlayer/editor"),r=require("vue"),a=require("../client/installIntlayer.cjs");require("@intlayer/core");require("@intlayer/types");require("./communicator.cjs");require("@intlayer/config/built");const s=require("./createSharedComposable.cjs"),u=require("./useCrossFrameState.cjs");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@intlayer/editor"),r=require("vue"),a=require("../client/installIntlayer.cjs");require("@intlayer/core");require("@intlayer/types");require("./communicator.cjs");require("@intlayer/config/built");const s=require("./createSharedComposable.cjs"),u=require("./useCrossFrameState.cjs");require("./installIntlayerEditor.cjs");require("../client/useLocaleStorage.cjs");const n=s.createSharedComposable(()=>{const e=r.inject(a.INTLAYER_SYMBOL);if(!e)throw new Error("IntlayerEditor state not found");const[c,t]=u.useCrossFrameState(i.MessageKey.INTLAYER_CURRENT_LOCALE);return r.watch(e.locale,o=>{t(o)},{immediate:!0}),e});exports.useEditorLocale=n;
|
package/dist/cjs/plugins.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("@intlayer/core"),i=require("@intlayer/types"),u=require("vue"),l=require("../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-B4fMFrZy.js");require("./editor/installIntlayerEditor.cjs");require("@intlayer/config/built");require("@intlayer/editor");require("./editor/communicator.cjs");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("@intlayer/core"),i=require("@intlayer/types"),u=require("vue"),l=require("../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-B4fMFrZy.js");require("./editor/installIntlayerEditor.cjs");require("@intlayer/config/built");require("@intlayer/editor");require("./editor/communicator.cjs");require("./client/useLocaleStorage.cjs");const k=require("./markdown/installIntlayerMarkdown.cjs"),o=require("./renderIntlayerNode.cjs"),m={id:"intlayer-node-plugin",canHandle:e=>typeof e=="bigint"||typeof e=="string"||typeof e=="number",transform:(e,{children:n,...t})=>o.renderIntlayerNode({...t,value:n,children:()=>u.h(l._sfc_main,{dictionaryKey:t.dictionaryKey,keyPath:t.keyPath},{default:()=>n})})},y={id:"markdown-string-plugin",canHandle:e=>typeof e=="string",transform:(e,n,t)=>{const{plugins:d,...a}=n,s=p.getMarkdownMetadata(e),c=t(s,{plugins:[{id:"markdown-metadata-plugin",canHandle:r=>typeof r=="string"||typeof r=="number"||typeof r=="boolean"||!r,transform:(r,g)=>o.renderIntlayerNode({...g,value:r,children:e})}],dictionaryKey:a.dictionaryKey,keyPath:[]});return o.renderIntlayerNode({...n,value:e,children:()=>u.h(l._sfc_main,{dictionaryKey:a.dictionaryKey,keyPath:a.keyPath},{default:()=>{const{renderMarkdown:r}=k.useMarkdown();return r(e)}}),additionalProps:{metadata:c}})}},P={id:"markdown-plugin",canHandle:e=>typeof e=="object"&&e?.nodeType===i.NodeType.Markdown,transform:(e,n,t)=>{const d=[...n.keyPath,{type:i.NodeType.Markdown}],a=e[i.NodeType.Markdown];return t(a,{...n,children:a,keyPath:d,plugins:[y,...n.plugins??[]]})}};exports.intlayerNodePlugins=m;exports.markdownPlugin=P;exports.markdownStringPlugin=y;
|
|
@@ -4,7 +4,6 @@ import "@intlayer/core";
|
|
|
4
4
|
import "@intlayer/editor";
|
|
5
5
|
import "@intlayer/types";
|
|
6
6
|
import "../editor/communicator.mjs";
|
|
7
|
-
import "@intlayer/unmerged-dictionaries-entry";
|
|
8
7
|
import "./useLocaleStorage.mjs";
|
|
9
8
|
import { installIntlayerEditor as s } from "../editor/installIntlayerEditor.mjs";
|
|
10
9
|
const p = Symbol("intlayer");
|
|
@@ -19,12 +18,12 @@ const u = (o, e = !0) => {
|
|
|
19
18
|
setLocale: i,
|
|
20
19
|
isCookieEnabled: e
|
|
21
20
|
}, r;
|
|
22
|
-
},
|
|
21
|
+
}, S = (o, e, n = !0) => {
|
|
23
22
|
const t = u(e, n);
|
|
24
23
|
o.provide(p, t), s(o, t);
|
|
25
24
|
};
|
|
26
25
|
export {
|
|
27
26
|
p as INTLAYER_SYMBOL,
|
|
28
27
|
u as createIntlayerClient,
|
|
29
|
-
|
|
28
|
+
S as installIntlayer
|
|
30
29
|
};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { MessageKey as
|
|
2
|
-
import {
|
|
3
|
-
import { ref as l, readonly as m, inject as d, watch as D } from "vue";
|
|
1
|
+
import { MessageKey as s } from "@intlayer/editor";
|
|
2
|
+
import { ref as l, readonly as d, inject as m, watch as D } from "vue";
|
|
4
3
|
import { createSharedComposable as R } from "./createSharedComposable.mjs";
|
|
5
4
|
import { useCrossFrameState as u } from "./useCrossFrameState.mjs";
|
|
6
5
|
let o = null;
|
|
7
|
-
const
|
|
6
|
+
const n = Symbol(
|
|
8
7
|
"intlayerDictionariesRecord"
|
|
9
8
|
), f = () => {
|
|
10
9
|
if (o) return o;
|
|
11
10
|
const e = l(void 0);
|
|
12
11
|
return o = {
|
|
13
|
-
localeDictionaries:
|
|
12
|
+
localeDictionaries: d(e),
|
|
14
13
|
setLocaleDictionaries: (i) => {
|
|
15
14
|
e.value = i ?? {};
|
|
16
15
|
},
|
|
@@ -21,19 +20,22 @@ const a = Symbol(
|
|
|
21
20
|
};
|
|
22
21
|
}
|
|
23
22
|
}, o;
|
|
24
|
-
},
|
|
25
|
-
const i = f()
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
}, C = (e) => {
|
|
24
|
+
const i = f();
|
|
25
|
+
import("@intlayer/unmerged-dictionaries-entry").then((t) => {
|
|
26
|
+
const r = t.getUnmergedDictionaries(), a = Object.fromEntries(
|
|
27
|
+
Object.values(r).flat().map((c) => [c.localId, c])
|
|
28
|
+
);
|
|
29
|
+
i.setLocaleDictionaries(a);
|
|
30
|
+
}), e.provide(n, i);
|
|
31
|
+
}, v = R(() => {
|
|
32
|
+
const e = m(
|
|
33
|
+
n
|
|
32
34
|
);
|
|
33
35
|
if (!e)
|
|
34
36
|
throw new Error("DictionariesRecord state not found");
|
|
35
37
|
const [i, t] = u(
|
|
36
|
-
|
|
38
|
+
s.INTLAYER_LOCALE_DICTIONARIES_CHANGED,
|
|
37
39
|
void 0
|
|
38
40
|
);
|
|
39
41
|
D(
|
|
@@ -46,6 +48,6 @@ const a = Symbol(
|
|
|
46
48
|
});
|
|
47
49
|
export {
|
|
48
50
|
f as createDictionaryRecordClient,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
C as installDictionariesRecord,
|
|
52
|
+
v as useDictionariesRecord
|
|
51
53
|
};
|
|
@@ -7,10 +7,9 @@ import "./communicator.mjs";
|
|
|
7
7
|
import "@intlayer/config/built";
|
|
8
8
|
import { createSharedComposable as p } from "./createSharedComposable.mjs";
|
|
9
9
|
import { useCrossFrameState as s } from "./useCrossFrameState.mjs";
|
|
10
|
-
import "@intlayer/unmerged-dictionaries-entry";
|
|
11
10
|
import "./installIntlayerEditor.mjs";
|
|
12
11
|
import "../client/useLocaleStorage.mjs";
|
|
13
|
-
const
|
|
12
|
+
const w = p(() => {
|
|
14
13
|
const t = m(a);
|
|
15
14
|
if (!t)
|
|
16
15
|
throw new Error("IntlayerEditor state not found");
|
|
@@ -26,5 +25,5 @@ const A = p(() => {
|
|
|
26
25
|
), t;
|
|
27
26
|
});
|
|
28
27
|
export {
|
|
29
|
-
|
|
28
|
+
w as useEditorLocale
|
|
30
29
|
};
|
package/dist/esm/plugins.mjs
CHANGED
|
@@ -6,11 +6,10 @@ import "./editor/installIntlayerEditor.mjs";
|
|
|
6
6
|
import "@intlayer/config/built";
|
|
7
7
|
import "@intlayer/editor";
|
|
8
8
|
import "./editor/communicator.mjs";
|
|
9
|
-
import "@intlayer/unmerged-dictionaries-entry";
|
|
10
9
|
import "./client/useLocaleStorage.mjs";
|
|
11
10
|
import { useMarkdown as u } from "./markdown/installIntlayerMarkdown.mjs";
|
|
12
11
|
import { renderIntlayerNode as i } from "./renderIntlayerNode.mjs";
|
|
13
|
-
const
|
|
12
|
+
const j = {
|
|
14
13
|
id: "intlayer-node-plugin",
|
|
15
14
|
canHandle: (t) => typeof t == "bigint" || typeof t == "string" || typeof t == "number",
|
|
16
15
|
transform: (t, { children: n, ...a }) => i({
|
|
@@ -71,7 +70,7 @@ const x = {
|
|
|
71
70
|
}
|
|
72
71
|
});
|
|
73
72
|
}
|
|
74
|
-
},
|
|
73
|
+
}, x = {
|
|
75
74
|
id: "markdown-plugin",
|
|
76
75
|
canHandle: (t) => typeof t == "object" && t?.nodeType === e.Markdown,
|
|
77
76
|
transform: (t, n, a) => {
|
|
@@ -90,7 +89,7 @@ const x = {
|
|
|
90
89
|
}
|
|
91
90
|
};
|
|
92
91
|
export {
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
j as intlayerNodePlugins,
|
|
93
|
+
x as markdownPlugin,
|
|
95
94
|
f as markdownStringPlugin
|
|
96
95
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-intlayer",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Vue applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -86,12 +86,12 @@
|
|
|
86
86
|
"typecheck": "vue-tsc --noEmit --project tsconfig.types.json"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@intlayer/api": "7.2.
|
|
90
|
-
"@intlayer/config": "7.2.
|
|
91
|
-
"@intlayer/core": "7.2.
|
|
92
|
-
"@intlayer/editor": "7.2.
|
|
93
|
-
"@intlayer/types": "7.2.
|
|
94
|
-
"@intlayer/unmerged-dictionaries-entry": "7.2.
|
|
89
|
+
"@intlayer/api": "7.2.2",
|
|
90
|
+
"@intlayer/config": "7.2.2",
|
|
91
|
+
"@intlayer/core": "7.2.1",
|
|
92
|
+
"@intlayer/editor": "7.2.2",
|
|
93
|
+
"@intlayer/types": "7.2.2",
|
|
94
|
+
"@intlayer/unmerged-dictionaries-entry": "7.2.2"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
97
|
"@types/node": "24.10.1",
|
|
@@ -101,16 +101,16 @@
|
|
|
101
101
|
"@vitejs/plugin-vue": "6.0.1",
|
|
102
102
|
"ajv": "^8.17.1",
|
|
103
103
|
"fast-glob": "3.3.3",
|
|
104
|
-
"rimraf": "6.1.
|
|
105
|
-
"tsdown": "0.16.
|
|
104
|
+
"rimraf": "6.1.2",
|
|
105
|
+
"tsdown": "0.16.6",
|
|
106
106
|
"typescript": "5.9.3",
|
|
107
107
|
"vite": "7.2.2",
|
|
108
108
|
"vite-plugin-dts": "4.5.4",
|
|
109
|
-
"vitest": "4.0.
|
|
109
|
+
"vitest": "4.0.12",
|
|
110
110
|
"vue-tsc": "3.1.1"
|
|
111
111
|
},
|
|
112
112
|
"peerDependencies": {
|
|
113
|
-
"intlayer": "7.2.
|
|
113
|
+
"intlayer": "7.2.2",
|
|
114
114
|
"vue": ">=3.0.0"
|
|
115
115
|
},
|
|
116
116
|
"peerDependenciesMeta": {
|