@vue/compat 3.6.0-beta.6 → 3.6.0-beta.7

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.
@@ -179,7 +179,7 @@ declare class ComputedRefImpl<T = any> implements ReactiveNode {
179
179
  /**
180
180
  * @internal
181
181
  */
182
- readonly __v_isRef: true;
182
+ readonly __v_isRef = true;
183
183
  /**
184
184
  * @internal
185
185
  */
@@ -1013,7 +1013,7 @@ interface VaporInteropInterface {
1013
1013
  update(n1: VNode, n2: VNode, shouldUpdate: boolean, onBeforeUpdate?: () => void): void;
1014
1014
  unmount(vnode: VNode, doRemove?: boolean): void;
1015
1015
  move(vnode: VNode, container: any, anchor: any, moveType: MoveType): void;
1016
- slot(n1: VNode | null, n2: VNode, container: any, anchor: any, parentComponent: ComponentInternalInstance | null): void;
1016
+ slot(n1: VNode | null, n2: VNode, container: any, anchor: any, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null): void;
1017
1017
  hydrate(vnode: VNode, node: any, container: any, anchor: any, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null): Node;
1018
1018
  hydrateSlot(vnode: VNode, node: any): Node;
1019
1019
  activate(vnode: VNode, container: any, anchor: any, parentComponent: ComponentInternalInstance): void;
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.6.0-beta.6
2
+ * @vue/compat v3.6.0-beta.7
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -3912,6 +3912,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
3912
3912
  const key = String(vnode.key);
3913
3913
  const leavingVNodesCache = getLeavingNodesForType(state, vnode);
3914
3914
  return baseResolveTransitionHooks({
3915
+ isLeaving: () => leavingVNodesCache[key] === vnode,
3915
3916
  setLeavingNodeCache: () => {
3916
3917
  leavingVNodesCache[key] = vnode;
3917
3918
  },
@@ -3930,7 +3931,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
3930
3931
  }, props, state, instance);
3931
3932
  }
3932
3933
  function baseResolveTransitionHooks(context, props, state, instance) {
3933
- const { setLeavingNodeCache, unsetLeavingNodeCache, earlyRemove, cloneHooks } = context;
3934
+ const { isLeaving, setLeavingNodeCache, unsetLeavingNodeCache, earlyRemove, cloneHooks } = context;
3934
3935
  const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props;
3935
3936
  const callHook = (hook, args) => {
3936
3937
  hook && callWithAsyncErrorHandling(hook, instance, 9, args);
@@ -3954,6 +3955,7 @@ function baseResolveTransitionHooks(context, props, state, instance) {
3954
3955
  callHook(hook, [el]);
3955
3956
  },
3956
3957
  enter(el) {
3958
+ if (isLeaving()) return;
3957
3959
  let hook = onEnter;
3958
3960
  let afterHook = onAfterEnter;
3959
3961
  let cancelHook = onEnterCancelled;
@@ -6012,11 +6014,16 @@ function withAsyncContext(getAwaitable) {
6012
6014
  if (!ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
6013
6015
  let awaitable = getAwaitable();
6014
6016
  setCurrentInstance(null, void 0);
6017
+ const cleanup = () => setCurrentInstance(null, void 0);
6015
6018
  if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
6016
6019
  setCurrentInstance(ctx);
6020
+ Promise.resolve().then(() => Promise.resolve().then(cleanup));
6017
6021
  throw e;
6018
6022
  });
6019
- return [awaitable, () => setCurrentInstance(ctx)];
6023
+ return [awaitable, () => {
6024
+ setCurrentInstance(ctx);
6025
+ Promise.resolve().then(cleanup);
6026
+ }];
6020
6027
  }
6021
6028
 
6022
6029
  //#endregion
@@ -6337,7 +6344,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6337
6344
  if (options.el) return vm.$mount(options.el);
6338
6345
  else return vm;
6339
6346
  }
6340
- Vue.version = `2.6.14-compat:3.6.0-beta.6`;
6347
+ Vue.version = `2.6.14-compat:3.6.0-beta.7`;
6341
6348
  Vue.config = singletonApp.config;
6342
6349
  Vue.use = (plugin, ...options) => {
6343
6350
  if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
@@ -7680,7 +7687,7 @@ function baseCreateRenderer(options, createHydrationFns) {
7680
7687
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
7681
7688
  break;
7682
7689
  case VaporSlot:
7683
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent);
7690
+ getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
7684
7691
  break;
7685
7692
  default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
7686
7693
  else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
@@ -9757,7 +9764,7 @@ function isMemoSame(cached, memo) {
9757
9764
 
9758
9765
  //#endregion
9759
9766
  //#region packages/runtime-core/src/index.ts
9760
- const version = "3.6.0-beta.6";
9767
+ const version = "3.6.0-beta.7";
9761
9768
  const warn = warn$1;
9762
9769
  /**
9763
9770
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.6.0-beta.6
2
+ * @vue/compat v3.6.0-beta.7
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -3167,6 +3167,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
3167
3167
  const key = String(vnode.key);
3168
3168
  const leavingVNodesCache = getLeavingNodesForType(state, vnode);
3169
3169
  return baseResolveTransitionHooks({
3170
+ isLeaving: () => leavingVNodesCache[key] === vnode,
3170
3171
  setLeavingNodeCache: () => {
3171
3172
  leavingVNodesCache[key] = vnode;
3172
3173
  },
@@ -3185,7 +3186,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
3185
3186
  }, props, state, instance);
3186
3187
  }
3187
3188
  function baseResolveTransitionHooks(context, props, state, instance) {
3188
- const { setLeavingNodeCache, unsetLeavingNodeCache, earlyRemove, cloneHooks } = context;
3189
+ const { isLeaving, setLeavingNodeCache, unsetLeavingNodeCache, earlyRemove, cloneHooks } = context;
3189
3190
  const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props;
3190
3191
  const callHook = (hook, args) => {
3191
3192
  hook && callWithAsyncErrorHandling(hook, instance, 9, args);
@@ -3209,6 +3210,7 @@ function baseResolveTransitionHooks(context, props, state, instance) {
3209
3210
  callHook(hook, [el]);
3210
3211
  },
3211
3212
  enter(el) {
3213
+ if (isLeaving()) return;
3212
3214
  let hook = onEnter;
3213
3215
  let afterHook = onAfterEnter;
3214
3216
  let cancelHook = onEnterCancelled;
@@ -5010,11 +5012,16 @@ function withAsyncContext(getAwaitable) {
5010
5012
  const ctx = getCurrentGenericInstance();
5011
5013
  let awaitable = getAwaitable();
5012
5014
  setCurrentInstance(null, void 0);
5015
+ const cleanup = () => setCurrentInstance(null, void 0);
5013
5016
  if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
5014
5017
  setCurrentInstance(ctx);
5018
+ Promise.resolve().then(() => Promise.resolve().then(cleanup));
5015
5019
  throw e;
5016
5020
  });
5017
- return [awaitable, () => setCurrentInstance(ctx)];
5021
+ return [awaitable, () => {
5022
+ setCurrentInstance(ctx);
5023
+ Promise.resolve().then(cleanup);
5024
+ }];
5018
5025
  }
5019
5026
 
5020
5027
  //#endregion
@@ -5270,7 +5277,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5270
5277
  if (options.el) return vm.$mount(options.el);
5271
5278
  else return vm;
5272
5279
  }
5273
- Vue.version = `2.6.14-compat:3.6.0-beta.6`;
5280
+ Vue.version = `2.6.14-compat:3.6.0-beta.7`;
5274
5281
  Vue.config = singletonApp.config;
5275
5282
  Vue.use = (plugin, ...options) => {
5276
5283
  if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
@@ -6297,7 +6304,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6297
6304
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
6298
6305
  break;
6299
6306
  case VaporSlot:
6300
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent);
6307
+ getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
6301
6308
  break;
6302
6309
  default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
6303
6310
  else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
@@ -8004,7 +8011,7 @@ function isMemoSame(cached, memo) {
8004
8011
 
8005
8012
  //#endregion
8006
8013
  //#region packages/runtime-core/src/index.ts
8007
- const version = "3.6.0-beta.6";
8014
+ const version = "3.6.0-beta.7";
8008
8015
  const warn = NOOP;
8009
8016
  /**
8010
8017
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.6.0-beta.6
2
+ * @vue/compat v3.6.0-beta.7
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -3848,6 +3848,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
3848
3848
  const key = String(vnode.key);
3849
3849
  const leavingVNodesCache = getLeavingNodesForType(state, vnode);
3850
3850
  return baseResolveTransitionHooks({
3851
+ isLeaving: () => leavingVNodesCache[key] === vnode,
3851
3852
  setLeavingNodeCache: () => {
3852
3853
  leavingVNodesCache[key] = vnode;
3853
3854
  },
@@ -3866,7 +3867,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
3866
3867
  }, props, state, instance);
3867
3868
  }
3868
3869
  function baseResolveTransitionHooks(context, props, state, instance) {
3869
- const { setLeavingNodeCache, unsetLeavingNodeCache, earlyRemove, cloneHooks } = context;
3870
+ const { isLeaving, setLeavingNodeCache, unsetLeavingNodeCache, earlyRemove, cloneHooks } = context;
3870
3871
  const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props;
3871
3872
  const callHook = (hook, args) => {
3872
3873
  hook && callWithAsyncErrorHandling(hook, instance, 9, args);
@@ -3890,6 +3891,7 @@ function baseResolveTransitionHooks(context, props, state, instance) {
3890
3891
  callHook(hook, [el]);
3891
3892
  },
3892
3893
  enter(el) {
3894
+ if (isLeaving()) return;
3893
3895
  let hook = onEnter;
3894
3896
  let afterHook = onAfterEnter;
3895
3897
  let cancelHook = onEnterCancelled;
@@ -4995,7 +4997,6 @@ function deactivate(vnode, container, { m: move }, parentComponent, parentSuspen
4995
4997
  instance.isDeactivated = true;
4996
4998
  }, void 0, parentSuspense);
4997
4999
  devtoolsComponentAdded(instance);
4998
- instance.__keepAliveStorageContainer = container;
4999
5000
  }
5000
5001
 
5001
5002
  //#endregion
@@ -5945,11 +5946,16 @@ function withAsyncContext(getAwaitable) {
5945
5946
  if (!ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
5946
5947
  let awaitable = getAwaitable();
5947
5948
  setCurrentInstance(null, void 0);
5949
+ const cleanup = () => setCurrentInstance(null, void 0);
5948
5950
  if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
5949
5951
  setCurrentInstance(ctx);
5952
+ Promise.resolve().then(() => Promise.resolve().then(cleanup));
5950
5953
  throw e;
5951
5954
  });
5952
- return [awaitable, () => setCurrentInstance(ctx)];
5955
+ return [awaitable, () => {
5956
+ setCurrentInstance(ctx);
5957
+ Promise.resolve().then(cleanup);
5958
+ }];
5953
5959
  }
5954
5960
 
5955
5961
  //#endregion
@@ -6269,7 +6275,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6269
6275
  if (options.el) return vm.$mount(options.el);
6270
6276
  else return vm;
6271
6277
  }
6272
- Vue.version = `2.6.14-compat:3.6.0-beta.6`;
6278
+ Vue.version = `2.6.14-compat:3.6.0-beta.7`;
6273
6279
  Vue.config = singletonApp.config;
6274
6280
  Vue.use = (plugin, ...options) => {
6275
6281
  if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
@@ -7612,7 +7618,7 @@ function baseCreateRenderer(options, createHydrationFns) {
7612
7618
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
7613
7619
  break;
7614
7620
  case VaporSlot:
7615
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent);
7621
+ getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
7616
7622
  break;
7617
7623
  default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
7618
7624
  else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
@@ -9680,7 +9686,7 @@ function isMemoSame(cached, memo) {
9680
9686
 
9681
9687
  //#endregion
9682
9688
  //#region packages/runtime-core/src/index.ts
9683
- const version = "3.6.0-beta.6";
9689
+ const version = "3.6.0-beta.7";
9684
9690
  const warn = warn$1;
9685
9691
  /**
9686
9692
  * Runtime error messages. Only exposed in dev or esm builds.