@vue/compat 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.
- package/dist/vue.cjs.js +106 -48
- package/dist/vue.cjs.prod.js +106 -48
- package/dist/vue.esm-browser.js +106 -48
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +106 -48
- package/dist/vue.global.js +106 -48
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +87 -40
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +87 -40
- package/dist/vue.runtime.global.js +87 -40
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +2 -2
|
@@ -540,7 +540,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
540
540
|
} else if (key === "length" && isArray(target)) {
|
|
541
541
|
const newLength = Number(newValue);
|
|
542
542
|
depsMap.forEach((dep, key2) => {
|
|
543
|
-
if (key2 === "length" || key2 >= newLength) {
|
|
543
|
+
if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) {
|
|
544
544
|
deps.push(dep);
|
|
545
545
|
}
|
|
546
546
|
});
|
|
@@ -1636,8 +1636,13 @@ function findInsertionIndex(id) {
|
|
|
1636
1636
|
let end = queue.length;
|
|
1637
1637
|
while (start < end) {
|
|
1638
1638
|
const middle = start + end >>> 1;
|
|
1639
|
-
const
|
|
1640
|
-
middleJobId
|
|
1639
|
+
const middleJob = queue[middle];
|
|
1640
|
+
const middleJobId = getId(middleJob);
|
|
1641
|
+
if (middleJobId < id || middleJobId === id && middleJob.pre) {
|
|
1642
|
+
start = middle + 1;
|
|
1643
|
+
} else {
|
|
1644
|
+
end = middle;
|
|
1645
|
+
}
|
|
1641
1646
|
}
|
|
1642
1647
|
return start;
|
|
1643
1648
|
}
|
|
@@ -3225,14 +3230,16 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3225
3230
|
parentComponent: parentComponent2,
|
|
3226
3231
|
container: container2
|
|
3227
3232
|
} = suspense;
|
|
3233
|
+
let delayEnter = false;
|
|
3228
3234
|
if (suspense.isHydrating) {
|
|
3229
3235
|
suspense.isHydrating = false;
|
|
3230
3236
|
} else if (!resume) {
|
|
3231
|
-
|
|
3237
|
+
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
3232
3238
|
if (delayEnter) {
|
|
3233
3239
|
activeBranch.transition.afterLeave = () => {
|
|
3234
3240
|
if (pendingId === suspense.pendingId) {
|
|
3235
3241
|
move(pendingBranch, container2, anchor2, 0);
|
|
3242
|
+
queuePostFlushCb(effects);
|
|
3236
3243
|
}
|
|
3237
3244
|
};
|
|
3238
3245
|
}
|
|
@@ -3258,7 +3265,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
3258
3265
|
}
|
|
3259
3266
|
parent = parent.parent;
|
|
3260
3267
|
}
|
|
3261
|
-
if (!hasUnresolvedAncestor) {
|
|
3268
|
+
if (!hasUnresolvedAncestor && !delayEnter) {
|
|
3262
3269
|
queuePostFlushCb(effects);
|
|
3263
3270
|
}
|
|
3264
3271
|
suspense.effects = [];
|
|
@@ -4886,7 +4893,7 @@ function defineLegacyVNodeProperties(vnode) {
|
|
|
4886
4893
|
}
|
|
4887
4894
|
}
|
|
4888
4895
|
|
|
4889
|
-
const normalizedFunctionalComponentMap = /* @__PURE__ */ new
|
|
4896
|
+
const normalizedFunctionalComponentMap = /* @__PURE__ */ new WeakMap();
|
|
4890
4897
|
const legacySlotProxyHandlers = {
|
|
4891
4898
|
get(target, key) {
|
|
4892
4899
|
const slot = target[key];
|
|
@@ -6182,7 +6189,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6182
6189
|
return vm;
|
|
6183
6190
|
}
|
|
6184
6191
|
}
|
|
6185
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
6192
|
+
Vue.version = `2.6.14-compat:${"3.3.7"}`;
|
|
6186
6193
|
Vue.config = singletonApp.config;
|
|
6187
6194
|
Vue.use = (p, ...options) => {
|
|
6188
6195
|
if (p && isFunction(p.install)) {
|
|
@@ -6595,7 +6602,7 @@ function createAppAPI(render, hydrate) {
|
|
|
6595
6602
|
}
|
|
6596
6603
|
});
|
|
6597
6604
|
}
|
|
6598
|
-
const installedPlugins = /* @__PURE__ */ new
|
|
6605
|
+
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
6599
6606
|
let isMounted = false;
|
|
6600
6607
|
const app = context.app = {
|
|
6601
6608
|
_uid: uid$1++,
|
|
@@ -7336,7 +7343,7 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
7336
7343
|
}
|
|
7337
7344
|
if (needDeletionCheck) {
|
|
7338
7345
|
for (const key in slots) {
|
|
7339
|
-
if (!isInternalKey(key) &&
|
|
7346
|
+
if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
|
|
7340
7347
|
delete slots[key];
|
|
7341
7348
|
}
|
|
7342
7349
|
}
|
|
@@ -7512,7 +7519,14 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7512
7519
|
break;
|
|
7513
7520
|
case Comment:
|
|
7514
7521
|
if (domType !== 8 /* COMMENT */ || isFragmentStart) {
|
|
7515
|
-
|
|
7522
|
+
if (node.tagName.toLowerCase() === "template") {
|
|
7523
|
+
const content = vnode.el.content.firstChild;
|
|
7524
|
+
replaceNode(content, node, parentComponent);
|
|
7525
|
+
vnode.el = node = content;
|
|
7526
|
+
nextNode = nextSibling(node);
|
|
7527
|
+
} else {
|
|
7528
|
+
nextNode = onMismatch();
|
|
7529
|
+
}
|
|
7516
7530
|
} else {
|
|
7517
7531
|
nextNode = nextSibling(node);
|
|
7518
7532
|
}
|
|
@@ -7554,7 +7568,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7554
7568
|
break;
|
|
7555
7569
|
default:
|
|
7556
7570
|
if (shapeFlag & 1) {
|
|
7557
|
-
if (domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) {
|
|
7571
|
+
if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
|
|
7558
7572
|
nextNode = onMismatch();
|
|
7559
7573
|
} else {
|
|
7560
7574
|
nextNode = hydrateElement(
|
|
@@ -7569,6 +7583,13 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7569
7583
|
} else if (shapeFlag & 6) {
|
|
7570
7584
|
vnode.slotScopeIds = slotScopeIds;
|
|
7571
7585
|
const container = parentNode(node);
|
|
7586
|
+
if (isFragmentStart) {
|
|
7587
|
+
nextNode = locateClosingAnchor(node);
|
|
7588
|
+
} else if (isComment(node) && node.data === "teleport start") {
|
|
7589
|
+
nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
7590
|
+
} else {
|
|
7591
|
+
nextNode = nextSibling(node);
|
|
7592
|
+
}
|
|
7572
7593
|
mountComponent(
|
|
7573
7594
|
vnode,
|
|
7574
7595
|
container,
|
|
@@ -7578,10 +7599,6 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7578
7599
|
isSVGContainer(container),
|
|
7579
7600
|
optimized
|
|
7580
7601
|
);
|
|
7581
|
-
nextNode = isFragmentStart ? locateClosingAsyncAnchor(node) : nextSibling(node);
|
|
7582
|
-
if (nextNode && isComment(nextNode) && nextNode.data === "teleport end") {
|
|
7583
|
-
nextNode = nextSibling(nextNode);
|
|
7584
|
-
}
|
|
7585
7602
|
if (isAsyncWrapper(vnode)) {
|
|
7586
7603
|
let subTree;
|
|
7587
7604
|
if (isFragmentStart) {
|
|
@@ -7631,7 +7648,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7631
7648
|
};
|
|
7632
7649
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
7633
7650
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
7634
|
-
const { type, props, patchFlag, shapeFlag, dirs } = vnode;
|
|
7651
|
+
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
7635
7652
|
const forcePatchValue = type === "input" && dirs || type === "option";
|
|
7636
7653
|
{
|
|
7637
7654
|
if (dirs) {
|
|
@@ -7668,12 +7685,23 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7668
7685
|
if (vnodeHooks = props && props.onVnodeBeforeMount) {
|
|
7669
7686
|
invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7670
7687
|
}
|
|
7688
|
+
let needCallTransitionHooks = false;
|
|
7689
|
+
if (isTemplateNode(el)) {
|
|
7690
|
+
needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
7691
|
+
const content = el.content.firstChild;
|
|
7692
|
+
if (needCallTransitionHooks) {
|
|
7693
|
+
transition.beforeEnter(content);
|
|
7694
|
+
}
|
|
7695
|
+
replaceNode(content, el, parentComponent);
|
|
7696
|
+
vnode.el = el = content;
|
|
7697
|
+
}
|
|
7671
7698
|
if (dirs) {
|
|
7672
7699
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
7673
7700
|
}
|
|
7674
|
-
if ((vnodeHooks = props && props.onVnodeMounted) || dirs) {
|
|
7701
|
+
if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
|
|
7675
7702
|
queueEffectWithSuspense(() => {
|
|
7676
7703
|
vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
|
|
7704
|
+
needCallTransitionHooks && transition.enter(el);
|
|
7677
7705
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
7678
7706
|
}, parentSuspense);
|
|
7679
7707
|
}
|
|
@@ -7791,7 +7819,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7791
7819
|
);
|
|
7792
7820
|
vnode.el = null;
|
|
7793
7821
|
if (isFragment) {
|
|
7794
|
-
const end =
|
|
7822
|
+
const end = locateClosingAnchor(node);
|
|
7795
7823
|
while (true) {
|
|
7796
7824
|
const next2 = nextSibling(node);
|
|
7797
7825
|
if (next2 && next2 !== end) {
|
|
@@ -7816,14 +7844,14 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7816
7844
|
);
|
|
7817
7845
|
return next;
|
|
7818
7846
|
};
|
|
7819
|
-
const
|
|
7847
|
+
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
7820
7848
|
let match = 0;
|
|
7821
7849
|
while (node) {
|
|
7822
7850
|
node = nextSibling(node);
|
|
7823
7851
|
if (node && isComment(node)) {
|
|
7824
|
-
if (node.data ===
|
|
7852
|
+
if (node.data === open)
|
|
7825
7853
|
match++;
|
|
7826
|
-
if (node.data ===
|
|
7854
|
+
if (node.data === close) {
|
|
7827
7855
|
if (match === 0) {
|
|
7828
7856
|
return nextSibling(node);
|
|
7829
7857
|
} else {
|
|
@@ -7834,6 +7862,23 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7834
7862
|
}
|
|
7835
7863
|
return node;
|
|
7836
7864
|
};
|
|
7865
|
+
const replaceNode = (newNode, oldNode, parentComponent) => {
|
|
7866
|
+
const parentNode2 = oldNode.parentNode;
|
|
7867
|
+
if (parentNode2) {
|
|
7868
|
+
parentNode2.replaceChild(newNode, oldNode);
|
|
7869
|
+
}
|
|
7870
|
+
let parent = parentComponent;
|
|
7871
|
+
while (parent) {
|
|
7872
|
+
if (parent.vnode.el === oldNode) {
|
|
7873
|
+
parent.vnode.el = newNode;
|
|
7874
|
+
parent.subTree.el = newNode;
|
|
7875
|
+
}
|
|
7876
|
+
parent = parent.parent;
|
|
7877
|
+
}
|
|
7878
|
+
};
|
|
7879
|
+
const isTemplateNode = (node) => {
|
|
7880
|
+
return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template";
|
|
7881
|
+
};
|
|
7837
7882
|
return [hydrate, hydrateNode];
|
|
7838
7883
|
}
|
|
7839
7884
|
|
|
@@ -8161,7 +8206,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8161
8206
|
if (dirs) {
|
|
8162
8207
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
8163
8208
|
}
|
|
8164
|
-
const needCallTransitionHooks = (
|
|
8209
|
+
const needCallTransitionHooks = needTransition(parentSuspense, transition);
|
|
8165
8210
|
if (needCallTransitionHooks) {
|
|
8166
8211
|
transition.beforeEnter(el);
|
|
8167
8212
|
}
|
|
@@ -9078,8 +9123,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9078
9123
|
moveStaticNode(vnode, container, anchor);
|
|
9079
9124
|
return;
|
|
9080
9125
|
}
|
|
9081
|
-
const
|
|
9082
|
-
if (
|
|
9126
|
+
const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
|
|
9127
|
+
if (needTransition2) {
|
|
9083
9128
|
if (moveType === 0) {
|
|
9084
9129
|
transition.beforeEnter(el);
|
|
9085
9130
|
hostInsert(el, container, anchor);
|
|
@@ -9308,6 +9353,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9308
9353
|
function toggleRecurse({ effect, update }, allowed) {
|
|
9309
9354
|
effect.allowRecurse = update.allowRecurse = allowed;
|
|
9310
9355
|
}
|
|
9356
|
+
function needTransition(parentSuspense, transition) {
|
|
9357
|
+
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
9358
|
+
}
|
|
9311
9359
|
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
9312
9360
|
const ch1 = n1.children;
|
|
9313
9361
|
const ch2 = n2.children;
|
|
@@ -9533,19 +9581,18 @@ const TeleportImpl = {
|
|
|
9533
9581
|
if (target) {
|
|
9534
9582
|
hostRemove(targetAnchor);
|
|
9535
9583
|
}
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
}
|
|
9584
|
+
doRemove && hostRemove(anchor);
|
|
9585
|
+
if (shapeFlag & 16) {
|
|
9586
|
+
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
9587
|
+
for (let i = 0; i < children.length; i++) {
|
|
9588
|
+
const child = children[i];
|
|
9589
|
+
unmount(
|
|
9590
|
+
child,
|
|
9591
|
+
parentComponent,
|
|
9592
|
+
parentSuspense,
|
|
9593
|
+
shouldRemove,
|
|
9594
|
+
!!child.dynamicChildren
|
|
9595
|
+
);
|
|
9549
9596
|
}
|
|
9550
9597
|
}
|
|
9551
9598
|
},
|
|
@@ -9629,7 +9676,7 @@ function updateCssVars(vnode) {
|
|
|
9629
9676
|
const ctx = vnode.ctx;
|
|
9630
9677
|
if (ctx && ctx.ut) {
|
|
9631
9678
|
let node = vnode.children[0].el;
|
|
9632
|
-
while (node !== vnode.targetAnchor) {
|
|
9679
|
+
while (node && node !== vnode.targetAnchor) {
|
|
9633
9680
|
if (node.nodeType === 1)
|
|
9634
9681
|
node.setAttribute("data-v-owner", ctx.uid);
|
|
9635
9682
|
node = node.nextSibling;
|
|
@@ -9638,7 +9685,7 @@ function updateCssVars(vnode) {
|
|
|
9638
9685
|
}
|
|
9639
9686
|
}
|
|
9640
9687
|
|
|
9641
|
-
const normalizedAsyncComponentMap = /* @__PURE__ */ new
|
|
9688
|
+
const normalizedAsyncComponentMap = /* @__PURE__ */ new WeakMap();
|
|
9642
9689
|
function convertLegacyAsyncComponent(comp) {
|
|
9643
9690
|
if (normalizedAsyncComponentMap.has(comp)) {
|
|
9644
9691
|
return normalizedAsyncComponentMap.get(comp);
|
|
@@ -10717,7 +10764,7 @@ function isMemoSame(cached, memo) {
|
|
|
10717
10764
|
return true;
|
|
10718
10765
|
}
|
|
10719
10766
|
|
|
10720
|
-
const version = "3.3.
|
|
10767
|
+
const version = "3.3.7";
|
|
10721
10768
|
const ssrUtils = null;
|
|
10722
10769
|
const resolveFilter = resolveFilter$1 ;
|
|
10723
10770
|
const _compatUtils = {
|