@vue/runtime-dom 3.5.0-beta.3 → 3.5.0-rc.1

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-dom v3.5.0-beta.3
2
+ * @vue/runtime-dom v3.5.0-rc.1
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -340,12 +340,13 @@ var VueRuntimeDOM = (function (exports) {
340
340
  pause() {
341
341
  if (this._active) {
342
342
  this._isPaused = true;
343
+ let i, l;
343
344
  if (this.scopes) {
344
- for (let i = 0, l = this.scopes.length; i < l; i++) {
345
+ for (i = 0, l = this.scopes.length; i < l; i++) {
345
346
  this.scopes[i].pause();
346
347
  }
347
348
  }
348
- for (let i = 0, l = this.effects.length; i < l; i++) {
349
+ for (i = 0, l = this.effects.length; i < l; i++) {
349
350
  this.effects[i].pause();
350
351
  }
351
352
  }
@@ -357,12 +358,13 @@ var VueRuntimeDOM = (function (exports) {
357
358
  if (this._active) {
358
359
  if (this._isPaused) {
359
360
  this._isPaused = false;
361
+ let i, l;
360
362
  if (this.scopes) {
361
- for (let i = 0, l = this.scopes.length; i < l; i++) {
363
+ for (i = 0, l = this.scopes.length; i < l; i++) {
362
364
  this.scopes[i].resume();
363
365
  }
364
366
  }
365
- for (let i = 0, l = this.effects.length; i < l; i++) {
367
+ for (i = 0, l = this.effects.length; i < l; i++) {
366
368
  this.effects[i].resume();
367
369
  }
368
370
  }
@@ -555,11 +557,9 @@ var VueRuntimeDOM = (function (exports) {
555
557
  batchDepth++;
556
558
  }
557
559
  function endBatch() {
558
- if (batchDepth > 1) {
559
- batchDepth--;
560
+ if (--batchDepth > 0) {
560
561
  return;
561
562
  }
562
- batchDepth--;
563
563
  let error;
564
564
  while (batchedEffect) {
565
565
  let e = batchedEffect;
@@ -1218,7 +1218,12 @@ var VueRuntimeDOM = (function (exports) {
1218
1218
  }
1219
1219
  }
1220
1220
  const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
1221
- const result = Reflect.set(target, key, value, receiver);
1221
+ const result = Reflect.set(
1222
+ target,
1223
+ key,
1224
+ value,
1225
+ isRef(target) ? target : receiver
1226
+ );
1222
1227
  if (target === toRaw(receiver)) {
1223
1228
  if (!hadKey) {
1224
1229
  trigger(target, "add", key, value);
@@ -2031,18 +2036,25 @@ var VueRuntimeDOM = (function (exports) {
2031
2036
  const depth = deep === true ? Infinity : deep;
2032
2037
  getter = () => traverse(baseGetter(), depth);
2033
2038
  }
2039
+ const scope = getCurrentScope();
2040
+ const watchHandle = () => {
2041
+ effect.stop();
2042
+ if (scope) {
2043
+ remove(scope.effects, effect);
2044
+ }
2045
+ };
2034
2046
  if (once) {
2035
2047
  if (cb) {
2036
2048
  const _cb = cb;
2037
2049
  cb = (...args) => {
2038
2050
  _cb(...args);
2039
- effect.stop();
2051
+ watchHandle();
2040
2052
  };
2041
2053
  } else {
2042
2054
  const _getter = getter;
2043
2055
  getter = () => {
2044
2056
  _getter();
2045
- effect.stop();
2057
+ watchHandle();
2046
2058
  };
2047
2059
  }
2048
2060
  }
@@ -2111,13 +2123,6 @@ var VueRuntimeDOM = (function (exports) {
2111
2123
  } else {
2112
2124
  effect.run();
2113
2125
  }
2114
- const scope = getCurrentScope();
2115
- const watchHandle = () => {
2116
- effect.stop();
2117
- if (scope) {
2118
- remove(scope.effects, effect);
2119
- }
2120
- };
2121
2126
  watchHandle.pause = effect.pause.bind(effect);
2122
2127
  watchHandle.resume = effect.resume.bind(effect);
2123
2128
  watchHandle.stop = watchHandle;
@@ -3566,7 +3571,7 @@ var VueRuntimeDOM = (function (exports) {
3566
3571
  // @__NO_SIDE_EFFECTS__
3567
3572
  function defineComponent(options, extraOptions) {
3568
3573
  return isFunction(options) ? (
3569
- // #8326: extend call and options.name access are considered side-effects
3574
+ // #8236: extend call and options.name access are considered side-effects
3570
3575
  // by Rollup, so we have to wrap it in a pure-annotated IIFE.
3571
3576
  /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
3572
3577
  ) : options;
@@ -4687,6 +4692,7 @@ Server rendered element contains fewer child nodes than client vdom.`
4687
4692
  );
4688
4693
  const { include, exclude, max } = props;
4689
4694
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
4695
+ vnode.shapeFlag &= ~256;
4690
4696
  current = vnode;
4691
4697
  return rawVNode;
4692
4698
  }
@@ -10302,7 +10308,7 @@ Component that was made reactive: `,
10302
10308
  return true;
10303
10309
  }
10304
10310
 
10305
- const version = "3.5.0-beta.3";
10311
+ const version = "3.5.0-rc.1";
10306
10312
  const warn = warn$1 ;
10307
10313
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10308
10314
  const devtools = devtools$1 ;
@@ -10912,8 +10918,9 @@ Component that was made reactive: `,
10912
10918
 
10913
10919
  function patchDOMProp(el, key, value, parentComponent) {
10914
10920
  if (key === "innerHTML" || key === "textContent") {
10915
- if (value == null) return;
10916
- el[key] = value;
10921
+ if (value != null) {
10922
+ el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
10923
+ }
10917
10924
  return;
10918
10925
  }
10919
10926
  const tag = el.tagName;
@@ -11340,6 +11347,9 @@ Expected function or array of functions, received type ${typeof value}.`
11340
11347
  delete this._props[key];
11341
11348
  } else {
11342
11349
  this._props[key] = val;
11350
+ if (key === "key" && this._app) {
11351
+ this._app._ceVNode.key = val;
11352
+ }
11343
11353
  }
11344
11354
  if (shouldUpdate && this._instance) {
11345
11355
  this._update();