react-intlayer 9.5.2 → 9.5.4-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.
Files changed (73) hide show
  1. package/README.md +9 -9
  2. package/dist/cjs/analytics/useAnalytics.cjs +2 -2
  3. package/dist/cjs/analytics/useConversion.cjs +1 -1
  4. package/dist/cjs/analytics/useExperiment.cjs +1 -1
  5. package/dist/cjs/client/IntlayerProvider.cjs +2 -2
  6. package/dist/cjs/client/format/index.cjs +3 -3
  7. package/dist/cjs/client/index.cjs +1 -1
  8. package/dist/cjs/client/t.cjs +1 -1
  9. package/dist/cjs/client/useDictionary.cjs +1 -1
  10. package/dist/cjs/client/useDictionaryAsync.cjs +1 -1
  11. package/dist/cjs/client/useDictionaryDynamic.cjs +2 -2
  12. package/dist/cjs/client/useI18n.cjs +1 -1
  13. package/dist/cjs/client/useIntlayer.cjs +1 -1
  14. package/dist/cjs/client/useLocale.cjs +1 -1
  15. package/dist/cjs/client/useLocaleBase.cjs +1 -1
  16. package/dist/cjs/client/useRewriteURL.cjs +1 -1
  17. package/dist/cjs/client/useTraduction.cjs +1 -1
  18. package/dist/cjs/html/HTMLRenderer.cjs +1 -1
  19. package/dist/cjs/index.cjs +3 -3
  20. package/dist/cjs/markdown/runtime.cjs +2 -6
  21. package/dist/cjs/markdown/runtime.cjs.map +1 -1
  22. package/dist/cjs/plugins.cjs +2 -2
  23. package/dist/cjs/server/format/index.cjs +3 -3
  24. package/dist/cjs/server/index.cjs +4 -4
  25. package/dist/esm/analytics/useAnalytics.mjs +2 -2
  26. package/dist/esm/analytics/useConversion.mjs +1 -1
  27. package/dist/esm/analytics/useExperiment.mjs +1 -1
  28. package/dist/esm/client/IntlayerProvider.mjs +2 -2
  29. package/dist/esm/client/format/index.mjs +3 -3
  30. package/dist/esm/client/index.mjs +1 -1
  31. package/dist/esm/client/t.mjs +1 -1
  32. package/dist/esm/client/useDictionary.mjs +1 -1
  33. package/dist/esm/client/useDictionaryAsync.mjs +1 -1
  34. package/dist/esm/client/useDictionaryDynamic.mjs +2 -2
  35. package/dist/esm/client/useI18n.mjs +1 -1
  36. package/dist/esm/client/useIntlayer.mjs +1 -1
  37. package/dist/esm/client/useLocale.mjs +1 -1
  38. package/dist/esm/client/useLocaleBase.mjs +1 -1
  39. package/dist/esm/client/useRewriteURL.mjs +1 -1
  40. package/dist/esm/client/useTraduction.mjs +1 -1
  41. package/dist/esm/html/HTMLRenderer.mjs +1 -1
  42. package/dist/esm/index.mjs +3 -3
  43. package/dist/esm/markdown/runtime.mjs +2 -6
  44. package/dist/esm/markdown/runtime.mjs.map +1 -1
  45. package/dist/esm/plugins.mjs +2 -2
  46. package/dist/esm/server/format/index.mjs +3 -3
  47. package/dist/esm/server/index.mjs +4 -4
  48. package/dist/types/client/format/useCompact.d.ts +1 -2
  49. package/dist/types/client/format/useCompact.d.ts.map +1 -1
  50. package/dist/types/client/format/useCurrency.d.ts +1 -2
  51. package/dist/types/client/format/useCurrency.d.ts.map +1 -1
  52. package/dist/types/client/format/useList.d.ts +1 -2
  53. package/dist/types/client/format/useList.d.ts.map +1 -1
  54. package/dist/types/client/format/useNumber.d.ts +1 -2
  55. package/dist/types/client/format/useNumber.d.ts.map +1 -1
  56. package/dist/types/client/format/usePercentage.d.ts +1 -2
  57. package/dist/types/client/format/usePercentage.d.ts.map +1 -1
  58. package/dist/types/client/format/useRelativeTime.d.ts +1 -2
  59. package/dist/types/client/format/useRelativeTime.d.ts.map +1 -1
  60. package/dist/types/client/format/useUnit.d.ts +1 -2
  61. package/dist/types/client/format/useUnit.d.ts.map +1 -1
  62. package/dist/types/client/useI18n.d.ts +1 -1
  63. package/dist/types/client/useLocaleBase.d.ts +4 -5
  64. package/dist/types/client/useLocaleBase.d.ts.map +1 -1
  65. package/dist/types/client/useLocaleStorage.d.ts +3 -4
  66. package/dist/types/client/useLocaleStorage.d.ts.map +1 -1
  67. package/dist/types/markdown/runtime.d.ts.map +1 -1
  68. package/dist/types/server/useI18n.d.ts +1 -1
  69. package/package.json +10 -9
  70. package/dist/cjs/editor/index.cjs +0 -8
  71. package/dist/esm/editor/index.mjs +0 -5
  72. package/dist/types/editor/index.d.ts +0 -4
  73. package/dist/types/intlayer/dist/types/index.d.ts +0 -14
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <p align="center">
2
2
  <a href="https://intlayer.org" rel="">
3
- <img src="https://raw.githubusercontent.com/aymericzip/intlayer/main/docs/assets/cover.png" width="60%" alt="Intlayer Logo" />
3
+ <img src="https://raw.githubusercontent.com/aymericzip/intlayer/main/docs/assets/cover.webp" width="60%" alt="Intlayer Logo" />
4
4
  </a>
5
5
  </p>
6
6
 
@@ -49,10 +49,10 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
49
49
 
50
50
  | Feature | Description |
51
51
  | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/frameworks.png?raw=true" alt="Feature" width="700"> | **Cross-Frameworks Support**<br><br>Intlayer is compatible with all major frameworks and libraries, including Next.js, React, Vite, Vue.js, Nuxt, Preact, Express, and more. |
52
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/frameworks.webp?raw=true" alt="Feature" width="700"> | **Cross-Frameworks Support**<br><br>Intlayer is compatible with all major frameworks and libraries, including Next.js, React, Vite, Vue.js, Nuxt, Preact, Express, and more. |
53
53
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/javascript_content_management.jpg?raw=true" alt="Feature" width="700"> | **JavaScript-Powered Content Management**<br><br>Harness the flexibility of JavaScript to define and manage your content efficiently. <br><br> - [Content declaration](https://intlayer.org/doc/concept/content) |
54
54
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/per_locale_content_declaration_file.png?raw=true" alt="Feature" width="700"> | **Per-Locale Content Declaration File**<br><br>Speed up your development by declaring your content once, before auto generation.<br><br> - [Per-Locale Content Declaration File](https://intlayer.org/doc/concept/per-locale-file) |
55
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/compiler.jpg?raw=true" alt="Feature" width="700"> | **Compiler**<br><br>The Intlayer Compiler extract automatically the content from the components and generate the dictionary files.<br><br> - [Compiler](https://intlayer.org/doc/compiler) |
55
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/compiler.webp?raw=true" alt="Feature" width="700"> | **Compiler**<br><br>The Intlayer Compiler extract automatically the content from the components and generate the dictionary files.<br><br> - [Compiler](https://intlayer.org/doc/compiler) |
56
56
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png?raw=true" alt="Feature" width="700"> | **Type-Safe Environment**<br><br>Leverage TypeScript to ensure your content definitions and code are error-free, while also benefiting from IDE autocompletion.<br><br> - [TypeScript configuration](https://intlayer.org/doc/environment/vite-and-react#configure-typescript) |
57
57
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/config_file.png?raw=true" alt="Feature" width="700"> | **Simplified Setup**<br><br>Get up and running quickly with minimal configuration. Adjust settings for internationalization, routing, AI, build, and content handling with ease. <br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
58
58
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/content_retrieval.png?raw=true" alt="Feature" width="700"> | **Simplified Content Retrieval**<br><br>No need to call your `t` function for each piece of content. Retrieve all your content directly using a single hook.<br><br> - [React integration](https://intlayer.org/doc/environment/create-react-app) |
@@ -60,12 +60,12 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
60
60
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/file_tree.png?raw=true" alt="Feature" width="700"> | **Organized Codebase**<br><br>Keep your codebase more organized: 1 component = 1 dictionary in the same folder. Translations close to their respective components, enhance maintainability and clarity. <br><br> - [How Intlayer works](https://intlayer.org/doc/concept/how-works-intlayer) |
61
61
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/url_routing.png?raw=true" alt="Feature" width="700"> | **Enhanced Routing**<br><br>Full support of app routing, adapting seamlessly to complex application structures, for Next.js, React, Vite, Vue.js, etc.<br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
62
62
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/markdown.png?raw=true" alt="Feature" width="700"> | **Markdown Support**<br><br>Import and interpret, locale files and remote Markdown for multilingual content like privacy policies, documentation, etc. Interpret and make Markdown metadata accessible in your code.<br><br> - [Content files](https://intlayer.org/doc/concept/content/file) |
63
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/visual_editor.png?raw=true" alt="Feature" width="700"> | **Free Visual Editor & CMS**<br><br>A free visual editor and CMS are available for content writers, removing the need for a localization platform. Keep your content synchronized using Git, or externalize it totally or partially with the CMS.<br><br> - [Intlayer Editor](https://intlayer.org/doc/concept/editor) <br> - [Intlayer CMS](https://intlayer.org/doc/concept/cms) |
64
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/bundle.png?raw=true" alt="Feature" width="700"> | **Tree-shakable Content**<br><br>Tree-shakable content, reducing the size of the final bundle. Loads content per component, excluding any unused content from your bundle. Supports lazy loading to enhance app loading efficiency. <br><br> - [App build optimization](https://intlayer.org/doc/concept/how-works-intlayer#app-build-optimization) |
65
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/static_rendering.png?raw=true" alt="Feature" width="700"> | **Static Rendering**<br><br>Doesn't block Static Rendering. <br><br> - [Next.js integration](https://intlayer.org/doc/environment/nextjs) |
63
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/visual_editor.webp?raw=true" alt="Feature" width="700"> | **Free Visual Editor & CMS**<br><br>A free visual editor and CMS are available for content writers, removing the need for a localization platform. Keep your content synchronized using Git, or externalize it totally or partially with the CMS.<br><br> - [Intlayer Editor](https://intlayer.org/doc/concept/editor) <br> - [Intlayer CMS](https://intlayer.org/doc/concept/cms) |
64
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/bundle.webp?raw=true" alt="Feature" width="700"> | **Tree-shakable Content**<br><br>Tree-shakable content, reducing the size of the final bundle. Loads content per component, excluding any unused content from your bundle. Supports lazy loading to enhance app loading efficiency. <br><br> - [App build optimization](https://intlayer.org/doc/concept/how-works-intlayer#app-build-optimization) |
65
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/static_rendering.webp?raw=true" alt="Feature" width="700"> | **Static Rendering**<br><br>Doesn't block Static Rendering. <br><br> - [Next.js integration](https://intlayer.org/doc/environment/nextjs) |
66
66
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/AI_translation.png?raw=true" alt="Feature" width="700"> | **AI-Powered Translation**<br><br>Transform your website into 231 languages with just one click using Intlayer's advanced AI-powered translation tools using your own AI provider / API key. <br><br> - [CI/CD integration](https://intlayer.org/doc/concept/ci-cd) <br> - [Intlayer CLI](https://intlayer.org/doc/concept/cli) <br> - [Auto fill](https://intlayer.org/doc/concept/auto-fill) |
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
- | <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) |
68
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.webp?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) <br> - [Intlayer compat adapters](https://intlayer.org/doc/compatibility) |
70
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) |
71
71
 
