vue-intlayer 7.0.8 → 7.0.9-canary.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/README.md CHANGED
@@ -20,9 +20,9 @@
20
20
  <p align="center" style="margin-top:15px;">
21
21
  <a href="https://www.npmjs.com/package/intlayer" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/npm/v/intlayer?style=for-the-badge&labelColor=FFFFFF&color=000000&logoColor=FFFFFF" alt="npm version" height="24"/></a>
22
22
  <a href="https://github.com/aymericzip/intlayer/stargazers" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/stars/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logo=github&logoColor=FFD700" alt="GitHub Stars" height="24"/></a>
23
- <a href="https://www.npmjs.org/package/intlayer" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="monthly downloads" height="24"/></a>
24
- <a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="license"/></a>
25
- <a href="https://github.com/aymericzip/intlayer/commits/main" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="last commit"/>
23
+ <a href="https://www.npmjs.org/package/intlayer" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="monthly downloads" height="24"/></a>
24
+ <a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="license"/></a>
25
+ <a href="https://github.com/aymericzip/intlayer/commits/main" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="last commit"/>
26
26
  </a>
27
27
  </p>
28
28
 
@@ -60,7 +60,7 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
60
60
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/static_rendering.png?raw=true" alt="Feature" width="700"> | **Static Rendering**<br><br>Doesn't block Static Rendering. <br><br> - [Next.js integration](https://intlayer.org/doc/environment/nextjs) |
61
61
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/AI_translation.png?raw=true" alt="Feature" width="700"> | **AI-Powered Translation**<br><br>Transform your website into 231 languages with just one click using Intlayer's advanced AI-powered translation tools using your own AI provider / API key. <br><br> - [CI/CD integration](https://intlayer.org/doc/concept/ci-cd) <br> - [Intlayer CLI](https://intlayer.org/doc/concept/cli) <br> - [Auto fill](https://intlayer.org/doc/concept/auto-fill) |
62
62
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/mcp.png?raw=true" alt="Feature" width="700"> | **MCP Server Integration**<br><br>Provides an MCP (Model Context Protocol) server for IDE automation, enabling seamless content management and i18n workflows directly within your development environment. <br><br> - [MCP Server](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/mcp_server.md) |
63
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.png?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations, builting your dictionaries, translating your content, and more. <br><br> - [VSCode Extension](https://intlayer.org/doc/vs-code-extension) |
63
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.png?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations, building your dictionaries, translating your content, and more. <br><br> - [VSCode Extension](https://intlayer.org/doc/vs-code-extension) |
64
64
  | <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, and react-intl. <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) |
65
65
 
66
66
  ---
@@ -171,8 +171,9 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
171
171
  <details open>
172
172
  <summary style="font-size:16px; font-weight:bold;">🌐 Environment</summary>
173
173
  <ul>
174
- <li><a href="https://intlayer.org/doc/environment/nextjs" rel=''>Intlayer with Next.js 15</a>
174
+ <li><a href="https://intlayer.org/doc/environment/nextjs" rel=''>Intlayer with Next.js 16</a>
175
175
  <ul>
176
+ <li><a href="https://intlayer.org/doc/environment/nextjs/15" rel=''>Next.js 15</a></li>
176
177
  <li><a href="https://intlayer.org/doc/environment/nextjs/14" rel=''>Next.js 14 (App Router)</a></li>
177
178
  <li><a href="https://intlayer.org/doc/environment/nextjs/next-with-Page-Router" rel=''>Next.js Page Router</a></li>
178
179
  </ul>
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@intlayer/config/built"),l=require("uuid"),o=require("vue"),{editor:n}=a,r={postMessage:()=>null,allowedOrigins:[n?.applicationURL,n?.editorURL,n?.cmsURL],senderId:""};let t=null;const s=Symbol("Communicator"),u=(e={postMessage:()=>null})=>t||(t=o.reactive({...r,...e,senderId:l.v4()}),t),m=(e,c={postMessage:()=>null})=>{const i=u(c);e.provide(s,i)},d=()=>{try{return o.inject(s,r)}catch{return console.warn("useCommunicator: inject can only be used in setup(). Returning default communicator."),{postMessage:()=>null,senderId:""}}};exports.createCommunicator=u;exports.installCommunicator=m;exports.useCommunicator=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@intlayer/config/built"),o=require("vue"),l=()=>Math.random().toString(36).slice(2),{editor:n}=u,r={postMessage:()=>null,allowedOrigins:[n?.applicationURL,n?.editorURL,n?.cmsURL],senderId:""};let t=null;const s=Symbol("Communicator"),c=(e={postMessage:()=>null})=>t||(t=o.reactive({...r,...e,senderId:l()}),t),m=(e,i={postMessage:()=>null})=>{const a=c(i);e.provide(s,a)},d=()=>{try{return o.inject(s,r)}catch{return console.warn("useCommunicator: inject can only be used in setup(). Returning default communicator."),{postMessage:()=>null,senderId:""}}};exports.createCommunicator=c;exports.installCommunicator=m;exports.useCommunicator=d;
@@ -1,26 +1,25 @@
1
1
  import i from "@intlayer/config/built";
