angular-intlayer 7.1.5 → 7.1.7

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.
@@ -10,7 +10,7 @@ let __intlayer_types = require("@intlayer/types");
10
10
  const intlayerNodePlugins = {
11
11
  id: "intlayer-node-plugin",
12
12
  canHandle: (node) => typeof node === "bigint" || typeof node === "string" || typeof node === "number",
13
- transform: (_node, { children,...rest }) => require_renderIntlayerNode.renderIntlayerNode({
13
+ transform: (_node, { children, ...rest }) => require_renderIntlayerNode.renderIntlayerNode({
14
14
  ...rest,
15
15
  value: children,
16
16
  children: () => ({
@@ -28,7 +28,7 @@ const markdownStringPlugin = {
28
28
  id: "markdown-string-plugin",
29
29
  canHandle: (node) => typeof node === "string",
30
30
  transform: (node, props, deepTransformNode) => {
31
- const { plugins,...rest } = props;
31
+ const { plugins, ...rest } = props;
32
32
  const metadataNodes = deepTransformNode((0, __intlayer_core.getMarkdownMetadata)(node), {
33
33
  plugins: [{
34
34
  id: "markdown-metadata-plugin",
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.cjs","names":["intlayerNodePlugins: Plugins","renderIntlayerNode","ContentSelectorWrapperComponent","markdownStringPlugin: Plugins","props","useMarkdown","markdownPlugin: Plugins","NodeType","newKeyPath: KeyPath[]"],"sources":["../../src/plugins.ts"],"sourcesContent":["import {\n type DeepTransformContent as DeepTransformContentCore,\n getMarkdownMetadata,\n type IInterpreterPluginState as IInterpreterPluginStateCore,\n type MarkdownContent,\n type Plugins,\n} from '@intlayer/core';\nimport { type KeyPath, NodeType } from '@intlayer/types';\nimport { ContentSelectorWrapperComponent } from './editor';\nimport { useMarkdown } from './markdown/installIntlayerMarkdown';\nimport { renderIntlayerNode } from './renderIntlayerNode';\n\n/** ---------------------------------------------\n * INTLAYER NODE PLUGIN\n * --------------------------------------------- */\n\nexport type IntlayerNodeCond<T> = T extends number | string\n ? IntlayerNode<T>\n : never;\n\nexport interface IntlayerNode<T, P = {}> {\n value: T;\n children?: any;\n additionalProps?: P;\n}\n\n/** Translation plugin. Replaces node with a locale string if nodeType = Translation. */\nexport const intlayerNodePlugins: Plugins = {\n id: 'intlayer-node-plugin',\n canHandle: (node) =>\n typeof node === 'bigint' ||\n typeof node === 'string' ||\n typeof node === 'number',\n transform: (_node, { children, ...rest }) =>\n renderIntlayerNode({\n ...rest,\n value: children,\n children: () => ({\n component: ContentSelectorWrapperComponent,\n props: {\n dictionaryKey: rest.dictionaryKey,\n keyPath: rest.keyPath,\n },\n children: children,\n }),\n }),\n};\n\n/**\n * MARKDOWN PLUGIN\n */\n\nexport type MarkdownStringCond<T> = T extends string\n ? IntlayerNode<string, { metadata: DeepTransformContent<string> }>\n : never;\n\n/** Markdown string plugin. Replaces string node with a component that render the markdown. */\nexport const markdownStringPlugin: Plugins = {\n id: 'markdown-string-plugin',\n canHandle: (node) => typeof node === 'string',\n transform: (node: string, props, deepTransformNode) => {\n const {\n plugins, // Removed to avoid next error - Functions cannot be passed directly to Client Components\n ...rest\n } = props;\n\n const metadata = getMarkdownMetadata(node);\n\n const metadataPlugins: Plugins = {\n id: 'markdown-metadata-plugin',\n canHandle: (metadataNode) =>\n typeof metadataNode === 'string' ||\n typeof metadataNode === 'number' ||\n typeof metadataNode === 'boolean' ||\n !metadataNode,\n transform: (metadataNode, props) =>\n renderIntlayerNode({\n ...props,\n value: metadataNode,\n children: node,\n }),\n };\n\n // Transform metadata while keeping the same structure\n const metadataNodes = deepTransformNode(metadata, {\n plugins: [metadataPlugins],\n dictionaryKey: rest.dictionaryKey,\n keyPath: [],\n });\n\n return renderIntlayerNode({\n ...props,\n value: node,\n children: () => ({\n component: ContentSelectorWrapperComponent,\n props: {\n dictionaryKey: rest.dictionaryKey,\n keyPath: rest.keyPath,\n },\n children: () => {\n const { renderMarkdown } = useMarkdown();\n return renderMarkdown(node);\n },\n }),\n additionalProps: {\n metadata: metadataNodes,\n },\n });\n },\n};\n\nexport type MarkdownCond<T> = T extends {\n nodeType: NodeType | string;\n [NodeType.Markdown]: infer M;\n metadata?: infer U;\n}\n ? IntlayerNode<DeepTransformContent<M>, { metadata: DeepTransformContent<U> }>\n : never;\n\nexport const markdownPlugin: Plugins = {\n id: 'markdown-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeType.Markdown,\n transform: (node: MarkdownContent, props, deepTransformNode) => {\n const newKeyPath: KeyPath[] = [\n ...props.keyPath,\n {\n type: NodeType.Markdown,\n },\n ];\n\n const children = node[NodeType.Markdown];\n\n return deepTransformNode(children, {\n ...props,\n children,\n keyPath: newKeyPath,\n plugins: [markdownStringPlugin, ...(props.plugins ?? [])],\n });\n },\n};\n\n/** ---------------------------------------------\n * PLUGINS RESULT\n * --------------------------------------------- */\n\nexport interface IInterpreterPluginAngular<T> {\n intlayerNode: IntlayerNodeCond<T>;\n markdown: MarkdownCond<T>;\n}\n\n/**\n * Insert this type as param of `DeepTransformContent` to avoid `intlayer` package pollution.\n *\n * Otherwise the the `angular-intlayer` plugins will override the types of `intlayer` functions.\n */\nexport type IInterpreterPluginState = IInterpreterPluginStateCore & {\n intlayerNode: true;\n markdown: true;\n};\n\nexport type DeepTransformContent<T> = DeepTransformContentCore<\n T,\n IInterpreterPluginState\n>;\n"],"mappings":";;;;;;;;;AA2BA,MAAaA,sBAA+B;CAC1C,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAChB,OAAO,SAAS,YAChB,OAAO,SAAS;CAClB,YAAY,OAAO,EAAE,SAAU,GAAG,WAChCC,8CAAmB;EACjB,GAAG;EACH,OAAO;EACP,iBAAiB;GACf,WAAWC;GACX,OAAO;IACL,eAAe,KAAK;IACpB,SAAS,KAAK;IACf;GACS;GACX;EACF,CAAC;CACL;;AAWD,MAAaC,uBAAgC;CAC3C,IAAI;CACJ,YAAY,SAAS,OAAO,SAAS;CACrC,YAAY,MAAc,OAAO,sBAAsB;EACrD,MAAM,EACJ,QACA,GAAG,SACD;EAoBJ,MAAM,gBAAgB,2DAlBe,KAAK,EAkBQ;GAChD,SAAS,CAjBsB;IAC/B,IAAI;IACJ,YAAY,iBACV,OAAO,iBAAiB,YACxB,OAAO,iBAAiB,YACxB,OAAO,iBAAiB,aACxB,CAAC;IACH,YAAY,cAAc,YACxBF,8CAAmB;KACjB,GAAGG;KACH,OAAO;KACP,UAAU;KACX,CAAC;IACL,CAI2B;GAC1B,eAAe,KAAK;GACpB,SAAS,EAAE;GACZ,CAAC;AAEF,SAAOH,8CAAmB;GACxB,GAAG;GACH,OAAO;GACP,iBAAiB;IACf,WAAWC;IACX,OAAO;KACL,eAAe,KAAK;KACpB,SAAS,KAAK;KACf;IACD,gBAAgB;KACd,MAAM,EAAE,mBAAmBG,sDAAa;AACxC,YAAO,eAAe,KAAK;;IAE9B;GACD,iBAAiB,EACf,UAAU,eACX;GACF,CAAC;;CAEL;AAUD,MAAaC,iBAA0B;CACrC,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAAY,MAAM,aAAaC,0BAAS;CAC1D,YAAY,MAAuB,OAAO,sBAAsB;EAC9D,MAAMC,aAAwB,CAC5B,GAAG,MAAM,SACT,EACE,MAAMD,0BAAS,UAChB,CACF;EAED,MAAM,WAAW,KAAKA,0BAAS;AAE/B,SAAO,kBAAkB,UAAU;GACjC,GAAG;GACH;GACA,SAAS;GACT,SAAS,CAAC,sBAAsB,GAAI,MAAM,WAAW,EAAE,CAAE;GAC1D,CAAC;;CAEL"}
1
+ {"version":3,"file":"plugins.cjs","names":["intlayerNodePlugins: Plugins","renderIntlayerNode","ContentSelectorWrapperComponent","markdownStringPlugin: Plugins","props","useMarkdown","markdownPlugin: Plugins","NodeType","newKeyPath: KeyPath[]"],"sources":["../../src/plugins.ts"],"sourcesContent":["import {\n type DeepTransformContent as DeepTransformContentCore,\n getMarkdownMetadata,\n type IInterpreterPluginState as IInterpreterPluginStateCore,\n type MarkdownContent,\n type Plugins,\n} from '@intlayer/core';\nimport { type KeyPath, NodeType } from '@intlayer/types';\nimport { ContentSelectorWrapperComponent } from './editor';\nimport { useMarkdown } from './markdown/installIntlayerMarkdown';\nimport { renderIntlayerNode } from './renderIntlayerNode';\n\n/** ---------------------------------------------\n * INTLAYER NODE PLUGIN\n * --------------------------------------------- */\n\nexport type IntlayerNodeCond<T> = T extends number | string\n ? IntlayerNode<T>\n : never;\n\nexport interface IntlayerNode<T, P = {}> {\n value: T;\n children?: any;\n additionalProps?: P;\n}\n\n/** Translation plugin. Replaces node with a locale string if nodeType = Translation. */\nexport const intlayerNodePlugins: Plugins = {\n id: 'intlayer-node-plugin',\n canHandle: (node) =>\n typeof node === 'bigint' ||\n typeof node === 'string' ||\n typeof node === 'number',\n transform: (_node, { children, ...rest }) =>\n renderIntlayerNode({\n ...rest,\n value: children,\n children: () => ({\n component: ContentSelectorWrapperComponent,\n props: {\n dictionaryKey: rest.dictionaryKey,\n keyPath: rest.keyPath,\n },\n children: children,\n }),\n }),\n};\n\n/**\n * MARKDOWN PLUGIN\n */\n\nexport type MarkdownStringCond<T> = T extends string\n ? IntlayerNode<string, { metadata: DeepTransformContent<string> }>\n : never;\n\n/** Markdown string plugin. Replaces string node with a component that render the markdown. */\nexport const markdownStringPlugin: Plugins = {\n id: 'markdown-string-plugin',\n canHandle: (node) => typeof node === 'string',\n transform: (node: string, props, deepTransformNode) => {\n const {\n plugins, // Removed to avoid next error - Functions cannot be passed directly to Client Components\n ...rest\n } = props;\n\n const metadata = getMarkdownMetadata(node);\n\n const metadataPlugins: Plugins = {\n id: 'markdown-metadata-plugin',\n canHandle: (metadataNode) =>\n typeof metadataNode === 'string' ||\n typeof metadataNode === 'number' ||\n typeof metadataNode === 'boolean' ||\n !metadataNode,\n transform: (metadataNode, props) =>\n renderIntlayerNode({\n ...props,\n value: metadataNode,\n children: node,\n }),\n };\n\n // Transform metadata while keeping the same structure\n const metadataNodes = deepTransformNode(metadata, {\n plugins: [metadataPlugins],\n dictionaryKey: rest.dictionaryKey,\n keyPath: [],\n });\n\n return renderIntlayerNode({\n ...props,\n value: node,\n children: () => ({\n component: ContentSelectorWrapperComponent,\n props: {\n dictionaryKey: rest.dictionaryKey,\n keyPath: rest.keyPath,\n },\n children: () => {\n const { renderMarkdown } = useMarkdown();\n return renderMarkdown(node);\n },\n }),\n additionalProps: {\n metadata: metadataNodes,\n },\n });\n },\n};\n\nexport type MarkdownCond<T> = T extends {\n nodeType: NodeType | string;\n [NodeType.Markdown]: infer M;\n metadata?: infer U;\n}\n ? IntlayerNode<DeepTransformContent<M>, { metadata: DeepTransformContent<U> }>\n : never;\n\nexport const markdownPlugin: Plugins = {\n id: 'markdown-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeType.Markdown,\n transform: (node: MarkdownContent, props, deepTransformNode) => {\n const newKeyPath: KeyPath[] = [\n ...props.keyPath,\n {\n type: NodeType.Markdown,\n },\n ];\n\n const children = node[NodeType.Markdown];\n\n return deepTransformNode(children, {\n ...props,\n children,\n keyPath: newKeyPath,\n plugins: [markdownStringPlugin, ...(props.plugins ?? [])],\n });\n },\n};\n\n/** ---------------------------------------------\n * PLUGINS RESULT\n * --------------------------------------------- */\n\nexport interface IInterpreterPluginAngular<T> {\n intlayerNode: IntlayerNodeCond<T>;\n markdown: MarkdownCond<T>;\n}\n\n/**\n * Insert this type as param of `DeepTransformContent` to avoid `intlayer` package pollution.\n *\n * Otherwise the the `angular-intlayer` plugins will override the types of `intlayer` functions.\n */\nexport type IInterpreterPluginState = IInterpreterPluginStateCore & {\n intlayerNode: true;\n markdown: true;\n};\n\nexport type DeepTransformContent<T> = DeepTransformContentCore<\n T,\n IInterpreterPluginState\n>;\n"],"mappings":";;;;;;;;;AA2BA,MAAaA,sBAA+B;CAC1C,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAChB,OAAO,SAAS,YAChB,OAAO,SAAS;CAClB,YAAY,OAAO,EAAE,UAAU,GAAG,WAChCC,8CAAmB;EACjB,GAAG;EACH,OAAO;EACP,iBAAiB;GACf,WAAWC;GACX,OAAO;IACL,eAAe,KAAK;IACpB,SAAS,KAAK;IACf;GACS;GACX;EACF,CAAC;CACL;;AAWD,MAAaC,uBAAgC;CAC3C,IAAI;CACJ,YAAY,SAAS,OAAO,SAAS;CACrC,YAAY,MAAc,OAAO,sBAAsB;EACrD,MAAM,EACJ,SACA,GAAG,SACD;EAoBJ,MAAM,gBAAgB,2DAlBe,KAAK,EAkBQ;GAChD,SAAS,CAjBsB;IAC/B,IAAI;IACJ,YAAY,iBACV,OAAO,iBAAiB,YACxB,OAAO,iBAAiB,YACxB,OAAO,iBAAiB,aACxB,CAAC;IACH,YAAY,cAAc,YACxBF,8CAAmB;KACjB,GAAGG;KACH,OAAO;KACP,UAAU;KACX,CAAC;IACL,CAI2B;GAC1B,eAAe,KAAK;GACpB,SAAS,EAAE;GACZ,CAAC;AAEF,SAAOH,8CAAmB;GACxB,GAAG;GACH,OAAO;GACP,iBAAiB;IACf,WAAWC;IACX,OAAO;KACL,eAAe,KAAK;KACpB,SAAS,KAAK;KACf;IACD,gBAAgB;KACd,MAAM,EAAE,mBAAmBG,sDAAa;AACxC,YAAO,eAAe,KAAK;;IAE9B;GACD,iBAAiB,EACf,UAAU,eACX;GACF,CAAC;;CAEL;AAUD,MAAaC,iBAA0B;CACrC,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAAY,MAAM,aAAaC,0BAAS;CAC1D,YAAY,MAAuB,OAAO,sBAAsB;EAC9D,MAAMC,aAAwB,CAC5B,GAAG,MAAM,SACT,EACE,MAAMD,0BAAS,UAChB,CACF;EAED,MAAM,WAAW,KAAKA,0BAAS;AAE/B,SAAO,kBAAkB,UAAU;GACjC,GAAG;GACH;GACA,SAAS;GACT,SAAS,CAAC,sBAAsB,GAAI,MAAM,WAAW,EAAE,CAAE;GAC1D,CAAC;;CAEL"}
@@ -9,7 +9,7 @@ import { NodeType } from "@intlayer/types";
9
9
  const intlayerNodePlugins = {
10
10
  id: "intlayer-node-plugin",
11
11
  canHandle: (node) => typeof node === "bigint" || typeof node === "string" || typeof node === "number",
12
- transform: (_node, { children,...rest }) => renderIntlayerNode({
12
+ transform: (_node, { children, ...rest }) => renderIntlayerNode({
13
13
  ...rest,
14
14
  value: children,
15
15
  children: () => ({
@@ -27,7 +27,7 @@ const markdownStringPlugin = {
27
27
  id: "markdown-string-plugin",
28
28
  canHandle: (node) => typeof node === "string",
29
29
  transform: (node, props, deepTransformNode) => {
30
- const { plugins,...rest } = props;
30
+ const { plugins, ...rest } = props;
31
31
  const metadataNodes = deepTransformNode(getMarkdownMetadata(node), {
32
32
  plugins: [{
33
33
  id: "markdown-metadata-plugin",
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.mjs","names":["intlayerNodePlugins: Plugins","markdownStringPlugin: Plugins","props","markdownPlugin: Plugins","newKeyPath: KeyPath[]"],"sources":["../../src/plugins.ts"],"sourcesContent":["import {\n type DeepTransformContent as DeepTransformContentCore,\n getMarkdownMetadata,\n type IInterpreterPluginState as IInterpreterPluginStateCore,\n type MarkdownContent,\n type Plugins,\n} from '@intlayer/core';\nimport { type KeyPath, NodeType } from '@intlayer/types';\nimport { ContentSelectorWrapperComponent } from './editor';\nimport { useMarkdown } from './markdown/installIntlayerMarkdown';\nimport { renderIntlayerNode } from './renderIntlayerNode';\n\n/** ---------------------------------------------\n * INTLAYER NODE PLUGIN\n * --------------------------------------------- */\n\nexport type IntlayerNodeCond<T> = T extends number | string\n ? IntlayerNode<T>\n : never;\n\nexport interface IntlayerNode<T, P = {}> {\n value: T;\n children?: any;\n additionalProps?: P;\n}\n\n/** Translation plugin. Replaces node with a locale string if nodeType = Translation. */\nexport const intlayerNodePlugins: Plugins = {\n id: 'intlayer-node-plugin',\n canHandle: (node) =>\n typeof node === 'bigint' ||\n typeof node === 'string' ||\n typeof node === 'number',\n transform: (_node, { children, ...rest }) =>\n renderIntlayerNode({\n ...rest,\n value: children,\n children: () => ({\n component: ContentSelectorWrapperComponent,\n props: {\n dictionaryKey: rest.dictionaryKey,\n keyPath: rest.keyPath,\n },\n children: children,\n }),\n }),\n};\n\n/**\n * MARKDOWN PLUGIN\n */\n\nexport type MarkdownStringCond<T> = T extends string\n ? IntlayerNode<string, { metadata: DeepTransformContent<string> }>\n : never;\n\n/** Markdown string plugin. Replaces string node with a component that render the markdown. */\nexport const markdownStringPlugin: Plugins = {\n id: 'markdown-string-plugin',\n canHandle: (node) => typeof node === 'string',\n transform: (node: string, props, deepTransformNode) => {\n const {\n plugins, // Removed to avoid next error - Functions cannot be passed directly to Client Components\n ...rest\n } = props;\n\n const metadata = getMarkdownMetadata(node);\n\n const metadataPlugins: Plugins = {\n id: 'markdown-metadata-plugin',\n canHandle: (metadataNode) =>\n typeof metadataNode === 'string' ||\n typeof metadataNode === 'number' ||\n typeof metadataNode === 'boolean' ||\n !metadataNode,\n transform: (metadataNode, props) =>\n renderIntlayerNode({\n ...props,\n value: metadataNode,\n children: node,\n }),\n };\n\n // Transform metadata while keeping the same structure\n const metadataNodes = deepTransformNode(metadata, {\n plugins: [metadataPlugins],\n dictionaryKey: rest.dictionaryKey,\n keyPath: [],\n });\n\n return renderIntlayerNode({\n ...props,\n value: node,\n children: () => ({\n component: ContentSelectorWrapperComponent,\n props: {\n dictionaryKey: rest.dictionaryKey,\n keyPath: rest.keyPath,\n },\n children: () => {\n const { renderMarkdown } = useMarkdown();\n return renderMarkdown(node);\n },\n }),\n additionalProps: {\n metadata: metadataNodes,\n },\n });\n },\n};\n\nexport type MarkdownCond<T> = T extends {\n nodeType: NodeType | string;\n [NodeType.Markdown]: infer M;\n metadata?: infer U;\n}\n ? IntlayerNode<DeepTransformContent<M>, { metadata: DeepTransformContent<U> }>\n : never;\n\nexport const markdownPlugin: Plugins = {\n id: 'markdown-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeType.Markdown,\n transform: (node: MarkdownContent, props, deepTransformNode) => {\n const newKeyPath: KeyPath[] = [\n ...props.keyPath,\n {\n type: NodeType.Markdown,\n },\n ];\n\n const children = node[NodeType.Markdown];\n\n return deepTransformNode(children, {\n ...props,\n children,\n keyPath: newKeyPath,\n plugins: [markdownStringPlugin, ...(props.plugins ?? [])],\n });\n },\n};\n\n/** ---------------------------------------------\n * PLUGINS RESULT\n * --------------------------------------------- */\n\nexport interface IInterpreterPluginAngular<T> {\n intlayerNode: IntlayerNodeCond<T>;\n markdown: MarkdownCond<T>;\n}\n\n/**\n * Insert this type as param of `DeepTransformContent` to avoid `intlayer` package pollution.\n *\n * Otherwise the the `angular-intlayer` plugins will override the types of `intlayer` functions.\n */\nexport type IInterpreterPluginState = IInterpreterPluginStateCore & {\n intlayerNode: true;\n markdown: true;\n};\n\nexport type DeepTransformContent<T> = DeepTransformContentCore<\n T,\n IInterpreterPluginState\n>;\n"],"mappings":";;;;;;;;AA2BA,MAAaA,sBAA+B;CAC1C,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAChB,OAAO,SAAS,YAChB,OAAO,SAAS;CAClB,YAAY,OAAO,EAAE,SAAU,GAAG,WAChC,mBAAmB;EACjB,GAAG;EACH,OAAO;EACP,iBAAiB;GACf,WAAW;GACX,OAAO;IACL,eAAe,KAAK;IACpB,SAAS,KAAK;IACf;GACS;GACX;EACF,CAAC;CACL;;AAWD,MAAaC,uBAAgC;CAC3C,IAAI;CACJ,YAAY,SAAS,OAAO,SAAS;CACrC,YAAY,MAAc,OAAO,sBAAsB;EACrD,MAAM,EACJ,QACA,GAAG,SACD;EAoBJ,MAAM,gBAAgB,kBAlBL,oBAAoB,KAAK,EAkBQ;GAChD,SAAS,CAjBsB;IAC/B,IAAI;IACJ,YAAY,iBACV,OAAO,iBAAiB,YACxB,OAAO,iBAAiB,YACxB,OAAO,iBAAiB,aACxB,CAAC;IACH,YAAY,cAAc,YACxB,mBAAmB;KACjB,GAAGC;KACH,OAAO;KACP,UAAU;KACX,CAAC;IACL,CAI2B;GAC1B,eAAe,KAAK;GACpB,SAAS,EAAE;GACZ,CAAC;AAEF,SAAO,mBAAmB;GACxB,GAAG;GACH,OAAO;GACP,iBAAiB;IACf,WAAW;IACX,OAAO;KACL,eAAe,KAAK;KACpB,SAAS,KAAK;KACf;IACD,gBAAgB;KACd,MAAM,EAAE,mBAAmB,aAAa;AACxC,YAAO,eAAe,KAAK;;IAE9B;GACD,iBAAiB,EACf,UAAU,eACX;GACF,CAAC;;CAEL;AAUD,MAAaC,iBAA0B;CACrC,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAAY,MAAM,aAAa,SAAS;CAC1D,YAAY,MAAuB,OAAO,sBAAsB;EAC9D,MAAMC,aAAwB,CAC5B,GAAG,MAAM,SACT,EACE,MAAM,SAAS,UAChB,CACF;EAED,MAAM,WAAW,KAAK,SAAS;AAE/B,SAAO,kBAAkB,UAAU;GACjC,GAAG;GACH;GACA,SAAS;GACT,SAAS,CAAC,sBAAsB,GAAI,MAAM,WAAW,EAAE,CAAE;GAC1D,CAAC;;CAEL"}
1
+ {"version":3,"file":"plugins.mjs","names":["intlayerNodePlugins: Plugins","markdownStringPlugin: Plugins","props","markdownPlugin: Plugins","newKeyPath: KeyPath[]"],"sources":["../../src/plugins.ts"],"sourcesContent":["import {\n type DeepTransformContent as DeepTransformContentCore,\n getMarkdownMetadata,\n type IInterpreterPluginState as IInterpreterPluginStateCore,\n type MarkdownContent,\n type Plugins,\n} from '@intlayer/core';\nimport { type KeyPath, NodeType } from '@intlayer/types';\nimport { ContentSelectorWrapperComponent } from './editor';\nimport { useMarkdown } from './markdown/installIntlayerMarkdown';\nimport { renderIntlayerNode } from './renderIntlayerNode';\n\n/** ---------------------------------------------\n * INTLAYER NODE PLUGIN\n * --------------------------------------------- */\n\nexport type IntlayerNodeCond<T> = T extends number | string\n ? IntlayerNode<T>\n : never;\n\nexport interface IntlayerNode<T, P = {}> {\n value: T;\n children?: any;\n additionalProps?: P;\n}\n\n/** Translation plugin. Replaces node with a locale string if nodeType = Translation. */\nexport const intlayerNodePlugins: Plugins = {\n id: 'intlayer-node-plugin',\n canHandle: (node) =>\n typeof node === 'bigint' ||\n typeof node === 'string' ||\n typeof node === 'number',\n transform: (_node, { children, ...rest }) =>\n renderIntlayerNode({\n ...rest,\n value: children,\n children: () => ({\n component: ContentSelectorWrapperComponent,\n props: {\n dictionaryKey: rest.dictionaryKey,\n keyPath: rest.keyPath,\n },\n children: children,\n }),\n }),\n};\n\n/**\n * MARKDOWN PLUGIN\n */\n\nexport type MarkdownStringCond<T> = T extends string\n ? IntlayerNode<string, { metadata: DeepTransformContent<string> }>\n : never;\n\n/** Markdown string plugin. Replaces string node with a component that render the markdown. */\nexport const markdownStringPlugin: Plugins = {\n id: 'markdown-string-plugin',\n canHandle: (node) => typeof node === 'string',\n transform: (node: string, props, deepTransformNode) => {\n const {\n plugins, // Removed to avoid next error - Functions cannot be passed directly to Client Components\n ...rest\n } = props;\n\n const metadata = getMarkdownMetadata(node);\n\n const metadataPlugins: Plugins = {\n id: 'markdown-metadata-plugin',\n canHandle: (metadataNode) =>\n typeof metadataNode === 'string' ||\n typeof metadataNode === 'number' ||\n typeof metadataNode === 'boolean' ||\n !metadataNode,\n transform: (metadataNode, props) =>\n renderIntlayerNode({\n ...props,\n value: metadataNode,\n children: node,\n }),\n };\n\n // Transform metadata while keeping the same structure\n const metadataNodes = deepTransformNode(metadata, {\n plugins: [metadataPlugins],\n dictionaryKey: rest.dictionaryKey,\n keyPath: [],\n });\n\n return renderIntlayerNode({\n ...props,\n value: node,\n children: () => ({\n component: ContentSelectorWrapperComponent,\n props: {\n dictionaryKey: rest.dictionaryKey,\n keyPath: rest.keyPath,\n },\n children: () => {\n const { renderMarkdown } = useMarkdown();\n return renderMarkdown(node);\n },\n }),\n additionalProps: {\n metadata: metadataNodes,\n },\n });\n },\n};\n\nexport type MarkdownCond<T> = T extends {\n nodeType: NodeType | string;\n [NodeType.Markdown]: infer M;\n metadata?: infer U;\n}\n ? IntlayerNode<DeepTransformContent<M>, { metadata: DeepTransformContent<U> }>\n : never;\n\nexport const markdownPlugin: Plugins = {\n id: 'markdown-plugin',\n canHandle: (node) =>\n typeof node === 'object' && node?.nodeType === NodeType.Markdown,\n transform: (node: MarkdownContent, props, deepTransformNode) => {\n const newKeyPath: KeyPath[] = [\n ...props.keyPath,\n {\n type: NodeType.Markdown,\n },\n ];\n\n const children = node[NodeType.Markdown];\n\n return deepTransformNode(children, {\n ...props,\n children,\n keyPath: newKeyPath,\n plugins: [markdownStringPlugin, ...(props.plugins ?? [])],\n });\n },\n};\n\n/** ---------------------------------------------\n * PLUGINS RESULT\n * --------------------------------------------- */\n\nexport interface IInterpreterPluginAngular<T> {\n intlayerNode: IntlayerNodeCond<T>;\n markdown: MarkdownCond<T>;\n}\n\n/**\n * Insert this type as param of `DeepTransformContent` to avoid `intlayer` package pollution.\n *\n * Otherwise the the `angular-intlayer` plugins will override the types of `intlayer` functions.\n */\nexport type IInterpreterPluginState = IInterpreterPluginStateCore & {\n intlayerNode: true;\n markdown: true;\n};\n\nexport type DeepTransformContent<T> = DeepTransformContentCore<\n T,\n IInterpreterPluginState\n>;\n"],"mappings":";;;;;;;;AA2BA,MAAaA,sBAA+B;CAC1C,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAChB,OAAO,SAAS,YAChB,OAAO,SAAS;CAClB,YAAY,OAAO,EAAE,UAAU,GAAG,WAChC,mBAAmB;EACjB,GAAG;EACH,OAAO;EACP,iBAAiB;GACf,WAAW;GACX,OAAO;IACL,eAAe,KAAK;IACpB,SAAS,KAAK;IACf;GACS;GACX;EACF,CAAC;CACL;;AAWD,MAAaC,uBAAgC;CAC3C,IAAI;CACJ,YAAY,SAAS,OAAO,SAAS;CACrC,YAAY,MAAc,OAAO,sBAAsB;EACrD,MAAM,EACJ,SACA,GAAG,SACD;EAoBJ,MAAM,gBAAgB,kBAlBL,oBAAoB,KAAK,EAkBQ;GAChD,SAAS,CAjBsB;IAC/B,IAAI;IACJ,YAAY,iBACV,OAAO,iBAAiB,YACxB,OAAO,iBAAiB,YACxB,OAAO,iBAAiB,aACxB,CAAC;IACH,YAAY,cAAc,YACxB,mBAAmB;KACjB,GAAGC;KACH,OAAO;KACP,UAAU;KACX,CAAC;IACL,CAI2B;GAC1B,eAAe,KAAK;GACpB,SAAS,EAAE;GACZ,CAAC;AAEF,SAAO,mBAAmB;GACxB,GAAG;GACH,OAAO;GACP,iBAAiB;IACf,WAAW;IACX,OAAO;KACL,eAAe,KAAK;KACpB,SAAS,KAAK;KACf;IACD,gBAAgB;KACd,MAAM,EAAE,mBAAmB,aAAa;AACxC,YAAO,eAAe,KAAK;;IAE9B;GACD,iBAAiB,EACf,UAAU,eACX;GACF,CAAC;;CAEL;AAUD,MAAaC,iBAA0B;CACrC,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAAY,MAAM,aAAa,SAAS;CAC1D,YAAY,MAAuB,OAAO,sBAAsB;EAC9D,MAAMC,aAAwB,CAC5B,GAAG,MAAM,SACT,EACE,MAAM,SAAS,UAChB,CACF;EAED,MAAM,WAAW,KAAK,SAAS;AAE/B,SAAO,kBAAkB,UAAU;GACjC,GAAG;GACH;GACA,SAAS;GACT,SAAS,CAAC,sBAAsB,GAAI,MAAM,WAAW,EAAE,CAAE;GAC1D,CAAC;;CAEL"}
@@ -1,11 +1,11 @@
1
- import * as _angular_core4 from "@angular/core";
1
+ import * as _angular_core0 from "@angular/core";
2
2
  import { InjectionToken, Signal } from "@angular/core";
3
3
  import { LocalesValues } from "@intlayer/types";
4
4
 
5
5
  //#region src/client/installIntlayer.d.ts
6
6
  declare const INTLAYER_TOKEN: InjectionToken<IntlayerProvider>;
7
7
  declare class IntlayerProvider {
8
- isCookieEnabled: _angular_core4.WritableSignal<boolean>;
8
+ isCookieEnabled: _angular_core0.WritableSignal<boolean>;
9
9
  private _locale;
10
10
  readonly locale: Signal<LocalesValues>;
11
11
  setLocale: (locale: LocalesValues) => void;
@@ -1,8 +1,8 @@
1
1
  import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
2
2
  import "../index.js";
3
+ import * as _intlayer_types0 from "@intlayer/types";
3
4
  import { Dictionary, DictionaryKeys, LocalesValues, StrictModeLocaleMap } from "@intlayer/types";
4
5
  import * as _intlayer_core1 from "@intlayer/core";
5
- import * as intlayer0 from "intlayer";
6
6
 
7
7
  //#region src/client/useDictionaryDynamic.d.ts
8
8
  /**
@@ -10,7 +10,7 @@ import * as intlayer0 from "intlayer";
10
10
  *
11
11
  * If the locale is not provided, it will use the locale from the client context
12
12
  */
13
- declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => _intlayer_core1.DeepTransformContent<T["content"], IInterpreterPluginState$1, intlayer0.Locale>;
13
+ declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => _intlayer_core1.DeepTransformContent<T["content"], IInterpreterPluginState$1, _intlayer_types0.Locale>;
14
14
  //#endregion
15
15
  export { useDictionaryDynamic };
16
16
  //# sourceMappingURL=useDictionaryDynamic.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;cAmBa,iCACD,sBACA,mCAES,0BAA0B,QAAQ,UAChD,YACI,kBAAa,eAAA,CAAA,qBAAA,cAAA,yBAAA,EAAA,SAAA,CAAA,MAAA"}
1
+ {"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;cAmBa,iCACD,sBACA,mCAES,0BAA0B,QAAQ,UAChD,YACI,kBAAa,eAAA,CAAA,qBAAA,cAAA,yBAAA,EAAA,gBAAA,CAAA,MAAA"}
@@ -1,6 +1,6 @@
1
- import * as _angular_core5 from "@angular/core";
1
+ import * as _angular_core2 from "@angular/core";
2
+ import * as _intlayer_types4 from "@intlayer/types";
2
3
  import { LocalesValues } from "@intlayer/types";
3
- import * as intlayer0 from "intlayer";
4
4
 
5
5
  //#region src/client/useLocale.d.ts
6
6
  type useLocaleProps = {
@@ -14,9 +14,9 @@ declare const useLocale: ({
14
14
  isCookieEnabled,
15
15
  onLocaleChange
16
16
  }?: useLocaleProps) => {
17
- locale: _angular_core5.Signal<"af" | "af-ZA" | "ar" | "ar-AE" | "ar-BH" | "ar-DZ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-OM" | "ar-QA" | "ar-SA" | "ar-SY" | "ar-TN" | "ar-YE" | "az" | "az-AZ" | "be" | "be-BY" | "bg" | "bg-BG" | "bs" | "bs-BA" | "ca" | "ca-ES" | "cs" | "cs-CZ" | "cy" | "cy-GB" | "da" | "da-DK" | "de" | "de-AT" | "de-CH" | "de-DE" | "de-LI" | "de-LU" | "dv" | "dv-MV" | "el" | "el-GR" | "en" | "en-AU" | "en-BZ" | "en-CA" | "en-CB" | "en-GB" | "en-IE" | "en-JM" | "en-NZ" | "en-PH" | "en-TT" | "en-US" | "en-ZA" | "en-ZW" | "eo" | "es" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-DO" | "es-EC" | "es-ES" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PE" | "es-PR" | "es-PY" | "es-SV" | "es-UY" | "es-VE" | "et" | "et-EE" | "eu" | "eu-ES" | "fa" | "fa-IR" | "fi" | "fi-FI" | "fo" | "fo-FO" | "fr" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "fr-LU" | "fr-MC" | "gl" | "gl-ES" | "gu" | "gu-IN" | "he" | "he-IL" | "hi" | "hi-IN" | "hr" | "hr-BA" | "hr-HR" | "hu" | "hu-HU" | "hy" | "hy-AM" | "id" | "id-ID" | "is" | "is-IS" | "it" | "it-CH" | "it-IT" | "ja" | "ja-JP" | "ka" | "ka-GE" | "kk" | "kk-KZ" | "kn" | "kn-IN" | "ko" | "ko-KR" | "kok" | "kok-IN" | "ky" | "ky-KG" | "lt" | "lt-LT" | "lv" | "lv-LV" | "mi" | "mi-NZ" | "mk" | "mk-MK" | "mn" | "mn-MN" | "mr" | "mr-IN" | "ms" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "nb" | "nb-NO" | "nl" | "nl-BE" | "nl-NL" | "nn-NO" | "ns" | "ns-ZA" | "pa" | "pa-IN" | "pl" | "pl-PL" | "ps" | "ps-AR" | "pt" | "pt-BR" | "pt-PT" | "qu" | "qu-BO" | "qu-EC" | "qu-PE" | "ro" | "ro-RO" | "ru" | "ru-RU" | "sa" | "sa-IN" | "se" | "se-FI" | "se-NO" | "se-SE" | "sk" | "sk-SK" | "sl" | "sl-SI" | "sq" | "sq-AL" | "sr" | "sr-BA" | "sr-SP" | "sv" | "sv-FI" | "sv-SE" | "sw" | "sw-KE" | "syr" | "syr-SY" | "ta" | "ta-IN" | "te" | "te-IN" | "th" | "th-TH" | "tl" | "tl-PH" | "tn" | "tn-ZA" | "tr" | "tr-TR" | "tt" | "tt-RU" | "ts" | "uk" | "uk-UA" | "ur" | "ur-PK" | "uz" | "uz-UZ" | "vi" | "vi-VN" | "xh" | "xh-ZA" | "zh" | "zh-Hans" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-SG" | "zh-Hant" | "zu" | "zu-ZA" | "bn" | "bn-BD" | "bn-IN" | "bn-MM" | "my" | "my-MM" | "km" | "km-KH" | "lo" | "lo-LA" | "yo" | "yo-NG" | "am" | "am-ET" | "ne" | "ne-NP" | "si" | "si-LK" | "sr-Cyrl" | "sr-RS" | "en-IN" | "en-SG" | "en-HK" | "en-NG" | "en-PK" | "en-MY" | "en-BW" | "en-KE" | "en-TZ" | "en-GH" | "en-UG" | "es-CU" | "es-US" | "pt-GW" | "pt-MZ" | "pt-ST" | "pt-CV" | "pt-TL" | "pt-MO" | "zh-TW" | "ar-MR" | "ar-PS" | "ar-SD" | "ar-DJ" | "ar-SO" | "ar-TD" | "ar-KM" | (string & {})>;
18
- defaultLocale: intlayer0.Locale;
19
- availableLocales: intlayer0.Locale[];
17
+ locale: _angular_core2.Signal<"af" | "af-ZA" | "ar" | "ar-AE" | "ar-BH" | "ar-DZ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-OM" | "ar-QA" | "ar-SA" | "ar-SY" | "ar-TN" | "ar-YE" | "az" | "az-AZ" | "be" | "be-BY" | "bg" | "bg-BG" | "bs" | "bs-BA" | "ca" | "ca-ES" | "cs" | "cs-CZ" | "cy" | "cy-GB" | "da" | "da-DK" | "de" | "de-AT" | "de-CH" | "de-DE" | "de-LI" | "de-LU" | "dv" | "dv-MV" | "el" | "el-GR" | "en" | "en-AU" | "en-BZ" | "en-CA" | "en-CB" | "en-GB" | "en-IE" | "en-JM" | "en-NZ" | "en-PH" | "en-TT" | "en-US" | "en-ZA" | "en-ZW" | "eo" | "es" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-DO" | "es-EC" | "es-ES" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PE" | "es-PR" | "es-PY" | "es-SV" | "es-UY" | "es-VE" | "et" | "et-EE" | "eu" | "eu-ES" | "fa" | "fa-IR" | "fi" | "fi-FI" | "fo" | "fo-FO" | "fr" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "fr-LU" | "fr-MC" | "gl" | "gl-ES" | "gu" | "gu-IN" | "he" | "he-IL" | "hi" | "hi-IN" | "hr" | "hr-BA" | "hr-HR" | "hu" | "hu-HU" | "hy" | "hy-AM" | "id" | "id-ID" | "is" | "is-IS" | "it" | "it-CH" | "it-IT" | "ja" | "ja-JP" | "ka" | "ka-GE" | "kk" | "kk-KZ" | "kn" | "kn-IN" | "ko" | "ko-KR" | "kok" | "kok-IN" | "ky" | "ky-KG" | "lt" | "lt-LT" | "lv" | "lv-LV" | "mi" | "mi-NZ" | "mk" | "mk-MK" | "mn" | "mn-MN" | "mr" | "mr-IN" | "ms" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "nb" | "nb-NO" | "nl" | "nl-BE" | "nl-NL" | "nn-NO" | "ns" | "ns-ZA" | "pa" | "pa-IN" | "pl" | "pl-PL" | "ps" | "ps-AR" | "pt" | "pt-BR" | "pt-PT" | "qu" | "qu-BO" | "qu-EC" | "qu-PE" | "ro" | "ro-RO" | "ru" | "ru-RU" | "sa" | "sa-IN" | "se" | "se-FI" | "se-NO" | "se-SE" | "sk" | "sk-SK" | "sl" | "sl-SI" | "sq" | "sq-AL" | "sr" | "sr-BA" | "sr-SP" | "sv" | "sv-FI" | "sv-SE" | "sw" | "sw-KE" | "syr" | "syr-SY" | "ta" | "ta-IN" | "te" | "te-IN" | "th" | "th-TH" | "tl" | "tl-PH" | "tn" | "tn-ZA" | "tr" | "tr-TR" | "tt" | "tt-RU" | "ts" | "uk" | "uk-UA" | "ur" | "ur-PK" | "uz" | "uz-UZ" | "vi" | "vi-VN" | "xh" | "xh-ZA" | "zh" | "zh-Hans" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-SG" | "zh-Hant" | "zu" | "zu-ZA" | "bn" | "bn-BD" | "bn-IN" | "bn-MM" | "my" | "my-MM" | "km" | "km-KH" | "lo" | "lo-LA" | "yo" | "yo-NG" | "am" | "am-ET" | "ne" | "ne-NP" | "si" | "si-LK" | "sr-Cyrl" | "sr-RS" | "en-IN" | "en-SG" | "en-HK" | "en-NG" | "en-PK" | "en-MY" | "en-BW" | "en-KE" | "en-TZ" | "en-GH" | "en-UG" | "es-CU" | "es-US" | "pt-GW" | "pt-MZ" | "pt-ST" | "pt-CV" | "pt-TL" | "pt-MO" | "zh-TW" | "ar-MR" | "ar-PS" | "ar-SD" | "ar-DJ" | "ar-SO" | "ar-TD" | "ar-KM" | (string & {})>;
18
+ defaultLocale: _intlayer_types4.Locale;
19
+ availableLocales: _intlayer_types4.Locale[];
20
20
  setLocale: (newLocale: LocalesValues) => void;
21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;CAAA"}
@@ -1,5 +1,5 @@
1
+ import * as _intlayer_types0 from "@intlayer/types";
1
2
  import { LocalesValues } from "@intlayer/types";
2
- import * as intlayer2 from "intlayer";
3
3
 
4
4
  //#region src/client/useLocaleStorage.d.ts
5
5
 
@@ -9,13 +9,13 @@ import * as intlayer2 from "intlayer";
9
9
  /**
10
10
  * Get the locale cookie
11
11
  */
12
- declare const localeInStorage: intlayer2.Locale;
12
+ declare const localeInStorage: _intlayer_types0.Locale;
13
13
  /**
14
14
  * @deprecated Use localeInStorage instead
15
15
  *
16
16
  * Get the locale cookie
17
17
  */
18
- declare const localeCookie: intlayer2.Locale;
18
+ declare const localeCookie: _intlayer_types0.Locale;
19
19
  /**
20
20
  * Set the locale cookie
21
21
  */
@@ -30,7 +30,7 @@ declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled: boolean)
30
30
  * Hook that provides the locale storage and a function to set it
31
31
  */
32
32
  declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
33
- getLocale: () => intlayer2.Locale;
33
+ getLocale: () => _intlayer_types0.Locale;
34
34
  setLocale: (locale: LocalesValues) => void;
35
35
  };
36
36
  /**
@@ -41,7 +41,7 @@ declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
41
41
  * Hook that provides the locale cookie and a function to set it
42
42
  */
43
43
  declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
44
- localeCookie: intlayer2.Locale;
44
+ localeCookie: _intlayer_types0.Locale;
45
45
  setLocaleCookie: (locale: LocalesValues) => void;
46
46
  };
47
47
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAcA;AAMA;AAKA;AAca,cAzBA,eAYH,EAZ+D,SAAA,CAA7C,MAYL;AAkBvB;AAaA;;;;cArCa,cAA8B,SAAA,CAAlB;;;;cAKZ,6BACH;;;;;;cAaG,0BAbH;;;;cAkBG;mBAIT,SAAA,CAAA;sBAAA;;;;;;;;;cASS;gBAOZ,SAAA,CAAA;4BAAA"}
1
+ {"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAcA;AAMA;AAKA;AAca,cAzBA,eAYH,EAZ+D,gBAAA,CAA7C,MAYL;AAkBvB;AAaA;;;;cArCa,cAA8B,gBAAA,CAAlB;;;;cAKZ,6BACH;;;;;;cAaG,0BAbH;;;;cAkBG;mBAIT,gBAAA,CAAA;sBAAA;;;;;;;;;cASS;gBAOZ,gBAAA,CAAA;4BAAA"}
@@ -1,4 +1,4 @@
1
- import * as _angular_core1 from "@angular/core";
1
+ import * as _angular_core3 from "@angular/core";
2
2
  import { KeyPath, Locale } from "@intlayer/types";
3
3
 
4
4
  //#region src/editor/EditedContentRenderer.component.d.ts
@@ -16,7 +16,7 @@ declare class EditedContentRendererComponent {
16
16
  /**
17
17
  * Object → getContent → string, same as the React version.
18
18
  */
19
- renderedContent: _angular_core1.Signal<string>;
19
+ renderedContent: _angular_core3.Signal<string>;
20
20
  }
21
21
  //#endregion
22
22
  export { EditedContentRendererComponent, EditedContentRendererProps };
@@ -1,5 +1,5 @@
1
1
  import { useCrossFrameState } from "./useCrossFrameState.js";
2
- import * as _angular_core2 from "@angular/core";
2
+ import * as _angular_core4 from "@angular/core";
3
3
 
4
4
  //#region src/editor/useCrossURLPathState.d.ts
5
5
 
@@ -9,14 +9,14 @@ import * as _angular_core2 from "@angular/core";
9
9
  * @param opts - Options for controlling emit and receive behavior
10
10
  * @returns A tuple containing [state signal, setState function, forceSync function]
11
11
  */
12
- declare const useCrossURLPathState: (initial?: string, opts?: Parameters<typeof useCrossFrameState>[2]) => [_angular_core2.Signal<string>, (v: string | ((prev: string) => string)) => void, () => void];
12
+ declare const useCrossURLPathState: (initial?: string, opts?: Parameters<typeof useCrossFrameState>[2]) => [_angular_core4.Signal<string>, (v: string | ((prev: string) => string)) => void, () => void];
13
13
  /**
14
14
  * Hook for host applications to push URL path changes into the shared state
15
15
  * This also monkey patches history methods to capture navigation events
16
16
  * @param initial - The initial URL path
17
17
  * @returns A tuple containing [state signal, setState function]
18
18
  */
19
- declare const useCrossURLPathSetter: (initial?: string) => readonly [_angular_core2.Signal<string>, (v: string | ((prev: string) => string)) => void];
19
+ declare const useCrossURLPathSetter: (initial?: string) => readonly [_angular_core4.Signal<string>, (v: string | ((prev: string) => string)) => void];
20
20
  //#endregion
21
21
  export { useCrossURLPathSetter, useCrossURLPathState };
22
22
  //# sourceMappingURL=useCrossURLPathState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.d.ts","names":[],"sources":["../../src/plugins.ts"],"sourcesContent":[],"mappings":";;;;;;;AAgBA;AAAkC,KAAtB,gBAAsB,CAAA,CAAA,CAAA,GAAA,CAAA,SAAA,MAAA,GAAA,MAAA,GAC9B,YAD8B,CACjB,CADiB,CAAA,GAAA,KAAA;AACjB,UAGA,YAHA,CAAA,CAAA,EAAA,IAAA,CAAA,CAAA,CAAA,CAAA;EAAb,KAAA,EAIK,CAJL;EAAY,QAAA,CAAA,EAAA,GAAA;EAGC,eAAY,CAAA,EAGT,CAHS;AAO7B;AAyBA;AAAoC,cAzBvB,mBAyBuB,EAzBF,OAyBE;;;;AAKvB,KALD,kBAyDX,CAAA,CAAA,CAAA,GAzDmC,CAyDnC,SAAA,MAAA,GAxDG,YAwDH,CAAA,MAAA,EAAA;EAEW,QAAA,EA1DyB,oBA0Db,CAAA,MAAA,CAAA;CAAM,CAAA,GAAA,KAAA;;AAE3B,cAxDU,oBAwDD,EAxDuB,OAwDvB;AAG0B,KAL1B,YAK0B,CAAA,CAAA,CAAA,GALR,CAKQ,SAAA;EAArB,QAAA,EAJL,QAIK,GAAA,MAAA;EAA0D,CAHxE,QAAA,CAAS,QAAA,CAG+D,EAAA,KAAA,EAAA;EAArB,QAAA,CAAA,EAAA,KAAA,EAAA;CAAlD,GAAA,YAAA,CAAa,oBA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AA,EAAsC,oBAAtC,CAA2D,CAA3D,CAAA;AAGhB,CAAA,CAAA,GAAa,KAAA;AA2BI,cA3BJ,cA2B6B,EA3Bb,OA2Ba;;;;AAE9B,UAFK,yBAEL,CAAA,CAAA,CAAA,CAAA;EAAY,YAAA,EADR,gBACQ,CADS,CACT,CAAA;EAQZ,QAAA,EARA,YAQA,CARa,CAQb,CAAA;AAKZ;;;;;;KALY,uBAAA,GAA0B;;;;KAK1B,0BAA0B,uBACpC,GACA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-intlayer",
3
- "version": "7.1.5",
3
+ "version": "7.1.7",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your Angular applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -84,13 +84,13 @@
84
84
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
85
85
  },
86
86
  "dependencies": {
87
- "@intlayer/chokidar": "7.1.5",
88
- "@intlayer/config": "7.1.5",
89
- "@intlayer/core": "7.1.5",
90
- "@intlayer/dictionaries-entry": "7.1.5",
91
- "@intlayer/editor": "7.1.5",
92
- "@intlayer/types": "7.1.5",
93
- "@intlayer/webpack": "7.1.5",
87
+ "@intlayer/chokidar": "7.1.7",
88
+ "@intlayer/config": "7.1.7",
89
+ "@intlayer/core": "7.1.7",
90
+ "@intlayer/dictionaries-entry": "7.1.7",
91
+ "@intlayer/editor": "7.1.7",
92
+ "@intlayer/types": "7.1.7",
93
+ "@intlayer/webpack": "7.1.7",
94
94
  "deepmerge": "4.3.1"
95
95
  },
96
96
  "devDependencies": {
@@ -102,7 +102,7 @@
102
102
  "rimraf": "6.1.0",
103
103
  "tsdown": "0.16.5",
104
104
  "typescript": "5.9.3",
105
- "vitest": "4.0.8"
105
+ "vitest": "4.0.10"
106
106
  },
107
107
  "peerDependencies": {
108
108
  "@angular/common": "15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0",