@vue/runtime-core 3.5.38 → 3.5.39
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 +55 -15
- package/dist/runtime-core.cjs.prod.js +61 -16
- package/dist/runtime-core.d.ts +10 -8
- package/dist/runtime-core.esm-bundler.js +58 -17
- 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.39
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1116,11 +1116,9 @@ const TeleportImpl = {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
} else {
|
|
1118
1118
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
1119
|
-
const nextTarget = n2.
|
|
1120
|
-
n2.props,
|
|
1121
|
-
querySelector
|
|
1122
|
-
);
|
|
1119
|
+
const nextTarget = resolveTarget(n2.props, querySelector);
|
|
1123
1120
|
if (nextTarget) {
|
|
1121
|
+
n2.target = nextTarget;
|
|
1124
1122
|
moveTeleport(
|
|
1125
1123
|
n2,
|
|
1126
1124
|
nextTarget,
|
|
@@ -1158,7 +1156,8 @@ const TeleportImpl = {
|
|
|
1158
1156
|
target,
|
|
1159
1157
|
props
|
|
1160
1158
|
} = vnode;
|
|
1161
|
-
const
|
|
1159
|
+
const disabled = isTeleportDisabled(props);
|
|
1160
|
+
const shouldRemove = doRemove || !disabled;
|
|
1162
1161
|
const pendingMount = pendingMounts.get(vnode);
|
|
1163
1162
|
if (pendingMount) {
|
|
1164
1163
|
pendingMount.flags |= 8;
|
|
@@ -1169,7 +1168,7 @@ const TeleportImpl = {
|
|
|
1169
1168
|
hostRemove(targetAnchor);
|
|
1170
1169
|
}
|
|
1171
1170
|
doRemove && hostRemove(anchor);
|
|
1172
|
-
if (!pendingMount && shapeFlag & 16) {
|
|
1171
|
+
if (!pendingMount && (disabled || target) && shapeFlag & 16) {
|
|
1173
1172
|
for (let i = 0; i < children.length; i++) {
|
|
1174
1173
|
const child = children[i];
|
|
1175
1174
|
unmount(
|
|
@@ -1812,7 +1811,12 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1812
1811
|
}
|
|
1813
1812
|
}
|
|
1814
1813
|
if (shared.isFunction(ref)) {
|
|
1815
|
-
|
|
1814
|
+
reactivity.pauseTracking();
|
|
1815
|
+
try {
|
|
1816
|
+
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
1817
|
+
} finally {
|
|
1818
|
+
reactivity.resetTracking();
|
|
1819
|
+
}
|
|
1816
1820
|
} else {
|
|
1817
1821
|
const _isString = shared.isString(ref);
|
|
1818
1822
|
const _isRef = reactivity.isRef(ref);
|
|
@@ -2104,7 +2108,15 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
2104
2108
|
};
|
|
2105
2109
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
2106
2110
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
2107
|
-
const {
|
|
2111
|
+
const {
|
|
2112
|
+
type,
|
|
2113
|
+
dynamicProps,
|
|
2114
|
+
props,
|
|
2115
|
+
patchFlag,
|
|
2116
|
+
shapeFlag,
|
|
2117
|
+
dirs,
|
|
2118
|
+
transition
|
|
2119
|
+
} = vnode;
|
|
2108
2120
|
const forcePatch = type === "input" || type === "option";
|
|
2109
2121
|
{
|
|
2110
2122
|
if (dirs) {
|
|
@@ -2182,7 +2194,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
2182
2194
|
logMismatchError();
|
|
2183
2195
|
}
|
|
2184
2196
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
2185
|
-
key[0] === "." || isCustomElement && !shared.isReservedProp(key)) {
|
|
2197
|
+
key[0] === "." || isCustomElement && !shared.isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
2186
2198
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
2187
2199
|
}
|
|
2188
2200
|
}
|
|
@@ -2287,7 +2299,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
2287
2299
|
}
|
|
2288
2300
|
};
|
|
2289
2301
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
2290
|
-
if (!
|
|
2302
|
+
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
2291
2303
|
warn$1(
|
|
2292
2304
|
`Hydration node mismatch:
|
|
2293
2305
|
- rendered on server:`,
|
|
@@ -2502,7 +2514,12 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
2502
2514
|
el = el.parentElement;
|
|
2503
2515
|
}
|
|
2504
2516
|
}
|
|
2505
|
-
|
|
2517
|
+
return isMismatchAllowedByAttr(
|
|
2518
|
+
el && el.getAttribute(allowMismatchAttr),
|
|
2519
|
+
allowedType
|
|
2520
|
+
);
|
|
2521
|
+
}
|
|
2522
|
+
function isMismatchAllowedByAttr(allowedAttr, allowedType) {
|
|
2506
2523
|
if (allowedAttr == null) {
|
|
2507
2524
|
return false;
|
|
2508
2525
|
} else if (allowedAttr === "") {
|
|
@@ -2515,6 +2532,19 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
2515
2532
|
return list.includes(MismatchTypeString[allowedType]);
|
|
2516
2533
|
}
|
|
2517
2534
|
}
|
|
2535
|
+
function isNodeMismatchAllowed(node, vnode) {
|
|
2536
|
+
return isMismatchAllowed(node.parentElement, 1 /* CHILDREN */) || isMismatchAllowedByNode(node) || isMismatchAllowedByVNode(vnode);
|
|
2537
|
+
}
|
|
2538
|
+
function isMismatchAllowedByNode(node) {
|
|
2539
|
+
return node.nodeType === 1 && isMismatchAllowedByAttr(
|
|
2540
|
+
node.getAttribute(allowMismatchAttr),
|
|
2541
|
+
1 /* CHILDREN */
|
|
2542
|
+
);
|
|
2543
|
+
}
|
|
2544
|
+
function isMismatchAllowedByVNode({ props }) {
|
|
2545
|
+
const allowedAttr = props && props[allowMismatchAttr];
|
|
2546
|
+
return typeof allowedAttr === "string" && isMismatchAllowedByAttr(allowedAttr, 1 /* CHILDREN */);
|
|
2547
|
+
}
|
|
2518
2548
|
|
|
2519
2549
|
const requestIdleCallback = shared.getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
2520
2550
|
const cancelIdleCallback = shared.getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
@@ -4509,7 +4539,8 @@ function isEmitListener(options, key) {
|
|
|
4509
4539
|
if (!options || !shared.isOn(key)) {
|
|
4510
4540
|
return false;
|
|
4511
4541
|
}
|
|
4512
|
-
key = key.slice(2)
|
|
4542
|
+
key = key.slice(2);
|
|
4543
|
+
key = key === "Once" ? key : key.replace(/Once$/, "");
|
|
4513
4544
|
return shared.hasOwn(options, key[0].toLowerCase() + key.slice(1)) || shared.hasOwn(options, shared.hyphenate(key)) || shared.hasOwn(options, key);
|
|
4514
4545
|
}
|
|
4515
4546
|
|
|
@@ -5733,7 +5764,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5733
5764
|
invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
5734
5765
|
}
|
|
5735
5766
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
5736
|
-
if (
|
|
5767
|
+
if (
|
|
5768
|
+
// HMR updated, force full diff
|
|
5769
|
+
isHmrUpdating || // #6385 the old vnode may be a user-wrapped non-isomorphic block
|
|
5770
|
+
// Force full diff when block metadata is unstable.
|
|
5771
|
+
dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)
|
|
5772
|
+
) {
|
|
5737
5773
|
patchFlag = 0;
|
|
5738
5774
|
optimized = false;
|
|
5739
5775
|
dynamicChildren = null;
|
|
@@ -7866,6 +7902,10 @@ function normalizeChildren(vnode, children) {
|
|
|
7866
7902
|
}
|
|
7867
7903
|
}
|
|
7868
7904
|
} else if (shared.isFunction(children)) {
|
|
7905
|
+
if (shapeFlag & (1 | 64)) {
|
|
7906
|
+
normalizeChildren(vnode, { default: children });
|
|
7907
|
+
return;
|
|
7908
|
+
}
|
|
7869
7909
|
children = { default: children, _ctx: currentRenderingInstance };
|
|
7870
7910
|
type = 32;
|
|
7871
7911
|
} else {
|
|
@@ -8584,7 +8624,7 @@ function isMemoSame(cached, memo) {
|
|
|
8584
8624
|
return true;
|
|
8585
8625
|
}
|
|
8586
8626
|
|
|
8587
|
-
const version = "3.5.
|
|
8627
|
+
const version = "3.5.39";
|
|
8588
8628
|
const warn = warn$1 ;
|
|
8589
8629
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8590
8630
|
const devtools = devtools$1 ;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.39
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -666,11 +666,9 @@ const TeleportImpl = {
|
|
|
666
666
|
}
|
|
667
667
|
} else {
|
|
668
668
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
669
|
-
const nextTarget = n2.
|
|
670
|
-
n2.props,
|
|
671
|
-
querySelector
|
|
672
|
-
);
|
|
669
|
+
const nextTarget = resolveTarget(n2.props, querySelector);
|
|
673
670
|
if (nextTarget) {
|
|
671
|
+
n2.target = nextTarget;
|
|
674
672
|
moveTeleport(
|
|
675
673
|
n2,
|
|
676
674
|
nextTarget,
|
|
@@ -702,7 +700,8 @@ const TeleportImpl = {
|
|
|
702
700
|
target,
|
|
703
701
|
props
|
|
704
702
|
} = vnode;
|
|
705
|
-
const
|
|
703
|
+
const disabled = isTeleportDisabled(props);
|
|
704
|
+
const shouldRemove = doRemove || !disabled;
|
|
706
705
|
const pendingMount = pendingMounts.get(vnode);
|
|
707
706
|
if (pendingMount) {
|
|
708
707
|
pendingMount.flags |= 8;
|
|
@@ -713,7 +712,7 @@ const TeleportImpl = {
|
|
|
713
712
|
hostRemove(targetAnchor);
|
|
714
713
|
}
|
|
715
714
|
doRemove && hostRemove(anchor);
|
|
716
|
-
if (!pendingMount && shapeFlag & 16) {
|
|
715
|
+
if (!pendingMount && (disabled || target) && shapeFlag & 16) {
|
|
717
716
|
for (let i = 0; i < children.length; i++) {
|
|
718
717
|
const child = children[i];
|
|
719
718
|
unmount(
|
|
@@ -1313,7 +1312,12 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1313
1312
|
}
|
|
1314
1313
|
}
|
|
1315
1314
|
if (shared.isFunction(ref)) {
|
|
1316
|
-
|
|
1315
|
+
reactivity.pauseTracking();
|
|
1316
|
+
try {
|
|
1317
|
+
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
1318
|
+
} finally {
|
|
1319
|
+
reactivity.resetTracking();
|
|
1320
|
+
}
|
|
1317
1321
|
} else {
|
|
1318
1322
|
const _isString = shared.isString(ref);
|
|
1319
1323
|
const _isRef = reactivity.isRef(ref);
|
|
@@ -1583,9 +1587,18 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1583
1587
|
};
|
|
1584
1588
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
1585
1589
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
1586
|
-
const {
|
|
1590
|
+
const {
|
|
1591
|
+
type,
|
|
1592
|
+
dynamicProps,
|
|
1593
|
+
props,
|
|
1594
|
+
patchFlag,
|
|
1595
|
+
shapeFlag,
|
|
1596
|
+
dirs,
|
|
1597
|
+
transition
|
|
1598
|
+
} = vnode;
|
|
1587
1599
|
const forcePatch = type === "input" || type === "option";
|
|
1588
|
-
|
|
1600
|
+
const hasDynamicProps = !!dynamicProps;
|
|
1601
|
+
if (forcePatch || hasDynamicProps || patchFlag !== -1) {
|
|
1589
1602
|
if (dirs) {
|
|
1590
1603
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
1591
1604
|
}
|
|
@@ -1639,11 +1652,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1639
1652
|
}
|
|
1640
1653
|
}
|
|
1641
1654
|
if (props) {
|
|
1642
|
-
if (forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
1655
|
+
if (forcePatch || hasDynamicProps || !optimized || patchFlag & (16 | 32)) {
|
|
1643
1656
|
const isCustomElement = el.tagName.includes("-");
|
|
1644
1657
|
for (const key in props) {
|
|
1645
1658
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
1646
|
-
key[0] === "." || isCustomElement && !shared.isReservedProp(key)) {
|
|
1659
|
+
key[0] === "." || isCustomElement && !shared.isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
1647
1660
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
1648
1661
|
}
|
|
1649
1662
|
}
|
|
@@ -1753,7 +1766,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1753
1766
|
}
|
|
1754
1767
|
};
|
|
1755
1768
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
1756
|
-
if (!
|
|
1769
|
+
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
1757
1770
|
logMismatchError();
|
|
1758
1771
|
}
|
|
1759
1772
|
vnode.el = null;
|
|
@@ -1836,7 +1849,12 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
1836
1849
|
el = el.parentElement;
|
|
1837
1850
|
}
|
|
1838
1851
|
}
|
|
1839
|
-
|
|
1852
|
+
return isMismatchAllowedByAttr(
|
|
1853
|
+
el && el.getAttribute(allowMismatchAttr),
|
|
1854
|
+
allowedType
|
|
1855
|
+
);
|
|
1856
|
+
}
|
|
1857
|
+
function isMismatchAllowedByAttr(allowedAttr, allowedType) {
|
|
1840
1858
|
if (allowedAttr == null) {
|
|
1841
1859
|
return false;
|
|
1842
1860
|
} else if (allowedAttr === "") {
|
|
@@ -1849,6 +1867,19 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
1849
1867
|
return list.includes(MismatchTypeString[allowedType]);
|
|
1850
1868
|
}
|
|
1851
1869
|
}
|
|
1870
|
+
function isNodeMismatchAllowed(node, vnode) {
|
|
1871
|
+
return isMismatchAllowed(node.parentElement, 1 /* CHILDREN */) || isMismatchAllowedByNode(node) || isMismatchAllowedByVNode(vnode);
|
|
1872
|
+
}
|
|
1873
|
+
function isMismatchAllowedByNode(node) {
|
|
1874
|
+
return node.nodeType === 1 && isMismatchAllowedByAttr(
|
|
1875
|
+
node.getAttribute(allowMismatchAttr),
|
|
1876
|
+
1 /* CHILDREN */
|
|
1877
|
+
);
|
|
1878
|
+
}
|
|
1879
|
+
function isMismatchAllowedByVNode({ props }) {
|
|
1880
|
+
const allowedAttr = props && props[allowMismatchAttr];
|
|
1881
|
+
return typeof allowedAttr === "string" && isMismatchAllowedByAttr(allowedAttr, 1 /* CHILDREN */);
|
|
1882
|
+
}
|
|
1852
1883
|
|
|
1853
1884
|
const requestIdleCallback = shared.getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
1854
1885
|
const cancelIdleCallback = shared.getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
@@ -3451,7 +3482,8 @@ function isEmitListener(options, key) {
|
|
|
3451
3482
|
if (!options || !shared.isOn(key)) {
|
|
3452
3483
|
return false;
|
|
3453
3484
|
}
|
|
3454
|
-
key = key.slice(2)
|
|
3485
|
+
key = key.slice(2);
|
|
3486
|
+
key = key === "Once" ? key : key.replace(/Once$/, "");
|
|
3455
3487
|
return shared.hasOwn(options, key[0].toLowerCase() + key.slice(1)) || shared.hasOwn(options, shared.hyphenate(key)) || shared.hasOwn(options, key);
|
|
3456
3488
|
}
|
|
3457
3489
|
|
|
@@ -4365,6 +4397,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4365
4397
|
invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
4366
4398
|
}
|
|
4367
4399
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
4400
|
+
if (
|
|
4401
|
+
// #6385 the old vnode may be a user-wrapped non-isomorphic block
|
|
4402
|
+
// Force full diff when block metadata is unstable.
|
|
4403
|
+
dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)
|
|
4404
|
+
) {
|
|
4405
|
+
patchFlag = 0;
|
|
4406
|
+
optimized = false;
|
|
4407
|
+
dynamicChildren = null;
|
|
4408
|
+
}
|
|
4368
4409
|
if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) {
|
|
4369
4410
|
hostSetElementText(el, "");
|
|
4370
4411
|
}
|
|
@@ -6325,6 +6366,10 @@ function normalizeChildren(vnode, children) {
|
|
|
6325
6366
|
}
|
|
6326
6367
|
}
|
|
6327
6368
|
} else if (shared.isFunction(children)) {
|
|
6369
|
+
if (shapeFlag & (1 | 64)) {
|
|
6370
|
+
normalizeChildren(vnode, { default: children });
|
|
6371
|
+
return;
|
|
6372
|
+
}
|
|
6328
6373
|
children = { default: children, _ctx: currentRenderingInstance };
|
|
6329
6374
|
type = 32;
|
|
6330
6375
|
} else {
|
|
@@ -6725,7 +6770,7 @@ function isMemoSame(cached, memo) {
|
|
|
6725
6770
|
return true;
|
|
6726
6771
|
}
|
|
6727
6772
|
|
|
6728
|
-
const version = "3.5.
|
|
6773
|
+
const version = "3.5.39";
|
|
6729
6774
|
const warn$1 = shared.NOOP;
|
|
6730
6775
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
6731
6776
|
const devtools = void 0;
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -296,6 +296,8 @@ type DefineModelOptions<T = any, G = T, S = T> = {
|
|
|
296
296
|
get?: (v: T) => G;
|
|
297
297
|
set?: (v: S) => any;
|
|
298
298
|
};
|
|
299
|
+
type DefineModelRuntimeOptions<T, G, S> = Omit<PropOptions<T>, 'default'> & DefineModelOptions<T, G, S>;
|
|
300
|
+
type DefineModelDefault<T> = InferDefault<Data, T>;
|
|
299
301
|
/**
|
|
300
302
|
* Vue `<script setup>` compiler macro for declaring a
|
|
301
303
|
* two-way binding prop that can be consumed via `v-model` from the parent
|
|
@@ -330,17 +332,17 @@ type DefineModelOptions<T = any, G = T, S = T> = {
|
|
|
330
332
|
* ```
|
|
331
333
|
*/
|
|
332
334
|
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options: ({
|
|
333
|
-
default:
|
|
335
|
+
default: DefineModelDefault<T>;
|
|
334
336
|
} | {
|
|
335
337
|
required: true;
|
|
336
|
-
}) &
|
|
337
|
-
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options?:
|
|
338
|
+
}) & DefineModelRuntimeOptions<T, G, S>): ModelRef<T, M, G, S>;
|
|
339
|
+
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options?: DefineModelRuntimeOptions<T, G, S>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
|
|
338
340
|
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options: ({
|
|
339
|
-
default:
|
|
341
|
+
default: DefineModelDefault<T>;
|
|
340
342
|
} | {
|
|
341
343
|
required: true;
|
|
342
|
-
}) &
|
|
343
|
-
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options?:
|
|
344
|
+
}) & DefineModelRuntimeOptions<T, G, S>): ModelRef<T, M, G, S>;
|
|
345
|
+
export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options?: DefineModelRuntimeOptions<T, G, S>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
|
|
344
346
|
type NotUndefined<T> = T extends undefined ? never : T;
|
|
345
347
|
type MappedOmit<T, K extends keyof any> = {
|
|
346
348
|
[P in keyof T as P extends K ? never : P]: T[P];
|
|
@@ -379,12 +381,12 @@ export declare function withDefaults<T, BKeys extends keyof T, Defaults extends
|
|
|
379
381
|
export declare function useSlots(): SetupContext['slots'];
|
|
380
382
|
export declare function useAttrs(): SetupContext['attrs'];
|
|
381
383
|
|
|
382
|
-
export type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null>;
|
|
384
|
+
export type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null | any[]>;
|
|
383
385
|
export type EmitsOptions = ObjectEmitsOptions | string[];
|
|
384
386
|
export type EmitsToProps<T extends EmitsOptions | ComponentTypeEmits> = T extends string[] ? {
|
|
385
387
|
[K in `on${Capitalize<T[number]>}`]?: (...args: any[]) => any;
|
|
386
388
|
} : T extends ObjectEmitsOptions ? {
|
|
387
|
-
[K in string & keyof T as `on${Capitalize<K>}`]?: (...args: T[K] extends (...args: infer P) => any ? P : T[K] extends null ? any[] : never) => any;
|
|
389
|
+
[K in string & keyof T as `on${Capitalize<K>}`]?: (...args: T[K] extends (...args: infer P) => any ? P : T[K] extends null ? any[] : T[K] extends any[] ? T[K] : never) => any;
|
|
388
390
|
} : {};
|
|
389
391
|
type TypeEmitsToOptions<T extends ComponentTypeEmits> = {
|
|
390
392
|
[K in keyof T & string]: T[K] extends [...args: infer Args] ? (...args: Args) => any : () => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.39
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1119,11 +1119,9 @@ const TeleportImpl = {
|
|
|
1119
1119
|
}
|
|
1120
1120
|
} else {
|
|
1121
1121
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
1122
|
-
const nextTarget = n2.
|
|
1123
|
-
n2.props,
|
|
1124
|
-
querySelector
|
|
1125
|
-
);
|
|
1122
|
+
const nextTarget = resolveTarget(n2.props, querySelector);
|
|
1126
1123
|
if (nextTarget) {
|
|
1124
|
+
n2.target = nextTarget;
|
|
1127
1125
|
moveTeleport(
|
|
1128
1126
|
n2,
|
|
1129
1127
|
nextTarget,
|
|
@@ -1161,7 +1159,8 @@ const TeleportImpl = {
|
|
|
1161
1159
|
target,
|
|
1162
1160
|
props
|
|
1163
1161
|
} = vnode;
|
|
1164
|
-
const
|
|
1162
|
+
const disabled = isTeleportDisabled(props);
|
|
1163
|
+
const shouldRemove = doRemove || !disabled;
|
|
1165
1164
|
const pendingMount = pendingMounts.get(vnode);
|
|
1166
1165
|
if (pendingMount) {
|
|
1167
1166
|
pendingMount.flags |= 8;
|
|
@@ -1172,7 +1171,7 @@ const TeleportImpl = {
|
|
|
1172
1171
|
hostRemove(targetAnchor);
|
|
1173
1172
|
}
|
|
1174
1173
|
doRemove && hostRemove(anchor);
|
|
1175
|
-
if (!pendingMount && shapeFlag & 16) {
|
|
1174
|
+
if (!pendingMount && (disabled || target) && shapeFlag & 16) {
|
|
1176
1175
|
for (let i = 0; i < children.length; i++) {
|
|
1177
1176
|
const child = children[i];
|
|
1178
1177
|
unmount(
|
|
@@ -1816,7 +1815,12 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1816
1815
|
}
|
|
1817
1816
|
}
|
|
1818
1817
|
if (isFunction(ref)) {
|
|
1819
|
-
|
|
1818
|
+
pauseTracking();
|
|
1819
|
+
try {
|
|
1820
|
+
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
1821
|
+
} finally {
|
|
1822
|
+
resetTracking();
|
|
1823
|
+
}
|
|
1820
1824
|
} else {
|
|
1821
1825
|
const _isString = isString(ref);
|
|
1822
1826
|
const _isRef = isRef(ref);
|
|
@@ -2108,9 +2112,18 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
2108
2112
|
};
|
|
2109
2113
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
2110
2114
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
2111
|
-
const {
|
|
2115
|
+
const {
|
|
2116
|
+
type,
|
|
2117
|
+
dynamicProps,
|
|
2118
|
+
props,
|
|
2119
|
+
patchFlag,
|
|
2120
|
+
shapeFlag,
|
|
2121
|
+
dirs,
|
|
2122
|
+
transition
|
|
2123
|
+
} = vnode;
|
|
2112
2124
|
const forcePatch = type === "input" || type === "option";
|
|
2113
|
-
|
|
2125
|
+
const hasDynamicProps = !!dynamicProps;
|
|
2126
|
+
if (!!(process.env.NODE_ENV !== "production") || forcePatch || hasDynamicProps || patchFlag !== -1) {
|
|
2114
2127
|
if (dirs) {
|
|
2115
2128
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
2116
2129
|
}
|
|
@@ -2177,7 +2190,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
2177
2190
|
}
|
|
2178
2191
|
}
|
|
2179
2192
|
if (props) {
|
|
2180
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
2193
|
+
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || hasDynamicProps || !optimized || patchFlag & (16 | 32)) {
|
|
2181
2194
|
const isCustomElement = el.tagName.includes("-");
|
|
2182
2195
|
for (const key in props) {
|
|
2183
2196
|
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && // #11189 skip if this node has directives that have created hooks
|
|
@@ -2186,7 +2199,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
2186
2199
|
logMismatchError();
|
|
2187
2200
|
}
|
|
2188
2201
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
2189
|
-
key[0] === "." || isCustomElement && !isReservedProp(key)) {
|
|
2202
|
+
key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
2190
2203
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
2191
2204
|
}
|
|
2192
2205
|
}
|
|
@@ -2302,7 +2315,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
2302
2315
|
}
|
|
2303
2316
|
};
|
|
2304
2317
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
2305
|
-
if (!
|
|
2318
|
+
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
2306
2319
|
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
|
|
2307
2320
|
`Hydration node mismatch:
|
|
2308
2321
|
- rendered on server:`,
|
|
@@ -2517,7 +2530,12 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
2517
2530
|
el = el.parentElement;
|
|
2518
2531
|
}
|
|
2519
2532
|
}
|
|
2520
|
-
|
|
2533
|
+
return isMismatchAllowedByAttr(
|
|
2534
|
+
el && el.getAttribute(allowMismatchAttr),
|
|
2535
|
+
allowedType
|
|
2536
|
+
);
|
|
2537
|
+
}
|
|
2538
|
+
function isMismatchAllowedByAttr(allowedAttr, allowedType) {
|
|
2521
2539
|
if (allowedAttr == null) {
|
|
2522
2540
|
return false;
|
|
2523
2541
|
} else if (allowedAttr === "") {
|
|
@@ -2530,6 +2548,19 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
2530
2548
|
return list.includes(MismatchTypeString[allowedType]);
|
|
2531
2549
|
}
|
|
2532
2550
|
}
|
|
2551
|
+
function isNodeMismatchAllowed(node, vnode) {
|
|
2552
|
+
return isMismatchAllowed(node.parentElement, 1 /* CHILDREN */) || isMismatchAllowedByNode(node) || isMismatchAllowedByVNode(vnode);
|
|
2553
|
+
}
|
|
2554
|
+
function isMismatchAllowedByNode(node) {
|
|
2555
|
+
return node.nodeType === 1 && isMismatchAllowedByAttr(
|
|
2556
|
+
node.getAttribute(allowMismatchAttr),
|
|
2557
|
+
1 /* CHILDREN */
|
|
2558
|
+
);
|
|
2559
|
+
}
|
|
2560
|
+
function isMismatchAllowedByVNode({ props }) {
|
|
2561
|
+
const allowedAttr = props && props[allowMismatchAttr];
|
|
2562
|
+
return typeof allowedAttr === "string" && isMismatchAllowedByAttr(allowedAttr, 1 /* CHILDREN */);
|
|
2563
|
+
}
|
|
2533
2564
|
|
|
2534
2565
|
const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
2535
2566
|
const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
@@ -4531,7 +4562,8 @@ function isEmitListener(options, key) {
|
|
|
4531
4562
|
if (!options || !isOn(key)) {
|
|
4532
4563
|
return false;
|
|
4533
4564
|
}
|
|
4534
|
-
key = key.slice(2)
|
|
4565
|
+
key = key.slice(2);
|
|
4566
|
+
key = key === "Once" ? key : key.replace(/Once$/, "");
|
|
4535
4567
|
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
4536
4568
|
}
|
|
4537
4569
|
|
|
@@ -5782,7 +5814,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5782
5814
|
invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
5783
5815
|
}
|
|
5784
5816
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
5785
|
-
if (
|
|
5817
|
+
if (
|
|
5818
|
+
// HMR updated, force full diff
|
|
5819
|
+
!!(process.env.NODE_ENV !== "production") && isHmrUpdating || // #6385 the old vnode may be a user-wrapped non-isomorphic block
|
|
5820
|
+
// Force full diff when block metadata is unstable.
|
|
5821
|
+
dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)
|
|
5822
|
+
) {
|
|
5786
5823
|
patchFlag = 0;
|
|
5787
5824
|
optimized = false;
|
|
5788
5825
|
dynamicChildren = null;
|
|
@@ -7926,6 +7963,10 @@ function normalizeChildren(vnode, children) {
|
|
|
7926
7963
|
}
|
|
7927
7964
|
}
|
|
7928
7965
|
} else if (isFunction(children)) {
|
|
7966
|
+
if (shapeFlag & (1 | 64)) {
|
|
7967
|
+
normalizeChildren(vnode, { default: children });
|
|
7968
|
+
return;
|
|
7969
|
+
}
|
|
7929
7970
|
children = { default: children, _ctx: currentRenderingInstance };
|
|
7930
7971
|
type = 32;
|
|
7931
7972
|
} else {
|
|
@@ -8658,7 +8699,7 @@ function isMemoSame(cached, memo) {
|
|
|
8658
8699
|
return true;
|
|
8659
8700
|
}
|
|
8660
8701
|
|
|
8661
|
-
const version = "3.5.
|
|
8702
|
+
const version = "3.5.39";
|
|
8662
8703
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8663
8704
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8664
8705
|
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.39",
|
|
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.39",
|
|
50
|
+
"@vue/reactivity": "3.5.39"
|
|
51
51
|
}
|
|
52
52
|
}
|