@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
package/dist/vue-compat.d.ts
CHANGED
|
@@ -1017,13 +1017,13 @@ interface AppConfig extends GenericAppConfig {
|
|
|
1017
1017
|
interface VaporInteropInterface {
|
|
1018
1018
|
mount(vnode: VNode, container: any, anchor: any, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, onBeforeMount?: () => void, onVnodeBeforeMount?: () => void): GenericComponentInstance;
|
|
1019
1019
|
update(n1: VNode, n2: VNode, shouldUpdate: boolean, onBeforeUpdate?: () => void, onVnodeBeforeUpdate?: () => void): void;
|
|
1020
|
-
unmount(vnode: VNode, doRemove
|
|
1021
|
-
move(vnode: VNode, container: any, anchor: any, moveType: MoveType): void;
|
|
1020
|
+
unmount(vnode: VNode, doRemove: boolean | undefined, parentSuspense: SuspenseBoundary | null): void;
|
|
1021
|
+
move(vnode: VNode, container: any, anchor: any, moveType: MoveType, parentSuspense: SuspenseBoundary | null): void;
|
|
1022
1022
|
slot(n1: VNode | null, n2: VNode, container: any, anchor: any, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null): void;
|
|
1023
1023
|
hydrate(vnode: VNode, node: any, container: any, anchor: any, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, onBeforeMount?: () => void, onVnodeBeforeMount?: () => void): Node;
|
|
1024
1024
|
hydrateSlot(vnode: VNode, node: any, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null): Node;
|
|
1025
|
-
activate(vnode: VNode, container: any, anchor: any, parentComponent: ComponentInternalInstance): void;
|
|
1026
|
-
deactivate(vnode: VNode, container: any): void;
|
|
1025
|
+
activate(vnode: VNode, container: any, anchor: any, parentComponent: ComponentInternalInstance, parentSuspense: SuspenseBoundary | null): void;
|
|
1026
|
+
deactivate(vnode: VNode, container: any, parentSuspense: SuspenseBoundary | null): void;
|
|
1027
1027
|
setTransitionHooks(component: ComponentInternalInstance, transition: TransitionHooks): void;
|
|
1028
1028
|
vdomMount: (component: ConcreteComponent, parentComponent: any, props?: any, slots?: any, once?: boolean) => any;
|
|
1029
1029
|
vdomUnmount: UnmountComponentFn;
|
package/dist/vue.cjs.js
CHANGED
|
@@ -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
|
**/
|
|
@@ -3575,7 +3575,7 @@ function instanceWatch(source, value, options) {
|
|
|
3575
3575
|
}
|
|
3576
3576
|
const prev = setCurrentInstance(this);
|
|
3577
3577
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
3578
|
-
|
|
3578
|
+
restoreCurrentInstance(prev);
|
|
3579
3579
|
return res;
|
|
3580
3580
|
}
|
|
3581
3581
|
function createPathGetter(ctx, path) {
|
|
@@ -4034,12 +4034,11 @@ function getInnerChild$1(vnode) {
|
|
|
4034
4034
|
}
|
|
4035
4035
|
}
|
|
4036
4036
|
function setTransitionHooks(vnode, hooks) {
|
|
4037
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
4038
|
-
else {
|
|
4037
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
4039
4038
|
vnode.transition = hooks;
|
|
4040
|
-
setTransitionHooks(vnode.component
|
|
4041
|
-
|
|
4042
|
-
else if (vnode.shapeFlag & 128) {
|
|
4039
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
4040
|
+
else setTransitionHooks(vnode.component.subTree, hooks);
|
|
4041
|
+
} else if (vnode.shapeFlag & 128) {
|
|
4043
4042
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4044
4043
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4045
4044
|
} else vnode.transition = hooks;
|
|
@@ -5111,7 +5110,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
5111
5110
|
try {
|
|
5112
5111
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
5113
5112
|
} finally {
|
|
5114
|
-
|
|
5113
|
+
restoreCurrentInstance(prev);
|
|
5115
5114
|
setActiveSub(prevSub);
|
|
5116
5115
|
}
|
|
5117
5116
|
});
|
|
@@ -6407,7 +6406,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6407
6406
|
if (options.el) return vm.$mount(options.el);
|
|
6408
6407
|
else return vm;
|
|
6409
6408
|
}
|
|
6410
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6409
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.2`;
|
|
6411
6410
|
Vue.config = singletonApp.config;
|
|
6412
6411
|
Vue.use = (plugin, ...options) => {
|
|
6413
6412
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -7400,7 +7399,7 @@ function baseResolveDefault(factory, instance, key) {
|
|
|
7400
7399
|
const prev = setCurrentInstance(instance);
|
|
7401
7400
|
const props = /* @__PURE__ */ toRaw(instance.props);
|
|
7402
7401
|
value = factory.call(isCompatEnabled$1("PROPS_DEFAULT_THIS", instance) ? createPropsDefaultThis(instance, props, key) : null, props);
|
|
7403
|
-
|
|
7402
|
+
restoreCurrentInstance(prev);
|
|
7404
7403
|
return value;
|
|
7405
7404
|
}
|
|
7406
7405
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -7961,7 +7960,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7961
7960
|
};
|
|
7962
7961
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
7963
7962
|
n2.slotScopeIds = slotScopeIds;
|
|
7964
|
-
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent);
|
|
7963
|
+
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
7965
7964
|
else {
|
|
7966
7965
|
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
7967
7966
|
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
@@ -8314,7 +8313,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8314
8313
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
8315
8314
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
8316
8315
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
8317
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
8316
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
8318
8317
|
return;
|
|
8319
8318
|
}
|
|
8320
8319
|
if (shapeFlag & 6) {
|
|
@@ -8370,7 +8369,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8370
8369
|
}
|
|
8371
8370
|
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8372
8371
|
if (shapeFlag & 256) {
|
|
8373
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
8372
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8374
8373
|
else parentComponent.ctx.deactivate(vnode);
|
|
8375
8374
|
return;
|
|
8376
8375
|
}
|
|
@@ -8380,7 +8379,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8380
8379
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8381
8380
|
if (shapeFlag & 6) if (isVaporComponent(type)) {
|
|
8382
8381
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
8383
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8382
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8384
8383
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
8385
8384
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8386
8385
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
@@ -8397,7 +8396,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8397
8396
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
8398
8397
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
8399
8398
|
if (type === VaporSlot) {
|
|
8400
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8399
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8401
8400
|
return;
|
|
8402
8401
|
}
|
|
8403
8402
|
if (doRemove) remove(vnode);
|
|
@@ -9350,6 +9349,16 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
9350
9349
|
simpleSetCurrentInstance(instance);
|
|
9351
9350
|
}
|
|
9352
9351
|
};
|
|
9352
|
+
/**
|
|
9353
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
9354
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
9355
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
9356
|
+
* @internal
|
|
9357
|
+
*/
|
|
9358
|
+
const restoreCurrentInstance = (prev) => {
|
|
9359
|
+
setCurrentScope(prev[1]);
|
|
9360
|
+
simpleSetCurrentInstance(prev[0]);
|
|
9361
|
+
};
|
|
9353
9362
|
const internalOptions = [
|
|
9354
9363
|
"ce",
|
|
9355
9364
|
"type",
|
|
@@ -9501,7 +9510,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
9501
9510
|
const setupResult = callWithErrorHandling(setup, instance, 0, [/* @__PURE__ */ shallowReadonly(instance.props), setupContext]);
|
|
9502
9511
|
const isAsyncSetup = isPromise(setupResult);
|
|
9503
9512
|
setActiveSub(prevSub);
|
|
9504
|
-
|
|
9513
|
+
restoreCurrentInstance(prev);
|
|
9505
9514
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
9506
9515
|
if (isAsyncSetup) {
|
|
9507
9516
|
const unsetCurrentInstance = () => {
|
|
@@ -9575,7 +9584,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
9575
9584
|
applyOptions(instance);
|
|
9576
9585
|
} finally {
|
|
9577
9586
|
setActiveSub(prevSub);
|
|
9578
|
-
|
|
9587
|
+
restoreCurrentInstance(prevInstance);
|
|
9579
9588
|
}
|
|
9580
9589
|
}
|
|
9581
9590
|
if (!Component.render && instance.render === NOOP && !isSSR) if (!compile$1 && Component.template)
|
|
@@ -9885,7 +9894,7 @@ function isMemoSame(cached, memo) {
|
|
|
9885
9894
|
}
|
|
9886
9895
|
//#endregion
|
|
9887
9896
|
//#region packages/runtime-core/src/index.ts
|
|
9888
|
-
const version = "3.6.0-rc.
|
|
9897
|
+
const version = "3.6.0-rc.2";
|
|
9889
9898
|
const warn = warn$1;
|
|
9890
9899
|
/**
|
|
9891
9900
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -14521,7 +14530,7 @@ function getSelfName(filename) {
|
|
|
14521
14530
|
const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
|
|
14522
14531
|
return nameMatch ? capitalize(camelize(nameMatch[1])) : null;
|
|
14523
14532
|
}
|
|
14524
|
-
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,
|
|
14533
|
+
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 }) {
|
|
14525
14534
|
const context = {
|
|
14526
14535
|
filename,
|
|
14527
14536
|
selfName: getSelfName(filename),
|
|
@@ -14543,7 +14552,6 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
14543
14552
|
bindingMetadata,
|
|
14544
14553
|
inline,
|
|
14545
14554
|
isTS,
|
|
14546
|
-
eventDelegation,
|
|
14547
14555
|
onError,
|
|
14548
14556
|
onWarn,
|
|
14549
14557
|
compatConfig,
|
|
@@ -16848,6 +16856,14 @@ const resolveModifiers = (key, modifiers, context, loc) => {
|
|
|
16848
16856
|
const eventOptionModifiers = [];
|
|
16849
16857
|
for (let i = 0; i < modifiers.length; i++) {
|
|
16850
16858
|
const modifier = modifiers[i].content;
|
|
16859
|
+
if (modifier === "delegate") {
|
|
16860
|
+
if (context) {
|
|
16861
|
+
const error = /* @__PURE__ */ new SyntaxError(`.delegate modifier is only supported in Vapor components.`);
|
|
16862
|
+
error.loc = modifiers[i].loc;
|
|
16863
|
+
context.onWarn(error);
|
|
16864
|
+
}
|
|
16865
|
+
continue;
|
|
16866
|
+
}
|
|
16851
16867
|
if (modifier === "native" && context && checkCompatEnabled("COMPILER_V_ON_NATIVE", context, loc)) eventOptionModifiers.push(modifier);
|
|
16852
16868
|
else if (isEventOptionModifier(modifier)) eventOptionModifiers.push(modifier);
|
|
16853
16869
|
else {
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -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
|
**/
|
|
@@ -2815,7 +2815,7 @@ function instanceWatch(source, value, options) {
|
|
|
2815
2815
|
}
|
|
2816
2816
|
const prev = setCurrentInstance(this);
|
|
2817
2817
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
2818
|
-
|
|
2818
|
+
restoreCurrentInstance(prev);
|
|
2819
2819
|
return res;
|
|
2820
2820
|
}
|
|
2821
2821
|
function createPathGetter(ctx, path) {
|
|
@@ -3255,12 +3255,11 @@ function getInnerChild$1(vnode) {
|
|
|
3255
3255
|
}
|
|
3256
3256
|
}
|
|
3257
3257
|
function setTransitionHooks(vnode, hooks) {
|
|
3258
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
3259
|
-
else {
|
|
3258
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3260
3259
|
vnode.transition = hooks;
|
|
3261
|
-
setTransitionHooks(vnode.component
|
|
3262
|
-
|
|
3263
|
-
else if (vnode.shapeFlag & 128) {
|
|
3260
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
3261
|
+
else setTransitionHooks(vnode.component.subTree, hooks);
|
|
3262
|
+
} else if (vnode.shapeFlag & 128) {
|
|
3264
3263
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
3265
3264
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
3266
3265
|
} else vnode.transition = hooks;
|
|
@@ -4181,7 +4180,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
4181
4180
|
try {
|
|
4182
4181
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
4183
4182
|
} finally {
|
|
4184
|
-
|
|
4183
|
+
restoreCurrentInstance(prev);
|
|
4185
4184
|
setActiveSub(prevSub);
|
|
4186
4185
|
}
|
|
4187
4186
|
});
|
|
@@ -5303,7 +5302,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5303
5302
|
if (options.el) return vm.$mount(options.el);
|
|
5304
5303
|
else return vm;
|
|
5305
5304
|
}
|
|
5306
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
5305
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.2`;
|
|
5307
5306
|
Vue.config = singletonApp.config;
|
|
5308
5307
|
Vue.use = (plugin, ...options) => {
|
|
5309
5308
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -6131,7 +6130,7 @@ function baseResolveDefault(factory, instance, key) {
|
|
|
6131
6130
|
const prev = setCurrentInstance(instance);
|
|
6132
6131
|
const props = /* @__PURE__ */ toRaw(instance.props);
|
|
6133
6132
|
value = factory.call(isCompatEnabled$1("PROPS_DEFAULT_THIS", instance) ? createPropsDefaultThis(instance, props, key) : null, props);
|
|
6134
|
-
|
|
6133
|
+
restoreCurrentInstance(prev);
|
|
6135
6134
|
return value;
|
|
6136
6135
|
}
|
|
6137
6136
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -6503,7 +6502,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6503
6502
|
};
|
|
6504
6503
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
6505
6504
|
n2.slotScopeIds = slotScopeIds;
|
|
6506
|
-
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent);
|
|
6505
|
+
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
6507
6506
|
else {
|
|
6508
6507
|
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
6509
6508
|
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
@@ -6821,7 +6820,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6821
6820
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
6822
6821
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
6823
6822
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
6824
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
6823
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
6825
6824
|
return;
|
|
6826
6825
|
}
|
|
6827
6826
|
if (shapeFlag & 6) {
|
|
@@ -6877,7 +6876,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6877
6876
|
}
|
|
6878
6877
|
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
6879
6878
|
if (shapeFlag & 256) {
|
|
6880
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
6879
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
6881
6880
|
else parentComponent.ctx.deactivate(vnode);
|
|
6882
6881
|
return;
|
|
6883
6882
|
}
|
|
@@ -6887,7 +6886,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6887
6886
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
6888
6887
|
if (shapeFlag & 6) if (isVaporComponent(type)) {
|
|
6889
6888
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
6890
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
6889
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
6891
6890
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
6892
6891
|
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
6893
6892
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
@@ -6904,7 +6903,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6904
6903
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
6905
6904
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
6906
6905
|
if (type === VaporSlot) {
|
|
6907
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
6906
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
6908
6907
|
return;
|
|
6909
6908
|
}
|
|
6910
6909
|
if (doRemove) remove(vnode);
|
|
@@ -7797,6 +7796,16 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
7797
7796
|
simpleSetCurrentInstance(instance);
|
|
7798
7797
|
}
|
|
7799
7798
|
};
|
|
7799
|
+
/**
|
|
7800
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
7801
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
7802
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
7803
|
+
* @internal
|
|
7804
|
+
*/
|
|
7805
|
+
const restoreCurrentInstance = (prev) => {
|
|
7806
|
+
setCurrentScope(prev[1]);
|
|
7807
|
+
simpleSetCurrentInstance(prev[0]);
|
|
7808
|
+
};
|
|
7800
7809
|
const internalOptions = [
|
|
7801
7810
|
"ce",
|
|
7802
7811
|
"type",
|
|
@@ -7925,7 +7934,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
7925
7934
|
const setupResult = callWithErrorHandling(setup, instance, 0, [instance.props, setupContext]);
|
|
7926
7935
|
const isAsyncSetup = isPromise(setupResult);
|
|
7927
7936
|
setActiveSub(prevSub);
|
|
7928
|
-
|
|
7937
|
+
restoreCurrentInstance(prev);
|
|
7929
7938
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
7930
7939
|
if (isAsyncSetup) {
|
|
7931
7940
|
const unsetCurrentInstance = () => {
|
|
@@ -7988,7 +7997,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
7988
7997
|
applyOptions(instance);
|
|
7989
7998
|
} finally {
|
|
7990
7999
|
setActiveSub(prevSub);
|
|
7991
|
-
|
|
8000
|
+
restoreCurrentInstance(prevInstance);
|
|
7992
8001
|
}
|
|
7993
8002
|
}
|
|
7994
8003
|
}
|
|
@@ -8086,7 +8095,7 @@ function isMemoSame(cached, memo) {
|
|
|
8086
8095
|
}
|
|
8087
8096
|
//#endregion
|
|
8088
8097
|
//#region packages/runtime-core/src/index.ts
|
|
8089
|
-
const version = "3.6.0-rc.
|
|
8098
|
+
const version = "3.6.0-rc.2";
|
|
8090
8099
|
const warn = NOOP;
|
|
8091
8100
|
/**
|
|
8092
8101
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -12546,7 +12555,7 @@ function getSelfName(filename) {
|
|
|
12546
12555
|
const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
|
|
12547
12556
|
return nameMatch ? capitalize(camelize(nameMatch[1])) : null;
|
|
12548
12557
|
}
|
|
12549
|
-
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,
|
|
12558
|
+
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 }) {
|
|
12550
12559
|
const context = {
|
|
12551
12560
|
filename,
|
|
12552
12561
|
selfName: getSelfName(filename),
|
|
@@ -12568,7 +12577,6 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
12568
12577
|
bindingMetadata,
|
|
12569
12578
|
inline,
|
|
12570
12579
|
isTS,
|
|
12571
|
-
eventDelegation,
|
|
12572
12580
|
onError,
|
|
12573
12581
|
onWarn,
|
|
12574
12582
|
compatConfig,
|
|
@@ -14830,6 +14838,14 @@ const resolveModifiers = (key, modifiers, context, loc) => {
|
|
|
14830
14838
|
const eventOptionModifiers = [];
|
|
14831
14839
|
for (let i = 0; i < modifiers.length; i++) {
|
|
14832
14840
|
const modifier = modifiers[i].content;
|
|
14841
|
+
if (modifier === "delegate") {
|
|
14842
|
+
if (context) {
|
|
14843
|
+
const error = /* @__PURE__ */ new SyntaxError(`.delegate modifier is only supported in Vapor components.`);
|
|
14844
|
+
error.loc = modifiers[i].loc;
|
|
14845
|
+
context.onWarn(error);
|
|
14846
|
+
}
|
|
14847
|
+
continue;
|
|
14848
|
+
}
|
|
14833
14849
|
if (modifier === "native" && context && checkCompatEnabled("COMPILER_V_ON_NATIVE", context, loc)) eventOptionModifiers.push(modifier);
|
|
14834
14850
|
else if (isEventOptionModifier(modifier)) eventOptionModifiers.push(modifier);
|
|
14835
14851
|
else {
|
package/dist/vue.esm-browser.js
CHANGED
|
@@ -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 {
|