preact-intlayer 8.9.8 → 8.10.0-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -67,6 +67,7 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
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
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) |
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) |
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) |
70
71
 
71
72
  ---
72
73
 
@@ -249,6 +250,19 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
249
250
  </ul>
250
251
  </details>
251
252
 
253
+ ## Multilingual content management system
254
+
255
+ More than an i18n library, Intlayer is a complete **multilingual content management system**. A full CMS is available for free at [app.intlayer.org](https://app.intlayer.org).
256
+
257
+ Intlayer connects **developers**, **copywriters**, and **AI agents** in one workflow for creating and maintaining multilingual websites effortlessly.Intlayer replaces the following stack in a single solution:
258
+
259
+ - i18n solutions (e.g. `i18next`, `next-intl`, `vue-i18n`)
260
+ - TMSs (Translation Management Systems) (e.g. Crowdin, Phrase, Lokalise)
261
+ - Feature flags
262
+ - Headless CMSs (e.g. Contentful, Strapi, Sanity)
263
+
264
+ ![CMS Preview](https://github.com/aymericzip/intlayer/blob/main/docs/assets/CMS.png?raw=true)
265
+
252
266
  ## 🌐 Readme in other languages
253
267
 
254
268
  <p align="center">
@@ -3,6 +3,7 @@ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  const require_html_HTMLProvider = require('./HTMLProvider.cjs');
4
4
  let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
5
5
  let preact = require("preact");
6
+ let _intlayer_core_transpiler = require("@intlayer/core/transpiler");
6
7
 
7
8
  //#region src/html/HTMLRenderer.tsx
8
9
  /**
@@ -15,7 +16,10 @@ const renderHTML = (content, { components = {} } = {}) => {
15
16
  const userComponents = Object.fromEntries(Object.entries(components).filter(([, Component]) => Component).map(([key, Component]) => [key, (props) => (0, preact.h)(Component, props)]));
16
17
  return (0, preact.h)(preact.Fragment, null, (0, _intlayer_core_interpreter.getHTML)(content, new Proxy(userComponents, { get(target, prop) {
17
18
  if (typeof prop === "string" && prop in target) return target[prop];
18
- if (typeof prop === "string" && /^[a-z][a-z0-9]*$/.test(prop)) return (props) => (0, preact.h)(prop, props);
19
+ if (typeof prop === "string" && /^[a-z][a-z0-9]*$/.test(prop)) {
20
+ if (_intlayer_core_transpiler.VOID_HTML_ELEMENTS.has(prop)) return ({ children: _children, ...rest }) => (0, preact.h)(prop, rest);
21
+ return (props) => (0, preact.h)(prop, props);
22
+ }
19
23
  } })));
20
24
  };
21
25
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"HTMLRenderer.cjs","names":["Fragment","useHTMLContext"],"sources":["../../../src/html/HTMLRenderer.tsx"],"sourcesContent":["import { getHTML } from '@intlayer/core/interpreter';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport { Fragment, type FunctionComponent, h, type JSX } from 'preact';\nimport { useHTMLContext } from './HTMLProvider';\nimport type { HTMLComponents } from './types';\n\nexport type RenderHTMLProps = {\n /**\n * Component overrides for HTML tags.\n * Allows you to customize how specific HTML elements are rendered.\n */\n components?: HTMLComponents<'permissive', {}>;\n};\n\n/**\n * Renders HTML-like content to JSX with the provided components.\n *\n * This function does not use context from HTMLProvider. Use `useHTMLRenderer`\n * hook if you want to leverage provider context.\n */\nexport const renderHTML = (\n content: string,\n { components = {} }: RenderHTMLProps = {}\n): JSX.Element => {\n // Wrap explicit user components to ensure they are rendered via Preact's h\n const userComponents = Object.fromEntries(\n Object.entries(components)\n .filter(([, Component]) => Component)\n .map(([key, Component]) => [\n key,\n (props: any) => h(Component as any, props),\n ])\n );\n\n // Proxy handles standard HTML tags lazily without a hardcoded list\n const wrappedComponents = new Proxy(userComponents, {\n get(target, prop) {\n if (typeof prop === 'string' && prop in target) {\n return target[prop];\n }\n // Fallback: Lazily generate a wrapper for standard lowercase HTML tags\n if (typeof prop === 'string' && /^[a-z][a-z0-9]*$/.test(prop)) {\n return (props: any) => h(prop, props);\n }\n return undefined;\n },\n });\n\n // Cast wrappedComponents to any to satisfy getHTML's dictionary typing\n return h(Fragment, null, getHTML(content, wrappedComponents as any));\n};\n\n/**\n * Hook that returns a function to render HTML content.\n *\n * This hook considers the configuration from the `HTMLProvider` context if available,\n * falling back to the provided components.\n */\nexport const useHTMLRenderer = ({ components }: RenderHTMLProps = {}) => {\n const context = useHTMLContext();\n\n return (content: string) => {\n return renderHTML(content, {\n components: {\n ...context?.components,\n ...components,\n },\n });\n };\n};\n\nexport type HTMLRendererProps = RenderHTMLProps & {\n /**\n * The HTML content to render as a string.\n */\n children?: string;\n /**\n * Alias for children, used by the plugin.\n */\n html?: string;\n /**\n * Alias for components, used by the plugin.\n */\n components?: HTMLComponents<'permissive', {}>;\n dictionaryKey?: string;\n keyPath?: KeyPath[];\n};\n\n/**\n * Preact component that renders HTML-like content to JSX.\n */\nexport const HTMLRenderer: FunctionComponent<HTMLRendererProps> = ({\n children = '',\n html,\n components,\n}) => {\n const render = useHTMLRenderer({ components });\n const content = children || html || '';\n\n return render(content);\n};\n"],"mappings":";;;;;;;;;;;;;AAoBA,MAAa,cACX,SACA,EAAE,aAAa,CAAC,MAAuB,CAAC,MACxB;CAEhB,MAAM,iBAAiB,OAAO,YAC5B,OAAO,QAAQ,UAAU,EACtB,QAAQ,GAAG,eAAe,SAAS,EACnC,KAAK,CAAC,KAAK,eAAe,CACzB,MACC,wBAAiB,WAAkB,KAAK,CAC3C,CAAC,CACL;CAiBA,qBAASA,iBAAU,8CAAc,SAAS,IAdZ,MAAM,gBAAgB,EAClD,IAAI,QAAQ,MAAM;EAChB,IAAI,OAAO,SAAS,YAAY,QAAQ,QACtC,OAAO,OAAO;EAGhB,IAAI,OAAO,SAAS,YAAY,mBAAmB,KAAK,IAAI,GAC1D,QAAQ,wBAAiB,MAAM,KAAK;CAGxC,EACF,CAG0D,CAAQ,CAAC;AACrE;;;;;;;AAQA,MAAa,mBAAmB,EAAE,eAAgC,CAAC,MAAM;CACvE,MAAM,UAAUC,yCAAe;CAE/B,QAAQ,YAAoB;EAC1B,OAAO,WAAW,SAAS,EACzB,YAAY;GACV,GAAG,SAAS;GACZ,GAAG;EACL,EACF,CAAC;CACH;AACF;;;;AAsBA,MAAa,gBAAsD,EACjE,WAAW,IACX,MACA,iBACI;CAIJ,OAHe,gBAAgB,EAAE,WAAW,CAGhC,EAFI,YAAY,QAAQ,EAEf;AACvB"}
1
+ {"version":3,"file":"HTMLRenderer.cjs","names":["Fragment","VOID_HTML_ELEMENTS","useHTMLContext"],"sources":["../../../src/html/HTMLRenderer.tsx"],"sourcesContent":["import { getHTML } from '@intlayer/core/interpreter';\nimport { VOID_HTML_ELEMENTS } from '@intlayer/core/transpiler';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport { Fragment, type FunctionComponent, h, type JSX } from 'preact';\nimport { useHTMLContext } from './HTMLProvider';\nimport type { HTMLComponents } from './types';\n\nexport type RenderHTMLProps = {\n /**\n * Component overrides for HTML tags.\n * Allows you to customize how specific HTML elements are rendered.\n */\n components?: HTMLComponents<'permissive', {}>;\n};\n\n/**\n * Renders HTML-like content to JSX with the provided components.\n *\n * This function does not use context from HTMLProvider. Use `useHTMLRenderer`\n * hook if you want to leverage provider context.\n */\nexport const renderHTML = (\n content: string,\n { components = {} }: RenderHTMLProps = {}\n): JSX.Element => {\n // Wrap explicit user components to ensure they are rendered via Preact's h\n const userComponents = Object.fromEntries(\n Object.entries(components)\n .filter(([, Component]) => Component)\n .map(([key, Component]) => [\n key,\n (props: any) => h(Component as any, props),\n ])\n );\n\n // Proxy handles standard HTML tags lazily without a hardcoded list\n const wrappedComponents = new Proxy(userComponents, {\n get(target, prop) {\n if (typeof prop === 'string' && prop in target) {\n return target[prop];\n }\n // Fallback: Lazily generate a wrapper for standard lowercase HTML tags\n if (typeof prop === 'string' && /^[a-z][a-z0-9]*$/.test(prop)) {\n if (VOID_HTML_ELEMENTS.has(prop)) {\n // Void elements cannot have children — strip them to avoid render error\n return ({ children: _children, ...rest }: any) => h(prop, rest);\n }\n return (props: any) => h(prop, props);\n }\n return undefined;\n },\n });\n\n // Cast wrappedComponents to any to satisfy getHTML's dictionary typing\n return h(Fragment, null, getHTML(content, wrappedComponents as any));\n};\n\n/**\n * Hook that returns a function to render HTML content.\n *\n * This hook considers the configuration from the `HTMLProvider` context if available,\n * falling back to the provided components.\n */\nexport const useHTMLRenderer = ({ components }: RenderHTMLProps = {}) => {\n const context = useHTMLContext();\n\n return (content: string) => {\n return renderHTML(content, {\n components: {\n ...context?.components,\n ...components,\n },\n });\n };\n};\n\nexport type HTMLRendererProps = RenderHTMLProps & {\n /**\n * The HTML content to render as a string.\n */\n children?: string;\n /**\n * Alias for children, used by the plugin.\n */\n html?: string;\n /**\n * Alias for components, used by the plugin.\n */\n components?: HTMLComponents<'permissive', {}>;\n dictionaryKey?: string;\n keyPath?: KeyPath[];\n};\n\n/**\n * Preact component that renders HTML-like content to JSX.\n */\nexport const HTMLRenderer: FunctionComponent<HTMLRendererProps> = ({\n children = '',\n html,\n components,\n}) => {\n const render = useHTMLRenderer({ components });\n const content = children || html || '';\n\n return render(content);\n};\n"],"mappings":";;;;;;;;;;;;;;AAqBA,MAAa,cACX,SACA,EAAE,aAAa,CAAC,MAAuB,CAAC,MACxB;CAEhB,MAAM,iBAAiB,OAAO,YAC5B,OAAO,QAAQ,UAAU,EACtB,QAAQ,GAAG,eAAe,SAAS,EACnC,KAAK,CAAC,KAAK,eAAe,CACzB,MACC,wBAAiB,WAAkB,KAAK,CAC3C,CAAC,CACL;CAqBA,qBAASA,iBAAU,8CAAc,SAAS,IAlBZ,MAAM,gBAAgB,EAClD,IAAI,QAAQ,MAAM;EAChB,IAAI,OAAO,SAAS,YAAY,QAAQ,QACtC,OAAO,OAAO;EAGhB,IAAI,OAAO,SAAS,YAAY,mBAAmB,KAAK,IAAI,GAAG;GAC7D,IAAIC,6CAAmB,IAAI,IAAI,GAE7B,QAAQ,EAAE,UAAU,WAAW,GAAG,yBAAkB,MAAM,IAAI;GAEhE,QAAQ,wBAAiB,MAAM,KAAK;EACtC;CAEF,EACF,CAG0D,CAAQ,CAAC;AACrE;;;;;;;AAQA,MAAa,mBAAmB,EAAE,eAAgC,CAAC,MAAM;CACvE,MAAM,UAAUC,yCAAe;CAE/B,QAAQ,YAAoB;EAC1B,OAAO,WAAW,SAAS,EACzB,YAAY;GACV,GAAG,SAAS;GACZ,GAAG;EACL,EACF,CAAC;CACH;AACF;;;;AAsBA,MAAa,gBAAsD,EACjE,WAAW,IACX,MACA,iBACI;CAIJ,OAHe,gBAAgB,EAAE,WAAW,CAGhC,EAFI,YAAY,QAAQ,EAEf;AACvB"}
@@ -1,11 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_markdown_compiler = require('./compiler.cjs');
3
2
  const require_markdown_MarkdownProvider = require('./MarkdownProvider.cjs');
4
3
  const require_markdown_MarkdownRenderer = require('./MarkdownRenderer.cjs');
5
4
 
6
5
  exports.MarkdownProvider = require_markdown_MarkdownProvider.MarkdownProvider;
7
6
  exports.MarkdownRenderer = require_markdown_MarkdownRenderer.MarkdownRenderer;
8
- exports.compileMarkdown = require_markdown_compiler.compileMarkdown;
9
7
  exports.renderMarkdown = require_markdown_MarkdownRenderer.renderMarkdown;
10
8
  exports.useMarkdownContext = require_markdown_MarkdownProvider.useMarkdownContext;
11
9
  exports.useMarkdownRenderer = require_markdown_MarkdownRenderer.useMarkdownRenderer;
@@ -1,6 +1,7 @@
1
1
  import { useHTMLContext } from "./HTMLProvider.mjs";
2
2
  import { getHTML } from "@intlayer/core/interpreter";
3
3
  import { Fragment, h } from "preact";
4
+ import { VOID_HTML_ELEMENTS } from "@intlayer/core/transpiler";
4
5
 
5
6
  //#region src/html/HTMLRenderer.tsx
6
7
  /**
@@ -13,7 +14,10 @@ const renderHTML = (content, { components = {} } = {}) => {
13
14
  const userComponents = Object.fromEntries(Object.entries(components).filter(([, Component]) => Component).map(([key, Component]) => [key, (props) => h(Component, props)]));
14
15
  return h(Fragment, null, getHTML(content, new Proxy(userComponents, { get(target, prop) {
15
16
  if (typeof prop === "string" && prop in target) return target[prop];
16
- if (typeof prop === "string" && /^[a-z][a-z0-9]*$/.test(prop)) return (props) => h(prop, props);
17
+ if (typeof prop === "string" && /^[a-z][a-z0-9]*$/.test(prop)) {
18
+ if (VOID_HTML_ELEMENTS.has(prop)) return ({ children: _children, ...rest }) => h(prop, rest);
19
+ return (props) => h(prop, props);
20
+ }
17
21
  } })));
18
22
  };
19
23
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"HTMLRenderer.mjs","names":[],"sources":["../../../src/html/HTMLRenderer.tsx"],"sourcesContent":["import { getHTML } from '@intlayer/core/interpreter';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport { Fragment, type FunctionComponent, h, type JSX } from 'preact';\nimport { useHTMLContext } from './HTMLProvider';\nimport type { HTMLComponents } from './types';\n\nexport type RenderHTMLProps = {\n /**\n * Component overrides for HTML tags.\n * Allows you to customize how specific HTML elements are rendered.\n */\n components?: HTMLComponents<'permissive', {}>;\n};\n\n/**\n * Renders HTML-like content to JSX with the provided components.\n *\n * This function does not use context from HTMLProvider. Use `useHTMLRenderer`\n * hook if you want to leverage provider context.\n */\nexport const renderHTML = (\n content: string,\n { components = {} }: RenderHTMLProps = {}\n): JSX.Element => {\n // Wrap explicit user components to ensure they are rendered via Preact's h\n const userComponents = Object.fromEntries(\n Object.entries(components)\n .filter(([, Component]) => Component)\n .map(([key, Component]) => [\n key,\n (props: any) => h(Component as any, props),\n ])\n );\n\n // Proxy handles standard HTML tags lazily without a hardcoded list\n const wrappedComponents = new Proxy(userComponents, {\n get(target, prop) {\n if (typeof prop === 'string' && prop in target) {\n return target[prop];\n }\n // Fallback: Lazily generate a wrapper for standard lowercase HTML tags\n if (typeof prop === 'string' && /^[a-z][a-z0-9]*$/.test(prop)) {\n return (props: any) => h(prop, props);\n }\n return undefined;\n },\n });\n\n // Cast wrappedComponents to any to satisfy getHTML's dictionary typing\n return h(Fragment, null, getHTML(content, wrappedComponents as any));\n};\n\n/**\n * Hook that returns a function to render HTML content.\n *\n * This hook considers the configuration from the `HTMLProvider` context if available,\n * falling back to the provided components.\n */\nexport const useHTMLRenderer = ({ components }: RenderHTMLProps = {}) => {\n const context = useHTMLContext();\n\n return (content: string) => {\n return renderHTML(content, {\n components: {\n ...context?.components,\n ...components,\n },\n });\n };\n};\n\nexport type HTMLRendererProps = RenderHTMLProps & {\n /**\n * The HTML content to render as a string.\n */\n children?: string;\n /**\n * Alias for children, used by the plugin.\n */\n html?: string;\n /**\n * Alias for components, used by the plugin.\n */\n components?: HTMLComponents<'permissive', {}>;\n dictionaryKey?: string;\n keyPath?: KeyPath[];\n};\n\n/**\n * Preact component that renders HTML-like content to JSX.\n */\nexport const HTMLRenderer: FunctionComponent<HTMLRendererProps> = ({\n children = '',\n html,\n components,\n}) => {\n const render = useHTMLRenderer({ components });\n const content = children || html || '';\n\n return render(content);\n};\n"],"mappings":";;;;;;;;;;;AAoBA,MAAa,cACX,SACA,EAAE,aAAa,CAAC,MAAuB,CAAC,MACxB;CAEhB,MAAM,iBAAiB,OAAO,YAC5B,OAAO,QAAQ,UAAU,EACtB,QAAQ,GAAG,eAAe,SAAS,EACnC,KAAK,CAAC,KAAK,eAAe,CACzB,MACC,UAAe,EAAE,WAAkB,KAAK,CAC3C,CAAC,CACL;CAiBA,OAAO,EAAE,UAAU,MAAM,QAAQ,SAAS,IAdZ,MAAM,gBAAgB,EAClD,IAAI,QAAQ,MAAM;EAChB,IAAI,OAAO,SAAS,YAAY,QAAQ,QACtC,OAAO,OAAO;EAGhB,IAAI,OAAO,SAAS,YAAY,mBAAmB,KAAK,IAAI,GAC1D,QAAQ,UAAe,EAAE,MAAM,KAAK;CAGxC,EACF,CAG0D,CAAQ,CAAC;AACrE;;;;;;;AAQA,MAAa,mBAAmB,EAAE,eAAgC,CAAC,MAAM;CACvE,MAAM,UAAU,eAAe;CAE/B,QAAQ,YAAoB;EAC1B,OAAO,WAAW,SAAS,EACzB,YAAY;GACV,GAAG,SAAS;GACZ,GAAG;EACL,EACF,CAAC;CACH;AACF;;;;AAsBA,MAAa,gBAAsD,EACjE,WAAW,IACX,MACA,iBACI;CAIJ,OAHe,gBAAgB,EAAE,WAAW,CAGhC,EAFI,YAAY,QAAQ,EAEf;AACvB"}
1
+ {"version":3,"file":"HTMLRenderer.mjs","names":[],"sources":["../../../src/html/HTMLRenderer.tsx"],"sourcesContent":["import { getHTML } from '@intlayer/core/interpreter';\nimport { VOID_HTML_ELEMENTS } from '@intlayer/core/transpiler';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport { Fragment, type FunctionComponent, h, type JSX } from 'preact';\nimport { useHTMLContext } from './HTMLProvider';\nimport type { HTMLComponents } from './types';\n\nexport type RenderHTMLProps = {\n /**\n * Component overrides for HTML tags.\n * Allows you to customize how specific HTML elements are rendered.\n */\n components?: HTMLComponents<'permissive', {}>;\n};\n\n/**\n * Renders HTML-like content to JSX with the provided components.\n *\n * This function does not use context from HTMLProvider. Use `useHTMLRenderer`\n * hook if you want to leverage provider context.\n */\nexport const renderHTML = (\n content: string,\n { components = {} }: RenderHTMLProps = {}\n): JSX.Element => {\n // Wrap explicit user components to ensure they are rendered via Preact's h\n const userComponents = Object.fromEntries(\n Object.entries(components)\n .filter(([, Component]) => Component)\n .map(([key, Component]) => [\n key,\n (props: any) => h(Component as any, props),\n ])\n );\n\n // Proxy handles standard HTML tags lazily without a hardcoded list\n const wrappedComponents = new Proxy(userComponents, {\n get(target, prop) {\n if (typeof prop === 'string' && prop in target) {\n return target[prop];\n }\n // Fallback: Lazily generate a wrapper for standard lowercase HTML tags\n if (typeof prop === 'string' && /^[a-z][a-z0-9]*$/.test(prop)) {\n if (VOID_HTML_ELEMENTS.has(prop)) {\n // Void elements cannot have children — strip them to avoid render error\n return ({ children: _children, ...rest }: any) => h(prop, rest);\n }\n return (props: any) => h(prop, props);\n }\n return undefined;\n },\n });\n\n // Cast wrappedComponents to any to satisfy getHTML's dictionary typing\n return h(Fragment, null, getHTML(content, wrappedComponents as any));\n};\n\n/**\n * Hook that returns a function to render HTML content.\n *\n * This hook considers the configuration from the `HTMLProvider` context if available,\n * falling back to the provided components.\n */\nexport const useHTMLRenderer = ({ components }: RenderHTMLProps = {}) => {\n const context = useHTMLContext();\n\n return (content: string) => {\n return renderHTML(content, {\n components: {\n ...context?.components,\n ...components,\n },\n });\n };\n};\n\nexport type HTMLRendererProps = RenderHTMLProps & {\n /**\n * The HTML content to render as a string.\n */\n children?: string;\n /**\n * Alias for children, used by the plugin.\n */\n html?: string;\n /**\n * Alias for components, used by the plugin.\n */\n components?: HTMLComponents<'permissive', {}>;\n dictionaryKey?: string;\n keyPath?: KeyPath[];\n};\n\n/**\n * Preact component that renders HTML-like content to JSX.\n */\nexport const HTMLRenderer: FunctionComponent<HTMLRendererProps> = ({\n children = '',\n html,\n components,\n}) => {\n const render = useHTMLRenderer({ components });\n const content = children || html || '';\n\n return render(content);\n};\n"],"mappings":";;;;;;;;;;;;AAqBA,MAAa,cACX,SACA,EAAE,aAAa,CAAC,MAAuB,CAAC,MACxB;CAEhB,MAAM,iBAAiB,OAAO,YAC5B,OAAO,QAAQ,UAAU,EACtB,QAAQ,GAAG,eAAe,SAAS,EACnC,KAAK,CAAC,KAAK,eAAe,CACzB,MACC,UAAe,EAAE,WAAkB,KAAK,CAC3C,CAAC,CACL;CAqBA,OAAO,EAAE,UAAU,MAAM,QAAQ,SAAS,IAlBZ,MAAM,gBAAgB,EAClD,IAAI,QAAQ,MAAM;EAChB,IAAI,OAAO,SAAS,YAAY,QAAQ,QACtC,OAAO,OAAO;EAGhB,IAAI,OAAO,SAAS,YAAY,mBAAmB,KAAK,IAAI,GAAG;GAC7D,IAAI,mBAAmB,IAAI,IAAI,GAE7B,QAAQ,EAAE,UAAU,WAAW,GAAG,WAAgB,EAAE,MAAM,IAAI;GAEhE,QAAQ,UAAe,EAAE,MAAM,KAAK;EACtC;CAEF,EACF,CAG0D,CAAQ,CAAC;AACrE;;;;;;;AAQA,MAAa,mBAAmB,EAAE,eAAgC,CAAC,MAAM;CACvE,MAAM,UAAU,eAAe;CAE/B,QAAQ,YAAoB;EAC1B,OAAO,WAAW,SAAS,EACzB,YAAY;GACV,GAAG,SAAS;GACZ,GAAG;EACL,EACF,CAAC;CACH;AACF;;;;AAsBA,MAAa,gBAAsD,EACjE,WAAW,IACX,MACA,iBACI;CAIJ,OAHe,gBAAgB,EAAE,WAAW,CAGhC,EAFI,YAAY,QAAQ,EAEf;AACvB"}
@@ -1,5 +1,4 @@
1
- import { compileMarkdown } from "./compiler.mjs";
2
1
  import { MarkdownProvider, useMarkdownContext } from "./MarkdownProvider.mjs";
3
2
  import { MarkdownRenderer, renderMarkdown, useMarkdownRenderer } from "./MarkdownRenderer.mjs";
4
3
 
5
- export { MarkdownProvider, MarkdownRenderer, compileMarkdown, renderMarkdown, useMarkdownContext, useMarkdownRenderer };
4
+ export { MarkdownProvider, MarkdownRenderer, renderMarkdown, useMarkdownContext, useMarkdownRenderer };
@@ -1 +1 @@
1
- {"version":3,"file":"HTMLRenderer.d.ts","names":[],"sources":["../../../src/html/HTMLRenderer.tsx"],"mappings":";;;;;KAMY,eAAA;;AAAZ;;;EAKE,UAAA,GAAa,cAAc;AAAA;AAS7B;;;;;;AAAA,cAAa,UAAA,GACX,OAAA;EACA;AAAA,IAAqB,eAAA,KACpB,GAAA,CAAI,OAAA;;;;;;;cAmCM,eAAA;EAAmB;AAAA,IAAgB,eAAA,MAGtC,OAAA,aAAe,CAAA,CAAA,GAAA,CAAA,OAAA;AAAA,KAUb,iBAAA,GAAoB,eAAA;EArB/B;AAQD;;EAiBE,QAAA;EAjB8B;;;EAqB9B,IAAA;EAVD;;;EAcC,UAAA,GAAa,cAAA;EACb,aAAA;EACA,OAAA,GAAU,OAAA;AAAA;;;AAhBX;cAsBY,YAAA,EAAc,iBAAiB,CAAC,iBAAA"}
1
+ {"version":3,"file":"HTMLRenderer.d.ts","names":[],"sources":["../../../src/html/HTMLRenderer.tsx"],"mappings":";;;;;KAOY,eAAA;;AAAZ;;;EAKE,UAAA,GAAa,cAAc;AAAA;AAS7B;;;;;;AAAA,cAAa,UAAA,GACX,OAAA;EACA;AAAA,IAAqB,eAAA,KACpB,GAAA,CAAI,OAAA;;;;;;;cAuCM,eAAA;EAAmB;AAAA,IAAgB,eAAA,MAGtC,OAAA,aAAe,CAAA,CAAA,GAAA,CAAA,OAAA;AAAA,KAUb,iBAAA,GAAoB,eAAA;EArB/B;AAQD;;EAiBE,QAAA;EAjB8B;;;EAqB9B,IAAA;EAVD;;;EAcC,UAAA,GAAa,cAAA;EACb,aAAA;EACA,OAAA,GAAU,OAAA;AAAA;;;AAhBX;cAsBY,YAAA,EAAc,iBAAiB,CAAC,iBAAA"}
@@ -0,0 +1,4 @@
1
+ import { LocalesValues as LocalesValues$1 } from "@intlayer/types/module_augmentation";
2
+ import { Locale as Locale$1 } from "@intlayer/types/allLocales";
3
+ import { Dictionary } from "@intlayer/types/dictionary";
4
+ export type { Locale$1 as Locale, LocalesValues$1 as LocalesValues };
@@ -1,4 +1,3 @@
1
1
  import { MarkdownProvider, MarkdownProviderOptions, useMarkdownContext } from "./MarkdownProvider.js";
2
2
  import { MarkdownRenderer, MarkdownRendererProps, RenderMarkdownProps, renderMarkdown, useMarkdownRenderer } from "./MarkdownRenderer.js";
3
- import { compileMarkdown } from "./compiler.js";
4
- export { MarkdownProvider, type MarkdownProviderOptions, MarkdownRenderer, type MarkdownRendererProps, type RenderMarkdownProps, compileMarkdown, renderMarkdown, useMarkdownContext, useMarkdownRenderer };
3
+ export { MarkdownProvider, type MarkdownProviderOptions, MarkdownRenderer, type MarkdownRendererProps, type RenderMarkdownProps, renderMarkdown, useMarkdownContext, useMarkdownRenderer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "preact-intlayer",
3
- "version": "8.9.8",
3
+ "version": "8.10.0-canary.1",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your Preact applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -100,15 +100,15 @@
100
100
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
101
101
  },
102
102
  "dependencies": {
103
- "@intlayer/api": "8.9.8",
104
- "@intlayer/chokidar": "8.9.8",
105
- "@intlayer/config": "8.9.8",
106
- "@intlayer/core": "8.9.8",
107
- "@intlayer/editor": "8.9.8",
108
- "@intlayer/types": "8.9.8"
103
+ "@intlayer/api": "8.10.0-canary.1",
104
+ "@intlayer/chokidar": "8.10.0-canary.1",
105
+ "@intlayer/config": "8.10.0-canary.1",
106
+ "@intlayer/core": "8.10.0-canary.1",
107
+ "@intlayer/editor": "8.10.0-canary.1",
108
+ "@intlayer/types": "8.10.0-canary.1"
109
109
  },
110
110
  "devDependencies": {
111
- "@types/node": "25.8.0",
111
+ "@types/node": "25.9.1",
112
112
  "@utils/ts-config": "1.0.4",
113
113
  "@utils/ts-config-types": "1.0.4",
114
114
  "@utils/tsdown-config": "1.0.4",