preact-intlayer 9.5.3 → 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.
- package/README.md +8 -8
- package/dist/cjs/analytics/useAnalytics.cjs +2 -2
- package/dist/cjs/analytics/useConversion.cjs +1 -1
- package/dist/cjs/analytics/useExperiment.cjs +1 -1
- package/dist/cjs/client/IntlayerProvider.cjs +3 -3
- package/dist/cjs/client/t.cjs +1 -1
- package/dist/cjs/client/useDictionary.cjs +1 -1
- package/dist/cjs/client/useDictionaryAsync.cjs +1 -1
- package/dist/cjs/client/useDictionaryDynamic.cjs +2 -2
- package/dist/cjs/client/useIntlayer.cjs +1 -1
- package/dist/cjs/client/useLocale.cjs +1 -1
- package/dist/cjs/client/useLocaleBase.cjs +1 -1
- package/dist/cjs/client/useTraduction.cjs +1 -1
- package/dist/cjs/editor/ContentSelector.cjs +1 -1
- package/dist/cjs/editor/useEditor.cjs +1 -1
- package/dist/cjs/format/index.cjs +3 -3
- package/dist/cjs/html/HTMLProvider.cjs +1 -1
- package/dist/cjs/html/HTMLRenderer.cjs +1 -1
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/markdown/MarkdownProvider.cjs +1 -1
- package/dist/cjs/markdown/MarkdownRendererPlugin.cjs +1 -1
- package/dist/cjs/plugins.cjs +2 -2
- package/dist/esm/analytics/useAnalytics.mjs +2 -2
- package/dist/esm/analytics/useConversion.mjs +1 -1
- package/dist/esm/analytics/useExperiment.mjs +1 -1
- package/dist/esm/client/IntlayerProvider.mjs +3 -3
- package/dist/esm/client/t.mjs +1 -1
- package/dist/esm/client/useDictionary.mjs +1 -1
- package/dist/esm/client/useDictionaryAsync.mjs +1 -1
- package/dist/esm/client/useDictionaryDynamic.mjs +2 -2
- package/dist/esm/client/useIntlayer.mjs +1 -1
- package/dist/esm/client/useLocale.mjs +1 -1
- package/dist/esm/client/useLocaleBase.mjs +1 -1
- package/dist/esm/client/useTraduction.mjs +1 -1
- package/dist/esm/editor/ContentSelector.mjs +1 -1
- package/dist/esm/editor/useEditor.mjs +1 -1
- package/dist/esm/format/index.mjs +3 -3
- package/dist/esm/html/HTMLProvider.mjs +1 -1
- package/dist/esm/html/HTMLRenderer.mjs +1 -1
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/markdown/MarkdownProvider.mjs +1 -1
- package/dist/esm/markdown/MarkdownRendererPlugin.mjs +1 -1
- package/dist/esm/plugins.mjs +2 -2
- package/dist/types/client/useContent.d.ts +2 -1
- package/dist/types/client/useContent.d.ts.map +1 -1
- package/dist/types/client/useLocaleBase.d.ts +5 -4
- package/dist/types/client/useLocaleBase.d.ts.map +1 -1
- package/dist/types/client/useLocaleStorage.d.ts +4 -3
- package/dist/types/client/useLocaleStorage.d.ts.map +1 -1
- package/dist/types/format/useCompact.d.ts +2 -1
- package/dist/types/format/useCompact.d.ts.map +1 -1
- package/dist/types/format/useCurrency.d.ts +2 -1
- package/dist/types/format/useCurrency.d.ts.map +1 -1
- package/dist/types/format/useList.d.ts +2 -1
- package/dist/types/format/useList.d.ts.map +1 -1
- package/dist/types/format/useNumber.d.ts +2 -1
- package/dist/types/format/useNumber.d.ts.map +1 -1
- package/dist/types/format/usePercentage.d.ts +2 -1
- package/dist/types/format/usePercentage.d.ts.map +1 -1
- package/dist/types/format/useRelativeTime.d.ts +2 -1
- package/dist/types/format/useRelativeTime.d.ts.map +1 -1
- package/dist/types/format/useUnit.d.ts +2 -1
- package/dist/types/format/useUnit.d.ts.map +1 -1
- package/dist/types/intlayer/dist/types/index.d.ts +14 -0
- package/package.json +10 -9
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.
|
|
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.
|
|
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.
|
|
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.
|
|
64
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/bundle.
|
|
65
|
-
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/static_rendering.
|
|
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.
|
|
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
|
-

