@vue/compat 3.5.12 → 3.5.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.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.12
2
+ * @vue/compat v3.5.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -223,10 +223,9 @@ function parseStringStyle(cssText) {
223
223
  return ret;
224
224
  }
225
225
  function stringifyStyle(styles) {
226
+ if (!styles) return "";
227
+ if (isString(styles)) return styles;
226
228
  let ret = "";
227
- if (!styles || isString(styles)) {
228
- return ret;
229
- }
230
229
  for (const key in styles) {
231
230
  const value = styles[key];
232
231
  if (isString(value) || typeof value === "number") {
@@ -531,17 +530,21 @@ class EffectScope {
531
530
  }
532
531
  stop(fromParent) {
533
532
  if (this._active) {
533
+ this._active = false;
534
534
  let i, l;
535
535
  for (i = 0, l = this.effects.length; i < l; i++) {
536
536
  this.effects[i].stop();
537
537
  }
538
+ this.effects.length = 0;
538
539
  for (i = 0, l = this.cleanups.length; i < l; i++) {
539
540
  this.cleanups[i]();
540
541
  }
542
+ this.cleanups.length = 0;
541
543
  if (this.scopes) {
542
544
  for (i = 0, l = this.scopes.length; i < l; i++) {
543
545
  this.scopes[i].stop(true);
544
546
  }
547
+ this.scopes.length = 0;
545
548
  }
546
549
  if (!this.detached && this.parent && !fromParent) {
547
550
  const last = this.parent.scopes.pop();
@@ -551,7 +554,6 @@ class EffectScope {
551
554
  }
552
555
  }
553
556
  this.parent = void 0;
554
- this._active = false;
555
557
  }
556
558
  }
557
559
  }
@@ -1317,6 +1319,7 @@ class BaseReactiveHandler {
1317
1319
  this._isShallow = _isShallow;
1318
1320
  }
1319
1321
  get(target, key, receiver) {
1322
+ if (key === "__v_skip") return target["__v_skip"];
1320
1323
  const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
1321
1324
  if (key === "__v_isReactive") {
1322
1325
  return !isReadonly2;
@@ -2153,7 +2156,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2153
2156
  const scope = getCurrentScope();
2154
2157
  const watchHandle = () => {
2155
2158
  effect.stop();
2156
- if (scope) {
2159
+ if (scope && scope.active) {
2157
2160
  remove(scope.effects, effect);
2158
2161
  }
2159
2162
  };
@@ -3641,11 +3644,32 @@ const TeleportImpl = {
3641
3644
  updateCssVars(n2, true);
3642
3645
  }
3643
3646
  if (isTeleportDeferred(n2.props)) {
3644
- queuePostRenderEffect(mountToTarget, parentSuspense);
3647
+ queuePostRenderEffect(() => {
3648
+ mountToTarget();
3649
+ n2.el.__isMounted = true;
3650
+ }, parentSuspense);
3645
3651
  } else {
3646
3652
  mountToTarget();
3647
3653
  }
3648
3654
  } else {
3655
+ if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
3656
+ queuePostRenderEffect(() => {
3657
+ TeleportImpl.process(
3658
+ n1,
3659
+ n2,
3660
+ container,
3661
+ anchor,
3662
+ parentComponent,
3663
+ parentSuspense,
3664
+ namespace,
3665
+ slotScopeIds,
3666
+ optimized,
3667
+ internals
3668
+ );
3669
+ delete n1.el.__isMounted;
3670
+ }, parentSuspense);
3671
+ return;
3672
+ }
3649
3673
  n2.el = n1.el;
3650
3674
  n2.targetStart = n1.targetStart;
3651
3675
  const mainAnchor = n2.anchor = n1.anchor;
@@ -3951,10 +3975,9 @@ const BaseTransitionImpl = {
3951
3975
  if (innerChild.type !== Comment) {
3952
3976
  setTransitionHooks(innerChild, enterHooks);
3953
3977
  }
3954
- const oldChild = instance.subTree;
3955
- const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3978
+ let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3956
3979
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3957
- const leavingHooks = resolveTransitionHooks(
3980
+ let leavingHooks = resolveTransitionHooks(
3958
3981
  oldInnerChild,
3959
3982
  rawProps,
3960
3983
  state,
@@ -3969,6 +3992,7 @@ const BaseTransitionImpl = {
3969
3992
  instance.update();
3970
3993
  }
3971
3994
  delete leavingHooks.afterLeave;
3995
+ oldInnerChild = void 0;
3972
3996
  };
3973
3997
  return emptyPlaceholder(child);
3974
3998
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -3982,10 +4006,19 @@ const BaseTransitionImpl = {
3982
4006
  earlyRemove();
3983
4007
  el[leaveCbKey] = void 0;
3984
4008
  delete enterHooks.delayedLeave;
4009
+ oldInnerChild = void 0;
4010
+ };
4011
+ enterHooks.delayedLeave = () => {
4012
+ delayedLeave();
4013
+ delete enterHooks.delayedLeave;
4014
+ oldInnerChild = void 0;
3985
4015
  };
3986
- enterHooks.delayedLeave = delayedLeave;
3987
4016
  };
4017
+ } else {
4018
+ oldInnerChild = void 0;
3988
4019
  }
4020
+ } else if (oldInnerChild) {
4021
+ oldInnerChild = void 0;
3989
4022
  }
3990
4023
  return child;
3991
4024
  };
@@ -4293,6 +4326,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4293
4326
  return;
4294
4327
  }
4295
4328
  if (isAsyncWrapper(vnode) && !isUnmount) {
4329
+ if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
4330
+ setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
4331
+ }
4296
4332
  return;
4297
4333
  }
