@vue/runtime-dom 3.6.0-rc.13 → 3.6.0-rc.14
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/runtime-dom.cjs.js +1 -1
- package/dist/runtime-dom.cjs.prod.js +1 -1
- package/dist/runtime-dom.esm-browser.js +25 -8
- package/dist/runtime-dom.esm-browser.prod.js +4 -4
- package/dist/runtime-dom.esm-bundler.js +1 -1
- package/dist/runtime-dom.global.js +25 -8
- package/dist/runtime-dom.global.prod.js +4 -4
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-rc.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-rc.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -428,6 +428,21 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
428
428
|
return String(value);
|
|
429
429
|
}
|
|
430
430
|
//#endregion
|
|
431
|
+
//#region packages/shared/src/vaporFlags.ts
|
|
432
|
+
/**
|
|
433
|
+
* The data of the comment a vapor server render opens the branch of a `v-if`
|
|
434
|
+
* chain with, `<!--[1-->`: the digits are the branch's position in the chain,
|
|
435
|
+
* and `<!--]-->` closes it like a fragment.
|
|
436
|
+
*/
|
|
437
|
+
function isVaporBranchStart(data) {
|
|
438
|
+
if (data.length < 2 || data.charCodeAt(0) !== 91) return false;
|
|
439
|
+
for (let i = 1; i < data.length; i++) {
|
|
440
|
+
const c = data.charCodeAt(i);
|
|
441
|
+
if (c < 48 || c > 57) return false;
|
|
442
|
+
}
|
|
443
|
+
return true;
|
|
444
|
+
}
|
|
445
|
+
//#endregion
|
|
431
446
|
//#region packages/reactivity/src/debug.ts
|
|
432
447
|
const triggerEventInfos = [];
|
|
433
448
|
function onTrack(sub, debugInfo) {
|
|
@@ -3967,6 +3982,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3967
3982
|
if (isMathMLContainer(container)) return "mathml";
|
|
3968
3983
|
};
|
|
3969
3984
|
const isComment = (node) => node.nodeType === 8;
|
|
3985
|
+
/** The data of a comment opening a range a hydration steps over as one. */
|
|
3986
|
+
const isRangeStart = (data) => data === "[" || data === "(" || isVaporBranchStart(data);
|
|
3970
3987
|
function createHydrationFunctions(rendererInternals) {
|
|
3971
3988
|
const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
|
|
3972
3989
|
const hydrate = (vnode, container) => {
|
|
@@ -3984,7 +4001,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3984
4001
|
};
|
|
3985
4002
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
3986
4003
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
3987
|
-
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(");
|
|
4004
|
+
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(" || isVaporInteropEnabled && isVaporBranchStart(node.data));
|
|
3988
4005
|
const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
|
|
3989
4006
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
3990
4007
|
let domType = node.nodeType;
|
|
@@ -4182,7 +4199,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4182
4199
|
};
|
|
4183
4200
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
4184
4201
|
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
4185
|
-
warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && (node.data
|
|
4202
|
+
warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && isRangeStart(node.data) ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
|
|
4186
4203
|
logMismatchError();
|
|
4187
4204
|
}
|
|
4188
4205
|
vnode.el = null;
|
|
@@ -4209,7 +4226,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4209
4226
|
while (node) {
|
|
4210
4227
|
node = nextSibling(node);
|
|
4211
4228
|
if (node && isComment(node)) {
|
|
4212
|
-
if (node.data === open) match++;
|
|
4229
|
+
if (node.data === open || isVaporInteropEnabled && open === "[" && isVaporBranchStart(node.data)) match++;
|
|
4213
4230
|
if (node.data === close) {
|
|
4214
4231
|
if (match === 0) return nextSibling(node);
|
|
4215
4232
|
else match--;
|
|
@@ -4465,9 +4482,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4465
4482
|
return teardown;
|
|
4466
4483
|
};
|
|
4467
4484
|
function forEachElement(node, cb) {
|
|
4468
|
-
if (isComment(node) && (node.data
|
|
4485
|
+
if (isComment(node) && isRangeStart(node.data)) {
|
|
4469
4486
|
const open = node.data;
|
|
4470
|
-
const close = open === "
|
|
4487
|
+
const close = open === "(" ? ")" : "]";
|
|
4471
4488
|
let depth = 1;
|
|
4472
4489
|
let next = node.nextSibling;
|
|
4473
4490
|
while (next) {
|
|
@@ -4476,7 +4493,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4476
4493
|
} else if (isComment(next)) {
|
|
4477
4494
|
if (next.data === close) {
|
|
4478
4495
|
if (--depth === 0) break;
|
|
4479
|
-
} else if (next.data === open) depth++;
|
|
4496
|
+
} else if (close === "]" ? next.data === "[" || isVaporBranchStart(next.data) : next.data === open) depth++;
|
|
4480
4497
|
}
|
|
4481
4498
|
next = next.nextSibling;
|
|
4482
4499
|
}
|
|
@@ -8867,7 +8884,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8867
8884
|
}
|
|
8868
8885
|
//#endregion
|
|
8869
8886
|
//#region packages/runtime-core/src/index.ts
|
|
8870
|
-
const version = "3.6.0-rc.
|
|
8887
|
+
const version = "3.6.0-rc.14";
|
|
8871
8888
|
const warn = warn$1;
|
|
8872
8889
|
/**
|
|
8873
8890
|
* Runtime error messages. Only exposed in dev or esm builds.
|