@intlayer/vue-i18n 9.7.0 → 9.7.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,14 +1,14 @@
1
1
  import { formatDateValue, formatNumberValue } from "./formats.mjs";
2
2
  import { parseTranslateArguments, resolveVueMessage } from "./resolveVueMessage.mjs";
3
- import { navigatePath } from "@intlayer/core/messageFormat";
4
3
  import { internationalization, log } from "@intlayer/config/built";
5
4
  import * as ANSIColors from "@intlayer/config/colors";
6
5
  import { colorize, getAppLogger } from "@intlayer/config/logger";
7
6
  import { getIntlayer } from "@intlayer/core/interpreter";
7
+ import { navigatePath } from "@intlayer/core/messageFormat";
8
8
  import { computed, inject } from "vue";
9
9
  import { INTLAYER_SYMBOL, createIntlayerClient, installIntlayer, useLocale } from "vue-intlayer";
10
10
 
11
- //#region src/createI18n.ts
11
+ // src/createI18n.ts
12
12
  const VERSION = "9.13.1";
13
13
  const I18nInjectionKey = Symbol("global-i18n");
14
14
  /**
@@ -214,6 +214,5 @@ const useI18n = ((options) => {
214
214
  };
215
215
  });
216
216
 
217
- //#endregion
218
217
  export { I18nInjectionKey, VERSION, createI18n, useI18n };
219
218
  //# sourceMappingURL=createI18n.mjs.map
@@ -1,4 +1,4 @@
1
- //#region src/formats.ts
1
+ // src/formats.ts
2
2
  const resolveNamedOptions = (formatOrOptions, locale, namedFormats) => {
3
3
  if (typeof formatOrOptions === "string") return namedFormats?.[locale]?.[formatOrOptions] ?? namedFormats?.[locale.split("-")[0] ?? ""]?.[formatOrOptions];
4
4
  return formatOrOptions;
@@ -23,6 +23,5 @@ const formatNumberValue = (value, formatOrOptions, locale, numberFormats) => {
23
23
  }
24
24
  };
25
25
 
26
- //#endregion
27
26
  export { formatDateValue, formatNumberValue };
28
27
  //# sourceMappingURL=formats.mjs.map
@@ -1,5 +1,5 @@
1
1
  import { I18nInjectionKey, VERSION, createI18n, useI18n } from "./createI18n.mjs";
2
- import { useDictionaryDynamic } from "./useDictionaryDynamic.mjs";
3
2
  import { useDictionary } from "./useDictionary.mjs";
3
+ import { useDictionaryDynamic } from "./useDictionaryDynamic.mjs";
4
4
 
5
5
  export { I18nInjectionKey, VERSION, createI18n, useDictionary, useDictionaryDynamic, useI18n };
@@ -6,7 +6,7 @@ import { getConfiguration } from "@intlayer/config/node";
6
6
  import { runOnce } from "@intlayer/engine/utils";
7
7
  import { intlayer } from "vite-intlayer";
8
8
 
9
- //#region src/plugin/index.ts
9
+ // src/plugin/index.ts
10
10
  /**
11
11
  * A Vite plugin for vue-i18n compat that wraps vite-intlayer
12
12
  * and configures resolve aliases for vue-i18n.
@@ -30,6 +30,5 @@ const vueI18nVitePlugin = (options) => {
30
30
  return [...Array.isArray(basePlugins) ? basePlugins : [basePlugins], compatPlugin];
31
31
  };
32
32
 
33
- //#endregion
34
33
  export { vueI18nVitePlugin as default, vueI18nVitePlugin };
35
34
  //# sourceMappingURL=index.mjs.map
@@ -1,6 +1,6 @@
1
1
  import { interpolateMessage, resolveMessageNode } from "@intlayer/core/messageFormat";
2
2
 
3
- //#region src/resolveVueMessage.ts
3
+ // src/resolveVueMessage.ts
4
4
  /**
5
5
  * Splits a vue-i18n choice message (`'no car | one car | {count} cars'`)
6
6
  * into its parts, honoring escaped pipes (`\|`).
@@ -57,6 +57,5 @@ const resolveVueMessage = (value, values, count, locale) => {
57
57
  return typeof resolved === "string" ? resolved : String(resolved ?? "");
58
58
  };
59
59
 
60
- //#endregion
61
60
  export { getChoiceIndex, parseTranslateArguments, resolveVueMessage, splitChoices };
62
61
  //# sourceMappingURL=resolveVueMessage.mjs.map
@@ -4,7 +4,7 @@ import { navigatePath } from "@intlayer/core/messageFormat";
4
4
  import { computed } from "vue";
5
5
  import { useDictionary as useDictionary$1, useLocale } from "vue-intlayer";
6
6
 
7
- //#region src/useDictionary.ts
7
+ // src/useDictionary.ts
8
8
  /**
9
9
  * Dictionary-accepting variant of `useI18n`.
10
10
  *
@@ -55,6 +55,5 @@ const useDictionary = ((dictionary, options) => {
55
55
  };
56
56
  });
57
57
 
58
- //#endregion
59
58
  export { useDictionary };
60
59
  //# sourceMappingURL=useDictionary.mjs.map
@@ -4,7 +4,7 @@ import { navigatePath } from "@intlayer/core/messageFormat";
4
4
  import { computed } from "vue";
5
5
  import { useDictionaryDynamic as useDictionaryDynamic$1, useLocale } from "vue-intlayer";
6
6
 
7
- //#region src/useDictionaryDynamic.ts
7
+ // src/useDictionaryDynamic.ts
8
8
  /**
9
9
  * Dynamic dictionary-accepting variant of `useI18n`.
10
10
  *
@@ -55,6 +55,5 @@ const useDictionaryDynamic = ((dictionaryPromise, key, options) => {
55
55
  };
56
56
  });
57
57
 
58
- //#endregion
59
58
  export { useDictionaryDynamic };
60
59
  //# sourceMappingURL=useDictionaryDynamic.mjs.map
@@ -2,7 +2,6 @@ import { LooseComposer, TypedComposer } from "./typedComposer.js";
2
2
  import { DictionaryKeys } from "@intlayer/types/module_augmentation";
3
3
  import { InjectionKey } from "vue";
4
4
  import { I18n, createI18n as createI18n$1 } from "vue-i18n";
5
- //#region src/createI18n.d.ts
6
5
  export declare const VERSION = "9.13.1";
7
6
  export declare const I18nInjectionKey: InjectionKey<I18n>;
8
7
  export declare const createI18n: typeof createI18n$1;
@@ -38,5 +37,5 @@ type UseI18n = {
38
37
  * ```
39
38
  */
