@vue/compat 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/vue-compat.d.ts +4 -4
- package/dist/vue.cjs.js +36 -20
- package/dist/vue.cjs.prod.js +36 -20
- package/dist/vue.esm-browser.js +36 -20
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +40 -21
- package/dist/vue.global.js +36 -20
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +36 -20
- package/dist/vue.runtime.esm-browser.prod.js +6 -6
- package/dist/vue.runtime.esm-bundler.js +40 -21
- package/dist/vue.runtime.global.js +36 -20
- package/dist/vue.runtime.global.prod.js +6 -6
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-rc.
|
|
2
|
+
* @vue/compat v3.6.0-rc.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -3512,7 +3512,7 @@ function instanceWatch(source, value, options) {
|
|
|
3512
3512
|
}
|
|
3513
3513
|
const prev = setCurrentInstance(this);
|
|
3514
3514
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
3515
|
-
|
|
3515
|
+
restoreCurrentInstance(prev);
|
|
3516
3516
|
return res;
|
|
3517
3517
|
}
|
|
3518
3518
|
function createPathGetter(ctx, path) {
|
|
@@ -3971,12 +3971,11 @@ function getInnerChild$1(vnode) {
|
|
|
3971
3971
|
}
|
|
3972
3972
|
}
|
|
3973
3973
|
function setTransitionHooks(vnode, hooks) {
|
|
3974
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
3975
|
-
else {
|
|
3974
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3976
3975
|
vnode.transition = hooks;
|
|
3977
|
-
setTransitionHooks(vnode.component
|
|
3978
|
-
|
|
3979
|
-
else if (vnode.shapeFlag & 128) {
|
|
3976
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
3977
|
+
else setTransitionHooks(vnode.component.subTree, hooks);
|
|
3978
|
+
} else if (vnode.shapeFlag & 128) {
|
|
3980
3979
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
3981
3980
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
3982
3981
|
} else vnode.transition = hooks;
|
|
@@ -5044,7 +5043,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
5044
5043
|
try {
|
|
5045
5044
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
5046
5045
|
} finally {
|
|
5047
|
-
|
|
5046
|
+
restoreCurrentInstance(prev);
|
|
5048
5047
|
setActiveSub(prevSub);
|
|
5049
5048
|
}
|
|
5050
5049
|
});
|
|
@@ -6339,7 +6338,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6339
6338
|
if (options.el) return vm.$mount(options.el);
|
|
6340
6339
|
else return vm;
|
|
6341
6340
|
}
|
|
6342
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6341
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.2`;
|
|
6343
6342
|
Vue.config = singletonApp.config;
|
|
6344
6343
|
Vue.use = (plugin, ...options) => {
|
|
6345
6344
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -7332,7 +7331,7 @@ function baseResolveDefault(factory, instance, key) {
|
|
|
7332
7331
|
const prev = setCurrentInstance(instance);
|
|
7333
7332
|
const props = /* @__PURE__ */ toRaw(instance.props);
|
|
7334
7333
|
value = factory.call(isCompatEnabled$1("PROPS_DEFAULT_THIS", instance) ? createPropsDefaultThis(instance, props, key) : null, props);
|
|
7335
|
-
|
|
7334
|
+
restoreCurrentInstance(prev);
|
|
7336
7335
|
return value;
|
|
7337
7336
|
}
|
|
7338
7337
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -7893,7 +7892,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7893
7892
|
};
|
|
7894
7893
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
7895
7894
|
n2.slotScopeIds = slotScopeIds;
|
|
7896
|
-
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent);
|
|
7895
|
+
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
7897
7896
|
else {
|
|
7898
7897
|
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
7899
7898
|
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
@@ -8246,7 +8245,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8246
8245
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
8247
8246
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
8248
8247
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
8249
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
8248
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
8250
8249
|
return;
|
|
8251
8250
|
}
|
|
8252
8251
|
if (shapeFlag & 6) {
|
|
@@ -8302,7 +8301,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8302
8301
|
}
|
|
8303
8302
|
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8304
8303
|
if (shapeFlag & 256) {
|
|
8305
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
8304
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8306
8305
|
else parentComponent.ctx.deactivate(vnode);
|
|
8307
8306
|
return;
|
|
8308
8307
|
}
|
|
@@ -8312,7 +8311,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8312
8311
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8313
8312
|
if (shapeFlag & 6) if (isVaporComponent(type)) {
|
|
8314
8313
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
8315
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8314
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8316
8315
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
8317
8316
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8318
8317
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
@@ -8329,7 +8328,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8329
8328
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
8330
8329
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
8331
8330
|
if (type === VaporSlot) {
|
|
8332
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8331
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8333
8332
|
return;
|
|
8334
8333
|
}
|
|
8335
8334
|
if (doRemove) remove(vnode);
|
|
@@ -9273,6 +9272,16 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
9273
9272
|
simpleSetCurrentInstance(instance);
|
|
9274
9273
|
}
|
|
9275
9274
|
};
|
|
9275
|
+
/**
|
|
9276
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
9277
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
9278
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
9279
|
+
* @internal
|
|
9280
|
+
*/
|
|
9281
|
+
const restoreCurrentInstance = (prev) => {
|
|
9282
|
+
setCurrentScope(prev[1]);
|
|
9283
|
+
simpleSetCurrentInstance(prev[0]);
|
|
9284
|
+
};
|
|
9276
9285
|
const internalOptions = [
|
|
9277
9286
|
"ce",
|
|
9278
9287
|
"type",
|
|
@@ -9424,7 +9433,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
9424
9433
|
const setupResult = callWithErrorHandling(setup, instance, 0, [/* @__PURE__ */ shallowReadonly(instance.props), setupContext]);
|
|
9425
9434
|
const isAsyncSetup = isPromise(setupResult);
|
|
9426
9435
|
setActiveSub(prevSub);
|
|
9427
|
-
|
|
9436
|
+
restoreCurrentInstance(prev);
|
|
9428
9437
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
9429
9438
|
if (isAsyncSetup) {
|
|
9430
9439
|
const unsetCurrentInstance = () => {
|
|
@@ -9497,7 +9506,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
9497
9506
|
applyOptions(instance);
|
|
9498
9507
|
} finally {
|
|
9499
9508
|
setActiveSub(prevSub);
|
|
9500
|
-
|
|
9509
|
+
restoreCurrentInstance(prevInstance);
|
|
9501
9510
|
}
|
|
9502
9511
|
}
|
|
9503
9512
|
if (!Component.render && instance.render === NOOP && !isSSR) if (!compile$1 && Component.template)
|
|
@@ -9807,7 +9816,7 @@ function isMemoSame(cached, memo) {
|
|
|
9807
9816
|
}
|
|
9808
9817
|
//#endregion
|
|
9809
9818
|
//#region packages/runtime-core/src/index.ts
|
|
9810
|
-
const version = "3.6.0-rc.
|
|
9819
|
+
const version = "3.6.0-rc.2";
|
|
9811
9820
|
const warn = warn$1;
|
|
9812
9821
|
/**
|
|
9813
9822
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -13739,7 +13748,7 @@ function getSelfName(filename) {
|
|
|
13739
13748
|
const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
|
|
13740
13749
|
return nameMatch ? capitalize(camelize(nameMatch[1])) : null;
|
|
13741
13750
|
}
|
|
13742
|
-
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false,
|
|
13751
|
+
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
|
|
13743
13752
|
const context = {
|
|
13744
13753
|
filename,
|
|
13745
13754
|
selfName: getSelfName(filename),
|
|
@@ -13761,7 +13770,6 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
13761
13770
|
bindingMetadata,
|
|
13762
13771
|
inline,
|
|
13763
13772
|
isTS,
|
|
13764
|
-
eventDelegation,
|
|
13765
13773
|
onError,
|
|
13766
13774
|
onWarn,
|
|
13767
13775
|
compatConfig,
|
|
@@ -15683,6 +15691,14 @@ const resolveModifiers = (key, modifiers, context, loc) => {
|
|
|
15683
15691
|
const eventOptionModifiers = [];
|
|
15684
15692
|
for (let i = 0; i < modifiers.length; i++) {
|
|
15685
15693
|
const modifier = modifiers[i].content;
|
|
15694
|
+
if (modifier === "delegate") {
|
|
15695
|
+
if (context) {
|
|
15696
|
+
const error = /* @__PURE__ */ new SyntaxError(`.delegate modifier is only supported in Vapor components.`);
|
|
15697
|
+
error.loc = modifiers[i].loc;
|
|
15698
|
+
context.onWarn(error);
|
|
15699
|
+
}
|
|
15700
|
+
continue;
|
|
15701
|
+
}
|
|
15686
15702
|
if (modifier === "native" && context && checkCompatEnabled("COMPILER_V_ON_NATIVE", context, loc)) eventOptionModifiers.push(modifier);
|
|
15687
15703
|
else if (isEventOptionModifier(modifier)) eventOptionModifiers.push(modifier);
|
|
15688
15704
|
else {
|