@vue/runtime-core 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/runtime-core 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 });
@@ -1096,8 +1101,6 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
1096
1101
  return false;
1097
1102
  }
1098
1103
  function updateHOCHostEl({ vnode, parent }, el) {
1099
- if (!el)
1100
- return;
1101
1104
  while (parent) {
1102
1105
  const root = parent.subTree;
1103
1106
  if (root.suspense && root.suspense.activeBranch === vnode) {
@@ -1738,7 +1741,12 @@ function queueEffectWithSuspense(fn, suspense) {
1738
1741
  function setActiveBranch(suspense, branch) {
1739
1742
  suspense.activeBranch = branch;
1740
1743
  const { vnode, parentComponent } = suspense;
1741
- const el = vnode.el = branch.el;
1744
+ let el = branch.el;
1745
+ while (!el && branch.component) {
1746
+ branch = branch.component.subTree;
1747
+ el = branch.el;
1748
+ }
1749
+ vnode.el = el;
1742
1750
  if (parentComponent && parentComponent.subTree === vnode) {
1743
1751
  parentComponent.vnode.el = el;
1744
1752
  updateHOCHostEl(parentComponent, el);
@@ -5097,29 +5105,34 @@ function propHasMismatch(el, key, clientValue, vnode) {
5097
5105
  let actual;
5098
5106
  let expected;
5099
5107
  if (key === "class") {
5100
- actual = toClassSet(el.getAttribute("class") || "");
5101
- expected = toClassSet(shared.normalizeClass(clientValue));
5102
- if (!isSetEqual(actual, expected)) {
5108
+ actual = el.getAttribute("class");
5109
+ expected = shared.normalizeClass(clientValue);
5110
+ if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
5103
5111
  mismatchType = mismatchKey = `class`;
5104
5112
  }
5105
5113
  } else if (key === "style") {
5106
- actual = toStyleMap(el.getAttribute("style") || "");
5107
- expected = toStyleMap(
5108
- shared.isString(clientValue) ? clientValue : shared.stringifyStyle(shared.normalizeStyle(clientValue))
5109
- );
5114
+ actual = el.getAttribute("style");
5115
+ expected = shared.isString(clientValue) ? clientValue : shared.stringifyStyle(shared.normalizeStyle(clientValue));
5116
+ const actualMap = toStyleMap(actual);
5117
+ const expectedMap = toStyleMap(expected);
5110
5118
  if (vnode.dirs) {
5111
5119
  for (const { dir, value } of vnode.dirs) {
5112
5120
  if (dir.name === "show" && !value) {
5113
- expected.set("display", "none");
5121
+ expectedMap.set("display", "none");
5114
5122
  }
5115
5123
  }
5116
5124
  }
5117
- if (!isMapEqual(actual, expected)) {
5125
+ if (!isMapEqual(actualMap, expectedMap)) {
5118
5126
  mismatchType = mismatchKey = "style";
5119
5127
  }
5120
5128
  } else if (el instanceof SVGElement && shared.isKnownSvgAttr(key) || el instanceof HTMLElement && (shared.isBooleanAttr(key) || shared.isKnownHtmlAttr(key))) {
5121
- actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
5122
- expected = shared.isBooleanAttr(key) ? shared.includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? "" : String(clientValue);
5129
+ if (shared.isBooleanAttr(key)) {
5130
+ actual = el.hasAttribute(key);
5131
+ expected = shared.includeBooleanAttr(clientValue);
5132
+ } else {
5133
+ actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
5134
+ expected = clientValue == null ? "" : String(clientValue);
5135
+ }
5123
5136
  if (actual !== expected) {
5124
5137
  mismatchType = `attribute`;
5125
5138
  mismatchKey = key;
@@ -8034,7 +8047,7 @@ function isMemoSame(cached, memo) {
8034
8047
  return true;
8035
8048
  }
8036
8049
 
8037
- const version = "3.4.7";
8050
+ const version = "3.4.8";
8038
8051
  const warn = warn$1 ;
8039
8052
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8040
8053
  const devtools = devtools$1 ;
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @vue/runtime-core 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 });
@@ -604,8 +609,6 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
604
609
  return false;
605
610
  }
606
611
  function updateHOCHostEl({ vnode, parent }, el) {
607
- if (!el)
608
- return;
609
612
  while (parent) {
610
613
  const root = parent.subTree;
611
614
  if (root.suspense && root.suspense.activeBranch === vnode) {
@@ -1206,7 +1209,12 @@ function queueEffectWithSuspense(fn, suspense) {
1206
1209
  function setActiveBranch(suspense, branch) {
1207
1210
  suspense.activeBranch = branch;
1208
1211
  const { vnode, parentComponent } = suspense;
1209
- const el = vnode.el = branch.el;
1212
+ let el = branch.el;
1213
+ while (!el && branch.component) {
1214
+ branch = branch.component.subTree;
1215
+ el = branch.el;
1216
+ }
1217
+ vnode.el = el;
1210
1218
  if (parentComponent && parentComponent.subTree === vnode) {
1211
1219
  parentComponent.vnode.el = el;
1212
1220
  updateHOCHostEl(parentComponent, el);
@@ -6265,7 +6273,7 @@ function isMemoSame(cached, memo) {
6265
6273
  return true;
6266
6274
  }
6267
6275
 
6268
- const version = "3.4.7";
6276
+ const version = "3.4.8";
6269
6277
  const warn$1 = shared.NOOP;
6270
6278
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6271
6279
  const devtools = void 0;
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @vue/runtime-core v3.4.8
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/
1
6
  import { pauseTracking, resetTracking, isRef, toRaw, isShallow as isShallow$1, isReactive, ReactiveEffect, getCurrentScope, ref, shallowReadonly, track, customRef, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';
2
7
  export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
3
8
  import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, capitalize, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, isGloballyAllowed, NO, def, isReservedProp, EMPTY_ARR, toRawType, makeMap, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr } from '@vue/shared';
@@ -1098,8 +1103,6 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
1098
1103
  return false;
1099
1104
  }
1100
1105
  function updateHOCHostEl({ vnode, parent }, el) {
1101
- if (!el)
1102
- return;
1103
1106
  while (parent) {
1104
1107
  const root = parent.subTree;
1105
1108
  if (root.suspense && root.suspense.activeBranch === vnode) {
@@ -1740,7 +1743,12 @@ function queueEffectWithSuspense(fn, suspense) {
1740
1743
  function setActiveBranch(suspense, branch) {
1741
1744
  suspense.activeBranch = branch;
1742
1745
  const { vnode, parentComponent } = suspense;
1743
- const el = vnode.el = branch.el;
1746
+ let el = branch.el;
1747
+ while (!el && branch.component) {
1748
+ branch = branch.component.subTree;
1749
+ el = branch.el;
1750
+ }
1751
+ vnode.el = el;
1744
1752
  if (parentComponent && parentComponent.subTree === vnode) {
1745
1753
  parentComponent.vnode.el = el;
1746
1754
  updateHOCHostEl(parentComponent, el);
@@ -5115,29 +5123,34 @@ function propHasMismatch(el, key, clientValue, vnode) {
5115
5123
  let actual;
5116
5124
  let expected;
5117
5125
  if (key === "class") {
5118
- actual = toClassSet(el.getAttribute("class") || "");
5119
- expected = toClassSet(normalizeClass(clientValue));
5120
- if (!isSetEqual(actual, expected)) {
5126
+ actual = el.getAttribute("class");
5127
+ expected = normalizeClass(clientValue);
5128
+ if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
5121
5129
  mismatchType = mismatchKey = `class`;
5122
5130
  }
5123
5131
  } else if (key === "style") {
5124
- actual = toStyleMap(el.getAttribute("style") || "");
5125
- expected = toStyleMap(
5126
- isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue))
5127
- );
5132
+ actual = el.getAttribute("style");
5133
+ expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
5134
+ const actualMap = toStyleMap(actual);
5135
+ const expectedMap = toStyleMap(expected);
5128
5136
  if (vnode.dirs) {
5129
5137
  for (const { dir, value } of vnode.dirs) {
5130
5138
  if (dir.name === "show" && !value) {
5131
- expected.set("display", "none");
5139
+ expectedMap.set("display", "none");
5132
5140
  }
5133
5141
  }
5134
5142
  }
5135
- if (!isMapEqual(actual, expected)) {
5143
+ if (!isMapEqual(actualMap, expectedMap)) {
5136
5144
  mismatchType = mismatchKey = "style";
5137
5145
  }
5138
5146
  } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
5139
- actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
5140
- expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? "" : String(clientValue);
5147
+ if (isBooleanAttr(key)) {
5148
+ actual = el.hasAttribute(key);
5149
+ expected = includeBooleanAttr(clientValue);
5150
+ } else {
5151
+ actual = el.hasAttribute(key) ? el.getAttribute(key) : key in el ? el[key] : "";
5152
+ expected = clientValue == null ? "" : String(clientValue);
5153
+ }
5141
5154
  if (actual !== expected) {
5142
5155
  mismatchType = `attribute`;
5143
5156
  mismatchKey = key;
@@ -8106,7 +8119,7 @@ function isMemoSame(cached, memo) {
8106
8119
  return true;
8107
8120
  }
8108
8121
 
8109
- const version = "3.4.7";
8122
+ const version = "3.4.8";
8110
8123
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8111
8124
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8112
8125
  const devtools = !!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__ ? devtools$1 : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.4.7",
3
+ "version": "3.4.8",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
34
34
  "dependencies": {
35
- "@vue/shared": "3.4.7",
36
- "@vue/reactivity": "3.4.7"
35
+ "@vue/reactivity": "3.4.8",
36
+ "@vue/shared": "3.4.8"
37
37
  }
38
38
  }