babel-plugin-jsx-dom-expressions 0.31.12 → 0.32.8
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/index.js +19 -6
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -81,6 +81,7 @@ const DelegatedEvents = new Set([
|
|
|
81
81
|
"beforeinput",
|
|
82
82
|
"click",
|
|
83
83
|
"dblclick",
|
|
84
|
+
"contextmenu",
|
|
84
85
|
"focusin",
|
|
85
86
|
"focusout",
|
|
86
87
|
"input",
|
|
@@ -551,6 +552,7 @@ function transformElement$2(path, info) {
|
|
|
551
552
|
|
|
552
553
|
function setAttr$2(path, elem, name, value, { isSVG, dynamic, prevId, isCE }) {
|
|
553
554
|
// pull out namespace
|
|
555
|
+
const config = getConfig(path);
|
|
554
556
|
let parts, namespace;
|
|
555
557
|
if ((parts = name.split(":")) && parts[1] && reservedNameSpaces.has(parts[0])) {
|
|
556
558
|
name = parts[1];
|
|
@@ -595,6 +597,13 @@ function setAttr$2(path, elem, name, value, { isSVG, dynamic, prevId, isCE }) {
|
|
|
595
597
|
);
|
|
596
598
|
}
|
|
597
599
|
|
|
600
|
+
if (config.hydratable && name === "innerHTML") {
|
|
601
|
+
return t__namespace.callExpression(
|
|
602
|
+
registerImportMethod(path, "innerHTML"),
|
|
603
|
+
[elem, value]
|
|
604
|
+
);
|
|
605
|
+
}
|
|
606
|
+
|
|
598
607
|
if (dynamic && name === "textContent") {
|
|
599
608
|
return t__namespace.assignmentExpression("=", t__namespace.memberExpression(elem, t__namespace.identifier("data")), value);
|
|
600
609
|
}
|
|
@@ -1286,12 +1295,16 @@ function appendTemplates$1(path, templates) {
|
|
|
1286
1295
|
};
|
|
1287
1296
|
return t__namespace.variableDeclarator(
|
|
1288
1297
|
template.id,
|
|
1289
|
-
t__namespace.
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1298
|
+
t__namespace.addComment(
|
|
1299
|
+
t__namespace.callExpression(
|
|
1300
|
+
registerImportMethod(path, "template"),
|
|
1301
|
+
[
|
|
1302
|
+
t__namespace.templateLiteral([t__namespace.templateElement(tmpl, true)], []),
|
|
1303
|
+
t__namespace.numericLiteral(template.elementCount)
|
|
1304
|
+
].concat(template.isSVG ? t__namespace.booleanLiteral(template.isSVG) : [])
|
|
1305
|
+
),
|
|
1306
|
+
'leading',
|
|
1307
|
+
'#__PURE__'
|
|
1295
1308
|
)
|
|
1296
1309
|
);
|
|
1297
1310
|
});
|
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.
|
|
4
|
+
"version": "0.32.8",
|
|
5
5
|
"author": "Ryan Carniato",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"@babel/types": "^7.16.0",
|
|
24
24
|
"html-entities": "2.3.2"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "eb04f05afe9f5509132b9734b19d804aed55562f"
|
|
27
27
|
}
|