intlayer 2.0.0 → 2.0.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.
package/README.md CHANGED
@@ -43,9 +43,9 @@ Create and manage your content dictionaries:
43
43
 
44
44
  ```typescript
45
45
  // src/app/[locale]/page.content.ts
46
- import { t, enu, type ContentModule } from "intlayer";
46
+ import { t, enu, type DeclarationContent } from "intlayer";
47
47
 
48
- const pageContent: ContentModule = {
48
+ const pageContent: DeclarationContent = {
49
49
  id: "page",
50
50
  getStarted: {
51
51
  main: t({
@@ -79,7 +79,7 @@ export default pageContent;
79
79
 
80
80
  import { t } from "intlayer";
81
81
 
82
- /** @type {import('intlayer').ContentModule} */
82
+ /** @type {import('intlayer').DeclarationContent} */
83
83
  const pageContent = {
84
84
  id: "page",
85
85
  getStarted: {
@@ -114,7 +114,7 @@ export default pageContent;
114
114
 
115
115
  const { t } = require("intlayer");
116
116
 
117
- /** @type {import('intlayer').ContentModule} */
117
+ /** @type {import('intlayer').DeclarationContent} */
118
118
  const pageContent = {
119
119
  id: "page",
120
120
  getStarted: {
@@ -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/* eslint-disable @typescript-eslint/no-empty-interface */\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 ContentModule,\n} from '@intlayer/core';\nexport { getLocaleName, enu, getEnumerationContent } from '@intlayer/core';\nexport type {\n LocalesValues,\n CustomIntlayerConfig as IntlayerConfig,\n} from '@intlayer/config/client';\nexport { Locales } from '@intlayer/config/client';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAKO;AA8BP,IAAAA,eAA0D;AAK1D,oBAAwB;AAnBjB,MAAM,IAEsB,YAAAC;AAC5B,MAAM,wBAGE,YAAAC;","names":["import_core","tCore","getTranslationContentCore"]}
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/* eslint-disable @typescript-eslint/no-empty-interface */\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 { getLocaleName, enu, getEnumerationContent } from '@intlayer/core';\nexport type {\n LocalesValues,\n CustomIntlayerConfig as IntlayerConfig,\n} from '@intlayer/config/client';\nexport { Locales } from '@intlayer/config/client';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAKO;AA8BP,IAAAA,eAA0D;AAK1D,oBAAwB;AAnBjB,MAAM,IAEsB,YAAAC;AAC5B,MAAM,wBAGE,YAAAC;","names":["import_core","tCore","getTranslationContentCore"]}
@@ -1,7 +1,7 @@
1
1
  import { Locales } from '@intlayer/config/client';
2
2
  export { CustomIntlayerConfig as IntlayerConfig, Locales, LocalesValues } from '@intlayer/config/client';
3
3
  import { LanguageContent, TranslationContent } from '@intlayer/core';
4
- export { ContentModule, ContentValue, LanguageContent, QuantityContent, enu, getEnumerationContent, getLocaleName } from '@intlayer/core';
4
+ export { ContentValue, DeclarationContent, LanguageContent, QuantityContent, enu, getEnumerationContent, getLocaleName } from '@intlayer/core';
5
5
 
6
6
  interface IConfigLocales<Content> {
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import { Locales } from '@intlayer/config/client';
2
2
  export { CustomIntlayerConfig as IntlayerConfig, Locales, LocalesValues } from '@intlayer/config/client';
3
3
  import { LanguageContent, TranslationContent } from '@intlayer/core';
4
- export { ContentModule, ContentValue, LanguageContent, QuantityContent, enu, getEnumerationContent, getLocaleName } from '@intlayer/core';
4
+ export { ContentValue, DeclarationContent, LanguageContent, QuantityContent, enu, getEnumerationContent, getLocaleName } from '@intlayer/core';
5
5
 
6
6
  interface IConfigLocales<Content> {
7
7
  }
@@ -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/* eslint-disable @typescript-eslint/no-empty-interface */\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 ContentModule,\n} from '@intlayer/core';\nexport { getLocaleName, enu, getEnumerationContent } from '@intlayer/core';\nexport type {\n LocalesValues,\n CustomIntlayerConfig as IntlayerConfig,\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,SAAS,eAAe,KAAK,6BAA6B;AAK1D,SAAS,eAAe;","names":[]}
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/* eslint-disable @typescript-eslint/no-empty-interface */\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 { getLocaleName, enu, getEnumerationContent } from '@intlayer/core';\nexport type {\n LocalesValues,\n CustomIntlayerConfig as IntlayerConfig,\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,SAAS,eAAe,KAAK,6BAA6B;AAK1D,SAAS,eAAe;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intlayer",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "private": false,
5
5
  "description": "IntLayer is a layer of abstraction between the business logic and the data access layer. Manage internationalization in a simple way, through TypeScript, JavaScript or JSON declaration file.",
6
6
  "keywords": [
@@ -40,15 +40,13 @@
40
40
  },
41
41
  "files": [
42
42
  "./dist",
43
- "./src",
44
- "./bin",
45
43
  "./package.json"
46
44
  ],
47
45
  "dependencies": {
48
46
  "webpack": "^5.91.0",
49
- "@intlayer/config": "^2.0.0",
50
- "@intlayer/core": "^2.0.0",
51
- "intlayer": "^2.0.0"
47
+ "@intlayer/config": "^2.0.1",
48
+ "intlayer": "^2.0.1",
49
+ "@intlayer/core": "^2.0.1"
52
50
  },
53
51
  "devDependencies": {
54
52
  "@changesets/changelog-github": "0.5.0",
package/src/index.ts CHANGED
@@ -32,7 +32,7 @@ export type {
32
32
  LanguageContent,
33
33
  QuantityContent,
34
34
  ContentValue,
35
- ContentModule,
35
+ DeclarationContent,
36
36
  } from '@intlayer/core';
37
37
  export { getLocaleName, enu, getEnumerationContent } from '@intlayer/core';
38
38
  export type {