@vue/runtime-core 3.6.0-rc.1 → 3.6.0-rc.2
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 +26 -17
- package/dist/runtime-core.cjs.prod.js +26 -17
- package/dist/runtime-core.esm-bundler.js +27 -18
- package/package.json +3 -3
package/dist/runtime-core.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.6.0-rc.
|
|
2
|
+
* @vue/runtime-core v3.6.0-rc.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -883,7 +883,7 @@ function instanceWatch(source, value, options) {
|
|
|
883
883
|
}
|
|
884
884
|
const prev = setCurrentInstance(this);
|
|
885
885
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
886
|
-
|
|
886
|
+
restoreCurrentInstance(prev);
|
|
887
887
|
return res;
|
|
888
888
|
}
|
|
889
889
|
function createPathGetter(ctx, path) {
|
|
@@ -1341,12 +1341,11 @@ function getInnerChild$1(vnode) {
|
|
|
1341
1341
|
}
|
|
1342
1342
|
}
|
|
1343
1343
|
function setTransitionHooks(vnode, hooks) {
|
|
1344
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
1345
|
-
else {
|
|
1344
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
1346
1345
|
vnode.transition = hooks;
|
|
1347
|
-
setTransitionHooks(vnode.component
|
|
1348
|
-
|
|
1349
|
-
else if (vnode.shapeFlag & 128) {
|
|
1346
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
1347
|
+
else setTransitionHooks(vnode.component.subTree, hooks);
|
|
1348
|
+
} else if (vnode.shapeFlag & 128) {
|
|
1350
1349
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
1351
1350
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
1352
1351
|
} else vnode.transition = hooks;
|
|
@@ -2413,7 +2412,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
2413
2412
|
try {
|
|
2414
2413
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
2415
2414
|
} finally {
|
|
2416
|
-
|
|
2415
|
+
restoreCurrentInstance(prev);
|
|
2417
2416
|
(0, _vue_reactivity.setActiveSub)(prevSub);
|
|
2418
2417
|
}
|
|
2419
2418
|
});
|
|
@@ -3859,7 +3858,7 @@ function baseResolveDefault(factory, instance, key) {
|
|
|
3859
3858
|
const prev = setCurrentInstance(instance);
|
|
3860
3859
|
const props = (0, _vue_reactivity.toRaw)(instance.props);
|
|
3861
3860
|
value = factory.call(null, props);
|
|
3862
|
-
|
|
3861
|
+
restoreCurrentInstance(prev);
|
|
3863
3862
|
return value;
|
|
3864
3863
|
}
|
|
3865
3864
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -4419,7 +4418,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4419
4418
|
};
|
|
4420
4419
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
4421
4420
|
n2.slotScopeIds = slotScopeIds;
|
|
4422
|
-
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent);
|
|
4421
|
+
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
4423
4422
|
else {
|
|
4424
4423
|
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
4425
4424
|
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
@@ -4762,7 +4761,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4762
4761
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
4763
4762
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
4764
4763
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
4765
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
4764
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
4766
4765
|
return;
|
|
4767
4766
|
}
|
|
4768
4767
|
if (shapeFlag & 6) {
|
|
@@ -4818,7 +4817,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4818
4817
|
}
|
|
4819
4818
|
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
4820
4819
|
if (shapeFlag & 256) {
|
|
4821
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
4820
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
4822
4821
|
else parentComponent.ctx.deactivate(vnode);
|
|
4823
4822
|
return;
|
|
4824
4823
|
}
|
|
@@ -4828,7 +4827,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4828
4827
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4829
4828
|
if (shapeFlag & 6) if (isVaporComponent(type)) {
|
|
4830
4829
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
4831
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
4830
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
4832
4831
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
4833
4832
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
4834
4833
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
@@ -4845,7 +4844,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4845
4844
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
4846
4845
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
4847
4846
|
if (type === VaporSlot) {
|
|
4848
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
4847
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
4849
4848
|
return;
|
|
4850
4849
|
}
|
|
4851
4850
|
if (doRemove) remove(vnode);
|
|
@@ -5752,6 +5751,16 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
5752
5751
|
simpleSetCurrentInstance(instance);
|
|
5753
5752
|
}
|
|
5754
5753
|
};
|
|
5754
|
+
/**
|
|
5755
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
5756
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
5757
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
5758
|
+
* @internal
|
|
5759
|
+
*/
|
|
5760
|
+
const restoreCurrentInstance = (prev) => {
|
|
5761
|
+
(0, _vue_reactivity.setCurrentScope)(prev[1]);
|
|
5762
|
+
simpleSetCurrentInstance(prev[0]);
|
|
5763
|
+
};
|
|
5755
5764
|
const internalOptions = [
|
|
5756
5765
|
"ce",
|
|
5757
5766
|
"type",
|
|
@@ -5903,7 +5912,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
5903
5912
|
const setupResult = callWithErrorHandling(setup, instance, 0, [(0, _vue_reactivity.shallowReadonly)(instance.props), setupContext]);
|
|
5904
5913
|
const isAsyncSetup = (0, _vue_shared.isPromise)(setupResult);
|
|
5905
5914
|
(0, _vue_reactivity.setActiveSub)(prevSub);
|
|
5906
|
-
|
|
5915
|
+
restoreCurrentInstance(prev);
|
|
5907
5916
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
5908
5917
|
if (isAsyncSetup) {
|
|
5909
5918
|
const unsetCurrentInstance = () => {
|
|
@@ -5973,7 +5982,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
5973
5982
|
applyOptions(instance);
|
|
5974
5983
|
} finally {
|
|
5975
5984
|
(0, _vue_reactivity.setActiveSub)(prevSub);
|
|
5976
|
-
|
|
5985
|
+
restoreCurrentInstance(prevInstance);
|
|
5977
5986
|
}
|
|
5978
5987
|
}
|
|
5979
5988
|
if (!Component.render && instance.render === _vue_shared.NOOP && !isSSR) if (!compile && Component.template)
|
|
@@ -6283,7 +6292,7 @@ function isMemoSame(cached, memo) {
|
|
|
6283
6292
|
}
|
|
6284
6293
|
//#endregion
|
|
6285
6294
|
//#region packages/runtime-core/src/index.ts
|
|
6286
|
-
const version = "3.6.0-rc.
|
|
6295
|
+
const version = "3.6.0-rc.2";
|
|
6287
6296
|
const warn = warn$1;
|
|
6288
6297
|
/**
|
|
6289
6298
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.6.0-rc.
|
|
2
|
+
* @vue/runtime-core v3.6.0-rc.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -515,7 +515,7 @@ function instanceWatch(source, value, options) {
|
|
|
515
515
|
}
|
|
516
516
|
const prev = setCurrentInstance(this);
|
|
517
517
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
518
|
-
|
|
518
|
+
restoreCurrentInstance(prev);
|
|
519
519
|
return res;
|
|
520
520
|
}
|
|
521
521
|
function createPathGetter(ctx, path) {
|
|
@@ -954,12 +954,11 @@ function getInnerChild$1(vnode) {
|
|
|
954
954
|
}
|
|
955
955
|
}
|
|
956
956
|
function setTransitionHooks(vnode, hooks) {
|
|
957
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
958
|
-
else {
|
|
957
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
959
958
|
vnode.transition = hooks;
|
|
960
|
-
setTransitionHooks(vnode.component
|
|
961
|
-
|
|
962
|
-
else if (vnode.shapeFlag & 128) {
|
|
959
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
960
|
+
else setTransitionHooks(vnode.component.subTree, hooks);
|
|
961
|
+
} else if (vnode.shapeFlag & 128) {
|
|
963
962
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
964
963
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
965
964
|
} else vnode.transition = hooks;
|
|
@@ -1875,7 +1874,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
1875
1874
|
try {
|
|
1876
1875
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
1877
1876
|
} finally {
|
|
1878
|
-
|
|
1877
|
+
restoreCurrentInstance(prev);
|
|
1879
1878
|
(0, _vue_reactivity.setActiveSub)(prevSub);
|
|
1880
1879
|
}
|
|
1881
1880
|
});
|
|
@@ -3054,7 +3053,7 @@ function baseResolveDefault(factory, instance, key) {
|
|
|
3054
3053
|
const prev = setCurrentInstance(instance);
|
|
3055
3054
|
const props = (0, _vue_reactivity.toRaw)(instance.props);
|
|
3056
3055
|
value = factory.call(null, props);
|
|
3057
|
-
|
|
3056
|
+
restoreCurrentInstance(prev);
|
|
3058
3057
|
return value;
|
|
3059
3058
|
}
|
|
3060
3059
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -3425,7 +3424,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3425
3424
|
};
|
|
3426
3425
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
3427
3426
|
n2.slotScopeIds = slotScopeIds;
|
|
3428
|
-
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent);
|
|
3427
|
+
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
3429
3428
|
else {
|
|
3430
3429
|
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
3431
3430
|
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
@@ -3735,7 +3734,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3735
3734
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
3736
3735
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
3737
3736
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
3738
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
3737
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
3739
3738
|
return;
|
|
3740
3739
|
}
|
|
3741
3740
|
if (shapeFlag & 6) {
|
|
@@ -3791,7 +3790,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3791
3790
|
}
|
|
3792
3791
|
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
3793
3792
|
if (shapeFlag & 256) {
|
|
3794
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
3793
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
3795
3794
|
else parentComponent.ctx.deactivate(vnode);
|
|
3796
3795
|
return;
|
|
3797
3796
|
}
|
|
@@ -3801,7 +3800,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3801
3800
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
3802
3801
|
if (shapeFlag & 6) if (isVaporComponent(type)) {
|
|
3803
3802
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
3804
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
3803
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
3805
3804
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
3806
3805
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
3807
3806
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
@@ -3818,7 +3817,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3818
3817
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
3819
3818
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
3820
3819
|
if (type === VaporSlot) {
|
|
3821
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
3820
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
3822
3821
|
return;
|
|
3823
3822
|
}
|
|
3824
3823
|
if (doRemove) remove(vnode);
|
|
@@ -4665,6 +4664,16 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
4665
4664
|
simpleSetCurrentInstance(instance);
|
|
4666
4665
|
}
|
|
4667
4666
|
};
|
|
4667
|
+
/**
|
|
4668
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
4669
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
4670
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
4671
|
+
* @internal
|
|
4672
|
+
*/
|
|
4673
|
+
const restoreCurrentInstance = (prev) => {
|
|
4674
|
+
(0, _vue_reactivity.setCurrentScope)(prev[1]);
|
|
4675
|
+
simpleSetCurrentInstance(prev[0]);
|
|
4676
|
+
};
|
|
4668
4677
|
const internalOptions = [
|
|
4669
4678
|
"ce",
|
|
4670
4679
|
"type",
|
|
@@ -4793,7 +4802,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
4793
4802
|
const setupResult = callWithErrorHandling(setup, instance, 0, [instance.props, setupContext]);
|
|
4794
4803
|
const isAsyncSetup = (0, _vue_shared.isPromise)(setupResult);
|
|
4795
4804
|
(0, _vue_reactivity.setActiveSub)(prevSub);
|
|
4796
|
-
|
|
4805
|
+
restoreCurrentInstance(prev);
|
|
4797
4806
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
4798
4807
|
if (isAsyncSetup) {
|
|
4799
4808
|
const unsetCurrentInstance = () => {
|
|
@@ -4853,7 +4862,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
4853
4862
|
applyOptions(instance);
|
|
4854
4863
|
} finally {
|
|
4855
4864
|
(0, _vue_reactivity.setActiveSub)(prevSub);
|
|
4856
|
-
|
|
4865
|
+
restoreCurrentInstance(prevInstance);
|
|
4857
4866
|
}
|
|
4858
4867
|
}
|
|
4859
4868
|
}
|
|
@@ -4951,7 +4960,7 @@ function isMemoSame(cached, memo) {
|
|
|
4951
4960
|
}
|
|
4952
4961
|
//#endregion
|
|
4953
4962
|
//#region packages/runtime-core/src/index.ts
|
|
4954
|
-
const version = "3.6.0-rc.
|
|
4963
|
+
const version = "3.6.0-rc.2";
|
|
4955
4964
|
const warn = _vue_shared.NOOP;
|
|
4956
4965
|
/**
|
|
4957
4966
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.6.0-rc.
|
|
2
|
+
* @vue/runtime-core v3.6.0-rc.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -891,7 +891,7 @@ function instanceWatch(source, value, options) {
|
|
|
891
891
|
}
|
|
892
892
|
const prev = setCurrentInstance(this);
|
|
893
893
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
894
|
-
|
|
894
|
+
restoreCurrentInstance(prev);
|
|
895
895
|
return res;
|
|
896
896
|
}
|
|
897
897
|
function createPathGetter(ctx, path) {
|
|
@@ -1350,12 +1350,11 @@ function getInnerChild$1(vnode) {
|
|
|
1350
1350
|
}
|
|
1351
1351
|
}
|
|
1352
1352
|
function setTransitionHooks(vnode, hooks) {
|
|
1353
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
1354
|
-
else {
|
|
1353
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
1355
1354
|
vnode.transition = hooks;
|
|
1356
|
-
setTransitionHooks(vnode.component
|
|
1357
|
-
|
|
1358
|
-
else if (vnode.shapeFlag & 128) {
|
|
1355
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
1356
|
+
else setTransitionHooks(vnode.component.subTree, hooks);
|
|
1357
|
+
} else if (vnode.shapeFlag & 128) {
|
|
1359
1358
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
1360
1359
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
1361
1360
|
} else vnode.transition = hooks;
|
|
@@ -2451,7 +2450,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
2451
2450
|
try {
|
|
2452
2451
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
2453
2452
|
} finally {
|
|
2454
|
-
|
|
2453
|
+
restoreCurrentInstance(prev);
|
|
2455
2454
|
setActiveSub(prevSub);
|
|
2456
2455
|
}
|
|
2457
2456
|
});
|
|
@@ -3908,7 +3907,7 @@ function baseResolveDefault(factory, instance, key) {
|
|
|
3908
3907
|
const prev = setCurrentInstance(instance);
|
|
3909
3908
|
const props = toRaw$1(instance.props);
|
|
3910
3909
|
value = factory.call(null, props);
|
|
3911
|
-
|
|
3910
|
+
restoreCurrentInstance(prev);
|
|
3912
3911
|
return value;
|
|
3913
3912
|
}
|
|
3914
3913
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -4501,7 +4500,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4501
4500
|
};
|
|
4502
4501
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
4503
4502
|
n2.slotScopeIds = slotScopeIds;
|
|
4504
|
-
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent);
|
|
4503
|
+
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
4505
4504
|
else {
|
|
4506
4505
|
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
4507
4506
|
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
@@ -4850,7 +4849,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4850
4849
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
4851
4850
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
4852
4851
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
4853
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
4852
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
4854
4853
|
return;
|
|
4855
4854
|
}
|
|
4856
4855
|
if (shapeFlag & 6) {
|
|
@@ -4906,7 +4905,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4906
4905
|
}
|
|
4907
4906
|
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
4908
4907
|
if (shapeFlag & 256) {
|
|
4909
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
4908
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
4910
4909
|
else parentComponent.ctx.deactivate(vnode);
|
|
4911
4910
|
return;
|
|
4912
4911
|
}
|
|
@@ -4916,7 +4915,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4916
4915
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4917
4916
|
if (shapeFlag & 6) if (isVaporComponent(type)) {
|
|
4918
4917
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
4919
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
4918
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
4920
4919
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
4921
4920
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
4922
4921
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
@@ -4933,7 +4932,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4933
4932
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
4934
4933
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
4935
4934
|
if (type === VaporSlot) {
|
|
4936
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
4935
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
4937
4936
|
return;
|
|
4938
4937
|
}
|
|
4939
4938
|
if (doRemove) remove(vnode);
|
|
@@ -5842,6 +5841,16 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
5842
5841
|
simpleSetCurrentInstance(instance);
|
|
5843
5842
|
}
|
|
5844
5843
|
};
|
|
5844
|
+
/**
|
|
5845
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
5846
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
5847
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
5848
|
+
* @internal
|
|
5849
|
+
*/
|
|
5850
|
+
const restoreCurrentInstance = (prev) => {
|
|
5851
|
+
setCurrentScope(prev[1]);
|
|
5852
|
+
simpleSetCurrentInstance(prev[0]);
|
|
5853
|
+
};
|
|
5845
5854
|
const internalOptions = [
|
|
5846
5855
|
"ce",
|
|
5847
5856
|
"type",
|
|
@@ -6002,7 +6011,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
6002
6011
|
const setupResult = callWithErrorHandling(setup, instance, 0, [!!(process.env.NODE_ENV !== "production") ? shallowReadonly$1(instance.props) : instance.props, setupContext]);
|
|
6003
6012
|
const isAsyncSetup = isPromise(setupResult);
|
|
6004
6013
|
setActiveSub(prevSub);
|
|
6005
|
-
|
|
6014
|
+
restoreCurrentInstance(prev);
|
|
6006
6015
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
6007
6016
|
if (isAsyncSetup) {
|
|
6008
6017
|
const unsetCurrentInstance = () => {
|
|
@@ -6072,7 +6081,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
6072
6081
|
applyOptions(instance);
|
|
6073
6082
|
} finally {
|
|
6074
6083
|
setActiveSub(prevSub);
|
|
6075
|
-
|
|
6084
|
+
restoreCurrentInstance(prevInstance);
|
|
6076
6085
|
}
|
|
6077
6086
|
}
|
|
6078
6087
|
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) if (!compile && Component.template)
|
|
@@ -6392,7 +6401,7 @@ function isMemoSame(cached, memo) {
|
|
|
6392
6401
|
}
|
|
6393
6402
|
//#endregion
|
|
6394
6403
|
//#region packages/runtime-core/src/index.ts
|
|
6395
|
-
const version = "3.6.0-rc.
|
|
6404
|
+
const version = "3.6.0-rc.2";
|
|
6396
6405
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
6397
6406
|
/**
|
|
6398
6407
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -6427,4 +6436,4 @@ const resolveFilter = null;
|
|
|
6427
6436
|
const compatUtils = null;
|
|
6428
6437
|
const DeprecationTypes = null;
|
|
6429
6438
|
//#endregion
|
|
6430
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, TriggerOpTypes, VaporSlot, activate, assertNumber, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureValidVNode, ensureVaporSlotFallback, expose, flushOnAppMount, getAttributeMismatch, getComponentName, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, isAsyncWrapper, isEmitListener, isHydrating, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, normalizeClass, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, useAsyncComponentState, useAttrs, useId, useInstanceOption, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };
|
|
6439
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, TriggerOpTypes, VaporSlot, activate, assertNumber, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureValidVNode, ensureVaporSlotFallback, expose, flushOnAppMount, getAttributeMismatch, getComponentName, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, isAsyncWrapper, isEmitListener, isHydrating, isHydratingEnabled, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, normalizeClass, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, useAsyncComponentState, useAttrs, useId, useInstanceOption, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.6.0-rc.
|
|
3
|
+
"version": "3.6.0-rc.2",
|
|
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.6.0-rc.
|
|
50
|
-
"@vue/reactivity": "3.6.0-rc.
|
|
49
|
+
"@vue/shared": "3.6.0-rc.2",
|
|
50
|
+
"@vue/reactivity": "3.6.0-rc.2"
|
|
51
51
|
}
|
|
52
52
|
}
|