angular-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 +1 -1
- package/dist/cjs/client/useDictionary.cjs +1 -1
- package/dist/cjs/client/useDictionaryDynamic.cjs +1 -1
- package/dist/cjs/client/useIntlayer.cjs +1 -1
- package/dist/cjs/editor/EditorProvider.component.cjs +1 -1
- package/dist/cjs/editor/index.cjs +1 -1
- package/dist/cjs/esbuild/plugin.cjs +4 -4
- package/dist/cjs/format/index.cjs +3 -3
- package/dist/cjs/index.cjs +3 -3
- package/dist/cjs/plugins.cjs +2 -2
- package/dist/esm/analytics/useAnalytics.mjs +1 -1
- package/dist/esm/client/useDictionary.mjs +1 -1
- package/dist/esm/client/useDictionaryDynamic.mjs +1 -1
- package/dist/esm/client/useIntlayer.mjs +1 -1
- package/dist/esm/editor/EditorProvider.component.mjs +1 -1
- package/dist/esm/editor/index.mjs +1 -1
- package/dist/esm/esbuild/plugin.mjs +4 -4
- package/dist/esm/format/index.mjs +3 -3
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/plugins.mjs +2 -2
- package/dist/types/client/useLocaleStorage.d.ts +5 -4
- 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/useDate.d.ts +2 -1
- package/dist/types/format/useDate.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 +11 -10
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,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_analytics_exposureSink = require('./exposureSink.cjs');
|
|
3
2
|
const require_client_intlayerToken = require('../client/intlayerToken.cjs');
|
|
3
|
+
const require_analytics_exposureSink = require('./exposureSink.cjs');
|
|
4
4
|
let _angular_core = require("@angular/core");
|
|
5
5
|
let _intlayer_analytics_isEnabled = require("@intlayer/analytics/isEnabled");
|
|
6
6
|
|
|
@@ -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_intlayerToken = require('./intlayerToken.cjs');
|
|
3
|
+
const require_getDictionary = require('../getDictionary.cjs');
|
|
4
4
|
let _angular_core = require("@angular/core");
|
|
5
5
|
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
6
6
|
|
|
@@ -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_intlayerToken = require('./intlayerToken.cjs');
|
|
5
|
+
const require_getDictionary = require('../getDictionary.cjs');
|
|
6
6
|
const require_client_useDictionary = require('./useDictionary.cjs');
|
|
7
7
|
const require_client_useLoadDynamic = require('./useLoadDynamic.cjs');
|
|
8
8
|
let _angular_core = require("@angular/core");
|
|
@@ -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_intlayerToken = require('./intlayerToken.cjs');
|
|
3
|
+
const require_getIntlayer = require('../getIntlayer.cjs');
|
|
4
4
|
let _angular_core = require("@angular/core");
|
|
5
5
|
let _intlayer_core_dictionaryManipulator = require("@intlayer/core/dictionaryManipulator");
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_editor_useEditor = require('./useEditor.cjs');
|
|
2
3
|
const require_decorateMetadata = require('../_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorateMetadata.cjs');
|
|
3
4
|
const require_decorate = require('../_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorate.cjs');
|
|
4
|
-
const require_editor_useEditor = require('./useEditor.cjs');
|
|
5
5
|
let _angular_core = require("@angular/core");
|
|
6
6
|
|
|
7
7
|
//#region src/editor/EditorProvider.component.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_editor_ContentSelector_component = require('./ContentSelector.component.cjs');
|
|
3
2
|
const require_editor_useEditor = require('./useEditor.cjs');
|
|
3
|
+
const require_editor_ContentSelector_component = require('./ContentSelector.component.cjs');
|
|
4
4
|
const require_editor_EditorProvider_component = require('./EditorProvider.component.cjs');
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, 'ContentSelectorWrapperComponent', {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_esbuild_resolvePackageExport = require('./resolvePackageExport.cjs');
|
|
3
2
|
const require_esbuild_hiddenDirectory = require('./hiddenDirectory.cjs');
|
|
3
|
+
const require_esbuild_resolvePackageExport = require('./resolvePackageExport.cjs');
|
|
4
|
+
let node_fs_promises = require("node:fs/promises");
|
|
4
5
|
let node_module = require("node:module");
|
|
5
6
|
let node_path = require("node:path");
|
|
6
|
-
let _intlayer_config_node = require("@intlayer/config/node");
|
|
7
|
-
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
|
-
let node_fs_promises = require("node:fs/promises");
|
|
9
7
|
let _intlayer_config_dictionaryPreload = require("@intlayer/config/dictionaryPreload");
|
|
10
8
|
let _intlayer_config_envVars = require("@intlayer/config/envVars");
|
|
11
9
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
10
|
+
let _intlayer_config_node = require("@intlayer/config/node");
|
|
11
|
+
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
12
12
|
let _intlayer_dictionaries_entry = require("@intlayer/dictionaries-entry");
|
|
13
13
|
let _intlayer_engine_build = require("@intlayer/engine/build");
|
|
14
14
|
let _intlayer_engine_cli = require("@intlayer/engine/cli");
|
|
@@ -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;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_plugins = require('./plugins.cjs');
|
|
3
|
-
const require_getIntlayer = require('./getIntlayer.cjs');
|
|
4
|
-
const require_getDictionary = require('./getDictionary.cjs');
|
|
5
2
|
const require_client_intlayerToken = require('./client/intlayerToken.cjs');
|
|
6
3
|
const require_analytics_useAnalytics = require('./analytics/useAnalytics.cjs');
|
|
7
4
|
const require_analytics_useConversion = require('./analytics/useConversion.cjs');
|
|
8
5
|
const require_analytics_useExperiment = require('./analytics/useExperiment.cjs');
|
|
9
6
|
const require_client_installIntlayer = require('./client/installIntlayer.cjs');
|
|
7
|
+
const require_plugins = require('./plugins.cjs');
|
|
8
|
+
const require_getDictionary = require('./getDictionary.cjs');
|
|
10
9
|
const require_client_useDictionary = require('./client/useDictionary.cjs');
|
|
11
10
|
const require_client_useDictionaryAsync = require('./client/useDictionaryAsync.cjs');
|
|
12
11
|
const require_client_useLoadDynamic = require('./client/useLoadDynamic.cjs');
|
|
13
12
|
const require_client_useDictionaryDynamic = require('./client/useDictionaryDynamic.cjs');
|
|
13
|
+
const require_getIntlayer = require('./getIntlayer.cjs');
|
|
14
14
|
const require_client_useIntlayer = require('./client/useIntlayer.cjs');
|
|
15
15
|
const require_client_useLocale = require('./client/useLocale.cjs');
|
|
16
16
|
const require_client_usePathname = require('./client/usePathname.cjs');
|
package/dist/cjs/plugins.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
const require_renderIntlayerNode = require('./renderIntlayerNode.cjs');
|
|
4
3
|
const require_analytics_exposureSink = require('./analytics/exposureSink.cjs');
|
|
5
4
|
const require_editor_ContentSelector_component = require('./editor/ContentSelector.component.cjs');
|
|
6
|
-
|
|
5
|
+
const require_renderIntlayerNode = require('./renderIntlayerNode.cjs');
|
|
7
6
|
let _angular_core = require("@angular/core");
|
|
8
7
|
let _intlayer_config_built = require("@intlayer/config/built");
|
|
8
|
+
let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
|
|
9
9
|
let _intlayer_core_markdown = require("@intlayer/core/markdown");
|
|
10
10
|
let _intlayer_types_nodeType = require("@intlayer/types/nodeType");
|
|
11
11
|
_intlayer_types_nodeType = require_runtime.__toESM(_intlayer_types_nodeType);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { setExposureSink } from "./exposureSink.mjs";
|
|
2
1
|
import { INTLAYER_TOKEN } from "../client/intlayerToken.mjs";
|
|
2
|
+
import { setExposureSink } from "./exposureSink.mjs";
|
|
3
3
|
import { DestroyRef, Injector, effect, inject, provideAppInitializer, runInInjectionContext, signal } from "@angular/core";
|
|
4
4
|
import { isEnabled } from "@intlayer/analytics/isEnabled";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getDictionary } from "../getDictionary.mjs";
|
|
2
1
|
import { INTLAYER_TOKEN } from "./intlayerToken.mjs";
|
|
2
|
+
import { getDictionary } from "../getDictionary.mjs";
|
|
3
3
|
import { computed, inject } from "@angular/core";
|
|
4
4
|
import { resolveDictionaryArgument } from "@intlayer/core/dictionaryManipulator";
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { getDictionary } from "../getDictionary.mjs";
|
|
4
3
|
import { INTLAYER_TOKEN } from "./intlayerToken.mjs";
|
|
4
|
+
import { getDictionary } from "../getDictionary.mjs";
|
|
5
5
|
import { useDictionary } from "./useDictionary.mjs";
|
|
6
6
|
import { useLoadDynamic } from "./useLoadDynamic.mjs";
|
|
7
7
|
import { computed, inject, signal } from "@angular/core";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getIntlayer } from "../getIntlayer.mjs";
|
|
2
1
|
import { INTLAYER_TOKEN } from "./intlayerToken.mjs";
|
|
2
|
+
import { getIntlayer } from "../getIntlayer.mjs";
|
|
3
3
|
import { computed, inject } from "@angular/core";
|
|
4
4
|
import { resolveDictionaryArgument } from "@intlayer/core/dictionaryManipulator";
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { useEditor } from "./useEditor.mjs";
|
|
1
2
|
import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorateMetadata.mjs";
|
|
2
3
|
import __decorate from "../_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/decorate.mjs";
|
|
3
|
-
import { useEditor } from "./useEditor.mjs";
|
|
4
4
|
import { Component } from "@angular/core";
|
|
5
5
|
|
|
6
6
|
//#region src/editor/EditorProvider.component.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ContentSelectorWrapperComponent } from "./ContentSelector.component.mjs";
|
|
2
1
|
import { provideIntlayerEditor, useEditor } from "./useEditor.mjs";
|
|
2
|
+
import { ContentSelectorWrapperComponent } from "./ContentSelector.component.mjs";
|
|
3
3
|
import { EditorProviderComponent } from "./EditorProvider.component.mjs";
|
|
4
4
|
|
|
5
5
|
export { ContentSelectorWrapperComponent, EditorProviderComponent, provideIntlayerEditor, useEditor };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { resolvePackageExport } from "./resolvePackageExport.mjs";
|
|
2
1
|
import { isInHiddenDirectory } from "./hiddenDirectory.mjs";
|
|
2
|
+
import { resolvePackageExport } from "./resolvePackageExport.mjs";
|
|
3
|
+
import { readFile } from "node:fs/promises";
|
|
3
4
|
import { createRequire } from "node:module";
|
|
4
5
|
import { basename, dirname, join, relative } from "node:path";
|
|
5
|
-
import { getConfiguration } from "@intlayer/config/node";
|
|
6
|
-
import { getAlias, getHasDictionarySelector, getUnusedNodeTypesAsync, normalizePath } from "@intlayer/config/utils";
|
|
7
|
-
import { readFile } from "node:fs/promises";
|
|
8
6
|
import { addDynamicEntryPreload, createDynamicEntryFilter, resolvePreloadModuleId } from "@intlayer/config/dictionaryPreload";
|
|
9
7
|
import { formatDictionarySelectorEnvVar, formatNodeTypeToEnvVar, getConfigEnvVars } from "@intlayer/config/envVars";
|
|
10
8
|
import { getAppLogger } from "@intlayer/config/logger";
|
|
9
|
+
import { getConfiguration } from "@intlayer/config/node";
|
|
10
|
+
import { getAlias, getHasDictionarySelector, getUnusedNodeTypesAsync, normalizePath } from "@intlayer/config/utils";
|
|
11
11
|
import { getDictionaries } from "@intlayer/dictionaries-entry";
|
|
12
12
|
import { prepareIntlayer } from "@intlayer/engine/build";
|
|
13
13
|
import { logConfigDetails } from "@intlayer/engine/cli";
|
|
@@ -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 };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { getPlugins, htmlPlugin, insertionPlugin, intlayerNodePlugins, markdownPlugin, markdownStringPlugin } from "./plugins.mjs";
|
|
2
|
-
import { getIntlayer } from "./getIntlayer.mjs";
|
|
3
|
-
import { getDictionary } from "./getDictionary.mjs";
|
|
4
1
|
import { INTLAYER_TOKEN, IntlayerProvider, createIntlayerClient } from "./client/intlayerToken.mjs";
|
|
5
2
|
import { provideIntlayerAnalytics, useAnalytics } from "./analytics/useAnalytics.mjs";
|
|
6
3
|
import { useConversion } from "./analytics/useConversion.mjs";
|
|
7
4
|
import { useExperiment } from "./analytics/useExperiment.mjs";
|
|
8
5
|
import { installIntlayer, provideIntlayer } from "./client/installIntlayer.mjs";
|
|
6
|
+
import { getPlugins, htmlPlugin, insertionPlugin, intlayerNodePlugins, markdownPlugin, markdownStringPlugin } from "./plugins.mjs";
|
|
7
|
+
import { getDictionary } from "./getDictionary.mjs";
|
|
9
8
|
import { useDictionary } from "./client/useDictionary.mjs";
|
|
10
9
|
import { useDictionaryAsync } from "./client/useDictionaryAsync.mjs";
|
|
11
10
|
import { useLoadDynamic } from "./client/useLoadDynamic.mjs";
|
|
12
11
|
import { useDictionaryDynamic } from "./client/useDictionaryDynamic.mjs";
|
|
12
|
+
import { getIntlayer } from "./getIntlayer.mjs";
|
|
13
13
|
import { isUpdatableNode, useIntlayer } from "./client/useIntlayer.mjs";
|
|
14
14
|
import { useLocale } from "./client/useLocale.mjs";
|
|
15
15
|
import { usePathname } from "./client/usePathname.mjs";
|
package/dist/esm/plugins.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { renderIntlayerNode } from "./renderIntlayerNode.mjs";
|
|
2
1
|
import { reportExposure } from "./analytics/exposureSink.mjs";
|
|
3
2
|
import { ContentSelectorWrapperComponent } from "./editor/ContentSelector.component.mjs";
|
|
4
|
-
import {
|
|
3
|
+
import { renderIntlayerNode } from "./renderIntlayerNode.mjs";
|
|
5
4
|
import { signal, untracked } from "@angular/core";
|
|
6
5
|
import { editor, internationalization } from "@intlayer/config/built";
|
|
6
|
+
import { conditionPlugin, enumerationPlugin, fallbackPlugin, filePlugin, genderPlugin, isInterpolableWrapperNode, nestedPlugin, pluralPlugin, selectPlugin, transformInterpolableNode, translationPlugin } from "@intlayer/core/interpreter";
|
|
7
7
|
import { compile, getMarkdownMetadata } from "@intlayer/core/markdown";
|
|
8
8
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
9
9
|
|
|
@@ -1,3 +1,4 @@
|
|
|
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
|
/**
|
|
@@ -6,13 +7,13 @@ import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
|
6
7
|
/**
|
|
7
8
|
* Get the locale cookie
|
|
8
9
|
*/
|
|
9
|
-
export declare const localeInStorage:
|
|
10
|
+
export declare const localeInStorage: Locale;
|
|
10
11
|
/**
|
|
11
12
|
* @deprecated Use localeInStorage instead
|
|
12
13
|
*
|
|
13
14
|
* Get the locale cookie
|
|
14
15
|
*/
|
|
15
|
-
export declare const localeCookie:
|
|
16
|
+
export declare const localeCookie: Locale;
|
|
16
17
|
/**
|
|
17
18
|
* Set the locale cookie
|
|
18
19
|
*/
|
|
@@ -27,7 +28,7 @@ export declare const setLocaleCookie: typeof setLocaleInStorage;
|
|
|
27
28
|
* Hook that provides the locale storage and a function to set it
|
|
28
29
|
*/
|
|
29
30
|
export declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
30
|
-
getLocale: () =>
|
|
31
|
+
getLocale: () => Locale;
|
|
31
32
|
setLocale: (locale: LocalesValues) => void;
|
|
32
33
|
};
|
|
33
34
|
/**
|
|
@@ -38,7 +39,7 @@ export declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
|
38
39
|
* Hook that provides the locale cookie and a function to set it
|
|
39
40
|
*/
|
|
40
41
|
export declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
|
|
41
|
-
localeCookie:
|
|
42
|
+
localeCookie: Locale;
|
|
42
43
|
setLocaleCookie: (locale: LocalesValues) => void;
|
|
43
44
|
};
|
|
44
45
|
//#endregion
|
|
@@ -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":";;;;;;;;;qBAca,iBAAA;;;;;;qBAMA,cAAA;;;;qBAKA,qBAAkB,QACrB,eAAa;;;;;;qBAaV,wBAAe;;;;qBAKf,mBAAgB;mBAAhB;sBAAA;;;;;;;;;qBAaA,kBAAe;EAIxB,cAJS;EAKT,kBAAe,QAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useCompact.d.ts
|
|
2
3
|
export declare const useCompact: () => import("@angular/core").Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
3
|
-
locale?:
|
|
4
|
+
locale?: LocalesValues;
|
|
4
5
|
}) => string>;
|
|
5
6
|
//#endregion
|
|
6
7
|
//# 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":";;qBAIa,0CAAU,QAAA,wBAAA,UAAA,KAAA;WAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useCurrency.d.ts
|
|
2
3
|
export declare const useCurrency: () => import("@angular/core").Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
3
|
-
locale?:
|
|
4
|
+
locale?: LocalesValues;
|
|
4
5
|
}) => string>;
|
|
5
6
|
//#endregion
|
|
6
7
|
//# 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":";;qBAIa,2CAAW,QAAA,wBAAA,UAAA,KAAA;WAAA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useDate.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* Angular client hook that provides a localized date/time formatter.
|
|
4
5
|
*/
|
|
5
6
|
export declare const useDate: () => import("@angular/core").Signal<(date: string | number | Date, options?: import("@intlayer/core/formatters").DateTimePreset | (Intl.DateTimeFormatOptions & {
|
|
6
|
-
locale?:
|
|
7
|
+
locale?: LocalesValues;
|
|
7
8
|
})) => string>;
|
|
8
9
|
//#endregion
|
|
9
10
|
//# sourceMappingURL=useDate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../src/format/useDate.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../src/format/useDate.ts"],"mappings":";;;;;qBAOa,uCAAO,QAAA,wBAAA,MAAA,8CAAA,kBAAA,KAAA;WAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useList.d.ts
|
|
2
3
|
export declare const useList: () => import("@angular/core").Signal<(values: (string | number)[], options?: import("@intlayer/core/formatters").ListFormatOptions & {
|
|
3
|
-
locale?:
|
|
4
|
+
locale?: LocalesValues;
|
|
4
5
|
}) => string>;
|
|
5
6
|
//#endregion
|
|
6
7
|
//# 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":";;qBAIa,uCAAO,QAAA,6BAAA,8CAAA;WAAP"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useNumber.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* Angular client hook that provides a localized number formatter.
|
|
4
5
|
*/
|
|
5
6
|
export declare const useNumber: () => import("@angular/core").Signal<(value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
6
|
-
locale?:
|
|
7
|
+
locale?: LocalesValues;
|
|
7
8
|
}) => string>;
|
|
8
9
|
//#endregion
|
|
9
10
|
//# 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":";;;;;qBAOa,yCAAS,QAAA,wBAAA,SAAA,KAAA;WAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/usePercentage.d.ts
|
|
2
3
|
export declare const usePercentage: () => import("@angular/core").Signal<(value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
3
|
-
locale?:
|
|
4
|
+
locale?: LocalesValues;
|
|
4
5
|
}) => string>;
|
|
5
6
|
//#endregion
|
|
6
7
|
//# 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":";;qBAIa,6CAAa,QAAA,wBAAA,SAAA,KAAA;WAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useRelativeTime.d.ts
|
|
2
3
|
export declare const useRelativeTime: () => import("@angular/core").Signal<(from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
|
|
3
|
-
locale?:
|
|
4
|
+
locale?: LocalesValues;
|
|
4
5
|
unit?: Intl.RelativeTimeFormatUnit;
|
|
5
6
|
}) => string>;
|
|
6
7
|
//#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":";;qBAIa,+CAAe,QAAA,wBAAA,MAAA,uBAAA,MAAA,UAAA,KAAA;WAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useUnit.d.ts
|
|
2
3
|
export declare const useUnit: () => import("@angular/core").Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
3
|
-
locale?:
|
|
4
|
+
locale?: LocalesValues;
|
|
4
5
|
}) => string>;
|
|
5
6
|
//#endregion
|
|
6
7
|
//# 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":";;qBAIa,uCAAO,QAAA,wBAAA,UAAA,KAAA;WAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DeclaredLocales, LocalesValues as LocalesValues$1 } from "@intlayer/types/module_augmentation";
|
|
2
|
+
import { Dictionary } from "@intlayer/types/dictionary";
|
|
3
|
+
import "@intlayer/core/interpreter";
|
|
4
|
+
import "@intlayer/types/config";
|
|
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-intlayer",
|
|
3
|
-
"version": "9.5.
|
|
3
|
+
"version": "9.5.4-canary.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Angular applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -110,6 +110,7 @@
|
|
|
110
110
|
"prepublish": "cp -f ../../README.md ./README.md",
|
|
111
111
|
"publish": "bun publish || true",
|
|
112
112
|
"publish:canary": "bun publish --access public --tag canary || true",
|
|
113
|
+
"publish:ci": "bun ../../scripts/publish-package.mjs",
|
|
113
114
|
"publish:latest": "bun publish --access public --tag latest || true",
|
|
114
115
|
"test": "bun --bun vitest run",
|
|
115
116
|
"test:watch": "bun --bun vitest",
|
|
@@ -119,13 +120,13 @@
|
|
|
119
120
|
"@babel/core": "^8.0.1",
|
|
120
121
|
"@babel/plugin-syntax-import-attributes": "7.29.7",
|
|
121
122
|
"@babel/preset-env": "8.0.2",
|
|
122
|
-
"@intlayer/config": "9.5.
|
|
123
|
-
"@intlayer/core": "9.5.
|
|
124
|
-
"@intlayer/dictionaries-entry": "9.5.
|
|
125
|
-
"@intlayer/editor": "9.5.
|
|
126
|
-
"@intlayer/engine": "9.5.
|
|
127
|
-
"@intlayer/types": "9.5.
|
|
128
|
-
"@intlayer/webpack": "9.5.
|
|
123
|
+
"@intlayer/config": "9.5.4-canary.0",
|
|
124
|
+
"@intlayer/core": "9.5.4-canary.0",
|
|
125
|
+
"@intlayer/dictionaries-entry": "9.5.4-canary.0",
|
|
126
|
+
"@intlayer/editor": "9.5.4-canary.0",
|
|
127
|
+
"@intlayer/engine": "9.5.4-canary.0",
|
|
128
|
+
"@intlayer/types": "9.5.4-canary.0",
|
|
129
|
+
"@intlayer/webpack": "9.5.4-canary.0",
|
|
129
130
|
"babel-loader": "10.1.1",
|
|
130
131
|
"defu": "6.1.7"
|
|
131
132
|
},
|
|
@@ -141,7 +142,7 @@
|
|
|
141
142
|
"rimraf": "6.1.3",
|
|
142
143
|
"tsdown": "0.23.0",
|
|
143
144
|
"typescript": "7.0.2",
|
|
144
|
-
"vitest": "5.0.
|
|
145
|
+
"vitest": "5.0.1"
|
|
145
146
|
},
|
|
146
147
|
"peerDependencies": {
|
|
147
148
|
"@angular/common": ">=15",
|
|
@@ -155,7 +156,7 @@
|
|
|
155
156
|
}
|
|
156
157
|
},
|
|
157
158
|
"optionalDependencies": {
|
|
158
|
-
"@intlayer/analytics": "9.5.
|
|
159
|
+
"@intlayer/analytics": "9.5.4-canary.0"
|
|
159
160
|
},
|
|
160
161
|
"engines": {
|
|
161
162
|
"node": ">=14.18"
|