vue-intlayer 5.4.0 → 5.4.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 c=require("@intlayer/config/built"),a=require("@intlayer/core"),r=require("vue"),d=require("./installIntlayer.cjs"),q=require("./useLocaleCookie.cjs"),L=({onLocaleChange:s}={})=>{const{defaultLocale:i,locales:o}=(c==null?void 0:c.internationalization)??{},t=r.inject(d.INTLAYER_SYMBOL),{setLocaleCookie:l}=q.useLocaleCookie(),u=r.computed(()=>{var e;return((e=t==null?void 0:t.locale)==null?void 0:e.value)??i}),n=e=>{if(!(o!=null&&o.map(String).includes(e))){console.error(`Locale ${e} is not available`);return}t&&t.setLocale(e),l(e),s==null||s(e)};return{locale:u,defaultLocale:i,availableLocales:o,localeList:a.localeList,setLocale:n}};exports.useLocale=L;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@intlayer/config/built"),i=require("vue"),u=require("./installIntlayer.cjs"),n=require("./useLocaleCookie.cjs"),a=({onLocaleChange:s}={})=>{const{defaultLocale:l,locales:o}=(c==null?void 0:c.internationalization)??{},t=i.inject(u.INTLAYER_SYMBOL),{setLocaleCookie:r}=n.useLocaleCookie();return{locale:i.computed(()=>{var e;return((e=t==null?void 0:t.locale)==null?void 0:e.value)??l}),defaultLocale:l,availableLocales:o,setLocale:e=>{if(!(o!=null&&o.map(String).includes(e))){console.error(`Locale ${e} is not available`);return}t&&t.setLocale(e),r(e),s==null||s(e)}}};exports.useLocale=a;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@intlayer/core"),l=require("vue"),y=require("../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-CE_1sBPk.js");require("./editor/installIntlayerEditor.cjs");const k=require("./markdown/installIntlayerMarkdown.cjs"),o=require("./renderIntlayerNode.cjs"),p={id:"intlayer-node-plugin",canHandle:e=>typeof e=="bigint"||typeof e=="string"||typeof e=="number",transform:(e,{children:n,...r})=>o.renderIntlayerNode({...r,value:n,children:()=>l.h(y._sfc_main,{dictionaryKey:r.dictionaryKey,keyPath:r.keyPath},{default:()=>n})})},u={id:"markdown-string-plugin",canHandle:e=>typeof e=="string",transform:(e,n,r)=>{const{plugins:d,...a}=n,s=i.getMarkdownMetadata(e),c=r(s,{plugins:[{id:"markdown-metadata-plugin",canHandle:t=>typeof t=="string"||typeof t=="number"||typeof t=="boolean"||!t,transform:(t,g)=>o.renderIntlayerNode({...g,value:t,children:e})}],dictionaryKey:a.dictionaryKey,keyPath:[]});return o.renderIntlayerNode({...n,value:e,children:l.h(y._sfc_main,{dictionaryKey:a.dictionaryKey,keyPath:a.keyPath},{default:()=>{const{renderMarkdown:t}=k.useMarkdown();return t(e)}}),additionalProps:{metadata:c}})}},m={id:"markdown-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===i.NodeType.Markdown,transform:(e,n,r)=>{const d=[...n.keyPath,{type:i.NodeType.Markdown}],a=e[i.NodeType.Markdown];return r(a,{...n,children:a,keyPath:d,plugins:[u,...n.plugins??[]]})}};exports.intlayerNodePlugins=p;exports.markdownPlugin=m;exports.markdownStringPlugin=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@intlayer/core"),l=require("vue"),y=require("../ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-CE_1sBPk.js");require("./editor/installIntlayerEditor.cjs");const k=require("./markdown/installIntlayerMarkdown.cjs"),o=require("./renderIntlayerNode.cjs"),p={id:"intlayer-node-plugin",canHandle:e=>typeof e=="bigint"||typeof e=="string"||typeof e=="number",transform:(e,{children:n,...r})=>o.renderIntlayerNode({...r,value:n,children:()=>l.h(y._sfc_main,{dictionaryKey:r.dictionaryKey,keyPath:r.keyPath},{default:()=>n})})},u={id:"markdown-string-plugin",canHandle:e=>typeof e=="string",transform:(e,n,r)=>{const{plugins:d,...a}=n,s=i.getMarkdownMetadata(e),c=r(s,{plugins:[{id:"markdown-metadata-plugin",canHandle:t=>typeof t=="string"||typeof t=="number"||typeof t=="boolean"||!t,transform:(t,g)=>o.renderIntlayerNode({...g,value:t,children:e})}],dictionaryKey:a.dictionaryKey,keyPath:[]});return o.renderIntlayerNode({...n,value:e,children:()=>l.h(y._sfc_main,{dictionaryKey:a.dictionaryKey,keyPath:a.keyPath},{default:()=>{const{renderMarkdown:t}=k.useMarkdown();return t(e)}}),additionalProps:{metadata:c}})}},m={id:"markdown-plugin",canHandle:e=>typeof e=="object"&&(e==null?void 0:e.nodeType)===i.NodeType.Markdown,transform:(e,n,r)=>{const d=[...n.keyPath,{type:i.NodeType.Markdown}],a=e[i.NodeType.Markdown];return r(a,{...n,children:a,keyPath:d,plugins:[u,...n.plugins??[]]})}};exports.intlayerNodePlugins=p;exports.markdownPlugin=m;exports.markdownStringPlugin=u;
@@ -1,11 +1,10 @@
1
1
  import l from "@intlayer/config/built";
