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.
package/dist/vue.cjs.js CHANGED
@@ -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
  'use strict';
2
7
 
3
8
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -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
  'use strict';
2
7
 
3
8
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -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
  function makeMap(str, expectsLowerCase) {
2
7
  const set = new Set(str.split(","));
3
8
  return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
@@ -2642,8 +2647,6 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
2642
2647
  return false;
2643
2648
  }
2644
2649
  function updateHOCHostEl({ vnode, parent }, el) {
2645
- if (!el)
2646
- return;
2647
2650
  while (parent) {
2648
2651
  const root = parent.subTree;
2649
2652
  if (root.suspense && root.suspense.activeBranch === vnode) {
@@ -3284,7 +3287,12 @@ function queueEffectWithSuspense(fn, suspense) {
3284
3287
  function setActiveBranch(suspense, branch) {
3285
3288
  suspense.activeBranch = branch;
3286
3289
  const { vnode, parentComponent } = suspense;
3287
- const el = vnode.el = branch.el;
3290
+ let el = branch.el;
3291
+ while (!el && branch.component) {
3292
+ branch = branch.component.subTree;
3293
+ el = branch.el;
3294
+ }
3295
+ vnode.el = el;
3288
3296
  if (parentComponent && parentComponent.subTree === vnode) {
3289
3297
  parentComponent.vnode.el = el;
3290
3298
  updateHOCHostEl(parentComponent, el);
@@ -6616,29 +6624,34 @@ function propHasMismatch(el, key, clientValue, vnode) {
6616
6624
  let actual;
6617
6625
  let expected;
6618
6626
  if (key === "class") {
6619
- actual = toClassSet(el.getAttribute("class") || "");
6620
- expected = toClassSet(normalizeClass(clientValue));
6621
- if (!isSetEqual(actual, expected)) {
6627
+ actual = el.getAttribute("class");
6628
+ expected = normalizeClass(clientValue);
6629
+ if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
6622
6630
  mismatchType = mismatchKey = `class`;
6623
6631
  }
6624
6632
  } else if (key === "style") {
6625
- actual = toStyleMap(el.getAttribute("style") || "");
6626
- expected = toStyleMap(
6627
- isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue))
6628
- );
6633
+ actual = el.getAttribute("style");
6634
+ expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
6635
+ const actualMap = toStyleMap(actual);
6636
+ const expectedMap = toStyleMap(expected);
6629
6637
  if (vnode.dirs) {
6630
6638
  for (const { dir, value } of vnode.dirs) {
6631
6639
  if (dir.name === "show" && !value) {
6632
- expected.set("display", "none");
6640
+ expectedMap.set("display", "none");
6633
6641
  }
6634
6642
  }
6635
6643
  }
6636
- if (!isMapEqual(actual, expected)) {
6644
+ if (!isMapEqual(actualMap, expectedMap)) {
6637
6645
  mismatchType = mismatchKey = "style";
6638
6646
  }
6639
6647
  } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
6640
- actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
6641
- expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? "" : String(clientValue);
6648
+ if (isBooleanAttr(key)) {
6649
+ actual = el.hasAttribute(key);
6650
+ expected = includeBooleanAttr(clientValue);
6651
+ } else {
6652
+ actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
6653
+ expected = clientValue == null ? "" : String(clientValue);
6654
+ }
6642
6655
  if (actual !== expected) {
6643
6656
  mismatchType = `attribute`;
6644
6657
  mismatchKey = key;
@@ -9532,7 +9545,7 @@ function isMemoSame(cached, memo) {
9532
9545
  return true;
9533
9546
  }
9534
9547
 
9535
- const version = "3.4.7";
9548
+ const version = "3.4.8";
9536
9549
  const warn = warn$1 ;
9537
9550
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9538
9551
  const devtools = devtools$1 ;