@vue/runtime-dom 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-dom.cjs.js +1 -1
- package/dist/runtime-dom.cjs.prod.js +1 -1
- package/dist/runtime-dom.esm-browser.js +26 -17
- package/dist/runtime-dom.esm-browser.prod.js +3 -3
- package/dist/runtime-dom.esm-bundler.js +1 -1
- package/dist/runtime-dom.global.js +26 -17
- package/dist/runtime-dom.global.prod.js +3 -3
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-rc.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-rc.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -3069,7 +3069,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3069
3069
|
}
|
|
3070
3070
|
const prev = setCurrentInstance(this);
|
|
3071
3071
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
3072
|
-
|
|
3072
|
+
restoreCurrentInstance(prev);
|
|
3073
3073
|
return res;
|
|
3074
3074
|
}
|
|
3075
3075
|
function createPathGetter(ctx, path) {
|
|
@@ -3527,12 +3527,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3527
3527
|
}
|
|
3528
3528
|
}
|
|
3529
3529
|
function setTransitionHooks(vnode, hooks) {
|
|
3530
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
3531
|
-
else {
|
|
3530
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3532
3531
|
vnode.transition = hooks;
|
|
3533
|
-
setTransitionHooks(vnode.component
|
|
3534
|
-
|
|
3535
|
-
else if (vnode.shapeFlag & 128) {
|
|
3532
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
3533
|
+
else setTransitionHooks(vnode.component.subTree, hooks);
|
|
3534
|
+
} else if (vnode.shapeFlag & 128) {
|
|
3536
3535
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
3537
3536
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
3538
3537
|
} else vnode.transition = hooks;
|
|
@@ -4595,7 +4594,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4595
4594
|
try {
|
|
4596
4595
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
4597
4596
|
} finally {
|
|
4598
|
-
|
|
4597
|
+
restoreCurrentInstance(prev);
|
|
4599
4598
|
setActiveSub(prevSub);
|
|
4600
4599
|
}
|
|
4601
4600
|
});
|
|
@@ -6040,7 +6039,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6040
6039
|
const prev = setCurrentInstance(instance);
|
|
6041
6040
|
const props = /* @__PURE__ */ toRaw(instance.props);
|
|
6042
6041
|
value = factory.call(null, props);
|
|
6043
|
-
|
|
6042
|
+
restoreCurrentInstance(prev);
|
|
6044
6043
|
return value;
|
|
6045
6044
|
}
|
|
6046
6045
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -6600,7 +6599,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6600
6599
|
};
|
|
6601
6600
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
6602
6601
|
n2.slotScopeIds = slotScopeIds;
|
|
6603
|
-
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent);
|
|
6602
|
+
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
6604
6603
|
else {
|
|
6605
6604
|
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
6606
6605
|
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
@@ -6943,7 +6942,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6943
6942
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
6944
6943
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
6945
6944
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
6946
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
6945
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
6947
6946
|
return;
|
|
6948
6947
|
}
|
|
6949
6948
|
if (shapeFlag & 6) {
|
|
@@ -6999,7 +6998,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6999
6998
|
}
|
|
7000
6999
|
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
7001
7000
|
if (shapeFlag & 256) {
|
|
7002
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
7001
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
7003
7002
|
else parentComponent.ctx.deactivate(vnode);
|
|
7004
7003
|
return;
|
|
7005
7004
|
}
|
|
@@ -7009,7 +7008,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7009
7008
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7010
7009
|
if (shapeFlag & 6) if (isVaporComponent(type)) {
|
|
7011
7010
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
7012
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
7011
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
7013
7012
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
7014
7013
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
7015
7014
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
@@ -7026,7 +7025,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7026
7025
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
7027
7026
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
7028
7027
|
if (type === VaporSlot) {
|
|
7029
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
7028
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
7030
7029
|
return;
|
|
7031
7030
|
}
|
|
7032
7031
|
if (doRemove) remove(vnode);
|
|
@@ -7924,6 +7923,16 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7924
7923
|
simpleSetCurrentInstance(instance);
|
|
7925
7924
|
}
|
|
7926
7925
|
};
|
|
7926
|
+
/**
|
|
7927
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
7928
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
7929
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
7930
|
+
* @internal
|
|
7931
|
+
*/
|
|
7932
|
+
const restoreCurrentInstance = (prev) => {
|
|
7933
|
+
setCurrentScope(prev[1]);
|
|
7934
|
+
simpleSetCurrentInstance(prev[0]);
|
|
7935
|
+
};
|
|
7927
7936
|
const internalOptions = [
|
|
7928
7937
|
"ce",
|
|
7929
7938
|
"type",
|
|
@@ -8075,7 +8084,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8075
8084
|
const setupResult = callWithErrorHandling(setup, instance, 0, [/* @__PURE__ */ shallowReadonly(instance.props), setupContext]);
|
|
8076
8085
|
const isAsyncSetup = isPromise(setupResult);
|
|
8077
8086
|
setActiveSub(prevSub);
|
|
8078
|
-
|
|
8087
|
+
restoreCurrentInstance(prev);
|
|
8079
8088
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
8080
8089
|
if (isAsyncSetup) {
|
|
8081
8090
|
const unsetCurrentInstance = () => {
|
|
@@ -8144,7 +8153,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8144
8153
|
applyOptions(instance);
|
|
8145
8154
|
} finally {
|
|
8146
8155
|
setActiveSub(prevSub);
|
|
8147
|
-
|
|
8156
|
+
restoreCurrentInstance(prevInstance);
|
|
8148
8157
|
}
|
|
8149
8158
|
}
|
|
8150
8159
|
if (!Component.render && instance.render === NOOP && !isSSR) if (!compile && Component.template)
|
|
@@ -8454,7 +8463,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8454
8463
|
}
|
|
8455
8464
|
//#endregion
|
|
8456
8465
|
//#region packages/runtime-core/src/index.ts
|
|
8457
|
-
const version = "3.6.0-rc.
|
|
8466
|
+
const version = "3.6.0-rc.2";
|
|
8458
8467
|
const warn = warn$1;
|
|
8459
8468
|
/**
|
|
8460
8469
|
* Runtime error messages. Only exposed in dev or esm builds.
|