intlayer 3.5.3 → 3.5.5
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 +8 -8
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<a href="https://www.npmjs.com/package/intlayer">
|
|
3
|
-
<img src="docs/assets/logo.png" width="500" alt="intlayer" />
|
|
3
|
+
<img src="https://raw.githubusercontent.com/aymericzip/intlayer/572ae9c9acafb74307b81530c1931a8e98990aef/docs/assets/logo.png" width="500" alt="intlayer" />
|
|
4
4
|
</a>
|
|
5
5
|
</div>
|
|
6
6
|
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
```tsx
|
|
37
37
|
// ./ClientComponent/index.content.ts
|
|
38
38
|
|
|
39
|
-
import { DeclarationContent, t } from "intlayer";
|
|
39
|
+
import { type DeclarationContent, t } from "intlayer";
|
|
40
40
|
|
|
41
41
|
const clientComponentContent = {
|
|
42
42
|
key: "client-component",
|
|
@@ -75,12 +75,12 @@ export const ClientComponent = () => {
|
|
|
75
75
|
|
|
76
76
|
`intlayer` package intend to declare your content in a structured way, using JavaScript.
|
|
77
77
|
|
|
78
|
-
To build dictionaries from this declaration, you can use [intlayer-cli](https://github.com/aymericzip/intlayer/blob/main/packages/intlayer-cli/
|
|
79
|
-
And to interpret intlayer dictionaries you can interpreters, such as [react-intlayer](https://github.com/aymericzip/intlayer/blob/main/packages/react-intlayer/
|
|
78
|
+
To build dictionaries from this declaration, you can use [intlayer-cli](https://github.com/aymericzip/intlayer/blob/main/packages/intlayer-cli/readme.md).
|
|
79
|
+
And to interpret intlayer dictionaries you can interpreters, such as [react-intlayer](https://github.com/aymericzip/intlayer/blob/main/packages/react-intlayer/README.md) [next-intlayer](https://github.com/aymericzip/intlayer/blob/main/packages/next-intlayer/README.md)
|
|
80
80
|
|
|
81
81
|
## Getting Started with Intlayer
|
|
82
82
|
|
|
83
|
-
[See how to use intlayer with NextJS](https://github.com/aymericzip/intlayer/blob/main/
|
|
83
|
+
[See how to use intlayer with NextJS](https://github.com/aymericzip/intlayer/blob/main/README.md)
|
|
84
84
|
|
|
85
85
|
### Install Package
|
|
86
86
|
|
|
@@ -146,7 +146,7 @@ import { t } from "intlayer";
|
|
|
146
146
|
|
|
147
147
|
/** @type {import('intlayer').DeclarationContent} */
|
|
148
148
|
const pageContent = {
|
|
149
|
-
|
|
149
|
+
"key": "page",
|
|
150
150
|
getStarted: {
|
|
151
151
|
main: t({
|
|
152
152
|
en: "Get started by editing",
|
|
@@ -181,7 +181,7 @@ const { t } = require("intlayer");
|
|
|
181
181
|
|
|
182
182
|
/** @type {import('intlayer').DeclarationContent} */
|
|
183
183
|
const pageContent = {
|
|
184
|
-
|
|
184
|
+
"key": "page",
|
|
185
185
|
getStarted: {
|
|
186
186
|
main: t({
|
|
187
187
|
en: "Get started by editing",
|
|
@@ -212,7 +212,7 @@ module.exports = pageContent;
|
|
|
212
212
|
```json5
|
|
213
213
|
// src/app/[locale]/page.content.json
|
|
214
214
|
{
|
|
215
|
-
|
|
215
|
+
"key": "page",
|
|
216
216
|
getStarted: {
|
|
217
217
|
main: {
|
|
218
218
|
nodeType: "translation",
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -22,8 +22,8 @@ __export(src_exports, {
|
|
|
22
22
|
enu: () => import_core2.enu,
|
|
23
23
|
getConfiguration: () => import_client.getConfiguration,
|
|
24
24
|
getEnumerationContent: () => import_core2.getEnumerationContent,
|
|
25
|
-
getHTMLLang: () => import_core2.getHTMLLang,
|
|
26
25
|
getHTMLTextDir: () => import_core2.getHTMLTextDir,
|
|
26
|
+
getLocaleLang: () => import_core2.getLocaleLang,
|
|
27
27
|
getLocaleName: () => import_core2.getLocaleName,
|
|
28
28
|
getLocalizedUrl: () => import_core2.getLocalizedUrl,
|
|
29
29
|
getMultilingualUrls: () => import_core2.getMultilingualUrls,
|
|
@@ -45,8 +45,8 @@ const getTranslationContent = import_core.getTranslationContent;
|
|
|
45
45
|
enu,
|
|
46
46
|
getConfiguration,
|
|
47
47
|
getEnumerationContent,
|
|
48
|
-
getHTMLLang,
|
|
49
48
|
getHTMLTextDir,
|
|
49
|
+
getLocaleLang,
|
|
50
50
|
getLocaleName,
|
|
51
51
|
getLocalizedUrl,
|
|
52
52
|
getMultilingualUrls,
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import type { Locales } from '@intlayer/config/client';\nimport {\n type TranslationContent,\n t as tCore,\n getTranslationContent as getTranslationContentCore,\n type LanguageContent,\n} from '@intlayer/core';\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nexport interface IConfigLocales<Content> {\n // This interface should be augmented in the consuming app\n}\n\ntype ConfigLocales = keyof IConfigLocales<unknown>;\n\nexport type CustomizableLanguageContent<Content = string> =\n ConfigLocales extends never\n ? LanguageContent<Content>\n : IConfigLocales<Content>;\n\n// Re-exporting the following functions from the core package: to use module augmentation\nexport const t: <Content = string>(\n content?: CustomizableLanguageContent<Content>\n) => TranslationContent<Content> = tCore;\nexport const getTranslationContent: <Content = string>(\n languageContent: CustomizableLanguageContent<Content>,\n locale: Locales\n) => Content = getTranslationContentCore;\n\nexport type {\n LanguageContent,\n QuantityContent,\n ContentValue,\n DeclarationContent,\n} from '@intlayer/core';\nexport {\n getLocaleName,\n enu,\n getEnumerationContent,\n
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import type { Locales } from '@intlayer/config/client';\nimport {\n type TranslationContent,\n t as tCore,\n getTranslationContent as getTranslationContentCore,\n type LanguageContent,\n} from '@intlayer/core';\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nexport interface IConfigLocales<Content> {\n // This interface should be augmented in the consuming app\n}\n\ntype ConfigLocales = keyof IConfigLocales<unknown>;\n\nexport type CustomizableLanguageContent<Content = string> =\n ConfigLocales extends never\n ? LanguageContent<Content>\n : IConfigLocales<Content>;\n\n// Re-exporting the following functions from the core package: to use module augmentation\nexport const t: <Content = string>(\n content?: CustomizableLanguageContent<Content>\n) => TranslationContent<Content> = tCore;\nexport const getTranslationContent: <Content = string>(\n languageContent: CustomizableLanguageContent<Content>,\n locale: Locales\n) => Content = getTranslationContentCore;\n\nexport type {\n LanguageContent,\n QuantityContent,\n ContentValue,\n DeclarationContent,\n} from '@intlayer/core';\nexport {\n getLocaleName,\n enu,\n getEnumerationContent,\n getLocaleLang,\n getHTMLTextDir,\n getPathWithoutLocale,\n getMultilingualUrls,\n getLocalizedUrl,\n localeList,\n} from '@intlayer/core';\nexport {\n type CustomIntlayerConfig as IntlayerConfig,\n type LocalesValues,\n getConfiguration,\n} from '@intlayer/config/client';\nexport { Locales } from '@intlayer/config/client';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAKO;AA8BP,IAAAA,eAUO;AACP,oBAIO;AACP,IAAAC,iBAAwB;AA9BjB,MAAM,IAEsB,YAAAC;AAC5B,MAAM,wBAGE,YAAAC;","names":["import_core","import_client","tCore","getTranslationContentCore"]}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getLocaleName,
|
|
9
9
|
enu,
|
|
10
10
|
getEnumerationContent,
|
|
11
|
-
|
|
11
|
+
getLocaleLang,
|
|
12
12
|
getHTMLTextDir,
|
|
13
13
|
getPathWithoutLocale,
|
|
14
14
|
getMultilingualUrls,
|
|
@@ -24,8 +24,8 @@ export {
|
|
|
24
24
|
enu,
|
|
25
25
|
getConfiguration,
|
|
26
26
|
getEnumerationContent,
|
|
27
|
-
getHTMLLang,
|
|
28
27
|
getHTMLTextDir,
|
|
28
|
+
getLocaleLang,
|
|
29
29
|
getLocaleName,
|
|
30
30
|
getLocalizedUrl,
|
|
31
31
|
getMultilingualUrls,
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import type { Locales } from '@intlayer/config/client';\nimport {\n type TranslationContent,\n t as tCore,\n getTranslationContent as getTranslationContentCore,\n type LanguageContent,\n} from '@intlayer/core';\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nexport interface IConfigLocales<Content> {\n // This interface should be augmented in the consuming app\n}\n\ntype ConfigLocales = keyof IConfigLocales<unknown>;\n\nexport type CustomizableLanguageContent<Content = string> =\n ConfigLocales extends never\n ? LanguageContent<Content>\n : IConfigLocales<Content>;\n\n// Re-exporting the following functions from the core package: to use module augmentation\nexport const t: <Content = string>(\n content?: CustomizableLanguageContent<Content>\n) => TranslationContent<Content> = tCore;\nexport const getTranslationContent: <Content = string>(\n languageContent: CustomizableLanguageContent<Content>,\n locale: Locales\n) => Content = getTranslationContentCore;\n\nexport type {\n LanguageContent,\n QuantityContent,\n ContentValue,\n DeclarationContent,\n} from '@intlayer/core';\nexport {\n getLocaleName,\n enu,\n getEnumerationContent,\n
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import type { Locales } from '@intlayer/config/client';\nimport {\n type TranslationContent,\n t as tCore,\n getTranslationContent as getTranslationContentCore,\n type LanguageContent,\n} from '@intlayer/core';\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nexport interface IConfigLocales<Content> {\n // This interface should be augmented in the consuming app\n}\n\ntype ConfigLocales = keyof IConfigLocales<unknown>;\n\nexport type CustomizableLanguageContent<Content = string> =\n ConfigLocales extends never\n ? LanguageContent<Content>\n : IConfigLocales<Content>;\n\n// Re-exporting the following functions from the core package: to use module augmentation\nexport const t: <Content = string>(\n content?: CustomizableLanguageContent<Content>\n) => TranslationContent<Content> = tCore;\nexport const getTranslationContent: <Content = string>(\n languageContent: CustomizableLanguageContent<Content>,\n locale: Locales\n) => Content = getTranslationContentCore;\n\nexport type {\n LanguageContent,\n QuantityContent,\n ContentValue,\n DeclarationContent,\n} from '@intlayer/core';\nexport {\n getLocaleName,\n enu,\n getEnumerationContent,\n getLocaleLang,\n getHTMLTextDir,\n getPathWithoutLocale,\n getMultilingualUrls,\n getLocalizedUrl,\n localeList,\n} from '@intlayer/core';\nexport {\n type CustomIntlayerConfig as IntlayerConfig,\n type LocalesValues,\n getConfiguration,\n} from '@intlayer/config/client';\nexport { Locales } from '@intlayer/config/client';\n"],"mappings":"AACA;AAAA,EAEE,KAAK;AAAA,EACL,yBAAyB;AAAA,OAEpB;AAgBA,MAAM,IAEsB;AAC5B,MAAM,wBAGE;AAQf;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EAGE;AAAA,OACK;AACP,SAAS,eAAe;","names":[]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type CustomizableLanguageContent<Content = string> = ConfigLocales extend
|
|
|
7
7
|
export declare const t: <Content = string>(content?: CustomizableLanguageContent<Content>) => TranslationContent<Content>;
|
|
8
8
|
export declare const getTranslationContent: <Content = string>(languageContent: CustomizableLanguageContent<Content>, locale: Locales) => Content;
|
|
9
9
|
export type { LanguageContent, QuantityContent, ContentValue, DeclarationContent, } from '@intlayer/core';
|
|
10
|
-
export { getLocaleName, enu, getEnumerationContent,
|
|
10
|
+
export { getLocaleName, enu, getEnumerationContent, getLocaleLang, getHTMLTextDir, getPathWithoutLocale, getMultilingualUrls, getLocalizedUrl, localeList, } from '@intlayer/core';
|
|
11
11
|
export { type CustomIntlayerConfig as IntlayerConfig, type LocalesValues, getConfiguration, } from '@intlayer/config/client';
|
|
12
12
|
export { Locales } from '@intlayer/config/client';
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACL,KAAK,kBAAkB,EAGvB,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,WAAW,cAAc,CAAC,OAAO;CAEtC;AAED,KAAK,aAAa,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC;AAEnD,MAAM,MAAM,2BAA2B,CAAC,OAAO,GAAG,MAAM,IACtD,aAAa,SAAS,KAAK,GACvB,eAAe,CAAC,OAAO,CAAC,GACxB,cAAc,CAAC,OAAO,CAAC,CAAC;AAG9B,eAAO,MAAM,CAAC,EAAE,CAAC,OAAO,GAAG,MAAM,EAC/B,OAAO,CAAC,EAAE,2BAA2B,CAAC,OAAO,CAAC,KAC3C,kBAAkB,CAAC,OAAO,CAAS,CAAC;AACzC,eAAO,MAAM,qBAAqB,EAAE,CAAC,OAAO,GAAG,MAAM,EACnD,eAAe,EAAE,2BAA2B,CAAC,OAAO,CAAC,EACrD,MAAM,EAAE,OAAO,KACZ,OAAmC,CAAC;AAEzC,YAAY,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACZ,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,aAAa,EACb,GAAG,EACH,qBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACL,KAAK,kBAAkB,EAGvB,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,WAAW,cAAc,CAAC,OAAO;CAEtC;AAED,KAAK,aAAa,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC;AAEnD,MAAM,MAAM,2BAA2B,CAAC,OAAO,GAAG,MAAM,IACtD,aAAa,SAAS,KAAK,GACvB,eAAe,CAAC,OAAO,CAAC,GACxB,cAAc,CAAC,OAAO,CAAC,CAAC;AAG9B,eAAO,MAAM,CAAC,EAAE,CAAC,OAAO,GAAG,MAAM,EAC/B,OAAO,CAAC,EAAE,2BAA2B,CAAC,OAAO,CAAC,KAC3C,kBAAkB,CAAC,OAAO,CAAS,CAAC;AACzC,eAAO,MAAM,qBAAqB,EAAE,CAAC,OAAO,GAAG,MAAM,EACnD,eAAe,EAAE,2BAA2B,CAAC,OAAO,CAAC,EACrD,MAAM,EAAE,OAAO,KACZ,OAAmC,CAAC;AAEzC,YAAY,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACZ,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,aAAa,EACb,GAAG,EACH,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,KAAK,oBAAoB,IAAI,cAAc,EAC3C,KAAK,aAAa,EAClB,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intlayer",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Manage internationalization in a simple way, through TypeScript, declaration file, declare your multilingual every where in your code.",
|
|
6
6
|
"keywords": [
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"./package.json"
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@intlayer/
|
|
62
|
-
"@intlayer/
|
|
63
|
-
"@intlayer/
|
|
61
|
+
"@intlayer/config": "^3.5.5",
|
|
62
|
+
"@intlayer/core": "^3.5.5",
|
|
63
|
+
"@intlayer/cli": "^3.5.5"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@changesets/changelog-github": "0.5.0",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"@utils/tsup-config": "^1.0.4"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
|
-
"@intlayer/cli": "^3.5.
|
|
83
|
-
"@intlayer/
|
|
84
|
-
"@intlayer/
|
|
82
|
+
"@intlayer/cli": "^3.5.5",
|
|
83
|
+
"@intlayer/config": "^3.5.5",
|
|
84
|
+
"@intlayer/core": "^3.5.5"
|
|
85
85
|
},
|
|
86
86
|
"engines": {
|
|
87
87
|
"node": ">=14.18"
|