vue-intlayer 9.4.4 → 9.5.1

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/README.md CHANGED
@@ -69,8 +69,6 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
69
69
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/interoperability.png?raw=true" alt="Feature" width="700"> | **Interoperability**<br><br>Allow interoperability with react-i18next, next-i18next, next-intl, react-intl, vue-i18n. <br><br> - [Intlayer and react-intl](https://intlayer.org/blog/intlayer-with-react-intl) <br> - [Intlayer and next-intl](https://intlayer.org/blog/intlayer-with-next-intl) <br> - [Intlayer and next-i18next](https://intlayer.org/blog/intlayer-with-next-i18next) <br> - [Intlayer and vue-i18n](https://intlayer.org/blog/intlayer-with-vue-i18n) <br> - [Intlayer compat adapters](https://intlayer.org/doc/compatibility) |
70
70
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/benchmark.png?raw=true" alt="Feature" width="700"> | **Performances & Benchmark**<br><br>Uses advanced tree-shaking and dynamic loading to boost performances and keep the solution as light as possible. <br><br> - [Performances & Benchmark](https://intlayer.org/doc/benchmark) |
71
71
 
72
- ---
73
-
74
72
  ## 📦 Installation
75
73
 
76
74
  Start your journey with Intlayer today and experience a smoother, more powerful approach to internationalization.
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./installIntlayer.cjs"),t=require("./useLocaleStorage.cjs");let n=require("vue"),r=require("@intlayer/config/built");var i=({isCookieEnabled:i,onLocaleChange:a}={})=>{let{defaultLocale:o,locales:s}=r.internationalization??{},c=(0,n.inject)(e.INTLAYER_SYMBOL);return{locale:(0,n.computed)(()=>c?.locale?.value??o),defaultLocale:o,availableLocales:s,setLocale:e=>{if(!s?.map(String).includes(e)){console.error(`Locale ${e} is not available`);return}c&&c.setLocale(e),t.setLocaleInStorage(e,i??c?.isCookieEnabled??!0),a?.(e)}}};exports.useLocale=i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./installIntlayer.cjs"),t=require("./useLocaleStorage.cjs");let n=require("vue");var{defaultLocale:r,locales:i}=require("@intlayer/config/built").internationalization??{},a=({isCookieEnabled:a,onLocaleChange:o}={})=>{let s=(0,n.inject)(e.INTLAYER_SYMBOL);return{locale:(0,n.computed)(()=>s?.locale?.value??r),defaultLocale:r,availableLocales:i,setLocale:e=>{if(!i?.map(String).includes(e)){console.error(`Locale ${e} is not available`);return}s&&s.setLocale(e),t.setLocaleInStorage(e,a??s?.isCookieEnabled??!0),o?.(e)}}};exports.useLocale=a;
@@ -3,20 +3,20 @@ import { setLocaleInStorage as t } from "./useLocaleStorage.mjs";
3
3
  import { computed as n, inject as r } from "vue";
4
4
  import { internationalization as i } from "@intlayer/config/built";
5
5
  //#region src/client/useLocale.ts
6
- var a = ({ isCookieEnabled: a, onLocaleChange: o } = {}) => {
7
- let { defaultLocale: s, locales: c } = i ?? {}, l = r(e);
6
+ var { defaultLocale: a, locales: o } = i ?? {}, s = ({ isCookieEnabled: i, onLocaleChange: s } = {}) => {
7
+ let c = r(e);
8
8
  return {
9
- locale: n(() => l?.locale?.value ?? s),
10
- defaultLocale: s,
11
- availableLocales: c,
9
+ locale: n(() => c?.locale?.value ?? a),
10
+ defaultLocale: a,
11
+ availableLocales: o,
12
12
  setLocale: (e) => {
13
- if (!c?.map(String).includes(e)) {
13
+ if (!o?.map(String).includes(e)) {
14
14
  console.error(`Locale ${e} is not available`);
15
15
  return;
16
16
  }
17
- l && l.setLocale(e), t(e, a ?? l?.isCookieEnabled ?? !0), o?.(e);
17
+ c && c.setLocale(e), t(e, i ?? c?.isCookieEnabled ?? !0), s?.(e);
18
18
  }
19
19
  };
20
20
  };
21
21
  //#endregion
22
- export { a as useLocale };
22
+ export { s as useLocale };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intlayer",
3
- "version": "9.4.4",
3
+ "version": "9.5.1",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your Vue applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -102,14 +102,14 @@
102
102
  "typecheck": "vue-tsc --noEmit --project tsconfig.types.json"
103
103
  },
104
104
  "dependencies": {
105
- "@intlayer/api": "9.4.4",
106
- "@intlayer/config": "9.4.4",
107
- "@intlayer/core": "9.4.4",
108
- "@intlayer/editor": "9.4.4",
109
- "@intlayer/types": "9.4.4"
105
+ "@intlayer/api": "9.5.1",
106
+ "@intlayer/config": "9.5.1",
107
+ "@intlayer/core": "9.5.1",
108
+ "@intlayer/editor": "9.5.1",
109
+ "@intlayer/types": "9.5.1"
110
110
  },
111
111
  "devDependencies": {
112
- "@types/node": "26.4.1",
112
+ "@types/node": "26.5.0",
113
113
  "@utils/ts-config": "1.0.4",
114
114
  "@utils/ts-config-types": "1.0.4",
115
115
  "@utils/tsdown-config": "1.0.4",
@@ -125,7 +125,7 @@
125
125
  "vue-tsc": "3.3.9"
126
126
  },
127
127
  "peerDependencies": {
128
- "intlayer": "9.4.4",
128
+ "intlayer": "9.5.1",
129
129
  "vue": ">=3.0.0"
130
130
  },
131
131
  "peerDependenciesMeta": {
@@ -134,7 +134,7 @@
134
134
  }
135
135
  },
136
136
  "optionalDependencies": {
137
- "@intlayer/analytics": "9.4.4"
137
+ "@intlayer/analytics": "9.5.1"
138
138
  },
139
139
  "engines": {
140
140
  "node": ">=14.18"