40
39
  export declare const useI18n: UseI18n;
41
- //#endregion
40
+ export {};
42
41
  //# sourceMappingURL=createI18n.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createI18n.d.ts","names":[],"sources":["../../src/createI18n.ts"],"mappings":";;;;;qBAmCa;qBACA,kBAAkB,aAAa;qBAmI/B,mBAAmB;;;;;;;KA6K3B;GACF,UAAU,gBACT,SAAS;IAA4B,WAAW;MAC/C,cAAc;GAEf,UAAU;IAA4B;MACrC;;;;;;;;;;;;;;;;;;;qBAoBQ,SAqEP"}
1
+ {"version":3,"file":"createI18n.d.ts","names":["_createI18n"],"sources":["../../src/createI18n.ts"],"mappings":";;;;qBAmCa;qBACA,kBAAkB,aAAa;qBAmI/B,mBAAmBA;;;;;;;KA6K3B;GACF,UAAU,gBACT,SAAS;IAA4B,WAAW;MAC/C,cAAc;GAEf,UAAU;IAA4B;MACrC;;;;;;;;;;;;;;;;;;;qBAoBQ,SAqEP"}
@@ -1,4 +1,3 @@
1
- //#region src/formats.d.ts
2
1
  /**
3
2
  * Locale-aware `d()` / `n()` formatting backed by the native `Intl.*` APIs,
4
3
  * honoring the `datetimeFormats` / `numberFormats` maps from `createI18n`
@@ -12,5 +11,4 @@ export type NumberFormatsConfig = Record<string, Record<string, Intl.NumberForma
12
11
  export declare const formatDateValue: (value: Date | number | string, formatOrOptions: string | Intl.DateTimeFormatOptions | undefined, locale: string, datetimeFormats?: DateTimeFormatsConfig) => string;
13
12
  /** Formats a number value like vue-i18n's `n()`. */
14
13
  export declare const formatNumberValue: (value: number, formatOrOptions: string | Intl.NumberFormatOptions | undefined, locale: string, numberFormats?: NumberFormatsConfig) => string;
