marko 4.28.2 → 4.28.4
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/dist/compiler/Normalizer.js +1 -1
- package/dist/runtime/vdom/morphdom/index.js +1 -1
- package/dist/taglib/taglib-loader/loadTaglibFromProps.js +3 -0
- package/package.json +1 -1
- package/src/compiler/Normalizer.js +1 -1
- package/src/runtime/vdom/morphdom/index.js +10 -6
- package/src/taglib/taglib-loader/loadTaglibFromProps.js +3 -0
|
@@ -107,7 +107,7 @@ class Normalizer {
|
|
|
107
107
|
} else if (context.ignoreUnrecognizedTags && tagName[0] === "@") {
|
|
108
108
|
let owner = elNode.parentNode;
|
|
109
109
|
|
|
110
|
-
while (owner && /^(?:for|while|if|else(?:-if))
|
|
110
|
+
while (owner && /^(?:for|while|if|else(?:-if))$|^@/.test(owner.tagName)) {
|
|
111
111
|
owner = owner.parentNode;
|
|
112
112
|
}
|
|
113
113
|
|
|
@@ -437,7 +437,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
|
437
437
|
var curToNodeValue = curToNodeChild.bW_;
|
|
438
438
|
var curFromNodeValue = curFromNodeChild.nodeValue;
|
|
439
439
|
if (curFromNodeValue !== curToNodeValue) {
|
|
440
|
-
if (isHydrate && curFromNodeType === TEXT_NODE && curFromNodeValue.startsWith(curToNodeValue)) {
|
|
440
|
+
if (isHydrate && toNextSibling && curFromNodeType === TEXT_NODE && toNextSibling.bX_ === TEXT_NODE && curFromNodeValue.startsWith(curToNodeValue) && toNextSibling.bW_.startsWith(curFromNodeValue.slice(curToNodeValue.length))) {
|
|
441
441
|
// In hydrate mode we can use splitText to more efficiently handle
|
|
442
442
|
// adjacent text vdom nodes that were merged.
|
|
443
443
|
fromNextSibling = curFromNodeChild.splitText(curToNodeValue.length);
|
|
@@ -197,6 +197,9 @@ class TaglibLoader {
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
+
scriptLang() {
|
|
201
|
+
// Marko 4 doesn't read script-lang, but it shouldn't break the app
|
|
202
|
+
}
|
|
200
203
|
tagsDir(dir) {
|
|
201
204
|
// The "tags-dir" property is used to supporting scanning
|
|
202
205
|
// of a directory to discover custom tags. Scanning a directory
|
package/package.json
CHANGED
|
@@ -125,7 +125,7 @@ class Normalizer {
|
|
|
125
125
|
} else if (context.ignoreUnrecognizedTags && tagName[0] === "@") {
|
|
126
126
|
let owner = elNode.parentNode;
|
|
127
127
|
|
|
128
|
-
while (owner && /^(?:for|while|if|else(?:-if))
|
|
128
|
+
while (owner && /^(?:for|while|if|else(?:-if))$|^@/.test(owner.tagName)) {
|
|
129
129
|
owner = owner.parentNode;
|
|
130
130
|
}
|
|
131
131
|
|
|
@@ -292,13 +292,13 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
|
292
292
|
curFromNodeChild,
|
|
293
293
|
curVFromNodeChild,
|
|
294
294
|
curToNodeChild,
|
|
295
|
-
parentComponent
|
|
295
|
+
parentComponent
|
|
296
296
|
);
|
|
297
297
|
} else {
|
|
298
298
|
morphChildren(
|
|
299
299
|
curFromNodeChild,
|
|
300
300
|
curToNodeChild,
|
|
301
|
-
parentComponent
|
|
301
|
+
parentComponent
|
|
302
302
|
);
|
|
303
303
|
}
|
|
304
304
|
} else {
|
|
@@ -484,10 +484,9 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
|
484
484
|
morphChildren(
|
|
485
485
|
matchingFromEl,
|
|
486
486
|
curToNodeChild,
|
|
487
|
-
parentComponent
|
|
487
|
+
parentComponent
|
|
488
488
|
);
|
|
489
489
|
}
|
|
490
|
-
|
|
491
490
|
} else {
|
|
492
491
|
insertVirtualNodeBefore(
|
|
493
492
|
curToNodeChild,
|
|
@@ -594,13 +593,18 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
|
594
593
|
if (curFromNodeValue !== curToNodeValue) {
|
|
595
594
|
if (
|
|
596
595
|
isHydrate &&
|
|
596
|
+
toNextSibling &&
|
|
597
597
|
curFromNodeType === TEXT_NODE &&
|
|
598
|
-
|
|
598
|
+
toNextSibling.___nodeType === TEXT_NODE &&
|
|
599
|
+
curFromNodeValue.startsWith(curToNodeValue) &&
|
|
600
|
+
toNextSibling.___nodeValue.startsWith(
|
|
601
|
+
curFromNodeValue.slice(curToNodeValue.length)
|
|
602
|
+
)
|
|
599
603
|
) {
|
|
600
604
|
// In hydrate mode we can use splitText to more efficiently handle
|
|
601
605
|
// adjacent text vdom nodes that were merged.
|
|
602
606
|
fromNextSibling = curFromNodeChild.splitText(
|
|
603
|
-
curToNodeValue.length
|
|
607
|
+
curToNodeValue.length
|
|
604
608
|
);
|
|
605
609
|
} else {
|
|
606
610
|
// Simply update nodeValue on the original node to
|
|
@@ -222,6 +222,9 @@ class TaglibLoader {
|
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
+
scriptLang() {
|
|
226
|
+
// Marko 4 doesn't read script-lang, but it shouldn't break the app
|
|
227
|
+
}
|
|
225
228
|
tagsDir(dir) {
|
|
226
229
|
// The "tags-dir" property is used to supporting scanning
|
|
227
230
|
// of a directory to discover custom tags. Scanning a directory
|