@vue/runtime-core 3.3.3 → 3.3.5
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 -29
- package/dist/runtime-core.cjs.prod.js +32 -24
- package/dist/runtime-core.d.ts +9 -138
- package/dist/runtime-core.esm-bundler.js +259 -244
- package/package.json +3 -3
package/dist/runtime-core.cjs.js
CHANGED
|
@@ -1743,9 +1743,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
|
|
|
1743
1743
|
}
|
|
1744
1744
|
if (cb) {
|
|
1745
1745
|
const newValue = effect.run();
|
|
1746
|
-
if (deep || forceTrigger || (isMultiSource ? newValue.some(
|
|
1747
|
-
(v, i) => shared.hasChanged(v, oldValue[i])
|
|
1748
|
-
) : shared.hasChanged(newValue, oldValue)) || false) {
|
|
1746
|
+
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => shared.hasChanged(v, oldValue[i])) : shared.hasChanged(newValue, oldValue)) || false) {
|
|
1749
1747
|
if (cleanup) {
|
|
1750
1748
|
cleanup();
|
|
1751
1749
|
}
|
|
@@ -1918,6 +1916,8 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
1918
1916
|
}
|
|
1919
1917
|
}
|
|
1920
1918
|
|
|
1919
|
+
const leaveCbKey = Symbol("_leaveCb");
|
|
1920
|
+
const enterCbKey = Symbol("_enterCb");
|
|
1921
1921
|
function useTransitionState() {
|
|
1922
1922
|
const state = {
|
|
1923
1923
|
isMounted: false,
|
|
@@ -2038,9 +2038,9 @@ const BaseTransitionImpl = {
|
|
|
2038
2038
|
oldInnerChild
|
|
2039
2039
|
);
|
|
2040
2040
|
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
2041
|
-
el
|
|
2041
|
+
el[leaveCbKey] = () => {
|
|
2042
2042
|
earlyRemove();
|
|
2043
|
-
el
|
|
2043
|
+
el[leaveCbKey] = void 0;
|
|
2044
2044
|
delete enterHooks.delayedLeave;
|
|
2045
2045
|
};
|
|
2046
2046
|
enterHooks.delayedLeave = delayedLeave;
|
|
@@ -2111,15 +2111,15 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
2111
2111
|
return;
|
|
2112
2112
|
}
|
|
2113
2113
|
}
|
|
2114
|
-
if (el
|
|
2115
|
-
el
|
|
2114
|
+
if (el[leaveCbKey]) {
|
|
2115
|
+
el[leaveCbKey](
|
|
2116
2116
|
true
|
|
2117
2117
|
/* cancelled */
|
|
2118
2118
|
);
|
|
2119
2119
|
}
|
|
2120
2120
|
const leavingVNode = leavingVNodesCache[key];
|
|
2121
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el
|
|
2122
|
-
leavingVNode.el
|
|
2121
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
|
|
2122
|
+
leavingVNode.el[leaveCbKey]();
|
|
2123
2123
|
}
|
|
2124
2124
|
callHook(hook, [el]);
|
|
2125
2125
|
},
|
|
@@ -2137,7 +2137,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
2137
2137
|
}
|
|
2138
2138
|
}
|
|
2139
2139
|
let called = false;
|
|
2140
|
-
const done = el
|
|
2140
|
+
const done = el[enterCbKey] = (cancelled) => {
|
|
2141
2141
|
if (called)
|
|
2142
2142
|
return;
|
|
2143
2143
|
called = true;
|
|
@@ -2149,7 +2149,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
2149
2149
|
if (hooks.delayedLeave) {
|
|
2150
2150
|
hooks.delayedLeave();
|
|
2151
2151
|
}
|
|
2152
|
-
el
|
|
2152
|
+
el[enterCbKey] = void 0;
|
|
2153
2153
|
};
|
|
2154
2154
|
if (hook) {
|
|
2155
2155
|
callAsyncHook(hook, [el, done]);
|
|
@@ -2159,8 +2159,8 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
2159
2159
|
},
|
|
2160
2160
|
leave(el, remove) {
|
|
2161
2161
|
const key2 = String(vnode.key);
|
|
2162
|
-
if (el
|
|
2163
|
-
el
|
|
2162
|
+
if (el[enterCbKey]) {
|
|
2163
|
+
el[enterCbKey](
|
|
2164
2164
|
true
|
|
2165
2165
|
/* cancelled */
|
|
2166
2166
|
);
|
|
@@ -2170,7 +2170,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
2170
2170
|
}
|
|
2171
2171
|
callHook(onBeforeLeave, [el]);
|
|
2172
2172
|
let called = false;
|
|
2173
|
-
const done = el
|
|
2173
|
+
const done = el[leaveCbKey] = (cancelled) => {
|
|
2174
2174
|
if (called)
|
|
2175
2175
|
return;
|
|
2176
2176
|
called = true;
|
|
@@ -2180,7 +2180,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
2180
2180
|
} else {
|
|
2181
2181
|
callHook(onAfterLeave, [el]);
|
|
2182
2182
|
}
|
|
2183
|
-
el
|
|
2183
|
+
el[leaveCbKey] = void 0;
|
|
2184
2184
|
if (leavingVNodesCache[key2] === vnode) {
|
|
2185
2185
|
delete leavingVNodesCache[key2];
|
|
2186
2186
|
}
|
|
@@ -2242,6 +2242,8 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
2242
2242
|
return ret;
|
|
2243
2243
|
}
|
|
2244
2244
|
|
|
2245
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
2246
|
+
// @__NO_SIDE_EFFECTS__
|
|
2245
2247
|
function defineComponent(options, extraOptions) {
|
|
2246
2248
|
return shared.isFunction(options) ? (
|
|
2247
2249
|
// #8326: extend call and options.name access are considered side-effects
|
|
@@ -2251,6 +2253,8 @@ function defineComponent(options, extraOptions) {
|
|
|
2251
2253
|
}
|
|
2252
2254
|
|
|
2253
2255
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
2256
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
2257
|
+
// @__NO_SIDE_EFFECTS__
|
|
2254
2258
|
function defineAsyncComponent(source) {
|
|
2255
2259
|
if (shared.isFunction(source)) {
|
|
2256
2260
|
source = { loader: source };
|
|
@@ -3035,7 +3039,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ shared.extend
|
|
|
3035
3039
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
3036
3040
|
},
|
|
3037
3041
|
has(_, key) {
|
|
3038
|
-
const has = key[0] !== "_" && !shared.
|
|
3042
|
+
const has = key[0] !== "_" && !shared.isGloballyAllowed(key);
|
|
3039
3043
|
if (!has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
3040
3044
|
warn(
|
|
3041
3045
|
`Property ${JSON.stringify(
|
|
@@ -3711,7 +3715,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3711
3715
|
},
|
|
3712
3716
|
set() {
|
|
3713
3717
|
warn(
|
|
3714
|
-
`app.config.unwrapInjectedRef has been deprecated. 3.3 now
|
|
3718
|
+
`app.config.unwrapInjectedRef has been deprecated. 3.3 now always unwraps injected refs in Options API.`
|
|
3715
3719
|
);
|
|
3716
3720
|
}
|
|
3717
3721
|
});
|
|
@@ -3798,10 +3802,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3798
3802
|
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
3799
3803
|
);
|
|
3800
3804
|
}
|
|
3801
|
-
const vnode = createVNode(
|
|
3802
|
-
rootComponent,
|
|
3803
|
-
rootProps
|
|
3804
|
-
);
|
|
3805
|
+
const vnode = createVNode(rootComponent, rootProps);
|
|
3805
3806
|
vnode.appContext = context;
|
|
3806
3807
|
{
|
|
3807
3808
|
context.reload = () => {
|
|
@@ -4547,8 +4548,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4547
4548
|
hasMismatch = true;
|
|
4548
4549
|
warn(
|
|
4549
4550
|
`Hydration text mismatch:
|
|
4550
|
-
-
|
|
4551
|
-
|
|
4551
|
+
- Server rendered: ${JSON.stringify(
|
|
4552
|
+
node.data
|
|
4553
|
+
)}
|
|
4554
|
+
- Client rendered: ${JSON.stringify(vnode.children)}`
|
|
4552
4555
|
);
|
|
4553
4556
|
node.data = vnode.children;
|
|
4554
4557
|
}
|
|
@@ -4751,8 +4754,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4751
4754
|
hasMismatch = true;
|
|
4752
4755
|
warn(
|
|
4753
4756
|
`Hydration text content mismatch in <${vnode.type}>:
|
|
4754
|
-
-
|
|
4755
|
-
-
|
|
4757
|
+
- Server rendered: ${el.textContent}
|
|
4758
|
+
- Client rendered: ${vnode.children}`
|
|
4756
4759
|
);
|
|
4757
4760
|
el.textContent = vnode.children;
|
|
4758
4761
|
}
|
|
@@ -6500,6 +6503,10 @@ const TeleportImpl = {
|
|
|
6500
6503
|
internals,
|
|
6501
6504
|
1
|
|
6502
6505
|
);
|
|
6506
|
+
} else {
|
|
6507
|
+
if (n2.props && n1.props && n2.props.to !== n1.props.to) {
|
|
6508
|
+
n2.props.to = n1.props.to;
|
|
6509
|
+
}
|
|
6503
6510
|
}
|
|
6504
6511
|
} else {
|
|
6505
6512
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
@@ -7292,9 +7299,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
7292
7299
|
{
|
|
7293
7300
|
setCurrentInstance(instance);
|
|
7294
7301
|
reactivity.pauseTracking();
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7302
|
+
try {
|
|
7303
|
+
applyOptions(instance);
|
|
7304
|
+
} finally {
|
|
7305
|
+
reactivity.resetTracking();
|
|
7306
|
+
unsetCurrentInstance();
|
|
7307
|
+
}
|
|
7298
7308
|
}
|
|
7299
7309
|
if (!Component.render && instance.render === shared.NOOP && !isSSR) {
|
|
7300
7310
|
if (!compile && Component.template) {
|
|
@@ -7664,7 +7674,7 @@ function isMemoSame(cached, memo) {
|
|
|
7664
7674
|
return true;
|
|
7665
7675
|
}
|
|
7666
7676
|
|
|
7667
|
-
const version = "3.3.
|
|
7677
|
+
const version = "3.3.5";
|
|
7668
7678
|
const _ssrUtils = {
|
|
7669
7679
|
createComponentInstance,
|
|
7670
7680
|
setupComponent,
|
|
@@ -1203,9 +1203,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
|
|
|
1203
1203
|
}
|
|
1204
1204
|
if (cb) {
|
|
1205
1205
|
const newValue = effect.run();
|
|
1206
|
-
if (deep || forceTrigger || (isMultiSource ? newValue.some(
|
|
1207
|
-
(v, i) => shared.hasChanged(v, oldValue[i])
|
|
1208
|
-
) : shared.hasChanged(newValue, oldValue)) || false) {
|
|
1206
|
+
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => shared.hasChanged(v, oldValue[i])) : shared.hasChanged(newValue, oldValue)) || false) {
|
|
1209
1207
|
if (cleanup) {
|
|
1210
1208
|
cleanup();
|
|
1211
1209
|
}
|
|
@@ -1368,6 +1366,8 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
1368
1366
|
}
|
|
1369
1367
|
}
|
|
1370
1368
|
|
|
1369
|
+
const leaveCbKey = Symbol("_leaveCb");
|
|
1370
|
+
const enterCbKey = Symbol("_enterCb");
|
|
1371
1371
|
function useTransitionState() {
|
|
1372
1372
|
const state = {
|
|
1373
1373
|
isMounted: false,
|
|
@@ -1478,9 +1478,9 @@ const BaseTransitionImpl = {
|
|
|
1478
1478
|
oldInnerChild
|
|
1479
1479
|
);
|
|
1480
1480
|
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
1481
|
-
el
|
|
1481
|
+
el[leaveCbKey] = () => {
|
|
1482
1482
|
earlyRemove();
|
|
1483
|
-
el
|
|
1483
|
+
el[leaveCbKey] = void 0;
|
|
1484
1484
|
delete enterHooks.delayedLeave;
|
|
1485
1485
|
};
|
|
1486
1486
|
enterHooks.delayedLeave = delayedLeave;
|
|
@@ -1551,15 +1551,15 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
1551
1551
|
return;
|
|
1552
1552
|
}
|
|
1553
1553
|
}
|
|
1554
|
-
if (el
|
|
1555
|
-
el
|
|
1554
|
+
if (el[leaveCbKey]) {
|
|
1555
|
+
el[leaveCbKey](
|
|
1556
1556
|
true
|
|
1557
1557
|
/* cancelled */
|
|
1558
1558
|
);
|
|
1559
1559
|
}
|
|
1560
1560
|
const leavingVNode = leavingVNodesCache[key];
|
|
1561
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el
|
|
1562
|
-
leavingVNode.el
|
|
1561
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
|
|
1562
|
+
leavingVNode.el[leaveCbKey]();
|
|
1563
1563
|
}
|
|
1564
1564
|
callHook(hook, [el]);
|
|
1565
1565
|
},
|
|
@@ -1577,7 +1577,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
1579
|
let called = false;
|
|
1580
|
-
const done = el
|
|
1580
|
+
const done = el[enterCbKey] = (cancelled) => {
|
|
1581
1581
|
if (called)
|
|
1582
1582
|
return;
|
|
1583
1583
|
called = true;
|
|
@@ -1589,7 +1589,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
1589
1589
|
if (hooks.delayedLeave) {
|
|
1590
1590
|
hooks.delayedLeave();
|
|
1591
1591
|
}
|
|
1592
|
-
el
|
|
1592
|
+
el[enterCbKey] = void 0;
|
|
1593
1593
|
};
|
|
1594
1594
|
if (hook) {
|
|
1595
1595
|
callAsyncHook(hook, [el, done]);
|
|
@@ -1599,8 +1599,8 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
1599
1599
|
},
|
|
1600
1600
|
leave(el, remove) {
|
|
1601
1601
|
const key2 = String(vnode.key);
|
|
1602
|
-
if (el
|
|
1603
|
-
el
|
|
1602
|
+
if (el[enterCbKey]) {
|
|
1603
|
+
el[enterCbKey](
|
|
1604
1604
|
true
|
|
1605
1605
|
/* cancelled */
|
|
1606
1606
|
);
|
|
@@ -1610,7 +1610,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
1610
1610
|
}
|
|
1611
1611
|
callHook(onBeforeLeave, [el]);
|
|
1612
1612
|
let called = false;
|
|
1613
|
-
const done = el
|
|
1613
|
+
const done = el[leaveCbKey] = (cancelled) => {
|
|
1614
1614
|
if (called)
|
|
1615
1615
|
return;
|
|
1616
1616
|
called = true;
|
|
@@ -1620,7 +1620,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
1620
1620
|
} else {
|
|
1621
1621
|
callHook(onAfterLeave, [el]);
|
|
1622
1622
|
}
|
|
1623
|
-
el
|
|
1623
|
+
el[leaveCbKey] = void 0;
|
|
1624
1624
|
if (leavingVNodesCache[key2] === vnode) {
|
|
1625
1625
|
delete leavingVNodesCache[key2];
|
|
1626
1626
|
}
|
|
@@ -1682,6 +1682,8 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
1682
1682
|
return ret;
|
|
1683
1683
|
}
|
|
1684
1684
|
|
|
1685
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
1686
|
+
// @__NO_SIDE_EFFECTS__
|
|
1685
1687
|
function defineComponent(options, extraOptions) {
|
|
1686
1688
|
return shared.isFunction(options) ? (
|
|
1687
1689
|
// #8326: extend call and options.name access are considered side-effects
|
|
@@ -1691,6 +1693,8 @@ function defineComponent(options, extraOptions) {
|
|
|
1691
1693
|
}
|
|
1692
1694
|
|
|
1693
1695
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
1696
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
1697
|
+
// @__NO_SIDE_EFFECTS__
|
|
1694
1698
|
function defineAsyncComponent(source) {
|
|
1695
1699
|
if (shared.isFunction(source)) {
|
|
1696
1700
|
source = { loader: source };
|
|
@@ -2386,7 +2390,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ shared.extend
|
|
|
2386
2390
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
2387
2391
|
},
|
|
2388
2392
|
has(_, key) {
|
|
2389
|
-
const has = key[0] !== "_" && !shared.
|
|
2393
|
+
const has = key[0] !== "_" && !shared.isGloballyAllowed(key);
|
|
2390
2394
|
return has;
|
|
2391
2395
|
}
|
|
2392
2396
|
}
|
|
@@ -2920,10 +2924,7 @@ function createAppAPI(render, hydrate) {
|
|
|
2920
2924
|
},
|
|
2921
2925
|
mount(rootContainer, isHydrate, isSVG) {
|
|
2922
2926
|
if (!isMounted) {
|
|
2923
|
-
const vnode = createVNode(
|
|
2924
|
-
rootComponent,
|
|
2925
|
-
rootProps
|
|
2926
|
-
);
|
|
2927
|
+
const vnode = createVNode(rootComponent, rootProps);
|
|
2927
2928
|
vnode.appContext = context;
|
|
2928
2929
|
if (isHydrate && hydrate) {
|
|
2929
2930
|
hydrate(vnode, rootContainer);
|
|
@@ -5207,6 +5208,10 @@ const TeleportImpl = {
|
|
|
5207
5208
|
internals,
|
|
5208
5209
|
1
|
|
5209
5210
|
);
|
|
5211
|
+
} else {
|
|
5212
|
+
if (n2.props && n1.props && n2.props.to !== n1.props.to) {
|
|
5213
|
+
n2.props.to = n1.props.to;
|
|
5214
|
+
}
|
|
5210
5215
|
}
|
|
5211
5216
|
} else {
|
|
5212
5217
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
@@ -5897,9 +5902,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
5897
5902
|
{
|
|
5898
5903
|
setCurrentInstance(instance);
|
|
5899
5904
|
reactivity.pauseTracking();
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5905
|
+
try {
|
|
5906
|
+
applyOptions(instance);
|
|
5907
|
+
} finally {
|
|
5908
|
+
reactivity.resetTracking();
|
|
5909
|
+
unsetCurrentInstance();
|
|
5910
|
+
}
|
|
5903
5911
|
}
|
|
5904
5912
|
}
|
|
5905
5913
|
function getAttrsProxy(instance) {
|
|
@@ -6015,7 +6023,7 @@ function isMemoSame(cached, memo) {
|
|
|
6015
6023
|
return true;
|
|
6016
6024
|
}
|
|
6017
6025
|
|
|
6018
|
-
const version = "3.3.
|
|
6026
|
+
const version = "3.3.5";
|
|
6019
6027
|
const _ssrUtils = {
|
|
6020
6028
|
createComponentInstance,
|
|
6021
6029
|
setupComponent,
|