@vue/runtime-core 3.3.4 → 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 +40 -30
- 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,
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { computed as computed$1, ShallowUnwrapRef, UnwrapNestedRefs, DebuggerEvent, ComputedGetter, WritableComputedOptions, Ref,
|
|
1
|
+
import { computed as computed$1, ShallowUnwrapRef, UnwrapNestedRefs, DebuggerEvent, ComputedGetter, WritableComputedOptions, Ref, ReactiveEffect, ComputedRef, DebuggerOptions, reactive } from '@vue/reactivity';
|
|
2
2
|
export { ComputedGetter, ComputedRef, ComputedSetter, CustomRefFactory, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, EffectScheduler, EffectScope, MaybeRef, MaybeRefOrGetter, Raw, ReactiveEffect, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags, Ref, ShallowReactive, ShallowRef, ShallowUnwrapRef, ToRef, ToRefs, TrackOpTypes, TriggerOpTypes, UnwrapNestedRefs, UnwrapRef, WritableComputedOptions, WritableComputedRef, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
|
|
3
|
-
import { IfAny, Prettify,
|
|
3
|
+
import { IfAny, Prettify, Awaited, UnionToIntersection, LooseRequired } from '@vue/shared';
|
|
4
4
|
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
|
|
5
5
|
|
|
6
6
|
export declare const computed: typeof computed$1;
|
|
@@ -21,8 +21,6 @@ type UnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>>
|
|
|
21
21
|
type RawSlots = {
|
|
22
22
|
[name: string]: unknown;
|
|
23
23
|
$stable?: boolean;
|
|
24
|
-
/* removed internal: _ctx */
|
|
25
|
-
/* removed internal: _ */
|
|
26
24
|
};
|
|
27
25
|
|
|
28
26
|
interface SchedulerJob extends Function {
|
|
@@ -54,7 +52,7 @@ interface SchedulerJob extends Function {
|
|
|
54
52
|
ownerInstance?: ComponentInternalInstance;
|
|
55
53
|
}
|
|
56
54
|
type SchedulerJobs = SchedulerJob | SchedulerJob[];
|
|
57
|
-
export declare function nextTick<T = void>(this: T, fn?: (this: T) =>
|
|
55
|
+
export declare function nextTick<T = void, R = void>(this: T, fn?: (this: T) => R): Promise<Awaited<R>>;
|
|
58
56
|
export declare function queuePostFlushCb(cb: SchedulerJobs): void;
|
|
59
57
|
|
|
60
58
|
export type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null>;
|
|
@@ -100,7 +98,7 @@ type MixinToOptionTypes<T> = T extends ComponentOptionsBase<infer P, infer B, in
|
|
|
100
98
|
type ExtractMixin<T> = {
|
|
101
99
|
Mixin: MixinToOptionTypes<T>;
|
|
102
100
|
}[T extends ComponentOptionsMixin ? 'Mixin' : never];
|
|
103
|
-
type IntersectionMixin<T> = IsDefaultMixinComponent<T> extends true ? OptionTypesType
|
|
101
|
+
type IntersectionMixin<T> = IsDefaultMixinComponent<T> extends true ? OptionTypesType : UnionToIntersection<ExtractMixin<T>>;
|
|
104
102
|
type UnwrapMixinsType<T, Type extends OptionTypesKeys> = T extends OptionTypesType ? T[Type] : never;
|
|
105
103
|
type EnsureNonVoid<T> = T extends void ? {} : T;
|
|
106
104
|
type ComponentPublicInstanceConstructor<T extends ComponentPublicInstance<Props, RawBindings, D, C, M> = ComponentPublicInstance<any>, Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = {
|
|
@@ -329,8 +327,6 @@ interface PropOptions<T = any, D = T> {
|
|
|
329
327
|
required?: boolean;
|
|
330
328
|
default?: D | DefaultFactory<D> | null | undefined | object;
|
|
331
329
|
validator?(value: unknown): boolean;
|
|
332
|
-
/* removed internal: skipCheck */
|
|
333
|
-
/* removed internal: skipFactory */
|
|
334
330
|
}
|
|
335
331
|
export type PropType<T> = PropConstructor<T> | PropConstructor<T>[];
|
|
336
332
|
type PropConstructor<T = any> = {
|
|
@@ -408,19 +404,9 @@ export type ExtractPublicPropTypes<O> = {
|
|
|
408
404
|
} & {
|
|
409
405
|
[K in keyof Pick<O, PublicOptionalKeys<O>>]?: InferPropType<O[K]>;
|
|
410
406
|
};
|
|
411
|
-
declare const enum BooleanFlags {
|
|
412
|
-
shouldCast = 0,
|
|
413
|
-
shouldCastTrue = 1
|
|
414
|
-
}
|
|
415
407
|
export type ExtractDefaultPropTypes<O> = O extends object ? {
|
|
416
408
|
[K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]>;
|
|
417
409
|
} : {};
|
|
418
|
-
type NormalizedProp = null | (PropOptions & {
|
|
419
|
-
[BooleanFlags.shouldCast]?: boolean;
|
|
420
|
-
[BooleanFlags.shouldCastTrue]?: boolean;
|
|
421
|
-
});
|
|
422
|
-
type NormalizedProps = Record<string, NormalizedProp>;
|
|
423
|
-
type NormalizedPropsOptions = [NormalizedProps, string[]] | [];
|
|
424
410
|
|
|
425
411
|
/**
|
|
426
412
|
Runtime helper for applying directives to a vnode. Example usage:
|
|
@@ -509,23 +495,10 @@ export declare const enum DeprecationTypes {
|
|
|
509
495
|
FILTERS = "FILTERS",
|
|
510
496
|
PRIVATE_APIS = "PRIVATE_APIS"
|
|
511
497
|
}
|
|
512
|
-
declare function warnDeprecation(key: DeprecationTypes, instance: ComponentInternalInstance | null, ...args: any[]): void;
|
|
513
498
|
type CompatConfig = Partial<Record<DeprecationTypes, boolean | 'suppress-warning'>> & {
|
|
514
499
|
MODE?: 2 | 3 | ((comp: Component | null) => 2 | 3);
|
|
515
500
|
};
|
|
516
501
|
declare function configureCompat(config: CompatConfig): void;
|
|
517
|
-
declare function isCompatEnabled(key: DeprecationTypes, instance: ComponentInternalInstance | null, enableForBuiltIn?: boolean): boolean;
|
|
518
|
-
/**
|
|
519
|
-
* Use this for features where legacy usage is still possible, but will likely
|
|
520
|
-
* lead to runtime error if compat is disabled. (warn in all cases)
|
|
521
|
-
*/
|
|
522
|
-
declare function softAssertCompatEnabled(key: DeprecationTypes, instance: ComponentInternalInstance | null, ...args: any[]): boolean;
|
|
523
|
-
/**
|
|
524
|
-
* Use this for features with the same syntax but with mutually exclusive
|
|
525
|
-
* behavior in 2 vs 3. Only warn if compat is enabled.
|
|
526
|
-
* e.g. render function
|
|
527
|
-
*/
|
|
528
|
-
declare function checkCompatEnabled(key: DeprecationTypes, instance: ComponentInternalInstance | null, ...args: any[]): boolean;
|
|
529
502
|
|
|
530
503
|
/**
|
|
531
504
|
* Interface for declaring custom options.
|
|
@@ -559,10 +532,6 @@ export interface ComponentOptionsBase<Props, RawBindings, D, C extends ComputedO
|
|
|
559
532
|
expose?: string[];
|
|
560
533
|
serverPrefetch?(): void | Promise<any>;
|
|
561
534
|
compilerOptions?: RuntimeCompilerOptions;
|
|
562
|
-
/* removed internal: ssrRender */
|
|
563
|
-
/* removed internal: __ssrInlineRender */
|
|
564
|
-
/* removed internal: __asyncLoader */
|
|
565
|
-
/* removed internal: __asyncResolved */
|
|
566
535
|
call?: (this: unknown, ...args: unknown[]) => never;
|
|
567
536
|
__isFragment?: never;
|
|
568
537
|
__isTeleport?: never;
|
|
@@ -663,7 +632,6 @@ interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOpt
|
|
|
663
632
|
__differentiator?: keyof D | keyof C | keyof M;
|
|
664
633
|
}
|
|
665
634
|
type MergedHook<T = () => void> = T | T[];
|
|
666
|
-
type MergedComponentOptions = ComponentOptions & MergedComponentOptionsOverride;
|
|
667
635
|
type MergedComponentOptionsOverride = {
|
|
668
636
|
beforeCreate?: MergedHook;
|
|
669
637
|
created?: MergedHook;
|
|
@@ -737,7 +705,6 @@ export interface App<HostElement = any> {
|
|
|
737
705
|
*/
|
|
738
706
|
filter?(name: string): Function | undefined;
|
|
739
707
|
filter?(name: string, filter: Function): this;
|
|
740
|
-
/* removed internal: _createRoot */
|
|
741
708
|
}
|
|
742
709
|
export type OptionMergeFunction = (to: unknown, from: unknown) => any;
|
|
743
710
|
export interface AppConfig {
|
|
@@ -769,11 +736,6 @@ export interface AppContext {
|
|
|
769
736
|
components: Record<string, Component>;
|
|
770
737
|
directives: Record<string, Directive>;
|
|
771
738
|
provides: Record<string | symbol, any>;
|
|
772
|
-
/* removed internal: optionsCache */
|
|
773
|
-
/* removed internal: propsCache */
|
|
774
|
-
/* removed internal: emitsCache */
|
|
775
|
-
/* removed internal: reload */
|
|
776
|
-
/* removed internal: filters */
|
|
777
739
|
}
|
|
778
740
|
type PluginInstallFunction<Options> = Options extends unknown[] ? (app: App, ...options: Options) => any : (app: App, options: Options) => any;
|
|
779
741
|
export type Plugin<Options = any[]> = (PluginInstallFunction<Options> & {
|
|
@@ -888,7 +850,6 @@ export declare function resolveDynamicComponent(component: unknown): VNodeTypes;
|
|
|
888
850
|
* @private
|
|
889
851
|
*/
|
|
890
852
|
export declare function resolveDirective(name: string): Directive | undefined;
|
|
891
|
-
/* removed internal: resolveFilter$1 */
|
|
892
853
|
|
|
893
854
|
export declare const Fragment: {
|
|
894
855
|
new (): {
|
|
@@ -929,8 +890,6 @@ export type VNodeNormalizedChildren = string | VNodeArrayChildren | RawSlots | n
|
|
|
929
890
|
export interface VNode<HostNode = RendererNode, HostElement = RendererElement, ExtraProps = {
|
|
930
891
|
[key: string]: any;
|
|
931
892
|
}> {
|
|
932
|
-
/* removed internal: __v_isVNode */
|
|
933
|
-
|
|
934
893
|
type: VNodeTypes;
|
|
935
894
|
props: (VNodeProps & ExtraProps) | null;
|
|
936
895
|
key: string | number | symbol | null;
|
|
@@ -940,7 +899,6 @@ export interface VNode<HostNode = RendererNode, HostElement = RendererElement, E
|
|
|
940
899
|
* which is set alongside currentRenderingInstance.
|
|
941
900
|
*/
|
|
942
901
|
scopeId: string | null;
|
|
943
|
-
/* removed internal: slotScopeIds */
|
|
944
902
|
children: VNodeNormalizedChildren;
|
|
945
903
|
component: ComponentInternalInstance | null;
|
|
946
904
|
dirs: DirectiveBinding[] | null;
|
|
@@ -949,19 +907,10 @@ export interface VNode<HostNode = RendererNode, HostElement = RendererElement, E
|
|
|
949
907
|
anchor: HostNode | null;
|
|
950
908
|
target: HostElement | null;
|
|
951
909
|
targetAnchor: HostNode | null;
|
|
952
|
-
/* removed internal: staticCount */
|
|
953
910
|
suspense: SuspenseBoundary | null;
|
|
954
|
-
/* removed internal: ssContent */
|
|
955
|
-
/* removed internal: ssFallback */
|
|
956
911
|
shapeFlag: number;
|
|
957
912
|
patchFlag: number;
|
|
958
|
-
/* removed internal: dynamicProps */
|
|
959
|
-
/* removed internal: dynamicChildren */
|
|
960
913
|
appContext: AppContext | null;
|
|
961
|
-
/* removed internal: ctx */
|
|
962
|
-
/* removed internal: memo */
|
|
963
|
-
/* removed internal: isCompatRoot */
|
|
964
|
-
/* removed internal: ce */
|
|
965
914
|
}
|
|
966
915
|
/**
|
|
967
916
|
* Open a block.
|
|
@@ -1040,7 +989,6 @@ export declare function createStaticVNode(content: string, numberOfNodes: number
|
|
|
1040
989
|
* @private
|
|
1041
990
|
*/
|
|
1042
991
|
export declare function createCommentVNode(text?: string, asBlock?: boolean): VNode;
|
|
1043
|
-
declare function normalizeVNode(child: VNodeChild): VNode;
|
|
1044
992
|
export declare function mergeProps(...args: (Data & VNodeProps)[]): Data;
|
|
1045
993
|
|
|
1046
994
|
type Data = Record<string, unknown>;
|
|
@@ -1057,9 +1005,6 @@ export interface AllowedComponentProps {
|
|
|
1057
1005
|
style?: unknown;
|
|
1058
1006
|
}
|
|
1059
1007
|
interface ComponentInternalOptions {
|
|
1060
|
-
/* removed internal: __scopeId */
|
|
1061
|
-
/* removed internal: __cssModules */
|
|
1062
|
-
/* removed internal: __hmrId */
|
|
1063
1008
|
/**
|
|
1064
1009
|
* Compat build only, for bailing out of certain compatibility behavior
|
|
1065
1010
|
*/
|
|
@@ -1092,21 +1037,19 @@ interface ClassComponent {
|
|
|
1092
1037
|
* values, e.g. checking if its a function or not. This is mostly for internal
|
|
1093
1038
|
* implementation code.
|
|
1094
1039
|
*/
|
|
1095
|
-
export type ConcreteComponent<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = ComponentOptions<Props, RawBindings, D, C, M> | FunctionalComponent<Props, any
|
|
1040
|
+
export type ConcreteComponent<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = ComponentOptions<Props, RawBindings, D, C, M> | FunctionalComponent<Props, any>;
|
|
1096
1041
|
/**
|
|
1097
1042
|
* A type used in public APIs where a component type is expected.
|
|
1098
1043
|
* The constructor type is an artificial type returned by defineComponent().
|
|
1099
1044
|
*/
|
|
1100
1045
|
export type Component<Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = ConcreteComponent<Props, RawBindings, D, C, M> | ComponentPublicInstanceConstructor<Props>;
|
|
1101
1046
|
|
|
1102
|
-
type LifecycleHook<TFn = Function> = TFn[] | null;
|
|
1103
1047
|
export type SetupContext<E = EmitsOptions, S extends SlotsType = {}> = E extends any ? {
|
|
1104
1048
|
attrs: Data;
|
|
1105
1049
|
slots: UnwrapSlotsType<S>;
|
|
1106
1050
|
emit: EmitFn<E>;
|
|
1107
1051
|
expose: (exposed?: Record<string, any>) => void;
|
|
1108
1052
|
} : never;
|
|
1109
|
-
/* removed internal: InternalRenderFunction */
|
|
1110
1053
|
/**
|
|
1111
1054
|
* We expose a subset of properties on the internal instance as they are
|
|
1112
1055
|
* useful for advanced external libraries and tools.
|
|
@@ -1121,7 +1064,6 @@ export interface ComponentInternalInstance {
|
|
|
1121
1064
|
* Vnode representing this component in its parent's vdom tree
|
|
1122
1065
|
*/
|
|
1123
1066
|
vnode: VNode;
|
|
1124
|
-
/* removed internal: next */
|
|
1125
1067
|
/**
|
|
1126
1068
|
* Root vnode of this component's own vdom tree
|
|
1127
1069
|
*/
|
|
@@ -1134,25 +1076,9 @@ export interface ComponentInternalInstance {
|
|
|
1134
1076
|
* Bound effect runner to be passed to schedulers
|
|
1135
1077
|
*/
|
|
1136
1078
|
update: SchedulerJob;
|
|
1137
|
-
/* removed internal: render */
|
|
1138
|
-
/* removed internal: ssrRender */
|
|
1139
|
-
/* removed internal: provides */
|
|
1140
|
-
/* removed internal: scope */
|
|
1141
|
-
/* removed internal: accessCache */
|
|
1142
|
-
/* removed internal: renderCache */
|
|
1143
|
-
/* removed internal: components */
|
|
1144
|
-
/* removed internal: directives */
|
|
1145
|
-
/* removed internal: filters */
|
|
1146
|
-
/* removed internal: propsOptions */
|
|
1147
|
-
/* removed internal: emitsOptions */
|
|
1148
|
-
/* removed internal: inheritAttrs */
|
|
1149
|
-
/* removed internal: isCE */
|
|
1150
|
-
/* removed internal: ceReload */
|
|
1151
1079
|
proxy: ComponentPublicInstance | null;
|
|
1152
1080
|
exposed: Record<string, any> | null;
|
|
1153
1081
|
exposeProxy: Record<string, any> | null;
|
|
1154
|
-
/* removed internal: withProxy */
|
|
1155
|
-
/* removed internal: ctx */
|
|
1156
1082
|
data: Data;
|
|
1157
1083
|
props: Data;
|
|
1158
1084
|
attrs: Data;
|
|
@@ -1161,39 +1087,11 @@ export interface ComponentInternalInstance {
|
|
|
1161
1087
|
emit: EmitFn;
|
|
1162
1088
|
attrsProxy: Data | null;
|
|
1163
1089
|
slotsProxy: Slots | null;
|
|
1164
|
-
/* removed internal: emitted */
|
|
1165
|
-
/* removed internal: propsDefaults */
|
|
1166
|
-
/* removed internal: setupState */
|
|
1167
|
-
/* removed internal: devtoolsRawSetupState */
|
|
1168
|
-
/* removed internal: setupContext */
|
|
1169
|
-
/* removed internal: suspense */
|
|
1170
|
-
/* removed internal: suspenseId */
|
|
1171
|
-
/* removed internal: asyncDep */
|
|
1172
|
-
/* removed internal: asyncResolved */
|
|
1173
1090
|
isMounted: boolean;
|
|
1174
1091
|
isUnmounted: boolean;
|
|
1175
1092
|
isDeactivated: boolean;
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
/* removed internal: f */
|
|
1191
|
-
/* removed internal: n */
|
|
1192
|
-
/* removed internal: ut */
|
|
1193
1093
|
}
|
|
1194
|
-
declare function createComponentInstance(vnode: VNode, parent: ComponentInternalInstance | null, suspense: SuspenseBoundary | null): ComponentInternalInstance;
|
|
1195
1094
|
export declare const getCurrentInstance: () => ComponentInternalInstance | null;
|
|
1196
|
-
declare function setupComponent(instance: ComponentInternalInstance, isSSR?: boolean): Promise<void> | undefined;
|
|
1197
1095
|
/**
|
|
1198
1096
|
* For runtime-dom to register the compiler.
|
|
1199
1097
|
* Note the exported method uses any to avoid d.ts relying on the compiler types.
|
|
@@ -1257,6 +1155,7 @@ export interface AsyncComponentOptions<T = any> {
|
|
|
1257
1155
|
suspensible?: boolean;
|
|
1258
1156
|
onError?: (error: Error, retry: () => void, fail: () => void, attempts: number) => any;
|
|
1259
1157
|
}
|
|
1158
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
1260
1159
|
export declare function defineAsyncComponent<T extends Component = {
|
|
1261
1160
|
new (): ComponentPublicInstance;
|
|
1262
1161
|
}>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T;
|
|
@@ -1383,7 +1282,7 @@ export declare function defineSlots<S extends Record<string, any> = Record<strin
|
|
|
1383
1282
|
* modelValue.value = "hello"
|
|
1384
1283
|
*
|
|
1385
1284
|
* // default model with options
|
|
1386
|
-
* const modelValue = defineModel<
|
|
1285
|
+
* const modelValue = defineModel<string>({ required: true })
|
|
1387
1286
|
*
|
|
1388
1287
|
* // with specified name (consumed via `v-model:count`)
|
|
1389
1288
|
* const count = defineModel<number>('count')
|
|
@@ -1423,7 +1322,7 @@ type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : n
|
|
|
1423
1322
|
type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = Omit<T, keyof Defaults> & {
|
|
1424
1323
|
[K in keyof Defaults]-?: K extends keyof T ? Defaults[K] extends undefined ? T[K] : NotUndefined<T[K]> : never;
|
|
1425
1324
|
} & {
|
|
1426
|
-
readonly [K in BKeys]-?: boolean;
|
|
1325
|
+
readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean;
|
|
1427
1326
|
};
|
|
1428
1327
|
/**
|
|
1429
1328
|
* Vue `<script setup>` compiler macro for providing props default values when
|
|
@@ -1451,10 +1350,6 @@ export declare function useAttrs(): SetupContext['attrs'];
|
|
|
1451
1350
|
export declare function useModel<T extends Record<string, any>, K extends keyof T>(props: T, name: K, options?: {
|
|
1452
1351
|
local?: boolean;
|
|
1453
1352
|
}): Ref<T[K]>;
|
|
1454
|
-
/* removed internal: mergeDefaults */
|
|
1455
|
-
/* removed internal: mergeModels */
|
|
1456
|
-
/* removed internal: createPropsRestProxy */
|
|
1457
|
-
/* removed internal: withAsyncContext */
|
|
1458
1353
|
|
|
1459
1354
|
type RawProps = VNodeProps & {
|
|
1460
1355
|
__v_isVNode?: never;
|
|
@@ -1493,7 +1388,6 @@ export declare const ssrContextKey: unique symbol;
|
|
|
1493
1388
|
export declare const useSSRContext: <T = Record<string, any>>() => T | undefined;
|
|
1494
1389
|
|
|
1495
1390
|
export declare function warn(msg: string, ...args: any[]): void;
|
|
1496
|
-
/* removed internal: assertNumber */
|
|
1497
1391
|
|
|
1498
1392
|
export declare const enum ErrorCodes {
|
|
1499
1393
|
SETUP_FUNCTION = 0,
|
|
@@ -1534,7 +1428,7 @@ interface DevtoolsHook {
|
|
|
1534
1428
|
appRecords: AppRecord[];
|
|
1535
1429
|
/**
|
|
1536
1430
|
* Added at https://github.com/vuejs/devtools/commit/f2ad51eea789006ab66942e5a27c0f0986a257f9
|
|
1537
|
-
* Returns
|
|
1431
|
+
* Returns whether the arg was buffered or not
|
|
1538
1432
|
*/
|
|
1539
1433
|
cleanupBuffer?: (matchArg: unknown) => boolean;
|
|
1540
1434
|
}
|
|
@@ -1551,17 +1445,6 @@ declare function createRecord(id: string, initialDef: HMRComponent): boolean;
|
|
|
1551
1445
|
declare function rerender(id: string, newRender?: Function): void;
|
|
1552
1446
|
declare function reload(id: string, newComp: HMRComponent): void;
|
|
1553
1447
|
|
|
1554
|
-
/**
|
|
1555
|
-
* Note: rendering calls maybe nested. The function returns the parent rendering
|
|
1556
|
-
* instance if present, which should be restored after the render is done:
|
|
1557
|
-
*
|
|
1558
|
-
* ```js
|
|
1559
|
-
* const prev = setCurrentRenderingInstance(i)
|
|
1560
|
-
* // ...render
|
|
1561
|
-
* setCurrentRenderingInstance(prev)
|
|
1562
|
-
* ```
|
|
1563
|
-
*/
|
|
1564
|
-
declare function setCurrentRenderingInstance(instance: ComponentInternalInstance | null): ComponentInternalInstance | null;
|
|
1565
1448
|
/**
|
|
1566
1449
|
* Set scope id when creating hoisted vnodes.
|
|
1567
1450
|
* @private compiler helper
|
|
@@ -1635,8 +1518,6 @@ export declare function withMemo(memo: any[], render: () => VNode<any, any>, cac
|
|
|
1635
1518
|
}>;
|
|
1636
1519
|
export declare function isMemoSame(cached: VNode, memo: any[]): boolean;
|
|
1637
1520
|
|
|
1638
|
-
declare function renderComponentRoot(instance: ComponentInternalInstance): VNode;
|
|
1639
|
-
|
|
1640
1521
|
export type LegacyConfig = {
|
|
1641
1522
|
/**
|
|
1642
1523
|
* @deprecated `config.silent` option has been removed
|
|
@@ -1716,12 +1597,7 @@ export type CompatVue = Pick<App, 'version' | 'component' | 'directive'> & {
|
|
|
1716
1597
|
* @deprecated filters have been removed from Vue 3.
|
|
1717
1598
|
*/
|
|
1718
1599
|
filter(name: string, arg?: any): null;
|
|
1719
|
-
/* removed internal: cid */
|
|
1720
|
-
/* removed internal: options */
|
|
1721
|
-
/* removed internal: util */
|
|
1722
|
-
/* removed internal: super */
|
|
1723
1600
|
};
|
|
1724
|
-
declare function createCompatVue(createApp: CreateAppFunction<Element>, createSingletonApp: CreateAppFunction<Element>): CompatVue;
|
|
1725
1601
|
|
|
1726
1602
|
export declare const version: string;
|
|
1727
1603
|
|
|
@@ -1733,11 +1609,6 @@ declare module '@vue/reactivity' {
|
|
|
1733
1609
|
}
|
|
1734
1610
|
}
|
|
1735
1611
|
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
1612
|
export { createBaseVNode as createElementVNode, };
|
|
1742
1613
|
// Note: this file is auto concatenated to the end of the bundled d.ts during
|
|
1743
1614
|
// build.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { pauseTracking, resetTracking, isRef, toRaw, getCurrentScope, isShallow as isShallow$1, isReactive, ReactiveEffect, ref, shallowReadonly, track, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';
|
|
2
2
|
export { EffectScope, ReactiveEffect, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
|
|
3
|
-
import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, capitalize,
|
|
3
|
+
import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, capitalize, isGloballyAllowed, NO, def, isReservedProp, EMPTY_ARR, toRawType, makeMap, normalizeClass, normalizeStyle } from '@vue/shared';
|
|
4
4
|
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
|
|
5
5
|
|
|
6
6
|
const stack = [];
|
|
@@ -1747,9 +1747,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
1747
1747
|
}
|
|
1748
1748
|
if (cb) {
|
|
1749
1749
|
const newValue = effect.run();
|
|
1750
|
-
if (deep || forceTrigger || (isMultiSource ? newValue.some(
|
|
1751
|
-
(v, i) => hasChanged(v, oldValue[i])
|
|
1752
|
-
) : hasChanged(newValue, oldValue)) || false) {
|
|
1750
|
+
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
|
|
1753
1751
|
if (cleanup) {
|
|
1754
1752
|
cleanup();
|
|
1755
1753
|
}
|
|
@@ -1922,6 +1920,8 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
1922
1920
|
}
|
|
1923
1921
|
}
|
|
1924
1922
|
|
|
1923
|
+
const leaveCbKey = Symbol("_leaveCb");
|
|
1924
|
+
const enterCbKey = Symbol("_enterCb");
|
|
1925
1925
|
function useTransitionState() {
|
|
1926
1926
|
const state = {
|
|
1927
1927
|
isMounted: false,
|
|
@@ -2044,9 +2044,9 @@ const BaseTransitionImpl = {
|
|
|
2044
2044
|
oldInnerChild
|
|
2045
2045
|
);
|
|
2046
2046
|
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
2047
|
-
el
|
|
2047
|
+
el[leaveCbKey] = () => {
|
|
2048
2048
|
earlyRemove();
|
|
2049
|
-
el
|
|
2049
|
+
el[leaveCbKey] = void 0;
|
|
2050
2050
|
delete enterHooks.delayedLeave;
|
|
2051
2051
|
};
|
|
2052
2052
|
enterHooks.delayedLeave = delayedLeave;
|
|
@@ -2117,15 +2117,15 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
2117
2117
|
return;
|
|
2118
2118
|
}
|
|
2119
2119
|
}
|
|
2120
|
-
if (el
|
|
2121
|
-
el
|
|
2120
|
+
if (el[leaveCbKey]) {
|
|
2121
|
+
el[leaveCbKey](
|
|
2122
2122
|
true
|
|
2123
2123
|
/* cancelled */
|
|
2124
2124
|
);
|
|
2125
2125
|
}
|
|
2126
2126
|
const leavingVNode = leavingVNodesCache[key];
|
|
2127
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el
|
|
2128
|
-
leavingVNode.el
|
|
2127
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
|
|
2128
|
+
leavingVNode.el[leaveCbKey]();
|
|
2129
2129
|
}
|
|
2130
2130
|
callHook(hook, [el]);
|
|
2131
2131
|
},
|
|
@@ -2143,7 +2143,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
2143
2143
|
}
|
|
2144
2144
|
}
|
|
2145
2145
|
let called = false;
|
|
2146
|
-
const done = el
|
|
2146
|
+
const done = el[enterCbKey] = (cancelled) => {
|
|
2147
2147
|
if (called)
|
|
2148
2148
|
return;
|
|
2149
2149
|
called = true;
|
|
@@ -2155,7 +2155,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
2155
2155
|
if (hooks.delayedLeave) {
|
|
2156
2156
|
hooks.delayedLeave();
|
|
2157
2157
|
}
|
|
2158
|
-
el
|
|
2158
|
+
el[enterCbKey] = void 0;
|
|
2159
2159
|
};
|
|
2160
2160
|
if (hook) {
|
|
2161
2161
|
callAsyncHook(hook, [el, done]);
|
|
@@ -2165,8 +2165,8 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
2165
2165
|
},
|
|
2166
2166
|
leave(el, remove) {
|
|
2167
2167
|
const key2 = String(vnode.key);
|
|
2168
|
-
if (el
|
|
2169
|
-
el
|
|
2168
|
+
if (el[enterCbKey]) {
|
|
2169
|
+
el[enterCbKey](
|
|
2170
2170
|
true
|
|
2171
2171
|
/* cancelled */
|
|
2172
2172
|
);
|
|
@@ -2176,7 +2176,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
2176
2176
|
}
|
|
2177
2177
|
callHook(onBeforeLeave, [el]);
|
|
2178
2178
|
let called = false;
|
|
2179
|
-
const done = el
|
|
2179
|
+
const done = el[leaveCbKey] = (cancelled) => {
|
|
2180
2180
|
if (called)
|
|
2181
2181
|
return;
|
|
2182
2182
|
called = true;
|
|
@@ -2186,7 +2186,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
2186
2186
|
} else {
|
|
2187
2187
|
callHook(onAfterLeave, [el]);
|
|
2188
2188
|
}
|
|
2189
|
-
el
|
|
2189
|
+
el[leaveCbKey] = void 0;
|
|
2190
2190
|
if (leavingVNodesCache[key2] === vnode) {
|
|
2191
2191
|
delete leavingVNodesCache[key2];
|
|
2192
2192
|
}
|
|
@@ -2248,6 +2248,8 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
2248
2248
|
return ret;
|
|
2249
2249
|
}
|
|
2250
2250
|
|
|
2251
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
2252
|
+
// @__NO_SIDE_EFFECTS__
|
|
2251
2253
|
function defineComponent(options, extraOptions) {
|
|
2252
2254
|
return isFunction(options) ? (
|
|
2253
2255
|
// #8326: extend call and options.name access are considered side-effects
|
|
@@ -2257,6 +2259,8 @@ function defineComponent(options, extraOptions) {
|
|
|
2257
2259
|
}
|
|
2258
2260
|
|
|
2259
2261
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
2262
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
2263
|
+
// @__NO_SIDE_EFFECTS__
|
|
2260
2264
|
function defineAsyncComponent(source) {
|
|
2261
2265
|
if (isFunction(source)) {
|
|
2262
2266
|
source = { loader: source };
|
|
@@ -3041,7 +3045,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
|
|
|
3041
3045
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
3042
3046
|
},
|
|
3043
3047
|
has(_, key) {
|
|
3044
|
-
const has = key[0] !== "_" && !
|
|
3048
|
+
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
3045
3049
|
if (!!(process.env.NODE_ENV !== "production") && !has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
3046
3050
|
warn(
|
|
3047
3051
|
`Property ${JSON.stringify(
|
|
@@ -3719,7 +3723,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3719
3723
|
},
|
|
3720
3724
|
set() {
|
|
3721
3725
|
warn(
|
|
3722
|
-
`app.config.unwrapInjectedRef has been deprecated. 3.3 now
|
|
3726
|
+
`app.config.unwrapInjectedRef has been deprecated. 3.3 now always unwraps injected refs in Options API.`
|
|
3723
3727
|
);
|
|
3724
3728
|
}
|
|
3725
3729
|
});
|
|
@@ -3808,10 +3812,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3808
3812
|
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
3809
3813
|
);
|
|
3810
3814
|
}
|
|
3811
|
-
const vnode = createVNode(
|
|
3812
|
-
rootComponent,
|
|
3813
|
-
rootProps
|
|
3814
|
-
);
|
|
3815
|
+
const vnode = createVNode(rootComponent, rootProps);
|
|
3815
3816
|
vnode.appContext = context;
|
|
3816
3817
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3817
3818
|
context.reload = () => {
|
|
@@ -4557,8 +4558,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4557
4558
|
hasMismatch = true;
|
|
4558
4559
|
!!(process.env.NODE_ENV !== "production") && warn(
|
|
4559
4560
|
`Hydration text mismatch:
|
|
4560
|
-
-
|
|
4561
|
-
|
|
4561
|
+
- Server rendered: ${JSON.stringify(
|
|
4562
|
+
node.data
|
|
4563
|
+
)}
|
|
4564
|
+
- Client rendered: ${JSON.stringify(vnode.children)}`
|
|
4562
4565
|
);
|
|
4563
4566
|
node.data = vnode.children;
|
|
4564
4567
|
}
|
|
@@ -4761,8 +4764,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4761
4764
|
hasMismatch = true;
|
|
4762
4765
|
!!(process.env.NODE_ENV !== "production") && warn(
|
|
4763
4766
|
`Hydration text content mismatch in <${vnode.type}>:
|
|
4764
|
-
-
|
|
4765
|
-
-
|
|
4767
|
+
- Server rendered: ${el.textContent}
|
|
4768
|
+
- Client rendered: ${vnode.children}`
|
|
4766
4769
|
);
|
|
4767
4770
|
el.textContent = vnode.children;
|
|
4768
4771
|
}
|
|
@@ -6544,6 +6547,10 @@ const TeleportImpl = {
|
|
|
6544
6547
|
internals,
|
|
6545
6548
|
1
|
|
6546
6549
|
);
|
|
6550
|
+
} else {
|
|
6551
|
+
if (n2.props && n1.props && n2.props.to !== n1.props.to) {
|
|
6552
|
+
n2.props.to = n1.props.to;
|
|
6553
|
+
}
|
|
6547
6554
|
}
|
|
6548
6555
|
} else {
|
|
6549
6556
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
@@ -7338,9 +7345,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
7338
7345
|
if (__VUE_OPTIONS_API__ && true) {
|
|
7339
7346
|
setCurrentInstance(instance);
|
|
7340
7347
|
pauseTracking();
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7348
|
+
try {
|
|
7349
|
+
applyOptions(instance);
|
|
7350
|
+
} finally {
|
|
7351
|
+
resetTracking();
|
|
7352
|
+
unsetCurrentInstance();
|
|
7353
|
+
}
|
|
7344
7354
|
}
|
|
7345
7355
|
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) {
|
|
7346
7356
|
if (!compile && Component.template) {
|
|
@@ -7724,7 +7734,7 @@ function isMemoSame(cached, memo) {
|
|
|
7724
7734
|
return true;
|
|
7725
7735
|
}
|
|
7726
7736
|
|
|
7727
|
-
const version = "3.3.
|
|
7737
|
+
const version = "3.3.5";
|
|
7728
7738
|
const _ssrUtils = {
|
|
7729
7739
|
createComponentInstance,
|
|
7730
7740
|
setupComponent,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.5",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@vue/shared": "3.3.
|
|
36
|
-
"@vue/reactivity": "3.3.
|
|
35
|
+
"@vue/shared": "3.3.5",
|
|
36
|
+
"@vue/reactivity": "3.3.5"
|
|
37
37
|
}
|
|
38
38
|
}
|