@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
package/dist/runtime-core.cjs.js
CHANGED
|
@@ -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
|
**/
|
|
@@ -334,21 +334,21 @@ function queuePostFlushCb(cb) {
|
|
|
334
334
|
}
|
|
335
335
|
queueFlush();
|
|
336
336
|
}
|
|
337
|
-
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
337
|
+
function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
|
|
338
338
|
{
|
|
339
339
|
seen = seen || /* @__PURE__ */ new Map();
|
|
340
340
|
}
|
|
341
341
|
for (; i < queue.length; i++) {
|
|
342
342
|
const cb = queue[i];
|
|
343
343
|
if (cb && cb.flags & 2) {
|
|
344
|
-
if (instance && cb.id !== instance.uid) {
|
|
344
|
+
if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
|
|
345
345
|
continue;
|
|
346
346
|
}
|
|
347
347
|
if (checkRecursiveUpdates(seen, cb)) {
|
|
348
348
|
continue;
|
|
349
349
|
}
|
|
350
350
|
queue.splice(i, 1);
|
|
351
|
-
i
|
|
351
|
+
i = instance ? i - 1 : flushIndex;
|
|
352
352
|
if (cb.flags & 4) {
|
|
353
353
|
cb.flags &= -2;
|
|
354
354
|
}
|
|
@@ -359,12 +359,23 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
function flushPostFlushCbs(seen) {
|
|
362
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
363
363
|
if (pendingPostFlushCbs.length) {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
)
|
|
367
|
-
|
|
364
|
+
let cbs = pendingPostFlushCbs;
|
|
365
|
+
let kept = 0;
|
|
366
|
+
if (skip) {
|
|
367
|
+
cbs = [];
|
|
368
|
+
for (let i = 0; i < pendingPostFlushCbs.length; i++) {
|
|
369
|
+
const cb = pendingPostFlushCbs[i];
|
|
370
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
|
|
371
|
+
pendingPostFlushCbs[kept++] = cb;
|
|
372
|
+
} else {
|
|
373
|
+
cbs.push(cb);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
|
|
378
|
+
pendingPostFlushCbs.length = kept;
|
|
368
379
|
if (activePostFlushCbs) {
|
|
369
380
|
for (let i = 0; i < deduped.length; i++) {
|
|
370
381
|
activePostFlushCbs.push(deduped[i]);
|
|
@@ -390,6 +401,22 @@ function flushPostFlushCbs(seen) {
|
|
|
390
401
|
postFlushIndex = 0;
|
|
391
402
|
}
|
|
392
403
|
}
|
|
404
|
+
let isFlushing = false;
|
|
405
|
+
function flushOnAppMount(fn, minUid) {
|
|
406
|
+
if (isFlushing) {
|
|
407
|
+
fn();
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
|
|
411
|
+
fn();
|
|
412
|
+
isFlushing = true;
|
|
413
|
+
try {
|
|
414
|
+
flushPreFlushCbs(void 0, minUid);
|
|
415
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
416
|
+
} finally {
|
|
417
|
+
isFlushing = false;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
393
420
|
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
394
421
|
function flushJobs(seen) {
|
|
395
422
|
{
|
|
@@ -891,6 +918,7 @@ function doWatch(source, cb, options = shared.EMPTY_OBJ) {
|
|
|
891
918
|
let isPre = false;
|
|
892
919
|
if (flush === "post") {
|
|
893
920
|
baseWatchOptions.scheduler = (job) => {
|
|
921
|
+
job.i = instance;
|
|
894
922
|
queuePostRenderEffect(job, instance && instance.suspense);
|
|
895
923
|
};
|
|
896
924
|
} else if (flush !== "sync") {
|
|
@@ -1192,7 +1220,11 @@ const TeleportImpl = {
|
|
|
1192
1220
|
};
|
|
1193
1221
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
|
|
1194
1222
|
if (moveType === 0) {
|
|
1223
|
+
if (vnode.targetStart) {
|
|
1224
|
+
insert(vnode.targetStart, container, parentAnchor);
|
|
1225
|
+
}
|
|
1195
1226
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
1227
|
+
parentAnchor = vnode.targetAnchor;
|
|
1196
1228
|
}
|
|
1197
1229
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
1198
1230
|
const isReorder = moveType === 2;
|
|
@@ -1361,10 +1393,6 @@ const BaseTransitionPropsValidators = {
|
|
|
1361
1393
|
onAfterAppear: TransitionHookValidator,
|
|
1362
1394
|
onAppearCancelled: TransitionHookValidator
|
|
1363
1395
|
};
|
|
1364
|
-
const recursiveGetSubtree = (instance) => {
|
|
1365
|
-
const subTree = instance.subTree;
|
|
1366
|
-
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
1367
|
-
};
|
|
1368
1396
|
const BaseTransitionImpl = {
|
|
1369
1397
|
name: `BaseTransition`,
|
|
1370
1398
|
props: BaseTransitionPropsValidators,
|
|
@@ -1405,7 +1433,7 @@ const BaseTransitionImpl = {
|
|
|
1405
1433
|
setTransitionHooks(innerChild, enterHooks);
|
|
1406
1434
|
}
|
|
1407
1435
|
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
1408
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) &&
|
|
1436
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
|
|
1409
1437
|
let leavingHooks = resolveTransitionHooks(
|
|
1410
1438
|
oldInnerChild,
|
|
1411
1439
|
rawProps,
|
|
@@ -1538,8 +1566,15 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
1538
1566
|
);
|
|
1539
1567
|
}
|
|
1540
1568
|
const leavingVNode = leavingVNodesCache[key];
|
|
1541
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
1542
|
-
leavingVNode.el[leaveCbKey]
|
|
1569
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
1570
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
1571
|
+
if (!leavingCb) {
|
|
1572
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
1573
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
1574
|
+
}
|
|
1575
|
+
if (leavingCb) {
|
|
1576
|
+
leavingCb();
|
|
1577
|
+
}
|
|
1543
1578
|
}
|
|
1544
1579
|
callHook(hook, [el]);
|
|
1545
1580
|
},
|
|
@@ -1667,6 +1702,12 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
1667
1702
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
1668
1703
|
} else {
|
|
1669
1704
|
vnode.transition = hooks;
|
|
1705
|
+
if (vnode.type === Fragment && shared.isArray(vnode.children)) {
|
|
1706
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
1707
|
+
if (child) {
|
|
1708
|
+
setTransitionHooks(child, hooks);
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1670
1711
|
}
|
|
1671
1712
|
}
|
|
1672
1713
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -1691,6 +1732,18 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
1691
1732
|
}
|
|
1692
1733
|
return ret;
|
|
1693
1734
|
}
|
|
1735
|
+
function getTransitionRoot(vnode) {
|
|
1736
|
+
if (vnode.component) {
|
|
1737
|
+
return getTransitionRoot(vnode.component.subTree);
|
|
1738
|
+
}
|
|
1739
|
+
if (vnode.type === Fragment) {
|
|
1740
|
+
const child = shared.isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
1741
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
1742
|
+
}
|
|
1743
|
+
if (vnode.type !== Comment) {
|
|
1744
|
+
return vnode;
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1694
1747
|
|
|
1695
1748
|
// @__NO_SIDE_EFFECTS__
|
|
1696
1749
|
function defineComponent(options, extraOptions) {
|
|
@@ -2064,13 +2117,15 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
2064
2117
|
getContainerType(container),
|
|
2065
2118
|
optimized
|
|
2066
2119
|
);
|
|
2067
|
-
if (isAsyncWrapper(vnode) && !vnode.component.subTree) {
|
|
2120
|
+
if ((isAsyncWrapper(vnode) || vnode.component.asyncDep) && !vnode.component.subTree) {
|
|
2068
2121
|
let subTree;
|
|
2069
2122
|
if (isFragmentStart) {
|
|
2070
2123
|
subTree = createVNode(Static);
|
|
2071
2124
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
2072
2125
|
} else {
|
|
2073
|
-
subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
|
|
2126
|
+
subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
|
|
2127
|
+
node.nodeType === 8 ? Comment : "div"
|
|
2128
|
+
);
|
|
2074
2129
|
}
|
|
2075
2130
|
subTree.el = node;
|
|
2076
2131
|
vnode.component.subTree = subTree;
|
|
@@ -2594,14 +2649,22 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
2594
2649
|
break;
|
|
2595
2650
|
}
|
|
2596
2651
|
}, opts);
|
|
2597
|
-
|
|
2598
|
-
if (!(el instanceof Element)) return;
|
|
2652
|
+
const observe = (el) => {
|
|
2599
2653
|
if (elementIsVisibleInViewport(el)) {
|
|
2600
2654
|
hydrate();
|
|
2601
2655
|
ob.disconnect();
|
|
2602
2656
|
return false;
|
|
2603
2657
|
}
|
|
2658
|
+
if (getComputedStyle(el).display === "contents") {
|
|
2659
|
+
for (let i = 0; i < el.children.length; i++) {
|
|
2660
|
+
if (observe(el.children[i]) === false) return false;
|
|
2661
|
+
}
|
|
2662
|
+
}
|
|
2604
2663
|
ob.observe(el);
|
|
2664
|
+
};
|
|
2665
|
+
forEach((el) => {
|
|
2666
|
+
if (!(el instanceof Element)) return;
|
|
2667
|
+
return observe(el);
|
|
2605
2668
|
});
|
|
2606
2669
|
return () => ob.disconnect();
|
|
2607
2670
|
};
|
|
@@ -2955,6 +3018,7 @@ const KeepAliveImpl = {
|
|
|
2955
3018
|
unmount(cached);
|
|
2956
3019
|
} else if (current) {
|
|
2957
3020
|
resetShapeFlag(current);
|
|
3021
|
+
if (cached) resetShapeFlag(cached);
|
|
2958
3022
|
}
|
|
2959
3023
|
cache.delete(key);
|
|
2960
3024
|
keys.delete(key);
|
|
@@ -3246,9 +3310,11 @@ function renderList(source, renderItem, cache, index) {
|
|
|
3246
3310
|
}
|
|
3247
3311
|
} else if (typeof source === "number") {
|
|
3248
3312
|
if (!Number.isInteger(source) || source < 0) {
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3313
|
+
{
|
|
3314
|
+
warn$1(
|
|
3315
|
+
`The v-for range expects a positive integer value but got ${source}.`
|
|
3316
|
+
);
|
|
3317
|
+
}
|
|
3252
3318
|
ret = [];
|
|
3253
3319
|
} else {
|
|
3254
3320
|
ret = new Array(source);
|
|
@@ -4886,7 +4952,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
4886
4952
|
}
|
|
4887
4953
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
4888
4954
|
const key = nextKeys[i];
|
|
4889
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
4955
|
+
if (!shared.hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
4890
4956
|
return true;
|
|
4891
4957
|
}
|
|
4892
4958
|
}
|
|
@@ -5513,6 +5579,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5513
5579
|
optimized = false;
|
|
5514
5580
|
n2.dynamicChildren = null;
|
|
5515
5581
|
}
|
|
5582
|
+
if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
|
|
5583
|
+
if (n2.dynamicChildren === shared.EMPTY_ARR) {
|
|
5584
|
+
n2.dynamicChildren = [];
|
|
5585
|
+
}
|
|
5586
|
+
n2.dynamicChildren.hasOnce = true;
|
|
5587
|
+
}
|
|
5516
5588
|
const { type, ref, shapeFlag } = n2;
|
|
5517
5589
|
switch (type) {
|
|
5518
5590
|
case Text:
|
|
@@ -5919,15 +5991,16 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5919
5991
|
for (let i = 0; i < newChildren.length; i++) {
|
|
5920
5992
|
const oldVNode = oldChildren[i];
|
|
5921
5993
|
const newVNode = newChildren[i];
|
|
5994
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
5922
5995
|
const container = (
|
|
5923
5996
|
// oldVNode may be an errored async setup() component inside Suspense
|
|
5924
5997
|
// which will not have a mounted element
|
|
5925
|
-
|
|
5998
|
+
oldEl && // - In the case of a Fragment, we need to provide the actual parent
|
|
5926
5999
|
// of the Fragment itself so it can move its children.
|
|
5927
6000
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
5928
6001
|
// which also requires the correct parent container
|
|
5929
6002
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
5930
|
-
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(
|
|
6003
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
|
|
5931
6004
|
// In other cases, the parent container is not actually used so we
|
|
5932
6005
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
5933
6006
|
fallbackContainer
|
|
@@ -6091,7 +6164,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6091
6164
|
}
|
|
6092
6165
|
if (isHmrUpdating) initialVNode.el = null;
|
|
6093
6166
|
if (instance.asyncDep) {
|
|
6094
|
-
parentSuspense && parentSuspense.registerDep(
|
|
6167
|
+
parentSuspense && parentSuspense.registerDep(
|
|
6168
|
+
instance,
|
|
6169
|
+
setupRenderEffect,
|
|
6170
|
+
optimized,
|
|
6171
|
+
namespace
|
|
6172
|
+
);
|
|
6095
6173
|
if (!initialVNode.el) {
|
|
6096
6174
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
6097
6175
|
processCommentNode(null, placeholder, container, anchor);
|
|
@@ -6120,6 +6198,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6120
6198
|
{
|
|
6121
6199
|
pushWarningContext(n2);
|
|
6122
6200
|
}
|
|
6201
|
+
n2.el = n1.el;
|
|
6202
|
+
n2.placeholder = n1.placeholder;
|
|
6123
6203
|
updateComponentPreRender(instance, n2, optimized);
|
|
6124
6204
|
{
|
|
6125
6205
|
popWarningContext();
|
|
@@ -6131,6 +6211,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6131
6211
|
}
|
|
6132
6212
|
} else {
|
|
6133
6213
|
n2.el = n1.el;
|
|
6214
|
+
n2.placeholder = n1.placeholder;
|
|
6134
6215
|
instance.vnode = n2;
|
|
6135
6216
|
}
|
|
6136
6217
|
};
|
|
@@ -6711,7 +6792,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6711
6792
|
cacheIndex,
|
|
6712
6793
|
memo
|
|
6713
6794
|
} = vnode;
|
|
6714
|
-
if (patchFlag === -2) {
|
|
6795
|
+
if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
|
|
6715
6796
|
optimized = false;
|
|
6716
6797
|
}
|
|
6717
6798
|
if (ref != null) {
|
|
@@ -6719,7 +6800,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6719
6800
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
6720
6801
|
reactivity.resetTracking();
|
|
6721
6802
|
}
|
|
6722
|
-
if (cacheIndex != null) {
|
|
6803
|
+
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
|
|
6723
6804
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
6724
6805
|
}
|
|
6725
6806
|
if (shapeFlag & 256) {
|
|
@@ -6784,35 +6865,37 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6784
6865
|
};
|
|
6785
6866
|
const remove = (vnode) => {
|
|
6786
6867
|
const { type, el, anchor, transition } = vnode;
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
if (child.type === Comment) {
|
|
6791
|
-
hostRemove(child.el);
|
|
6792
|
-
} else {
|
|
6793
|
-
remove(child);
|
|
6794
|
-
}
|
|
6795
|
-
});
|
|
6796
|
-
} else {
|
|
6797
|
-
removeFragment(el, anchor);
|
|
6798
|
-
}
|
|
6868
|
+
const isFragment = type === Fragment;
|
|
6869
|
+
if (isFragment && !transition) {
|
|
6870
|
+
removeFragment(el, anchor);
|
|
6799
6871
|
return;
|
|
6800
6872
|
}
|
|
6801
6873
|
if (type === Static) {
|
|
6802
6874
|
removeStaticNode(vnode);
|
|
6875
|
+
if (transition && !transition.persisted && transition.afterLeave) {
|
|
6876
|
+
transition.afterLeave();
|
|
6877
|
+
}
|
|
6803
6878
|
return;
|
|
6804
6879
|
}
|
|
6880
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
6805
6881
|
const performRemove = () => {
|
|
6806
|
-
|
|
6882
|
+
if (isFragment) {
|
|
6883
|
+
if (hostParentNode(el)) {
|
|
6884
|
+
removeFragment(el, anchor);
|
|
6885
|
+
}
|
|
6886
|
+
} else {
|
|
6887
|
+
hostRemove(el);
|
|
6888
|
+
}
|
|
6807
6889
|
if (transition && !transition.persisted && transition.afterLeave) {
|
|
6808
6890
|
transition.afterLeave();
|
|
6809
6891
|
}
|
|
6810
6892
|
};
|
|
6811
|
-
if (
|
|
6893
|
+
if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
6812
6894
|
const { leave, delayLeave } = transition;
|
|
6813
|
-
const
|
|
6895
|
+
const leavingEl = leavingNode.el;
|
|
6896
|
+
const performLeave = () => leave(leavingEl, performRemove);
|
|
6814
6897
|
if (delayLeave) {
|
|
6815
|
-
delayLeave(
|
|
6898
|
+
delayLeave(leavingEl, performRemove, performLeave);
|
|
6816
6899
|
} else {
|
|
6817
6900
|
performLeave();
|
|
6818
6901
|
}
|
|
@@ -6843,6 +6926,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6843
6926
|
if (job) {
|
|
6844
6927
|
job.flags |= 8;
|
|
6845
6928
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
6929
|
+
} else if (instance.vnode.el && subTree) {
|
|
6930
|
+
subTree.transition = instance.vnode.transition;
|
|
6931
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
6846
6932
|
}
|
|
6847
6933
|
if (um) {
|
|
6848
6934
|
queuePostRenderEffect(um, parentSuspense);
|
|
@@ -6870,32 +6956,26 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6870
6956
|
const teleportEnd = el && el[TeleportEndKey];
|
|
6871
6957
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
6872
6958
|
};
|
|
6873
|
-
let isFlushing = false;
|
|
6874
6959
|
const render = (vnode, container, namespace) => {
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
if (
|
|
6878
|
-
|
|
6879
|
-
|
|
6960
|
+
const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
|
|
6961
|
+
flushOnAppMount(() => {
|
|
6962
|
+
if (vnode == null) {
|
|
6963
|
+
if (container._vnode) {
|
|
6964
|
+
unmount(container._vnode, null, null, true);
|
|
6965
|
+
}
|
|
6966
|
+
} else {
|
|
6967
|
+
patch(
|
|
6968
|
+
container._vnode || null,
|
|
6969
|
+
vnode,
|
|
6970
|
+
container,
|
|
6971
|
+
null,
|
|
6972
|
+
null,
|
|
6973
|
+
null,
|
|
6974
|
+
namespace
|
|
6975
|
+
);
|
|
6880
6976
|
}
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
container._vnode || null,
|
|
6884
|
-
vnode,
|
|
6885
|
-
container,
|
|
6886
|
-
null,
|
|
6887
|
-
null,
|
|
6888
|
-
null,
|
|
6889
|
-
namespace
|
|
6890
|
-
);
|
|
6891
|
-
}
|
|
6892
|
-
container._vnode = vnode;
|
|
6893
|
-
if (!isFlushing) {
|
|
6894
|
-
isFlushing = true;
|
|
6895
|
-
flushPreFlushCbs(instance);
|
|
6896
|
-
flushPostFlushCbs();
|
|
6897
|
-
isFlushing = false;
|
|
6898
|
-
}
|
|
6977
|
+
container._vnode = vnode;
|
|
6978
|
+
}, minUid);
|
|
6899
6979
|
};
|
|
6900
6980
|
const internals = {
|
|
6901
6981
|
p: patch,
|
|
@@ -7057,7 +7137,7 @@ const SuspenseImpl = {
|
|
|
7057
7137
|
rendererInternals
|
|
7058
7138
|
);
|
|
7059
7139
|
} else {
|
|
7060
|
-
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
7140
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
|
|
7061
7141
|
n2.suspense = n1.suspense;
|
|
7062
7142
|
n2.suspense.vnode = n2;
|
|
7063
7143
|
n2.el = n1.el;
|
|
@@ -7143,10 +7223,12 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
7143
7223
|
if (pendingBranch) {
|
|
7144
7224
|
suspense.pendingBranch = newBranch;
|
|
7145
7225
|
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
7226
|
+
suspense.deps++;
|
|
7146
7227
|
patch(
|
|
7147
7228
|
pendingBranch,
|
|
7148
7229
|
newBranch,
|
|
7149
|
-
|
|
7230
|
+
// a hydrating pending branch is adopted SSR DOM, already in place
|
|
7231
|
+
isHydrating ? container : suspense.hiddenContainer,
|
|
7150
7232
|
null,
|
|
7151
7233
|
parentComponent,
|
|
7152
7234
|
suspense,
|
|
@@ -7154,6 +7236,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
7154
7236
|
slotScopeIds,
|
|
7155
7237
|
optimized
|
|
7156
7238
|
);
|
|
7239
|
+
suspense.deps--;
|
|
7157
7240
|
if (suspense.deps <= 0) {
|
|
7158
7241
|
suspense.resolve();
|
|
7159
7242
|
} else if (isInFallback) {
|
|
@@ -7419,6 +7502,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7419
7502
|
suspense.effects = [];
|
|
7420
7503
|
if (isSuspensible) {
|
|
7421
7504
|
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
7505
|
+
parentSuspenseId = void 0;
|
|
7422
7506
|
parentSuspense.deps--;
|
|
7423
7507
|
if (parentSuspense.deps === 0 && !sync) {
|
|
7424
7508
|
parentSuspense.resolve();
|
|
@@ -7479,7 +7563,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7479
7563
|
next() {
|
|
7480
7564
|
return suspense.activeBranch && next(suspense.activeBranch);
|
|
7481
7565
|
},
|
|
7482
|
-
|
|
7566
|
+
// `namespace` intentionally shadows the boundary's own: the dep must be
|
|
7567
|
+
// mounted with the namespace of the position it was rendered at, which can
|
|
7568
|
+
// differ from the boundary's (e.g. a component nested inside an <svg>).
|
|
7569
|
+
registerDep(instance, setupRenderEffect, optimized2, namespace2) {
|
|
7483
7570
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
7484
7571
|
if (isInPendingSuspense) {
|
|
7485
7572
|
suspense.deps++;
|
|
@@ -7492,6 +7579,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7492
7579
|
return;
|
|
7493
7580
|
}
|
|
7494
7581
|
unsetCurrentInstance();
|
|
7582
|
+
if (!instance.scope.active) {
|
|
7583
|
+
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
7584
|
+
suspense.resolve();
|
|
7585
|
+
}
|
|
7586
|
+
return;
|
|
7587
|
+
}
|
|
7495
7588
|
instance.asyncResolved = true;
|
|
7496
7589
|
const { vnode: vnode2 } = instance;
|
|
7497
7590
|
{
|
|
@@ -7513,7 +7606,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7513
7606
|
// consider the comment placeholder case.
|
|
7514
7607
|
hydratedEl ? null : next(instance.subTree),
|
|
7515
7608
|
suspense,
|
|
7516
|
-
|
|
7609
|
+
namespace2,
|
|
7517
7610
|
optimized2
|
|
7518
7611
|
);
|
|
7519
7612
|
if (placeholder) {
|
|
@@ -7913,7 +8006,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
7913
8006
|
el: vnode.el,
|
|
7914
8007
|
anchor: vnode.anchor,
|
|
7915
8008
|
ctx: vnode.ctx,
|
|
7916
|
-
ce: vnode.ce
|
|
8009
|
+
ce: vnode.ce,
|
|
8010
|
+
cacheIndex: vnode.cacheIndex
|
|
7917
8011
|
};
|
|
7918
8012
|
if (transition && cloneTransition) {
|
|
7919
8013
|
setTransitionHooks(
|
|
@@ -8046,6 +8140,9 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
8046
8140
|
|
|
8047
8141
|
const emptyAppContext = createAppContext();
|
|
8048
8142
|
let uid = 0;
|
|
8143
|
+
function getNextUid() {
|
|
8144
|
+
return uid;
|
|
8145
|
+
}
|
|
8049
8146
|
function createComponentInstance(vnode, parent, suspense) {
|
|
8050
8147
|
const type = vnode.type;
|
|
8051
8148
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -8718,7 +8815,7 @@ function isMemoSame(cached, memo) {
|
|
|
8718
8815
|
return true;
|
|
8719
8816
|
}
|
|
8720
8817
|
|
|
8721
|
-
const version = "3.5.
|
|
8818
|
+
const version = "3.5.44";
|
|
8722
8819
|
const warn = warn$1 ;
|
|
8723
8820
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8724
8821
|
const devtools = devtools$1 ;
|