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

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.6.0-beta.12
2
+ * @vue/compat v3.6.0-beta.14
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1317,9 +1317,6 @@ function targetTypeMap(rawType) {
1317
1317
  default: return 0;
1318
1318
  }
1319
1319
  }
1320
- function getTargetType(value) {
1321
- return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
1322
- }
1323
1320
  /* @__NO_SIDE_EFFECTS__ */
1324
1321
  function reactive(target) {
1325
1322
  if (/* @__PURE__ */ isReadonly(target)) return target;
@@ -1432,10 +1429,11 @@ function createReactiveObject(target, isReadonly, baseHandlers, collectionHandle
1432
1429
  return target;
1433
1430
  }
1434
1431
  if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) return target;
1435
- const targetType = getTargetType(target);
1436
- if (targetType === 0) return target;
1432
+ if (target["__v_skip"] || !Object.isExtensible(target)) return target;
1437
1433
  const existingProxy = proxyMap.get(target);
1438
1434
  if (existingProxy) return existingProxy;
1435
+ const targetType = targetTypeMap(toRawType(target));
1436
+ if (targetType === 0) return target;
1439
1437
  const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
1440
1438
  proxyMap.set(target, proxy);
1441
1439
  return proxy;
@@ -2697,6 +2695,7 @@ function flushJobs(seen) {
2697
2695
  }
2698
2696
  flushIndex = 0;
2699
2697
  jobsLength = 0;
2698
+ jobs.length = 0;
2700
2699
  flushPostFlushCbs(seen);
2701
2700
  currentFlushPromise = null;
2702
2701
  if (jobsLength || postJobs.length) flushJobs(seen);