|
|
266
266
|
|
|
267
267
|
## 🌐 Readme in other languages
|
|
268
268
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_analytics_exposureSink = require('./exposureSink.cjs');
|
|
3
2
|
const require_client_IntlayerProvider = require('../client/IntlayerProvider.cjs');
|
|
4
|
-
|
|
3
|
+
const require_analytics_exposureSink = require('./exposureSink.cjs');
|
|
5
4
|
let _intlayer_analytics_isEnabled = require("@intlayer/analytics/isEnabled");
|
|
5
|
+
let preact_hooks = require("preact/hooks");
|
|
6
6
|
|
|
7
7
|
//#region src/analytics/useAnalytics.tsx
|
|
8
8
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
let preact_hooks = require("preact/hooks");
|
|
3
2
|
let _intlayer_analytics_isEnabled = require("@intlayer/analytics/isEnabled");
|
|
3
|
+
let preact_hooks = require("preact/hooks");
|
|
4
4
|
|
|
5
5
|
//#region src/analytics/useConversion.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
let preact_hooks = require("preact/hooks");
|
|
3
2
|
let _intlayer_analytics_isEnabled = require("@intlayer/analytics/isEnabled");
|
|
3
|
+
let preact_hooks = require("preact/hooks");
|
|
4
4
|
|
|
5
5
|
//#region src/analytics/useExperiment.ts
|
|
6
6
|
/**
|
|
@@ -2,12 +2,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_editor_EditorProvider = require('../editor/EditorProvider.cjs');
|
|
3
3
|
const require_client_useLocaleStorage = require('./useLocaleStorage.cjs');
|
|
4
4
|
const require_analytics_AnalyticsProvider = require('../analytics/AnalyticsProvider.cjs');
|
|
5
|
-
let _intlayer_config_built = require("@intlayer/config/built");
|
|
6
|
-
let preact = require("preact");
|
|
7
5
|
let preact_hooks = require("preact/hooks");
|
|
8
|
-
let
|
|
6
|
+
let _intlayer_config_built = require("@intlayer/config/built");
|
|
9
7
|
let _intlayer_config_client = require("@intlayer/config/client");
|
|
10
8
|
let _intlayer_core_localization = require("@intlayer/core/localization");
|
|
9
|
+
let preact = require("preact");
|
|
10
|
+
let preact_jsx_runtime = require("preact/jsx-runtime");
|
|
11
11
|
|
|
12
12
|
//#region src/client/IntlayerProvider.tsx
|
|
13
13
|
/**
|
package/dist/cjs/client/t.cjs
CHANGED
|
@@ -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 preact_hooks = require("preact/hooks");
|
|
4
|
+
let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
|
|
5
5
|
|
|
6
6
|
//#region src/client/t.ts
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_getDictionary = require('../getDictionary.cjs');
|
|
3
2
|
const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
|
|
3
|
+
const require_getDictionary = require('../getDictionary.cjs');
|
|
4
4
|
let preact_hooks = require("preact/hooks");
|
|
5
5
|
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
|
|
3
3
|
const require_client_useDictionary = require('./useDictionary.cjs');
|
|
4
|
-
let _intlayer_config_built = require("@intlayer/config/built");
|
|
5
4
|
let preact_hooks = require("preact/hooks");
|
|
5
|
+
let _intlayer_config_built = require("@intlayer/config/built");
|
|
6
6
|
|
|
7
7
|
//#region src/client/useDictionaryAsync.ts
|
|
8
8
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_getDictionary = require('../getDictionary.cjs');
|
|
3
2
|
const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
|
|
3
|
+
const require_getDictionary = require('../getDictionary.cjs');
|
|
4
4
|
const require_client_useLoadDynamic = require('./useLoadDynamic.cjs');
|
|
5
|
-
let _intlayer_config_built = require("@intlayer/config/built");
|
|
6
5
|
let preact_hooks = require("preact/hooks");
|
|
6
|
+
let _intlayer_config_built = require("@intlayer/config/built");
|
|
7
7
|
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
8
8
|
|
|
9
9
|
//#region src/client/useDictionaryDynamic.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_getIntlayer = require('../getIntlayer.cjs');
|
|
3
2
|
const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
|
|
3
|
+
const require_getIntlayer = require('../getIntlayer.cjs');
|
|
4
4
|
let preact_hooks = require("preact/hooks");
|
|
5
5
|
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_client_useLocaleStorage = require('./useLocaleStorage.cjs');
|
|
3
3
|
const require_client_IntlayerProvider = require('./IntlayerProvider.cjs');
|
|
4
|
-
let _intlayer_config_built = require("@intlayer/config/built");
|
|
5
4
|
let preact_hooks = require("preact/hooks");
|
|
5
|
+
let _intlayer_config_built = require("@intlayer/config/built");
|
|
6
6
|
|
|
7
7
|
//#region src/client/useLocale.ts
|
|
8
8
|
const { defaultLocale, locales: availableLocales } = _intlayer_config_built.internationalization ?? {};
|
|
@@ -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_config_built = require("@intlayer/config/built");
|
|
4
3
|
let preact_hooks = require("preact/hooks");
|
|
4
|
+
let _intlayer_config_built = require("@intlayer/config/built");
|
|
5
5
|
|
|
6
6
|
//#region src/client/useLocaleBase.ts
|
|
7
7
|
const { defaultLocale, locales: availableLocales } = _intlayer_config_built.internationalization;
|
|
@@ -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 preact_hooks = require("preact/hooks");
|
|
4
|
+
let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
|
|
5
5
|
|
|
6
6
|
//#region src/client/useTraduction.ts
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
let _intlayer_editor_isEnabled = require("@intlayer/editor/isEnabled");
|
|
3
2
|
let preact_hooks = require("preact/hooks");
|
|
3
|
+
let _intlayer_editor_isEnabled = require("@intlayer/editor/isEnabled");
|
|
4
4
|
let preact_jsx_runtime = require("preact/jsx-runtime");
|
|
5
5
|
|
|
6
6
|
//#region src/editor/ContentSelector.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_client_IntlayerProvider = require('../client/IntlayerProvider.cjs');
|
|
3
|
-
let _intlayer_editor_isEnabled = require("@intlayer/editor/isEnabled");
|
|
4
3
|
let preact_hooks = require("preact/hooks");
|
|
4
|
+
let _intlayer_editor_isEnabled = require("@intlayer/editor/isEnabled");
|
|
5
5
|
|
|
6
6
|
//#region src/editor/useEditor.tsx
|
|
7
7
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_format_useCurrency = require('./useCurrency.cjs');
|
|
2
3
|
const require_format_useUnit = require('./useUnit.cjs');
|
|
3
4
|
const require_format_useDate = require('./useDate.cjs');
|
|
4
|
-
const require_format_useNumber = require('./useNumber.cjs');
|
|
5
|
-
const require_format_useRelativeTime = require('./useRelativeTime.cjs');
|
|
6
5
|
const require_format_useCompact = require('./useCompact.cjs');
|
|
7
6
|
const require_format_useIntl = require('./useIntl.cjs');
|
|
8
7
|
const require_format_useList = require('./useList.cjs');
|
|
8
|
+
const require_format_useNumber = require('./useNumber.cjs');
|
|
9
9
|
const require_format_usePercentage = require('./usePercentage.cjs');
|
|
10
|
-
const
|
|
10
|
+
const require_format_useRelativeTime = require('./useRelativeTime.cjs');
|
|
11
11
|
|
|
12
12
|
exports.useCompact = require_format_useCompact.useCompact;
|
|
13
13
|
exports.useCurrency = require_format_useCurrency.useCurrency;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
let preact = require("preact");
|
|
3
2
|
let preact_hooks = require("preact/hooks");
|
|
3
|
+
let preact = require("preact");
|
|
4
4
|
let preact_jsx_runtime = require("preact/jsx-runtime");
|
|
5
5
|
|
|
6
6
|
//#region src/html/HTMLProvider.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_html_HTMLProvider = require('./HTMLProvider.cjs');
|
|
3
|
-
let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
|
|
4
3
|
let preact = require("preact");
|
|
4
|
+
let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
|
|
5
5
|
let _intlayer_core_transpiler = require("@intlayer/core/transpiler");
|
|
6
6
|
|
|
7
7
|
//#region src/html/HTMLRenderer.tsx
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_getIntlayer = require('./getIntlayer.cjs');
|
|
3
|
-
const require_getDictionary = require('./getDictionary.cjs');
|
|
4
2
|
const require_client_useLocaleStorage = require('./client/useLocaleStorage.cjs');
|
|
5
3
|
const require_client_IntlayerProvider = require('./client/IntlayerProvider.cjs');
|
|
6
4
|
const require_analytics_useAnalytics = require('./analytics/useAnalytics.cjs');
|
|
@@ -8,10 +6,12 @@ const require_analytics_AnalyticsProvider = require('./analytics/AnalyticsProvid
|
|
|
8
6
|
const require_analytics_useConversion = require('./analytics/useConversion.cjs');
|
|
9
7
|
const require_analytics_useExperiment = require('./analytics/useExperiment.cjs');
|
|
10
8
|
const require_client_t = require('./client/t.cjs');
|
|
9
|
+
const require_getDictionary = require('./getDictionary.cjs');
|
|
11
10
|
const require_client_useDictionary = require('./client/useDictionary.cjs');
|
|
12
11
|
const require_client_useDictionaryAsync = require('./client/useDictionaryAsync.cjs');
|
|
13
12
|
const require_client_useLoadDynamic = require('./client/useLoadDynamic.cjs');
|
|
14
13
|
const require_client_useDictionaryDynamic = require('./client/useDictionaryDynamic.cjs');
|
|
14
|
+
const require_getIntlayer = require('./getIntlayer.cjs');
|
|
15
15
|
const require_client_useIntlayer = require('./client/useIntlayer.cjs');
|
|
16
16
|
const require_client_useLocale = require('./client/useLocale.cjs');
|
|
17
17
|
const require_client_useLocaleBase = require('./client/useLocaleBase.cjs');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_markdown_compiler = require('./compiler.cjs');
|
|
3
|
-
let preact = require("preact");
|
|
4
3
|
let preact_hooks = require("preact/hooks");
|
|
4
|
+
let preact = require("preact");
|
|
5
5
|
let preact_jsx_runtime = require("preact/jsx-runtime");
|
|
6
6
|
|
|
7
7
|
//#region src/markdown/MarkdownProvider.tsx
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
const require_client_useLocale = require('../client/useLocale.cjs');
|
|
5
5
|
const require_markdown_MarkdownProvider = require('./MarkdownProvider.cjs');
|
|
6
|
-
let _intlayer_core_markdown = require("@intlayer/core/markdown");
|
|
7
6
|
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
7
|
+
let _intlayer_core_markdown = require("@intlayer/core/markdown");
|
|
8
8
|
|
|
9
9
|
//#region src/markdown/MarkdownRendererPlugin.tsx
|
|
10
10
|
const MarkdownRendererPlugin = (props) => {
|
package/dist/cjs/plugins.cjs
CHANGED
|
@@ -5,13 +5,13 @@ const require_editor_ContentSelector = require('./editor/ContentSelector.cjs');
|
|
|
5
5
|
const require_IntlayerNode = require('./IntlayerNode.cjs');
|
|
6
6
|
const require_preactElement_renderPreactElement = require('./preactElement/renderPreactElement.cjs');
|
|
7
7
|
let _intlayer_config_built = require("@intlayer/config/built");
|
|
8
|
+
let preact = require("preact");
|
|
9
|
+
let preact_jsx_runtime = require("preact/jsx-runtime");
|
|
8
10
|
let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
|
|
9
11
|
let _intlayer_core_markdown = require("@intlayer/core/markdown");
|
|
10
12
|
let _intlayer_types_nodeType = require("@intlayer/types/nodeType");
|
|
11
13
|
_intlayer_types_nodeType = require_runtime.__toESM(_intlayer_types_nodeType);
|
|
12
|
-
let preact = require("preact");
|
|
13
14
|
let preact_compat = require("preact/compat");
|
|
14
|
-
let preact_jsx_runtime = require("preact/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) => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { setExposureSink } from "./exposureSink.mjs";
|
|
2
1
|
import { IntlayerClientContext } from "../client/IntlayerProvider.mjs";
|
|
3
|
-
import {
|
|
2
|
+
import { setExposureSink } from "./exposureSink.mjs";
|
|
4
3
|
import { isEnabled } from "@intlayer/analytics/isEnabled";
|
|
4
|
+
import { useContext, useEffect, useRef } from "preact/hooks";
|
|
5
5
|
|
|
6
6
|
//#region src/analytics/useAnalytics.tsx
|
|
7
7
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { EditorProvider } from "../editor/EditorProvider.mjs";
|
|
2
2
|
import { localeInStorage, setLocaleInStorage } from "./useLocaleStorage.mjs";
|
|
3
3
|
import { AnalyticsProvider } from "../analytics/AnalyticsProvider.mjs";
|
|
4
|
-
import { internationalization } from "@intlayer/config/built";
|
|
5
|
-
import { createContext } from "preact";
|
|
6
4
|
import { useContext, useEffect, useState } from "preact/hooks";
|
|
7
|
-
import {
|
|
5
|
+
import { internationalization } from "@intlayer/config/built";
|
|
8
6
|
import { setIntlayerIdentifier } from "@intlayer/config/client";
|
|
9
7
|
import { localeResolver } from "@intlayer/core/localization";
|
|
8
|
+
import { createContext } from "preact";
|
|
9
|
+
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
10
10
|
|
|
11
11
|
//#region src/client/IntlayerProvider.tsx
|
|
12
12
|
/**
|
package/dist/esm/client/t.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IntlayerClientContext } from "./IntlayerProvider.mjs";
|
|
2
|
-
import { getTranslation } from "@intlayer/core/interpreter";
|
|
3
2
|
import { useContext } from "preact/hooks";
|
|
3
|
+
import { getTranslation } from "@intlayer/core/interpreter";
|
|
4
4
|
|
|
5
5
|
//#region src/client/t.ts
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getDictionary } from "../getDictionary.mjs";
|
|
2
1
|
import { IntlayerClientContext } from "./IntlayerProvider.mjs";
|
|
2
|
+
import { getDictionary } from "../getDictionary.mjs";
|
|
3
3
|
import { useContext, useMemo } from "preact/hooks";
|
|
4
4
|
import { getDictionarySelectorCacheKey, resolveDictionaryArgument } from "@intlayer/core/dictionaryManipulator";
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IntlayerClientContext } from "./IntlayerProvider.mjs";
|
|
2
2
|
import { useDictionary } from "./useDictionary.mjs";
|
|
3
|
-
import { internationalization } from "@intlayer/config/built";
|
|
4
3
|
import { useContext, useMemo } from "preact/hooks";
|
|
4
|
+
import { internationalization } from "@intlayer/config/built";
|
|
5
5
|
|
|
6
6
|
//#region src/client/useDictionaryAsync.ts
|
|
7
7
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getDictionary } from "../getDictionary.mjs";
|
|
2
1
|
import { IntlayerClientContext } from "./IntlayerProvider.mjs";
|
|
2
|
+
import { getDictionary } from "../getDictionary.mjs";
|
|
3
3
|
import { useLoadDynamic } from "./useLoadDynamic.mjs";
|
|
4
|
-
import { internationalization } from "@intlayer/config/built";
|
|
5
4
|
import { useContext } from "preact/hooks";
|
|
5
|
+
import { internationalization } from "@intlayer/config/built";
|
|
6
6
|
import { getPreloadedDictionary, isQualifiedDynamicLoaderMap, parseDictionarySelector, resolveDictionaryArgument, resolveQualifiedDynamicContent } from "@intlayer/core/dictionaryManipulator";
|
|
7
7
|
|
|
8
8
|
//#region src/client/useDictionaryDynamic.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getIntlayer } from "../getIntlayer.mjs";
|
|
2
1
|
import { IntlayerClientContext } from "./IntlayerProvider.mjs";
|
|
2
|
+
import { getIntlayer } from "../getIntlayer.mjs";
|
|
3
3
|
import { useContext, useMemo } from "preact/hooks";
|
|
4
4
|
import { getDictionarySelectorCacheKey, resolveDictionaryArgument } from "@intlayer/core/dictionaryManipulator";
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setLocaleInStorage } from "./useLocaleStorage.mjs";
|
|
2
2
|
import { IntlayerClientContext } from "./IntlayerProvider.mjs";
|
|
3
|
-
import { internationalization } from "@intlayer/config/built";
|
|
4
3
|
import { useContext } from "preact/hooks";
|
|
4
|
+
import { internationalization } from "@intlayer/config/built";
|
|
5
5
|
|
|
6
6
|
//#region src/client/useLocale.ts
|
|
7
7
|
const { defaultLocale, locales: availableLocales } = internationalization ?? {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IntlayerClientContext } from "./IntlayerProvider.mjs";
|
|
2
|
-
import { internationalization } from "@intlayer/config/built";
|
|
3
2
|
import { useContext } from "preact/hooks";
|
|
3
|
+
import { internationalization } from "@intlayer/config/built";
|
|
4
4
|
|
|
5
5
|
//#region src/client/useLocaleBase.ts
|
|
6
6
|
const { defaultLocale, locales: availableLocales } = internationalization;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IntlayerClientContext } from "./IntlayerProvider.mjs";
|
|
2
|
-
import { getTranslation } from "@intlayer/core/interpreter";
|
|
3
2
|
import { useContext, useMemo } from "preact/hooks";
|
|
3
|
+
import { getTranslation } from "@intlayer/core/interpreter";
|
|
4
4
|
|
|
5
5
|
//#region src/client/useTraduction.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IntlayerClientContext } from "../client/IntlayerProvider.mjs";
|
|
2
|
-
import { isEnabled } from "@intlayer/editor/isEnabled";
|
|
3
2
|
import { useContext, useEffect, useRef } from "preact/hooks";
|
|
3
|
+
import { isEnabled } from "@intlayer/editor/isEnabled";
|
|
4
4
|
|
|
5
5
|
//#region src/editor/useEditor.tsx
|
|
6
6
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
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 { useIntl } from "./useIntl.mjs";
|
|
7
6
|
import { useList } from "./useList.mjs";
|
|
7
|
+
import { useNumber } from "./useNumber.mjs";
|
|
8
8
|
import { usePercentage } from "./usePercentage.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { useRelativeTime } from "./useRelativeTime.mjs";
|
|
10
10
|
|
|
11
11
|
export { useCompact, useCurrency, useDate, useIntl, useList, useNumber, usePercentage, useRelativeTime, useUnit };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useHTMLContext } from "./HTMLProvider.mjs";
|
|
2
|
-
import { getHTML } from "@intlayer/core/interpreter";
|
|
3
2
|
import { Fragment, h } from "preact";
|
|
3
|
+
import { getHTML } from "@intlayer/core/interpreter";
|
|
4
4
|
import { VOID_HTML_ELEMENTS } from "@intlayer/core/transpiler";
|
|
5
5
|
|
|
6
6
|
//#region src/html/HTMLRenderer.tsx
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { getIntlayer } from "./getIntlayer.mjs";
|
|
2
|
-
import { getDictionary } from "./getDictionary.mjs";
|
|
3
1
|
import { localeCookie, setLocaleCookie, setLocaleInStorage, useLocaleCookie, useLocaleStorage } from "./client/useLocaleStorage.mjs";
|
|
4
2
|
import { IntlayerClientContext, IntlayerProvider, IntlayerProviderContent, useIntlayerContext } from "./client/IntlayerProvider.mjs";
|
|
5
3
|
import { useAnalytics } from "./analytics/useAnalytics.mjs";
|
|
@@ -7,10 +5,12 @@ import { AnalyticsProvider } from "./analytics/AnalyticsProvider.mjs";
|
|
|
7
5
|
import { useConversion } from "./analytics/useConversion.mjs";
|
|
8
6
|
import { useExperiment } from "./analytics/useExperiment.mjs";
|
|
9
7
|
import { t } from "./client/t.mjs";
|
|
8
|
+
import { getDictionary } from "./getDictionary.mjs";
|
|
10
9
|
import { useDictionary } from "./client/useDictionary.mjs";
|
|
11
10
|
import { useDictionaryAsync } from "./client/useDictionaryAsync.mjs";
|
|
12
11
|
import { useLoadDynamic } from "./client/useLoadDynamic.mjs";
|
|
13
12
|
import { useDictionaryDynamic } from "./client/useDictionaryDynamic.mjs";
|
|
13
|
+
import { getIntlayer } from "./getIntlayer.mjs";
|
|
14
14
|
import { useIntlayer } from "./client/useIntlayer.mjs";
|
|
15
15
|
import { useLocale } from "./client/useLocale.mjs";
|
|
16
16
|
import { useLocaleBase } from "./client/useLocaleBase.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { compileMarkdown } from "./compiler.mjs";
|
|
2
|
-
import { createContext } from "preact";
|
|
3
2
|
import { useContext } from "preact/hooks";
|
|
3
|
+
import { createContext } from "preact";
|
|
4
4
|
import { jsx } from "preact/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/markdown/MarkdownProvider.tsx
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { useLocale } from "../client/useLocale.mjs";
|
|
4
4
|
import { useMarkdownContext } from "./MarkdownProvider.mjs";
|
|
5
|
-
import { getMarkdownMetadata } from "@intlayer/core/markdown";
|
|
6
5
|
import { getContentNodeByKeyPath } from "@intlayer/core/dictionaryManipulator";
|
|
6
|
+
import { getMarkdownMetadata } from "@intlayer/core/markdown";
|
|
7
7
|
|
|
8
8
|
//#region src/markdown/MarkdownRendererPlugin.tsx
|
|
9
9
|
const MarkdownRendererPlugin = (props) => {
|
package/dist/esm/plugins.mjs
CHANGED
|
@@ -3,12 +3,12 @@ import { ContentSelector } from "./editor/ContentSelector.mjs";
|
|
|
3
3
|
import { renderIntlayerNode } from "./IntlayerNode.mjs";
|
|
4
4
|
import { renderPreactElement } from "./preactElement/renderPreactElement.mjs";
|
|
5
5
|
import { editor, internationalization } from "@intlayer/config/built";
|
|
6
|
+
import { Fragment, createElement, h } from "preact";
|
|
7
|
+
import { jsx } from "preact/jsx-runtime";
|
|
6
8
|
import { conditionPlugin, enumerationPlugin, fallbackPlugin, filePlugin, genderPlugin, isInterpolableWrapperNode, nestedPlugin, pluralPlugin, selectPlugin, transformInterpolableNode, translationPlugin } from "@intlayer/core/interpreter";
|
|
7
9
|
import { getMarkdownMetadata } from "@intlayer/core/markdown";
|
|
8
10
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
9
|
-
import { Fragment, createElement, h } from "preact";
|
|
10
11
|
import { lazy } from "preact/compat";
|
|
11
|
-
import { jsx } from "preact/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) => ({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LocalesValues as LocalesValues$1 } from "../intlayer/dist/types/index.js";
|
|
1
2
|
import { useTranslation } from "./useTraduction.js";
|
|
2
3
|
import { StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
|
|
3
4
|
//#region src/client/useContent.d.ts
|
|
@@ -5,7 +6,7 @@ import { StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
|
|
|
5
6
|
* On the client side, hook to get the translation content based on the locale
|
|
6
7
|
*/
|
|
7
8
|
export declare const useContent: <Content>(languageContent: StrictModeLocaleMap<Content>) => {
|
|
8
|
-
locale:
|
|
9
|
+
locale: LocalesValues$1;
|
|
9
10
|
content: Content;
|
|
10
11
|
t: typeof useTranslation;
|
|
11
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useContent.d.ts","names":[],"sources":["../../../src/client/useContent.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useContent.d.ts","names":[],"sources":["../../../src/client/useContent.ts"],"mappings":";;;;;;;qBAOa,aAAc,SAAO,iBACf,oBAAoB;UAApB"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { Locale, LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/client/useLocaleBase.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* On the client side, hook to get the current locale and all related fields
|
|
4
5
|
*/
|
|
5
6
|
export declare const useLocaleBase: () => {
|
|
6
|
-
locale:
|
|
7
|
-
defaultLocale:
|
|
8
|
-
availableLocales:
|
|
9
|
-
setLocale: (newLocale:
|
|
7
|
+
locale: LocalesValues;
|
|
8
|
+
defaultLocale: Locale;
|
|
9
|
+
availableLocales: Locale[];
|
|
10
|
+
setLocale: (newLocale: LocalesValues) => void;
|
|
10
11
|
};
|
|
11
12
|
//#endregion
|
|
12
13
|
//# sourceMappingURL=useLocaleBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocaleBase.d.ts","names":[],"sources":["../../../src/client/useLocaleBase.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocaleBase.d.ts","names":[],"sources":["../../../src/client/useLocaleBase.ts"],"mappings":";;;;;qBASa;UAAA"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { Locale } from "../intlayer/dist/types/index.js";
|
|
1
2
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
3
|
//#region src/client/useLocaleStorage.d.ts
|
|
3
4
|
/**
|
|
4
5
|
* Get the locale cookie
|
|
5
6
|
*/
|
|
6
|
-
export declare const localeInStorage:
|
|
7
|
+
export declare const localeInStorage: Locale;
|
|
7
8
|
/**
|
|
8
9
|
* @deprecated Use localeInStorage instead
|
|
9
10
|
*
|
|
10
11
|
* Get the locale cookie
|
|
11
12
|
*/
|
|
12
|
-
export declare const localeCookie:
|
|
13
|
+
export declare const localeCookie: Locale;
|
|
13
14
|
/**
|
|
14
15
|
* Set the locale cookie
|
|
15
16
|
*/
|
|
@@ -24,7 +25,7 @@ export declare const setLocaleCookie: typeof setLocaleInStorage;
|
|
|
24
25
|
* Hook that provides the locale storage and a function to set it
|
|
25
26
|
*/
|
|
26
27
|
export declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
27
|
-
getLocale: () =>
|
|
28
|
+
getLocale: () => Locale;
|
|
28
29
|
setLocale: (locale: LocalesValues) => void;
|
|
29
30
|
};
|
|
30
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;qBAYa,iBAAA;;;;;;qBAMA,cAAA;;;;qBAKA,qBAAkB,QACrB,eAAa;;;;;;qBAaV,wBAAe;;;;qBAKf,mBAAgB;mBAAhB;sBAAA;;;;;;;;;qBAiBA,wBAAe"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useCompact.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* React client hook that provides a compact number formatter
|
|
@@ -10,7 +11,7 @@
|
|
|
10
11
|
* ```
|
|
11
12
|
*/
|
|
12
13
|
export declare const useCompact: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
13
|
-
locale?:
|
|
14
|
+
locale?: LocalesValues;
|
|
14
15
|
}) => string;
|
|
15
16
|
//#endregion
|
|
16
17
|
//# sourceMappingURL=useCompact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../src/format/useCompact.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../src/format/useCompact.ts"],"mappings":";;;;;;;;;;;;qBAca,mBAAU,wBAAA,UAAA,KAAA;WAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useCurrency.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* React client hook that provides a currency formatter
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
* ```
|
|
25
26
|
*/
|
|
26
27
|
export declare const useCurrency: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
27
|
-
locale?:
|
|
28
|
+
locale?: LocalesValues;
|
|
28
29
|
}) => string;
|
|
29
30
|
//#endregion
|
|
30
31
|
//# sourceMappingURL=useCurrency.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../src/format/useCurrency.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../src/format/useCurrency.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;qBA4Ba,oBAAW,wBAAA,UAAA,KAAA;WAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useList.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* React client hook that provides a list formatter
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
* ```
|
|
22
23
|
*/
|
|
23
24
|
export declare const useList: () => (values: (string | number)[], options?: import("@intlayer/core/formatters").ListFormatOptions & {
|
|
24
|
-
locale?:
|
|
25
|
+
locale?: LocalesValues;
|
|
25
26
|
}) => string;
|
|
26
27
|
//#endregion
|
|
27
28
|
//# sourceMappingURL=useList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../src/format/useList.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../src/format/useList.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;qBAyBa,gBAAO,6BAAA,8CAAA;WAAP"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useNumber.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* React client hook that provides a localized number formatter.
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
* A number formatting function bound to the active locale.
|
|
23
24
|
*/
|
|
24
25
|
export declare const useNumber: () => (value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
25
|
-
locale?:
|
|
26
|
+
locale?: LocalesValues;
|
|
26
27
|
}) => string;
|
|
27
28
|
//#endregion
|
|
28
29
|
//# sourceMappingURL=useNumber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../src/format/useNumber.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../src/format/useNumber.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;qBA0Ba,kBAAS,wBAAA,SAAA,KAAA;WAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/usePercentage.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* React hook to provide a percentage formatter function
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
* A function that formats numbers or numeric strings into localized percentages.
|
|
19
20
|
*/
|
|
20
21
|
export declare const usePercentage: () => (value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
21
|
-
locale?:
|
|
22
|
+
locale?: LocalesValues;
|
|
22
23
|
}) => string;
|
|
23
24
|
//#endregion
|
|
24
25
|
//# sourceMappingURL=usePercentage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../src/format/usePercentage.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../src/format/usePercentage.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;qBAsBa,sBAAa,wBAAA,SAAA,KAAA;WAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useRelativeTime.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* Client-side React hook for accessing a localized relative time formatter.
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
* bound to the current client locale.
|
|
19
20
|
*/
|
|
20
21
|
export declare const useRelativeTime: () => (from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
|
|
21
|
-
locale?:
|
|
22
|
+
locale?: LocalesValues;
|
|
22
23
|
unit?: Intl.RelativeTimeFormatUnit;
|
|
23
24
|
}) => string;
|
|
24
25
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;qBAsBa,wBAAe,wBAAA,MAAA,uBAAA,MAAA,UAAA,KAAA;WAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useUnit.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* React hook that provides a unit formatting function
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
* @returns {Function} A unit formatting function that accepts a value and optional formatting options.
|
|
18
19
|
*/
|
|
19
20
|
export declare const useUnit: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
20
|
-
locale?:
|
|
21
|
+
locale?: LocalesValues;
|
|
21
22
|
}) => string;
|
|
22
23
|
//#endregion
|
|
23
24
|
//# sourceMappingURL=useUnit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../src/format/useUnit.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../src/format/useUnit.ts"],"mappings":";;;;;;;;;;;;;;;;;;;qBAqBa,gBAAO,wBAAA,UAAA,KAAA;WAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "@intlayer/core/interpreter";
|
|
2
|
+
import { DeclaredLocales, LocalesValues as LocalesValues$1 } from "@intlayer/types/module_augmentation";
|
|
3
|
+
import { Locale as Locale$1 } from "@intlayer/types/allLocales";
|
|
4
|
+
import "@intlayer/core/transpiler";
|
|
5
|
+
import { Dictionary } from "@intlayer/types/dictionary";
|
|
6
|
+
import "@intlayer/types/config";
|
|
7
|
+
import "@intlayer/types/locales";
|
|
8
|
+
import "@intlayer/config/built";
|
|
9
|
+
import "@intlayer/core/file";
|
|
10
|
+
import "@intlayer/core/formatters";
|
|
11
|
+
import "@intlayer/core/localization";
|
|
12
|
+
import "@intlayer/core/markdown";
|
|
13
|
+
import "@intlayer/core/utils";
|
|
14
|
+
export type { Locale$1 as Locale, LocalesValues$1 as LocalesValues };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "preact-intlayer",
|
|
3
|
-
"version": "9.5.
|
|
3
|
+
"version": "9.5.4-canary.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Preact applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -94,18 +94,19 @@
|
|
|
94
94
|
"prepublish": "cp -f ../../README.md ./README.md",
|
|
95
95
|
"publish": "bun publish || true",
|
|
96
96
|
"publish:canary": "bun publish --access public --tag canary || true",
|
|
97
|
+
"publish:ci": "bun ../../scripts/publish-package.mjs",
|
|
97
98
|
"publish:latest": "bun publish --access public --tag latest || true",
|
|
98
99
|
"test": "bun --bun vitest run",
|
|
99
100
|
"test:watch": "bun --bun vitest",
|
|
100
101
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
101
102
|
},
|
|
102
103
|
"dependencies": {
|
|
103
|
-
"@intlayer/api": "9.5.
|
|
104
|
-
"@intlayer/config": "9.5.
|
|
105
|
-
"@intlayer/core": "9.5.
|
|
106
|
-
"@intlayer/editor": "9.5.
|
|
107
|
-
"@intlayer/engine": "9.5.
|
|
108
|
-
"@intlayer/types": "9.5.
|
|
104
|
+
"@intlayer/api": "9.5.4-canary.0",
|
|
105
|
+
"@intlayer/config": "9.5.4-canary.0",
|
|
106
|
+
"@intlayer/core": "9.5.4-canary.0",
|
|
107
|
+
"@intlayer/editor": "9.5.4-canary.0",
|
|
108
|
+
"@intlayer/engine": "9.5.4-canary.0",
|
|
109
|
+
"@intlayer/types": "9.5.4-canary.0"
|
|
109
110
|
},
|
|
110
111
|
"devDependencies": {
|
|
111
112
|
"@types/node": "^22",
|
|
@@ -116,13 +117,13 @@
|
|
|
116
117
|
"rimraf": "6.1.3",
|
|
117
118
|
"tsdown": "0.23.0",
|
|
118
119
|
"typescript": "7.0.2",
|
|
119
|
-
"vitest": "5.0.
|
|
120
|
+
"vitest": "5.0.1"
|
|
120
121
|
},
|
|
121
122
|
"peerDependencies": {
|
|
122
123
|
"preact": ">=8.0.0"
|
|
123
124
|
},
|
|
124
125
|
"optionalDependencies": {
|
|
125
|
-
"@intlayer/analytics": "9.5.
|
|
126
|
+
"@intlayer/analytics": "9.5.4-canary.0"
|
|
126
127
|
},
|
|
127
128
|
"engines": {
|
|
128
129
|
"node": ">=14.18"
|