15
- //#endregion
16
14
  //# sourceMappingURL=formats.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"formats.d.ts","names":[],"sources":["../../src/formats.ts"],"mappings":";;;;;;;YAOY,wBAAwB,eAElC,eAAe,KAAK;;YAIV,sBAAsB,eAEhC,eAAe,KAAK;;qBAmBT,kBAAe,OACnB,wBAAsB,0BACH,KAAK,mCAAiC,gBAClD,kBACI;;qBAaP,oBAAiB,eACf,0BACa,KAAK,iCAA+B,gBAChD,gBACE"}
1
+ {"version":3,"file":"formats.d.ts","names":[],"sources":["../../src/formats.ts"],"mappings":";;;;;;YAOY,wBAAwB,eAElC,eAAe,KAAK;;YAIV,sBAAsB,eAEhC,eAAe,KAAK;;qBAmBT,kBAAe,OACnB,wBAAsB,0BACH,KAAK,mCAAiC,gBAClD,kBACI;;qBAaP,oBAAiB,eACf,0BACa,KAAK,iCAA+B,gBAChD,gBACE"}
@@ -1,5 +1,5 @@
1
- import { ContentAtPath, LooseComposer, ScopedComposer, ScopedDotPaths, TranslatedValue, TypedComposer } from "./typedComposer.js";
2
1
  import { I18nInjectionKey, VERSION, createI18n, useI18n } from "./createI18n.js";
2
+ import { ContentAtPath, LooseComposer, ScopedComposer, ScopedDotPaths, TranslatedValue, TypedComposer } from "./typedComposer.js";
3
3
  import { useDictionary } from "./useDictionary.js";
4
4
  import { useDictionaryDynamic } from "./useDictionaryDynamic.js";
5
5
  import { Composer, I18n, I18nOptions, UseI18nOptions } from "vue-i18n";
@@ -1,11 +1,9 @@
1
1
  import { PluginOption } from "vite";
2
2
  import { intlayer } from "vite-intlayer";
3
- //#region src/plugin/index.d.ts
4
3
  /**
5
4
  * A Vite plugin for vue-i18n compat that wraps vite-intlayer
6
5
  * and configures resolve aliases for vue-i18n.
7
6
  */
8
7
  export declare const vueI18nVitePlugin: (options?: Parameters<typeof intlayer>[0]) => PluginOption[];
9
- //#endregion
10
8
  export { vueI18nVitePlugin as default };
11
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/plugin/index.ts"],"mappings":";;;;;;;qBAaa,oBAAiB,UAClB,kBAAkB,iBAC3B"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/plugin/index.ts"],"mappings":";;;;;;qBAaa,oBAAiB,UAClB,kBAAkB,iBAC3B"}
@@ -1,6 +1,5 @@
1
1
  import { LocalesValues } from "@intlayer/types/module_augmentation";
2
2
  import { MessageValues } from "@intlayer/core/messageFormat";
3
- //#region src/resolveVueMessage.d.ts
4
3
  /**
5
4
  * Splits a vue-i18n choice message (`'no car | one car | {count} cars'`)
6
5
  * into its parts, honoring escaped pipes (`\|`).
@@ -34,5 +33,4 @@ export declare const parseTranslateArguments: (args: unknown[]) => ParsedTransla
34
33
  * dictionaries built with `format: 'vue-i18n'`.
35
34
  */
36
35
  export declare const resolveVueMessage: (value: unknown, values: MessageValues, count: number | undefined, locale: LocalesValues) => string;
37
- //#endregion
38
36
  //# sourceMappingURL=resolveVueMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolveVueMessage.d.ts","names":[],"sources":["../../src/resolveVueMessage.ts"],"mappings":";;;;;;;qBAWa,eAAY;;;;;;qBAQZ,iBAAc,gBACX;;YAaJ;;EAEV,QAAQ;;EAER;;EAEA;;;;;;;qBAQW,0BAAuB,oBAEjC;;;;;;;qBA6BU,oBAAiB,gBACd,QACN,eAAa,2BACI,QACjB"}
