@vue/compat 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/compat 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);
@@ -3094,8 +3099,6 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
3094
3099
  return false;
3095
3100
  }
3096
3101
  function updateHOCHostEl({ vnode, parent }, el) {
3097
- if (!el)
3098
- return;
3099
3102
  while (parent) {
3100
3103
  const root = parent.subTree;
3101
3104
  if (root.suspense && root.suspense.activeBranch === vnode) {
@@ -3740,7 +3743,12 @@ function queueEffectWithSuspense(fn, suspense) {
3740
3743
  function setActiveBranch(suspense, branch) {
3741
3744
  suspense.activeBranch = branch;
3742
3745
  const { vnode, parentComponent } = suspense;
3743
- const el = vnode.el = branch.el;
3746
+ let el = branch.el;
3747
+ while (!el && branch.component) {
3748
+ branch = branch.component.subTree;
3749
+ el = branch.el;
3750
+ }
3751
+ vnode.el = el;
3744
3752
  if (parentComponent && parentComponent.subTree === vnode) {
3745
3753
  parentComponent.vnode.el = el;
3746
3754
  updateHOCHostEl(parentComponent, el);
@@ -6455,7 +6463,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6455
6463
  return vm;
6456
6464
  }
6457
6465
  }
6458
- Vue.version = `2.6.14-compat:${"3.4.7"}`;
6466
+ Vue.version = `2.6.14-compat:${"3.4.8"}`;
6459
6467
  Vue.config = singletonApp.config;
6460
6468
  Vue.use = (p, ...options) => {
6461
6469
  if (p && isFunction(p.install)) {
@@ -8181,29 +8189,34 @@ function propHasMismatch(el, key, clientValue, vnode) {
8181
8189
  let actual;
8182
8190
  let expected;
8183
8191
  if (key === "class") {
8184
- actual = toClassSet(el.getAttribute("class") || "");
8185
- expected = toClassSet(normalizeClass(clientValue));
8186
- if (!isSetEqual(actual, expected)) {
8192
+ actual = el.getAttribute("class");
8193
+ expected = normalizeClass(clientValue);
8194
+ if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
8187
8195
  mismatchType = mismatchKey = `class`;
8188
8196
  }
8189
8197
  } else if (key === "style") {
8190
- actual = toStyleMap(el.getAttribute("style") || "");
8191
- expected = toStyleMap(
8192
- isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue))
8193
- );
8198
+ actual = el.getAttribute("style");
8199
+ expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
8200
+ const actualMap = toStyleMap(actual);
8201
+ const expectedMap = toStyleMap(expected);
8194
8202
  if (vnode.dirs) {
8195
8203
  for (const { dir, value } of vnode.dirs) {
8196
8204
  if (dir.name === "show" && !value) {
8197
- expected.set("display", "none");
8205
+ expectedMap.set("display", "none");
8198
8206
  }
8199
8207
  }
8200
8208
  }
8201
- if (!isMapEqual(actual, expected)) {
8209
+ if (!isMapEqual(actualMap, expectedMap)) {
8202
8210
  mismatchType = mismatchKey = "style";
8203
8211
  }
8204
8212
  } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
8205
- actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
8206
- expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? "" : String(clientValue);
8213
+ if (isBooleanAttr(key)) {
8214
+ actual = el.hasAttribute(key);
8215
+ expected = includeBooleanAttr(clientValue);
8216
+ } else {
8217
+ actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
8218
+ expected = clientValue == null ? "" : String(clientValue);
8219
+ }
8207
8220
  if (actual !== expected) {
8208
8221
  mismatchType = `attribute`;
8209
8222
  mismatchKey = key;
@@ -11204,7 +11217,7 @@ function isMemoSame(cached, memo) {
11204
11217
  return true;
11205
11218
  }
11206
11219
 
11207
- const version = "3.4.7";
11220
+ const version = "3.4.8";
11208
11221
  const warn = warn$1 ;
11209
11222
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11210
11223
  const devtools = devtools$1 ;