Comparing version 4.1.11 to 5.0.0
@@ -1,13 +0,18 @@ | ||
import type { Locales } from '@intlayer/config/client'; | ||
import { type TranslationContent, type LanguageContent } from '@intlayer/core'; | ||
export interface IConfigLocales<Content> { | ||
import { Locales } from '@intlayer/config/client'; | ||
import { type TranslationContent, type NestedContent, type DictionaryKeys, type TranslationContentState, type Dictionary as DictionaryCore, type ValidDotPathsFor } from '@intlayer/core'; | ||
interface IConfigLocales<Content> { | ||
} | ||
type ConfigLocales = keyof IConfigLocales<unknown>; | ||
export type CustomizableLanguageContent<Content = string> = ConfigLocales extends never ? LanguageContent<Content> : IConfigLocales<Content>; | ||
export declare const t: <Content = string>(content?: CustomizableLanguageContent<Content>) => TranslationContent<Content>; | ||
export declare const getTranslationContent: <Content = string>(languageContent: CustomizableLanguageContent<Content>, locale: Locales) => Content; | ||
export type { LanguageContent, QuantityContent, ContentValue, DeclarationContent, } from '@intlayer/core'; | ||
export { getLocaleName, enu, getEnumerationContent, getLocaleLang, getHTMLTextDir, getPathWithoutLocale, getMultilingualUrls, getLocalizedUrl, localeList, } from '@intlayer/core'; | ||
type CustomizableLanguageContent<Content = string> = ConfigLocales extends never ? TranslationContentState<Content> : IConfigLocales<Content>; | ||
declare const t: <Content = string>(content: CustomizableLanguageContent<Content>) => TranslationContent<Content>; | ||
declare const getTranslationContent: <Content = string>(languageContent: CustomizableLanguageContent<Content>, locale: Locales) => Content; | ||
declare const nest: <K extends DictionaryKeys>(dictionaryKey: K, path?: ValidDotPathsFor<K>) => NestedContent<K>; | ||
type Dictionary<T = undefined> = DictionaryCore<T, true>; | ||
/** | ||
* @deprecated Use `Dictionary<T>` instead. | ||
*/ | ||
type DeclarationContent<T> = Dictionary<T>; | ||
export { Locales, type Dictionary, type DeclarationContent, type IConfigLocales, t, getTranslationContent, nest, }; | ||
export { type CustomIntlayerConfig as IntlayerConfig, type LocalesValues, getConfiguration, } from '@intlayer/config/client'; | ||
export { Locales } from '@intlayer/config/client'; | ||
export { type LanguageContent, type ContentNode, getLocaleName, enu, cond, md, getEnumeration, getDictionary, getIntlayer, getIntlayerAsync, getTranslation, getNesting, getLocaleLang, getHTMLTextDir, getPathWithoutLocale, getMultilingualUrls, getLocalizedUrl, localeList, } from '@intlayer/core'; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "intlayer", | ||
"version": "4.1.11", | ||
"version": "5.0.0", | ||
"private": false, | ||
@@ -61,5 +61,5 @@ "description": "Manage internationalization i18n in a simple way, through TypeScript, declaration file, declare your multilingual content every where in your code.", | ||
"dependencies": { | ||
"@intlayer/cli": "4.1.11", | ||
"@intlayer/core": "^4.1.11", | ||
"@intlayer/config": "4.1.11" | ||
"@intlayer/config": "5.0.0", | ||
"@intlayer/cli": "5.0.0", | ||
"@intlayer/core": "^5.0.0" | ||
}, | ||
@@ -80,9 +80,9 @@ "devDependencies": { | ||
"@utils/ts-config": "1.0.4", | ||
"@utils/tsup-config": "1.0.4", | ||
"@utils/ts-config-types": "1.0.4" | ||
"@utils/ts-config-types": "1.0.4", | ||
"@utils/tsup-config": "1.0.4" | ||
}, | ||
"peerDependencies": { | ||
"@intlayer/cli": "4.1.11", | ||
"@intlayer/config": "4.1.11", | ||
"@intlayer/core": "^4.1.11" | ||
"@intlayer/cli": "5.0.0", | ||
"@intlayer/config": "5.0.0", | ||
"@intlayer/core": "^5.0.0" | ||
}, | ||
@@ -89,0 +89,0 @@ "engines": { |
@@ -19,3 +19,3 @@ <div align="center"> | ||
# intlayer: Manage Multilingual Content Declaration (i18n) | ||
# intlayer: Manage Multilingual Dictionary (i18n) | ||
@@ -92,3 +92,3 @@ **Intlayer** is a suite of packages designed specifically for JavaScript developers. It is compatible with frameworks like React, Next.js, and Express.js. | ||
```tsx filePath="src/ClientComponent/index.content.ts" codeFormat="typescript" | ||
import { type DeclarationContent, t } from "intlayer"; | ||
import { t, type Dictionary } from "intlayer"; | ||
@@ -112,3 +112,3 @@ const clientComponentContent = { | ||
}, | ||
} satisfies DeclarationContent; | ||
} satisfies Dictionary; | ||
@@ -115,0 +115,0 @@ export default clientComponentContent; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
36502
154
+ Added@intlayer/api@5.0.05.1.2(transitive)
+ Added@intlayer/chokidar@5.0.05.1.2(transitive)
+ Added@intlayer/cli@5.0.05.1.2(transitive)
+ Added@intlayer/config@5.0.05.1.2(transitive)
+ Added@intlayer/core@5.0.05.1.2(transitive)
+ Added@intlayer/dictionaries-entry@5.0.05.1.2(transitive)
+ Added@intlayer/editor@5.0.05.1.2(transitive)
+ Addedintlayer@5.1.2(transitive)
- Removed@glideapps/ts-necessities@2.2.3(transitive)
- Removed@intlayer/api@4.1.114.1.12(transitive)
- Removed@intlayer/chokidar@4.1.11(transitive)
- Removed@intlayer/cli@4.1.11(transitive)
- Removed@intlayer/config@4.1.114.1.12(transitive)
- Removed@intlayer/core@4.1.114.1.12(transitive)
- Removed@intlayer/dictionaries-entry@4.1.114.1.12(transitive)
- Removed@intlayer/editor@4.1.11(transitive)
- Removedabort-controller@3.0.0(transitive)
- Removedbase64-js@1.5.1(transitive)
- Removedbrowser-or-node@3.0.0(transitive)
- Removedbuffer@6.0.3(transitive)
- Removedcollection-utils@1.0.1(transitive)
- Removedcross-fetch@4.1.0(transitive)
- Removedevent-target-shim@5.0.1(transitive)
- Removedevents@3.3.0(transitive)
- Removedieee754@1.2.1(transitive)
- Removedis-url@1.2.4(transitive)
- Removedjs-base64@3.7.7(transitive)
- Removedlodash@4.17.21(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedpako@0.2.91.0.11(transitive)
- Removedpluralize@8.0.0(transitive)
- Removedprocess@0.11.10(transitive)
- Removedquicktype-core@23.0.171(transitive)
- Removedreadable-stream@4.5.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedtiny-inflate@1.0.3(transitive)
- Removedtr46@0.0.3(transitive)
- Removedunicode-properties@1.4.1(transitive)
- Removedunicode-trie@2.0.0(transitive)
- Removedurijs@1.19.11(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)
- Removedwordwrap@1.0.0(transitive)
- Removedyaml@2.7.0(transitive)
Updated@intlayer/cli@5.0.0
Updated@intlayer/config@5.0.0
Updated@intlayer/core@^5.0.0