@vue/runtime-dom 3.3.5 → 3.3.7
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.
|
@@ -543,7 +543,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
543
543
|
} else if (key === "length" && isArray(target)) {
|
|
544
544
|
const newLength = Number(newValue);
|
|
545
545
|
depsMap.forEach((dep, key2) => {
|
|
546
|
-
if (key2 === "length" || key2 >= newLength) {
|
|
546
|
+
if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) {
|
|
547
547
|
deps.push(dep);
|
|
548
548
|
}
|
|
549
549
|
});
|
|
@@ -1639,8 +1639,13 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1639
1639
|
let end = queue.length;
|
|
1640
1640
|
while (start < end) {
|
|
1641
1641
|
const middle = start + end >>> 1;
|
|
1642
|
-
const
|
|
1643
|
-
middleJobId
|
|
1642
|
+
const middleJob = queue[middle];
|
|
1643
|
+
const middleJobId = getId(middleJob);
|
|
1644
|
+
if (middleJobId < id || middleJobId === id && middleJob.pre) {
|
|
1645
|
+
start = middle + 1;
|
|
1646
|
+
} else {
|
|
1647
|
+
end = middle;
|
|
1648
|
+
}
|
|
1644
1649
|
}
|
|
1645
1650
|
return start;
|
|
1646
1651
|
}
|
|
@@ -2755,14 +2760,16 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2755
2760
|
parentComponent: parentComponent2,
|
|
2756
2761
|
container: container2
|
|
2757
2762
|
} = suspense;
|
|
2763
|
+
let delayEnter = false;
|
|
2758
2764
|
if (suspense.isHydrating) {
|
|
2759
2765
|
suspense.isHydrating = false;
|
|
2760
2766
|
} else if (!resume) {
|
|
2761
|
-
|
|
2767
|
+
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
2762
2768
|
if (delayEnter) {
|
|
2763
2769
|
activeBranch.transition.afterLeave = () => {
|
|
2764
2770
|
if (pendingId === suspense.pendingId) {
|
|
2765
2771
|
move(pendingBranch, container2, anchor2, 0);
|
|
2772
|
+
queuePostFlushCb(effects);
|
|
2766
2773
|
}
|
|
2767
2774
|
};
|
|
2768
2775
|
}
|
|
@@ -2788,7 +2795,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2788
2795
|
}
|
|
2789
2796
|
parent = parent.parent;
|
|
2790
2797
|
}
|
|
2791
|
-
if (!hasUnresolvedAncestor) {
|
|
2798
|
+
if (!hasUnresolvedAncestor && !delayEnter) {
|
|
2792
2799
|
queuePostFlushCb(effects);
|
|
2793
2800
|
}
|
|
2794
2801
|
suspense.effects = [];
|
|
@@ -5090,7 +5097,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5090
5097
|
}
|
|
5091
5098
|
});
|
|
5092
5099
|
}
|
|
5093
|
-
const installedPlugins = /* @__PURE__ */ new
|
|
5100
|
+
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
5094
5101
|
let isMounted = false;
|
|
5095
5102
|
const app = context.app = {
|
|
5096
5103
|
_uid: uid$1++,
|
|
@@ -5754,7 +5761,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5754
5761
|
}
|
|
5755
5762
|
if (needDeletionCheck) {
|
|
5756
5763
|
for (const key in slots) {
|
|
5757
|
-
if (!isInternalKey(key) &&
|
|
5764
|
+
if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
|
|
5758
5765
|
delete slots[key];
|
|
5759
5766
|
}
|
|
5760
5767
|
}
|
|
@@ -5930,7 +5937,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5930
5937
|
break;
|
|
5931
5938
|
case Comment:
|
|
5932
5939
|
if (domType !== 8 /* COMMENT */ || isFragmentStart) {
|
|
5933
|
-
|
|
5940
|
+
if (node.tagName.toLowerCase() === "template") {
|
|
5941
|
+
const content = vnode.el.content.firstChild;
|
|
5942
|
+
replaceNode(content, node, parentComponent);
|
|
5943
|
+
vnode.el = node = content;
|
|
5944
|
+
nextNode = nextSibling(node);
|
|
5945
|
+
} else {
|
|
5946
|
+
nextNode = onMismatch();
|
|
5947
|
+
}
|
|
5934
5948
|
} else {
|
|
5935
5949
|
nextNode = nextSibling(node);
|
|
5936
5950
|
}
|
|
@@ -5972,7 +5986,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5972
5986
|
break;
|
|
5973
5987
|
default:
|
|
5974
5988
|
if (shapeFlag & 1) {
|
|
5975
|
-
if (domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) {
|
|
5989
|
+
if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
|
|
5976
5990
|
nextNode = onMismatch();
|
|
5977
5991
|
} else {
|
|
5978
5992
|
nextNode = hydrateElement(
|
|
@@ -5987,6 +6001,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5987
6001
|
} else if (shapeFlag & 6) {
|
|
5988
6002
|
vnode.slotScopeIds = slotScopeIds;
|
|
5989
6003
|
const container = parentNode(node);
|
|
6004
|
+
if (isFragmentStart) {
|
|
6005
|
+
nextNode = locateClosingAnchor(node);
|
|
6006
|
+
} else if (isComment(node) && node.data === "teleport start") {
|
|
6007
|
+
nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
6008
|
+
} else {
|
|
6009
|
+
nextNode = nextSibling(node);
|
|
6010
|
+
}
|
|
5990
6011
|
mountComponent(
|
|
5991
6012
|
vnode,
|
|
5992
6013
|
container,
|
|
@@ -5996,10 +6017,6 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5996
6017
|
isSVGContainer(container),
|
|
5997
6018
|
optimized
|
|
5998
6019
|
);
|
|
5999
|
-
nextNode = isFragmentStart ? locateClosingAsyncAnchor(node) : nextSibling(node);
|
|
6000
|
-
if (nextNode && isComment(nextNode) && nextNode.data === "teleport end") {
|
|
6001
|
-
nextNode = nextSibling(nextNode);
|
|
6002
|
-
}
|
|
6003
6020
|
if (isAsyncWrapper(vnode)) {
|
|
6004
6021
|
let subTree;
|
|
6005
6022
|
if (isFragmentStart) {
|
|
@@ -6049,7 +6066,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6049
6066
|
};
|
|
6050
6067
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
6051
6068
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
6052
|
-
const { type, props, patchFlag, shapeFlag, dirs } = vnode;
|
|
6069
|
+
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
6053
6070
|
const forcePatchValue = type === "input" && dirs || type === "option";
|
|
6054
6071
|
{
|
|
6055
6072
|
if (dirs) {
|
|
@@ -6086,12 +6103,23 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6086
6103
|
if (vnodeHooks = props && props.onVnodeBeforeMount) {
|
|
6087
6104
|
invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
6088
6105
|
}
|
|
6106
|
+
let needCallTransitionHooks = false;
|
|
6107
|
+
if (isTemplateNode(el)) {
|
|
6108
|
+
needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
6109
|
+
const content = el.content.firstChild;
|
|
6110
|
+
if (needCallTransitionHooks) {
|
|
6111
|
+
transition.beforeEnter(content);
|
|
6112
|
+
}
|
|
6113
|
+
replaceNode(content, el, parentComponent);
|
|
6114
|
+
vnode.el = el = content;
|
|
6115
|
+
}
|
|
6089
6116
|
if (dirs) {
|
|
6090
6117
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
6091
6118
|
}
|
|
6092
|
-
if ((vnodeHooks = props && props.onVnodeMounted) || dirs) {
|
|
6119
|
+
if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
|
|
6093
6120
|
queueEffectWithSuspense(() => {
|
|
6094
6121
|
vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
6122
|
+
needCallTransitionHooks && transition.enter(el);
|
|
6095
6123
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
6096
6124
|
}, parentSuspense);
|
|
6097
6125
|
}
|
|
@@ -6209,7 +6237,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6209
6237
|
);
|
|
6210
6238
|
vnode.el = null;
|
|
6211
6239
|
if (isFragment) {
|
|
6212
|
-
const end =
|
|
6240
|
+
const end = locateClosingAnchor(node);
|
|
6213
6241
|
while (true) {
|
|
6214
6242
|
const next2 = nextSibling(node);
|
|
6215
6243
|
if (next2 && next2 !== end) {
|
|
@@ -6234,14 +6262,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6234
6262
|
);
|
|
6235
6263
|
return next;
|
|
6236
6264
|
};
|
|
6237
|
-
const
|
|
6265
|
+
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
6238
6266
|
let match = 0;
|
|
6239
6267
|
while (node) {
|
|
6240
6268
|
node = nextSibling(node);
|
|
6241
6269
|
if (node && isComment(node)) {
|
|
6242
|
-
if (node.data ===
|
|
6270
|
+
if (node.data === open)
|
|
6243
6271
|
match++;
|
|
6244
|
-
if (node.data ===
|
|
6272
|
+
if (node.data === close) {
|
|
6245
6273
|
if (match === 0) {
|
|
6246
6274
|
return nextSibling(node);
|
|
6247
6275
|
} else {
|
|
@@ -6252,6 +6280,23 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6252
6280
|
}
|
|
6253
6281
|
return node;
|
|
6254
6282
|
};
|
|
6283
|
+
const replaceNode = (newNode, oldNode, parentComponent) => {
|
|
6284
|
+
const parentNode2 = oldNode.parentNode;
|
|
6285
|
+
if (parentNode2) {
|
|
6286
|
+
parentNode2.replaceChild(newNode, oldNode);
|
|
6287
|
+
}
|
|
6288
|
+
let parent = parentComponent;
|
|
6289
|
+
while (parent) {
|
|
6290
|
+
if (parent.vnode.el === oldNode) {
|
|
6291
|
+
parent.vnode.el = newNode;
|
|
6292
|
+
parent.subTree.el = newNode;
|
|
6293
|
+
}
|
|
6294
|
+
parent = parent.parent;
|
|
6295
|
+
}
|
|
6296
|
+
};
|
|
6297
|
+
const isTemplateNode = (node) => {
|
|
6298
|
+
return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template";
|
|
6299
|
+
};
|
|
6255
6300
|
return [hydrate, hydrateNode];
|
|
6256
6301
|
}
|
|
6257
6302
|
|
|
@@ -6579,7 +6624,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6579
6624
|
if (dirs) {
|
|
6580
6625
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
6581
6626
|
}
|
|
6582
|
-
const needCallTransitionHooks = (
|
|
6627
|
+
const needCallTransitionHooks = needTransition(parentSuspense, transition);
|
|
6583
6628
|
if (needCallTransitionHooks) {
|
|
6584
6629
|
transition.beforeEnter(el);
|
|
6585
6630
|
}
|
|
@@ -7471,8 +7516,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7471
7516
|
moveStaticNode(vnode, container, anchor);
|
|
7472
7517
|
return;
|
|
7473
7518
|
}
|
|
7474
|
-
const
|
|
7475
|
-
if (
|
|
7519
|
+
const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
|
|
7520
|
+
if (needTransition2) {
|
|
7476
7521
|
if (moveType === 0) {
|
|
7477
7522
|
transition.beforeEnter(el);
|
|
7478
7523
|
hostInsert(el, container, anchor);
|
|
@@ -7692,6 +7737,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7692
7737
|
function toggleRecurse({ effect, update }, allowed) {
|
|
7693
7738
|
effect.allowRecurse = update.allowRecurse = allowed;
|
|
7694
7739
|
}
|
|
7740
|
+
function needTransition(parentSuspense, transition) {
|
|
7741
|
+
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
7742
|
+
}
|
|
7695
7743
|
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
7696
7744
|
const ch1 = n1.children;
|
|
7697
7745
|
const ch2 = n2.children;
|
|
@@ -7917,19 +7965,18 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7917
7965
|
if (target) {
|
|
7918
7966
|
hostRemove(targetAnchor);
|
|
7919
7967
|
}
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
}
|
|
7968
|
+
doRemove && hostRemove(anchor);
|
|
7969
|
+
if (shapeFlag & 16) {
|
|
7970
|
+
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
7971
|
+
for (let i = 0; i < children.length; i++) {
|
|
7972
|
+
const child = children[i];
|
|
7973
|
+
unmount(
|
|
7974
|
+
child,
|
|
7975
|
+
parentComponent,
|
|
7976
|
+
parentSuspense,
|
|
7977
|
+
shouldRemove,
|
|
7978
|
+
!!child.dynamicChildren
|
|
7979
|
+
);
|
|
7933
7980
|
}
|
|
7934
7981
|
}
|
|
7935
7982
|
},
|
|
@@ -8013,7 +8060,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8013
8060
|
const ctx = vnode.ctx;
|
|
8014
8061
|
if (ctx && ctx.ut) {
|
|
8015
8062
|
let node = vnode.children[0].el;
|
|
8016
|
-
while (node !== vnode.targetAnchor) {
|
|
8063
|
+
while (node && node !== vnode.targetAnchor) {
|
|
8017
8064
|
if (node.nodeType === 1)
|
|
8018
8065
|
node.setAttribute("data-v-owner", ctx.uid);
|
|
8019
8066
|
node = node.nextSibling;
|
|
@@ -9022,7 +9069,7 @@ Component that was made reactive: `,
|
|
|
9022
9069
|
return true;
|
|
9023
9070
|
}
|
|
9024
9071
|
|
|
9025
|
-
const version = "3.3.
|
|
9072
|
+
const version = "3.3.7";
|
|
9026
9073
|
const ssrUtils = null;
|
|
9027
9074
|
const resolveFilter = null;
|
|
9028
9075
|
const compatUtils = null;
|