intlayer 9.3.3 → 9.4.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 CHANGED
@@ -214,6 +214,7 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
214
214
  <li><a href="https://intlayer.org/doc/environment/vite-and-vue" rel=''>Vite + Vue</a></li>
215
215
  <li><a href="https://intlayer.org/doc/environment/nuxt-and-vue" rel=''>Vite + Nuxt</a></li>
216
216
  <li><a href="https://intlayer.org/doc/environment/vite-and-solid" rel=''>Vite + Solid</a></li>
217
+ <li><a href="https://intlayer.org/doc/environment/solid-start" rel=''>Solid Start</a></li>
217
218
  <li><a href="https://intlayer.org/doc/environment/angular" rel=''>Angular</a></li>
218
219
  <li>
219
220
  <a href="https://intlayer.org/doc/environment/express" rel=''>Backend</a>
@@ -223,7 +224,9 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
223
224
  <li><a href="https://intlayer.org/doc/environment/fastify" rel=''>Fastify</a></li>
224
225
  <li><a href="https://intlayer.org/doc/environment/adonisjs" rel=''>AdonisJS</a></li>
225
226
  <li><a href="https://intlayer.org/doc/environment/hono" rel=''>Hono</a></li>
227
+ <li><a href="https://intlayer.org/doc/environment/elysia" rel=''>Elysia</a></li>
226
228
  </ul>
229
+
227
230
  </li>
228
231
  </ul>
229
232
  </details>