1
+ {"version":3,"file":"resolveVueMessage.d.ts","names":[],"sources":["../../src/resolveVueMessage.ts"],"mappings":";;;;;;qBAWa,eAAY;;;;;;qBAQZ,iBAAc,gBACX;;YAaJ;;EAEV,QAAQ;;EAER;;EAEA;;;;;;;qBAQW,0BAAuB,oBAEjC;;;;;;;qBA6BU,oBAAiB,gBACd,QACN,eAAa,2BACI,QACjB"}
@@ -2,7 +2,6 @@ import { DictionaryKeys } from "@intlayer/types/module_augmentation";
2
2
  import { WritableComputedRef } from "vue";
3
3
  import { GetNestingResult } from "@intlayer/core/interpreter";
4
4
  import { ValidDotPathsFor } from "@intlayer/core/transpiler";
5
- //#region src/typedComposer.d.ts
6
5
  /**
7
6
  * The interpreter-resolved content type at dot-path `P` of dictionary `N` —
8
7
  * the same type strength as the base `useIntlayer` hook.
@@ -59,5 +58,5 @@ export type LooseComposer = ComposerBase & {
59
58
  te: (key: string) => boolean;
60
59
  tm: (key: string) => unknown;
61
60
  };
62
- //#endregion
61
+ export {};
63
62
  //# sourceMappingURL=typedComposer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typedComposer.d.ts","names":[],"sources":["../../src/typedComposer.ts"],"mappings":";;;;;;;;;YASY,cAAc,UAAU,gBAAgB,KAAK,iBAAiB,GAAG;;;;;;YAOjE,gBAAgB,UAAU,gBAAgB,KACpD,cAAc,GAAG,oBAAoB,cAAc,GAAG;;;;;YAM5C,eAAe,UAAU,gBAAgB,yBACnD,iBAAiB,kBAAiB,YAC9B,oBAAoB,gBAAgB,iBAClC;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gBAAgB,GAAG;EACxB,KAAK,UAAU,iBAAiB,IAC9B,KAAK,MACF,oBACA,gBAAgB,GAAG;EACxB,KAAK,UAAU,iBAAiB,IAAI,KAAK;EACzC,KAAK,UAAU,iBAAiB,IAAI,KAAK,MAAM,cAAc,GAAG;;;;;;;YAQtD,eACV,UAAU,gBACV,yBACE;EACF,IAAI,UAAU,eAAe,GAAG,SAC9B,KAAK,MACF,oBACA,gBAAgB,MAAM,UAAU;EACrC,KAAK,UAAU,eAAe,GAAG,SAC/B,KAAK,MACF,oBACA,gBAAgB,MAAM,UAAU;EACrC,KAAK,UAAU,eAAe,GAAG,SAAS,KAAK;EAC/C,KAAK,UAAU,eAAe,GAAG,SAC/B,KAAK,MACF,cAAc,MAAM,UAAU;;;;;;YAOzB,gBAAgB;EAC1B,IAAI,gBAAgB;EACpB,KAAK,gBAAgB;EACrB,KAAK;EACL,KAAK"}
@@ -1,7 +1,6 @@
1
1
  import { ScopedComposer, TypedComposer } from "./typedComposer.js";
2
2
  import { DictionaryKeys } from "@intlayer/types/module_augmentation";
3
3
  import { Dictionary } from "@intlayer/types/dictionary";
4
- //#region src/useDictionary.d.ts
5
4
  /**
6
5
  * Overload set for {@link useDictionary}: without a `namespace` option the
7
6
  * composer is typed against the dictionary's dot-paths; with one (the
@@ -24,5 +23,5 @@ type UseDictionary = {
24
23
  * and passes it directly here. This enables tree-shaking of unused locale content.
25
24
  */
26
25
  export declare const useDictionary: UseDictionary;
27
- //#endregion
26
+ export {};
28
27
  //# sourceMappingURL=useDictionary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../src/useDictionary.ts"],"mappings":";;;;;;;;;;KA0BK;GACF,UAAU,YACT,YAAY,GACZ,UAAU;IAA4B;MACrC,cAAc,WAAW;GAC3B,UAAU,YAAY,uBACrB,YAAY,GACZ,SAAS;IAA4B,WAAW;MAC/C,eAAe,WAAW,gBAAgB;;;;;;;;;qBAUlC,eAkGP"}
