@vue/runtime-core 3.5.18 → 3.5.20
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 +39 -43
- package/dist/runtime-core.cjs.prod.js +30 -37
- package/dist/runtime-core.esm-bundler.js +40 -44
- 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.20
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -492,7 +492,9 @@ function rerender(id, newRender) {
|
|
|
492
492
|
}
|
|
493
493
|
instance.renderCache = [];
|
|
494
494
|
isHmrUpdating = true;
|
|
495
|
-
instance.
|
|
495
|
+
if (!(instance.job.flags & 8)) {
|
|
496
|
+
instance.update();
|
|
497
|
+
}
|
|
496
498
|
isHmrUpdating = false;
|
|
497
499
|
});
|
|
498
500
|
}
|
|
@@ -1553,7 +1555,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1553
1555
|
const refs = owner.refs === shared.EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
1554
1556
|
const setupState = owner.setupState;
|
|
1555
1557
|
const rawSetupState = reactivity.toRaw(setupState);
|
|
1556
|
-
const canSetSetupRef = setupState === shared.EMPTY_OBJ ?
|
|
1558
|
+
const canSetSetupRef = setupState === shared.EMPTY_OBJ ? shared.NO : (key) => {
|
|
1557
1559
|
{
|
|
1558
1560
|
if (shared.hasOwn(rawSetupState, key) && !reactivity.isRef(rawSetupState[key])) {
|
|
1559
1561
|
warn$1(
|
|
@@ -1566,6 +1568,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1566
1568
|
}
|
|
1567
1569
|
return shared.hasOwn(rawSetupState, key);
|
|
1568
1570
|
};
|
|
1571
|
+
const canSetRef = (ref2) => {
|
|
1572
|
+
return !knownTemplateRefs.has(ref2);
|
|
1573
|
+
};
|
|
1569
1574
|
if (oldRef != null && oldRef !== ref) {
|
|
1570
1575
|
if (shared.isString(oldRef)) {
|
|
1571
1576
|
refs[oldRef] = null;
|
|
@@ -1573,7 +1578,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1573
1578
|
setupState[oldRef] = null;
|
|
1574
1579
|
}
|
|
1575
1580
|
} else if (reactivity.isRef(oldRef)) {
|
|
1576
|
-
oldRef
|
|
1581
|
+
if (canSetRef(oldRef)) {
|
|
1582
|
+
oldRef.value = null;
|
|
1583
|
+
}
|
|
1584
|
+
const oldRawRefAtom = oldRawRef;
|
|
1585
|
+
if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
|
|
1577
1586
|
}
|
|
1578
1587
|
}
|
|
1579
1588
|
if (shared.isFunction(ref)) {
|
|
@@ -1584,7 +1593,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1584
1593
|
if (_isString || _isRef) {
|
|
1585
1594
|
const doSet = () => {
|
|
1586
1595
|
if (rawRef.f) {
|
|
1587
|
-
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
|
|
1596
|
+
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
1588
1597
|
if (isUnmount) {
|
|
1589
1598
|
shared.isArray(existing) && shared.remove(existing, refValue);
|
|
1590
1599
|
} else {
|
|
@@ -1595,8 +1604,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1595
1604
|
setupState[ref] = refs[ref];
|
|
1596
1605
|
}
|
|
1597
1606
|
} else {
|
|
1598
|
-
|
|
1599
|
-
if (
|
|
1607
|
+
const newVal = [refValue];
|
|
1608
|
+
if (canSetRef(ref)) {
|
|
1609
|
+
ref.value = newVal;
|
|
1610
|
+
}
|
|
1611
|
+
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
1600
1612
|
}
|
|
1601
1613
|
} else if (!existing.includes(refValue)) {
|
|
1602
1614
|
existing.push(refValue);
|
|
@@ -1608,7 +1620,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1608
1620
|
setupState[ref] = value;
|
|
1609
1621
|
}
|
|
1610
1622
|
} else if (_isRef) {
|
|
1611
|
-
ref
|
|
1623
|
+
if (canSetRef(ref)) {
|
|
1624
|
+
ref.value = value;
|
|
1625
|
+
}
|
|
1612
1626
|
if (rawRef.k) refs[rawRef.k] = value;
|
|
1613
1627
|
} else {
|
|
1614
1628
|
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
@@ -3174,10 +3188,10 @@ const PublicInstanceProxyHandlers = {
|
|
|
3174
3188
|
return true;
|
|
3175
3189
|
},
|
|
3176
3190
|
has({
|
|
3177
|
-
_: { data, setupState, accessCache, ctx, appContext, propsOptions }
|
|
3191
|
+
_: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
|
|
3178
3192
|
}, key) {
|
|
3179
|
-
let normalizedProps;
|
|
3180
|
-
return !!accessCache[key] || data !== shared.EMPTY_OBJ && shared.hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key) || shared.hasOwn(ctx, key) || shared.hasOwn(publicPropertiesMap, key) || shared.hasOwn(appContext.config.globalProperties, key);
|
|
3193
|
+
let normalizedProps, cssModules;
|
|
3194
|
+
return !!(accessCache[key] || data !== shared.EMPTY_OBJ && key[0] !== "$" && shared.hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key) || shared.hasOwn(ctx, key) || shared.hasOwn(publicPropertiesMap, key) || shared.hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
|
|
3181
3195
|
},
|
|
3182
3196
|
defineProperty(target, key, descriptor) {
|
|
3183
3197
|
if (descriptor.get != null) {
|
|
@@ -4454,7 +4468,7 @@ function isBoolean(...args) {
|
|
|
4454
4468
|
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
4455
4469
|
}
|
|
4456
4470
|
|
|
4457
|
-
const isInternalKey = (key) => key === "_" || key === "
|
|
4471
|
+
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
4458
4472
|
const normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
4459
4473
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
4460
4474
|
if (rawSlot._n) {
|
|
@@ -4508,8 +4522,6 @@ const assignSlots = (slots, children, optimized) => {
|
|
|
4508
4522
|
const initSlots = (instance, children, optimized) => {
|
|
4509
4523
|
const slots = instance.slots = createInternalObject();
|
|
4510
4524
|
if (instance.vnode.shapeFlag & 32) {
|
|
4511
|
-
const cacheIndexes = children.__;
|
|
4512
|
-
if (cacheIndexes) shared.def(slots, "__", cacheIndexes, true);
|
|
4513
4525
|
const type = children._;
|
|
4514
4526
|
if (type) {
|
|
4515
4527
|
assignSlots(slots, children, optimized);
|
|
@@ -4570,12 +4582,10 @@ function endMeasure(instance, type) {
|
|
|
4570
4582
|
if (instance.appContext.config.performance && isSupported()) {
|
|
4571
4583
|
const startTag = `vue-${type}-${instance.uid}`;
|
|
4572
4584
|
const endTag = startTag + `:end`;
|
|
4585
|
+
const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
|
|
4573
4586
|
perf.mark(endTag);
|
|
4574
|
-
perf.measure(
|
|
4575
|
-
|
|
4576
|
-
startTag,
|
|
4577
|
-
endTag
|
|
4578
|
-
);
|
|
4587
|
+
perf.measure(measureName, startTag, endTag);
|
|
4588
|
+
perf.clearMeasures(measureName);
|
|
4579
4589
|
perf.clearMarks(startTag);
|
|
4580
4590
|
perf.clearMarks(endTag);
|
|
4581
4591
|
}
|
|
@@ -5767,6 +5777,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5767
5777
|
}
|
|
5768
5778
|
};
|
|
5769
5779
|
const performLeave = () => {
|
|
5780
|
+
if (el._isLeaving) {
|
|
5781
|
+
el[leaveCbKey](
|
|
5782
|
+
true
|
|
5783
|
+
/* cancelled */
|
|
5784
|
+
);
|
|
5785
|
+
}
|
|
5770
5786
|
leave(el, () => {
|
|
5771
5787
|
remove2();
|
|
5772
5788
|
afterLeave && afterLeave();
|
|
@@ -5912,27 +5928,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5912
5928
|
if (instance.type.__hmrId) {
|
|
5913
5929
|
unregisterHMR(instance);
|
|
5914
5930
|
}
|
|
5915
|
-
const {
|
|
5916
|
-
bum,
|
|
5917
|
-
scope,
|
|
5918
|
-
job,
|
|
5919
|
-
subTree,
|
|
5920
|
-
um,
|
|
5921
|
-
m,
|
|
5922
|
-
a,
|
|
5923
|
-
parent,
|
|
5924
|
-
slots: { __: slotCacheKeys }
|
|
5925
|
-
} = instance;
|
|
5931
|
+
const { bum, scope, job, subTree, um, m, a } = instance;
|
|
5926
5932
|
invalidateMount(m);
|
|
5927
5933
|
invalidateMount(a);
|
|
5928
5934
|
if (bum) {
|
|
5929
5935
|
shared.invokeArrayFns(bum);
|
|
5930
5936
|
}
|
|
5931
|
-
if (parent && shared.isArray(slotCacheKeys)) {
|
|
5932
|
-
slotCacheKeys.forEach((v) => {
|
|
5933
|
-
parent.renderCache[v] = void 0;
|
|
5934
|
-
});
|
|
5935
|
-
}
|
|
5936
5937
|
scope.stop();
|
|
5937
5938
|
if (job) {
|
|
5938
5939
|
job.flags |= 8;
|
|
@@ -5944,12 +5945,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5944
5945
|
queuePostRenderEffect(() => {
|
|
5945
5946
|
instance.isUnmounted = true;
|
|
5946
5947
|
}, parentSuspense);
|
|
5947
|
-
if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
|
|
5948
|
-
parentSuspense.deps--;
|
|
5949
|
-
if (parentSuspense.deps === 0) {
|
|
5950
|
-
parentSuspense.resolve();
|
|
5951
|
-
}
|
|
5952
|
-
}
|
|
5953
5948
|
{
|
|
5954
5949
|
devtoolsComponentRemoved(instance);
|
|
5955
5950
|
}
|
|
@@ -6050,7 +6045,8 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
6050
6045
|
if (!shallow && c2.patchFlag !== -2)
|
|
6051
6046
|
traverseStaticChildren(c1, c2);
|
|
6052
6047
|
}
|
|
6053
|
-
if (c2.type === Text
|
|
6048
|
+
if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
|
|
6049
|
+
c2.patchFlag !== -1) {
|
|
6054
6050
|
c2.el = c1.el;
|
|
6055
6051
|
}
|
|
6056
6052
|
if (c2.type === Comment && !c2.el) {
|
|
@@ -8387,7 +8383,7 @@ function isMemoSame(cached, memo) {
|
|
|
8387
8383
|
return true;
|
|
8388
8384
|
}
|
|
8389
8385
|
|
|
8390
|
-
const version = "3.5.
|
|
8386
|
+
const version = "3.5.20";
|
|
8391
8387
|
const warn = warn$1 ;
|
|
8392
8388
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8393
8389
|
const devtools = devtools$1 ;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.20
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1109,7 +1109,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1109
1109
|
const refs = owner.refs === shared.EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
1110
1110
|
const setupState = owner.setupState;
|
|
1111
1111
|
const rawSetupState = reactivity.toRaw(setupState);
|
|
1112
|
-
const canSetSetupRef = setupState === shared.EMPTY_OBJ ?
|
|
1112
|
+
const canSetSetupRef = setupState === shared.EMPTY_OBJ ? shared.NO : (key) => {
|
|
1113
1113
|
return shared.hasOwn(rawSetupState, key);
|
|
1114
1114
|
};
|
|
1115
1115
|
if (oldRef != null && oldRef !== ref) {
|
|
@@ -1119,7 +1119,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1119
1119
|
setupState[oldRef] = null;
|
|
1120
1120
|
}
|
|
1121
1121
|
} else if (reactivity.isRef(oldRef)) {
|
|
1122
|
-
|
|
1122
|
+
{
|
|
1123
|
+
oldRef.value = null;
|
|
1124
|
+
}
|
|
1125
|
+
const oldRawRefAtom = oldRawRef;
|
|
1126
|
+
if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
|
|
1123
1127
|
}
|
|
1124
1128
|
}
|
|
1125
1129
|
if (shared.isFunction(ref)) {
|
|
@@ -1130,7 +1134,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1130
1134
|
if (_isString || _isRef) {
|
|
1131
1135
|
const doSet = () => {
|
|
1132
1136
|
if (rawRef.f) {
|
|
1133
|
-
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
|
|
1137
|
+
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value ;
|
|
1134
1138
|
if (isUnmount) {
|
|
1135
1139
|
shared.isArray(existing) && shared.remove(existing, refValue);
|
|
1136
1140
|
} else {
|
|
@@ -1141,8 +1145,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1141
1145
|
setupState[ref] = refs[ref];
|
|
1142
1146
|
}
|
|
1143
1147
|
} else {
|
|
1144
|
-
|
|
1145
|
-
|
|
1148
|
+
const newVal = [refValue];
|
|
1149
|
+
{
|
|
1150
|
+
ref.value = newVal;
|
|
1151
|
+
}
|
|
1152
|
+
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
1146
1153
|
}
|
|
1147
1154
|
} else if (!existing.includes(refValue)) {
|
|
1148
1155
|
existing.push(refValue);
|
|
@@ -1154,7 +1161,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1154
1161
|
setupState[ref] = value;
|
|
1155
1162
|
}
|
|
1156
1163
|
} else if (_isRef) {
|
|
1157
|
-
|
|
1164
|
+
{
|
|
1165
|
+
ref.value = value;
|
|
1166
|
+
}
|
|
1158
1167
|
if (rawRef.k) refs[rawRef.k] = value;
|
|
1159
1168
|
} else ;
|
|
1160
1169
|
};
|
|
@@ -2459,10 +2468,10 @@ const PublicInstanceProxyHandlers = {
|
|
|
2459
2468
|
return true;
|
|
2460
2469
|
},
|
|
2461
2470
|
has({
|
|
2462
|
-
_: { data, setupState, accessCache, ctx, appContext, propsOptions }
|
|
2471
|
+
_: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
|
|
2463
2472
|
}, key) {
|
|
2464
|
-
let normalizedProps;
|
|
2465
|
-
return !!accessCache[key] || data !== shared.EMPTY_OBJ && shared.hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key) || shared.hasOwn(ctx, key) || shared.hasOwn(publicPropertiesMap, key) || shared.hasOwn(appContext.config.globalProperties, key);
|
|
2473
|
+
let normalizedProps, cssModules;
|
|
2474
|
+
return !!(accessCache[key] || data !== shared.EMPTY_OBJ && key[0] !== "$" && shared.hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key) || shared.hasOwn(ctx, key) || shared.hasOwn(publicPropertiesMap, key) || shared.hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
|
|
2466
2475
|
},
|
|
2467
2476
|
defineProperty(target, key, descriptor) {
|
|
2468
2477
|
if (descriptor.get != null) {
|
|
@@ -3341,7 +3350,7 @@ function validatePropName(key) {
|
|
|
3341
3350
|
return false;
|
|
3342
3351
|
}
|
|
3343
3352
|
|
|
3344
|
-
const isInternalKey = (key) => key === "_" || key === "
|
|
3353
|
+
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
3345
3354
|
const normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
3346
3355
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
3347
3356
|
if (rawSlot._n) {
|
|
@@ -3381,8 +3390,6 @@ const assignSlots = (slots, children, optimized) => {
|
|
|
3381
3390
|
const initSlots = (instance, children, optimized) => {
|
|
3382
3391
|
const slots = instance.slots = createInternalObject();
|
|
3383
3392
|
if (instance.vnode.shapeFlag & 32) {
|
|
3384
|
-
const cacheIndexes = children.__;
|
|
3385
|
-
if (cacheIndexes) shared.def(slots, "__", cacheIndexes, true);
|
|
3386
3393
|
const type = children._;
|
|
3387
3394
|
if (type) {
|
|
3388
3395
|
assignSlots(slots, children, optimized);
|
|
@@ -4477,6 +4484,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4477
4484
|
}
|
|
4478
4485
|
};
|
|
4479
4486
|
const performLeave = () => {
|
|
4487
|
+
if (el._isLeaving) {
|
|
4488
|
+
el[leaveCbKey](
|
|
4489
|
+
true
|
|
4490
|
+
/* cancelled */
|
|
4491
|
+
);
|
|
4492
|
+
}
|
|
4480
4493
|
leave(el, () => {
|
|
4481
4494
|
remove2();
|
|
4482
4495
|
afterLeave && afterLeave();
|
|
@@ -4611,27 +4624,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4611
4624
|
hostRemove(end);
|
|
4612
4625
|
};
|
|
4613
4626
|
const unmountComponent = (instance, parentSuspense, doRemove) => {
|
|
4614
|
-
const {
|
|
4615
|
-
bum,
|
|
4616
|
-
scope,
|
|
4617
|
-
job,
|
|
4618
|
-
subTree,
|
|
4619
|
-
um,
|
|
4620
|
-
m,
|
|
4621
|
-
a,
|
|
4622
|
-
parent,
|
|
4623
|
-
slots: { __: slotCacheKeys }
|
|
4624
|
-
} = instance;
|
|
4627
|
+
const { bum, scope, job, subTree, um, m, a } = instance;
|
|
4625
4628
|
invalidateMount(m);
|
|
4626
4629
|
invalidateMount(a);
|
|
4627
4630
|
if (bum) {
|
|
4628
4631
|
shared.invokeArrayFns(bum);
|
|
4629
4632
|
}
|
|
4630
|
-
if (parent && shared.isArray(slotCacheKeys)) {
|
|
4631
|
-
slotCacheKeys.forEach((v) => {
|
|
4632
|
-
parent.renderCache[v] = void 0;
|
|
4633
|
-
});
|
|
4634
|
-
}
|
|
4635
4633
|
scope.stop();
|
|
4636
4634
|
if (job) {
|
|
4637
4635
|
job.flags |= 8;
|
|
@@ -4643,12 +4641,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4643
4641
|
queuePostRenderEffect(() => {
|
|
4644
4642
|
instance.isUnmounted = true;
|
|
4645
4643
|
}, parentSuspense);
|
|
4646
|
-
if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
|
|
4647
|
-
parentSuspense.deps--;
|
|
4648
|
-
if (parentSuspense.deps === 0) {
|
|
4649
|
-
parentSuspense.resolve();
|
|
4650
|
-
}
|
|
4651
|
-
}
|
|
4652
4644
|
};
|
|
4653
4645
|
const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
|
|
4654
4646
|
for (let i = start; i < children.length; i++) {
|
|
@@ -4746,7 +4738,8 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
4746
4738
|
if (!shallow && c2.patchFlag !== -2)
|
|
4747
4739
|
traverseStaticChildren(c1, c2);
|
|
4748
4740
|
}
|
|
4749
|
-
if (c2.type === Text
|
|
4741
|
+
if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
|
|
4742
|
+
c2.patchFlag !== -1) {
|
|
4750
4743
|
c2.el = c1.el;
|
|
4751
4744
|
}
|
|
4752
4745
|
if (c2.type === Comment && !c2.el) {
|
|
@@ -6537,7 +6530,7 @@ function isMemoSame(cached, memo) {
|
|
|
6537
6530
|
return true;
|
|
6538
6531
|
}
|
|
6539
6532
|
|
|
6540
|
-
const version = "3.5.
|
|
6533
|
+
const version = "3.5.20";
|
|
6541
6534
|
const warn$1 = shared.NOOP;
|
|
6542
6535
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
6543
6536
|
const devtools = void 0;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.20
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
6
|
import { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, isReadonly, shallowReadArray, toReadonly, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1 } from '@vue/reactivity';
|
|
7
7
|
export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
|
|
8
|
-
import { isString, isFunction, EMPTY_OBJ, isPromise, isArray, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, normalizeCssVarValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, camelize, capitalize, isSymbol, isGloballyAllowed,
|
|
8
|
+
import { isString, isFunction, EMPTY_OBJ, isPromise, isArray, NOOP, getGlobalThis, extend, isBuiltInDirective, NO, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, normalizeCssVarValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, camelize, capitalize, isSymbol, isGloballyAllowed, EMPTY_ARR, hyphenate, makeMap, toRawType, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';
|
|
9
9
|
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
|
|
10
10
|
|
|
11
11
|
const stack = [];
|
|
@@ -495,7 +495,9 @@ function rerender(id, newRender) {
|
|
|
495
495
|
}
|
|
496
496
|
instance.renderCache = [];
|
|
497
497
|
isHmrUpdating = true;
|
|
498
|
-
instance.
|
|
498
|
+
if (!(instance.job.flags & 8)) {
|
|
499
|
+
instance.update();
|
|
500
|
+
}
|
|
499
501
|
isHmrUpdating = false;
|
|
500
502
|
});
|
|
501
503
|
}
|
|
@@ -1557,7 +1559,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1557
1559
|
const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
1558
1560
|
const setupState = owner.setupState;
|
|
1559
1561
|
const rawSetupState = toRaw(setupState);
|
|
1560
|
-
const canSetSetupRef = setupState === EMPTY_OBJ ?
|
|
1562
|
+
const canSetSetupRef = setupState === EMPTY_OBJ ? NO : (key) => {
|
|
1561
1563
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
1562
1564
|
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
1563
1565
|
warn$1(
|
|
@@ -1570,6 +1572,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1570
1572
|
}
|
|
1571
1573
|
return hasOwn(rawSetupState, key);
|
|
1572
1574
|
};
|
|
1575
|
+
const canSetRef = (ref2) => {
|
|
1576
|
+
return !!!(process.env.NODE_ENV !== "production") || !knownTemplateRefs.has(ref2);
|
|
1577
|
+
};
|
|
1573
1578
|
if (oldRef != null && oldRef !== ref) {
|
|
1574
1579
|
if (isString(oldRef)) {
|
|
1575
1580
|
refs[oldRef] = null;
|
|
@@ -1577,7 +1582,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1577
1582
|
setupState[oldRef] = null;
|
|
1578
1583
|
}
|
|
1579
1584
|
} else if (isRef(oldRef)) {
|
|
1580
|
-
oldRef
|
|
1585
|
+
if (canSetRef(oldRef)) {
|
|
1586
|
+
oldRef.value = null;
|
|
1587
|
+
}
|
|
1588
|
+
const oldRawRefAtom = oldRawRef;
|
|
1589
|
+
if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
|
|
1581
1590
|
}
|
|
1582
1591
|
}
|
|
1583
1592
|
if (isFunction(ref)) {
|
|
@@ -1588,7 +1597,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1588
1597
|
if (_isString || _isRef) {
|
|
1589
1598
|
const doSet = () => {
|
|
1590
1599
|
if (rawRef.f) {
|
|
1591
|
-
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
|
|
1600
|
+
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
1592
1601
|
if (isUnmount) {
|
|
1593
1602
|
isArray(existing) && remove(existing, refValue);
|
|
1594
1603
|
} else {
|
|
@@ -1599,8 +1608,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1599
1608
|
setupState[ref] = refs[ref];
|
|
1600
1609
|
}
|
|
1601
1610
|
} else {
|
|
1602
|
-
|
|
1603
|
-
if (
|
|
1611
|
+
const newVal = [refValue];
|
|
1612
|
+
if (canSetRef(ref)) {
|
|
1613
|
+
ref.value = newVal;
|
|
1614
|
+
}
|
|
1615
|
+
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
1604
1616
|
}
|
|
1605
1617
|
} else if (!existing.includes(refValue)) {
|
|
1606
1618
|
existing.push(refValue);
|
|
@@ -1612,7 +1624,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1612
1624
|
setupState[ref] = value;
|
|
1613
1625
|
}
|
|
1614
1626
|
} else if (_isRef) {
|
|
1615
|
-
ref
|
|
1627
|
+
if (canSetRef(ref)) {
|
|
1628
|
+
ref.value = value;
|
|
1629
|
+
}
|
|
1616
1630
|
if (rawRef.k) refs[rawRef.k] = value;
|
|
1617
1631
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
1618
1632
|
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
@@ -3192,10 +3206,10 @@ const PublicInstanceProxyHandlers = {
|
|
|
3192
3206
|
return true;
|
|
3193
3207
|
},
|
|
3194
3208
|
has({
|
|
3195
|
-
_: { data, setupState, accessCache, ctx, appContext, propsOptions }
|
|
3209
|
+
_: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
|
|
3196
3210
|
}, key) {
|
|
3197
|
-
let normalizedProps;
|
|
3198
|
-
return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
|
|
3211
|
+
let normalizedProps, cssModules;
|
|
3212
|
+
return !!(accessCache[key] || data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
|
|
3199
3213
|
},
|
|
3200
3214
|
defineProperty(target, key, descriptor) {
|
|
3201
3215
|
if (descriptor.get != null) {
|
|
@@ -4476,7 +4490,7 @@ function isBoolean(...args) {
|
|
|
4476
4490
|
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
4477
4491
|
}
|
|
4478
4492
|
|
|
4479
|
-
const isInternalKey = (key) => key === "_" || key === "
|
|
4493
|
+
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
4480
4494
|
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
4481
4495
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
4482
4496
|
if (rawSlot._n) {
|
|
@@ -4530,8 +4544,6 @@ const assignSlots = (slots, children, optimized) => {
|
|
|
4530
4544
|
const initSlots = (instance, children, optimized) => {
|
|
4531
4545
|
const slots = instance.slots = createInternalObject();
|
|
4532
4546
|
if (instance.vnode.shapeFlag & 32) {
|
|
4533
|
-
const cacheIndexes = children.__;
|
|
4534
|
-
if (cacheIndexes) def(slots, "__", cacheIndexes, true);
|
|
4535
4547
|
const type = children._;
|
|
4536
4548
|
if (type) {
|
|
4537
4549
|
assignSlots(slots, children, optimized);
|
|
@@ -4592,12 +4604,10 @@ function endMeasure(instance, type) {
|
|
|
4592
4604
|
if (instance.appContext.config.performance && isSupported()) {
|
|
4593
4605
|
const startTag = `vue-${type}-${instance.uid}`;
|
|
4594
4606
|
const endTag = startTag + `:end`;
|
|
4607
|
+
const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
|
|
4595
4608
|
perf.mark(endTag);
|
|
4596
|
-
perf.measure(
|
|
4597
|
-
|
|
4598
|
-
startTag,
|
|
4599
|
-
endTag
|
|
4600
|
-
);
|
|
4609
|
+
perf.measure(measureName, startTag, endTag);
|
|
4610
|
+
perf.clearMeasures(measureName);
|
|
4601
4611
|
perf.clearMarks(startTag);
|
|
4602
4612
|
perf.clearMarks(endTag);
|
|
4603
4613
|
}
|
|
@@ -5827,6 +5837,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5827
5837
|
}
|
|
5828
5838
|
};
|
|
5829
5839
|
const performLeave = () => {
|
|
5840
|
+
if (el._isLeaving) {
|
|
5841
|
+
el[leaveCbKey](
|
|
5842
|
+
true
|
|
5843
|
+
/* cancelled */
|
|
5844
|
+
);
|
|
5845
|
+
}
|
|
5830
5846
|
leave(el, () => {
|
|
5831
5847
|
remove2();
|
|
5832
5848
|
afterLeave && afterLeave();
|
|
@@ -5972,27 +5988,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5972
5988
|
if (!!(process.env.NODE_ENV !== "production") && instance.type.__hmrId) {
|
|
5973
5989
|
unregisterHMR(instance);
|
|
5974
5990
|
}
|
|
5975
|
-
const {
|
|
5976
|
-
bum,
|
|
5977
|
-
scope,
|
|
5978
|
-
job,
|
|
5979
|
-
subTree,
|
|
5980
|
-
um,
|
|
5981
|
-
m,
|
|
5982
|
-
a,
|
|
5983
|
-
parent,
|
|
5984
|
-
slots: { __: slotCacheKeys }
|
|
5985
|
-
} = instance;
|
|
5991
|
+
const { bum, scope, job, subTree, um, m, a } = instance;
|
|
5986
5992
|
invalidateMount(m);
|
|
5987
5993
|
invalidateMount(a);
|
|
5988
5994
|
if (bum) {
|
|
5989
5995
|
invokeArrayFns(bum);
|
|
5990
5996
|
}
|
|
5991
|
-
if (parent && isArray(slotCacheKeys)) {
|
|
5992
|
-
slotCacheKeys.forEach((v) => {
|
|
5993
|
-
parent.renderCache[v] = void 0;
|
|
5994
|
-
});
|
|
5995
|
-
}
|
|
5996
5997
|
scope.stop();
|
|
5997
5998
|
if (job) {
|
|
5998
5999
|
job.flags |= 8;
|
|
@@ -6004,12 +6005,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6004
6005
|
queuePostRenderEffect(() => {
|
|
6005
6006
|
instance.isUnmounted = true;
|
|
6006
6007
|
}, parentSuspense);
|
|
6007
|
-
if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
|
|
6008
|
-
parentSuspense.deps--;
|
|
6009
|
-
if (parentSuspense.deps === 0) {
|
|
6010
|
-
parentSuspense.resolve();
|
|
6011
|
-
}
|
|
6012
|
-
}
|
|
6013
6008
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
6014
6009
|
devtoolsComponentRemoved(instance);
|
|
6015
6010
|
}
|
|
@@ -6110,7 +6105,8 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
6110
6105
|
if (!shallow && c2.patchFlag !== -2)
|
|
6111
6106
|
traverseStaticChildren(c1, c2);
|
|
6112
6107
|
}
|
|
6113
|
-
if (c2.type === Text
|
|
6108
|
+
if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
|
|
6109
|
+
c2.patchFlag !== -1) {
|
|
6114
6110
|
c2.el = c1.el;
|
|
6115
6111
|
}
|
|
6116
6112
|
if (c2.type === Comment && !c2.el) {
|
|
@@ -8461,7 +8457,7 @@ function isMemoSame(cached, memo) {
|
|
|
8461
8457
|
return true;
|
|
8462
8458
|
}
|
|
8463
8459
|
|
|
8464
|
-
const version = "3.5.
|
|
8460
|
+
const version = "3.5.20";
|
|
8465
8461
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8466
8462
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8467
8463
|
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.20",
|
|
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.20",
|
|
50
|
+
"@vue/reactivity": "3.5.20"
|
|
51
51
|
}
|
|
52
52
|
}
|