@vtj/materials 0.8.137 → 0.8.139

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 v3.5.5
2
+ * vue v3.5.6
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -535,7 +535,7 @@ var Vue = (function (exports) {
535
535
  /**
536
536
  * @internal
537
537
  */
538
- this.nextEffect = void 0;
538
+ this.next = void 0;
539
539
  /**
540
540
  * @internal
541
541
  */
@@ -565,9 +565,7 @@ var Vue = (function (exports) {
565
565
  return;
566
566
  }
567
567
  if (!(this.flags & 8)) {
568
- this.flags |= 8;
569
- this.nextEffect = batchedEffect;
570
- batchedEffect = this;
568
+ batch(this);
571
569
  }
572
570
  }
573
571
  run() {
@@ -628,7 +626,12 @@ var Vue = (function (exports) {
628
626
  }
629
627
  }
630
628
  let batchDepth = 0;
631
- let batchedEffect;
629
+ let batchedSub;
630
+ function batch(sub) {
631
+ sub.flags |= 8;
632
+ sub.next = batchedSub;
633
+ batchedSub = sub;
634
+ }
632
635
  function startBatch() {
633
636
  batchDepth++;
634
637
  }
@@ -637,15 +640,16 @@ var Vue = (function (exports) {
637
640
  return;
638
641
  }
639
642
  let error;
640
- while (batchedEffect) {
641
- let e = batchedEffect;
642
- batchedEffect = void 0;
643
+ while (batchedSub) {
644
+ let e = batchedSub;
645
+ batchedSub = void 0;
643
646
  while (e) {
644
- const next = e.nextEffect;
645
- e.nextEffect = void 0;
647
+ const next = e.next;
648
+ e.next = void 0;
646
649
  e.flags &= ~8;
647
650
  if (e.flags & 1) {
648
651
  try {
652
+ ;
649
653
  e.trigger();
650
654
  } catch (err) {
651
655
  if (!error) error = err;
@@ -685,7 +689,7 @@ var Vue = (function (exports) {
685
689
  }
686
690
  function isDirty(sub) {
687
691
  for (let link = sub.deps; link; link = link.nextDep) {
688
- if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed) || link.dep.version !== link.version) {
692
+ if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {
689
693
  return true;
690
694
  }
691
695
  }
@@ -705,7 +709,7 @@ var Vue = (function (exports) {
705
709
  computed.globalVersion = globalVersion;
706
710
  const dep = computed.dep;
707
711
  computed.flags |= 2;
708
- if (dep.version > 0 && !computed.isSSR && !isDirty(computed)) {
712
+ if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
709
713
  computed.flags &= ~2;
710
714
  return;
711
715
  }
@@ -900,7 +904,10 @@ var Vue = (function (exports) {
900
904
  }
901
905
  }
902
906
  for (let link = this.subs; link; link = link.prevSub) {
903
- link.sub.notify();
907
+ if (link.sub.notify()) {
908
+ ;
909
+ link.sub.dep.notify();
910
+ }
904
911
  }
905
912
  } finally {
906
913
  endBatch();
@@ -1969,8 +1976,10 @@ var Vue = (function (exports) {
1969
1976
  */
1970
1977
  notify() {
1971
1978
  this.flags |= 16;
1972
- if (activeSub !== this) {
1973
- this.dep.notify();
1979
+ if (!(this.flags & 8) && // avoid infinite self recursion
1980
+ activeSub !== this) {
1981
+ batch(this);
1982
+ return true;
1974
1983
  }
1975
1984
  }
1976
1985
  get value() {
@@ -2118,20 +2127,12 @@ var Vue = (function (exports) {
2118
2127
  remove(scope.effects, effect);
2119
2128
  }
2120
2129
  };
2121
- if (once) {
2122
- if (cb) {
2123
- const _cb = cb;
2124
- cb = (...args) => {
2125
- _cb(...args);
2126
- watchHandle();
2127
- };
2128
- } else {
2129
- const _getter = getter;
2130
- getter = () => {
2131
- _getter();
2132
- watchHandle();
2133
- };
2134
- }
2130
+ if (once && cb) {
2131
+ const _cb = cb;
2132
+ cb = (...args) => {
2133
+ _cb(...args);
2134
+ watchHandle();
2135
+ };
2135
2136
  }
2136
2137
  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
2137
2138
  const job = (immediateFirstRun) => {
@@ -10420,7 +10421,7 @@ Component that was made reactive: `,
10420
10421
  return true;
10421
10422
  }
10422
10423
 
10423
- const version = "3.5.5";
10424
+ const version = "3.5.6";
10424
10425
  const warn = warn$1 ;
10425
10426
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10426
10427
  const devtools = devtools$1 ;