@vue/compat 3.6.0-beta.12 → 3.6.0-beta.13

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.
@@ -1025,9 +1025,9 @@ interface VaporInteropInterface {
1025
1025
  activate(vnode: VNode, container: any, anchor: any, parentComponent: ComponentInternalInstance): void;
1026
1026
  deactivate(vnode: VNode, container: any): void;
1027
1027
  setTransitionHooks(component: ComponentInternalInstance, transition: TransitionHooks): void;
1028
- vdomMount: (component: ConcreteComponent, parentComponent: any, props?: any, slots?: any) => any;
1028
+ vdomMount: (component: ConcreteComponent, parentComponent: any, props?: any, slots?: any, once?: boolean) => any;
1029
1029
  vdomUnmount: UnmountComponentFn;
1030
- vdomSlot: (slots: any, name: string | (() => string), props: Record<string, any>, parentComponent: any, fallback?: any) => any;
1030
+ vdomSlot: (slots: any, name: string | (() => string), props: Record<string, any>, parentComponent: any, fallback?: any, once?: boolean) => any;
1031
1031
  vdomMountVNode: (vnode: VNode, parentComponent: any) => any;
1032
1032
  }
1033
1033
  /**
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.6.0-beta.12
2
+ * @vue/compat v3.6.0-beta.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1357,9 +1357,6 @@ function targetTypeMap(rawType) {
1357
1357
  default: return 0;
1358
1358
  }
1359
1359
  }
1360
- function getTargetType(value) {
1361
- return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
1362
- }
1363
1360
  /* @__NO_SIDE_EFFECTS__ */
1364
1361
  function reactive(target) {
1365
1362
  if (/* @__PURE__ */ isReadonly(target)) return target;
@@ -1472,10 +1469,11 @@ function createReactiveObject(target, isReadonly, baseHandlers, collectionHandle
1472
1469
  return target;
1473
1470
  }
1474
1471
  if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) return target;
1475
- const targetType = getTargetType(target);
1476
- if (targetType === 0) return target;
1472
+ if (target["__v_skip"] || !Object.isExtensible(target)) return target;
1477
1473
  const existingProxy = proxyMap.get(target);
1478
1474
  if (existingProxy) return existingProxy;
1475
+ const targetType = targetTypeMap(toRawType(target));
1476
+ if (targetType === 0) return target;
1479
1477
  const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
1480
1478
  proxyMap.set(target, proxy);
1481
1479
  return proxy;
@@ -3663,17 +3661,16 @@ const TeleportImpl = {
3663
3661
  },
3664
3662
  remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
3665
3663
  const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
3666
- let shouldRemove = doRemove || !isTeleportDisabled(props);
3664
+ const shouldRemove = doRemove || !isTeleportDisabled(props);
3667
3665
  const pendingMount = pendingMounts.get(vnode);
3668
3666
  if (pendingMount) {
3669
3667
  pendingMount.flags |= 4;
3670
3668
  pendingMounts.delete(vnode);
3671
- shouldRemove = false;
3672
3669
  }
3673
3670
  if (targetStart) hostRemove(targetStart);
3674
3671
  if (targetAnchor) hostRemove(targetAnchor);
3675
3672
  doRemove && hostRemove(anchor);