@@ -2754,6 +2753,14 @@ function createRecord(id, initialDef) {
2754
2753
  function normalizeClassComponent(component) {
2755
2754
  return isClassComponent(component) ? component.__vccOpts : component;
2756
2755
  }
2756
+ function hasDirtyAncestor(instance, dirtyInstances) {
2757
+ let parent = instance.parent;
2758
+ while (parent) {
2759
+ if (dirtyInstances.has(parent)) return true;
2760
+ parent = parent.parent;
2761
+ }
2762
+ return false;
2763
+ }
2757
2764
  function rerender(id, newRender) {
2758
2765
  const record = map.get(id);
2759
2766
  if (!record) return;
@@ -2785,42 +2792,69 @@ function reload(id, newComp) {
2785
2792
  const isVapor = record.initialDef.__vapor;
2786
2793
  updateComponentDef(record.initialDef, newComp);
2787
2794
  const instances = [...record.instances];
2788
- if (isVapor && newComp.__vapor && !instances.some((i) => i.ceReload)) {
2795
+ if (isVapor && newComp.__vapor && !instances.some((instance) => instance.parent && !instance.parent.vapor) && !instances.some((i) => i.ceReload)) {
2789
2796
  for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
2790
- for (const instance of instances) instance.hmrReload(newComp);
2791
- } else for (const instance of instances) {
2792
- const oldComp = normalizeClassComponent(instance.type);
2793
- let dirtyInstances = hmrDirtyComponents.get(oldComp);
2794
- if (!dirtyInstances) {
2795
- if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
2796
- hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
2797
- }
2798
- dirtyInstances.add(instance);
2799
- hmrDirtyComponentsMode.set(oldComp, !!isVapor);
2800
- instance.appContext.propsCache.delete(instance.type);
2801
- instance.appContext.emitsCache.delete(instance.type);
2802
- instance.appContext.optionsCache.delete(instance.type);
2803
- if (instance.ceReload) {
2804
- dirtyInstances.add(instance);
2805
- instance.ceReload(newComp.styles);
2806
- dirtyInstances.delete(instance);
2807
- } else if (instance.parent) queueJob(() => {
2808
- isHmrUpdating = true;
2797
+ const dirtyInstances = new Set(instances);
2798
+ const rerenderedParents = /* @__PURE__ */ new Set();
2799
+ for (const instance of instances) {
2809
2800
  const parent = instance.parent;
2810
- if (parent.vapor) parent.hmrRerender();
2811
- else if (!(parent.effect.flags & 1024)) {
2812
- parent.renderCache = [];
2813
- parent.effect.run();
2801
+ if (parent) {
2802
+ if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
2803
+ rerenderedParents.add(parent);
2804
+ parent.hmrRerender();
2805
+ }
2806
+ } else instance.hmrReload(newComp);
2807
+ }
2808
+ } else {
2809
+ const parentUpdates = /* @__PURE__ */ new Map();
2810
+ const dirtyInstanceSet = new Set(instances);
2811
+ for (const instance of instances) {
2812
+ const oldComp = normalizeClassComponent(instance.type);
2813
+ let dirtyInstances = hmrDirtyComponents.get(oldComp);
2814
+ if (!dirtyInstances) {
2815
+ if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
2816
+ hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
2814
2817
  }
2815
- nextTick(() => {
2816
- isHmrUpdating = false;
2818
+ dirtyInstances.add(instance);
2819
+ hmrDirtyComponentsMode.set(oldComp, !!isVapor);
2820
+ instance.appContext.propsCache.delete(instance.type);
2821
+ instance.appContext.emitsCache.delete(instance.type);
2822
+ instance.appContext.optionsCache.delete(instance.type);
2823
+ if (instance.ceReload) {
2824
+ dirtyInstances.add(instance);
2825
+ instance.ceReload(newComp.styles);
2826
+ dirtyInstances.delete(instance);
2827
+ } else if (instance.parent) {
2828
+ const parent = instance.parent;
2829
+ if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
2830
+ let updates = parentUpdates.get(parent);
2831
+ if (!updates) parentUpdates.set(parent, updates = []);
2832
+ updates.push([instance, dirtyInstances]);
2833
+ }
2834
+ } else if (instance.appContext.reload) instance.appContext.reload();
2835
+ else if (typeof window !== "undefined") window.location.reload();
2836
+ else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
2837
+ if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
2838
+ }
2839
+ parentUpdates.forEach((updates, parent) => {
2840
+ queueJob(() => {
2841
+ isHmrUpdating = true;
2842
+ if (parent.vapor) parent.hmrRerender();
2843
+ else {
2844
+ const i = parent;
2845
+ if (!(i.effect.flags & 1024)) {
2846
+ i.renderCache = [];
2847
+ i.effect.run();
2848
+ }
2849
+ }
2850
+ nextTick(() => {
2851
+ isHmrUpdating = false;
2852
+ });
2853
+ updates.forEach(([instance, dirtyInstances]) => {
2854
+ dirtyInstances.delete(instance);
2855
+ });
2817
2856
  });
2818
- dirtyInstances.delete(instance);
2819
2857
  });
2820
- else if (instance.appContext.reload) instance.appContext.reload();
2821
- else if (typeof window !== "undefined") window.location.reload();
2822
- else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
2823
- if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
2824
2858
  }
2825
2859
  queuePostFlushCb(() => {
2826
2860
  hmrDirtyComponents.clear();
@@ -3638,17 +3672,16 @@ const TeleportImpl = {
3638
3672
  },
3639
3673
  remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
3640
3674
  const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
3641
- let shouldRemove = doRemove || !isTeleportDisabled(props);
3675
+ const shouldRemove = doRemove || !isTeleportDisabled(props);
3642
3676
  const pendingMount = pendingMounts.get(vnode);
3643
3677
  if (pendingMount) {
3644
3678
  pendingMount.flags |= 4;
3645
3679
  pendingMounts.delete(vnode);
3646
- shouldRemove = false;
3647
3680
  }
3648
3681
  if (targetStart) hostRemove(targetStart);
3649
3682
  if (targetAnchor) hostRemove(targetAnchor);
3650
3683
  doRemove && hostRemove(anchor);
3651
- if (shapeFlag & 16) for (let i = 0; i < children.length; i++) {
3684
+ if (!pendingMount && shapeFlag & 16) for (let i = 0; i < children.length; i++) {
3652
3685
  const child = children[i];
3653
3686
  unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
3654
3687
  }
@@ -4315,15 +4348,11 @@ function createHydrationFunctions(rendererInternals) {
4315
4348
  }
4316
4349
  if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
4317
4350
  let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
4318
- let hasWarned = false;
4351
+ if (next && !isMismatchAllowed(el, 1)) {
4352
+ (process.env.NODE_ENV !== "production" || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
4353
+ logMismatchError();
4354
+ }
4319
4355
  while (next) {
4320
- if (!isMismatchAllowed(el, 1)) {
4321
- if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {
4322
- warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
4323
- hasWarned = true;
4324
- }
4325
- logMismatchError();
4326
- }
4327
4356
  const cur = next;
4328
4357
  next = next.nextSibling;
4329
4358
  remove(cur);
@@ -4365,7 +4394,7 @@ function createHydrationFunctions(rendererInternals) {
4365
4394
  optimized = optimized || !!parentVNode.dynamicChildren;
4366
4395
  const children = parentVNode.children;
4367
4396
  const l = children.length;
4368
- let hasWarned = false;
4397
+ let hasCheckedMismatch = false;
4369
4398
  for (let i = 0; i < l; i++) {
4370
4399
  const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
4371
4400
  const isText = vnode.type === Text;
@@ -4379,12 +4408,12 @@ function createHydrationFunctions(rendererInternals) {
4379
4408
  node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
4380
4409
  } else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
4381
4410
  else {
4382
- if (!isMismatchAllowed(container, 1)) {
4383
- if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {
4384
- warn$1(`Hydration children mismatch on`, container, `\nServer rendered element contains fewer child nodes than client vdom.`);
4385
- hasWarned = true;
4411
+ if (!hasCheckedMismatch) {
4412
+ hasCheckedMismatch = true;
4413
+ if (!isMismatchAllowed(container, 1)) {
4414
+ (process.env.NODE_ENV !== "production" || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(`Hydration children mismatch on`, container, `\nServer rendered element contains fewer child nodes than client vdom.`);
4415
+ logMismatchError();
4386
4416
  }
4387
- logMismatchError();
4388
4417
  }
4389
4418
  patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
4390
4419
  }
@@ -5398,6 +5427,7 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
5398
5427
  slot: vaporSlot,
5399
5428
  fallback
5400
5429
  };
5430
+ if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
5401
5431
  return ret;
5402
5432
  }
5403
5433
  if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
@@ -6336,7 +6366,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6336
6366
  if (options.el) return vm.$mount(options.el);
6337
6367
  else return vm;
6338
6368
  }
6339
- Vue.version = `2.6.14-compat:3.6.0-beta.12`;
6369
+ Vue.version = `2.6.14-compat:3.6.0-beta.14`;
6340
6370
  Vue.config = singletonApp.config;
6341
6371
  Vue.use = (plugin, ...options) => {
6342
6372
  if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
@@ -8321,8 +8351,10 @@ function baseCreateRenderer(options, createHydrationFns) {
8321
8351
  else hostInsert(el, container, anchor);
8322
8352
  };
8323
8353
  const performLeave = () => {
8354
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
8324
8355
  if (el._isLeaving) el[leaveCbKey](true);
8325
- leave(el, () => {
8356
+ if (transition.persisted && !wasLeaving) remove();
8357
+ else leave(el, () => {
8326
8358
  remove();
8327
8359
  afterLeave && afterLeave();
8328
8360
  });
@@ -8545,6 +8577,10 @@ function invalidateMount(hooks) {
8545
8577
  if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
8546
8578
  }
8547
8579
  function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
8580
+ if (force && transition.persisted && !el[leaveCbKey]) {
8581
+ insert();
8582
+ return;
8583
+ }
8548
8584
  if (force || needTransition(parentSuspense, transition)) {
8549
8585
  transition.beforeEnter(el);
8550
8586
  insert();
@@ -9870,7 +9906,7 @@ function isMemoSame(cached, memo) {
9870
9906
  }
9871
9907
  //#endregion
9872
9908
  //#region packages/runtime-core/src/index.ts
9873
- const version = "3.6.0-beta.12";
9909
+ const version = "3.6.0-beta.14";
9874
9910
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
9875
9911
  /**
9876
9912
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -10547,7 +10583,21 @@ function createInvoker(initialValue, instance) {
10547
10583
  const invoker = (e) => {
10548
10584
  if (!e._vts) e._vts = Date.now();
10549
10585
  else if (e._vts <= invoker.attached) return;
10550
- callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5, [e]);
10586
+ const value = invoker.value;
10587
+ if (isArray(value)) {
10588
+ const originalStop = e.stopImmediatePropagation;
10589
+ e.stopImmediatePropagation = () => {
10590
+ originalStop.call(e);
10591
+ e._stopped = true;
10592
+ };
10593
+ const handlers = value.slice();
10594
+ const args = [e];
10595
+ for (let i = 0; i < handlers.length; i++) {
10596
+ if (e._stopped) break;
10597
+ const handler = handlers[i];
10598
+ if (handler) callWithAsyncErrorHandling(handler, instance, 5, args);
10599
+ }
10600
+ } else callWithAsyncErrorHandling(value, instance, 5, [e]);
10551
10601
  };
10552
10602
  invoker.value = initialValue;
10553
10603
  invoker.attached = getNow();
@@ -10558,16 +10608,6 @@ function sanitizeEventValue(value, propName) {
10558
10608
  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}.`);
10559
10609
  return NOOP;
10560
10610
  }
10561
- function patchStopImmediatePropagation(e, value) {
10562
- if (isArray(value)) {
10563
- const originalStop = e.stopImmediatePropagation;
10564
- e.stopImmediatePropagation = () => {
10565
- originalStop.call(e);
10566
- e._stopped = true;
10567
- };
10568
- return value.map((fn) => (e) => !e._stopped && fn && fn(e));
10569
- } else return value;
10570
- }
10571
10611
  //#endregion
10572
10612
  //#region packages/runtime-dom/src/patchProp.ts
10573
10613
  const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
@@ -14741,10 +14781,9 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
14741
14781
  const isTemplate = isTemplateNode$1(node);
14742
14782
  const memo = findDir(node, "memo");
14743
14783
  const keyProp = findProp(node, `key`, false, true);
14744
- const isDirKey = keyProp && keyProp.type === 7;
14784
+ keyProp && keyProp.type;
14745
14785
  let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
14746
- if (memo && keyExp && isDirKey) {}
14747
- const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
14786
+ const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
14748
14787
  const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
14749
14788
  const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
14750
14789
  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.14
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1313,9 +1313,6 @@ var Vue = (function() {
1313
1313
  default: return 0;
1314
1314
  }
1315
1315
  }
1316
- function getTargetType(value) {
1317
- return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
1318
- }
1319
1316
  /* @__NO_SIDE_EFFECTS__ */
1320
1317
  function reactive(target) {
1321
1318
  if (/* @__PURE__ */ isReadonly(target)) return target;
@@ -1428,10 +1425,11 @@ var Vue = (function() {
1428
1425
  return target;
1429
1426
  }
1430
1427
  if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) return target;
1431
- const targetType = getTargetType(target);
1432
- if (targetType === 0) return target;
1428
+ if (target["__v_skip"] || !Object.isExtensible(target)) return target;
1433
1429
  const existingProxy = proxyMap.get(target);
1434
1430
  if (existingProxy) return existingProxy;
1431
+ const targetType = targetTypeMap(toRawType(target));
1432
+ if (targetType === 0) return target;
1435
1433
  const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
1436
1434
  proxyMap.set(target, proxy);
1437
1435
  return proxy;
@@ -2681,6 +2679,7 @@ var Vue = (function() {
2681
2679
  }
2682
2680
  flushIndex = 0;
2683
2681
  jobsLength = 0;
2682
+ jobs.length = 0;
2684
2683
  flushPostFlushCbs(seen);
2685
2684
  currentFlushPromise = null;
2686
2685
  if (jobsLength || postJobs.length) flushJobs(seen);
@@ -2738,6 +2737,14 @@ var Vue = (function() {
2738
2737
  function normalizeClassComponent(component) {
2739
2738
  return isClassComponent(component) ? component.__vccOpts : component;
2740
2739
  }
2740
+ function hasDirtyAncestor(instance, dirtyInstances) {
2741
+ let parent = instance.parent;
2742
+ while (parent) {
2743
+ if (dirtyInstances.has(parent)) return true;
2744
+ parent = parent.parent;
2745
+ }
2746
+ return false;
2747
+ }
2741
2748
  function rerender(id, newRender) {
2742
2749
  const record = map.get(id);
2743
2750
  if (!record) return;
@@ -2769,42 +2776,69 @@ var Vue = (function() {
2769
2776
  const isVapor = record.initialDef.__vapor;
2770
2777
  updateComponentDef(record.initialDef, newComp);
2771
2778
  const instances = [...record.instances];
2772
- if (isVapor && newComp.__vapor && !instances.some((i) => i.ceReload)) {
2779
+ if (isVapor && newComp.__vapor && !instances.some((instance) => instance.parent && !instance.parent.vapor) && !instances.some((i) => i.ceReload)) {
2773
2780
  for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
2774
- for (const instance of instances) instance.hmrReload(newComp);
2775
- } else for (const instance of instances) {
2776
- const oldComp = normalizeClassComponent(instance.type);
2777
- let dirtyInstances = hmrDirtyComponents.get(oldComp);
2778
- if (!dirtyInstances) {
2779
- if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
2780
- hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
2781
- }
2782
- dirtyInstances.add(instance);
2783
- hmrDirtyComponentsMode.set(oldComp, !!isVapor);
2784
- instance.appContext.propsCache.delete(instance.type);
2785
- instance.appContext.emitsCache.delete(instance.type);
2786
- instance.appContext.optionsCache.delete(instance.type);
2787
- if (instance.ceReload) {
2788
- dirtyInstances.add(instance);
2789
- instance.ceReload(newComp.styles);
2790
- dirtyInstances.delete(instance);
2791
- } else if (instance.parent) queueJob(() => {
2792
- isHmrUpdating = true;
2781
+ const dirtyInstances = new Set(instances);
2782
+ const rerenderedParents = /* @__PURE__ */ new Set();
2783
+ for (const instance of instances) {
2793
2784
  const parent = instance.parent;
2794
- if (parent.vapor) parent.hmrRerender();
2795
- else if (!(parent.effect.flags & 1024)) {
2796
- parent.renderCache = [];
2797
- parent.effect.run();
2785
+ if (parent) {
2786
+ if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
2787
+ rerenderedParents.add(parent);
2788
+ parent.hmrRerender();
2789
+ }
2790
+ } else instance.hmrReload(newComp);
2791
+ }
2792
+ } else {
2793
+ const parentUpdates = /* @__PURE__ */ new Map();
2794
+ const dirtyInstanceSet = new Set(instances);
2795
+ for (const instance of instances) {
2796
+ const oldComp = normalizeClassComponent(instance.type);
2797
+ let dirtyInstances = hmrDirtyComponents.get(oldComp);
2798
+ if (!dirtyInstances) {
2799
+ if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
2800
+ hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
2798
2801
  }
2799
- nextTick(() => {
2800
- isHmrUpdating = false;
2802
+ dirtyInstances.add(instance);
2803
+ hmrDirtyComponentsMode.set(oldComp, !!isVapor);
2804
+ instance.appContext.propsCache.delete(instance.type);
2805
+ instance.appContext.emitsCache.delete(instance.type);
2806
+ instance.appContext.optionsCache.delete(instance.type);
2807
+ if (instance.ceReload) {
2808
+ dirtyInstances.add(instance);
2809
+ instance.ceReload(newComp.styles);
2810
+ dirtyInstances.delete(instance);
2811
+ } else if (instance.parent) {
2812
+ const parent = instance.parent;
2813
+ if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
2814
+ let updates = parentUpdates.get(parent);
2815
+ if (!updates) parentUpdates.set(parent, updates = []);
2816
+ updates.push([instance, dirtyInstances]);
2817
+ }
2818
+ } else if (instance.appContext.reload) instance.appContext.reload();
2819
+ else if (typeof window !== "undefined") window.location.reload();
2820
+ else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
2821
+ if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
2822
+ }
2823
+ parentUpdates.forEach((updates, parent) => {
2824
+ queueJob(() => {
2825
+ isHmrUpdating = true;
2826
+ if (parent.vapor) parent.hmrRerender();
2827
+ else {
2828
+ const i = parent;
2829
+ if (!(i.effect.flags & 1024)) {
2830
+ i.renderCache = [];
2831
+ i.effect.run();
2832
+ }
2833
+ }
2834
+ nextTick(() => {
2835
+ isHmrUpdating = false;
2836
+ });
2837
+ updates.forEach(([instance, dirtyInstances]) => {
2838
+ dirtyInstances.delete(instance);
2839
+ });
2801
2840
  });
2802
- dirtyInstances.delete(instance);
2803
2841
  });
2804
- else if (instance.appContext.reload) instance.appContext.reload();
2805
- else if (typeof window !== "undefined") window.location.reload();
2806
- else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
2807
- if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
2808
2842
  }
2809
2843
  queuePostFlushCb(() => {
2810
2844
  hmrDirtyComponents.clear();
@@ -3597,17 +3631,16 @@ var Vue = (function() {
3597
3631
  },
3598
3632
  remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
3599
3633
  const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
3600
- let shouldRemove = doRemove || !isTeleportDisabled(props);
3634
+ const shouldRemove = doRemove || !isTeleportDisabled(props);
3601
3635
  const pendingMount = pendingMounts.get(vnode);
3602
3636
  if (pendingMount) {
3603
3637
  pendingMount.flags |= 4;
3604
3638
  pendingMounts.delete(vnode);
3605
- shouldRemove = false;
3606
3639
  }
3607
3640
  if (targetStart) hostRemove(targetStart);
3608
3641
  if (targetAnchor) hostRemove(targetAnchor);
3609
3642
  doRemove && hostRemove(anchor);
3610
- if (shapeFlag & 16) for (let i = 0; i < children.length; i++) {
3643
+ if (!pendingMount && shapeFlag & 16) for (let i = 0; i < children.length; i++) {
3611
3644
  const child = children[i];
3612
3645
  unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
3613
3646
  }
@@ -4260,15 +4293,11 @@ var Vue = (function() {
4260
4293
  }
4261
4294
  if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
4262
4295
  let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
4263
- let hasWarned = false;
4296
+ if (next && !isMismatchAllowed(el, 1)) {
4297
+ warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
4298
+ logMismatchError();
4299
+ }
4264
4300
  while (next) {
4265
- if (!isMismatchAllowed(el, 1)) {
4266
- if (!hasWarned) {
4267
- warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
4268
- hasWarned = true;
4269
- }
4270
- logMismatchError();
4271
- }
4272
4301
  const cur = next;
4273
4302
  next = next.nextSibling;
4274
4303
  remove(cur);
@@ -4307,7 +4336,7 @@ var Vue = (function() {
4307
4336
  optimized = optimized || !!parentVNode.dynamicChildren;
4308
4337
  const children = parentVNode.children;
4309
4338
  const l = children.length;
4310
- let hasWarned = false;
4339
+ let hasCheckedMismatch = false;
4311
4340
  for (let i = 0; i < l; i++) {
4312
4341
  const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
4313
4342
  const isText = vnode.type === Text;
@@ -4321,12 +4350,12 @@ var Vue = (function() {
4321
4350
  node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
4322
4351
  } else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
4323
4352
  else {
4324
- if (!isMismatchAllowed(container, 1)) {
4325
- if (!hasWarned) {
4353
+ if (!hasCheckedMismatch) {
4354
+ hasCheckedMismatch = true;
4355
+ if (!isMismatchAllowed(container, 1)) {
4326
4356
  warn$1(`Hydration children mismatch on`, container, `\nServer rendered element contains fewer child nodes than client vdom.`);
4327
- hasWarned = true;
4357
+ logMismatchError();
4328
4358
  }
4329
- logMismatchError();
4330
4359
  }
4331
4360
  patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
4332
4361
  }
@@ -5324,6 +5353,7 @@ var Vue = (function() {
5324
5353
  slot: vaporSlot,
5325
5354
  fallback
5326
5355
  };
5356
+ if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
5327
5357
  return ret;
5328
5358
  }
5329
5359
  if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
@@ -6260,7 +6290,7 @@ var Vue = (function() {
6260
6290
  if (options.el) return vm.$mount(options.el);
6261
6291
  else return vm;
6262
6292
  }
6263
- Vue.version = `2.6.14-compat:3.6.0-beta.12`;
6293
+ Vue.version = `2.6.14-compat:3.6.0-beta.14`;
6264
6294
  Vue.config = singletonApp.config;
6265
6295
  Vue.use = (plugin, ...options) => {
6266
6296
  if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
@@ -8196,8 +8226,10 @@ var Vue = (function() {
8196
8226
  else hostInsert(el, container, anchor);
8197
8227
  };
8198
8228
  const performLeave = () => {
8229
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
8199
8230
  if (el._isLeaving) el[leaveCbKey](true);
8200
- leave(el, () => {
8231
+ if (transition.persisted && !wasLeaving) remove();
8232
+ else leave(el, () => {
8201
8233
  remove();
8202
8234
  afterLeave && afterLeave();
8203
8235
  });
@@ -8420,6 +8452,10 @@ var Vue = (function() {
8420
8452
  if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
8421
8453
  }
8422
8454
  function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
8455
+ if (force && transition.persisted && !el[leaveCbKey]) {
8456
+ insert();
8457
+ return;
8458
+ }
8423
8459
  if (force || needTransition(parentSuspense, transition)) {
8424
8460
  transition.beforeEnter(el);
8425
8461
  insert();
@@ -9714,7 +9750,7 @@ var Vue = (function() {
9714
9750
  }
9715
9751
  //#endregion
9716
9752
  //#region packages/runtime-core/src/index.ts
9717
- const version = "3.6.0-beta.12";
9753
+ const version = "3.6.0-beta.14";
9718
9754
  const warn = warn$1;
9719
9755
  /**
9720
9756
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -10367,7 +10403,21 @@ var Vue = (function() {
10367
10403
  const invoker = (e) => {
10368
10404
  if (!e._vts) e._vts = Date.now();
10369
10405
  else if (e._vts <= invoker.attached) return;
10370
- callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5, [e]);
10406
+ const value = invoker.value;
10407
+ if (isArray(value)) {
10408
+ const originalStop = e.stopImmediatePropagation;
10409
+ e.stopImmediatePropagation = () => {
10410
+ originalStop.call(e);
10411
+ e._stopped = true;
10412
+ };
10413
+ const handlers = value.slice();
10414
+ const args = [e];
10415
+ for (let i = 0; i < handlers.length; i++) {
10416
+ if (e._stopped) break;
10417
+ const handler = handlers[i];
10418
+ if (handler) callWithAsyncErrorHandling(handler, instance, 5, args);
10419
+ }
10420
+ } else callWithAsyncErrorHandling(value, instance, 5, [e]);
10371
10421
  };
10372
10422
  invoker.value = initialValue;
10373
10423
  invoker.attached = getNow();
@@ -10378,16 +10428,6 @@ var Vue = (function() {
10378
10428
  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}.`);
10379
10429
  return NOOP;
10380
10430
  }
10381
- function patchStopImmediatePropagation(e, value) {
10382
- if (isArray(value)) {
10383
- const originalStop = e.stopImmediatePropagation;
10384
- e.stopImmediatePropagation = () => {
10385
- originalStop.call(e);
10386
- e._stopped = true;
10387
- };
10388
- return value.map((fn) => (e) => !e._stopped && fn && fn(e));
10389
- } else return value;
10390
- }
10391
10431
  //#endregion
10392
10432
  //#region packages/runtime-dom/src/patchProp.ts
10393
10433
  const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
@@ -14409,10 +14449,9 @@ var Vue = (function() {
14409
14449
  const isTemplate = isTemplateNode(node);
14410
14450
  const memo = findDir(node, "memo");
14411
14451
  const keyProp = findProp(node, `key`, false, true);
14412
- const isDirKey = keyProp && keyProp.type === 7;
14452
+ keyProp && keyProp.type;
14413
14453
  let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
14414
- if (memo && keyExp && isDirKey) {}
14415
- const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
14454
+ const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
14416
14455
  const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
14417
14456
  const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
14418
14457
  forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), void 0, renderExp, fragmentFlag, void 0, void 0, true, !isStableFragment, false, node.loc);