1
+ {"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../src/useDictionary.ts"],"mappings":";;;;;;;;;KA0BK;GACF,UAAU,YACT,YAAY,GACZ,UAAU;IAA4B;MACrC,cAAc,WAAW;GAC3B,UAAU,YAAY,uBACrB,YAAY,GACZ,SAAS;IAA4B,WAAW;MAC/C,eAAe,WAAW,gBAAgB;;;;;;;;;qBAUlC,eAkGP"}
@@ -1,7 +1,6 @@
1
1
  import { ScopedComposer, TypedComposer } from "./typedComposer.js";
2
2
  import { DictionaryKeys, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
3
3
  import { Dictionary } from "@intlayer/types/dictionary";
4
- //#region src/useDictionaryDynamic.d.ts
5
4
  /**
6
5
  * Overload set for {@link useDictionaryDynamic}: without a `namespace` option
7
6
  * the composer is typed against the dictionary's dot-paths; with one (the
@@ -24,5 +23,5 @@ type UseDictionaryDynamic = {
24
23
  * (or .mjs module) based on the locale.
25
24
  */
26
25
  export declare const useDictionaryDynamic: UseDictionaryDynamic;
27
- //#endregion
26
+ export {};
28
27
  //# sourceMappingURL=useDictionaryDynamic.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../src/useDictionaryDynamic.ts"],"mappings":";;;;;;;;;;KA8BK;GACF,UAAU,YAAY,UAAU,gBAC/B,mBAAmB,0BAA0B,QAAQ,KACrD,KAAK,GACL,UAAU;IAA4B;MACrC,cAAc;GAChB,UAAU,YAAY,UAAU,gBAAgB,uBAC/C,mBAAmB,0BAA0B,QAAQ,KACrD,KAAK,GACL,SAAS;IAA4B,WAAW;MAC/C,eAAe,GAAG;;;;;;;;;qBAUV,sBAyGP"}
1
+ {"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../src/useDictionaryDynamic.ts"],"mappings":";;;;;;;;;KA8BK;GACF,UAAU,YAAY,UAAU,gBAC/B,mBAAmB,0BAA0B,QAAQ,KACrD,KAAK,GACL,UAAU;IAA4B;MACrC,cAAc;GAChB,UAAU,YAAY,UAAU,gBAAgB,uBAC/C,mBAAmB,0BAA0B,QAAQ,KACrD,KAAK,GACL,SAAS;IAA4B,WAAW;MAC/C,eAAe,GAAG;;;;;;;;;qBAUV,sBAyGP"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/vue-i18n",
3
- "version": "9.7.0",
3
+ "version": "9.7.1",
4
4
  "private": false,
5
5
  "description": "vue-i18n API adapter for intlayer — useI18n, createI18n, and installIntlayer backed by vue-intlayer",
6
6
  "keywords": [
@@ -76,13 +76,13 @@
76
76
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
77
77
  },
78
78
  "dependencies": {
79
- "@intlayer/config": "9.6.0",
80
- "@intlayer/core": "9.7.0",
81
- "@intlayer/dictionaries-entry": "9.6.0",
82
- "@intlayer/engine": "9.7.0",
83
- "@intlayer/types": "9.7.0",
84
- "vite-intlayer": "9.6.0",
85
- "vue-intlayer": "9.6.0"
79
+ "@intlayer/config": "9.7.1",
80
+ "@intlayer/core": "9.7.1",
81
+ "@intlayer/dictionaries-entry": "9.7.1",
82
+ "@intlayer/engine": "9.7.1",
83
+ "@intlayer/types": "9.7.1",
84
+ "vite-intlayer": "9.7.1",
85
+ "vue-intlayer": "9.7.1"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@types/node": "^26",
@@ -90,12 +90,12 @@
90
90
  "@utils/ts-config-types": "1.0.4",
91
91
  "@utils/tsdown-config": "1.0.4",
92
92
  "rimraf": "6.1.3",
93
- "tsdown": "0.23.0",
93
+ "tsdown": "0.23.4",
94
94
  "typescript": "7.0.2",
95
- "vite": "8.3.3",
96
- "vitest": "5.0.3",
97
- "vue": "3.5.43",
98
- "vue-i18n": "11.4.13"
95
+ "vite": "8.3.5",
96
+ "vitest": "5.1.0",
97
+ "vue": "3.5.44",
98
+ "vue-i18n": "11.4.17"
99
99
  },
100
100
  "peerDependencies": {
101
101
  "vite": ">=4.0.0",