vue-intlayer 5.4.0-canary.0 → 5.4.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.
@@ -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,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
  };
@@ -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,SAAS,GAAI,qBAAoB,cAAmB;;;;2BASjC,aAAa;CAmB5C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intlayer",
3
- "version": "5.4.0-canary.0",
3
+ "version": "5.4.1",
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/api": "5.4.0-canary.0",
74
- "@intlayer/dictionaries-entry": "5.4.0-canary.0",
75
- "@intlayer/config": "5.4.0-canary.0",
76
- "@intlayer/core": "5.4.0-canary.0",
77
- "@intlayer/editor": "5.4.0-canary.0"
73
+ "@intlayer/config": "5.4.1",
74
+ "@intlayer/core": "5.4.1",
75
+ "@intlayer/api": "5.4.1",
76
+ "@intlayer/dictionaries-entry": "5.4.1",
77
+ "@intlayer/editor": "5.4.1"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@types/js-cookie": "^3.0.6",
@@ -91,17 +91,17 @@
91
91
  "vite-plugin-dts": "^4.5.3",
92
92
  "@utils/eslint-config": "1.0.4",
93
93
  "@utils/ts-config": "1.0.4",
94
- "@intlayer/backend": "5.4.0-canary.0",
94
+ "@utils/tsup-config": "1.0.4",
95
95
  "@utils/ts-config-types": "1.0.4",
96
- "@utils/tsup-config": "1.0.4"
96
+ "@intlayer/backend": "5.4.1"
97
97
  },
98
98
  "peerDependencies": {
99
99
  "vue": "^3.5.13",
100
- "@intlayer/core": "5.4.0-canary.0",
101
- "@intlayer/config": "5.4.0-canary.0",
102
- "@intlayer/api": "5.4.0-canary.0",
103
- "@intlayer/dictionaries-entry": "5.4.0-canary.0",
104
- "intlayer": "5.4.0-canary.0"
100
+ "@intlayer/api": "5.4.1",
101
+ "@intlayer/config": "5.4.1",
102
+ "@intlayer/dictionaries-entry": "5.4.1",
103
+ "@intlayer/core": "5.4.1",
104
+ "intlayer": "5.4.1"
105
105
  },
106
106
  "engines": {
107
107
  "node": ">=14.18"