@vue/runtime-dom 3.4.28 → 3.4.29

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.4.28
2
+ * @vue/runtime-dom v3.4.29
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -414,7 +414,7 @@ var VueRuntimeDOM = (function (exports) {
414
414
  /**
415
415
  * @internal
416
416
  */
417
- this._dirtyLevel = 4;
417
+ this._dirtyLevel = 5;
418
418
  /**
419
419
  * @internal
420
420
  */
@@ -434,14 +434,18 @@ var VueRuntimeDOM = (function (exports) {
434
434
  recordEffectScope(this, scope);
435
435
  }
436
436
  get dirty() {
437
- if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
437
+ if (this._dirtyLevel === 2)
438
+ return false;
439
+ if (this._dirtyLevel === 3 || this._dirtyLevel === 4) {
438
440
  this._dirtyLevel = 1;
439
441
  pauseTracking();
440
442
  for (let i = 0; i < this._depsLength; i++) {
441
443
  const dep = this.deps[i];
442
444
  if (dep.computed) {
445
+ if (dep.computed.effect._dirtyLevel === 2)
446
+ return true;
443
447
  triggerComputed(dep.computed);
444
- if (this._dirtyLevel >= 4) {
448
+ if (this._dirtyLevel >= 5) {
445
449
  break;
446
450
  }
447
451
  }
@@ -451,10 +455,10 @@ var VueRuntimeDOM = (function (exports) {
451
455
  }
452
456
  resetTracking();
453
457
  }
454
- return this._dirtyLevel >= 4;
458
+ return this._dirtyLevel >= 5;
455
459
  }
456
460
  set dirty(v) {
457
- this._dirtyLevel = v ? 4 : 0;
461
+ this._dirtyLevel = v ? 5 : 0;
458
462
  }
459
463
  run() {
460
464
  this._dirtyLevel = 0;
@@ -575,9 +579,18 @@ var VueRuntimeDOM = (function (exports) {
575
579
  var _a;
576
580
  pauseScheduling();
577
581
  for (const effect2 of dep.keys()) {
582
+ if (!dep.computed && effect2.computed) {
583
+ if (dep.get(effect2) === effect2._trackId && effect2._runnings > 0) {
584
+ effect2._dirtyLevel = 2;
585
+ continue;
586
+ }
587
+ }
578
588
  let tracking;
579
589
  if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
580
590
  effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
591
+ if (effect2.computed && effect2._dirtyLevel === 2) {
592
+ effect2._shouldSchedule = true;
593
+ }
581
594
  effect2._dirtyLevel = dirtyLevel;
582
595
  }
583
596
  if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
@@ -585,7 +598,7 @@ var VueRuntimeDOM = (function (exports) {
585
598
  (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
586
599
  }
587
600
  effect2.trigger();
588
- if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
601
+ if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 3) {
589
602
  effect2._shouldSchedule = false;
590
603
  if (effect2.scheduler) {
591
604
  queueEffectSchedulers.push(effect2.scheduler);
@@ -677,7 +690,7 @@ var VueRuntimeDOM = (function (exports) {
677
690
  if (dep) {
678
691
  triggerEffects(
679
692
  dep,
680
- 4,
693
+ 5,
681
694
  {
682
695
  target,
683
696
  type,
@@ -1280,7 +1293,7 @@ var VueRuntimeDOM = (function (exports) {
1280
1293
  () => getter(this._value),
1281
1294
  () => triggerRefValue(
1282
1295
  this,
1283
- this.effect._dirtyLevel === 2 ? 2 : 3
1296
+ this.effect._dirtyLevel === 3 ? 3 : 4
1284
1297
  )
1285
1298
  );
1286
1299
  this.effect.computed = this;
@@ -1290,7 +1303,7 @@ var VueRuntimeDOM = (function (exports) {
1290
1303
  get value() {
1291
1304
  const self = toRaw(this);
1292
1305
  if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
1293
- triggerRefValue(self, 4);
1306
+ triggerRefValue(self, 5);
1294
1307
  }
1295
1308
  trackRefValue(self);
1296
1309
  if (self.effect._dirtyLevel >= 2) {
@@ -1299,7 +1312,7 @@ var VueRuntimeDOM = (function (exports) {
1299
1312
 
1300
1313
  getter: `, this.getter);
1301
1314
  }
1302
- triggerRefValue(self, 2);
1315
+ triggerRefValue(self, 3);
1303
1316
  }
1304
1317
  return self._value;
1305
1318
  }
@@ -1354,7 +1367,7 @@ getter: `, this.getter);
1354
1367
  );
1355
1368
  }
1356
1369
  }
1357
- function triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) {
1370
+ function triggerRefValue(ref2, dirtyLevel = 5, newVal, oldVal) {
1358
1371
  ref2 = toRaw(ref2);
1359
1372
  const dep = ref2.dep;
1360
1373
  if (dep) {
@@ -1405,12 +1418,12 @@ getter: `, this.getter);
1405
1418
  const oldVal = this._rawValue;
1406
1419
  this._rawValue = newVal;
1407
1420
  this._value = useDirectValue ? newVal : toReactive(newVal);
1408
- triggerRefValue(this, 4, newVal, oldVal);
1421
+ triggerRefValue(this, 5, newVal, oldVal);
1409
1422
  }
1410
1423
  }
1411
1424
  }
1412
1425
  function triggerRef(ref2) {
1413
- triggerRefValue(ref2, 4, ref2.value );
1426
+ triggerRefValue(ref2, 5, ref2.value );
1414
1427
  }
1415
1428
  function unref(ref2) {
1416
1429
  return isRef(ref2) ? ref2.value : ref2;
@@ -9566,7 +9579,7 @@ Component that was made reactive: `,
9566
9579
  return true;
9567
9580
  }
9568
9581
 
9569
- const version = "3.4.28";
9582
+ const version = "3.4.29";
9570
9583
  const warn = warn$1 ;
9571
9584
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9572
9585
  const devtools = devtools$1 ;
@@ -10355,8 +10368,8 @@ Expected function or array of functions, received type ${typeof value}.`
10355
10368
 
10356
10369
  /*! #__NO_SIDE_EFFECTS__ */
10357
10370
  // @__NO_SIDE_EFFECTS__
10358
- function defineCustomElement(options, hydrate2) {
10359
- const Comp = defineComponent(options);
10371
+ function defineCustomElement(options, extraOptions, hydrate2) {
10372
+ const Comp = defineComponent(options, extraOptions);
10360
10373
  class VueCustomElement extends VueElement {
10361
10374
  constructor(initialProps) {
10362
10375
  super(Comp, initialProps, hydrate2);
@@ -10366,8 +10379,8 @@ Expected function or array of functions, received type ${typeof value}.`
10366
10379
  return VueCustomElement;
10367
10380
  }
10368
10381
  /*! #__NO_SIDE_EFFECTS__ */
10369
- const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => {
10370
- return /* @__PURE__ */ defineCustomElement(options, hydrate);
10382
+ const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
10383
+ return /* @__PURE__ */ defineCustomElement(options, extraOptions, hydrate);
10371
10384
  };
10372
10385
  const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
10373
10386
  };