@@ -262,7 +262,7 @@ Intlayer connects **developers**, **copywriters**, and **AI agents** in one work
262
262
  - Feature flags
263
263
  - Headless CMSs (e.g. Contentful, Strapi, Sanity)
264
264
 
265
- ![CMS Preview](https://github.com/aymericzip/intlayer/blob/main/docs/assets/CMS.png?raw=true)
265
+ ![CMS Preview](https://github.com/aymericzip/intlayer/blob/main/docs/assets/CMS.webp?raw=true)
266
266
 
267
267
  ## 🌐 Readme in other languages
268
268
 
@@ -328,4 +328,4 @@ Contribute on [GitHub](https://github.com/aymericzip/intlayer), [GitLab](https:/
328
328
 
329
329
  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-).
330
330
 
331
- [![Star History Chart](https://api.star-history.com/svg?repos=aymericzip/intlayer&type=Date)](https://api.star-history.com/#aymericzip/intlayer&Date)
331
+ [![Star History Chart](https://api.star-history.com/svg?repos=aymericzip/intlayer&type=Date)](https://star-history.com/#aymericzip/intlayer&Date)
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
- const require_analytics_exposureSink = require('./exposureSink.cjs');
5
4
  const require_client_IntlayerProvider = require('../client/IntlayerProvider.cjs');
6
- let react = require("react");
5
+ const require_analytics_exposureSink = require('./exposureSink.cjs');
7
6
  let _intlayer_analytics_isEnabled = require("@intlayer/analytics/isEnabled");
7
+ let react = require("react");
8
8
 
9
9
  //#region src/analytics/useAnalytics.tsx
10
10
  /**
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
- let react = require("react");
5
4
  let _intlayer_analytics_isEnabled = require("@intlayer/analytics/isEnabled");
5
+ let react = require("react");
6
6
 
7
7
  //#region src/analytics/useConversion.tsx
8
8
  /**
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
- let react = require("react");
5
4
  let _intlayer_analytics_isEnabled = require("@intlayer/analytics/isEnabled");
5
+ let react = require("react");
6
6
 
7
7
  //#region src/analytics/useExperiment.tsx
8
8
  /**
@@ -4,11 +4,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_editor_EditorProvider = require('../editor/EditorProvider.cjs');
5
5
  const require_client_useLocaleStorage = require('./useLocaleStorage.cjs');
6
6
  const require_analytics_AnalyticsProvider = require('../analytics/AnalyticsProvider.cjs');
7
- let _intlayer_config_built = require("@intlayer/config/built");
8
7
  let react = require("react");
9
- let react_jsx_runtime = require("react/jsx-runtime");
8
+ let _intlayer_config_built = require("@intlayer/config/built");
10
9
  let _intlayer_config_client = require("@intlayer/config/client");
11
10
  let _intlayer_core_localization = require("@intlayer/core/localization");
11
+ let react_jsx_runtime = require("react/jsx-runtime");
12
12
 
13
13
  //#region src/client/IntlayerProvider.tsx
14
14
  /**
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_client_format_useIntl = require('./useIntl.cjs');
3
+ const require_client_format_useCurrency = require('./useCurrency.cjs');
3
4
  const require_client_format_useUnit = require('./useUnit.cjs');
4
5
  const require_client_format_useDate = require('./useDate.cjs');
5
- const require_client_format_useNumber = require('./useNumber.cjs');
6
- const require_client_format_useRelativeTime = require('./useRelativeTime.cjs');
7
6
  const require_client_format_useCompact = require('./useCompact.cjs');
8
7
  const require_client_format_useList = require('./useList.cjs');
8
+ const require_client_format_useNumber = require('./useNumber.cjs');
9
9
  const require_client_format_usePercentage = require('./usePercentage.cjs');
10
- const require_client_format_useCurrency = require('./useCurrency.cjs');
10
+ const require_client_format_useRelativeTime = require('./useRelativeTime.cjs');
11
11
 
12
12
  exports.useCompact = require_client_format_useCompact.useCompact;
13
13
  exports.useCurrency = require_client_format_useCurrency.useCurrency;
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_client_useLoadDynamic = require('./useLoadDynamic.cjs');
3
2
  const require_client_useLocaleStorage = require('./useLocaleStorage.cjs');
4
3
  const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
5
4
  const require_client_t = require('./t.cjs');
5
+ const require_client_useLoadDynamic = require('./useLoadDynamic.cjs');
6
6
  const require_client_useDictionary = require('./useDictionary.cjs');
7
7
  const require_client_useDictionaryAsync = require('./useDictionaryAsync.cjs');
8
8
  const require_client_useDictionaryDynamic = require('./useDictionaryDynamic.cjs');
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
5
- let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
6
5
  let react = require("react");
6
+ let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
7
7
 
8
8
  //#region src/client/t.ts
9
9
  /**
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
- const require_getDictionary = require('../getDictionary.cjs');
5
4
  const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
5
+ const require_getDictionary = require('../getDictionary.cjs');
6
6
  let react = require("react");
7
7
  let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
8
8
 
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
5
5
  const require_client_useDictionary = require('./useDictionary.cjs');
6
- let _intlayer_config_built = require("@intlayer/config/built");
7
6
  let react = require("react");
7
+ let _intlayer_config_built = require("@intlayer/config/built");
8
8
 
9
9
  //#region src/client/useDictionaryAsync.ts
10
10
  /**
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+ const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
4
5
  const require_client_useLoadDynamic = require('./useLoadDynamic.cjs');
5
6
  const require_getDictionary = require('../getDictionary.cjs');
6
- const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
7
- let _intlayer_config_built = require("@intlayer/config/built");
8
7
  let react = require("react");
8
+ let _intlayer_config_built = require("@intlayer/config/built");
9
9
  let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
10
10
 
11
11
  //#region src/client/useDictionaryDynamic.ts
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
5
- let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
6
5
  let react = require("react");
6
+ let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
7
7
 
8
8
  //#region src/client/useI18n.ts
9
9
  /**
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
- const require_getIntlayer = require('../getIntlayer.cjs');
5
4
  const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
5
+ const require_getIntlayer = require('../getIntlayer.cjs');
6
6
  let react = require("react");
7
7
  let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
8
8
 
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_client_useLocaleStorage = require('./useLocaleStorage.cjs');
5
5
  const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
6
- let _intlayer_config_built = require("@intlayer/config/built");
7
6
  let react = require("react");
7
+ let _intlayer_config_built = require("@intlayer/config/built");
8
8
 
9
9
  //#region src/client/useLocale.ts
10
10
  const { defaultLocale, locales: availableLocales } = _intlayer_config_built.internationalization ?? {};
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
5
- let _intlayer_config_built = require("@intlayer/config/built");
6
5
  let react = require("react");
6
+ let _intlayer_config_built = require("@intlayer/config/built");
7
7
 
8
8
  //#region src/client/useLocaleBase.ts
9
9
  const { defaultLocale, locales: availableLocales } = _intlayer_config_built.internationalization;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_client_useLocale = require('./useLocale.cjs');
5
- let _intlayer_config_built = require("@intlayer/config/built");
6
5
  let react = require("react");
6
+ let _intlayer_config_built = require("@intlayer/config/built");
7
7
  let _intlayer_core_localization = require("@intlayer/core/localization");
8
8
 
9
9
  //#region src/client/useRewriteURL.ts
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
3
- let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
4
3
  let react = require("react");
4
+ let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
5
5
 
6
6
  //#region src/client/useTraduction.ts
7
7
  /**
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_html_HTMLProvider = require('./HTMLProvider.cjs');
5
- let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
6
5
  let react = require("react");
7
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
+ let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
8
8
  let _intlayer_core_transpiler = require("@intlayer/core/transpiler");
9
9
 
10
10
  //#region src/html/HTMLRenderer.tsx
@@ -1,7 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_client_useLoadDynamic = require('./client/useLoadDynamic.cjs');
3
- const require_getIntlayer = require('./getIntlayer.cjs');
4
- const require_getDictionary = require('./getDictionary.cjs');
5
2
  const require_client_useLocaleStorage = require('./client/useLocaleStorage.cjs');
6
3
  const require_client_IntlayerProvider = require('./client/IntlayerProvider.cjs');
7
4
  const require_analytics_useAnalytics = require('./analytics/useAnalytics.cjs');
@@ -10,10 +7,13 @@ const require_analytics_useConversion = require('./analytics/useConversion.cjs')
10
7
  const require_analytics_useExperiment = require('./analytics/useExperiment.cjs');
11
8
  const require_client_format_useIntl = require('./client/format/useIntl.cjs');
12
9
  const require_client_t = require('./client/t.cjs');
10
+ const require_client_useLoadDynamic = require('./client/useLoadDynamic.cjs');
11
+ const require_getDictionary = require('./getDictionary.cjs');
13
12
  const require_client_useDictionary = require('./client/useDictionary.cjs');
14
13
  const require_client_useDictionaryAsync = require('./client/useDictionaryAsync.cjs');
15
14
  const require_client_useDictionaryDynamic = require('./client/useDictionaryDynamic.cjs');
16
15
  const require_client_useI18n = require('./client/useI18n.cjs');
16
+ const require_getIntlayer = require('./getIntlayer.cjs');
17
17
  const require_client_useIntlayer = require('./client/useIntlayer.cjs');
18
18
  const require_client_useLocale = require('./client/useLocale.cjs');
19
19
  const require_client_useLocaleBase = require('./client/useLocaleBase.cjs');
@@ -23,12 +23,8 @@ const reactRuntime = {
23
23
  * Handles the conversion of props and children to React format.
24
24
  */
25
25
  createElement: (type, props, ...children) => {
26
- let key = null;
27
- const finalProps = props || {};
28
- if (props && props.key != null) {
29
- key = String(props.key);
30
- finalProps.key = void 0;
31
- }
26
+ const { key: rawKey, ...finalProps } = props ?? {};
27
+ const key = rawKey != null ? String(rawKey) : null;
32
28
  const childCount = children.length;
33
29
  if (childCount === 1) finalProps.children = children[0];
34
30
  else if (childCount > 1) finalProps.children = children;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.cjs","names":["createElement","cloneElement"],"sources":["../../../src/markdown/runtime.ts"],"sourcesContent":["import type { HTMLTag, MarkdownRuntime } from '@intlayer/core/markdown';\nimport {\n cloneElement,\n createElement,\n Fragment,\n type ReactElement,\n type ReactNode,\n} from 'react';\n\n/**\n * React-specific runtime for the markdown processor.\n * Implements the MarkdownRuntime interface using React's primitives.\n */\nlet REACT_ELEMENT_TYPE: symbol;\ntry {\n const sample = createElement('div');\n REACT_ELEMENT_TYPE =\n sample &&\n typeof sample === 'object' &&\n '$$typeof' in sample &&\n typeof sample.$$typeof === 'symbol'\n ? (sample.$$typeof as symbol)\n : Symbol.for('react.transitional.element');\n} catch {\n REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element');\n}\n\n/**\n * React-specific runtime for the markdown processor.\n * Implements the MarkdownRuntime interface using React's primitives.\n */\nexport const reactRuntime: MarkdownRuntime = {\n /**\n * Creates a React element.\n * Handles the conversion of props and children to React format.\n */\n createElement: (\n type: string | any,\n props: Record<string, any> | null,\n ...children: any[]\n ): ReactNode => {\n let key: string | null = null;\n const finalProps: any = props || {};\n\n if (props && props.key != null) {\n key = String(props.key);\n finalProps.key = undefined;\n }\n\n const childCount = children.length;\n if (childCount === 1) {\n finalProps.children = children[0];\n } else if (childCount > 1) {\n finalProps.children = children;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type,\n key,\n ref: null,\n props: finalProps,\n _owner: null,\n _store: {},\n _debugStack: null,\n _debugTask: null,\n } as unknown as ReactNode;\n },\n\n /**\n * Clones a React element with new props.\n */\n cloneElement: (\n element: unknown,\n props: Record<string, any>,\n ...children: any[]\n ): ReactNode => {\n if (children.length === 0) {\n return cloneElement(element as ReactElement, props);\n }\n return cloneElement(element as ReactElement, props, ...children);\n },\n\n /**\n * React Fragment component.\n */\n Fragment,\n\n /**\n * React-specific prop normalization.\n * React uses className instead of class, htmlFor instead of for, etc.\n * The core processor already handles ATTRIBUTE_TO_NODE_PROP_MAP,\n * so this is mostly a no-op but can be used for additional React-specific transforms.\n */\n normalizeProps: (\n _tag: HTMLTag,\n props: Record<string, any>\n ): Record<string, any> => {\n // The core already handles class -> className and for -> htmlFor\n // via ATTRIBUTE_TO_NODE_PROP_MAP in the attrStringToMap function.\n // This hook is available for any additional React-specific transforms.\n return props;\n },\n};\n\n/**\n * Creates a React runtime with custom createElement for advanced use cases.\n * Useful for wrapping elements or adding middleware.\n */\nexport const createReactRuntime = (\n options: {\n onCreateElement?: (\n type: string | any,\n props: Record<string, any> | null,\n children: any[]\n ) => ReactNode;\n } = {}\n): MarkdownRuntime => {\n const { onCreateElement } = options;\n\n if (onCreateElement) {\n return {\n ...reactRuntime,\n createElement: (\n type: string | any,\n props: Record<string, any> | null,\n ...children: any[]\n ): ReactNode => {\n return onCreateElement(type, props, children);\n },\n };\n }\n\n return reactRuntime;\n};\n"],"mappings":";;;;;;;;AAaA,IAAI;AACJ,IAAI;CACF,MAAM,aAASA,qBAAc,KAAK;CAClC,qBACE,UACA,OAAO,WAAW,YAClB,cAAc,UACd,OAAO,OAAO,aAAa,WACtB,OAAO,WACR,OAAO,IAAI,4BAA4B;AAC/C,QAAQ;CACN,qBAAqB,OAAO,IAAI,4BAA4B;AAC9D;;;;;AAMA,MAAa,eAAgC;;;;;CAK3C,gBACE,MACA,OACA,GAAG,aACW;EACd,IAAI,MAAqB;EACzB,MAAM,aAAkB,SAAS,CAAC;EAElC,IAAI,SAAS,MAAM,OAAO,MAAM;GAC9B,MAAM,OAAO,MAAM,GAAG;GACtB,WAAW,MAAM;EACnB;EAEA,MAAM,aAAa,SAAS;EAC5B,IAAI,eAAe,GACjB,WAAW,WAAW,SAAS;OAC1B,IAAI,aAAa,GACtB,WAAW,WAAW;EAGxB,OAAO;GACL,UAAU;GACV;GACA;GACA,KAAK;GACL,OAAO;GACP,QAAQ;GACR,QAAQ,CAAC;GACT,aAAa;GACb,YAAY;EACd;CACF;;;;CAKA,eACE,SACA,OACA,GAAG,aACW;EACd,IAAI,SAAS,WAAW,GACtB,WAAOC,oBAAa,SAAyB,KAAK;EAEpD,WAAOA,oBAAa,SAAyB,OAAO,GAAG,QAAQ;CACjE;;;;CAKA;;;;;;;CAQA,iBACE,MACA,UACwB;EAIxB,OAAO;CACT;AACF;;;;;AAMA,MAAa,sBACX,UAMI,CAAC,MACe;CACpB,MAAM,EAAE,oBAAoB;CAE5B,IAAI,iBACF,OAAO;EACL,GAAG;EACH,gBACE,MACA,OACA,GAAG,aACW;GACd,OAAO,gBAAgB,MAAM,OAAO,QAAQ;EAC9C;CACF;CAGF,OAAO;AACT"}
1
+ {"version":3,"file":"runtime.cjs","names":["createElement","cloneElement"],"sources":["../../../src/markdown/runtime.ts"],"sourcesContent":["import type { HTMLTag, MarkdownRuntime } from '@intlayer/core/markdown';\nimport {\n cloneElement,\n createElement,\n Fragment,\n type ReactElement,\n type ReactNode,\n} from 'react';\n\n/**\n * React-specific runtime for the markdown processor.\n * Implements the MarkdownRuntime interface using React's primitives.\n */\nlet REACT_ELEMENT_TYPE: symbol;\ntry {\n const sample = createElement('div');\n REACT_ELEMENT_TYPE =\n sample &&\n typeof sample === 'object' &&\n '$$typeof' in sample &&\n typeof sample.$$typeof === 'symbol'\n ? (sample.$$typeof as symbol)\n : Symbol.for('react.transitional.element');\n} catch {\n REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element');\n}\n\n/**\n * React-specific runtime for the markdown processor.\n * Implements the MarkdownRuntime interface using React's primitives.\n */\nexport const reactRuntime: MarkdownRuntime = {\n /**\n * Creates a React element.\n * Handles the conversion of props and children to React format.\n */\n createElement: (\n type: string | any,\n props: Record<string, any> | null,\n ...children: any[]\n ): ReactNode => {\n // `key` must not survive as an own property: React warns when a props\n // object that owns `key` is later spread into JSX by a custom renderer.\n const { key: rawKey, ...finalProps } = (props ?? {}) as Record<string, any>;\n const key: string | null = rawKey != null ? String(rawKey) : null;\n\n const childCount = children.length;\n if (childCount === 1) {\n finalProps.children = children[0];\n } else if (childCount > 1) {\n finalProps.children = children;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type,\n key,\n ref: null,\n props: finalProps,\n _owner: null,\n _store: {},\n _debugStack: null,\n _debugTask: null,\n } as unknown as ReactNode;\n },\n\n /**\n * Clones a React element with new props.\n */\n cloneElement: (\n element: unknown,\n props: Record<string, any>,\n ...children: any[]\n ): ReactNode => {\n if (children.length === 0) {\n return cloneElement(element as ReactElement, props);\n }\n return cloneElement(element as ReactElement, props, ...children);\n },\n\n /**\n * React Fragment component.\n */\n Fragment,\n\n /**\n * React-specific prop normalization.\n * React uses className instead of class, htmlFor instead of for, etc.\n * The core processor already handles ATTRIBUTE_TO_NODE_PROP_MAP,\n * so this is mostly a no-op but can be used for additional React-specific transforms.\n */\n normalizeProps: (\n _tag: HTMLTag,\n props: Record<string, any>\n ): Record<string, any> => {\n // The core already handles class -> className and for -> htmlFor\n // via ATTRIBUTE_TO_NODE_PROP_MAP in the attrStringToMap function.\n // This hook is available for any additional React-specific transforms.\n return props;\n },\n};\n\n/**\n * Creates a React runtime with custom createElement for advanced use cases.\n * Useful for wrapping elements or adding middleware.\n */\nexport const createReactRuntime = (\n options: {\n onCreateElement?: (\n type: string | any,\n props: Record<string, any> | null,\n children: any[]\n ) => ReactNode;\n } = {}\n): MarkdownRuntime => {\n const { onCreateElement } = options;\n\n if (onCreateElement) {\n return {\n ...reactRuntime,\n createElement: (\n type: string | any,\n props: Record<string, any> | null,\n ...children: any[]\n ): ReactNode => {\n return onCreateElement(type, props, children);\n },\n };\n }\n\n return reactRuntime;\n};\n"],"mappings":";;;;;;;;AAaA,IAAI;AACJ,IAAI;CACF,MAAM,aAASA,qBAAc,KAAK;CAClC,qBACE,UACA,OAAO,WAAW,YAClB,cAAc,UACd,OAAO,OAAO,aAAa,WACtB,OAAO,WACR,OAAO,IAAI,4BAA4B;AAC/C,QAAQ;CACN,qBAAqB,OAAO,IAAI,4BAA4B;AAC9D;;;;;AAMA,MAAa,eAAgC;;;;;CAK3C,gBACE,MACA,OACA,GAAG,aACW;EAGd,MAAM,EAAE,KAAK,QAAQ,GAAG,eAAgB,SAAS,CAAC;EAClD,MAAM,MAAqB,UAAU,OAAO,OAAO,MAAM,IAAI;EAE7D,MAAM,aAAa,SAAS;EAC5B,IAAI,eAAe,GACjB,WAAW,WAAW,SAAS;OAC1B,IAAI,aAAa,GACtB,WAAW,WAAW;EAGxB,OAAO;GACL,UAAU;GACV;GACA;GACA,KAAK;GACL,OAAO;GACP,QAAQ;GACR,QAAQ,CAAC;GACT,aAAa;GACb,YAAY;EACd;CACF;;;;CAKA,eACE,SACA,OACA,GAAG,aACW;EACd,IAAI,SAAS,WAAW,GACtB,WAAOC,oBAAa,SAAyB,KAAK;EAEpD,WAAOA,oBAAa,SAAyB,OAAO,GAAG,QAAQ;CACjE;;;;CAKA;;;;;;;CAQA,iBACE,MACA,UACwB;EAIxB,OAAO;CACT;AACF;;;;;AAMA,MAAa,sBACX,UAMI,CAAC,MACe;CACpB,MAAM,EAAE,oBAAoB;CAE5B,IAAI,iBACF,OAAO;EACL,GAAG;EACH,gBACE,MACA,OACA,GAAG,aACW;GACd,OAAO,gBAAgB,MAAM,OAAO,QAAQ;EAC9C;CACF;CAGF,OAAO;AACT"}
@@ -5,13 +5,13 @@ const require_client_useLoadDynamic = require('./client/useLoadDynamic.cjs');
5
5
  const require_editor_ContentSelector = require('./editor/ContentSelector.cjs');
6
6
  const require_IntlayerNode = require('./IntlayerNode.cjs');
7
7
  const require_reactElement_renderReactElement = require('./reactElement/renderReactElement.cjs');
8
+ let react = require("react");
8
9
  let _intlayer_config_built = require("@intlayer/config/built");
10
+ let react_jsx_runtime = require("react/jsx-runtime");
9
11
  let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
10
12
  let _intlayer_core_markdown = require("@intlayer/core/markdown");
11
13
  let _intlayer_types_nodeType = require("@intlayer/types/nodeType");
12
14
  _intlayer_types_nodeType = require_runtime.__toESM(_intlayer_types_nodeType);
13
- let react = require("react");
14
- let react_jsx_runtime = require("react/jsx-runtime");
15
15
 
16
16
  //#region src/plugins.tsx
17
17
  const markdownRendererModulePromise = process.env.INTLAYER_NODE_TYPE_MARKDOWN !== "false" ? Promise.resolve().then(() => require("./markdown/MarkdownRendererPlugin.cjs")).then((m) => m.MarkdownRendererPlugin) : null;
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_server_format_useCurrency = require('./useCurrency.cjs');
2
3
  const require_server_format_useUnit = require('./useUnit.cjs');
3
4
  const require_server_format_useDate = require('./useDate.cjs');
4
- const require_server_format_useNumber = require('./useNumber.cjs');
5
- const require_server_format_useRelativeTime = require('./useRelativeTime.cjs');
6
5
  const require_server_format_useCompact = require('./useCompact.cjs');
7
6
  const require_server_format_useList = require('./useList.cjs');
7
+ const require_server_format_useNumber = require('./useNumber.cjs');
8
8
  const require_server_format_usePercentage = require('./usePercentage.cjs');
9
- const require_server_format_useCurrency = require('./useCurrency.cjs');
9
+ const require_server_format_useRelativeTime = require('./useRelativeTime.cjs');
10
10
 
11
11
  exports.useCompact = require_server_format_useCompact.useCompact;
12
12
  exports.useCurrency = require_server_format_useCurrency.useCurrency;
@@ -1,15 +1,15 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_server_serverContext = require('./serverContext.cjs');
3
3
  const require_server_IntlayerServerProvider = require('./IntlayerServerProvider.cjs');
4
- const require_server_t = require('./t.cjs');
5
- const require_server_useI18n = require('./useI18n.cjs');
6
4
  const require_server_useIntlayer = require('./useIntlayer.cjs');
5
+ const require_server_format_useIntl = require('./format/useIntl.cjs');
6
+ const require_server_t = require('./t.cjs');
7
7
  const require_server_useDictionary = require('./useDictionary.cjs');
8
8
  const require_server_useDictionaryAsync = require('./useDictionaryAsync.cjs');
9
- const require_server_useLocale = require('./useLocale.cjs');
10
9
  const require_server_useLoadDynamic = require('./useLoadDynamic.cjs');
11
10
  const require_server_useDictionaryDynamic = require('./useDictionaryDynamic.cjs');
12
- const require_server_format_useIntl = require('./format/useIntl.cjs');
11
+ const require_server_useI18n = require('./useI18n.cjs');
12
+ const require_server_useLocale = require('./useLocale.cjs');
13
13
 
14
14
  exports.IntlayerServer = require_server_IntlayerServerProvider.IntlayerServerContext;
15
15
  exports.IntlayerServerProvider = require_server_IntlayerServerProvider.IntlayerServerProvider;
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
 
3
- import { setExposureSink } from "./exposureSink.mjs";
4
3
  import { IntlayerClientContext } from "../client/IntlayerProvider.mjs";
5
- import { useContext, useEffect, useRef } from "react";
4
+ import { setExposureSink } from "./exposureSink.mjs";
6
5
  import { isEnabled } from "@intlayer/analytics/isEnabled";
6
+ import { useContext, useEffect, useRef } from "react";
7
7
 
8
8
  //#region src/analytics/useAnalytics.tsx
9
9
  /**
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { useCallback } from "react";
4
3
  import { isEnabled } from "@intlayer/analytics/isEnabled";
4
+ import { useCallback } from "react";
5
5
 
6
6
  //#region src/analytics/useConversion.tsx
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { useEffect, useState } from "react";
4
3
  import { isEnabled } from "@intlayer/analytics/isEnabled";
4
+ import { useEffect, useState } from "react";
5
5
 
6
6
  //#region src/analytics/useExperiment.tsx
7
7
  /**
@@ -3,11 +3,11 @@
3
3
  import { EditorProvider } from "../editor/EditorProvider.mjs";
4
4
  import { localeInStorage, setLocaleInStorage } from "./useLocaleStorage.mjs";
5
5
  import { AnalyticsProvider } from "../analytics/AnalyticsProvider.mjs";
6
- import { internationalization } from "@intlayer/config/built";
7
6
  import { createContext, useContext, useEffect, useState } from "react";
8
- import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { internationalization } from "@intlayer/config/built";
9
8
  import { setIntlayerIdentifier } from "@intlayer/config/client";
10
9
  import { localeResolver } from "@intlayer/core/localization";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
11
 
12
12
  //#region src/client/IntlayerProvider.tsx
13
13
  /**
@@ -1,11 +1,11 @@
1
1
  import { useIntl } from "./useIntl.mjs";
2
+ import { useCurrency } from "./useCurrency.mjs";
2
3
  import { useUnit } from "./useUnit.mjs";
3
4
  import { useDate } from "./useDate.mjs";
4
- import { useNumber } from "./useNumber.mjs";
5
- import { useRelativeTime } from "./useRelativeTime.mjs";
6
5
  import { useCompact } from "./useCompact.mjs";
7
6
  import { useList } from "./useList.mjs";
7
+ import { useNumber } from "./useNumber.mjs";
8
8
  import { usePercentage } from "./usePercentage.mjs";
9
- import { useCurrency } from "./useCurrency.mjs";
9
+ import { useRelativeTime } from "./useRelativeTime.mjs";
10
10
 
11
11
  export { useCompact, useCurrency, useDate, useIntl, useList, useNumber, usePercentage, useRelativeTime, useUnit };
@@ -1,7 +1,7 @@
1
- import { useLoadDynamic } from "./useLoadDynamic.mjs";
2
1
  import { localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, useLocaleCookie, useLocaleStorage } from "./useLocaleStorage.mjs";
3
2
  import { IntlayerClientContext, IntlayerProvider, IntlayerProviderContent, useIntlayerContext } from "./IntlayerProvider.mjs";
4
3
  import { t } from "./t.mjs";
4
+ import { useLoadDynamic } from "./useLoadDynamic.mjs";
5
5
  import { useDictionary } from "./useDictionary.mjs";
6
6
  import { useDictionaryAsync } from "./useDictionaryAsync.mjs";
7
7
  import { useDictionaryDynamic } from "./useDictionaryDynamic.mjs";
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  import { IntlayerClientContext } from "./IntlayerProvider.mjs";
4
- import { getTranslation } from "@intlayer/core/interpreter";
5
4
  import { useContext } from "react";
5
+ import { getTranslation } from "@intlayer/core/interpreter";
6
6
 
7
7
  //#region src/client/t.ts
8
8
  /**
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { getDictionary } from "../getDictionary.mjs";
4
3
  import { IntlayerClientContext } from "./IntlayerProvider.mjs";
4
+ import { getDictionary } from "../getDictionary.mjs";
5
5
  import { useContext, useMemo } from "react";
6
6
  import { getDictionarySelectorCacheKey, resolveDictionaryArgument } from "@intlayer/core/dictionaryManipulator";
7
7
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { IntlayerClientContext } from "./IntlayerProvider.mjs";
4
4
  import { useDictionary } from "./useDictionary.mjs";
5
- import { internationalization } from "@intlayer/config/built";
6
5
  import { useContext, useMemo } from "react";
6
+ import { internationalization } from "@intlayer/config/built";
7
7
 
8
8
  //#region src/client/useDictionaryAsync.ts
9
9
  /**
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
 
3
+ import { IntlayerClientContext } from "./IntlayerProvider.mjs";
3
4
  import { useLoadDynamic } from "./useLoadDynamic.mjs";
4
5
  import { getDictionary } from "../getDictionary.mjs";
5
- import { IntlayerClientContext } from "./IntlayerProvider.mjs";
6
- import { internationalization } from "@intlayer/config/built";
7
6
  import { useContext } from "react";
7
+ import { internationalization } from "@intlayer/config/built";
8
8
  import { getPreloadedDictionary, isQualifiedDynamicLoaderMap, parseDictionarySelector, resolveDictionaryArgument, resolveQualifiedDynamicContent } from "@intlayer/core/dictionaryManipulator";
9
9
 
10
10
  //#region src/client/useDictionaryDynamic.ts
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  import { IntlayerClientContext } from "./IntlayerProvider.mjs";
4
- import { getIntlayer } from "@intlayer/core/interpreter";
5
4
  import { useContext, useMemo } from "react";
5
+ import { getIntlayer } from "@intlayer/core/interpreter";
6
6
 
7
7
  //#region src/client/useI18n.ts
8
8
  /**
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { getIntlayer } from "../getIntlayer.mjs";
4
3
  import { IntlayerClientContext } from "./IntlayerProvider.mjs";
4
+ import { getIntlayer } from "../getIntlayer.mjs";
5
5
  import { useContext, useMemo } from "react";
6
6
  import { getDictionarySelectorCacheKey, resolveDictionaryArgument } from "@intlayer/core/dictionaryManipulator";
7
7
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { setLocaleInStorage } from "./useLocaleStorage.mjs";
4
4
  import { IntlayerClientContext } from "./IntlayerProvider.mjs";
5
- import { internationalization } from "@intlayer/config/built";
6
5
  import { useCallback, useContext } from "react";
6
+ import { internationalization } from "@intlayer/config/built";
7
7
 
8
8
  //#region src/client/useLocale.ts
9
9
  const { defaultLocale, locales: availableLocales } = internationalization ?? {};
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  import { IntlayerClientContext } from "./IntlayerProvider.mjs";
4
- import { internationalization } from "@intlayer/config/built";
5
4
  import { useContext } from "react";
5
+ import { internationalization } from "@intlayer/config/built";
6
6
 
7
7
  //#region src/client/useLocaleBase.ts
8
8
  const { defaultLocale, locales: availableLocales } = internationalization;
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  import { useLocale } from "./useLocale.mjs";
4
- import { routing } from "@intlayer/config/built";
5
4
  import { useEffect } from "react";
5
+ import { routing } from "@intlayer/config/built";
6
6
  import { getRewritePath } from "@intlayer/core/localization";
7
7
 
8
8
  //#region src/client/useRewriteURL.ts
@@ -1,6 +1,6 @@
1
1
  import { IntlayerClientContext } from "./IntlayerProvider.mjs";
2
- import { getTranslation } from "@intlayer/core/interpreter";
3
2
  import { useContext, useMemo } from "react";
3
+ import { getTranslation } from "@intlayer/core/interpreter";
4
4
 
5
5
  //#region src/client/useTraduction.ts
6
6
  /**
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
 
3
3
  import { useHTMLContext } from "./HTMLProvider.mjs";
4
- import { getHTML } from "@intlayer/core/interpreter";
5
4
  import { Fragment, createElement } from "react";
6
5
  import { jsx } from "react/jsx-runtime";
6
+ import { getHTML } from "@intlayer/core/interpreter";
7
7
  import { VOID_HTML_ELEMENTS } from "@intlayer/core/transpiler";
8
8
 
9
9
  //#region src/html/HTMLRenderer.tsx
@@ -1,6 +1,3 @@
1
- import { useLoadDynamic } from "./client/useLoadDynamic.mjs";
2
- import { getIntlayer } from "./getIntlayer.mjs";
3
- import { getDictionary } from "./getDictionary.mjs";
4
1
  import { localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, useLocaleCookie, useLocaleStorage } from "./client/useLocaleStorage.mjs";
5
2
  import { IntlayerClientContext, IntlayerProvider, IntlayerProviderContent, useIntlayerContext } from "./client/IntlayerProvider.mjs";
6
3
  import { useAnalytics } from "./analytics/useAnalytics.mjs";
@@ -9,10 +6,13 @@ import { useConversion } from "./analytics/useConversion.mjs";
9
6
  import { useExperiment } from "./analytics/useExperiment.mjs";
10
7
  import { useIntl } from "./client/format/useIntl.mjs";
11
8
  import { t } from "./client/t.mjs";
9
+ import { useLoadDynamic } from "./client/useLoadDynamic.mjs";
10
+ import { getDictionary } from "./getDictionary.mjs";
12
11
  import { useDictionary } from "./client/useDictionary.mjs";
13
12
  import { useDictionaryAsync } from "./client/useDictionaryAsync.mjs";
14
13
  import { useDictionaryDynamic } from "./client/useDictionaryDynamic.mjs";
15
14
  import { useI18n } from "./client/useI18n.mjs";
15
+ import { getIntlayer } from "./getIntlayer.mjs";
16
16
  import { useIntlayer } from "./client/useIntlayer.mjs";
17
17
  import { useLocale } from "./client/useLocale.mjs";
18
18
  import { useLocaleBase } from "./client/useLocaleBase.mjs";
@@ -22,12 +22,8 @@ const reactRuntime = {
22
22
  * Handles the conversion of props and children to React format.
23
23
  */
24
24
  createElement: (type, props, ...children) => {
25
- let key = null;
26
- const finalProps = props || {};
27
- if (props && props.key != null) {
28
- key = String(props.key);
29
- finalProps.key = void 0;
30
- }
25
+ const { key: rawKey, ...finalProps } = props ?? {};
26
+ const key = rawKey != null ? String(rawKey) : null;
31
27
  const childCount = children.length;
32
28
  if (childCount === 1) finalProps.children = children[0];
33
29
  else if (childCount > 1) finalProps.children = children;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.mjs","names":[],"sources":["../../../src/markdown/runtime.ts"],"sourcesContent":["import type { HTMLTag, MarkdownRuntime } from '@intlayer/core/markdown';\nimport {\n cloneElement,\n createElement,\n Fragment,\n type ReactElement,\n type ReactNode,\n} from 'react';\n\n/**\n * React-specific runtime for the markdown processor.\n * Implements the MarkdownRuntime interface using React's primitives.\n */\nlet REACT_ELEMENT_TYPE: symbol;\ntry {\n const sample = createElement('div');\n REACT_ELEMENT_TYPE =\n sample &&\n typeof sample === 'object' &&\n '$$typeof' in sample &&\n typeof sample.$$typeof === 'symbol'\n ? (sample.$$typeof as symbol)\n : Symbol.for('react.transitional.element');\n} catch {\n REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element');\n}\n\n/**\n * React-specific runtime for the markdown processor.\n * Implements the MarkdownRuntime interface using React's primitives.\n */\nexport const reactRuntime: MarkdownRuntime = {\n /**\n * Creates a React element.\n * Handles the conversion of props and children to React format.\n */\n createElement: (\n type: string | any,\n props: Record<string, any> | null,\n ...children: any[]\n ): ReactNode => {\n let key: string | null = null;\n const finalProps: any = props || {};\n\n if (props && props.key != null) {\n key = String(props.key);\n finalProps.key = undefined;\n }\n\n const childCount = children.length;\n if (childCount === 1) {\n finalProps.children = children[0];\n } else if (childCount > 1) {\n finalProps.children = children;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type,\n key,\n ref: null,\n props: finalProps,\n _owner: null,\n _store: {},\n _debugStack: null,\n _debugTask: null,\n } as unknown as ReactNode;\n },\n\n /**\n * Clones a React element with new props.\n */\n cloneElement: (\n element: unknown,\n props: Record<string, any>,\n ...children: any[]\n ): ReactNode => {\n if (children.length === 0) {\n return cloneElement(element as ReactElement, props);\n }\n return cloneElement(element as ReactElement, props, ...children);\n },\n\n /**\n * React Fragment component.\n */\n Fragment,\n\n /**\n * React-specific prop normalization.\n * React uses className instead of class, htmlFor instead of for, etc.\n * The core processor already handles ATTRIBUTE_TO_NODE_PROP_MAP,\n * so this is mostly a no-op but can be used for additional React-specific transforms.\n */\n normalizeProps: (\n _tag: HTMLTag,\n props: Record<string, any>\n ): Record<string, any> => {\n // The core already handles class -> className and for -> htmlFor\n // via ATTRIBUTE_TO_NODE_PROP_MAP in the attrStringToMap function.\n // This hook is available for any additional React-specific transforms.\n return props;\n },\n};\n\n/**\n * Creates a React runtime with custom createElement for advanced use cases.\n * Useful for wrapping elements or adding middleware.\n */\nexport const createReactRuntime = (\n options: {\n onCreateElement?: (\n type: string | any,\n props: Record<string, any> | null,\n children: any[]\n ) => ReactNode;\n } = {}\n): MarkdownRuntime => {\n const { onCreateElement } = options;\n\n if (onCreateElement) {\n return {\n ...reactRuntime,\n createElement: (\n type: string | any,\n props: Record<string, any> | null,\n ...children: any[]\n ): ReactNode => {\n return onCreateElement(type, props, children);\n },\n };\n }\n\n return reactRuntime;\n};\n"],"mappings":";;;;;;;AAaA,IAAI;AACJ,IAAI;CACF,MAAM,SAAS,cAAc,KAAK;CAClC,qBACE,UACA,OAAO,WAAW,YAClB,cAAc,UACd,OAAO,OAAO,aAAa,WACtB,OAAO,WACR,OAAO,IAAI,4BAA4B;AAC/C,QAAQ;CACN,qBAAqB,OAAO,IAAI,4BAA4B;AAC9D;;;;;AAMA,MAAa,eAAgC;;;;;CAK3C,gBACE,MACA,OACA,GAAG,aACW;EACd,IAAI,MAAqB;EACzB,MAAM,aAAkB,SAAS,CAAC;EAElC,IAAI,SAAS,MAAM,OAAO,MAAM;GAC9B,MAAM,OAAO,MAAM,GAAG;GACtB,WAAW,MAAM;EACnB;EAEA,MAAM,aAAa,SAAS;EAC5B,IAAI,eAAe,GACjB,WAAW,WAAW,SAAS;OAC1B,IAAI,aAAa,GACtB,WAAW,WAAW;EAGxB,OAAO;GACL,UAAU;GACV;GACA;GACA,KAAK;GACL,OAAO;GACP,QAAQ;GACR,QAAQ,CAAC;GACT,aAAa;GACb,YAAY;EACd;CACF;;;;CAKA,eACE,SACA,OACA,GAAG,aACW;EACd,IAAI,SAAS,WAAW,GACtB,OAAO,aAAa,SAAyB,KAAK;EAEpD,OAAO,aAAa,SAAyB,OAAO,GAAG,QAAQ;CACjE;;;;CAKA;;;;;;;CAQA,iBACE,MACA,UACwB;EAIxB,OAAO;CACT;AACF;;;;;AAMA,MAAa,sBACX,UAMI,CAAC,MACe;CACpB,MAAM,EAAE,oBAAoB;CAE5B,IAAI,iBACF,OAAO;EACL,GAAG;EACH,gBACE,MACA,OACA,GAAG,aACW;GACd,OAAO,gBAAgB,MAAM,OAAO,QAAQ;EAC9C;CACF;CAGF,OAAO;AACT"}
1
+ {"version":3,"file":"runtime.mjs","names":[],"sources":["../../../src/markdown/runtime.ts"],"sourcesContent":["import type { HTMLTag, MarkdownRuntime } from '@intlayer/core/markdown';\nimport {\n cloneElement,\n createElement,\n Fragment,\n type ReactElement,\n type ReactNode,\n} from 'react';\n\n/**\n * React-specific runtime for the markdown processor.\n * Implements the MarkdownRuntime interface using React's primitives.\n */\nlet REACT_ELEMENT_TYPE: symbol;\ntry {\n const sample = createElement('div');\n REACT_ELEMENT_TYPE =\n sample &&\n typeof sample === 'object' &&\n '$$typeof' in sample &&\n typeof sample.$$typeof === 'symbol'\n ? (sample.$$typeof as symbol)\n : Symbol.for('react.transitional.element');\n} catch {\n REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element');\n}\n\n/**\n * React-specific runtime for the markdown processor.\n * Implements the MarkdownRuntime interface using React's primitives.\n */\nexport const reactRuntime: MarkdownRuntime = {\n /**\n * Creates a React element.\n * Handles the conversion of props and children to React format.\n */\n createElement: (\n type: string | any,\n props: Record<string, any> | null,\n ...children: any[]\n ): ReactNode => {\n // `key` must not survive as an own property: React warns when a props\n // object that owns `key` is later spread into JSX by a custom renderer.\n const { key: rawKey, ...finalProps } = (props ?? {}) as Record<string, any>;\n const key: string | null = rawKey != null ? String(rawKey) : null;\n\n const childCount = children.length;\n if (childCount === 1) {\n finalProps.children = children[0];\n } else if (childCount > 1) {\n finalProps.children = children;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type,\n key,\n ref: null,\n props: finalProps,\n _owner: null,\n _store: {},\n _debugStack: null,\n _debugTask: null,\n } as unknown as ReactNode;\n },\n\n /**\n * Clones a React element with new props.\n */\n cloneElement: (\n element: unknown,\n props: Record<string, any>,\n ...children: any[]\n ): ReactNode => {\n if (children.length === 0) {\n return cloneElement(element as ReactElement, props);\n }\n return cloneElement(element as ReactElement, props, ...children);\n },\n\n /**\n * React Fragment component.\n */\n Fragment,\n\n /**\n * React-specific prop normalization.\n * React uses className instead of class, htmlFor instead of for, etc.\n * The core processor already handles ATTRIBUTE_TO_NODE_PROP_MAP,\n * so this is mostly a no-op but can be used for additional React-specific transforms.\n */\n normalizeProps: (\n _tag: HTMLTag,\n props: Record<string, any>\n ): Record<string, any> => {\n // The core already handles class -> className and for -> htmlFor\n // via ATTRIBUTE_TO_NODE_PROP_MAP in the attrStringToMap function.\n // This hook is available for any additional React-specific transforms.\n return props;\n },\n};\n\n/**\n * Creates a React runtime with custom createElement for advanced use cases.\n * Useful for wrapping elements or adding middleware.\n */\nexport const createReactRuntime = (\n options: {\n onCreateElement?: (\n type: string | any,\n props: Record<string, any> | null,\n children: any[]\n ) => ReactNode;\n } = {}\n): MarkdownRuntime => {\n const { onCreateElement } = options;\n\n if (onCreateElement) {\n return {\n ...reactRuntime,\n createElement: (\n type: string | any,\n props: Record<string, any> | null,\n ...children: any[]\n ): ReactNode => {\n return onCreateElement(type, props, children);\n },\n };\n }\n\n return reactRuntime;\n};\n"],"mappings":";;;;;;;AAaA,IAAI;AACJ,IAAI;CACF,MAAM,SAAS,cAAc,KAAK;CAClC,qBACE,UACA,OAAO,WAAW,YAClB,cAAc,UACd,OAAO,OAAO,aAAa,WACtB,OAAO,WACR,OAAO,IAAI,4BAA4B;AAC/C,QAAQ;CACN,qBAAqB,OAAO,IAAI,4BAA4B;AAC9D;;;;;AAMA,MAAa,eAAgC;;;;;CAK3C,gBACE,MACA,OACA,GAAG,aACW;EAGd,MAAM,EAAE,KAAK,QAAQ,GAAG,eAAgB,SAAS,CAAC;EAClD,MAAM,MAAqB,UAAU,OAAO,OAAO,MAAM,IAAI;EAE7D,MAAM,aAAa,SAAS;EAC5B,IAAI,eAAe,GACjB,WAAW,WAAW,SAAS;OAC1B,IAAI,aAAa,GACtB,WAAW,WAAW;EAGxB,OAAO;GACL,UAAU;GACV;GACA;GACA,KAAK;GACL,OAAO;GACP,QAAQ;GACR,QAAQ,CAAC;GACT,aAAa;GACb,YAAY;EACd;CACF;;;;CAKA,eACE,SACA,OACA,GAAG,aACW;EACd,IAAI,SAAS,WAAW,GACtB,OAAO,aAAa,SAAyB,KAAK;EAEpD,OAAO,aAAa,SAAyB,OAAO,GAAG,QAAQ;CACjE;;;;CAKA;;;;;;;CAQA,iBACE,MACA,UACwB;EAIxB,OAAO;CACT;AACF;;;;;AAMA,MAAa,sBACX,UAMI,CAAC,MACe;CACpB,MAAM,EAAE,oBAAoB;CAE5B,IAAI,iBACF,OAAO;EACL,GAAG;EACH,gBACE,MACA,OACA,GAAG,aACW;GACd,OAAO,gBAAgB,MAAM,OAAO,QAAQ;EAC9C;CACF;CAGF,OAAO;AACT"}
@@ -3,12 +3,12 @@ import { useLoadDynamic } from "./client/useLoadDynamic.mjs";
3
3
  import { ContentSelector } from "./editor/ContentSelector.mjs";
4
4
  import { renderIntlayerNode } from "./IntlayerNode.mjs";
5
5
  import { renderReactElement } from "./reactElement/renderReactElement.mjs";
6
+ import { Fragment, createElement } from "react";
6
7
  import { editor, internationalization } from "@intlayer/config/built";
8
+ import { jsx } from "react/jsx-runtime";
7
9
  import { conditionPlugin, enumerationPlugin, fallbackPlugin, filePlugin, genderPlugin, isInterpolableWrapperNode, nestedPlugin, pluralPlugin, selectPlugin, splitInsertionTemplate, transformInterpolableNode, translationPlugin } from "@intlayer/core/interpreter";
8
10
  import { getMarkdownMetadata } from "@intlayer/core/markdown";
9
11
  import * as NodeTypes from "@intlayer/types/nodeType";
10
- import { Fragment, createElement } from "react";
11
- import { jsx } from "react/jsx-runtime";
12
12
 
13
13
  //#region src/plugins.tsx
14
14
  const markdownRendererModulePromise = process.env.INTLAYER_NODE_TYPE_MARKDOWN !== "false" ? import("./markdown/MarkdownRendererPlugin.mjs").then((m) => m.MarkdownRendererPlugin) : null;
@@ -1,10 +1,10 @@
1
+ import { useCurrency } from "./useCurrency.mjs";
1
2
  import { useUnit } from "./useUnit.mjs";
2
3
  import { useDate } from "./useDate.mjs";
3
- import { useNumber } from "./useNumber.mjs";
4
- import { useRelativeTime } from "./useRelativeTime.mjs";
5
4
  import { useCompact } from "./useCompact.mjs";
6
5
  import { useList } from "./useList.mjs";
6
+ import { useNumber } from "./useNumber.mjs";
7
7
  import { usePercentage } from "./usePercentage.mjs";
8
- import { useCurrency } from "./useCurrency.mjs";
8
+ import { useRelativeTime } from "./useRelativeTime.mjs";
9
9
 
10
10
  export { useCompact, useCurrency, useDate, useList, useNumber, usePercentage, useRelativeTime, useUnit };
@@ -1,13 +1,13 @@
1
1
  import { getServerContext } from "./serverContext.mjs";
2
2
  import { IntlayerServerContext, IntlayerServerProvider, IntlayerServerVariantContext, locale, setLocale, setVariant } from "./IntlayerServerProvider.mjs";
3
- import { t } from "./t.mjs";
4
- import { useI18n } from "./useI18n.mjs";
5
3
  import { useIntlayer } from "./useIntlayer.mjs";
4
+ import { useIntl } from "./format/useIntl.mjs";
5
+ import { t } from "./t.mjs";
6
6
  import { useDictionary } from "./useDictionary.mjs";
7
7
  import { useDictionaryAsync } from "./useDictionaryAsync.mjs";
8
- import { useLocale } from "./useLocale.mjs";
9
8
  import { useLoadDynamic } from "./useLoadDynamic.mjs";
10
9
  import { useDictionaryDynamic } from "./useDictionaryDynamic.mjs";
11
- import { useIntl } from "./format/useIntl.mjs";
10
+ import { useI18n } from "./useI18n.mjs";
11
+ import { useLocale } from "./useLocale.mjs";
12
12
 
13
13
  export { IntlayerServerContext as IntlayerServer, IntlayerServerProvider, IntlayerServerVariantContext, getServerContext, locale, setLocale, setVariant, t, useDictionary, useDictionaryAsync, useDictionaryDynamic, useI18n, useIntl, useIntlayer, useLoadDynamic, useLocale };
@@ -1,4 +1,3 @@
1
- import { LocalesValues } from "../../intlayer/dist/types/index.js";
2
1
  //#region src/client/format/useCompact.d.ts
3
2
  /**
4
3
  * React client hook that provides a compact number formatter
@@ -11,7 +10,7 @@ import { LocalesValues } from "../../intlayer/dist/types/index.js";
11
10
  * ```
12
11
  */
13
12
  export declare const useCompact: () => (value: string | number, options?: Intl.NumberFormatOptions & {
14
- locale?: LocalesValues;
13
+ locale?: import("@intlayer/types").LocalesValues;
15
14
  }) => string;
16
15
  //#endregion
17
16
  //# sourceMappingURL=useCompact.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../../src/client/format/useCompact.ts"],"mappings":";;;;;;;;;;;;qBAgBa,mBAAU,wBAAA,UAAA,KAAA;WAAA"}
1
+ {"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../../src/client/format/useCompact.ts"],"mappings":";;;;;;;;;;;qBAgBa,mBAAU,wBAAA,UAAA,KAAA"}
@@ -1,4 +1,3 @@
1
- import { LocalesValues } from "../../intlayer/dist/types/index.js";
2
1
  //#region src/client/format/useCurrency.d.ts
3
2
  /**
4
3
  * React client hook that provides a currency formatter
@@ -25,7 +24,7 @@ import { LocalesValues } from "../../intlayer/dist/types/index.js";
25
24
  * ```
26
25
  */
27
26
  export declare const useCurrency: () => (value: string | number, options?: Intl.NumberFormatOptions & {
28
- locale?: LocalesValues;
27
+ locale?: import("@intlayer/types").LocalesValues;
29
28
  }) => string;
30
29
  //#endregion
31
30
  //# sourceMappingURL=useCurrency.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../../src/client/format/useCurrency.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;qBA8Ba,oBAAW,wBAAA,UAAA,KAAA;WAAA"}
1
+ {"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../../src/client/format/useCurrency.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;qBA8Ba,oBAAW,wBAAA,UAAA,KAAA"}
@@ -1,4 +1,3 @@
1
- import { LocalesValues } from "../../intlayer/dist/types/index.js";
2
1
  //#region src/client/format/useList.d.ts
3
2
  /**
4
3
  * React client hook that provides a list formatter
@@ -22,7 +21,7 @@ import { LocalesValues } from "../../intlayer/dist/types/index.js";
22
21
  * ```
23
22
  */
24
23
  export declare const useList: () => (values: (string | number)[], options?: import("@intlayer/core/formatters").ListFormatOptions & {
25
- locale?: LocalesValues;
24
+ locale?: import("@intlayer/types").LocalesValues;
26
25
  }) => string;
27
26
  //#endregion
28
27
  //# sourceMappingURL=useList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useList.d.ts","names":[],"sources":["../../../../src/client/format/useList.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;qBA2Ba,gBAAO,6BAAA,8CAAA;WAAP"}
1
+ {"version":3,"file":"useList.d.ts","names":[],"sources":["../../../../src/client/format/useList.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;qBA2Ba,gBAAO,6BAAA,8CAAA"}
@@ -1,4 +1,3 @@
1
- import { LocalesValues } from "../../intlayer/dist/types/index.js";
2
1
  //#region src/client/format/useNumber.d.ts
3
2
  /**
4
3
  * React client hook that provides a localized number formatter.
@@ -23,7 +22,7 @@ import { LocalesValues } from "../../intlayer/dist/types/index.js";
23
22
  * A number formatting function bound to the active locale.
24
23
  */
25
24
  export declare const useNumber: () => (value: string | number, args_1?: Intl.NumberFormatOptions & {
26
- locale?: LocalesValues;
25
+ locale?: import("@intlayer/types").LocalesValues;
27
26
  }) => string;
28
27
  //#endregion
29
28
  //# sourceMappingURL=useNumber.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../../src/client/format/useNumber.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;qBA4Ba,kBAAS,wBAAA,SAAA,KAAA;WAAA"}
1
+ {"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../../src/client/format/useNumber.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;qBA4Ba,kBAAS,wBAAA,SAAA,KAAA"}
@@ -1,4 +1,3 @@
1
- import { LocalesValues } from "../../intlayer/dist/types/index.js";
2
1
  //#region src/client/format/usePercentage.d.ts
3
2
  /**
4
3
  * React hook to provide a percentage formatter function
@@ -19,7 +18,7 @@ import { LocalesValues } from "../../intlayer/dist/types/index.js";
19
18
  * A function that formats numbers or numeric strings into localized percentages.
20
19
  */
21
20
  export declare const usePercentage: () => (value: string | number, args_1?: Intl.NumberFormatOptions & {
22
- locale?: LocalesValues;
21
+ locale?: import("@intlayer/types").LocalesValues;
23
22
  }) => string;
24
23
  //#endregion
25
24
  //# sourceMappingURL=usePercentage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../../src/client/format/usePercentage.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;qBAwBa,sBAAa,wBAAA,SAAA,KAAA;WAAA"}
1
+ {"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../../src/client/format/usePercentage.ts"],"mappings":";;;;;;;;;;;;;;;;;;;qBAwBa,sBAAa,wBAAA,SAAA,KAAA"}
@@ -1,4 +1,3 @@
1
- import { LocalesValues } from "../../intlayer/dist/types/index.js";
2
1
  //#region src/client/format/useRelativeTime.d.ts
3
2
  /**
4
3
  * Client-side React hook for accessing a localized relative time formatter.
@@ -19,7 +18,7 @@ import { LocalesValues } from "../../intlayer/dist/types/index.js";
19
18
  * bound to the current client locale.
20
19
  */
21
20
  export declare const useRelativeTime: () => (from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
22
- locale?: LocalesValues;
21
+ locale?: import("@intlayer/types").LocalesValues;
23
22
  unit?: Intl.RelativeTimeFormatUnit;
24
23
  }) => string;
25
24
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../../src/client/format/useRelativeTime.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;qBAwBa,wBAAe,wBAAA,MAAA,uBAAA,MAAA,UAAA,KAAA;WAAA"}
1
+ {"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../../src/client/format/useRelativeTime.ts"],"mappings":";;;;;;;;;;;;;;;;;;;qBAwBa,wBAAe,wBAAA,MAAA,uBAAA,MAAA,UAAA,KAAA"}
@@ -1,4 +1,3 @@
1
- import { LocalesValues } from "../../intlayer/dist/types/index.js";
2
1
  //#region src/client/format/useUnit.d.ts
3
2
  /**
4
3
  * React hook that provides a unit formatting function
@@ -18,7 +17,7 @@ import { LocalesValues } from "../../intlayer/dist/types/index.js";
18
17
  * @returns {Function} A unit formatting function that accepts a value and optional formatting options.
19
18
  */
20
19
  export declare const useUnit: () => (value: string | number, options?: Intl.NumberFormatOptions & {
21
- locale?: LocalesValues;
20
+ locale?: import("@intlayer/types").LocalesValues;
22
21
  }) => string;
23
22
  //#endregion
24
23
  //# sourceMappingURL=useUnit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../../src/client/format/useUnit.ts"],"mappings":";;;;;;;;;;;;;;;;;;;qBAuBa,gBAAO,wBAAA,UAAA,KAAA;WAAA"}
1
+ {"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../../src/client/format/useUnit.ts"],"mappings":";;;;;;;;;;;;;;;;;;qBAuBa,gBAAO,wBAAA,UAAA,KAAA"}
@@ -1,7 +1,7 @@
1
1
  import { DeepTransformContent } from "../plugins.js";
2
2
  import { DeclaredLocales, DictionaryKeys, DictionaryRegistryContent } from "@intlayer/types/module_augmentation";
3
- import { GetSubPath } from "@intlayer/types/dictionary";
4
3
  import { ValidDotPathsFor } from "@intlayer/core/transpiler";
4
+ import { GetSubPath } from "@intlayer/types/dictionary";
5
5
  //#region src/client/useI18n.d.ts
6
6
  /**
7
7
  * Hook that provides a translation function `t()` for accessing nested content by key.
@@ -1,13 +1,12 @@
1
- import { Locale, LocalesValues } from "../intlayer/dist/types/index.js";
2
1
  //#region src/client/useLocaleBase.d.ts
3
2
  /**
4
3
  * On the client side, hook to get the current locale and all related fields
5
4
  */
6
5
  export declare const useLocaleBase: () => {
7
- locale: LocalesValues;
8
- defaultLocale: Locale;
9
- availableLocales: Locale[];
10
- setLocale: (newLocale: LocalesValues) => void;
6
+ locale: import("@intlayer/types").LocalesValues;
7
+ defaultLocale: import("@intlayer/types").Locale;
8
+ availableLocales: import("@intlayer/types").Locale[];
9
+ setLocale: (newLocale: import("@intlayer/types").LocalesValues) => void;
11
10
  };
12
11
  //#endregion
13
12
  //# sourceMappingURL=useLocaleBase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocaleBase.d.ts","names":[],"sources":["../../../src/client/useLocaleBase.ts"],"mappings":";;;;;qBAWa;UAAA"}
1
+ {"version":3,"file":"useLocaleBase.d.ts","names":[],"sources":["../../../src/client/useLocaleBase.ts"],"mappings":";;;;qBAWa"}
@@ -1,4 +1,3 @@
1
- import { Locale } from "../intlayer/dist/types/index.js";
2
1
  import { LocalesValues } from "@intlayer/types/module_augmentation";
3
2
  //#region src/client/useLocaleStorage.d.ts
4
3
  /**
@@ -7,13 +6,13 @@ import { LocalesValues } from "@intlayer/types/module_augmentation";
7
6
  /**
8
7
  * Get the locale cookie
9
8
  */
10
- export declare const localeInStorage: Locale;
9
+ export declare const localeInStorage: import("@intlayer/types").Locale;
11
10
  /**
12
11
  * @deprecated Use localeInStorage instead
13
12
  *
14
13
  * Get the locale cookie
15
14
  */
16
- export declare const localeCookie: Locale;
15
+ export declare const localeCookie: import("@intlayer/types").Locale;
17
16
  /**
18
17
  * Set the locale cookie
19
18
  */
@@ -28,7 +27,7 @@ export declare const setLocaleCookie: typeof setLocaleInStorage;
28
27
  * Hook that provides the locale cookie and a function to set it
29
28
  */
30
29
  export declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
31
- getLocale: () => Locale;
30
+ getLocale: () => import("@intlayer/types").Locale;
32
31
  setLocale: (locale: LocalesValues) => void;
33
32
  };
34
33
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;;;;qBAea,iBAAA;;;;;;qBAMA,cAAA;;;;qBAKA,qBAAkB,QACrB,eAAa;;;;;;qBAaV,wBAAe;;;;qBAKf,mBAAgB;mBAAhB;sBAAA;;;;;;;;;qBAiBA,wBAAe"}
1
+ {"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;;;qBAea,2CAAe;;;;;;qBAMf,wCAAY;;;;qBAKZ,qBAAkB,QACrB,eAAa;;;;;;qBAaV,wBAAe;;;;qBAKf,mBAAgB;;sBAAhB;;;;;;;;;qBAiBA,wBAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","names":[],"sources":["../../../src/markdown/runtime.ts"],"mappings":";;;;;;;qBA+Ba,cAAc;;;;;qBA8Ed,qBAAkB;EAE3B,mBACE,oBACA,OAAO,4BACP,oBACG;MAEN"}
1
+ {"version":3,"file":"runtime.d.ts","names":[],"sources":["../../../src/markdown/runtime.ts"],"mappings":";;;;;;;qBA+Ba,cAAc;;;;;qBA2Ed,qBAAkB;EAE3B,mBACE,oBACA,OAAO,4BACP,oBACG;MAEN"}
@@ -1,7 +1,7 @@
1
1
  import { DeepTransformContent } from "../plugins.js";
2
2
  import { DictionaryKeys, DictionaryRegistryContent, LocalesValues } from "@intlayer/types/module_augmentation";
3
- import { GetSubPath } from "@intlayer/types/dictionary";
4
3
  import { ValidDotPathsFor } from "@intlayer/core/transpiler";
4
+ import { GetSubPath } from "@intlayer/types/dictionary";
5
5
  //#region src/server/useI18n.d.ts
6
6
  /**
7
7
  * Hook that provides a translation function `t()` for accessing nested content by key.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-intlayer",
3
- "version": "9.5.2",
3
+ "version": "9.5.4-canary.0",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your React applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -126,18 +126,19 @@
126
126
  "prepublish": "cp -f ../../README.md ./README.md",
127
127
  "publish": "bun publish || true",
128
128
  "publish:canary": "bun publish --access public --tag canary || true",
129
+ "publish:ci": "bun ../../scripts/publish-package.mjs",
129
130
  "publish:latest": "bun publish --access public --tag latest || true",
130
131
  "test": "bun --bun vitest run",
131
132
  "test:watch": "bun --bun vitest",
132
133
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
133
134
  },
134
135
  "dependencies": {
135
- "@intlayer/api": "9.5.2",
136
- "@intlayer/config": "9.5.2",
137
- "@intlayer/core": "9.5.2",
138
- "@intlayer/dictionaries-entry": "9.5.2",
139
- "@intlayer/editor": "9.5.2",
140
- "@intlayer/types": "9.5.2"
136
+ "@intlayer/api": "9.5.4-canary.0",
137
+ "@intlayer/config": "9.5.4-canary.0",
138
+ "@intlayer/core": "9.5.4-canary.0",
139
+ "@intlayer/dictionaries-entry": "9.5.4-canary.0",
140
+ "@intlayer/editor": "9.5.4-canary.0",
141
+ "@intlayer/types": "9.5.4-canary.0"
141
142
  },
142
143
  "devDependencies": {
143
144
  "@craco/types": "7.1.0",
@@ -151,14 +152,14 @@
151
152
  "rimraf": "6.1.3",
152
153
  "tsdown": "0.23.0",
153
154
  "typescript": "7.0.2",
154
- "vitest": "5.0.0"
155
+ "vitest": "5.0.1"
155
156
  },
156
157
  "peerDependencies": {
157
158
  "react": ">=16.0.0",
158
159
  "react-dom": ">=16.0.0"
159
160
  },
160
161
  "optionalDependencies": {
161
- "@intlayer/analytics": "9.5.2"
162
+ "@intlayer/analytics": "9.5.4-canary.0"
162
163
  },
163
164
  "engines": {
164
165
  "node": ">=14.18"
@@ -1,8 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_editor_ContentSelector = require('./ContentSelector.cjs');
3
- const require_editor_useEditor = require('./useEditor.cjs');
4
- const require_editor_EditorProvider = require('./EditorProvider.cjs');
5
-
6
- exports.ContentSelector = require_editor_ContentSelector.ContentSelector;
7
- exports.EditorProvider = require_editor_EditorProvider.EditorProvider;
8
- exports.useEditor = require_editor_useEditor.useEditor;
@@ -1,5 +0,0 @@
1
- import { ContentSelector } from "./ContentSelector.mjs";
2
- import { useEditor } from "./useEditor.mjs";
3
- import { EditorProvider } from "./EditorProvider.mjs";
4
-
5
- export { ContentSelector, EditorProvider, useEditor };
@@ -1,4 +0,0 @@
1
- import { ContentSelector, ContentSelectorProps } from "./ContentSelector.js";
2
- import { EditorProvider } from "./EditorProvider.js";
3
- import { useEditor } from "./useEditor.js";
4
- export { ContentSelector, type ContentSelectorProps, EditorProvider, useEditor };
@@ -1,14 +0,0 @@
1
- import "@intlayer/core/interpreter";
2
- import { DeclaredLocales, LocalesValues as LocalesValues$1 } from "@intlayer/types/module_augmentation";
3
- import "@intlayer/types/config";
4
- import { Dictionary } from "@intlayer/types/dictionary";
5
- import { Locale } from "@intlayer/types/allLocales";
6
- import "@intlayer/types/locales";
7
- import "@intlayer/config/built";
8
- import "@intlayer/core/file";
9
- import "@intlayer/core/formatters";
10
- import "@intlayer/core/localization";
11
- import "@intlayer/core/markdown";
12
- import "@intlayer/core/transpiler";
13
- import "@intlayer/core/utils";
14
- export type { Locale, LocalesValues$1 as LocalesValues };