@@ -327,4 +330,4 @@ Contribute on [GitHub](https://github.com/aymericzip/intlayer), [GitLab](https:/
327
330
 
328
331
  If you like Intlayer, give us a ⭐ on GitHub. It helps others discover the project! [See why GitHub Stars matter](https://github.com/aymericzip/intlayer/blob/main/CONTRIBUTING.md#why-github-stars-matter-).
329
332
 
330
- [![Star History Chart](https://api.star-history.com/svg?repos=aymericzip/intlayer&type=Date)](https://star-history.com/#aymericzip/intlayer&Date)
333
+ [![Star History Chart](https://star-history.dera.page/svg?repos=aymericzip/intlayer&type=Date)](https://star-history.dera.page/#aymericzip/intlayer&Date)
@@ -188,6 +188,12 @@ Object.defineProperty(exports, 'getDictionary', {
188
188
  return _intlayer_core_interpreter.getDictionary;
189
189
  }
190
190
  });
191
+ Object.defineProperty(exports, 'getDictionaryAsync', {
192
+ enumerable: true,
193
+ get: function () {
194
+ return _intlayer_core_interpreter.getDictionaryAsync;
195
+ }
196
+ });
191
197
  Object.defineProperty(exports, 'getEnumeration', {
192
198
  enumerable: true,
193
199
  get: function () {
@@ -212,6 +218,12 @@ Object.defineProperty(exports, 'getIntlayer', {
212
218
  return _intlayer_core_interpreter.getIntlayer;
213
219
  }
214
220
  });
221
+ Object.defineProperty(exports, 'getIntlayerAsync', {
222
+ enumerable: true,
223
+ get: function () {
224
+ return _intlayer_core_interpreter.getIntlayerAsync;
225
+ }
226
+ });
215
227
  Object.defineProperty(exports, 'getLocale', {
216
228
  enumerable: true,
217
229
  get: function () {
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["internationalization"],"sources":["../../src/index.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noEmptyInterface: Intlayer module augmentation registries */\n\nimport type {\n CustomIntlayerConfig,\n IntlayerConfig,\n} from '@intlayer/types/config';\nimport type { Dictionary as DictionaryCore } from '@intlayer/types/dictionary';\nimport type { SchemaKeys } from '@intlayer/types/module_augmentation';\n\n/**\n * The dictionary type used to define the structure of a dictionary.\n * It is used to provide type safety and autocompletion when defining a dictionary.\n *\n * @example\n * ```ts\n * import { Dictionary } from 'intlayer';\n *\n * const dictionary: Dictionary = { ... };\n * ```\n */\ntype Dictionary<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = DictionaryCore<T, SchemaKey, true>;\n\n/**\n * The content of a dictionary.\n *\n * @deprecated Use `Dictionary<T>` instead.\n */\ntype DeclarationContent<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = Dictionary<T, SchemaKey>;\n\nexport { ALL_LOCALES, type Locale } from '@intlayer/types/allLocales';\nexport type { ContentNode } from '@intlayer/types/dictionary';\nexport * as Locales from '@intlayer/types/locales';\nexport type {\n DeclaredLocales,\n LocalesValues,\n RequiredLocales,\n StrictModeLocaleMap,\n} from '@intlayer/types/module_augmentation';\n\nexport type {\n CustomIntlayerConfig as IntlayerConfig,\n DeclarationContent,\n Dictionary,\n};\n\nimport {\n content,\n /**\n * The editor configuration defined in the configuration.\n */\n editor,\n internationalization,\n log,\n routing,\n} from '@intlayer/config/built';\n\n/**\n * The locales defined in the configuration.\n */\nconst locales = internationalization.locales;\n\n/**\n * The required locales defined in the configuration.\n */\nconst requiredLocales = internationalization.requiredLocales;\n\n/**\n * The default locale defined in the configuration.\n */\nconst defaultLocale = internationalization.defaultLocale;\n\n/**\n * @deprecated Use `defaultLocale`, `locales`, `requiredLocales` or `editor` instead.\n *\n * Configuration of Intlayer.\n *\n */\nconst configuration: Pick<\n IntlayerConfig,\n 'editor' | 'internationalization' | 'log' | 'routing'\n> = {\n editor,\n internationalization,\n log,\n content,\n routing,\n};\n\n/**\n * Returns the configuration of Intlayer.\n */\nconst getConfiguration = () => configuration;\n\nexport { file } from '@intlayer/core/file'; // Include specific export for browser because of node js function that can't be used in browser\nexport {\n compact,\n currency,\n date,\n Intl,\n number,\n percentage,\n relativeTime,\n units,\n} from '@intlayer/core/formatters';\nexport {\n getDictionary,\n getEnumeration,\n /**\n * @deprecated Use `getEnumeration` instead.\n */\n getEnumeration as getEnumerationContent,\n getIntlayer,\n getNesting,\n getTranslation,\n /**\n * @deprecated Use `getTranslation` instead.\n */\n getTranslation as getTranslationContent,\n} from '@intlayer/core/interpreter';\nexport type {\n GenerateSitemapOptions,\n SitemapUrlEntry,\n} from '@intlayer/core/localization';\nexport {\n comparePaths,\n generateSitemap,\n generateSitemapUrl,\n getBrowserLocale,\n getCanonicalPath,\n getHTMLTextDir,\n getLocale,\n getLocaleFromPath,\n getLocaleLang,\n getLocaleName,\n getLocalizedPath,\n getLocalizedUrl,\n getMultilingualUrls,\n getPathWithoutLocale,\n getPrefix,\n getRewriteRules,\n isDeclaredLocale,\n localeDetector,\n localeFlatMap,\n localeMap,\n localeRecord,\n localeResolver,\n normalizePath,\n validatePrefix,\n} from '@intlayer/core/localization';\nexport { getMarkdownMetadata } from '@intlayer/core/markdown';\nexport {\n cond,\n enu,\n gender,\n html,\n insert,\n md,\n nest,\n plural,\n select,\n t,\n} from '@intlayer/core/transpiler';\nexport {\n getCookie,\n /**\n * @deprecated Use `getLocaleFromStorageClient` or `getLocaleFromStorageServer` instead.\n */\n getLocaleFromStorage,\n getLocaleFromStorageClient,\n getLocaleFromStorageServer,\n LocaleStorageClient,\n LocaleStorageServer,\n /**\n * @deprecated Use `setLocaleInStorageClient` or `setLocaleInStorageServer` instead.\n */\n setLocaleInStorage,\n setLocaleInStorageClient,\n setLocaleInStorageServer,\n} from '@intlayer/core/utils';\n\n// Reexport here for CJS compatibility\n// Fix ReferenceError: Cannot access 'xxx' before initialization\nexport {\n /**\n * @deprecated Use `defaultLocale`, `locales`, `requiredLocales` or `editor` instead.\n */\n configuration,\n defaultLocale,\n editor,\n getConfiguration,\n locales,\n requiredLocales,\n};\n\n// --- Registries to be augmented by the generator ---\nexport interface __DictionaryRegistry {} // id -> interfaceof ictionary\nexport interface __DeclaredLocalesRegistry {} // 'fr': 1, 'en': 1, ...\nexport interface __RequiredLocalesRegistry {} // 'en': 1, ...\nexport interface __SchemaRegistry {} // id -> interface of schema\nexport interface __StrictModeRegistry {} // one of: { strict: true } | { inclusive: true } | { loose: true }\nexport interface __EditorRegistry {} // one of: { enabled: true } | { enabled: false }\nexport interface __RoutingRegistry {} // { mode: 'prefix-no-default'; defaultLocale: 'en' }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,MAAM,UAAUA,4CAAqB;;;;AAKrC,MAAM,kBAAkBA,4CAAqB;;;;AAK7C,MAAM,gBAAgBA,4CAAqB;;;;;;;AAQ3C,MAAM,gBAGF;CACF;CACA;CACA;CACA;CACA;AACF;;;;AAKA,MAAM,yBAAyB"}
1
+ {"version":3,"file":"index.cjs","names":["internationalization"],"sources":["../../src/index.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noEmptyInterface: Intlayer module augmentation registries */\n\nimport type {\n CustomIntlayerConfig,\n IntlayerConfig,\n} from '@intlayer/types/config';\nimport type { Dictionary as DictionaryCore } from '@intlayer/types/dictionary';\nimport type { SchemaKeys } from '@intlayer/types/module_augmentation';\n\n/**\n * The dictionary type used to define the structure of a dictionary.\n * It is used to provide type safety and autocompletion when defining a dictionary.\n *\n * @example\n * ```ts\n * import { Dictionary } from 'intlayer';\n *\n * const dictionary: Dictionary = { ... };\n * ```\n */\ntype Dictionary<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = DictionaryCore<T, SchemaKey, true>;\n\n/**\n * The content of a dictionary.\n *\n * @deprecated Use `Dictionary<T>` instead.\n */\ntype DeclarationContent<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = Dictionary<T, SchemaKey>;\n\nexport { ALL_LOCALES, type Locale } from '@intlayer/types/allLocales';\nexport type { ContentNode } from '@intlayer/types/dictionary';\nexport * as Locales from '@intlayer/types/locales';\nexport type {\n DeclaredLocales,\n LocalesValues,\n RequiredLocales,\n StrictModeLocaleMap,\n} from '@intlayer/types/module_augmentation';\n\nexport type {\n CustomIntlayerConfig as IntlayerConfig,\n DeclarationContent,\n Dictionary,\n};\n\nimport {\n content,\n /**\n * The editor configuration defined in the configuration.\n */\n editor,\n internationalization,\n log,\n routing,\n} from '@intlayer/config/built';\n\n/**\n * The locales defined in the configuration.\n */\nconst locales = internationalization.locales;\n\n/**\n * The required locales defined in the configuration.\n */\nconst requiredLocales = internationalization.requiredLocales;\n\n/**\n * The default locale defined in the configuration.\n */\nconst defaultLocale = internationalization.defaultLocale;\n\n/**\n * @deprecated Use `defaultLocale`, `locales`, `requiredLocales` or `editor` instead.\n *\n * Configuration of Intlayer.\n *\n */\nconst configuration: Pick<\n IntlayerConfig,\n 'editor' | 'internationalization' | 'log' | 'routing'\n> = {\n editor,\n internationalization,\n log,\n content,\n routing,\n};\n\n/**\n * Returns the configuration of Intlayer.\n */\nconst getConfiguration = () => configuration;\n\nexport { file } from '@intlayer/core/file'; // Include specific export for browser because of node js function that can't be used in browser\nexport {\n compact,\n currency,\n date,\n Intl,\n number,\n percentage,\n relativeTime,\n units,\n} from '@intlayer/core/formatters';\nexport {\n getDictionary,\n getDictionaryAsync,\n getEnumeration,\n /**\n * @deprecated Use `getEnumeration` instead.\n */\n getEnumeration as getEnumerationContent,\n getIntlayer,\n getIntlayerAsync,\n getNesting,\n getTranslation,\n /**\n * @deprecated Use `getTranslation` instead.\n */\n getTranslation as getTranslationContent,\n} from '@intlayer/core/interpreter';\nexport type {\n GenerateSitemapOptions,\n SitemapUrlEntry,\n} from '@intlayer/core/localization';\nexport {\n comparePaths,\n generateSitemap,\n generateSitemapUrl,\n getBrowserLocale,\n getCanonicalPath,\n getHTMLTextDir,\n getLocale,\n getLocaleFromPath,\n getLocaleLang,\n getLocaleName,\n getLocalizedPath,\n getLocalizedUrl,\n getMultilingualUrls,\n getPathWithoutLocale,\n getPrefix,\n getRewriteRules,\n isDeclaredLocale,\n localeDetector,\n localeFlatMap,\n localeMap,\n localeRecord,\n localeResolver,\n normalizePath,\n validatePrefix,\n} from '@intlayer/core/localization';\nexport { getMarkdownMetadata } from '@intlayer/core/markdown';\nexport {\n cond,\n enu,\n gender,\n html,\n insert,\n md,\n nest,\n plural,\n select,\n t,\n} from '@intlayer/core/transpiler';\nexport {\n getCookie,\n /**\n * @deprecated Use `getLocaleFromStorageClient` or `getLocaleFromStorageServer` instead.\n */\n getLocaleFromStorage,\n getLocaleFromStorageClient,\n getLocaleFromStorageServer,\n LocaleStorageClient,\n LocaleStorageServer,\n /**\n * @deprecated Use `setLocaleInStorageClient` or `setLocaleInStorageServer` instead.\n */\n setLocaleInStorage,\n setLocaleInStorageClient,\n setLocaleInStorageServer,\n} from '@intlayer/core/utils';\n\n// Reexport here for CJS compatibility\n// Fix ReferenceError: Cannot access 'xxx' before initialization\nexport {\n /**\n * @deprecated Use `defaultLocale`, `locales`, `requiredLocales` or `editor` instead.\n */\n configuration,\n defaultLocale,\n editor,\n getConfiguration,\n locales,\n requiredLocales,\n};\n\n// --- Registries to be augmented by the generator ---\nexport interface __DictionaryRegistry {} // id -> interfaceof ictionary\nexport interface __DeclaredLocalesRegistry {} // 'fr': 1, 'en': 1, ...\nexport interface __RequiredLocalesRegistry {} // 'en': 1, ...\nexport interface __SchemaRegistry {} // id -> interface of schema\nexport interface __StrictModeRegistry {} // one of: { strict: true } | { inclusive: true } | { loose: true }\nexport interface __EditorRegistry {} // one of: { enabled: true } | { enabled: false }\nexport interface __RoutingRegistry {} // { mode: 'prefix-no-default'; defaultLocale: 'en' }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,MAAM,UAAUA,4CAAqB;;;;AAKrC,MAAM,kBAAkBA,4CAAqB;;;;AAK7C,MAAM,gBAAgBA,4CAAqB;;;;;;;AAQ3C,MAAM,gBAGF;CACF;CACA;CACA;CACA;CACA;AACF;;;;AAKA,MAAM,yBAAyB"}
@@ -1,7 +1,7 @@
1
1
  import { content, editor, internationalization, log, routing } from "@intlayer/config/built";
2
2
  import { file } from "@intlayer/core/file";
3
3
  import { Intl, compact, currency, date, number, percentage, relativeTime, units } from "@intlayer/core/formatters";
4
- import { getDictionary, getEnumeration, getEnumeration as getEnumerationContent, getIntlayer, getNesting, getTranslation, getTranslation as getTranslationContent } from "@intlayer/core/interpreter";
4
+ import { getDictionary, getDictionaryAsync, getEnumeration, getEnumeration as getEnumerationContent, getIntlayer, getIntlayerAsync, getNesting, getTranslation, getTranslation as getTranslationContent } from "@intlayer/core/interpreter";
5
5
  import { comparePaths, generateSitemap, generateSitemapUrl, getBrowserLocale, getCanonicalPath, getHTMLTextDir, getLocale, getLocaleFromPath, getLocaleLang, getLocaleName, getLocalizedPath, getLocalizedUrl, getMultilingualUrls, getPathWithoutLocale, getPrefix, getRewriteRules, isDeclaredLocale, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, normalizePath, validatePrefix } from "@intlayer/core/localization";
6
6
  import { getMarkdownMetadata } from "@intlayer/core/markdown";
7
7
  import { cond, enu, gender, html, insert, md, nest, plural, select, t } from "@intlayer/core/transpiler";
@@ -39,7 +39,7 @@ const configuration = {
39
39
  const getConfiguration = () => configuration;
40
40
 
41
41
  //#endregion
42
- export { Intl, LocaleStorageClient, LocaleStorageServer, compact, comparePaths, cond, configuration, currency, date, defaultLocale, editor, enu, file, gender, generateSitemap, generateSitemapUrl, getBrowserLocale, getCanonicalPath, getConfiguration, getCookie, getDictionary, getEnumeration, getEnumerationContent, getHTMLTextDir, getIntlayer, getLocale, getLocaleFromPath, getLocaleFromStorage, getLocaleFromStorageClient, getLocaleFromStorageServer, getLocaleLang, getLocaleName, getLocalizedPath, getLocalizedUrl, getMarkdownMetadata, getMultilingualUrls, getNesting, getPathWithoutLocale, getPrefix, getRewriteRules, getTranslation, getTranslationContent, html, insert, isDeclaredLocale, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, locales, md, nest, normalizePath, number, percentage, plural, relativeTime, requiredLocales, select, setLocaleInStorage, setLocaleInStorageClient, setLocaleInStorageServer, t, units, validatePrefix };
42
+ export { Intl, LocaleStorageClient, LocaleStorageServer, compact, comparePaths, cond, configuration, currency, date, defaultLocale, editor, enu, file, gender, generateSitemap, generateSitemapUrl, getBrowserLocale, getCanonicalPath, getConfiguration, getCookie, getDictionary, getDictionaryAsync, getEnumeration, getEnumerationContent, getHTMLTextDir, getIntlayer, getIntlayerAsync, getLocale, getLocaleFromPath, getLocaleFromStorage, getLocaleFromStorageClient, getLocaleFromStorageServer, getLocaleLang, getLocaleName, getLocalizedPath, getLocalizedUrl, getMarkdownMetadata, getMultilingualUrls, getNesting, getPathWithoutLocale, getPrefix, getRewriteRules, getTranslation, getTranslationContent, html, insert, isDeclaredLocale, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, locales, md, nest, normalizePath, number, percentage, plural, relativeTime, requiredLocales, select, setLocaleInStorage, setLocaleInStorageClient, setLocaleInStorageServer, t, units, validatePrefix };
43
43
  export { ALL_LOCALES } from "@intlayer/types/allLocales";
44
44
  export * as Locales from "@intlayer/types/locales";
45
45
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noEmptyInterface: Intlayer module augmentation registries */\n\nimport type {\n CustomIntlayerConfig,\n IntlayerConfig,\n} from '@intlayer/types/config';\nimport type { Dictionary as DictionaryCore } from '@intlayer/types/dictionary';\nimport type { SchemaKeys } from '@intlayer/types/module_augmentation';\n\n/**\n * The dictionary type used to define the structure of a dictionary.\n * It is used to provide type safety and autocompletion when defining a dictionary.\n *\n * @example\n * ```ts\n * import { Dictionary } from 'intlayer';\n *\n * const dictionary: Dictionary = { ... };\n * ```\n */\ntype Dictionary<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = DictionaryCore<T, SchemaKey, true>;\n\n/**\n * The content of a dictionary.\n *\n * @deprecated Use `Dictionary<T>` instead.\n */\ntype DeclarationContent<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = Dictionary<T, SchemaKey>;\n\nexport { ALL_LOCALES, type Locale } from '@intlayer/types/allLocales';\nexport type { ContentNode } from '@intlayer/types/dictionary';\nexport * as Locales from '@intlayer/types/locales';\nexport type {\n DeclaredLocales,\n LocalesValues,\n RequiredLocales,\n StrictModeLocaleMap,\n} from '@intlayer/types/module_augmentation';\n\nexport type {\n CustomIntlayerConfig as IntlayerConfig,\n DeclarationContent,\n Dictionary,\n};\n\nimport {\n content,\n /**\n * The editor configuration defined in the configuration.\n */\n editor,\n internationalization,\n log,\n routing,\n} from '@intlayer/config/built';\n\n/**\n * The locales defined in the configuration.\n */\nconst locales = internationalization.locales;\n\n/**\n * The required locales defined in the configuration.\n */\nconst requiredLocales = internationalization.requiredLocales;\n\n/**\n * The default locale defined in the configuration.\n */\nconst defaultLocale = internationalization.defaultLocale;\n\n/**\n * @deprecated Use `defaultLocale`, `locales`, `requiredLocales` or `editor` instead.\n *\n * Configuration of Intlayer.\n *\n */\nconst configuration: Pick<\n IntlayerConfig,\n 'editor' | 'internationalization' | 'log' | 'routing'\n> = {\n editor,\n internationalization,\n log,\n content,\n routing,\n};\n\n/**\n * Returns the configuration of Intlayer.\n */\nconst getConfiguration = () => configuration;\n\nexport { file } from '@intlayer/core/file'; // Include specific export for browser because of node js function that can't be used in browser\nexport {\n compact,\n currency,\n date,\n Intl,\n number,\n percentage,\n relativeTime,\n units,\n} from '@intlayer/core/formatters';\nexport {\n getDictionary,\n getEnumeration,\n /**\n * @deprecated Use `getEnumeration` instead.\n */\n getEnumeration as getEnumerationContent,\n getIntlayer,\n getNesting,\n getTranslation,\n /**\n * @deprecated Use `getTranslation` instead.\n */\n getTranslation as getTranslationContent,\n} from '@intlayer/core/interpreter';\nexport type {\n GenerateSitemapOptions,\n SitemapUrlEntry,\n} from '@intlayer/core/localization';\nexport {\n comparePaths,\n generateSitemap,\n generateSitemapUrl,\n getBrowserLocale,\n getCanonicalPath,\n getHTMLTextDir,\n getLocale,\n getLocaleFromPath,\n getLocaleLang,\n getLocaleName,\n getLocalizedPath,\n getLocalizedUrl,\n getMultilingualUrls,\n getPathWithoutLocale,\n getPrefix,\n getRewriteRules,\n isDeclaredLocale,\n localeDetector,\n localeFlatMap,\n localeMap,\n localeRecord,\n localeResolver,\n normalizePath,\n validatePrefix,\n} from '@intlayer/core/localization';\nexport { getMarkdownMetadata } from '@intlayer/core/markdown';\nexport {\n cond,\n enu,\n gender,\n html,\n insert,\n md,\n nest,\n plural,\n select,\n t,\n} from '@intlayer/core/transpiler';\nexport {\n getCookie,\n /**\n * @deprecated Use `getLocaleFromStorageClient` or `getLocaleFromStorageServer` instead.\n */\n getLocaleFromStorage,\n getLocaleFromStorageClient,\n getLocaleFromStorageServer,\n LocaleStorageClient,\n LocaleStorageServer,\n /**\n * @deprecated Use `setLocaleInStorageClient` or `setLocaleInStorageServer` instead.\n */\n setLocaleInStorage,\n setLocaleInStorageClient,\n setLocaleInStorageServer,\n} from '@intlayer/core/utils';\n\n// Reexport here for CJS compatibility\n// Fix ReferenceError: Cannot access 'xxx' before initialization\nexport {\n /**\n * @deprecated Use `defaultLocale`, `locales`, `requiredLocales` or `editor` instead.\n */\n configuration,\n defaultLocale,\n editor,\n getConfiguration,\n locales,\n requiredLocales,\n};\n\n// --- Registries to be augmented by the generator ---\nexport interface __DictionaryRegistry {} // id -> interfaceof ictionary\nexport interface __DeclaredLocalesRegistry {} // 'fr': 1, 'en': 1, ...\nexport interface __RequiredLocalesRegistry {} // 'en': 1, ...\nexport interface __SchemaRegistry {} // id -> interface of schema\nexport interface __StrictModeRegistry {} // one of: { strict: true } | { inclusive: true } | { loose: true }\nexport interface __EditorRegistry {} // one of: { enabled: true } | { enabled: false }\nexport interface __RoutingRegistry {} // { mode: 'prefix-no-default'; defaultLocale: 'en' }\n"],"mappings":";;;;;;;;;;;;;;;AAiEA,MAAM,UAAU,qBAAqB;;;;AAKrC,MAAM,kBAAkB,qBAAqB;;;;AAK7C,MAAM,gBAAgB,qBAAqB;;;;;;;AAQ3C,MAAM,gBAGF;CACF;CACA;CACA;CACA;CACA;AACF;;;;AAKA,MAAM,yBAAyB"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noEmptyInterface: Intlayer module augmentation registries */\n\nimport type {\n CustomIntlayerConfig,\n IntlayerConfig,\n} from '@intlayer/types/config';\nimport type { Dictionary as DictionaryCore } from '@intlayer/types/dictionary';\nimport type { SchemaKeys } from '@intlayer/types/module_augmentation';\n\n/**\n * The dictionary type used to define the structure of a dictionary.\n * It is used to provide type safety and autocompletion when defining a dictionary.\n *\n * @example\n * ```ts\n * import { Dictionary } from 'intlayer';\n *\n * const dictionary: Dictionary = { ... };\n * ```\n */\ntype Dictionary<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = DictionaryCore<T, SchemaKey, true>;\n\n/**\n * The content of a dictionary.\n *\n * @deprecated Use `Dictionary<T>` instead.\n */\ntype DeclarationContent<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = Dictionary<T, SchemaKey>;\n\nexport { ALL_LOCALES, type Locale } from '@intlayer/types/allLocales';\nexport type { ContentNode } from '@intlayer/types/dictionary';\nexport * as Locales from '@intlayer/types/locales';\nexport type {\n DeclaredLocales,\n LocalesValues,\n RequiredLocales,\n StrictModeLocaleMap,\n} from '@intlayer/types/module_augmentation';\n\nexport type {\n CustomIntlayerConfig as IntlayerConfig,\n DeclarationContent,\n Dictionary,\n};\n\nimport {\n content,\n /**\n * The editor configuration defined in the configuration.\n */\n editor,\n internationalization,\n log,\n routing,\n} from '@intlayer/config/built';\n\n/**\n * The locales defined in the configuration.\n */\nconst locales = internationalization.locales;\n\n/**\n * The required locales defined in the configuration.\n */\nconst requiredLocales = internationalization.requiredLocales;\n\n/**\n * The default locale defined in the configuration.\n */\nconst defaultLocale = internationalization.defaultLocale;\n\n/**\n * @deprecated Use `defaultLocale`, `locales`, `requiredLocales` or `editor` instead.\n *\n * Configuration of Intlayer.\n *\n */\nconst configuration: Pick<\n IntlayerConfig,\n 'editor' | 'internationalization' | 'log' | 'routing'\n> = {\n editor,\n internationalization,\n log,\n content,\n routing,\n};\n\n/**\n * Returns the configuration of Intlayer.\n */\nconst getConfiguration = () => configuration;\n\nexport { file } from '@intlayer/core/file'; // Include specific export for browser because of node js function that can't be used in browser\nexport {\n compact,\n currency,\n date,\n Intl,\n number,\n percentage,\n relativeTime,\n units,\n} from '@intlayer/core/formatters';\nexport {\n getDictionary,\n getDictionaryAsync,\n getEnumeration,\n /**\n * @deprecated Use `getEnumeration` instead.\n */\n getEnumeration as getEnumerationContent,\n getIntlayer,\n getIntlayerAsync,\n getNesting,\n getTranslation,\n /**\n * @deprecated Use `getTranslation` instead.\n */\n getTranslation as getTranslationContent,\n} from '@intlayer/core/interpreter';\nexport type {\n GenerateSitemapOptions,\n SitemapUrlEntry,\n} from '@intlayer/core/localization';\nexport {\n comparePaths,\n generateSitemap,\n generateSitemapUrl,\n getBrowserLocale,\n getCanonicalPath,\n getHTMLTextDir,\n getLocale,\n getLocaleFromPath,\n getLocaleLang,\n getLocaleName,\n getLocalizedPath,\n getLocalizedUrl,\n getMultilingualUrls,\n getPathWithoutLocale,\n getPrefix,\n getRewriteRules,\n isDeclaredLocale,\n localeDetector,\n localeFlatMap,\n localeMap,\n localeRecord,\n localeResolver,\n normalizePath,\n validatePrefix,\n} from '@intlayer/core/localization';\nexport { getMarkdownMetadata } from '@intlayer/core/markdown';\nexport {\n cond,\n enu,\n gender,\n html,\n insert,\n md,\n nest,\n plural,\n select,\n t,\n} from '@intlayer/core/transpiler';\nexport {\n getCookie,\n /**\n * @deprecated Use `getLocaleFromStorageClient` or `getLocaleFromStorageServer` instead.\n */\n getLocaleFromStorage,\n getLocaleFromStorageClient,\n getLocaleFromStorageServer,\n LocaleStorageClient,\n LocaleStorageServer,\n /**\n * @deprecated Use `setLocaleInStorageClient` or `setLocaleInStorageServer` instead.\n */\n setLocaleInStorage,\n setLocaleInStorageClient,\n setLocaleInStorageServer,\n} from '@intlayer/core/utils';\n\n// Reexport here for CJS compatibility\n// Fix ReferenceError: Cannot access 'xxx' before initialization\nexport {\n /**\n * @deprecated Use `defaultLocale`, `locales`, `requiredLocales` or `editor` instead.\n */\n configuration,\n defaultLocale,\n editor,\n getConfiguration,\n locales,\n requiredLocales,\n};\n\n// --- Registries to be augmented by the generator ---\nexport interface __DictionaryRegistry {} // id -> interfaceof ictionary\nexport interface __DeclaredLocalesRegistry {} // 'fr': 1, 'en': 1, ...\nexport interface __RequiredLocalesRegistry {} // 'en': 1, ...\nexport interface __SchemaRegistry {} // id -> interface of schema\nexport interface __StrictModeRegistry {} // one of: { strict: true } | { inclusive: true } | { loose: true }\nexport interface __EditorRegistry {} // one of: { enabled: true } | { enabled: false }\nexport interface __RoutingRegistry {} // { mode: 'prefix-no-default'; defaultLocale: 'en' }\n"],"mappings":";;;;;;;;;;;;;;;AAiEA,MAAM,UAAU,qBAAqB;;;;AAKrC,MAAM,kBAAkB,qBAAqB;;;;AAK7C,MAAM,gBAAgB,qBAAqB;;;;;;;AAQ3C,MAAM,gBAGF;CACF;CACA;CACA;CACA;CACA;AACF;;;;AAKA,MAAM,yBAAyB"}
@@ -6,7 +6,7 @@ import * as Locales from "@intlayer/types/locales";
6
6
  import { editor } from "@intlayer/config/built";
7
7
  import { file } from "@intlayer/core/file";
8
8
  import { Intl, compact, currency, date, number, percentage, relativeTime, units } from "@intlayer/core/formatters";
9
- import { getDictionary, getEnumeration, getEnumeration as getEnumerationContent, getIntlayer, getNesting, getTranslation, getTranslation as getTranslationContent } from "@intlayer/core/interpreter";
9
+ import { getDictionary, getDictionaryAsync, getEnumeration, getEnumeration as getEnumerationContent, getIntlayer, getIntlayerAsync, getNesting, getTranslation, getTranslation as getTranslationContent } from "@intlayer/core/interpreter";
10
10
  import { GenerateSitemapOptions, SitemapUrlEntry, comparePaths, generateSitemap, generateSitemapUrl, getBrowserLocale, getCanonicalPath, getHTMLTextDir, getLocale, getLocaleFromPath, getLocaleLang, getLocaleName, getLocalizedPath, getLocalizedUrl, getMultilingualUrls, getPathWithoutLocale, getPrefix, getRewriteRules, isDeclaredLocale, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, normalizePath, validatePrefix } from "@intlayer/core/localization";
11
11
  import { getMarkdownMetadata } from "@intlayer/core/markdown";
12
12
  import { cond, enu, gender, html, insert, md, nest, plural, select, t } from "@intlayer/core/transpiler";
@@ -61,5 +61,5 @@ interface __StrictModeRegistry {}
61
61
  interface __EditorRegistry {}
62
62
  interface __RoutingRegistry {}
63
63
  //#endregion
64
- export { ALL_LOCALES, type ContentNode, type DeclarationContent, type DeclaredLocales, type Dictionary, type GenerateSitemapOptions, Intl, type CustomIntlayerConfig as IntlayerConfig, type Locale, LocaleStorageClient, LocaleStorageServer, Locales, type LocalesValues, type RequiredLocales, type SitemapUrlEntry, type StrictModeLocaleMap, __DeclaredLocalesRegistry, __DictionaryRegistry, __EditorRegistry, __RequiredLocalesRegistry, __RoutingRegistry, __SchemaRegistry, __StrictModeRegistry, compact, comparePaths, cond, configuration, currency, date, defaultLocale, editor, enu, file, gender, generateSitemap, generateSitemapUrl, getBrowserLocale, getCanonicalPath, getConfiguration, getCookie, getDictionary, getEnumeration, getEnumerationContent, getHTMLTextDir, getIntlayer, getLocale, getLocaleFromPath, getLocaleFromStorage, getLocaleFromStorageClient, getLocaleFromStorageServer, getLocaleLang, getLocaleName, getLocalizedPath, getLocalizedUrl, getMarkdownMetadata, getMultilingualUrls, getNesting, getPathWithoutLocale, getPrefix, getRewriteRules, getTranslation, getTranslationContent, html, insert, isDeclaredLocale, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, locales, md, nest, normalizePath, number, percentage, plural, relativeTime, requiredLocales, select, setLocaleInStorage, setLocaleInStorageClient, setLocaleInStorageServer, t, units, validatePrefix };
64
+ export { ALL_LOCALES, type ContentNode, type DeclarationContent, type DeclaredLocales, type Dictionary, type GenerateSitemapOptions, Intl, type CustomIntlayerConfig as IntlayerConfig, type Locale, LocaleStorageClient, LocaleStorageServer, Locales, type LocalesValues, type RequiredLocales, type SitemapUrlEntry, type StrictModeLocaleMap, __DeclaredLocalesRegistry, __DictionaryRegistry, __EditorRegistry, __RequiredLocalesRegistry, __RoutingRegistry, __SchemaRegistry, __StrictModeRegistry, compact, comparePaths, cond, configuration, currency, date, defaultLocale, editor, enu, file, gender, generateSitemap, generateSitemapUrl, getBrowserLocale, getCanonicalPath, getConfiguration, getCookie, getDictionary, getDictionaryAsync, getEnumeration, getEnumerationContent, getHTMLTextDir, getIntlayer, getIntlayerAsync, getLocale, getLocaleFromPath, getLocaleFromStorage, getLocaleFromStorageClient, getLocaleFromStorageServer, getLocaleLang, getLocaleName, getLocalizedPath, getLocalizedUrl, getMarkdownMetadata, getMultilingualUrls, getNesting, getPathWithoutLocale, getPrefix, getRewriteRules, getTranslation, getTranslationContent, html, insert, isDeclaredLocale, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, locales, md, nest, normalizePath, number, percentage, plural, relativeTime, requiredLocales, select, setLocaleInStorage, setLocaleInStorageClient, setLocaleInStorageServer, t, units, validatePrefix };
65
65
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;KAoBK,WACH,eACA,kBAAkB,sCAChB,aAAe,GAAG;;;;;;KAOjB,mBACH,eACA,kBAAkB,sCAChB,WAAW,GAAG;;;;cAgCZ;;;;cAKA;;;;cAKA;;;;;;;cAQA,eAAe,KACnB;;;;cAaI,wBAAgB,KAAA;UAwGL;UACA;UACA;UACA;UACA;UACA;UACA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;KAoBK,WACH,eACA,kBAAkB,sCAChB,aAAe,GAAG;;;;;;KAOjB,mBACH,eACA,kBAAkB,sCAChB,WAAW,GAAG;;;;cAgCZ;;;;cAKA;;;;cAKA;;;;;;;cAQA,eAAe,KACnB;;;;cAaI,wBAAgB,KAAA;UA0GL;UACA;UACA;UACA;UACA;UACA;UACA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intlayer",
3
- "version": "9.3.3",
3
+ "version": "9.4.0",
4
4
  "private": false,
5
5
  "description": "Manage internationalization i18n in a simple way, through TypeScript, declaration file, declare your multilingual content every where in your code.",
6
6
  "keywords": [
@@ -95,13 +95,13 @@
95
95
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
96
96
  },
97
97
  "dependencies": {
98
- "@intlayer/cli": "9.3.2",
99
- "@intlayer/config": "9.3.3",
100
- "@intlayer/core": "9.3.3",
101
- "@intlayer/types": "9.3.3"
98
+ "@intlayer/cli": "9.4.0",
99
+ "@intlayer/config": "9.4.0",
100
+ "@intlayer/core": "9.4.0",
101
+ "@intlayer/types": "9.4.0"
102
102
  },
103
103
  "devDependencies": {
104
- "@types/node": "26.2.0",
104
+ "@types/node": "26.3.0",
105
105
  "@utils/ts-config": "1.0.4",
106
106
  "@utils/ts-config-types": "1.0.4",
107
107
  "@utils/tsdown-config": "1.0.4",