3676
- if (shapeFlag & 16) for (let i = 0; i < children.length; i++) {
3673
+ if (!pendingMount && shapeFlag & 16) for (let i = 0; i < children.length; i++) {
3677
3674
  const child = children[i];
3678
3675
  unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
3679
3676
  }
@@ -4326,15 +4323,11 @@ function createHydrationFunctions(rendererInternals) {
4326
4323
  }
4327
4324
  if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
4328
4325
  let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
4329
- let hasWarned = false;
4326
+ if (next && !isMismatchAllowed(el, 1)) {
4327
+ warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
4328
+ logMismatchError();
4329
+ }
4330
4330
  while (next) {
4331
- if (!isMismatchAllowed(el, 1)) {
4332
- if (!hasWarned) {
4333
- warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
4334
- hasWarned = true;
4335
- }
4336
- logMismatchError();
4337
- }
4338
4331
  const cur = next;
4339
4332
  next = next.nextSibling;
4340
4333
  remove(cur);
@@ -4373,7 +4366,7 @@ function createHydrationFunctions(rendererInternals) {
4373
4366
  optimized = optimized || !!parentVNode.dynamicChildren;
4374
4367
  const children = parentVNode.children;
4375
4368
  const l = children.length;
4376
- let hasWarned = false;
4369
+ let hasCheckedMismatch = false;
4377
4370
  for (let i = 0; i < l; i++) {
4378
4371
  const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
4379
4372
  const isText = vnode.type === Text;
@@ -4387,12 +4380,12 @@ function createHydrationFunctions(rendererInternals) {
4387
4380
  node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
4388
4381
  } else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
4389
4382
  else {
4390
- if (!isMismatchAllowed(container, 1)) {
4391
- if (!hasWarned) {
4383
+ if (!hasCheckedMismatch) {
4384
+ hasCheckedMismatch = true;
4385
+ if (!isMismatchAllowed(container, 1)) {
4392
4386
  warn$1(`Hydration children mismatch on`, container, `\nServer rendered element contains fewer child nodes than client vdom.`);
4393
- hasWarned = true;
4387
+ logMismatchError();
4394
4388
  }
4395
- logMismatchError();
4396
4389
  }
4397
4390
  patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
4398
4391
  }
@@ -6331,7 +6324,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6331
6324
  if (options.el) return vm.$mount(options.el);
6332
6325
  else return vm;
6333
6326
  }
6334
- Vue.version = `2.6.14-compat:3.6.0-beta.12`;
6327
+ Vue.version = `2.6.14-compat:3.6.0-beta.13`;
6335
6328
  Vue.config = singletonApp.config;
6336
6329
  Vue.use = (plugin, ...options) => {
6337
6330
  if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
@@ -8267,8 +8260,10 @@ function baseCreateRenderer(options, createHydrationFns) {
8267
8260
  else hostInsert(el, container, anchor);
8268
8261
  };
8269
8262
  const performLeave = () => {
8263
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
8270
8264
  if (el._isLeaving) el[leaveCbKey](true);
8271
- leave(el, () => {
8265
+ if (transition.persisted && !wasLeaving) remove();
8266
+ else leave(el, () => {
8272
8267
  remove();
8273
8268
  afterLeave && afterLeave();
8274
8269
  });
@@ -8491,6 +8486,10 @@ function invalidateMount(hooks) {
8491
8486
  if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
8492
8487
  }
8493
8488
  function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
8489
+ if (force && transition.persisted && !el[leaveCbKey]) {
8490
+ insert();
8491
+ return;
8492
+ }
8494
8493
  if (force || needTransition(parentSuspense, transition)) {
8495
8494
  transition.beforeEnter(el);
8496
8495
  insert();
@@ -9795,7 +9794,7 @@ function isMemoSame(cached, memo) {
9795
9794
  }
9796
9795
  //#endregion
9797
9796
  //#region packages/runtime-core/src/index.ts
9798
- const version = "3.6.0-beta.12";
9797
+ const version = "3.6.0-beta.13";
9799
9798
  const warn = warn$1;
9800
9799
  /**
9801
9800
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -10393,7 +10392,21 @@ function createInvoker(initialValue, instance) {
10393
10392
  const invoker = (e) => {
10394
10393
  if (!e._vts) e._vts = Date.now();
10395
10394
  else if (e._vts <= invoker.attached) return;
10396
- callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5, [e]);
10395
+ const value = invoker.value;
10396
+ if (isArray(value)) {
10397
+ const originalStop = e.stopImmediatePropagation;
10398
+ e.stopImmediatePropagation = () => {
10399
+ originalStop.call(e);
10400
+ e._stopped = true;
10401
+ };
10402
+ const handlers = value.slice();
10403
+ const args = [e];
10404
+ for (let i = 0; i < handlers.length; i++) {
10405
+ if (e._stopped) break;
10406
+ const handler = handlers[i];
10407
+ if (handler) callWithAsyncErrorHandling(handler, instance, 5, args);
10408
+ }
10409
+ } else callWithAsyncErrorHandling(value, instance, 5, [e]);
10397
10410
  };
10398
10411
  invoker.value = initialValue;
10399
10412
  invoker.attached = getNow();
@@ -10404,16 +10417,6 @@ function sanitizeEventValue(value, propName) {
10404
10417
  warn(`Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?\nExpected function or array of functions, received type ${typeof value}.`);
10405
10418
  return NOOP;
10406
10419
  }
10407
- function patchStopImmediatePropagation(e, value) {
10408
- if (isArray(value)) {
10409
- const originalStop = e.stopImmediatePropagation;
10410
- e.stopImmediatePropagation = () => {
10411
- originalStop.call(e);
10412
- e._stopped = true;
10413
- };
10414
- return value.map((fn) => (e) => !e._stopped && fn && fn(e));
10415
- } else return value;
10416
- }
10417
10420
  //#endregion
10418
10421
  //#region packages/runtime-dom/src/patchProp.ts
10419
10422
  const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
@@ -15472,12 +15475,9 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
15472
15475
  const keyProp = findProp(node, `key`, false, true);
15473
15476
  const isDirKey = keyProp && keyProp.type === 7;
15474
15477
  let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
15475
- if (memo && keyExp && isDirKey) keyProp.exp = keyExp = processExpression(keyExp, context);
15476
- const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
15477
- if (isTemplate) {
15478
- if (memo) memo.exp = processExpression(memo.exp, context);
15479
- if (keyProperty && keyProp.type !== 6) keyProperty.value = processExpression(keyProperty.value, context);
15480
- }
15478
+ const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
15479
+ if (isTemplate && memo) memo.exp = processExpression(memo.exp, context);
15480
+ if ((isTemplate || memo) && keyProperty && isDirKey) keyExp = keyProp.exp = keyProperty.value = processExpression(keyProperty.value, context);
15481
15481
  const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
15482
15482
  const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
15483
15483
  forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), void 0, renderExp, fragmentFlag, void 0, void 0, true, !isStableFragment, false, node.loc);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.6.0-beta.12
2
+ * @vue/compat v3.6.0-beta.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1193,9 +1193,6 @@ function targetTypeMap(rawType) {
1193
1193
  default: return 0;
1194
1194
  }
1195
1195
  }
1196
- function getTargetType(value) {
1197
- return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
1198
- }
1199
1196
  /* @__NO_SIDE_EFFECTS__ */
1200
1197
  function reactive(target) {
1201
1198
  if (/* @__PURE__ */ isReadonly(target)) return target;
@@ -1305,10 +1302,11 @@ function shallowReadonly(target) {
1305
1302
  function createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) {
1306
1303
  if (!isObject(target)) return target;
1307
1304
  if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) return target;
1308
- const targetType = getTargetType(target);
1309
- if (targetType === 0) return target;
1305
+ if (target["__v_skip"] || !Object.isExtensible(target)) return target;
1310
1306
  const existingProxy = proxyMap.get(target);
1311
1307
  if (existingProxy) return existingProxy;
1308
+ const targetType = targetTypeMap(toRawType(target));
1309
+ if (targetType === 0) return target;
1312
1310
  const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
1313
1311
  proxyMap.set(target, proxy);
1314
1312
  return proxy;
@@ -2924,17 +2922,16 @@ const TeleportImpl = {
2924
2922
  },
2925
2923
  remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
2926
2924
  const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
2927
- let shouldRemove = doRemove || !isTeleportDisabled(props);
2925
+ const shouldRemove = doRemove || !isTeleportDisabled(props);
2928
2926
  const pendingMount = pendingMounts.get(vnode);
2929
2927
  if (pendingMount) {
2930
2928
  pendingMount.flags |= 4;
2931
2929
  pendingMounts.delete(vnode);
2932
- shouldRemove = false;
2933
2930
  }
2934
2931
  if (targetStart) hostRemove(targetStart);
2935
2932
  if (targetAnchor) hostRemove(targetAnchor);
2936
2933
  doRemove && hostRemove(anchor);
2937
- if (shapeFlag & 16) for (let i = 0; i < children.length; i++) {
2934
+ if (!pendingMount && shapeFlag & 16) for (let i = 0; i < children.length; i++) {
2938
2935
  const child = children[i];
2939
2936
  unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
2940
2937
  }
@@ -3558,8 +3555,8 @@ function createHydrationFunctions(rendererInternals) {
3558
3555
  }
3559
3556
  if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
3560
3557
  let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
3558
+ if (next && !isMismatchAllowed(el, 1)) logMismatchError();
3561
3559
  while (next) {
3562
- if (!isMismatchAllowed(el, 1)) logMismatchError();
3563
3560
  const cur = next;
3564
3561
  next = next.nextSibling;
3565
3562
  remove(cur);
@@ -3595,6 +3592,7 @@ function createHydrationFunctions(rendererInternals) {
3595
3592
  optimized = optimized || !!parentVNode.dynamicChildren;
3596
3593
  const children = parentVNode.children;
3597
3594
  const l = children.length;
3595
+ let hasCheckedMismatch = false;
3598
3596
  for (let i = 0; i < l; i++) {
3599
3597
  const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
3600
3598
  const isText = vnode.type === Text;
@@ -3608,7 +3606,10 @@ function createHydrationFunctions(rendererInternals) {
3608
3606
  node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
3609
3607
  } else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
3610
3608
  else {
3611
- if (!isMismatchAllowed(container, 1)) logMismatchError();
3609
+ if (!hasCheckedMismatch) {
3610
+ hasCheckedMismatch = true;
3611
+ if (!isMismatchAllowed(container, 1)) logMismatchError();
3612
+ }
3612
3613
  patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
3613
3614
  }
3614
3615
  }
@@ -5252,7 +5253,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5252
5253
  if (options.el) return vm.$mount(options.el);
5253
5254
  else return vm;
5254
5255
  }
5255
- Vue.version = `2.6.14-compat:3.6.0-beta.12`;
5256
+ Vue.version = `2.6.14-compat:3.6.0-beta.13`;
5256
5257
  Vue.config = singletonApp.config;
5257
5258
  Vue.use = (plugin, ...options) => {
5258
5259
  if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
@@ -6796,8 +6797,10 @@ function baseCreateRenderer(options, createHydrationFns) {
6796
6797
  else hostInsert(el, container, anchor);
6797
6798
  };
6798
6799
  const performLeave = () => {
6800
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
6799
6801
  if (el._isLeaving) el[leaveCbKey](true);
6800
- leave(el, () => {
6802
+ if (transition.persisted && !wasLeaving) remove();
6803
+ else leave(el, () => {
6801
6804
  remove();
6802
6805
  afterLeave && afterLeave();
6803
6806
  });
@@ -7008,6 +7011,10 @@ function invalidateMount(hooks) {
7008
7011
  if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
7009
7012
  }
7010
7013
  function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
7014
+ if (force && transition.persisted && !el[leaveCbKey]) {
7015
+ insert();
7016
+ return;
7017
+ }
7011
7018
  if (force || needTransition(parentSuspense, transition)) {
7012
7019
  transition.beforeEnter(el);
7013
7020
  insert();
@@ -8018,7 +8025,7 @@ function isMemoSame(cached, memo) {
8018
8025
  }
8019
8026
  //#endregion
8020
8027
  //#region packages/runtime-core/src/index.ts
8021
- const version = "3.6.0-beta.12";
8028
+ const version = "3.6.0-beta.13";
8022
8029
  const warn = NOOP;
8023
8030
  /**
8024
8031
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -8606,22 +8613,26 @@ function createInvoker(initialValue, instance) {
8606
8613
  const invoker = (e) => {
8607
8614
  if (!e._vts) e._vts = Date.now();
8608
8615
  else if (e._vts <= invoker.attached) return;
8609
- callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5, [e]);
8616
+ const value = invoker.value;
8617
+ if (isArray(value)) {
8618
+ const originalStop = e.stopImmediatePropagation;
8619
+ e.stopImmediatePropagation = () => {
8620
+ originalStop.call(e);
8621
+ e._stopped = true;
8622
+ };
8623
+ const handlers = value.slice();
8624
+ const args = [e];
8625
+ for (let i = 0; i < handlers.length; i++) {
8626
+ if (e._stopped) break;
8627
+ const handler = handlers[i];
8628
+ if (handler) callWithAsyncErrorHandling(handler, instance, 5, args);
8629
+ }
8630
+ } else callWithAsyncErrorHandling(value, instance, 5, [e]);
8610
8631
  };
8611
8632
  invoker.value = initialValue;
8612
8633
  invoker.attached = getNow();
8613
8634
  return invoker;
8614
8635
  }
8615
- function patchStopImmediatePropagation(e, value) {
8616
- if (isArray(value)) {
8617
- const originalStop = e.stopImmediatePropagation;
8618
- e.stopImmediatePropagation = () => {
8619
- originalStop.call(e);
8620
- e._stopped = true;
8621
- };
8622
- return value.map((fn) => (e) => !e._stopped && fn && fn(e));
8623
- } else return value;
8624
- }
8625
8636
  //#endregion
8626
8637
  //#region packages/runtime-dom/src/patchProp.ts
8627
8638
  const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
@@ -13498,12 +13509,9 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
13498
13509
  const keyProp = findProp(node, `key`, false, true);
13499
13510
  const isDirKey = keyProp && keyProp.type === 7;
13500
13511
  let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
13501
- if (memo && keyExp && isDirKey) keyProp.exp = keyExp = processExpression(keyExp, context);
13502
- const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
13503
- if (isTemplate) {
13504
- if (memo) memo.exp = processExpression(memo.exp, context);
13505
- if (keyProperty && keyProp.type !== 6) keyProperty.value = processExpression(keyProperty.value, context);
13506
- }
13512
+ const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
13513
+ if (isTemplate && memo) memo.exp = processExpression(memo.exp, context);
13514
+ if ((isTemplate || memo) && keyProperty && isDirKey) keyExp = keyProp.exp = keyProperty.value = processExpression(keyProperty.value, context);
13507
13515
  const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
13508
13516
  const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
13509
13517
  forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), void 0, renderExp, fragmentFlag, void 0, void 0, true, !isStableFragment, false, node.loc);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.6.0-beta.12
2
+ * @vue/compat v3.6.0-beta.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1312,9 +1312,6 @@ function targetTypeMap(rawType) {
1312
1312
  default: return 0;
1313
1313
  }
1314
1314
  }
1315
- function getTargetType(value) {
1316
- return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
1317
- }
1318
1315
  /* @__NO_SIDE_EFFECTS__ */
1319
1316
  function reactive(target) {
1320
1317
  if (/* @__PURE__ */ isReadonly(target)) return target;
@@ -1427,10 +1424,11 @@ function createReactiveObject(target, isReadonly, baseHandlers, collectionHandle
1427
1424
  return target;
1428
1425
  }
1429
1426
  if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) return target;
1430
- const targetType = getTargetType(target);
1431
- if (targetType === 0) return target;
1427
+ if (target["__v_skip"] || !Object.isExtensible(target)) return target;
1432
1428
  const existingProxy = proxyMap.get(target);
1433
1429
  if (existingProxy) return existingProxy;
1430
+ const targetType = targetTypeMap(toRawType(target));
1431
+ if (targetType === 0) return target;
1434
1432
  const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
1435
1433
  proxyMap.set(target, proxy);
1436
1434
  return proxy;
@@ -3600,17 +3598,16 @@ const TeleportImpl = {
3600
3598
  },
3601
3599
  remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
3602
3600
  const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
3603
- let shouldRemove = doRemove || !isTeleportDisabled(props);
3601
+ const shouldRemove = doRemove || !isTeleportDisabled(props);
3604
3602
  const pendingMount = pendingMounts.get(vnode);
3605
3603
  if (pendingMount) {
3606
3604
  pendingMount.flags |= 4;
3607
3605
  pendingMounts.delete(vnode);
3608
- shouldRemove = false;
3609
3606
  }
3610
3607
  if (targetStart) hostRemove(targetStart);
3611
3608
  if (targetAnchor) hostRemove(targetAnchor);
3612
3609
  doRemove && hostRemove(anchor);
3613
- if (shapeFlag & 16) for (let i = 0; i < children.length; i++) {
3610
+ if (!pendingMount && shapeFlag & 16) for (let i = 0; i < children.length; i++) {
3614
3611
  const child = children[i];
3615
3612
  unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
3616
3613
  }
@@ -4263,15 +4260,11 @@ function createHydrationFunctions(rendererInternals) {
4263
4260
  }
4264
4261
  if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
4265
4262
  let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
4266
- let hasWarned = false;
4263
+ if (next && !isMismatchAllowed(el, 1)) {
4264
+ warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
4265
+ logMismatchError();
4266
+ }
4267
4267
  while (next) {
4268
- if (!isMismatchAllowed(el, 1)) {
4269
- if (!hasWarned) {
4270
- warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
4271
- hasWarned = true;
4272
- }
4273
- logMismatchError();
4274
- }
4275
4268
  const cur = next;
4276
4269
  next = next.nextSibling;
4277
4270
  remove(cur);
@@ -4310,7 +4303,7 @@ function createHydrationFunctions(rendererInternals) {
4310
4303
  optimized = optimized || !!parentVNode.dynamicChildren;
4311
4304
  const children = parentVNode.children;
4312
4305
  const l = children.length;
4313
- let hasWarned = false;
4306
+ let hasCheckedMismatch = false;
4314
4307
  for (let i = 0; i < l; i++) {
4315
4308
  const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
4316
4309
  const isText = vnode.type === Text;
@@ -4324,12 +4317,12 @@ function createHydrationFunctions(rendererInternals) {
4324
4317
  node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
4325
4318
  } else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
4326
4319
  else {
4327
- if (!isMismatchAllowed(container, 1)) {
4328
- if (!hasWarned) {
4320
+ if (!hasCheckedMismatch) {
4321
+ hasCheckedMismatch = true;
4322
+ if (!isMismatchAllowed(container, 1)) {
4329
4323
  warn$1(`Hydration children mismatch on`, container, `\nServer rendered element contains fewer child nodes than client vdom.`);
4330
- hasWarned = true;
4324
+ logMismatchError();
4331
4325
  }
4332
- logMismatchError();
4333
4326
  }
4334
4327
  patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
4335
4328
  }
@@ -6263,7 +6256,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6263
6256
  if (options.el) return vm.$mount(options.el);
6264
6257
  else return vm;
6265
6258
  }
6266
- Vue.version = `2.6.14-compat:3.6.0-beta.12`;
6259
+ Vue.version = `2.6.14-compat:3.6.0-beta.13`;
6267
6260
  Vue.config = singletonApp.config;
6268
6261
  Vue.use = (plugin, ...options) => {
6269
6262
  if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
@@ -8199,8 +8192,10 @@ function baseCreateRenderer(options, createHydrationFns) {
8199
8192
  else hostInsert(el, container, anchor);
8200
8193
  };
8201
8194
  const performLeave = () => {
8195
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
8202
8196
  if (el._isLeaving) el[leaveCbKey](true);
8203
- leave(el, () => {
8197
+ if (transition.persisted && !wasLeaving) remove();
8198
+ else leave(el, () => {
8204
8199
  remove();
8205
8200
  afterLeave && afterLeave();
8206
8201
  });
@@ -8423,6 +8418,10 @@ function invalidateMount(hooks) {
8423
8418
  if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
8424
8419
  }
8425
8420
  function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
8421
+ if (force && transition.persisted && !el[leaveCbKey]) {
8422
+ insert();
8423
+ return;
8424
+ }
8426
8425
  if (force || needTransition(parentSuspense, transition)) {
8427
8426
  transition.beforeEnter(el);
8428
8427
  insert();
@@ -9717,7 +9716,7 @@ function isMemoSame(cached, memo) {
9717
9716
  }
9718
9717
  //#endregion
9719
9718
  //#region packages/runtime-core/src/index.ts
9720
- const version = "3.6.0-beta.12";
9719
+ const version = "3.6.0-beta.13";
9721
9720
  const warn = warn$1;
9722
9721
  /**
9723
9722
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -10375,7 +10374,21 @@ function createInvoker(initialValue, instance) {
10375
10374
  const invoker = (e) => {
10376
10375
  if (!e._vts) e._vts = Date.now();
10377
10376
  else if (e._vts <= invoker.attached) return;
10378
- callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5, [e]);
10377
+ const value = invoker.value;
10378
+ if (isArray(value)) {
10379
+ const originalStop = e.stopImmediatePropagation;
10380
+ e.stopImmediatePropagation = () => {
10381
+ originalStop.call(e);
10382
+ e._stopped = true;
10383
+ };
10384
+ const handlers = value.slice();
10385
+ const args = [e];
10386
+ for (let i = 0; i < handlers.length; i++) {
10387
+ if (e._stopped) break;
10388
+ const handler = handlers[i];
10389
+ if (handler) callWithAsyncErrorHandling(handler, instance, 5, args);
10390
+ }
10391
+ } else callWithAsyncErrorHandling(value, instance, 5, [e]);
10379
10392
  };
10380
10393
  invoker.value = initialValue;
10381
10394
  invoker.attached = getNow();
@@ -10386,16 +10399,6 @@ function sanitizeEventValue(value, propName) {
10386
10399
  warn(`Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?\nExpected function or array of functions, received type ${typeof value}.`);
10387
10400
  return NOOP;
10388
10401
  }
10389
- function patchStopImmediatePropagation(e, value) {
10390
- if (isArray(value)) {
10391
- const originalStop = e.stopImmediatePropagation;
10392
- e.stopImmediatePropagation = () => {
10393
- originalStop.call(e);
10394
- e._stopped = true;
10395
- };
10396
- return value.map((fn) => (e) => !e._stopped && fn && fn(e));
10397
- } else return value;
10398
- }
10399
10402
  //#endregion
10400
10403
  //#region packages/runtime-dom/src/patchProp.ts
10401
10404
  const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
@@ -14433,10 +14436,9 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
14433
14436
  const isTemplate = isTemplateNode(node);
14434
14437
  const memo = findDir(node, "memo");
14435
14438
  const keyProp = findProp(node, `key`, false, true);
14436
- const isDirKey = keyProp && keyProp.type === 7;
14439
+ keyProp && keyProp.type;
14437
14440
  let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
14438
- if (memo && keyExp && isDirKey) {}
14439
- const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
14441
+ const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
14440
14442
  const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
14441
14443
  const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
14442
14444
  forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), void 0, renderExp, fragmentFlag, void 0, void 0, true, !isStableFragment, false, node.loc);