react-intlayer 8.10.0-canary.0 → 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.
@@ -6,6 +6,7 @@ const require_html_HTMLProvider = require('./HTMLProvider.cjs');
6
6
  let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
7
7
  let react = require("react");
8
8
  let react_jsx_runtime = require("react/jsx-runtime");
9
+ let _intlayer_core_transpiler = require("@intlayer/core/transpiler");
9
10
 
10
11
  //#region src/html/HTMLRenderer.tsx
11
12
  /**
@@ -18,7 +19,10 @@ const renderHTML = (content, { components = {} } = {}) => {
18
19
  const userComponents = Object.fromEntries(Object.entries(components).filter(([, Component]) => Component).map(([key, Component]) => [key, (props) => (0, react.createElement)(Component, props)]));
19
20
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: (0, _intlayer_core_interpreter.getHTML)(content, new Proxy(userComponents, { get(target, prop) {
20
21
  if (typeof prop === "string" && prop in target) return target[prop];
21
- if (typeof prop === "string" && /^[a-z][a-z0-9]*$/.test(prop)) return (props) => (0, react.createElement)(prop, props);
22
+ if (typeof prop === "string" && /^[a-z][a-z0-9]*$/.test(prop)) {
23
+ if (_intlayer_core_transpiler.VOID_HTML_ELEMENTS.has(prop)) return ({ children: _children, ...rest }) => (0, react.createElement)(prop, rest);
24
+ return (props) => (0, react.createElement)(prop, props);
25
+ }
22
26
  } })) });
23
27
  };
24
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"HTMLRenderer.cjs","names":["Fragment","useHTMLContext"],"sources":["../../../src/html/HTMLRenderer.tsx"],"sourcesContent":["'use client';\n\nimport { getHTML } from '@intlayer/core/interpreter';\nimport { createElement, type FC, Fragment, type JSX } from 'react';\nimport type { HTMLComponents } from './HTMLComponentTypes';\nimport { useHTMLContext } from './HTMLProvider';\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 React.createElement\n const userComponents = Object.fromEntries(\n Object.entries(components)\n .filter(([, Component]) => Component)\n .map(([key, Component]) => [\n key,\n (props: any) => createElement(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) => createElement(prop, props);\n }\n return undefined;\n },\n });\n\n return <Fragment>{getHTML(content, wrappedComponents as any)}</Fragment>;\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\n/**\n * React component that renders HTML-like content to JSX.\n *\n * This component uses the components from the `HTMLProvider` context\n * if available.\n */\nexport const HTMLRenderer: FC<HTMLRendererProps> = ({\n children = '',\n components,\n}) => {\n const render = useHTMLRenderer({ components });\n\n return render(children);\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,mCAA6B,WAAkB,KAAK,CACvD,CAAC,CACL;CAgBA,OAAO,2CAACA,gBAAD,oDAAmB,SAAS,IAbL,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,mCAA6B,MAAM,KAAK;CAGpD,EACF,CAEmD,CAAQ,EAAY;AACzE;;;;;;;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;;;;;;;AAeA,MAAa,gBAAuC,EAClD,WAAW,IACX,iBACI;CAGJ,OAFe,gBAAgB,EAAE,WAAW,CAEhC,EAAE,QAAQ;AACxB"}
1
+ {"version":3,"file":"HTMLRenderer.cjs","names":["Fragment","VOID_HTML_ELEMENTS","useHTMLContext"],"sources":["../../../src/html/HTMLRenderer.tsx"],"sourcesContent":["'use client';\n\nimport { getHTML } from '@intlayer/core/interpreter';\nimport { VOID_HTML_ELEMENTS } from '@intlayer/core/transpiler';\nimport { createElement, type FC, Fragment, type JSX } from 'react';\nimport type { HTMLComponents } from './HTMLComponentTypes';\nimport { useHTMLContext } from './HTMLProvider';\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 React.createElement\n const userComponents = Object.fromEntries(\n Object.entries(components)\n .filter(([, Component]) => Component)\n .map(([key, Component]) => [\n key,\n (props: any) => createElement(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 React error\n return ({ children: _children, ...rest }: any) =>\n createElement(prop, rest);\n }\n return (props: any) => createElement(prop, props);\n }\n return undefined;\n },\n });\n\n return <Fragment>{getHTML(content, wrappedComponents as any)}</Fragment>;\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\n/**\n * React component that renders HTML-like content to JSX.\n *\n * This component uses the components from the `HTMLProvider` context\n * if available.\n */\nexport const HTMLRenderer: FC<HTMLRendererProps> = ({\n children = '',\n components,\n}) => {\n const render = useHTMLRenderer({ components });\n\n return render(children);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAsBA,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,mCAA6B,WAAkB,KAAK,CACvD,CAAC,CACL;CAqBA,OAAO,2CAACA,gBAAD,oDAAmB,SAAS,IAlBL,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,oCAClB,MAAM,IAAI;GAE5B,QAAQ,mCAA6B,MAAM,KAAK;EAClD;CAEF,EACF,CAEmD,CAAQ,EAAY;AACzE;;;;;;;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;;;;;;;AAeA,MAAa,gBAAuC,EAClD,WAAW,IACX,iBACI;CAGJ,OAFe,gBAAgB,EAAE,WAAW,CAEhC,EAAE,QAAQ;AACxB"}
@@ -1,11 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_markdown_processor = require('./processor.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_processor.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;
@@ -4,6 +4,7 @@ import { useHTMLContext } from "./HTMLProvider.mjs";
4
4
  import { getHTML } from "@intlayer/core/interpreter";
5
5
  import { Fragment, createElement } from "react";
6
6
  import { jsx } from "react/jsx-runtime";
7
+ import { VOID_HTML_ELEMENTS } from "@intlayer/core/transpiler";
7
8
 
8
9
  //#region src/html/HTMLRenderer.tsx
9
10
  /**
@@ -16,7 +17,10 @@ const renderHTML = (content, { components = {} } = {}) => {
16
17
  const userComponents = Object.fromEntries(Object.entries(components).filter(([, Component]) => Component).map(([key, Component]) => [key, (props) => createElement(Component, props)]));
17
18
  return /* @__PURE__ */ jsx(Fragment, { children: getHTML(content, new Proxy(userComponents, { get(target, prop) {
18
19
  if (typeof prop === "string" && prop in target) return target[prop];
19
- if (typeof prop === "string" && /^[a-z][a-z0-9]*$/.test(prop)) return (props) => createElement(prop, props);
20
+ if (typeof prop === "string" && /^[a-z][a-z0-9]*$/.test(prop)) {
21
+ if (VOID_HTML_ELEMENTS.has(prop)) return ({ children: _children, ...rest }) => createElement(prop, rest);
22
+ return (props) => createElement(prop, props);
23
+ }
20
24
  } })) });
21
25
  };
22
26
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"HTMLRenderer.mjs","names":[],"sources":["../../../src/html/HTMLRenderer.tsx"],"sourcesContent":["'use client';\n\nimport { getHTML } from '@intlayer/core/interpreter';\nimport { createElement, type FC, Fragment, type JSX } from 'react';\nimport type { HTMLComponents } from './HTMLComponentTypes';\nimport { useHTMLContext } from './HTMLProvider';\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 React.createElement\n const userComponents = Object.fromEntries(\n Object.entries(components)\n .filter(([, Component]) => Component)\n .map(([key, Component]) => [\n key,\n (props: any) => createElement(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) => createElement(prop, props);\n }\n return undefined;\n },\n });\n\n return <Fragment>{getHTML(content, wrappedComponents as any)}</Fragment>;\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\n/**\n * React component that renders HTML-like content to JSX.\n *\n * This component uses the components from the `HTMLProvider` context\n * if available.\n */\nexport const HTMLRenderer: FC<HTMLRendererProps> = ({\n children = '',\n components,\n}) => {\n const render = useHTMLRenderer({ components });\n\n return render(children);\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,cAAc,WAAkB,KAAK,CACvD,CAAC,CACL;CAgBA,OAAO,oBAAC,UAAD,YAAW,QAAQ,SAAS,IAbL,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,cAAc,MAAM,KAAK;CAGpD,EACF,CAEmD,CAAQ,EAAY;AACzE;;;;;;;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;;;;;;;AAeA,MAAa,gBAAuC,EAClD,WAAW,IACX,iBACI;CAGJ,OAFe,gBAAgB,EAAE,WAAW,CAEhC,EAAE,QAAQ;AACxB"}
1
+ {"version":3,"file":"HTMLRenderer.mjs","names":[],"sources":["../../../src/html/HTMLRenderer.tsx"],"sourcesContent":["'use client';\n\nimport { getHTML } from '@intlayer/core/interpreter';\nimport { VOID_HTML_ELEMENTS } from '@intlayer/core/transpiler';\nimport { createElement, type FC, Fragment, type JSX } from 'react';\nimport type { HTMLComponents } from './HTMLComponentTypes';\nimport { useHTMLContext } from './HTMLProvider';\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 React.createElement\n const userComponents = Object.fromEntries(\n Object.entries(components)\n .filter(([, Component]) => Component)\n .map(([key, Component]) => [\n key,\n (props: any) => createElement(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 React error\n return ({ children: _children, ...rest }: any) =>\n createElement(prop, rest);\n }\n return (props: any) => createElement(prop, props);\n }\n return undefined;\n },\n });\n\n return <Fragment>{getHTML(content, wrappedComponents as any)}</Fragment>;\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\n/**\n * React component that renders HTML-like content to JSX.\n *\n * This component uses the components from the `HTMLProvider` context\n * if available.\n */\nexport const HTMLRenderer: FC<HTMLRendererProps> = ({\n children = '',\n components,\n}) => {\n const render = useHTMLRenderer({ components });\n\n return render(children);\n};\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,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,cAAc,WAAkB,KAAK,CACvD,CAAC,CACL;CAqBA,OAAO,oBAAC,UAAD,YAAW,QAAQ,SAAS,IAlBL,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,WAChC,cAAc,MAAM,IAAI;GAE5B,QAAQ,UAAe,cAAc,MAAM,KAAK;EAClD;CAEF,EACF,CAEmD,CAAQ,EAAY;AACzE;;;;;;;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;;;;;;;AAeA,MAAa,gBAAuC,EAClD,WAAW,IACX,iBACI;CAGJ,OAFe,gBAAgB,EAAE,WAAW,CAEhC,EAAE,QAAQ;AACxB"}
@@ -1,5 +1,4 @@
1
- import { compileMarkdown } from "./processor.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 };
@@ -8,7 +8,7 @@ import { Dictionary } from "@intlayer/types/dictionary";
8
8
  *
9
9
  * If the locale is not provided, it will use the locale from the client context
10
10
  */
11
- declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => import("@intlayer/core/interpreter").DeepTransformContent<T["content"], IInterpreterPluginState, "id" | "is" | "af" | "af-ZA" | "sq" | "sq-AL" | "am" | "am-ET" | "ar" | "ar-DZ" | "ar-BH" | "ar-TD" | "ar-KM" | "ar-DJ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MR" | "ar-MA" | "ar-OM" | "ar-PS" | "ar-QA" | "ar-SA" | "ar-SO" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-AE" | "ar-YE" | "hy" | "hy-AM" | "az" | "az-AZ" | "eu" | "eu-ES" | "be" | "be-BY" | "bn" | "bn-BD" | "bn-IN" | "bn-MM" | "bs" | "bs-BA" | "bg" | "bg-BG" | "my" | "my-MM" | "ca" | "ca-ES" | "zh" | "zh-HK" | "zh-MO" | "zh-Hans" | "zh-CN" | "zh-SG" | "zh-TW" | "zh-Hant" | "hr" | "hr-BA" | "hr-HR" | "cs" | "cs-CZ" | "da" | "da-DK" | "dv" | "dv-MV" | "nl" | "nl-BE" | "nl-NL" | "en" | "en-AU" | "en-BZ" | "en-BW" | "en-CA" | "en-CB" | "en-GH" | "en-HK" | "en-IN" | "en-IE" | "en-JM" | "en-KE" | "en-MY" | "en-NZ" | "en-NG" | "en-PK" | "en-PH" | "en-SG" | "en-ZA" | "en-TZ" | "en-TT" | "en-UG" | "en-GB" | "en-US" | "en-ZW" | "eo" | "et" | "et-EE" | "fo" | "fo-FO" | "fa" | "fa-IR" | "fi" | "fi-FI" | "fr" | "fr-BE" | "fr-CA" | "fr-FR" | "fr-LU" | "fr-MC" | "fr-CH" | "mk" | "mk-MK" | "gl" | "gl-ES" | "ka" | "ka-GE" | "de" | "de-AT" | "de-DE" | "de-LI" | "de-LU" | "de-CH" | "el" | "el-GR" | "gu" | "gu-IN" | "he" | "he-IL" | "hi" | "hi-IN" | "hu" | "hu-HU" | "is-IS" | "id-ID" | "ga" | "ga-IE" | "it" | "it-IT" | "it-CH" | "ja" | "ja-JP" | "kn" | "kn-IN" | "kk" | "kk-KZ" | "km" | "km-KH" | "kok" | "kok-IN" | "ko" | "ko-KR" | "ku" | "ku-TR" | "ky" | "ky-KG" | "lo" | "lo-LA" | "lv" | "lv-LV" | "lt" | "lt-LT" | "dsb" | "dsb-DE" | "mg-MG" | "ms" | "ml" | "ml-IN" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "mi" | "mi-NZ" | "mr" | "mr-IN" | "mn" | "mn-MN" | "ne" | "ne-NP" | "ns" | "ns-ZA" | "no" | "nb" | "nb-NO" | "nn" | "nn-NO" | "ps" | "ps-AR" | "pl" | "pl-PL" | "pt" | "pt-BR" | "pt-CV" | "pt-GW" | "pt-MO" | "pt-MZ" | "pt-PT" | "pt-ST" | "pt-TL" | "pa" | "pa-IN" | "qu" | "qu-BO" | "qu-EC" | "qu-PE" | "ro" | "ro-MD" | "ro-RO" | "rm" | "rm-CH" | "ru" | "ru-MD" | "ru-RU" | "se" | "se-FI" | "se-NO" | "se-SE" | "sa" | "sa-IN" | "gd" | "gd-GB" | "sr-Cyrl" | "sr-BA" | "sr-RS" | "sr" | "sr-SP" | "si" | "si-LK" | "sk" | "sk-SK" | "sl" | "sl-SI" | "es" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-CU" | "es-DO" | "es-EC" | "es-SV" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PY" | "es-PE" | "es-PR" | "es-ES" | "es-US" | "es-UY" | "es-VE" | "sw" | "sw-KE" | "sv" | "sv-FI" | "sv-SE" | "syr" | "syr-SY" | "tl" | "tl-PH" | "ta" | "ta-IN" | "tt" | "tt-RU" | "te" | "te-IN" | "th" | "th-TH" | "ts" | "tn" | "tn-ZA" | "tr" | "tr-TR" | "uk" | "uk-UA" | "hsb" | "hsb-DE" | "ur" | "ur-PK" | "uz" | "uz-UZ" | "ve" | "ve-ZA" | "vi" | "vi-VN" | "cy" | "cy-GB" | "xh" | "xh-ZA" | "yi" | "yi-001" | "yo" | "yo-NG" | "zu" | "zu-ZA" | (string & {})>;
11
+ declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => import("@intlayer/core/interpreter").DeepTransformContent<T["content"], IInterpreterPluginState, "af" | "af-ZA" | "sq" | "sq-AL" | "am" | "am-ET" | "ar" | "ar-DZ" | "ar-BH" | "ar-TD" | "ar-KM" | "ar-DJ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MR" | "ar-MA" | "ar-OM" | "ar-PS" | "ar-QA" | "ar-SA" | "ar-SO" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-AE" | "ar-YE" | "hy" | "hy-AM" | "az" | "az-AZ" | "eu" | "eu-ES" | "be" | "be-BY" | "bn" | "bn-BD" | "bn-IN" | "bn-MM" | "bs" | "bs-BA" | "bg" | "bg-BG" | "my" | "my-MM" | "ca" | "ca-ES" | "zh" | "zh-HK" | "zh-MO" | "zh-Hans" | "zh-CN" | "zh-SG" | "zh-TW" | "zh-Hant" | "hr" | "hr-BA" | "hr-HR" | "cs" | "cs-CZ" | "da" | "da-DK" | "dv" | "dv-MV" | "nl" | "nl-BE" | "nl-NL" | "en" | "en-AU" | "en-BZ" | "en-BW" | "en-CA" | "en-CB" | "en-GH" | "en-HK" | "en-IN" | "en-IE" | "en-JM" | "en-KE" | "en-MY" | "en-NZ" | "en-NG" | "en-PK" | "en-PH" | "en-SG" | "en-ZA" | "en-TZ" | "en-TT" | "en-UG" | "en-GB" | "en-US" | "en-ZW" | "eo" | "et" | "et-EE" | "fo" | "fo-FO" | "fa" | "fa-IR" | "fi" | "fi-FI" | "fr" | "fr-BE" | "fr-CA" | "fr-FR" | "fr-LU" | "fr-MC" | "fr-CH" | "mk" | "mk-MK" | "gl" | "gl-ES" | "ka" | "ka-GE" | "de" | "de-AT" | "de-DE" | "de-LI" | "de-LU" | "de-CH" | "el" | "el-GR" | "gu" | "gu-IN" | "he" | "he-IL" | "hi" | "hi-IN" | "hu" | "hu-HU" | "is" | "is-IS" | "id" | "id-ID" | "ga" | "ga-IE" | "it" | "it-IT" | "it-CH" | "ja" | "ja-JP" | "kn" | "kn-IN" | "kk" | "kk-KZ" | "km" | "km-KH" | "kok" | "kok-IN" | "ko" | "ko-KR" | "ku" | "ku-TR" | "ky" | "ky-KG" | "lo" | "lo-LA" | "lv" | "lv-LV" | "lt" | "lt-LT" | "dsb" | "dsb-DE" | "mg-MG" | "ms" | "ml" | "ml-IN" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "mi" | "mi-NZ" | "mr" | "mr-IN" | "mn" | "mn-MN" | "ne" | "ne-NP" | "ns" | "ns-ZA" | "no" | "nb" | "nb-NO" | "nn" | "nn-NO" | "ps" | "ps-AR" | "pl" | "pl-PL" | "pt" | "pt-BR" | "pt-CV" | "pt-GW" | "pt-MO" | "pt-MZ" | "pt-PT" | "pt-ST" | "pt-TL" | "pa" | "pa-IN" | "qu" | "qu-BO" | "qu-EC" | "qu-PE" | "ro" | "ro-MD" | "ro-RO" | "rm" | "rm-CH" | "ru" | "ru-MD" | "ru-RU" | "se" | "se-FI" | "se-NO" | "se-SE" | "sa" | "sa-IN" | "gd" | "gd-GB" | "sr-Cyrl" | "sr-BA" | "sr-RS" | "sr" | "sr-SP" | "si" | "si-LK" | "sk" | "sk-SK" | "sl" | "sl-SI" | "es" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-CU" | "es-DO" | "es-EC" | "es-SV" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PY" | "es-PE" | "es-PR" | "es-ES" | "es-US" | "es-UY" | "es-VE" | "sw" | "sw-KE" | "sv" | "sv-FI" | "sv-SE" | "syr" | "syr-SY" | "tl" | "tl-PH" | "ta" | "ta-IN" | "tt" | "tt-RU" | "te" | "te-IN" | "th" | "th-TH" | "ts" | "tn" | "tn-ZA" | "tr" | "tr-TR" | "uk" | "uk-UA" | "hsb" | "hsb-DE" | "ur" | "ur-PK" | "uz" | "uz-UZ" | "ve" | "ve-ZA" | "vi" | "vi-VN" | "cy" | "cy-GB" | "xh" | "xh-ZA" | "yi" | "yi-001" | "yo" | "yo-NG" | "zu" | "zu-ZA" | (string & {})>;
12
12
  //#endregion
13
13
  export { useDictionaryDynamic };
14
14
  //# sourceMappingURL=useDictionaryDynamic.d.ts.map
@@ -1 +1 @@
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;;;;;;;cAkCM,eAAA;EAAmB;AAAA,IAAgB,eAAA,MAGtC,OAAA,aAAe,GAAA,CAAA,OAAA;AAAA,KAUb,iBAAA,GAAoB,eAAe;EArB9C;AAQD;;EAiBE,QAAQ;AAAA;;;;;;;cASG,YAAA,EAAc,EAAE,CAAC,iBAAA"}
1
+ {"version":3,"file":"HTMLRenderer.d.ts","names":[],"sources":["../../../src/html/HTMLRenderer.tsx"],"mappings":";;;;KAQY,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,GAAA,CAAA,OAAA;AAAA,KAUb,iBAAA,GAAoB,eAAe;EArB9C;AAQD;;EAiBE,QAAQ;AAAA;;;;;;;cASG,YAAA,EAAc,EAAE,CAAC,iBAAA"}
@@ -69,7 +69,7 @@ declare const useMarkdownRenderer: ({
69
69
  forceInline,
70
70
  preserveFrontmatter,
71
71
  tagfilter
72
- }?: RenderMarkdownProps$1) => (content: string) => string | number | bigint | boolean | Iterable<import("react").ReactNode> | import("react").JSX.Element | Promise<import("react").ReactNode>;
72
+ }?: RenderMarkdownProps$1) => (content: string) => string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<import("react").ReactNode> | import("react").JSX.Element;
73
73
  /**
74
74
  * @deprecated import from react-intlayer/markdown instead
75
75
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;YAIY,kBAAA,iBAAmC,aAAA,UACnC,uBAAA,CAAwB,CAAA,EAAG,CAAA,EAAG,CAAA;AAAA;;;;;;;cAwD7B,gBAAA,kBAAgB,EAAA,CAAA,yBAAA;eAAA,cAAA;;gDAxBpB,yBAAA,EAAA,UAAA,GAAA,cAAA,oBAEG,OAAA,mBAEN,EAAA,iBAAA,cAAA,CAAA,WAAA,uBAAA,SAAA,GAAA,OAAA,iBAAA,SAAA;AAAA;;;;;;cAwBO,kBAAA;eAAwC,cAAA;+CA1CP,yBAAA,EAAA,UAAA,GAAA,cAAA,oBAC5B,OAAA,mBACI,EAAA,iBAAA,cAAA,CAAA,WAAA,uBAAA,SAAA,GAAA,OAAA,iBAAA,SAAA;AAAA;;;;KA4CV,uBAAA,GAA0B,yBAAwB;AAR9D;;;AAAA,cAYa,cAAA,GAAc,OAAA;EAAA,UAAA;EAAA,OAAA;EAAA,UAAA;EAAA,WAAA;EAAA,mBAAA;EAAA;AAAA,IAAA,qBAAA,qBAAA,GAAA,CAAA,OAAA;;;;cAId,mBAAA;EAAmB,UAAA;EAAA,OAAA;EAAA,UAAA;EAAA,WAAA;EAAA,mBAAA;EAAA;AAAA,IAAA,qBAAA,MAa01C,OAAA,kDAAe,QAAA,iBAAA,SAAA,oBAAA,GAAA,CAAA,OAAA,GAAA,OAAA,iBAAA,SAAA;;;;cAT53C,gBAAA,kBAAgB,EAAA,CAAA,uBAAA;;;;KAIjB,mBAAA,GAAsB,qBAAoB;;;;KAI1C,qBAAA,GAAwB,uBAAsB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;YAIY,kBAAA,iBAAmC,aAAA,UACnC,uBAAA,CAAwB,CAAA,EAAG,CAAA,EAAG,CAAA;AAAA;;;;;;;cAwD7B,gBAAA,kBAAgB,EAAA,CAAA,yBAAA;eAAA,cAAA;;gDAxBpB,yBAAA,EAAA,UAAA,GAAA,cAAA,oBAEG,OAAA,mBAEN,EAAA,iBAAA,cAAA,CAAA,WAAA,uBAAA,SAAA,GAAA,OAAA,iBAAA,SAAA;AAAA;;;;;;cAwBO,kBAAA;eAAwC,cAAA;+CA1CP,yBAAA,EAAA,UAAA,GAAA,cAAA,oBAC5B,OAAA,mBACI,EAAA,iBAAA,cAAA,CAAA,WAAA,uBAAA,SAAA,GAAA,OAAA,iBAAA,SAAA;AAAA;;;;KA4CV,uBAAA,GAA0B,yBAAwB;AAR9D;;;AAAA,cAYa,cAAA,GAAc,OAAA;EAAA,UAAA;EAAA,OAAA;EAAA,UAAA;EAAA,WAAA;EAAA,mBAAA;EAAA;AAAA,IAAA,qBAAA,qBAAA,GAAA,CAAA,OAAA;;;;cAId,mBAAA;EAAmB,UAAA;EAAA,OAAA;EAAA,UAAA;EAAA,WAAA;EAAA,mBAAA;EAAA;AAAA,IAAA,qBAAA,MAa01C,OAAA,kDAAe,QAAA,iBAAA,SAAA,IAAA,OAAA,iBAAA,SAAA,oBAAA,GAAA,CAAA,OAAA;;;;cAT53C,gBAAA,kBAAgB,EAAA,CAAA,uBAAA;;;;KAIjB,mBAAA,GAAsB,qBAAoB;;;;KAI1C,qBAAA,GAAwB,uBAAsB"}
@@ -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 "./processor.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": "react-intlayer",
3
- "version": "8.10.0-canary.0",
3
+ "version": "8.10.0-canary.1",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your React applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -123,18 +123,18 @@
123
123
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
124
124
  },
125
125
  "dependencies": {
126
- "@intlayer/api": "8.10.0-canary.0",
127
- "@intlayer/config": "8.10.0-canary.0",
128
- "@intlayer/core": "8.10.0-canary.0",
129
- "@intlayer/dictionaries-entry": "8.10.0-canary.0",
130
- "@intlayer/editor": "8.10.0-canary.0",
131
- "@intlayer/editor-react": "8.10.0-canary.0",
132
- "@intlayer/types": "8.10.0-canary.0"
126
+ "@intlayer/api": "8.10.0-canary.1",
127
+ "@intlayer/config": "8.10.0-canary.1",
128
+ "@intlayer/core": "8.10.0-canary.1",
129
+ "@intlayer/dictionaries-entry": "8.10.0-canary.1",
130
+ "@intlayer/editor": "8.10.0-canary.1",
131
+ "@intlayer/editor-react": "8.10.0-canary.1",
132
+ "@intlayer/types": "8.10.0-canary.1"
133
133
  },
134
134
  "devDependencies": {
135
135
  "@craco/types": "7.1.0",
136
136
  "@testing-library/react": "16.3.2",
137
- "@types/node": "25.9.0",
137
+ "@types/node": "25.9.1",
138
138
  "@types/react": ">=16.0.0",
139
139
  "@types/react-dom": ">=16.0.0",
140
140
  "@utils/ts-config": "1.0.4",