2
- import { v4 as a } from "uuid";
3
- import { inject as u, reactive as l } from "vue";
4
- const { editor: n } = i, o = {
2
+ import { inject as a, reactive as l } from "vue";
3
+ const u = () => Math.random().toString(36).slice(2), { editor: e } = i, o = {
5
4
  postMessage: () => null,
6
5
  allowedOrigins: [
7
- n?.applicationURL,
8
- n?.editorURL,
9
- n?.cmsURL
6
+ e?.applicationURL,
7
+ e?.editorURL,
8
+ e?.cmsURL
10
9
  ],
11
10
  senderId: ""
12
11
  };
13
12
  let t = null;
14
- const r = Symbol("Communicator"), m = (e = { postMessage: () => null }) => t || (t = l({
13
+ const r = Symbol("Communicator"), m = (n = { postMessage: () => null }) => t || (t = l({
15
14
  ...o,
16
- ...e,
17
- senderId: a()
18
- }), t), g = (e, s = { postMessage: () => null }) => {
15
+ ...n,
16
+ senderId: u()
17
+ }), t), g = (n, s = { postMessage: () => null }) => {
19
18
  const c = m(s);
20
- e.provide(r, c);
21
- }, C = () => {
19
+ n.provide(r, c);
20
+ }, M = () => {
22
21
  try {
23
- return u(r, o);
22
+ return a(r, o);
24
23
  } catch {
25
24
  return console.warn(
26
25
  "useCommunicator: inject can only be used in setup(). Returning default communicator."
@@ -33,5 +32,5 @@ const r = Symbol("Communicator"), m = (e = { postMessage: () => null }) => t ||
33
32
  export {
34
33
  m as createCommunicator,
35
34
  g as installCommunicator,
36
- C as useCommunicator
35
+ M as useCommunicator
37
36
  };
@@ -2,13 +2,13 @@ import { LocalesValues } from '@intlayer/types';
2
2
  /**
3
3
  * Get the locale cookie
4
4
  */
5
- export declare const localeInStorage: import('@intlayer/types').Locale | undefined;
5
+ export declare const localeInStorage: import('intlayer').Locale | undefined;
6
6
  /**
7
7
  * @deprecated Use localeInStorage instead
8
8
  *
9
9
  * Get the locale cookie
10
10
  */
11
- export declare const localeCookie: import('@intlayer/types').Locale | undefined;
11
+ export declare const localeCookie: import('intlayer').Locale | undefined;
12
12
  /**
13
13
  * Set the locale cookie
14
14
  */
@@ -23,7 +23,7 @@ export declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled: b
23
23
  * Composable that provides the locale storage and a function to set it
24
24
  */
25
25
  export declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
26
- localeStorage: import('vue').ComputedRef<import('@intlayer/types').Locale>;
26
+ localeStorage: import('vue').ComputedRef<import('intlayer').Locale>;
27
27
  setLocaleStorage: (locale: LocalesValues) => void;
28
28
  };
29
29
  /**
@@ -34,6 +34,6 @@ export declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
34
34
  * Composable that provides the locale cookie and a function to set it
35
35
  */
36
36
  export declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
37
- localeCookie: import('vue').ComputedRef<import('@intlayer/types').Locale>;
37
+ localeCookie: import('vue').ComputedRef<import('intlayer').Locale>;
38
38
  setLocaleCookie: (locale: LocalesValues) => void;
39
39
  };
@@ -9,5 +9,5 @@
9
9
  * ```
10
10
  */
11
11
  export declare const useCompact: () => import('vue').ComputedRef<(value: string | number, options?: (Intl.NumberFormatOptions & {
12
- locale?: import('@intlayer/types').LocalesValues;
12
+ locale?: import('intlayer').LocalesValues;
13
13
  }) | undefined) => string>;
@@ -20,5 +20,5 @@
20
20
  * ```
21
21
  */
22
22
  export declare const useCurrency: () => import('vue').ComputedRef<(value: string | number, options?: (Intl.NumberFormatOptions & {
23
- locale?: import('@intlayer/types').LocalesValues;
23
+ locale?: import('intlayer').LocalesValues;
24
24
  }) | undefined) => string>;
@@ -18,5 +18,5 @@
18
18
  * ```
19
19
  */
20
20
  export declare const useDate: () => import('vue').ComputedRef<(date: string | number | Date, options?: (Intl.DateTimeFormatOptions & {
21
- locale?: import('@intlayer/types').LocalesValues;
21
+ locale?: import('intlayer').LocalesValues;
22
22
  }) | undefined) => string>;
@@ -17,5 +17,5 @@
17
17
  * ```
18
18
  */
19
19
  export declare const useList: () => import('vue').ComputedRef<(values: (string | number)[], options?: (Intl.ListFormatOptions & {
20
- locale?: import('@intlayer/types').LocalesValues;
20
+ locale?: import('intlayer').LocalesValues;
21
21
  }) | undefined) => string>;
@@ -18,5 +18,5 @@
18
18
  * ```
19
19
  */
20
20
  export declare const useNumber: () => import('vue').ComputedRef<(value: string | number, options?: (Intl.NumberFormatOptions & {
21
- locale?: import('@intlayer/types').LocalesValues;
21
+ locale?: import('intlayer').LocalesValues;
22
22
  }) | undefined) => string>;
@@ -12,5 +12,5 @@
12
12
  * ```
13
13
  */
14
14
  export declare const usePercentage: () => import('vue').ComputedRef<(value: string | number, options?: (Intl.NumberFormatOptions & {
15
- locale?: import('@intlayer/types').LocalesValues;
15
+ locale?: import('intlayer').LocalesValues;
16
16
  }) | undefined) => string>;
@@ -15,6 +15,6 @@
15
15
  * ```
16
16
  */
17
17
  export declare const useRelativeTime: () => import('vue').ComputedRef<(from: string | number | Date, to?: string | number | Date | undefined, options?: (Intl.RelativeTimeFormatOptions & {
18
- locale?: import('@intlayer/types').LocalesValues;
18
+ locale?: import('intlayer').LocalesValues;
19
19
  unit?: Intl.RelativeTimeFormatUnit;
20
20
  }) | undefined) => string>;
@@ -14,5 +14,5 @@
14
14
  * ```
15
15
  */
16
16
  export declare const useUnit: () => import('vue').ComputedRef<(value: string | number, options?: (Intl.NumberFormatOptions & {
17
- locale?: import('@intlayer/types').LocalesValues;
17
+ locale?: import('intlayer').LocalesValues;
18
18
  }) | undefined) => string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intlayer",
3
- "version": "7.0.8",
3
+ "version": "7.0.9-canary.2",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your Vue applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -78,45 +78,47 @@
78
78
  "lint": "biome lint .",
79
79
  "lint:fix": "biome lint --write .",
80
80
  "prepublish": "cp -f ../../README.md ./README.md",
81
+ "publish": "bun publish --access public || true",
82
+ "publish:canary": "bun publish --tag canary --access public || true",
83
+ "publish:latest": "bun publish --tag latest --access public || true",
81
84
  "test": "vitest run",
82
85
  "test:watch": "vitest",
83
86
  "typecheck": "vue-tsc --noEmit --project tsconfig.types.json"
84
87
  },
85
88
  "dependencies": {
86
- "@intlayer/api": "7.0.8",
87
- "@intlayer/config": "7.0.8",
88
- "@intlayer/core": "7.0.8",
89
- "@intlayer/editor": "7.0.8",
90
- "@intlayer/types": "7.0.8",
91
- "@intlayer/unmerged-dictionaries-entry": "7.0.8",
92
- "js-cookie": "3.0.5",
93
- "uuid": "13.0.0"
89
+ "@intlayer/api": "7.0.9-canary.2",
90
+ "@intlayer/config": "7.0.9-canary.2",
91
+ "@intlayer/core": "7.0.9-canary.2",
92
+ "@intlayer/editor": "7.0.9-canary.2",
93
+ "@intlayer/types": "7.0.9-canary.2",
94
+ "@intlayer/unmerged-dictionaries-entry": "7.0.9-canary.2",
95
+ "js-cookie": "3.0.5"
94
96
  },
95
97
  "devDependencies": {
96
98
  "@types/js-cookie": "3.0.6",
97
- "@types/node": "24.10.0",
98
- "@utils/ts-config": "7.0.8",
99
- "@utils/ts-config-types": "7.0.8",
100
- "@utils/tsdown-config": "7.0.8",
99
+ "@types/node": "24.10.1",
100
+ "@utils/ts-config": "1.0.4",
101
+ "@utils/ts-config-types": "1.0.4",
102
+ "@utils/tsdown-config": "1.0.4",
101
103
  "@vitejs/plugin-vue": "6.0.1",
102
104
  "ajv": "^8.17.1",
103
105
  "fast-glob": "3.3.3",
104
106
  "rimraf": "6.1.0",
105
- "tsdown": "0.16.0",
107
+ "tsdown": "0.16.4",
106
108
  "typescript": "5.9.3",
107
109
  "vite": "7.2.0",
108
110
  "vite-plugin-dts": "4.5.4",
109
- "vitest": "4.0.7",
111
+ "vitest": "4.0.8",
110
112
  "vue-tsc": "3.1.1"
111
113
  },
112
114
  "peerDependencies": {
113
- "@intlayer/api": "7.0.8",
114
- "@intlayer/config": "7.0.8",
115
- "@intlayer/core": "7.0.8",
116
- "@intlayer/editor": "7.0.8",
117
- "@intlayer/types": "7.0.8",
118
- "@intlayer/unmerged-dictionaries-entry": "7.0.8",
119
- "intlayer": "7.0.8",
115
+ "@intlayer/api": "7.0.9-canary.2",
116
+ "@intlayer/config": "7.0.9-canary.2",
117
+ "@intlayer/core": "7.0.9-canary.2",
118
+ "@intlayer/editor": "7.0.9-canary.2",
119
+ "@intlayer/types": "7.0.9-canary.2",
120
+ "@intlayer/unmerged-dictionaries-entry": "7.0.9-canary.2",
121
+ "intlayer": "7.0.9-canary.2",
120
122
  "vue": ">=3.0.0"
121
123
  },
122
124
  "peerDependenciesMeta": {