4298
4334
  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
@@ -4557,7 +4593,7 @@ function createHydrationFunctions(rendererInternals) {
4557
4593
  getContainerType(container),
4558
4594
  optimized
4559
4595
  );
4560
- if (isAsyncWrapper(vnode)) {
4596
+ if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
4561
4597
  let subTree;
4562
4598
  if (isFragmentStart) {
4563
4599
  subTree = createVNode(Fragment);
@@ -4826,6 +4862,10 @@ Server rendered element contains fewer child nodes than client vdom.`
4826
4862
  getContainerType(container),
4827
4863
  slotScopeIds
4828
4864
  );
4865
+ if (parentComponent) {
4866
+ parentComponent.vnode.el = vnode.el;
4867
+ updateHOCHostEl(parentComponent, vnode.el);
4868
+ }
4829
4869
  return next;
4830
4870
  };
4831
4871
  const locateClosingAnchor = (node, open = "[", close = "]") => {
@@ -7181,7 +7221,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7181
7221
  return vm;
7182
7222
  }
7183
7223
  }
7184
- Vue.version = `2.6.14-compat:${"3.5.12"}`;
7224
+ Vue.version = `2.6.14-compat:${"3.5.13"}`;
7185
7225
  Vue.config = singletonApp.config;
7186
7226
  Vue.use = (plugin, ...options) => {
7187
7227
  if (plugin && isFunction(plugin.install)) {
@@ -10396,7 +10436,7 @@ function renderComponentRoot(instance) {
10396
10436
  }
10397
10437
  if (extraAttrs.length) {
10398
10438
  warn$1(
10399
- `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
10439
+ `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
10400
10440
  );
10401
10441
  }
10402
10442
  if (eventAttrs.length) {
@@ -11257,9 +11297,9 @@ function closeBlock() {
11257
11297
  currentBlock = blockStack[blockStack.length - 1] || null;
11258
11298
  }
11259
11299
  let isBlockTreeEnabled = 1;
11260
- function setBlockTracking(value) {
11300
+ function setBlockTracking(value, inVOnce = false) {
11261
11301
  isBlockTreeEnabled += value;
11262
- if (value < 0 && currentBlock) {
11302
+ if (value < 0 && currentBlock && inVOnce) {
11263
11303
  currentBlock.hasOnce = true;
11264
11304
  }
11265
11305
  }
@@ -12305,7 +12345,7 @@ function isMemoSame(cached, memo) {
12305
12345
  return true;
12306
12346
  }
12307
12347
 
12308
- const version = "3.5.12";
12348
+ const version = "3.5.13";
12309
12349
  const warn = warn$1 ;
12310
12350
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12311
12351
  const devtools = devtools$1 ;
@@ -12515,7 +12555,8 @@ function resolveTransitionProps(rawProps) {
12515
12555
  onAppear = onEnter,
12516
12556
  onAppearCancelled = onEnterCancelled
12517
12557
  } = baseProps;
12518
- const finishEnter = (el, isAppear, done) => {
12558
+ const finishEnter = (el, isAppear, done, isCancelled) => {
12559
+ el._enterCancelled = isCancelled;
12519
12560
  removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
12520
12561
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
12521
12562
  done && done();
@@ -12573,8 +12614,13 @@ function resolveTransitionProps(rawProps) {
12573
12614
  if (legacyClassEnabled && legacyLeaveFromClass) {
12574
12615
  addTransitionClass(el, legacyLeaveFromClass);
12575
12616
  }
12576
- addTransitionClass(el, leaveActiveClass);
12577
- forceReflow();
12617
+ if (!el._enterCancelled) {
12618
+ forceReflow();
12619
+ addTransitionClass(el, leaveActiveClass);
12620
+ } else {
12621
+ addTransitionClass(el, leaveActiveClass);
12622
+ forceReflow();
12623
+ }
12578
12624
  nextFrame(() => {
12579
12625
  if (!el._isLeaving) {
12580
12626
  return;
@@ -12591,11 +12637,11 @@ function resolveTransitionProps(rawProps) {
12591
12637
  callHook(onLeave, [el, resolve]);
12592
12638
  },
12593
12639
  onEnterCancelled(el) {
12594
- finishEnter(el, false);
12640
+ finishEnter(el, false, void 0, true);
12595
12641
  callHook(onEnterCancelled, [el]);
12596
12642
  },
12597
12643
  onAppearCancelled(el) {
12598
- finishEnter(el, true);
12644
+ finishEnter(el, true, void 0, true);
12599
12645
  callHook(onAppearCancelled, [el]);
12600
12646
  },
12601
12647
  onLeaveCancelled(el) {
@@ -13403,6 +13449,8 @@ class VueElement extends BaseClass {
13403
13449
  this._update();
13404
13450
  }
13405
13451
  if (shouldReflect) {
13452
+ const ob = this._ob;
13453
+ ob && ob.disconnect();
13406
13454
  if (val === true) {
13407
13455
  this.setAttribute(hyphenate(key), "");
13408
13456
  } else if (typeof val === "string" || typeof val === "number") {
@@ -13410,6 +13458,7 @@ class VueElement extends BaseClass {
13410
13458
  } else if (!val) {
13411
13459
  this.removeAttribute(hyphenate(key));
13412
13460
  }
13461
+ ob && ob.observe(this, { attributes: true });
13413
13462
  }
13414
13463
  }
13415
13464
  }
@@ -14670,12 +14719,13 @@ function createConditionalExpression(test, consequent, alternate, newline = true
14670
14719
  loc: locStub
14671
14720
  };
14672
14721
  }
14673
- function createCacheExpression(index, value, needPauseTracking = false) {
14722
+ function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) {
14674
14723
  return {
14675
14724
  type: 20,
14676
14725
  index,
14677
14726
  value,
14678
14727
  needPauseTracking,
14728
+ inVOnce,
14679
14729
  needArraySpread: false,
14680
14730
  loc: locStub
14681
14731
  };
@@ -17540,11 +17590,12 @@ function createTransformContext(root, {
17540
17590
  identifier.hoisted = exp;
17541
17591
  return identifier;
17542
17592
  },
17543
- cache(exp, isVNode = false) {
17593
+ cache(exp, isVNode = false, inVOnce = false) {
17544
17594
  const cacheExp = createCacheExpression(
17545
17595
  context.cached.length,
17546
17596
  exp,
17547
- isVNode
17597
+ isVNode,
17598
+ inVOnce
17548
17599
  );
17549
17600
  context.cached.push(cacheExp);
17550
17601
  return cacheExp;
@@ -18400,7 +18451,9 @@ function genCacheExpression(node, context) {
18400
18451
  push(`_cache[${node.index}] || (`);
18401
18452
  if (needPauseTracking) {
18402
18453
  indent();
18403
- push(`${helper(SET_BLOCK_TRACKING)}(-1),`);
18454
+ push(`${helper(SET_BLOCK_TRACKING)}(-1`);
18455
+ if (node.inVOnce) push(`, true`);
18456
+ push(`),`);
18404
18457
  newline();
18405
18458
  push(`(`);
18406
18459
  }
@@ -18488,12 +18541,14 @@ const transformExpression = (node, context) => {
18488
18541
  context
18489
18542
  );
18490
18543
  } else if (node.type === 1) {
18544
+ const memo = findDir(node, "memo");
18491
18545
  for (let i = 0; i < node.props.length; i++) {
18492
18546
  const dir = node.props[i];
18493
18547
  if (dir.type === 7 && dir.name !== "for") {
18494
18548
  const exp = dir.exp;
18495
18549
  const arg = dir.arg;
18496
- if (exp && exp.type === 4 && !(dir.name === "on" && arg)) {
18550
+ if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor)
18551
+ !(memo && arg && arg.type === 4 && arg.content === "key")) {
18497
18552
  dir.exp = processExpression(
18498
18553
  exp,
18499
18554
  context,
@@ -19021,10 +19076,19 @@ const transformFor = createStructuralDirectiveTransform(
19021
19076
  const isTemplate = isTemplateNode(node);
19022
19077
  const memo = findDir(node, "memo");
19023
19078
  const keyProp = findProp(node, `key`, false, true);
19024
- if (keyProp && keyProp.type === 7 && !keyProp.exp) {
19079
+ const isDirKey = keyProp && keyProp.type === 7;
19080
+ if (isDirKey && !keyProp.exp) {
19025
19081
  transformBindShorthand(keyProp, context);
19026
19082
  }
19027
- const keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
19083
+ let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
19084
+ if (memo && keyExp && isDirKey) {
19085
+ {
19086
+ keyProp.exp = keyExp = processExpression(
19087
+ keyExp,
19088
+ context
19089
+ );
19090
+ }
19091
+ }
19028
19092
  const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
19029
19093
  if (isTemplate) {
19030
19094
  if (memo) {
@@ -20416,8 +20480,8 @@ const transformOnce = (node, context) => {
20416
20480
  if (cur.codegenNode) {
20417
20481
  cur.codegenNode = context.cache(
20418
20482
  cur.codegenNode,
20483
+ true,
20419
20484
  true
20420
- /* isVNode */
20421
20485
  );
20422
20486
  }
20423
20487
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.12
2
+ * @vue/compat v3.5.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -158,10 +158,9 @@ function parseStringStyle(cssText) {
158
158
  return ret;
159
159
  }
160
160
  function stringifyStyle(styles) {
161
+ if (!styles) return "";
162
+ if (isString(styles)) return styles;
161
163
  let ret = "";
162
- if (!styles || isString(styles)) {
163
- return ret;
164
- }
165
164
  for (const key in styles) {
166
165
  const value = styles[key];
167
166
  if (isString(value) || typeof value === "number") {
@@ -446,17 +445,21 @@ class EffectScope {
446
445
  }
447
446
  stop(fromParent) {
448
447
  if (this._active) {
448
+ this._active = false;
449
449
  let i, l;
450
450
  for (i = 0, l = this.effects.length; i < l; i++) {
451
451
  this.effects[i].stop();
452
452
  }
453
+ this.effects.length = 0;
453
454
  for (i = 0, l = this.cleanups.length; i < l; i++) {
454
455
  this.cleanups[i]();
455
456
  }
457
+ this.cleanups.length = 0;
456
458
  if (this.scopes) {
457
459
  for (i = 0, l = this.scopes.length; i < l; i++) {
458
460
  this.scopes[i].stop(true);
459
461
  }
462
+ this.scopes.length = 0;
460
463
  }
461
464
  if (!this.detached && this.parent && !fromParent) {
462
465
  const last = this.parent.scopes.pop();
@@ -466,7 +469,6 @@ class EffectScope {
466
469
  }
467
470
  }
468
471
  this.parent = void 0;
469
- this._active = false;
470
472
  }
471
473
  }
472
474
  }
@@ -1180,6 +1182,7 @@ class BaseReactiveHandler {
1180
1182
  this._isShallow = _isShallow;
1181
1183
  }
1182
1184
  get(target, key, receiver) {
1185
+ if (key === "__v_skip") return target["__v_skip"];
1183
1186
  const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
1184
1187
  if (key === "__v_isReactive") {
1185
1188
  return !isReadonly2;
@@ -1932,7 +1935,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
1932
1935
  const scope = getCurrentScope();
1933
1936
  const watchHandle = () => {
1934
1937
  effect.stop();
1935
- if (scope) {
1938
+ if (scope && scope.active) {
1936
1939
  remove(scope.effects, effect);
1937
1940
  }
1938
1941
  };
@@ -2739,11 +2742,32 @@ const TeleportImpl = {
2739
2742
  updateCssVars(n2, true);
2740
2743
  }
2741
2744
  if (isTeleportDeferred(n2.props)) {
2742
- queuePostRenderEffect(mountToTarget, parentSuspense);
2745
+ queuePostRenderEffect(() => {
2746
+ mountToTarget();
2747
+ n2.el.__isMounted = true;
2748
+ }, parentSuspense);
2743
2749
  } else {
2744
2750
  mountToTarget();
2745
2751
  }
2746
2752
  } else {
2753
+ if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
2754
+ queuePostRenderEffect(() => {
2755
+ TeleportImpl.process(
2756
+ n1,
2757
+ n2,
2758
+ container,
2759
+ anchor,
2760
+ parentComponent,
2761
+ parentSuspense,
2762
+ namespace,
2763
+ slotScopeIds,
2764
+ optimized,
2765
+ internals
2766
+ );
2767
+ delete n1.el.__isMounted;
2768
+ }, parentSuspense);
2769
+ return;
2770
+ }
2747
2771
  n2.el = n1.el;
2748
2772
  n2.targetStart = n1.targetStart;
2749
2773
  const mainAnchor = n2.anchor = n1.anchor;
@@ -3040,10 +3064,9 @@ const BaseTransitionImpl = {
3040
3064
  if (innerChild.type !== Comment) {
3041
3065
  setTransitionHooks(innerChild, enterHooks);
3042
3066
  }
3043
- const oldChild = instance.subTree;
3044
- const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3067
+ let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3045
3068
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3046
- const leavingHooks = resolveTransitionHooks(
3069
+ let leavingHooks = resolveTransitionHooks(
3047
3070
  oldInnerChild,
3048
3071
  rawProps,
3049
3072
  state,
@@ -3058,6 +3081,7 @@ const BaseTransitionImpl = {
3058
3081
  instance.update();
3059
3082
  }
3060
3083
  delete leavingHooks.afterLeave;
3084
+ oldInnerChild = void 0;
3061
3085
  };
3062
3086
  return emptyPlaceholder(child);
3063
3087
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -3071,10 +3095,19 @@ const BaseTransitionImpl = {
3071
3095
  earlyRemove();
3072
3096
  el[leaveCbKey] = void 0;
3073
3097
  delete enterHooks.delayedLeave;
3098
+ oldInnerChild = void 0;
3099
+ };
3100
+ enterHooks.delayedLeave = () => {
3101
+ delayedLeave();
3102
+ delete enterHooks.delayedLeave;
3103
+ oldInnerChild = void 0;
3074
3104
  };
3075
- enterHooks.delayedLeave = delayedLeave;
3076
3105
  };
3106
+ } else {
3107
+ oldInnerChild = void 0;
3077
3108
  }
3109
+ } else if (oldInnerChild) {
3110
+ oldInnerChild = void 0;
3078
3111
  }
3079
3112
  return child;
3080
3113
  };
@@ -3357,6 +3390,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3357
3390
  return;
3358
3391
  }
3359
3392
  if (isAsyncWrapper(vnode) && !isUnmount) {
3393
+ if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
3394
+ setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
3395
+ }
3360
3396
  return;
3361
3397
  }
3362
3398
  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
@@ -3585,7 +3621,7 @@ function createHydrationFunctions(rendererInternals) {
3585
3621
  getContainerType(container),
3586
3622
  optimized
3587
3623
  );
3588
- if (isAsyncWrapper(vnode)) {
3624
+ if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
3589
3625
  let subTree;
3590
3626
  if (isFragmentStart) {
3591
3627
  subTree = createVNode(Fragment);
@@ -3822,6 +3858,10 @@ function createHydrationFunctions(rendererInternals) {
3822
3858
  getContainerType(container),
3823
3859
  slotScopeIds
3824
3860
  );
3861
+ if (parentComponent) {
3862
+ parentComponent.vnode.el = vnode.el;
3863
+ updateHOCHostEl(parentComponent, vnode.el);
3864
+ }
3825
3865
  return next;
3826
3866
  };
3827
3867
  const locateClosingAnchor = (node, open = "[", close = "]") => {
@@ -5761,7 +5801,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5761
5801
  return vm;
5762
5802
  }
5763
5803
  }
5764
- Vue.version = `2.6.14-compat:${"3.5.12"}`;
5804
+ Vue.version = `2.6.14-compat:${"3.5.13"}`;
5765
5805
  Vue.config = singletonApp.config;
5766
5806
  Vue.use = (plugin, ...options) => {
5767
5807
  if (plugin && isFunction(plugin.install)) {
@@ -9199,9 +9239,9 @@ function closeBlock() {
9199
9239
  currentBlock = blockStack[blockStack.length - 1] || null;
9200
9240
  }
9201
9241
  let isBlockTreeEnabled = 1;
9202
- function setBlockTracking(value) {
9242
+ function setBlockTracking(value, inVOnce = false) {
9203
9243
  isBlockTreeEnabled += value;
9204
- if (value < 0 && currentBlock) {
9244
+ if (value < 0 && currentBlock && inVOnce) {
9205
9245
  currentBlock.hasOnce = true;
9206
9246
  }
9207
9247
  }
@@ -9890,7 +9930,7 @@ function isMemoSame(cached, memo) {
9890
9930
  return true;
9891
9931
  }
9892
9932
 
9893
- const version = "3.5.12";
9933
+ const version = "3.5.13";
9894
9934
  const warn$1 = NOOP;
9895
9935
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9896
9936
  const devtools = void 0;
@@ -10099,7 +10139,8 @@ function resolveTransitionProps(rawProps) {
10099
10139
  onAppear = onEnter,
10100
10140
  onAppearCancelled = onEnterCancelled
10101
10141
  } = baseProps;
10102
- const finishEnter = (el, isAppear, done) => {
10142
+ const finishEnter = (el, isAppear, done, isCancelled) => {
10143
+ el._enterCancelled = isCancelled;
10103
10144
  removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
10104
10145
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
10105
10146
  done && done();
@@ -10157,8 +10198,13 @@ function resolveTransitionProps(rawProps) {
10157
10198
  if (legacyClassEnabled && legacyLeaveFromClass) {
10158
10199
  addTransitionClass(el, legacyLeaveFromClass);
10159
10200
  }
10160
- addTransitionClass(el, leaveActiveClass);
10161
- forceReflow();
10201
+ if (!el._enterCancelled) {
10202
+ forceReflow();
10203
+ addTransitionClass(el, leaveActiveClass);
10204
+ } else {
10205
+ addTransitionClass(el, leaveActiveClass);
10206
+ forceReflow();
10207
+ }
10162
10208
  nextFrame(() => {
10163
10209
  if (!el._isLeaving) {
10164
10210
  return;
@@ -10175,11 +10221,11 @@ function resolveTransitionProps(rawProps) {
10175
10221
  callHook(onLeave, [el, resolve]);
10176
10222
  },
10177
10223
  onEnterCancelled(el) {
10178
- finishEnter(el, false);
10224
+ finishEnter(el, false, void 0, true);
10179
10225
  callHook(onEnterCancelled, [el]);
10180
10226
  },
10181
10227
  onAppearCancelled(el) {
10182
- finishEnter(el, true);
10228
+ finishEnter(el, true, void 0, true);
10183
10229
  callHook(onAppearCancelled, [el]);
10184
10230
  },
10185
10231
  onLeaveCancelled(el) {
@@ -10938,6 +10984,8 @@ class VueElement extends BaseClass {
10938
10984
  this._update();
10939
10985
  }
10940
10986
  if (shouldReflect) {
10987
+ const ob = this._ob;
10988
+ ob && ob.disconnect();
10941
10989
  if (val === true) {
10942
10990
  this.setAttribute(hyphenate(key), "");
10943
10991
  } else if (typeof val === "string" || typeof val === "number") {
@@ -10945,6 +10993,7 @@ class VueElement extends BaseClass {
10945
10993
  } else if (!val) {
10946
10994
  this.removeAttribute(hyphenate(key));
10947
10995
  }
10996
+ ob && ob.observe(this, { attributes: true });
10948
10997
  }
10949
10998
  }
10950
10999
  }
@@ -12081,12 +12130,13 @@ function createConditionalExpression(test, consequent, alternate, newline = true
12081
12130
  loc: locStub
12082
12131
  };
12083
12132
  }
12084
- function createCacheExpression(index, value, needPauseTracking = false) {
12133
+ function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) {
12085
12134
  return {
12086
12135
  type: 20,
12087
12136
  index,
12088
12137
  value,
12089
12138
  needPauseTracking,
12139
+ inVOnce,
12090
12140
  needArraySpread: false,
12091
12141
  loc: locStub
12092
12142
  };
@@ -14845,11 +14895,12 @@ function createTransformContext(root, {
14845
14895
  identifier.hoisted = exp;
14846
14896
  return identifier;
14847
14897
  },
14848
- cache(exp, isVNode = false) {
14898
+ cache(exp, isVNode = false, inVOnce = false) {
14849
14899
  const cacheExp = createCacheExpression(
14850
14900
  context.cached.length,
14851
14901
  exp,
14852
- isVNode
14902
+ isVNode,
14903
+ inVOnce
14853
14904
  );
14854
14905
  context.cached.push(cacheExp);
14855
14906
  return cacheExp;
@@ -15684,7 +15735,9 @@ function genCacheExpression(node, context) {
15684
15735
  push(`_cache[${node.index}] || (`);
15685
15736
  if (needPauseTracking) {
15686
15737
  indent();
15687
- push(`${helper(SET_BLOCK_TRACKING)}(-1),`);
15738
+ push(`${helper(SET_BLOCK_TRACKING)}(-1`);
15739
+ if (node.inVOnce) push(`, true`);
15740
+ push(`),`);
15688
15741
  newline();
15689
15742
  push(`(`);
15690
15743
  }
@@ -15772,12 +15825,14 @@ const transformExpression = (node, context) => {
15772
15825
  context
15773
15826
  );
15774
15827
  } else if (node.type === 1) {
15828
+ const memo = findDir(node, "memo");
15775
15829
  for (let i = 0; i < node.props.length; i++) {
15776
15830
  const dir = node.props[i];
15777
15831
  if (dir.type === 7 && dir.name !== "for") {
15778
15832
  const exp = dir.exp;
15779
15833
  const arg = dir.arg;
15780
- if (exp && exp.type === 4 && !(dir.name === "on" && arg)) {
15834
+ if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor)
15835
+ !(memo && arg && arg.type === 4 && arg.content === "key")) {
15781
15836
  dir.exp = processExpression(
15782
15837
  exp,
15783
15838
  context,
@@ -16296,10 +16351,19 @@ const transformFor = createStructuralDirectiveTransform(
16296
16351
  const isTemplate = isTemplateNode(node);
16297
16352
  const memo = findDir(node, "memo");
16298
16353
  const keyProp = findProp(node, `key`, false, true);
16299
- if (keyProp && keyProp.type === 7 && !keyProp.exp) {
16354
+ const isDirKey = keyProp && keyProp.type === 7;
16355
+ if (isDirKey && !keyProp.exp) {
16300
16356
  transformBindShorthand(keyProp, context);
16301
16357
  }
16302
- const keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
16358
+ let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
16359
+ if (memo && keyExp && isDirKey) {
16360
+ {
16361
+ keyProp.exp = keyExp = processExpression(
16362
+ keyExp,
16363
+ context
16364
+ );
16365
+ }
16366
+ }
16303
16367
  const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
16304
16368
  if (isTemplate) {
16305
16369
  if (memo) {
@@ -17658,8 +17722,8 @@ const transformOnce = (node, context) => {
17658
17722
  if (cur.codegenNode) {
17659
17723
  cur.codegenNode = context.cache(
17660
17724
  cur.codegenNode,
17725
+ true,
17661
17726
  true
17662
- /* isVNode */
17663
17727
  );
17664
17728
  }
17665
17729
  };