2
- import { localeList as m } from "@intlayer/core";
3
- import { inject as f, computed as u } from "vue";
4
- import { INTLAYER_SYMBOL as p } from "./installIntlayer.mjs";
5
- import { useLocaleCookie as a } from "./useLocaleCookie.mjs";
6
- const v = ({ onLocaleChange: i } = {}) => {
2
+ import { inject as m, computed as u } from "vue";
3
+ import { INTLAYER_SYMBOL as f } from "./installIntlayer.mjs";
4
+ import { useLocaleCookie as p } from "./useLocaleCookie.mjs";
5
+ const j = ({ onLocaleChange: i } = {}) => {
7
6
  var c;
8
- const { defaultLocale: s, locales: r } = ((c = l) == null ? void 0 : c.internationalization) ?? {}, t = f(p), { setLocaleCookie: e } = a();
7
+ const { defaultLocale: s, locales: r } = ((c = l) == null ? void 0 : c.internationalization) ?? {}, t = m(f), { setLocaleCookie: e } = p();
9
8
  return {
10
9
  locale: u(() => {
11
10
  var o;
@@ -16,8 +15,6 @@ const v = ({ onLocaleChange: i } = {}) => {
16
15
  // Principal locale defined in config
17
16
  availableLocales: r,
18
17
  // List of the available locales defined in config
19
- localeList: m,
20
- // List of all available locales
21
18
  setLocale: (o) => {
22
19
  if (!(r != null && r.map(String).includes(o))) {
23
20
  console.error(`Locale ${o} is not available`);
@@ -29,5 +26,5 @@ const v = ({ onLocaleChange: i } = {}) => {
29
26
  };
30
27
  };
31
28
  export {
32
- v as useLocale
29
+ j as useLocale
33
30
  };
@@ -46,7 +46,7 @@ const b = {
46
46
  return o({
47
47
  ...t,
48
48
  value: n,
49
- children: d(
49
+ children: () => d(
50
50
  // EditorSelectorRenderer, // Maximum stack size exceeded
51
51
  l,
52
52
  {
@@ -9,7 +9,6 @@ export declare const useLocale: ({ onLocaleChange }?: useLocaleProps) => {
9
9
  locale: import('vue').ComputedRef<import('intlayer').Locales>;
10
10
  defaultLocale: import('intlayer').Locales;
11
11
  availableLocales: import('intlayer').Locales[];
12
- localeList: import('intlayer').Locales[];
13
12
  setLocale: (newLocale: LocalesValues) => void;
14
13
  };
15
14
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"useLocale.d.ts","sourceRoot":"","sources":["../../../src/client/useLocale.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAM7D,KAAK,cAAc,GAAG;IACpB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,qBAAoB,cAAmB;;;;;2BASjC,aAAa;CAoB5C,CAAC"}
1
+ {"version":3,"file":"useLocale.d.ts","sourceRoot":"","sources":["../../../src/client/useLocale.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAK7D,KAAK,cAAc,GAAG;IACpB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,S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9F,eAAO,MAAM,oBAAoB,EAAE,OAwDlC,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS;IACtC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC5B,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;CACpB,GACG,YAAY,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE;IAAE,QAAQ,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC,GAC5E,KAAK,CAAC;AAEV,eAAO,MAAM,cAAc,EAAE,OAqB5B,CAAC;AAEF;;oDAEoD;AAEpD,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,YAAY,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAClC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,GAAG;IAClE,YAAY,EAAE,IAAI,CAAC;IACnB,QAAQ,EAAE,IAAI,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,wBAAwB,CAC5D,CAAC,EACD,uBAAuB,CACxB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intlayer",
3
- "version": "5.4.0",
3
+ "version": "5.4.2",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your Vue applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -70,11 +70,11 @@
70
70
  "dependencies": {
71
71
  "js-cookie": "^3.0.5",
72
72
  "uuid": "^11.1.0",
73
- "@intlayer/config": "5.4.0",
74
- "@intlayer/dictionaries-entry": "5.4.0",
75
- "@intlayer/core": "5.4.0",
76
- "@intlayer/api": "5.4.0",
77
- "@intlayer/editor": "5.4.0"
73
+ "@intlayer/config": "5.4.2",
74
+ "@intlayer/core": "5.4.2",
75
+ "@intlayer/api": "5.4.2",
76
+ "@intlayer/dictionaries-entry": "5.4.2",
77
+ "@intlayer/editor": "5.4.2"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@types/js-cookie": "^3.0.6",
@@ -89,19 +89,19 @@
89
89
  "typescript": "^5.8.2",
90
90
  "vite": "^6.3.1",
91
91
  "vite-plugin-dts": "^4.5.3",
92
- "@intlayer/backend": "5.4.0",
93
92
  "@utils/eslint-config": "1.0.4",
94
93
  "@utils/ts-config": "1.0.4",
95
94
  "@utils/ts-config-types": "1.0.4",
95
+ "@intlayer/backend": "5.4.2",
96
96
  "@utils/tsup-config": "1.0.4"
97
97
  },
98
98
  "peerDependencies": {
99
99
  "vue": "^3.5.13",
100
- "@intlayer/config": "5.4.0",
101
- "@intlayer/api": "5.4.0",
102
- "@intlayer/core": "5.4.0",
103
- "@intlayer/dictionaries-entry": "5.4.0",
104
- "intlayer": "5.4.0"
100
+ "@intlayer/dictionaries-entry": "5.4.2",
101
+ "@intlayer/api": "5.4.2",
102
+ "@intlayer/core": "5.4.2",
103
+ "@intlayer/config": "5.4.2",
104
+ "intlayer": "5.4.2"
105
105
  },
106
106
  "engines": {
107
107
  "node": ">=14.18"