@vue/runtime-core 3.5.42 → 3.5.44
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-core.cjs.js +172 -75
- package/dist/runtime-core.cjs.prod.js +170 -65
- package/dist/runtime-core.d.ts +6 -7
- package/dist/runtime-core.esm-bundler.js +173 -76
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.44
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -337,21 +337,21 @@ function queuePostFlushCb(cb) {
|
|
|
337
337
|
}
|
|
338
338
|
queueFlush();
|
|
339
339
|
}
|
|
340
|
-
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
340
|
+
function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
|
|
341
341
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
342
342
|
seen = seen || /* @__PURE__ */ new Map();
|
|
343
343
|
}
|
|
344
344
|
for (; i < queue.length; i++) {
|
|
345
345
|
const cb = queue[i];
|
|
346
346
|
if (cb && cb.flags & 2) {
|
|
347
|
-
if (instance && cb.id !== instance.uid) {
|
|
347
|
+
if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
|
|
348
348
|
continue;
|
|
349
349
|
}
|
|
350
350
|
if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) {
|
|
351
351
|
continue;
|
|
352
352
|
}
|
|
353
353
|
queue.splice(i, 1);
|
|
354
|
-
i
|
|
354
|
+
i = instance ? i - 1 : flushIndex;
|
|
355
355
|
if (cb.flags & 4) {
|
|
356
356
|
cb.flags &= -2;
|
|
357
357
|
}
|
|
@@ -362,12 +362,23 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
function flushPostFlushCbs(seen) {
|
|
365
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
366
366
|
if (pendingPostFlushCbs.length) {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
)
|
|
370
|
-
|
|
367
|
+
let cbs = pendingPostFlushCbs;
|
|
368
|
+
let kept = 0;
|
|
369
|
+
if (skip) {
|
|
370
|
+
cbs = [];
|
|
371
|
+
for (let i = 0; i < pendingPostFlushCbs.length; i++) {
|
|
372
|
+
const cb = pendingPostFlushCbs[i];
|
|
373
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
|
|
374
|
+
pendingPostFlushCbs[kept++] = cb;
|
|
375
|
+
} else {
|
|
376
|
+
cbs.push(cb);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
|
|
381
|
+
pendingPostFlushCbs.length = kept;
|
|
371
382
|
if (activePostFlushCbs) {
|
|
372
383
|
for (let i = 0; i < deduped.length; i++) {
|
|
373
384
|
activePostFlushCbs.push(deduped[i]);
|
|
@@ -393,6 +404,22 @@ function flushPostFlushCbs(seen) {
|
|
|
393
404
|
postFlushIndex = 0;
|
|
394
405
|
}
|
|
395
406
|
}
|
|
407
|
+
let isFlushing = false;
|
|
408
|
+
function flushOnAppMount(fn, minUid) {
|
|
409
|
+
if (isFlushing) {
|
|
410
|
+
fn();
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
|
|
414
|
+
fn();
|
|
415
|
+
isFlushing = true;
|
|
416
|
+
try {
|
|
417
|
+
flushPreFlushCbs(void 0, minUid);
|
|
418
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
419
|
+
} finally {
|
|
420
|
+
isFlushing = false;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
396
423
|
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
397
424
|
function flushJobs(seen) {
|
|
398
425
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -894,6 +921,7 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
894
921
|
let isPre = false;
|
|
895
922
|
if (flush === "post") {
|
|
896
923
|
baseWatchOptions.scheduler = (job) => {
|
|
924
|
+
job.i = instance;
|
|
897
925
|
queuePostRenderEffect(job, instance && instance.suspense);
|
|
898
926
|
};
|
|
899
927
|
} else if (flush !== "sync") {
|
|
@@ -1195,7 +1223,11 @@ const TeleportImpl = {
|
|
|
1195
1223
|
};
|
|
1196
1224
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
|
|
1197
1225
|
if (moveType === 0) {
|
|
1226
|
+
if (vnode.targetStart) {
|
|
1227
|
+
insert(vnode.targetStart, container, parentAnchor);
|
|
1228
|
+
}
|
|
1198
1229
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
1230
|
+
parentAnchor = vnode.targetAnchor;
|
|
1199
1231
|
}
|
|
1200
1232
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
1201
1233
|
const isReorder = moveType === 2;
|
|
@@ -1364,10 +1396,6 @@ const BaseTransitionPropsValidators = {
|
|
|
1364
1396
|
onAfterAppear: TransitionHookValidator,
|
|
1365
1397
|
onAppearCancelled: TransitionHookValidator
|
|
1366
1398
|
};
|
|
1367
|
-
const recursiveGetSubtree = (instance) => {
|
|
1368
|
-
const subTree = instance.subTree;
|
|
1369
|
-
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
1370
|
-
};
|
|
1371
1399
|
const BaseTransitionImpl = {
|
|
1372
1400
|
name: `BaseTransition`,
|
|
1373
1401
|
props: BaseTransitionPropsValidators,
|
|
@@ -1408,7 +1436,7 @@ const BaseTransitionImpl = {
|
|
|
1408
1436
|
setTransitionHooks(innerChild, enterHooks);
|
|
1409
1437
|
}
|
|
1410
1438
|
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
1411
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) &&
|
|
1439
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
|
|
1412
1440
|
let leavingHooks = resolveTransitionHooks(
|
|
1413
1441
|
oldInnerChild,
|
|
1414
1442
|
rawProps,
|
|
@@ -1542,8 +1570,15 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
1542
1570
|
);
|
|
1543
1571
|
}
|
|
1544
1572
|
const leavingVNode = leavingVNodesCache[key];
|
|
1545
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
1546
|
-
leavingVNode.el[leaveCbKey]
|
|
1573
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
1574
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
1575
|
+
if (!leavingCb) {
|
|
1576
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
1577
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
1578
|
+
}
|
|
1579
|
+
if (leavingCb) {
|
|
1580
|
+
leavingCb();
|
|
1581
|
+
}
|
|
1547
1582
|
}
|
|
1548
1583
|
callHook(hook, [el]);
|
|
1549
1584
|
},
|
|
@@ -1671,6 +1706,12 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
1671
1706
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
1672
1707
|
} else {
|
|
1673
1708
|
vnode.transition = hooks;
|
|
1709
|
+
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
1710
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
1711
|
+
if (child) {
|
|
1712
|
+
setTransitionHooks(child, hooks);
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1674
1715
|
}
|
|
1675
1716
|
}
|
|
1676
1717
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -1695,6 +1736,18 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
1695
1736
|
}
|
|
1696
1737
|
return ret;
|
|
1697
1738
|
}
|
|
1739
|
+
function getTransitionRoot(vnode) {
|
|
1740
|
+
if (vnode.component) {
|
|
1741
|
+
return getTransitionRoot(vnode.component.subTree);
|
|
1742
|
+
}
|
|
1743
|
+
if (vnode.type === Fragment) {
|
|
1744
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
1745
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
1746
|
+
}
|
|
1747
|
+
if (vnode.type !== Comment) {
|
|
1748
|
+
return vnode;
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1698
1751
|
|
|
1699
1752
|
// @__NO_SIDE_EFFECTS__
|
|
1700
1753
|
function defineComponent(options, extraOptions) {
|
|
@@ -2068,13 +2121,15 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
2068
2121
|
getContainerType(container),
|
|
2069
2122
|
optimized
|
|
2070
2123
|
);
|
|
2071
|
-
if (isAsyncWrapper(vnode) && !vnode.component.subTree) {
|
|
2124
|
+
if ((isAsyncWrapper(vnode) || vnode.component.asyncDep) && !vnode.component.subTree) {
|
|
2072
2125
|
let subTree;
|
|
2073
2126
|
if (isFragmentStart) {
|
|
2074
2127
|
subTree = createVNode(Static);
|
|
2075
2128
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
2076
2129
|
} else {
|
|
2077
|
-
subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
|
|
2130
|
+
subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
|
|
2131
|
+
node.nodeType === 8 ? Comment : "div"
|
|
2132
|
+
);
|
|
2078
2133
|
}
|
|
2079
2134
|
subTree.el = node;
|
|
2080
2135
|
vnode.component.subTree = subTree;
|
|
@@ -2610,14 +2665,22 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
2610
2665
|
break;
|
|
2611
2666
|
}
|
|
2612
2667
|
}, opts);
|
|
2613
|
-
|
|
2614
|
-
if (!(el instanceof Element)) return;
|
|
2668
|
+
const observe = (el) => {
|
|
2615
2669
|
if (elementIsVisibleInViewport(el)) {
|
|
2616
2670
|
hydrate();
|
|
2617
2671
|
ob.disconnect();
|
|
2618
2672
|
return false;
|
|
2619
2673
|
}
|
|
2674
|
+
if (getComputedStyle(el).display === "contents") {
|
|
2675
|
+
for (let i = 0; i < el.children.length; i++) {
|
|
2676
|
+
if (observe(el.children[i]) === false) return false;
|
|
2677
|
+
}
|
|
2678
|
+
}
|
|
2620
2679
|
ob.observe(el);
|
|
2680
|
+
};
|
|
2681
|
+
forEach((el) => {
|
|
2682
|
+
if (!(el instanceof Element)) return;
|
|
2683
|
+
return observe(el);
|
|
2621
2684
|
});
|
|
2622
2685
|
return () => ob.disconnect();
|
|
2623
2686
|
};
|
|
@@ -2974,6 +3037,7 @@ const KeepAliveImpl = {
|
|
|
2974
3037
|
unmount(cached);
|
|
2975
3038
|
} else if (current) {
|
|
2976
3039
|
resetShapeFlag(current);
|
|
3040
|
+
if (cached) resetShapeFlag(cached);
|
|
2977
3041
|
}
|
|
2978
3042
|
cache.delete(key);
|
|
2979
3043
|
keys.delete(key);
|
|
@@ -3264,10 +3328,12 @@ function renderList(source, renderItem, cache, index) {
|
|
|
3264
3328
|
);
|
|
3265
3329
|
}
|
|
3266
3330
|
} else if (typeof source === "number") {
|
|
3267
|
-
if (
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3331
|
+
if (!Number.isInteger(source) || source < 0) {
|
|
3332
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3333
|
+
warn$1(
|
|
3334
|
+
`The v-for range expects a positive integer value but got ${source}.`
|
|
3335
|
+
);
|
|
3336
|
+
}
|
|
3271
3337
|
ret = [];
|
|
3272
3338
|
} else {
|
|
3273
3339
|
ret = new Array(source);
|
|
@@ -4909,7 +4975,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
4909
4975
|
}
|
|
4910
4976
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
4911
4977
|
const key = nextKeys[i];
|
|
4912
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
4978
|
+
if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
4913
4979
|
return true;
|
|
4914
4980
|
}
|
|
4915
4981
|
}
|
|
@@ -5563,6 +5629,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5563
5629
|
optimized = false;
|
|
5564
5630
|
n2.dynamicChildren = null;
|
|
5565
5631
|
}
|
|
5632
|
+
if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
|
|
5633
|
+
if (n2.dynamicChildren === EMPTY_ARR) {
|
|
5634
|
+
n2.dynamicChildren = [];
|
|
5635
|
+
}
|
|
5636
|
+
n2.dynamicChildren.hasOnce = true;
|
|
5637
|
+
}
|
|
5566
5638
|
const { type, ref, shapeFlag } = n2;
|
|
5567
5639
|
switch (type) {
|
|
5568
5640
|
case Text:
|
|
@@ -5969,15 +6041,16 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5969
6041
|
for (let i = 0; i < newChildren.length; i++) {
|
|
5970
6042
|
const oldVNode = oldChildren[i];
|
|
5971
6043
|
const newVNode = newChildren[i];
|
|
6044
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
5972
6045
|
const container = (
|
|
5973
6046
|
// oldVNode may be an errored async setup() component inside Suspense
|
|
5974
6047
|
// which will not have a mounted element
|
|
5975
|
-
|
|
6048
|
+
oldEl && // - In the case of a Fragment, we need to provide the actual parent
|
|
5976
6049
|
// of the Fragment itself so it can move its children.
|
|
5977
6050
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
5978
6051
|
// which also requires the correct parent container
|
|
5979
6052
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
5980
|
-
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(
|
|
6053
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
|
|
5981
6054
|
// In other cases, the parent container is not actually used so we
|
|
5982
6055
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
5983
6056
|
fallbackContainer
|
|
@@ -6152,7 +6225,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6152
6225
|
}
|
|
6153
6226
|
if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null;
|
|
6154
6227
|
if (instance.asyncDep) {
|
|
6155
|
-
parentSuspense && parentSuspense.registerDep(
|
|
6228
|
+
parentSuspense && parentSuspense.registerDep(
|
|
6229
|
+
instance,
|
|
6230
|
+
setupRenderEffect,
|
|
6231
|
+
optimized,
|
|
6232
|
+
namespace
|
|
6233
|
+
);
|
|
6156
6234
|
if (!initialVNode.el) {
|
|
6157
6235
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
6158
6236
|
processCommentNode(null, placeholder, container, anchor);
|
|
@@ -6181,6 +6259,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6181
6259
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6182
6260
|
pushWarningContext(n2);
|
|
6183
6261
|
}
|
|
6262
|
+
n2.el = n1.el;
|
|
6263
|
+
n2.placeholder = n1.placeholder;
|
|
6184
6264
|
updateComponentPreRender(instance, n2, optimized);
|
|
6185
6265
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6186
6266
|
popWarningContext();
|
|
@@ -6192,6 +6272,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6192
6272
|
}
|
|
6193
6273
|
} else {
|
|
6194
6274
|
n2.el = n1.el;
|
|
6275
|
+
n2.placeholder = n1.placeholder;
|
|
6195
6276
|
instance.vnode = n2;
|
|
6196
6277
|
}
|
|
6197
6278
|
};
|
|
@@ -6772,7 +6853,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6772
6853
|
cacheIndex,
|
|
6773
6854
|
memo
|
|
6774
6855
|
} = vnode;
|
|
6775
|
-
if (patchFlag === -2) {
|
|
6856
|
+
if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
|
|
6776
6857
|
optimized = false;
|
|
6777
6858
|
}
|
|
6778
6859
|
if (ref != null) {
|
|
@@ -6780,7 +6861,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6780
6861
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
6781
6862
|
resetTracking();
|
|
6782
6863
|
}
|
|
6783
|
-
if (cacheIndex != null) {
|
|
6864
|
+
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
|
|
6784
6865
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
6785
6866
|
}
|
|
6786
6867
|
if (shapeFlag & 256) {
|
|
@@ -6845,35 +6926,37 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6845
6926
|
};
|
|
6846
6927
|
const remove = (vnode) => {
|
|
6847
6928
|
const { type, el, anchor, transition } = vnode;
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
if (child.type === Comment) {
|
|
6852
|
-
hostRemove(child.el);
|
|
6853
|
-
} else {
|
|
6854
|
-
remove(child);
|
|
6855
|
-
}
|
|
6856
|
-
});
|
|
6857
|
-
} else {
|
|
6858
|
-
removeFragment(el, anchor);
|
|
6859
|
-
}
|
|
6929
|
+
const isFragment = type === Fragment;
|
|
6930
|
+
if (isFragment && !transition) {
|
|
6931
|
+
removeFragment(el, anchor);
|
|
6860
6932
|
return;
|
|
6861
6933
|
}
|
|
6862
6934
|
if (type === Static) {
|
|
6863
6935
|
removeStaticNode(vnode);
|
|
6936
|
+
if (transition && !transition.persisted && transition.afterLeave) {
|
|
6937
|
+
transition.afterLeave();
|
|
6938
|
+
}
|
|
6864
6939
|
return;
|
|
6865
6940
|
}
|
|
6941
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
6866
6942
|
const performRemove = () => {
|
|
6867
|
-
|
|
6943
|
+
if (isFragment) {
|
|
6944
|
+
if (hostParentNode(el)) {
|
|
6945
|
+
removeFragment(el, anchor);
|
|
6946
|
+
}
|
|
6947
|
+
} else {
|
|
6948
|
+
hostRemove(el);
|
|
6949
|
+
}
|
|
6868
6950
|
if (transition && !transition.persisted && transition.afterLeave) {
|
|
6869
6951
|
transition.afterLeave();
|
|
6870
6952
|
}
|
|
6871
6953
|
};
|
|
6872
|
-
if (
|
|
6954
|
+
if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
6873
6955
|
const { leave, delayLeave } = transition;
|
|
6874
|
-
const
|
|
6956
|
+
const leavingEl = leavingNode.el;
|
|
6957
|
+
const performLeave = () => leave(leavingEl, performRemove);
|
|
6875
6958
|
if (delayLeave) {
|
|
6876
|
-
delayLeave(
|
|
6959
|
+
delayLeave(leavingEl, performRemove, performLeave);
|
|
6877
6960
|
} else {
|
|
6878
6961
|
performLeave();
|
|
6879
6962
|
}
|
|
@@ -6904,6 +6987,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6904
6987
|
if (job) {
|
|
6905
6988
|
job.flags |= 8;
|
|
6906
6989
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
6990
|
+
} else if (instance.vnode.el && subTree) {
|
|
6991
|
+
subTree.transition = instance.vnode.transition;
|
|
6992
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
6907
6993
|
}
|
|
6908
6994
|
if (um) {
|
|
6909
6995
|
queuePostRenderEffect(um, parentSuspense);
|
|
@@ -6931,32 +7017,26 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6931
7017
|
const teleportEnd = el && el[TeleportEndKey];
|
|
6932
7018
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
6933
7019
|
};
|
|
6934
|
-
let isFlushing = false;
|
|
6935
7020
|
const render = (vnode, container, namespace) => {
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
if (
|
|
6939
|
-
|
|
6940
|
-
|
|
7021
|
+
const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
|
|
7022
|
+
flushOnAppMount(() => {
|
|
7023
|
+
if (vnode == null) {
|
|
7024
|
+
if (container._vnode) {
|
|
7025
|
+
unmount(container._vnode, null, null, true);
|
|
7026
|
+
}
|
|
7027
|
+
} else {
|
|
7028
|
+
patch(
|
|
7029
|
+
container._vnode || null,
|
|
7030
|
+
vnode,
|
|
7031
|
+
container,
|
|
7032
|
+
null,
|
|
7033
|
+
null,
|
|
7034
|
+
null,
|
|
7035
|
+
namespace
|
|
7036
|
+
);
|
|
6941
7037
|
}
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
container._vnode || null,
|
|
6945
|
-
vnode,
|
|
6946
|
-
container,
|
|
6947
|
-
null,
|
|
6948
|
-
null,
|
|
6949
|
-
null,
|
|
6950
|
-
namespace
|
|
6951
|
-
);
|
|
6952
|
-
}
|
|
6953
|
-
container._vnode = vnode;
|
|
6954
|
-
if (!isFlushing) {
|
|
6955
|
-
isFlushing = true;
|
|
6956
|
-
flushPreFlushCbs(instance);
|
|
6957
|
-
flushPostFlushCbs();
|
|
6958
|
-
isFlushing = false;
|
|
6959
|
-
}
|
|
7038
|
+
container._vnode = vnode;
|
|
7039
|
+
}, minUid);
|
|
6960
7040
|
};
|
|
6961
7041
|
const internals = {
|
|
6962
7042
|
p: patch,
|
|
@@ -7118,7 +7198,7 @@ const SuspenseImpl = {
|
|
|
7118
7198
|
rendererInternals
|
|
7119
7199
|
);
|
|
7120
7200
|
} else {
|
|
7121
|
-
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
7201
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
|
|
7122
7202
|
n2.suspense = n1.suspense;
|
|
7123
7203
|
n2.suspense.vnode = n2;
|
|
7124
7204
|
n2.el = n1.el;
|
|
@@ -7204,10 +7284,12 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
7204
7284
|
if (pendingBranch) {
|
|
7205
7285
|
suspense.pendingBranch = newBranch;
|
|
7206
7286
|
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
7287
|
+
suspense.deps++;
|
|
7207
7288
|
patch(
|
|
7208
7289
|
pendingBranch,
|
|
7209
7290
|
newBranch,
|
|
7210
|
-
|
|
7291
|
+
// a hydrating pending branch is adopted SSR DOM, already in place
|
|
7292
|
+
isHydrating ? container : suspense.hiddenContainer,
|
|
7211
7293
|
null,
|
|
7212
7294
|
parentComponent,
|
|
7213
7295
|
suspense,
|
|
@@ -7215,6 +7297,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
7215
7297
|
slotScopeIds,
|
|
7216
7298
|
optimized
|
|
7217
7299
|
);
|
|
7300
|
+
suspense.deps--;
|
|
7218
7301
|
if (suspense.deps <= 0) {
|
|
7219
7302
|
suspense.resolve();
|
|
7220
7303
|
} else if (isInFallback) {
|
|
@@ -7480,6 +7563,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7480
7563
|
suspense.effects = [];
|
|
7481
7564
|
if (isSuspensible) {
|
|
7482
7565
|
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
7566
|
+
parentSuspenseId = void 0;
|
|
7483
7567
|
parentSuspense.deps--;
|
|
7484
7568
|
if (parentSuspense.deps === 0 && !sync) {
|
|
7485
7569
|
parentSuspense.resolve();
|
|
@@ -7540,7 +7624,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7540
7624
|
next() {
|
|
7541
7625
|
return suspense.activeBranch && next(suspense.activeBranch);
|
|
7542
7626
|
},
|
|
7543
|
-
|
|
7627
|
+
// `namespace` intentionally shadows the boundary's own: the dep must be
|
|
7628
|
+
// mounted with the namespace of the position it was rendered at, which can
|
|
7629
|
+
// differ from the boundary's (e.g. a component nested inside an <svg>).
|
|
7630
|
+
registerDep(instance, setupRenderEffect, optimized2, namespace2) {
|
|
7544
7631
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
7545
7632
|
if (isInPendingSuspense) {
|
|
7546
7633
|
suspense.deps++;
|
|
@@ -7553,6 +7640,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7553
7640
|
return;
|
|
7554
7641
|
}
|
|
7555
7642
|
unsetCurrentInstance();
|
|
7643
|
+
if (!instance.scope.active) {
|
|
7644
|
+
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
7645
|
+
suspense.resolve();
|
|
7646
|
+
}
|
|
7647
|
+
return;
|
|
7648
|
+
}
|
|
7556
7649
|
instance.asyncResolved = true;
|
|
7557
7650
|
const { vnode: vnode2 } = instance;
|
|
7558
7651
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -7574,7 +7667,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7574
7667
|
// consider the comment placeholder case.
|
|
7575
7668
|
hydratedEl ? null : next(instance.subTree),
|
|
7576
7669
|
suspense,
|
|
7577
|
-
|
|
7670
|
+
namespace2,
|
|
7578
7671
|
optimized2
|
|
7579
7672
|
);
|
|
7580
7673
|
if (placeholder) {
|
|
@@ -7974,7 +8067,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
7974
8067
|
el: vnode.el,
|
|
7975
8068
|
anchor: vnode.anchor,
|
|
7976
8069
|
ctx: vnode.ctx,
|
|
7977
|
-
ce: vnode.ce
|
|
8070
|
+
ce: vnode.ce,
|
|
8071
|
+
cacheIndex: vnode.cacheIndex
|
|
7978
8072
|
};
|
|
7979
8073
|
if (transition && cloneTransition) {
|
|
7980
8074
|
setTransitionHooks(
|
|
@@ -8107,6 +8201,9 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
8107
8201
|
|
|
8108
8202
|
const emptyAppContext = createAppContext();
|
|
8109
8203
|
let uid = 0;
|
|
8204
|
+
function getNextUid() {
|
|
8205
|
+
return uid;
|
|
8206
|
+
}
|
|
8110
8207
|
function createComponentInstance(vnode, parent, suspense) {
|
|
8111
8208
|
const type = vnode.type;
|
|
8112
8209
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -8793,7 +8890,7 @@ function isMemoSame(cached, memo) {
|
|
|
8793
8890
|
return true;
|
|
8794
8891
|
}
|
|
8795
8892
|
|
|
8796
|
-
const version = "3.5.
|
|
8893
|
+
const version = "3.5.44";
|
|
8797
8894
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8798
8895
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8799
8896
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.44",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@vue/shared": "3.5.
|
|
50
|
-
"@vue/reactivity": "3.5.
|
|
49
|
+
"@vue/shared": "3.5.44",
|
|
50
|
+
"@vue/reactivity": "3.5.44"
|
|
51
51
|
}
|
|
52
52
|
}
|