html-react-parser 5.0.7 → 5.0.9
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 +4 -2
- package/esm/attributes-to-props.d.mts +1 -0
- package/esm/dom-to-react.d.mts +1 -0
- package/esm/index.d.mts +2 -0
- package/esm/index.mjs +1 -9
- package/esm/utilities.d.mts +1 -0
- package/esm/utilities.mjs +1 -8
- package/package.json +13 -16
package/README.md
CHANGED
|
@@ -387,7 +387,8 @@ parse('<br>', {
|
|
|
387
387
|
|
|
388
388
|
### htmlparser2
|
|
389
389
|
|
|
390
|
-
>
|
|
390
|
+
> [!WARNING]
|
|
391
|
+
> `htmlparser2` options _**don't work** on the client-side_ (browser) and they _**only work** on the server-side_ (Node.js). By overriding the options, it can break universal rendering.
|
|
391
392
|
|
|
392
393
|
Default [htmlparser2 options](https://github.com/fb55/htmlparser2/wiki/Parser-options#option-xmlmode) can be overridden in >=[0.12.0](https://github.com/remarkablemark/html-react-parser/tree/v0.12.0).
|
|
393
394
|
|
|
@@ -534,7 +535,8 @@ const options = {
|
|
|
534
535
|
parse('<CustomElement>', options); // React.createElement('CustomElement')
|
|
535
536
|
```
|
|
536
537
|
|
|
537
|
-
>
|
|
538
|
+
> [!WARNING]
|
|
539
|
+
> By preserving case-sensitivity of the tags, you may get rendering warnings like:
|
|
538
540
|
>
|
|
539
541
|
> ```
|
|
540
542
|
> Warning: <CustomElement> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../lib/attributes-to-props';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../lib/dom-to-react';
|
package/esm/index.d.mts
ADDED
package/esm/index.mjs
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import HTMLReactParser from '../lib/index.js';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
Comment,
|
|
5
|
-
Element,
|
|
6
|
-
ProcessingInstruction,
|
|
7
|
-
Text,
|
|
8
|
-
attributesToProps,
|
|
9
|
-
domToReact,
|
|
10
|
-
htmlToDOM,
|
|
11
|
-
} from '../lib/index.js';
|
|
3
|
+
export * from '../lib/index.js';
|
|
12
4
|
|
|
13
5
|
export default HTMLReactParser.default || HTMLReactParser;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../lib/utilities';
|
package/esm/utilities.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-react-parser",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.9",
|
|
4
4
|
"description": "HTML to React parser.",
|
|
5
5
|
"author": "Mark <mark@remarkablemark.org>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
7
7
|
"module": "./esm/index.mjs",
|
|
8
|
-
"types": "./lib/index.d.ts",
|
|
9
8
|
"exports": {
|
|
10
9
|
".": {
|
|
11
|
-
"types": "./lib/index.d.ts",
|
|
12
10
|
"import": "./esm/index.mjs",
|
|
13
11
|
"require": "./lib/index.js"
|
|
14
12
|
},
|
|
15
13
|
"./lib/*": {
|
|
16
|
-
"types": "./lib/*.d.ts",
|
|
17
14
|
"import": "./esm/*.mjs",
|
|
18
15
|
"default": "./lib/*.js"
|
|
19
16
|
}
|
|
@@ -53,7 +50,7 @@
|
|
|
53
50
|
],
|
|
54
51
|
"dependencies": {
|
|
55
52
|
"domhandler": "5.0.3",
|
|
56
|
-
"html-dom-parser": "5.0.
|
|
53
|
+
"html-dom-parser": "5.0.5",
|
|
57
54
|
"react-property": "2.0.2",
|
|
58
55
|
"style-to-js": "1.1.10"
|
|
59
56
|
},
|
|
@@ -64,28 +61,28 @@
|
|
|
64
61
|
"@rollup/plugin-node-resolve": "15.2.3",
|
|
65
62
|
"@rollup/plugin-terser": "0.4.4",
|
|
66
63
|
"@rollup/plugin-typescript": "11.1.5",
|
|
67
|
-
"@size-limit/preset-big-lib": "11.0.
|
|
64
|
+
"@size-limit/preset-big-lib": "11.0.1",
|
|
68
65
|
"@types/benchmark": "2.1.5",
|
|
69
|
-
"@types/jest": "29.5.
|
|
70
|
-
"@types/react": "18.2.
|
|
71
|
-
"@types/react-dom": "18.2.
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "6.
|
|
73
|
-
"@typescript-eslint/parser": "6.
|
|
66
|
+
"@types/jest": "29.5.11",
|
|
67
|
+
"@types/react": "18.2.45",
|
|
68
|
+
"@types/react-dom": "18.2.18",
|
|
69
|
+
"@typescript-eslint/eslint-plugin": "6.14.0",
|
|
70
|
+
"@typescript-eslint/parser": "6.14.0",
|
|
74
71
|
"benchmark": "2.1.4",
|
|
75
|
-
"eslint": "8.
|
|
72
|
+
"eslint": "8.56.0",
|
|
76
73
|
"eslint-plugin-prettier": "5.0.1",
|
|
77
74
|
"husky": "8.0.3",
|
|
78
75
|
"jest": "29.7.0",
|
|
79
76
|
"jest-environment-jsdom": "29.7.0",
|
|
80
77
|
"lint-staged": "15.2.0",
|
|
81
78
|
"pinst": "3.0.0",
|
|
82
|
-
"preact": "10.19.
|
|
79
|
+
"preact": "10.19.3",
|
|
83
80
|
"react": "18.2.0",
|
|
84
81
|
"react-dom": "18.2.0",
|
|
85
|
-
"rollup": "4.
|
|
86
|
-
"size-limit": "11.0.
|
|
82
|
+
"rollup": "4.9.1",
|
|
83
|
+
"size-limit": "11.0.1",
|
|
87
84
|
"ts-jest": "29.1.1",
|
|
88
|
-
"typescript": "5.3.
|
|
85
|
+
"typescript": "5.3.3"
|
|
89
86
|
},
|
|
90
87
|
"peerDependencies": {
|
|
91
88
|
"react": "0.14 || 15 || 16 || 17 || 18"
|