@vue/runtime-core 3.5.41 → 3.5.42

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/runtime-core v3.5.41
2
+ * @vue/runtime-core v3.5.42
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -2064,10 +2064,10 @@ function createHydrationFunctions(rendererInternals) {
2064
2064
  getContainerType(container),
2065
2065
  optimized
2066
2066
  );
2067
- if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
2067
+ if (isAsyncWrapper(vnode) && !vnode.component.subTree) {
2068
2068
  let subTree;
2069
2069
  if (isFragmentStart) {
2070
- subTree = createVNode(Fragment);
2070
+ subTree = createVNode(Static);
2071
2071
  subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
2072
2072
  } else {
2073
2073
  subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
@@ -2973,7 +2973,10 @@ const KeepAliveImpl = {
2973
2973
  if (pendingCacheKey != null) {
2974
2974
  if (isSuspense(instance.subTree.type)) {
2975
2975
  queuePostRenderEffect(() => {
2976
- cache.set(pendingCacheKey, getInnerChild(instance.subTree));
2976
+ const vnode = getInnerChild(instance.subTree);
2977
+ if (vnode.component) {
2978
+ cache.set(pendingCacheKey, vnode);
2979
+ }
2977
2980
  }, instance.subTree.suspense);
2978
2981
  } else {
2979
2982
  cache.set(pendingCacheKey, getInnerChild(instance.subTree));
@@ -3374,12 +3377,41 @@ const getPublicInstance = (i) => {
3374
3377
  if (isStatefulComponent(i)) return getComponentPublicInstance(i);
3375
3378
  return getPublicInstance(i.parent);
3376
3379
  };
3380
+ const resolveDevRootEl = (vnode) => {
3381
+ let found = false;
3382
+ while (true) {
3383
+ if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
3384
+ const root = filterSingleRoot(vnode.children);
3385
+ if (!root) {
3386
+ return;
3387
+ }
3388
+ vnode = root;
3389
+ found = true;
3390
+ continue;
3391
+ }
3392
+ const component = vnode.component;
3393
+ if (component && component.subTree) {
3394
+ vnode = component.subTree;
3395
+ continue;
3396
+ }
3397
+ const suspense = vnode.suspense;
3398
+ if (suspense && suspense.activeBranch) {
3399
+ vnode = suspense.activeBranch;
3400
+ continue;
3401
+ }
3402
+ return found ? vnode.el : void 0;
3403
+ }
3404
+ };
3405
+ const getDevRootFragmentEl = (i) => {
3406
+ const el = i.subTree && resolveDevRootEl(i.subTree);
3407
+ return el === void 0 ? i.vnode.el : el;
3408
+ };
3377
3409
  const publicPropertiesMap = (
3378
3410
  // Move PURE marker to new line to workaround compiler discarding it
3379
3411
  // due to type annotation
3380
3412
  /* @__PURE__ */ shared.extend(/* @__PURE__ */ Object.create(null), {
3381
3413
  $: (i) => i,
3382
- $el: (i) => i.vnode.el,
3414
+ $el: (i) => getDevRootFragmentEl(i) ,
3383
3415
  $data: (i) => i.data,
3384
3416
  $props: (i) => reactivity.shallowReadonly(i.props) ,
3385
3417
  $attrs: (i) => reactivity.shallowReadonly(i.attrs) ,
@@ -4482,7 +4514,7 @@ function emit(instance, event, ...rawArgs) {
4482
4514
  args = rawArgs.map((a) => shared.isString(a) ? a.trim() : a);
4483
4515
  }
4484
4516
  if (modifiers.number) {
4485
- args = rawArgs.map(shared.looseToNumber);
4517
+ args = args.map(shared.looseToNumber);
4486
4518
  }
4487
4519
  }
4488
4520
  {
@@ -7125,7 +7157,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
7125
7157
  if (suspense.deps <= 0) {
7126
7158
  suspense.resolve();
7127
7159
  } else if (isInFallback) {
7128
- if (!isHydrating) {
7160
+ if (!isHydrating && !suspense.isFallbackMountPending) {
7129
7161
  patch(
7130
7162
  activeBranch,
7131
7163
  newFallback,
@@ -7166,7 +7198,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
7166
7198
  );
7167
7199
  if (suspense.deps <= 0) {
7168
7200
  suspense.resolve();
7169
- } else {
7201
+ } else if (!suspense.isFallbackMountPending) {
7170
7202
  patch(
7171
7203
  activeBranch,
7172
7204
  newFallback,
@@ -7407,9 +7439,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7407
7439
  if (!suspense.isInFallback) {
7408
7440
  return;
7409
7441
  }
7442
+ const latestFallback = suspense.vnode.ssFallback;
7410
7443
  patch(
7411
7444
  null,
7412
- fallbackVNode,
7445
+ latestFallback,
7413
7446
  container2,
7414
7447
  anchor2,
7415
7448
  parentComponent2,
@@ -7419,7 +7452,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7419
7452
  slotScopeIds,
7420
7453
  optimized
7421
7454
  );
7422
- setActiveBranch(suspense, fallbackVNode);
7455
+ setActiveBranch(suspense, latestFallback);
7423
7456
  };
7424
7457
  const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
7425
7458
  if (delayEnter) {
@@ -8685,7 +8718,7 @@ function isMemoSame(cached, memo) {
8685
8718
  return true;
8686
8719
  }
8687
8720
 
8688
- const version = "3.5.41";
8721
+ const version = "3.5.42";
8689
8722
  const warn = warn$1 ;
8690
8723
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8691
8724
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.41
2
+ * @vue/runtime-core v3.5.42
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1545,10 +1545,10 @@ function createHydrationFunctions(rendererInternals) {
1545
1545
  getContainerType(container),
1546
1546
  optimized
1547
1547
  );
1548
- if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
1548
+ if (isAsyncWrapper(vnode) && !vnode.component.subTree) {
1549
1549
  let subTree;
1550
1550
  if (isFragmentStart) {
1551
- subTree = createVNode(Fragment);
1551
+ subTree = createVNode(Static);
1552
1552
  subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
1553
1553
  } else {
1554
1554
  subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
@@ -2274,7 +2274,10 @@ const KeepAliveImpl = {
2274
2274
  if (pendingCacheKey != null) {
2275
2275
  if (isSuspense(instance.subTree.type)) {
2276
2276
  queuePostRenderEffect(() => {
2277
- cache.set(pendingCacheKey, getInnerChild(instance.subTree));
2277
+ const vnode = getInnerChild(instance.subTree);
2278
+ if (vnode.component) {
2279
+ cache.set(pendingCacheKey, vnode);
2280
+ }
2278
2281
  }, instance.subTree.suspense);
2279
2282
  } else {
2280
2283
  cache.set(pendingCacheKey, getInnerChild(instance.subTree));
@@ -3429,7 +3432,7 @@ function emit(instance, event, ...rawArgs) {
3429
3432
  args = rawArgs.map((a) => shared.isString(a) ? a.trim() : a);
3430
3433
  }
3431
3434
  if (modifiers.number) {
3432
- args = rawArgs.map(shared.looseToNumber);
3435
+ args = args.map(shared.looseToNumber);
3433
3436
  }
3434
3437
  }
3435
3438
  let handlerName;
@@ -5645,7 +5648,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
5645
5648
  if (suspense.deps <= 0) {
5646
5649
  suspense.resolve();
5647
5650
  } else if (isInFallback) {
5648
- if (!isHydrating) {
5651
+ if (!isHydrating && !suspense.isFallbackMountPending) {
5649
5652
  patch(
5650
5653
  activeBranch,
5651
5654
  newFallback,
@@ -5686,7 +5689,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
5686
5689
  );
5687
5690
  if (suspense.deps <= 0) {
5688
5691
  suspense.resolve();
5689
- } else {
5692
+ } else if (!suspense.isFallbackMountPending) {
5690
5693
  patch(
5691
5694
  activeBranch,
5692
5695
  newFallback,
@@ -5905,9 +5908,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5905
5908
  if (!suspense.isInFallback) {
5906
5909
  return;
5907
5910
  }
5911
+ const latestFallback = suspense.vnode.ssFallback;
5908
5912
  patch(
5909
5913
  null,
5910
- fallbackVNode,
5914
+ latestFallback,
5911
5915
  container2,
5912
5916
  anchor2,
5913
5917
  parentComponent2,
@@ -5917,7 +5921,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5917
5921
  slotScopeIds,
5918
5922
  optimized
5919
5923
  );
5920
- setActiveBranch(suspense, fallbackVNode);
5924
+ setActiveBranch(suspense, latestFallback);
5921
5925
  };
5922
5926
  const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
5923
5927
  if (delayEnter) {
@@ -6806,7 +6810,7 @@ function isMemoSame(cached, memo) {
6806
6810
  return true;
6807
6811
  }
6808
6812
 
6809
- const version = "3.5.41";
6813
+ const version = "3.5.42";
6810
6814
  const warn$1 = shared.NOOP;
6811
6815
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6812
6816
  const devtools = void 0;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.41
2
+ * @vue/runtime-core v3.5.42
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -2068,10 +2068,10 @@ function createHydrationFunctions(rendererInternals) {
2068
2068
  getContainerType(container),
2069
2069
  optimized
2070
2070
  );
2071
- if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
2071
+ if (isAsyncWrapper(vnode) && !vnode.component.subTree) {
2072
2072
  let subTree;
2073
2073
  if (isFragmentStart) {
2074
- subTree = createVNode(Fragment);
2074
+ subTree = createVNode(Static);
2075
2075
  subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
2076
2076
  } else {
2077
2077
  subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
@@ -2992,7 +2992,10 @@ const KeepAliveImpl = {
2992
2992
  if (pendingCacheKey != null) {
2993
2993
  if (isSuspense(instance.subTree.type)) {
2994
2994
  queuePostRenderEffect(() => {
2995
- cache.set(pendingCacheKey, getInnerChild(instance.subTree));
2995
+ const vnode = getInnerChild(instance.subTree);
2996
+ if (vnode.component) {
2997
+ cache.set(pendingCacheKey, vnode);
2998
+ }
2996
2999
  }, instance.subTree.suspense);
2997
3000
  } else {
2998
3001
  cache.set(pendingCacheKey, getInnerChild(instance.subTree));
@@ -3393,12 +3396,41 @@ const getPublicInstance = (i) => {
3393
3396
  if (isStatefulComponent(i)) return getComponentPublicInstance(i);
3394
3397
  return getPublicInstance(i.parent);
3395
3398
  };
3399
+ const resolveDevRootEl = (vnode) => {
3400
+ let found = false;
3401
+ while (true) {
3402
+ if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
3403
+ const root = filterSingleRoot(vnode.children);
3404
+ if (!root) {
3405
+ return;
3406
+ }
3407
+ vnode = root;
3408
+ found = true;
3409
+ continue;
3410
+ }
3411
+ const component = vnode.component;
3412
+ if (component && component.subTree) {
3413
+ vnode = component.subTree;
3414
+ continue;
3415
+ }
3416
+ const suspense = vnode.suspense;
3417
+ if (suspense && suspense.activeBranch) {
3418
+ vnode = suspense.activeBranch;
3419
+ continue;
3420
+ }
3421
+ return found ? vnode.el : void 0;
3422
+ }
3423
+ };
3424
+ const getDevRootFragmentEl = (i) => {
3425
+ const el = i.subTree && resolveDevRootEl(i.subTree);
3426
+ return el === void 0 ? i.vnode.el : el;
3427
+ };
3396
3428
  const publicPropertiesMap = (
3397
3429
  // Move PURE marker to new line to workaround compiler discarding it
3398
3430
  // due to type annotation
3399
3431
  /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
3400
3432
  $: (i) => i,
3401
- $el: (i) => i.vnode.el,
3433
+ $el: (i) => !!(process.env.NODE_ENV !== "production") ? getDevRootFragmentEl(i) : i.vnode.el,
3402
3434
  $data: (i) => i.data,
3403
3435
  $props: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.props) : i.props,
3404
3436
  $attrs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.attrs) : i.attrs,
@@ -4505,7 +4537,7 @@ function emit(instance, event, ...rawArgs) {
4505
4537
  args = rawArgs.map((a) => isString(a) ? a.trim() : a);
4506
4538
  }
4507
4539
  if (modifiers.number) {
4508
- args = rawArgs.map(looseToNumber);
4540
+ args = args.map(looseToNumber);
4509
4541
  }
4510
4542
  }
4511
4543
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
@@ -7186,7 +7218,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
7186
7218
  if (suspense.deps <= 0) {
7187
7219
  suspense.resolve();
7188
7220
  } else if (isInFallback) {
7189
- if (!isHydrating) {
7221
+ if (!isHydrating && !suspense.isFallbackMountPending) {
7190
7222
  patch(
7191
7223
  activeBranch,
7192
7224
  newFallback,
@@ -7227,7 +7259,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
7227
7259
  );
7228
7260
  if (suspense.deps <= 0) {
7229
7261
  suspense.resolve();
7230
- } else {
7262
+ } else if (!suspense.isFallbackMountPending) {
7231
7263
  patch(
7232
7264
  activeBranch,
7233
7265
  newFallback,
@@ -7468,9 +7500,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7468
7500
  if (!suspense.isInFallback) {
7469
7501
  return;
7470
7502
  }
7503
+ const latestFallback = suspense.vnode.ssFallback;
7471
7504
  patch(
7472
7505
  null,
7473
- fallbackVNode,
7506
+ latestFallback,
7474
7507
  container2,
7475
7508
  anchor2,
7476
7509
  parentComponent2,
@@ -7480,7 +7513,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7480
7513
  slotScopeIds,
7481
7514
  optimized
7482
7515
  );
7483
- setActiveBranch(suspense, fallbackVNode);
7516
+ setActiveBranch(suspense, latestFallback);
7484
7517
  };
7485
7518
  const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
7486
7519
  if (delayEnter) {
@@ -8760,7 +8793,7 @@ function isMemoSame(cached, memo) {
8760
8793
  return true;
8761
8794
  }
8762
8795
 
8763
- const version = "3.5.41";
8796
+ const version = "3.5.42";
8764
8797
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8765
8798
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8766
8799
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.5.41",
3
+ "version": "3.5.42",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
48
48
  "dependencies": {
49
- "@vue/shared": "3.5.41",
50
- "@vue/reactivity": "3.5.41"
49
+ "@vue/shared": "3.5.42",
50
+ "@vue/reactivity": "3.5.42"
51
51
  }
52
52
  }