aoye 0.0.58 → 0.0.60

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.
package/dist/aoye.esm.js CHANGED
@@ -731,14 +731,25 @@ class Scope {
731
731
  }
732
732
  }
733
733
  class NoopEffect {
734
- constructor(callback) {
734
+ constructor(callback, _type) {
735
735
  this.callback = callback;
736
736
  const scope = new Scope(callback);
737
737
  scope.get();
738
738
  return scope;
739
739
  }
740
740
  }
741
- const noopEffect = callback => {
741
+ const noopEffect = (callback, deps, _opt) => {
742
+ if (deps && deps.length > 0) {
743
+ const scope = new Scope(() => {
744
+ const vs = deps.map(d => ({
745
+ old: undefined,
746
+ val: typeof d === 'function' ? d() : d.get()
747
+ }));
748
+ callback(...vs);
749
+ });
750
+ scope.get();
751
+ return scope;
752
+ }
742
753
  const scope = new Scope(callback);
743
754
  scope.get();
744
755
  return scope;
@@ -1426,6 +1437,7 @@ const isParentKey = (parentStore, expr) => expr in parentStore[Keys.Raw];
1426
1437
  class Store {
1427
1438
  static [IsStore] = true;
1428
1439
  static [StoreIgnoreKeys] = ['ui', 'raw'];
1440
+ static [Keys.ProxyFreeObject] = true;
1429
1441
  static Current = null;
1430
1442
  constructor() {
1431
1443
  const proxy = deepSignal(this, getPulling(), true);