@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
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -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
|
**/
|
|
@@ -3071,7 +3071,7 @@ function instanceWatch(source, value, options) {
|
|
|
3071
3071
|
}
|
|
3072
3072
|
const prev = setCurrentInstance(this);
|
|
3073
3073
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
3074
|
-
|
|
3074
|
+
restoreCurrentInstance(prev);
|
|
3075
3075
|
return res;
|
|
3076
3076
|
}
|
|
3077
3077
|
function createPathGetter(ctx, path) {
|
|
@@ -3529,12 +3529,11 @@ function getInnerChild$1(vnode) {
|
|
|
3529
3529
|
}
|
|
3530
3530
|
}
|
|
3531
3531
|
function setTransitionHooks(vnode, hooks) {
|
|
3532
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
3533
|
-
else {
|
|
3532
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3534
3533
|
vnode.transition = hooks;
|
|
3535
|
-
setTransitionHooks(vnode.component
|
|
3536
|
-
|
|
3537
|
-
else if (vnode.shapeFlag & 128) {
|
|
3534
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
3535
|
+
else setTransitionHooks(vnode.component.subTree, hooks);
|
|
3536
|
+
} else if (vnode.shapeFlag & 128) {
|
|
3538
3537
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
3539
3538
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
3540
3539
|
} else vnode.transition = hooks;
|
|
@@ -4597,7 +4596,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
4597
4596
|
try {
|
|
4598
4597
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
4599
4598
|
} finally {
|
|
4600
|
-
|
|
4599
|
+
restoreCurrentInstance(prev);
|
|
4601
4600
|
setActiveSub(prevSub);
|
|
4602
4601
|
}
|
|
4603
4602
|
});
|
|
@@ -6042,7 +6041,7 @@ function baseResolveDefault(factory, instance, key) {
|
|
|
6042
6041
|
const prev = setCurrentInstance(instance);
|
|
6043
6042
|
const props = /* @__PURE__ */ toRaw(instance.props);
|
|
6044
6043
|
value = factory.call(null, props);
|
|
6045
|
-
|
|
6044
|
+
restoreCurrentInstance(prev);
|
|
6046
6045
|
return value;
|
|
6047
6046
|
}
|
|
6048
6047
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -6602,7 +6601,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6602
6601
|
};
|
|
6603
6602
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
6604
6603
|
n2.slotScopeIds = slotScopeIds;
|
|
6605
|
-
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent);
|
|
6604
|
+
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
6606
6605
|
else {
|
|
6607
6606
|
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
6608
6607
|
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
@@ -6945,7 +6944,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6945
6944
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
6946
6945
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
6947
6946
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
6948
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
6947
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
6949
6948
|
return;
|
|
6950
6949
|
}
|
|
6951
6950
|
if (shapeFlag & 6) {
|
|
@@ -7001,7 +7000,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7001
7000
|
}
|
|
7002
7001
|
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
7003
7002
|
if (shapeFlag & 256) {
|
|
7004
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
7003
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
7005
7004
|
else parentComponent.ctx.deactivate(vnode);
|
|
7006
7005
|
return;
|
|
7007
7006
|
}
|
|
@@ -7011,7 +7010,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7011
7010
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7012
7011
|
if (shapeFlag & 6) if (isVaporComponent(type)) {
|
|
7013
7012
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
7014
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
7013
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
7015
7014
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
7016
7015
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
7017
7016
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
@@ -7028,7 +7027,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7028
7027
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
7029
7028
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
7030
7029
|
if (type === VaporSlot) {
|
|
7031
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
7030
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
7032
7031
|
return;
|
|
7033
7032
|
}
|
|
7034
7033
|
if (doRemove) remove(vnode);
|
|
@@ -7926,6 +7925,16 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
7926
7925
|
simpleSetCurrentInstance(instance);
|
|
7927
7926
|
}
|
|
7928
7927
|
};
|
|
7928
|
+
/**
|
|
7929
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
7930
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
7931
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
7932
|
+
* @internal
|
|
7933
|
+
*/
|
|
7934
|
+
const restoreCurrentInstance = (prev) => {
|
|
7935
|
+
setCurrentScope(prev[1]);
|
|
7936
|
+
simpleSetCurrentInstance(prev[0]);
|
|
7937
|
+
};
|
|
7929
7938
|
const internalOptions = [
|
|
7930
7939
|
"ce",
|
|
7931
7940
|
"type",
|
|
@@ -8077,7 +8086,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
8077
8086
|
const setupResult = callWithErrorHandling(setup, instance, 0, [/* @__PURE__ */ shallowReadonly(instance.props), setupContext]);
|
|
8078
8087
|
const isAsyncSetup = isPromise(setupResult);
|
|
8079
8088
|
setActiveSub(prevSub);
|
|
8080
|
-
|
|
8089
|
+
restoreCurrentInstance(prev);
|
|
8081
8090
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
8082
8091
|
if (isAsyncSetup) {
|
|
8083
8092
|
const unsetCurrentInstance = () => {
|
|
@@ -8146,7 +8155,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
8146
8155
|
applyOptions(instance);
|
|
8147
8156
|
} finally {
|
|
8148
8157
|
setActiveSub(prevSub);
|
|
8149
|
-
|
|
8158
|
+
restoreCurrentInstance(prevInstance);
|
|
8150
8159
|
}
|
|
8151
8160
|
}
|
|
8152
8161
|
if (!Component.render && instance.render === NOOP && !isSSR) if (!compile && Component.template)
|
|
@@ -8456,7 +8465,7 @@ function isMemoSame(cached, memo) {
|
|
|
8456
8465
|
}
|
|
8457
8466
|
//#endregion
|
|
8458
8467
|
//#region packages/runtime-core/src/index.ts
|
|
8459
|
-
const version = "3.6.0-rc.
|
|
8468
|
+
const version = "3.6.0-rc.2";
|
|
8460
8469
|
const warn = warn$1;
|
|
8461
8470
|
/**
|
|
8462
8471
|
* Runtime error messages. Only exposed in dev or esm builds.
|