@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
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -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
|
**/
|
|
@@ -426,6 +426,21 @@ function normalizeCssVarValue(value) {
|
|
|
426
426
|
return String(value);
|
|
427
427
|
}
|
|
428
428
|
//#endregion
|
|
429
|
+
//#region packages/shared/src/vaporFlags.ts
|
|
430
|
+
/**
|
|
431
|
+
* The data of the comment a vapor server render opens the branch of a `v-if`
|
|
432
|
+
* chain with, `<!--[1-->`: the digits are the branch's position in the chain,
|
|
433
|
+
* and `<!--]-->` closes it like a fragment.
|
|
434
|
+
*/
|
|
435
|
+
function isVaporBranchStart(data) {
|
|
436
|
+
if (data.length < 2 || data.charCodeAt(0) !== 91) return false;
|
|
437
|
+
for (let i = 1; i < data.length; i++) {
|
|
438
|
+
const c = data.charCodeAt(i);
|
|
439
|
+
if (c < 48 || c > 57) return false;
|
|
440
|
+
}
|
|
441
|
+
return true;
|
|
442
|
+
}
|
|
443
|
+
//#endregion
|
|
429
444
|
//#region packages/reactivity/src/debug.ts
|
|
430
445
|
const triggerEventInfos = [];
|
|
431
446
|
function onTrack(sub, debugInfo) {
|
|
@@ -3969,6 +3984,8 @@ const getContainerType = (container) => {
|
|
|
3969
3984
|
if (isMathMLContainer(container)) return "mathml";
|
|
3970
3985
|
};
|
|
3971
3986
|
const isComment = (node) => node.nodeType === 8;
|
|
3987
|
+
/** The data of a comment opening a range a hydration steps over as one. */
|
|
3988
|
+
const isRangeStart = (data) => data === "[" || data === "(" || isVaporBranchStart(data);
|
|
3972
3989
|
function createHydrationFunctions(rendererInternals) {
|
|
3973
3990
|
const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
|
|
3974
3991
|
const hydrate = (vnode, container) => {
|
|
@@ -3986,7 +4003,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3986
4003
|
};
|
|
3987
4004
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
3988
4005
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
3989
|
-
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(");
|
|
4006
|
+
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(" || isVaporInteropEnabled && isVaporBranchStart(node.data));
|
|
3990
4007
|
const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
|
|
3991
4008
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
3992
4009
|
let domType = node.nodeType;
|
|
@@ -4184,7 +4201,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4184
4201
|
};
|
|
4185
4202
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
4186
4203
|
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
4187
|
-
warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && (node.data
|
|
4204
|
+
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);
|
|
4188
4205
|
logMismatchError();
|
|
4189
4206
|
}
|
|
4190
4207
|
vnode.el = null;
|
|
@@ -4211,7 +4228,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4211
4228
|
while (node) {
|
|
4212
4229
|
node = nextSibling(node);
|
|
4213
4230
|
if (node && isComment(node)) {
|
|
4214
|
-
if (node.data === open) match++;
|
|
4231
|
+
if (node.data === open || isVaporInteropEnabled && open === "[" && isVaporBranchStart(node.data)) match++;
|
|
4215
4232
|
if (node.data === close) {
|
|
4216
4233
|
if (match === 0) return nextSibling(node);
|
|
4217
4234
|
else match--;
|
|
@@ -4467,9 +4484,9 @@ const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {
|
|
|
4467
4484
|
return teardown;
|
|
4468
4485
|
};
|
|
4469
4486
|
function forEachElement(node, cb) {
|
|
4470
|
-
if (isComment(node) && (node.data
|
|
4487
|
+
if (isComment(node) && isRangeStart(node.data)) {
|
|
4471
4488
|
const open = node.data;
|
|
4472
|
-
const close = open === "
|
|
4489
|
+
const close = open === "(" ? ")" : "]";
|
|
4473
4490
|
let depth = 1;
|
|
4474
4491
|
let next = node.nextSibling;
|
|
4475
4492
|
while (next) {
|
|
@@ -4478,7 +4495,7 @@ function forEachElement(node, cb) {
|
|
|
4478
4495
|
} else if (isComment(next)) {
|
|
4479
4496
|
if (next.data === close) {
|
|
4480
4497
|
if (--depth === 0) break;
|
|
4481
|
-
} else if (next.data === open) depth++;
|
|
4498
|
+
} else if (close === "]" ? next.data === "[" || isVaporBranchStart(next.data) : next.data === open) depth++;
|
|
4482
4499
|
}
|
|
4483
4500
|
next = next.nextSibling;
|
|
4484
4501
|
}
|
|
@@ -8869,7 +8886,7 @@ function isMemoSame(cached, memo) {
|
|
|
8869
8886
|
}
|
|
8870
8887
|
//#endregion
|
|
8871
8888
|
//#region packages/runtime-core/src/index.ts
|
|
8872
|
-
const version = "3.6.0-rc.
|
|
8889
|
+
const version = "3.6.0-rc.14";
|
|
8873
8890
|
const warn = warn$1;
|
|
8874
8891
|
/**
|
|
8875
8892
|
* Runtime error messages. Only exposed in dev or esm builds.
|