angular-intlayer 8.9.8 → 8.10.0-canary.0
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 +14 -0
- package/dist/types/client/useDictionaryDynamic.d.ts +2 -1
- package/dist/types/client/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/client/useLocaleStorage.d.ts +5 -4
- package/dist/types/client/useLocaleStorage.d.ts.map +1 -1
- package/dist/types/format/useCompact.d.ts +3 -1
- package/dist/types/format/useCompact.d.ts.map +1 -1
- package/dist/types/format/useCurrency.d.ts +3 -1
- package/dist/types/format/useCurrency.d.ts.map +1 -1
- package/dist/types/format/useDate.d.ts +3 -1
- package/dist/types/format/useDate.d.ts.map +1 -1
- package/dist/types/format/useList.d.ts +3 -1
- package/dist/types/format/useList.d.ts.map +1 -1
- package/dist/types/format/useNumber.d.ts +3 -1
- package/dist/types/format/useNumber.d.ts.map +1 -1
- package/dist/types/format/usePercentage.d.ts +3 -1
- package/dist/types/format/usePercentage.d.ts.map +1 -1
- package/dist/types/format/useRelativeTime.d.ts +3 -1
- package/dist/types/format/useRelativeTime.d.ts.map +1 -1
- package/dist/types/format/useUnit.d.ts +3 -1
- package/dist/types/format/useUnit.d.ts.map +1 -1
- package/dist/types/intlayer/dist/types/index.d.ts +4 -0
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -67,6 +67,7 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
|
|
|
67
67
|
| <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) |
|
|
68
68
|
| <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) |
|
|
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) |
|
|
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) |
|
|
70
71
|
|
|
71
72
|
---
|
|
72
73
|
|
|
@@ -249,6 +250,19 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
|
|
|
249
250
|
</ul>
|
|
250
251
|
</details>
|
|
251
252
|
|
|
253
|
+
## Multilingual content management system
|
|
254
|
+
|
|
255
|
+
More than an i18n library, Intlayer is a complete **multilingual content management system**. A full CMS is available for free at [app.intlayer.org](https://app.intlayer.org).
|
|
256
|
+
|
|
257
|
+
Intlayer connects **developers**, **copywriters**, and **AI agents** in one workflow for creating and maintaining multilingual websites effortlessly.Intlayer replaces the following stack in a single solution:
|
|
258
|
+
|
|
259
|
+
- i18n solutions (e.g. `i18next`, `next-intl`, `vue-i18n`)
|
|
260
|
+
- TMSs (Translation Management Systems) (e.g. Crowdin, Phrase, Lokalise)
|
|
261
|
+
- Feature flags
|
|
262
|
+
- Headless CMSs (e.g. Contentful, Strapi, Sanity)
|
|
263
|
+
|
|
264
|
+

|
|
265
|
+
|
|
252
266
|
## 🌐 Readme in other languages
|
|
253
267
|
|
|
254
268
|
<p align="center">
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IInterpreterPluginState } from "../plugins.js";
|
|
2
|
+
import { Locale } from "../intlayer/dist/types/index.js";
|
|
2
3
|
import { DictionaryKeys, LocalesValues, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
|
|
3
4
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
4
5
|
|
|
@@ -8,7 +9,7 @@ import { Dictionary } from "@intlayer/types/dictionary";
|
|
|
8
9
|
*
|
|
9
10
|
* If the locale is not provided, it will use the locale from the client context
|
|
10
11
|
*/
|
|
11
|
-
declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => import("@angular/core").Signal<import("@intlayer/core/interpreter").DeepTransformContent<T["content"], IInterpreterPluginState,
|
|
12
|
+
declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => import("@angular/core").Signal<import("@intlayer/core/interpreter").DeepTransformContent<T["content"], IInterpreterPluginState, Locale>>;
|
|
12
13
|
//#endregion
|
|
13
14
|
export { useDictionaryDynamic };
|
|
14
15
|
//# sourceMappingURL=useDictionaryDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"mappings":";;;;;;;;;;;cAmBa,oBAAA,aACD,UAAA,YACA,cAAA,EAEV,iBAAA,EAAmB,mBAAA,OAA0B,OAAA,CAAQ,CAAA,IACrD,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,aAAA,6BAAa,MAAA,sCAAA,oBAAA,CAAA,CAAA,aAAA,uBAAA,EAAA,MAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Locale } from "../intlayer/dist/types/index.js";
|
|
1
2
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
3
|
|
|
3
4
|
//#region src/client/useLocaleStorage.d.ts
|
|
@@ -7,13 +8,13 @@ import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
|
7
8
|
/**
|
|
8
9
|
* Get the locale cookie
|
|
9
10
|
*/
|
|
10
|
-
declare const localeInStorage:
|
|
11
|
+
declare const localeInStorage: Locale;
|
|
11
12
|
/**
|
|
12
13
|
* @deprecated Use localeInStorage instead
|
|
13
14
|
*
|
|
14
15
|
* Get the locale cookie
|
|
15
16
|
*/
|
|
16
|
-
declare const localeCookie:
|
|
17
|
+
declare const localeCookie: Locale;
|
|
17
18
|
/**
|
|
18
19
|
* Set the locale cookie
|
|
19
20
|
*/
|
|
@@ -28,7 +29,7 @@ declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled: boolean)
|
|
|
28
29
|
* Hook that provides the locale storage and a function to set it
|
|
29
30
|
*/
|
|
30
31
|
declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
31
|
-
getLocale: () =>
|
|
32
|
+
getLocale: () => Locale;
|
|
32
33
|
setLocale: (locale: LocalesValues) => void;
|
|
33
34
|
};
|
|
34
35
|
/**
|
|
@@ -39,7 +40,7 @@ declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
|
39
40
|
* Hook that provides the locale cookie and a function to set it
|
|
40
41
|
*/
|
|
41
42
|
declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
|
|
42
|
-
localeCookie:
|
|
43
|
+
localeCookie: Locale;
|
|
43
44
|
setLocaleCookie: (locale: LocalesValues) => void;
|
|
44
45
|
};
|
|
45
46
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;;AAcA;;;AAAA,cAAa,eAAA,EAAkE,MAAA;AAAA;AAM/E;;;;AAN+E,cAMlE,YAAA,EAA8B,MAAA;AAK3C;;;AAAA,cAAa,kBAAA,GACX,MAAA,EAAQ,aAAa,EACrB,eAAA;;;;;AAAwB;cAYb,eAAA,GAAe,MAAA,EAblB,aAAa,EAAA,eAAA;;;;cAkBV,gBAAA,GAAoB,eAAA;mBAI7B,MAAA;sBAAA,aAAA;AAAA;AArBsB;AAiB1B;;;;;;AAjB0B,cA8Bb,eAAA,GAAmB,eAAA;gBAO/B,MAAA;4BAAA,aAAA;AAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
|
|
1
3
|
//#region src/format/useCompact.d.ts
|
|
2
4
|
declare const useCompact: () => import("@angular/core").Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
3
|
-
locale?:
|
|
5
|
+
locale?: LocalesValues;
|
|
4
6
|
}) => string>;
|
|
5
7
|
//#endregion
|
|
6
8
|
export { useCompact };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../src/format/useCompact.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../src/format/useCompact.ts"],"mappings":";;;cAIa,UAAA,gCAAU,MAAA,EAAA,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,aAAA;AAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
|
|
1
3
|
//#region src/format/useCurrency.d.ts
|
|
2
4
|
declare const useCurrency: () => import("@angular/core").Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
3
|
-
locale?:
|
|
5
|
+
locale?: LocalesValues;
|
|
4
6
|
}) => string>;
|
|
5
7
|
//#endregion
|
|
6
8
|
export { useCurrency };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../src/format/useCurrency.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../src/format/useCurrency.ts"],"mappings":";;;cAIa,WAAA,gCAAW,MAAA,EAAA,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,aAAA;AAAA"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
|
|
1
3
|
//#region src/format/useDate.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* Angular client hook that provides a localized date/time formatter.
|
|
4
6
|
*/
|
|
5
7
|
declare const useDate: () => import("@angular/core").Signal<(date: string | number | Date, options?: (Intl.DateTimeFormatOptions & {
|
|
6
|
-
locale?:
|
|
8
|
+
locale?: LocalesValues;
|
|
7
9
|
}) | import("@intlayer/core/formatters").DateTimePreset) => string>;
|
|
8
10
|
//#endregion
|
|
9
11
|
export { useDate };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../src/format/useDate.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../src/format/useDate.ts"],"mappings":";;;;;;cAOa,OAAA,gCAAO,MAAA,EAAA,IAAA,oBAAA,IAAA,EAAA,OAAA,IAAA,IAAA,CAAA,qBAAA;WAAA,aAAA;AAAA"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
|
|
1
3
|
//#region src/format/useList.d.ts
|
|
2
4
|
declare const useList: () => import("@angular/core").Signal<(values: (string | number)[], options?: {
|
|
3
5
|
localeMatcher?: "lookup" | "best fit";
|
|
4
6
|
type?: "conjunction" | "disjunction" | "unit";
|
|
5
7
|
style?: "long" | "short" | "narrow";
|
|
6
8
|
} & {
|
|
7
|
-
locale?:
|
|
9
|
+
locale?: LocalesValues;
|
|
8
10
|
}) => string>;
|
|
9
11
|
//#endregion
|
|
10
12
|
export { useList };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../src/format/useList.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../src/format/useList.ts"],"mappings":";;;cAIa,OAAA,gCAAO,MAAA,EAAA,MAAA,uBAAA,OAAA;;;;;WAWnB,aAAA;AAAA"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
|
|
1
3
|
//#region src/format/useNumber.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* Angular client hook that provides a localized number formatter.
|
|
4
6
|
*/
|
|
5
7
|
declare const useNumber: () => import("@angular/core").Signal<(value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
6
|
-
locale?:
|
|
8
|
+
locale?: LocalesValues;
|
|
7
9
|
}) => string>;
|
|
8
10
|
//#endregion
|
|
9
11
|
export { useNumber };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../src/format/useNumber.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../src/format/useNumber.ts"],"mappings":";;;;;;cAOa,SAAA,gCAAS,MAAA,EAAA,KAAA,mBAAA,MAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,aAAA;AAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
|
|
1
3
|
//#region src/format/usePercentage.d.ts
|
|
2
4
|
declare const usePercentage: () => import("@angular/core").Signal<(value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
3
|
-
locale?:
|
|
5
|
+
locale?: LocalesValues;
|
|
4
6
|
}) => string>;
|
|
5
7
|
//#endregion
|
|
6
8
|
export { usePercentage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../src/format/usePercentage.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../src/format/usePercentage.ts"],"mappings":";;;cAIa,aAAA,gCAAa,MAAA,EAAA,KAAA,mBAAA,MAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,aAAA;AAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
|
|
1
3
|
//#region src/format/useRelativeTime.d.ts
|
|
2
4
|
declare const useRelativeTime: () => import("@angular/core").Signal<(from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
|
|
3
|
-
locale?:
|
|
5
|
+
locale?: LocalesValues;
|
|
4
6
|
unit?: Intl.RelativeTimeFormatUnit;
|
|
5
7
|
}) => string>;
|
|
6
8
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":";;;cAIa,eAAA,gCAAe,MAAA,EAAA,IAAA,oBAAA,IAAA,EAAA,EAAA,qBAAA,IAAA,EAAA,OAAA,GAAA,IAAA,CAAA,yBAAA;WAAA,aAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
|
|
1
3
|
//#region src/format/useUnit.d.ts
|
|
2
4
|
declare const useUnit: () => import("@angular/core").Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
3
|
-
locale?:
|
|
5
|
+
locale?: LocalesValues;
|
|
4
6
|
}) => string>;
|
|
5
7
|
//#endregion
|
|
6
8
|
export { useUnit };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../src/format/useUnit.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../src/format/useUnit.ts"],"mappings":";;;cAIa,OAAA,gCAAO,MAAA,EAAA,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,aAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-intlayer",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.10.0-canary.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Angular applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -110,18 +110,18 @@
|
|
|
110
110
|
"dependencies": {
|
|
111
111
|
"@babel/plugin-syntax-import-attributes": "^7.28.6",
|
|
112
112
|
"@babel/preset-env": "^7.29.2",
|
|
113
|
-
"@intlayer/chokidar": "8.
|
|
114
|
-
"@intlayer/config": "8.
|
|
115
|
-
"@intlayer/core": "8.
|
|
116
|
-
"@intlayer/dictionaries-entry": "8.
|
|
117
|
-
"@intlayer/editor": "8.
|
|
118
|
-
"@intlayer/types": "8.
|
|
119
|
-
"@intlayer/webpack": "8.
|
|
113
|
+
"@intlayer/chokidar": "8.10.0-canary.0",
|
|
114
|
+
"@intlayer/config": "8.10.0-canary.0",
|
|
115
|
+
"@intlayer/core": "8.10.0-canary.0",
|
|
116
|
+
"@intlayer/dictionaries-entry": "8.10.0-canary.0",
|
|
117
|
+
"@intlayer/editor": "8.10.0-canary.0",
|
|
118
|
+
"@intlayer/types": "8.10.0-canary.0",
|
|
119
|
+
"@intlayer/webpack": "8.10.0-canary.0",
|
|
120
120
|
"babel-loader": "^10.1.1",
|
|
121
121
|
"defu": "6.1.7"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
|
-
"@types/node": "25.
|
|
124
|
+
"@types/node": "25.9.0",
|
|
125
125
|
"@types/webpack": "5.28.5",
|
|
126
126
|
"@utils/ts-config": "1.0.4",
|
|
127
127
|
"@utils/ts-config-types": "1.0.4",
|