vue 3.4.7 → 3.4.8

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,3 +1,8 @@
1
+ /**
2
+ * vue v3.4.8
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/
1
6
  import * as runtimeDom from '@vue/runtime-dom';
2
7
  import { initCustomFormatter, registerRuntimeCompiler, warn } from '@vue/runtime-dom';
3
8
  export * from '@vue/runtime-dom';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * vue v3.4.8
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/
1
6
  var Vue = (function (exports) {
2
7
  'use strict';
3
8
 
@@ -2645,8 +2650,6 @@ var Vue = (function (exports) {
2645
2650
  return false;
2646
2651
  }
2647
2652
  function updateHOCHostEl({ vnode, parent }, el) {
2648
- if (!el)
2649
- return;
2650
2653
  while (parent) {
2651
2654
  const root = parent.subTree;
2652
2655
  if (root.suspense && root.suspense.activeBranch === vnode) {
@@ -3287,7 +3290,12 @@ If this is a native custom element, make sure to exclude it from component resol
3287
3290
  function setActiveBranch(suspense, branch) {
3288
3291
  suspense.activeBranch = branch;
3289
3292
  const { vnode, parentComponent } = suspense;
3290
- const el = vnode.el = branch.el;
3293
+ let el = branch.el;
3294
+ while (!el && branch.component) {
3295
+ branch = branch.component.subTree;
3296
+ el = branch.el;
3297
+ }
3298
+ vnode.el = el;
3291
3299
  if (parentComponent && parentComponent.subTree === vnode) {
3292
3300
  parentComponent.vnode.el = el;
3293
3301
  updateHOCHostEl(parentComponent, el);
@@ -6613,29 +6621,34 @@ Server rendered element contains fewer child nodes than client vdom.`
6613
6621
  let actual;
6614
6622
  let expected;
6615
6623
  if (key === "class") {
6616
- actual = toClassSet(el.getAttribute("class") || "");
6617
- expected = toClassSet(normalizeClass(clientValue));
6618
- if (!isSetEqual(actual, expected)) {
6624
+ actual = el.getAttribute("class");
6625
+ expected = normalizeClass(clientValue);
6626
+ if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
6619
6627
  mismatchType = mismatchKey = `class`;
6620
6628
  }
6621
6629
  } else if (key === "style") {
6622
- actual = toStyleMap(el.getAttribute("style") || "");
6623
- expected = toStyleMap(
6624
- isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue))
6625
- );
6630
+ actual = el.getAttribute("style");
6631
+ expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
6632
+ const actualMap = toStyleMap(actual);
6633
+ const expectedMap = toStyleMap(expected);
6626
6634
  if (vnode.dirs) {
6627
6635
  for (const { dir, value } of vnode.dirs) {
6628
6636
  if (dir.name === "show" && !value) {
6629
- expected.set("display", "none");
6637
+ expectedMap.set("display", "none");
6630
6638
  }
6631
6639
  }
6632
6640
  }
6633
- if (!isMapEqual(actual, expected)) {
6641
+ if (!isMapEqual(actualMap, expectedMap)) {
6634
6642
  mismatchType = mismatchKey = "style";
6635
6643
  }
6636
6644
  } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
6637
- actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
6638
- expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? "" : String(clientValue);
6645
+ if (isBooleanAttr(key)) {
6646
+ actual = el.hasAttribute(key);
6647
+ expected = includeBooleanAttr(clientValue);
6648
+ } else {
6649
+ actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
6650
+ expected = clientValue == null ? "" : String(clientValue);
6651
+ }
6639
6652
  if (actual !== expected) {
6640
6653
  mismatchType = `attribute`;
6641
6654
  mismatchKey = key;
@@ -9529,7 +9542,7 @@ Component that was made reactive: `,
9529
9542
  return true;
9530
9543
  }
9531
9544
 
9532
- const version = "3.4.7";
9545
+ const version = "3.4.8";
9533
9546
  const warn = warn$1 ;
9534
9547
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9535
9548
  const devtools = devtools$1 ;