react-intlayer 5.2.5 → 5.2.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.
@@ -28,7 +28,7 @@ const rendererIntlayerNode = ({
28
28
  children
29
29
  }) => {
30
30
  const element = (0, import_react.isValidElement)(children) ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
31
- return { ...(0, import_react.cloneElement)(element), value };
31
+ return { ...element, value };
32
32
  };
33
33
  // Annotate the CommonJS export names for ESM import in node:
34
34
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/IntlayerNode.tsx"],"sourcesContent":["import type { NodeProps } from '@intlayer/core';\nimport {\n type PropsWithChildren,\n type ReactNode,\n type ReactElement,\n cloneElement,\n isValidElement,\n} from 'react';\n\nexport type IntlayerNode<T = NodeProps['content']> = ReactNode & {\n value: T;\n};\n\nexport const rendererIntlayerNode = <\n T extends number | string | boolean | undefined | null,\n>({\n value,\n children,\n}: PropsWithChildren<{\n value: T;\n}>): IntlayerNode => {\n // If children is not a valid ReactElement, wrap it in a fragment\n const element: ReactElement<any> = isValidElement(children) ? (\n children\n ) : (\n <>{children}</>\n );\n\n // Use React.cloneElement to add the \"value\" prop to the element\n return { ...cloneElement(element), value };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBI;AAxBJ,mBAMO;AAMA,MAAM,uBAAuB,CAElC;AAAA,EACA;AAAA,EACA;AACF,MAEqB;AAEnB,QAAM,cAA6B,6BAAe,QAAQ,IACxD,WAEA,2EAAG,UAAS;AAId,SAAO,EAAE,OAAG,2BAAa,OAAO,GAAG,MAAM;AAC3C;","names":[]}
1
+ {"version":3,"sources":["../../src/IntlayerNode.tsx"],"sourcesContent":["import type { NodeProps } from '@intlayer/core';\nimport {\n type PropsWithChildren,\n type ReactNode,\n type ReactElement,\n isValidElement,\n} from 'react';\n\nexport type IntlayerNode<T = NodeProps['content']> = ReactNode & {\n value: T;\n};\n\nexport const rendererIntlayerNode = <\n T extends number | string | boolean | undefined | null,\n>({\n value,\n children,\n}: PropsWithChildren<{\n value: T;\n}>): IntlayerNode => {\n // If children is not a valid ReactElement, wrap it in a fragment\n const element: ReactElement<any> = isValidElement(children) ? (\n children\n ) : (\n <>{children}</>\n );\n\n // Use React.cloneElement to add the \"value\" prop to the element\n return { ...element, value };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBI;AAvBJ,mBAKO;AAMA,MAAM,uBAAuB,CAElC;AAAA,EACA;AAAA,EACA;AACF,MAEqB;AAEnB,QAAM,cAA6B,6BAAe,QAAQ,IACxD,WAEA,2EAAG,UAAS;AAId,SAAO,EAAE,GAAG,SAAS,MAAM;AAC7B;","names":[]}
@@ -1,6 +1,5 @@
1
1
  import { Fragment, jsx } from "react/jsx-runtime";
2
2
  import {
3
- cloneElement,
4
3
  isValidElement
5
4
  } from "react";
6
5
  const rendererIntlayerNode = ({
@@ -8,7 +7,7 @@ const rendererIntlayerNode = ({
8
7
  children
9
8
  }) => {
10
9
  const element = isValidElement(children) ? children : /* @__PURE__ */ jsx(Fragment, { children });
11
- return { ...cloneElement(element), value };
10
+ return { ...element, value };
12
11
  };
13
12
  export {
14
13
  rendererIntlayerNode
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/IntlayerNode.tsx"],"sourcesContent":["import type { NodeProps } from '@intlayer/core';\nimport {\n type PropsWithChildren,\n type ReactNode,\n type ReactElement,\n cloneElement,\n isValidElement,\n} from 'react';\n\nexport type IntlayerNode<T = NodeProps['content']> = ReactNode & {\n value: T;\n};\n\nexport const rendererIntlayerNode = <\n T extends number | string | boolean | undefined | null,\n>({\n value,\n children,\n}: PropsWithChildren<{\n value: T;\n}>): IntlayerNode => {\n // If children is not a valid ReactElement, wrap it in a fragment\n const element: ReactElement<any> = isValidElement(children) ? (\n children\n ) : (\n <>{children}</>\n );\n\n // Use React.cloneElement to add the \"value\" prop to the element\n return { ...cloneElement(element), value };\n};\n"],"mappings":"AAyBI;AAxBJ;AAAA,EAIE;AAAA,EACA;AAAA,OACK;AAMA,MAAM,uBAAuB,CAElC;AAAA,EACA;AAAA,EACA;AACF,MAEqB;AAEnB,QAAM,UAA6B,eAAe,QAAQ,IACxD,WAEA,gCAAG,UAAS;AAId,SAAO,EAAE,GAAG,aAAa,OAAO,GAAG,MAAM;AAC3C;","names":[]}
1
+ {"version":3,"sources":["../../src/IntlayerNode.tsx"],"sourcesContent":["import type { NodeProps } from '@intlayer/core';\nimport {\n type PropsWithChildren,\n type ReactNode,\n type ReactElement,\n isValidElement,\n} from 'react';\n\nexport type IntlayerNode<T = NodeProps['content']> = ReactNode & {\n value: T;\n};\n\nexport const rendererIntlayerNode = <\n T extends number | string | boolean | undefined | null,\n>({\n value,\n children,\n}: PropsWithChildren<{\n value: T;\n}>): IntlayerNode => {\n // If children is not a valid ReactElement, wrap it in a fragment\n const element: ReactElement<any> = isValidElement(children) ? (\n children\n ) : (\n <>{children}</>\n );\n\n // Use React.cloneElement to add the \"value\" prop to the element\n return { ...element, value };\n};\n"],"mappings":"AAwBI;AAvBJ;AAAA,EAIE;AAAA,OACK;AAMA,MAAM,uBAAuB,CAElC;AAAA,EACA;AAAA,EACA;AACF,MAEqB;AAEnB,QAAM,UAA6B,eAAe,QAAQ,IACxD,WAEA,gCAAG,UAAS;AAId,SAAO,EAAE,GAAG,SAAS,MAAM;AAC7B;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"IntlayerNode.d.ts","sourceRoot":"","sources":["../../src/IntlayerNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,SAAS,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG;IAC/D,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,EACtD,sBAGC,iBAAiB,CAAC;IACnB,KAAK,EAAE,CAAC,CAAC;CACV,CAAC,KAAG,YAUJ,CAAC"}
1
+ {"version":3,"file":"IntlayerNode.d.ts","sourceRoot":"","sources":["../../src/IntlayerNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,SAAS,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG;IAC/D,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,EACtD,sBAGC,iBAAiB,CAAC;IACnB,KAAK,EAAE,CAAC,CAAC;CACV,CAAC,KAAG,YAUJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-intlayer",
3
- "version": "5.2.5",
3
+ "version": "5.2.7",
4
4
  "private": false,
5
5
  "description": "Easily internationalize i18n your React applications with type-safe multilingual content management.",
6
6
  "keywords": [
@@ -68,11 +68,11 @@
68
68
  ],
69
69
  "dependencies": {
70
70
  "js-cookie": "^3.0.5",
71
- "@intlayer/core": "5.2.5",
72
- "@intlayer/editor-react": "5.2.5",
73
- "@intlayer/dictionaries-entry": "5.2.5",
74
- "@intlayer/config": "5.2.5",
75
- "@intlayer/api": "5.2.5"
71
+ "@intlayer/api": "5.2.7",
72
+ "@intlayer/config": "5.2.7",
73
+ "@intlayer/core": "5.2.7",
74
+ "@intlayer/dictionaries-entry": "5.2.7",
75
+ "@intlayer/editor-react": "5.2.7"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@craco/types": "^7.1.0",
@@ -88,7 +88,7 @@
88
88
  "tsc-alias": "^1.8.10",
89
89
  "tsup": "^8.3.5",
90
90
  "typescript": "^5.7.3",
91
- "@intlayer/backend": "5.2.5",
91
+ "@intlayer/backend": "5.2.7",
92
92
  "@utils/eslint-config": "1.0.4",
93
93
  "@utils/ts-config": "1.0.4",
94
94
  "@utils/ts-config-types": "1.0.4",
@@ -97,12 +97,12 @@
97
97
  "peerDependencies": {
98
98
  "react": ">=16.0.0",
99
99
  "react-dom": ">=16.0.0",
100
- "@intlayer/api": "5.2.5",
101
- "@intlayer/config": "5.2.5",
102
- "@intlayer/core": "5.2.5",
103
- "@intlayer/dictionaries-entry": "5.2.5",
104
- "@intlayer/editor-react": "5.2.5",
105
- "intlayer": "5.2.5"
100
+ "@intlayer/config": "5.2.7",
101
+ "@intlayer/api": "5.2.7",
102
+ "@intlayer/dictionaries-entry": "5.2.7",
103
+ "intlayer": "5.2.7",
104
+ "@intlayer/core": "5.2.7",
105
+ "@intlayer/editor-react": "5.2.7"
106
106
  },
107
107
  "engines": {
108
108
  "node": ">=14.18"