babel-plugin-jsx-dom-expressions 0.36.9 → 0.36.10
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 +14 -1
- package/index.js +6 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -130,7 +130,7 @@ Array of Component exports from module, that aren't included by default with the
|
|
|
130
130
|
|
|
131
131
|
- Type: `string`
|
|
132
132
|
- Default: `effect`
|
|
133
|
-
|
|
133
|
+
|
|
134
134
|
This plugin leverages a heuristic for reactive wrapping and lazy evaluation of JSX expressions. This option indicates the reactive wrapper function name (`effect`), defaults to `effect`.
|
|
135
135
|
|
|
136
136
|
### staticMarker
|
|
@@ -147,6 +147,19 @@ Comment decorator string indicates the static expression, used to tell the compi
|
|
|
147
147
|
|
|
148
148
|
Memos let you efficiently use a derived value in many reactive computations. This option indicates the memo function name, defaults to `memo`.
|
|
149
149
|
|
|
150
|
+
### validate
|
|
151
|
+
|
|
152
|
+
- Type: `boolean`
|
|
153
|
+
- Default: `true`
|
|
154
|
+
|
|
155
|
+
Checks for properly formed HTML by checking for elements that would not be allowed in certain parent elements. This validation isn't complete but includes places where browser would "correct" it and break the DOM walks.
|
|
156
|
+
|
|
157
|
+
### omitNestedClosingTags
|
|
158
|
+
|
|
159
|
+
- Type: `boolean`
|
|
160
|
+
- Default: `true`
|
|
161
|
+
|
|
162
|
+
Removes unnecessary closing tags from the template output. This may not work in all browser-like environments the same. The solution has been tested again Chrome/Edge/Firefox/Safari.
|
|
150
163
|
|
|
151
164
|
## Special Binding
|
|
152
165
|
|
package/index.js
CHANGED
|
@@ -707,7 +707,8 @@ const alwaysClose = [
|
|
|
707
707
|
"select",
|
|
708
708
|
"iframe",
|
|
709
709
|
"script",
|
|
710
|
-
"template"
|
|
710
|
+
"template",
|
|
711
|
+
"fieldset"
|
|
711
712
|
];
|
|
712
713
|
|
|
713
714
|
function transformElement$3(path, info) {
|
|
@@ -757,7 +758,9 @@ function transformElement$3(path, info) {
|
|
|
757
758
|
results.template += ">";
|
|
758
759
|
if (!voidTag) {
|
|
759
760
|
// always close tags can still be skipped if they have no closing parents and are the last element
|
|
760
|
-
const toBeClosed =
|
|
761
|
+
const toBeClosed =
|
|
762
|
+
!info.lastElement ||
|
|
763
|
+
(info.toBeClosed && (!config.omitNestedClosingTags || info.toBeClosed.has(tagName)));
|
|
761
764
|
if (toBeClosed) {
|
|
762
765
|
results.toBeClosed = new Set(info.toBeClosed || alwaysClose);
|
|
763
766
|
results.toBeClosed.add(tagName);
|
|
@@ -3454,6 +3457,7 @@ var config = {
|
|
|
3454
3457
|
builtIns: [],
|
|
3455
3458
|
requireImportSource: false,
|
|
3456
3459
|
wrapConditionals: true,
|
|
3460
|
+
omitNestedClosingTags: false,
|
|
3457
3461
|
contextToCustomElements: false,
|
|
3458
3462
|
staticMarker: "@once",
|
|
3459
3463
|
effectWrapper: "effect",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-plugin-jsx-dom-expressions",
|
|
3
3
|
"description": "A JSX to DOM plugin that wraps expressions for fine grained change detection",
|
|
4
|
-
"version": "0.36.
|
|
4
|
+
"version": "0.36.10",
|
|
5
5
|
"author": "Ryan Carniato",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@babel/core": "^7.20.12"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "1d04cc14bbde62e06d852eac9e85252359c6b304"
|
|
35
35
|
}
|