mutts 1.0.10 → 1.0.12

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.
Files changed (61) hide show
  1. package/README.md +3 -3
  2. package/dist/browser.cjs +244 -3199
  3. package/dist/browser.cjs.map +1 -1
  4. package/dist/browser.d.ts +2 -2
  5. package/dist/browser.dev.cjs +51 -50
  6. package/dist/browser.dev.cjs.map +1 -1
  7. package/dist/browser.dev.d.ts +2 -2
  8. package/dist/browser.dev.esm.js +2 -2
  9. package/dist/browser.esm.js +15 -13
  10. package/dist/browser.esm.js.map +1 -1
  11. package/dist/chunks/{index-CaaQQlPJ.esm.js → index-BUop6B2U.esm.js} +384 -981
  12. package/dist/chunks/index-BUop6B2U.esm.js.map +1 -0
  13. package/dist/chunks/index-yK0HVxHv.cjs +2612 -0
  14. package/dist/chunks/index-yK0HVxHv.cjs.map +1 -0
  15. package/dist/chunks/{node-nKJBk8iJ.esm.js → node-Bo7WU5S2.esm.js} +2 -2
  16. package/dist/chunks/{node-nKJBk8iJ.esm.js.map → node-Bo7WU5S2.esm.js.map} +1 -1
  17. package/dist/chunks/{async-node-3PrbVAbB.cjs → node-Dd0esp5F.cjs} +4 -4
  18. package/dist/chunks/node-Dd0esp5F.cjs.map +1 -0
  19. package/dist/chunks/{proxy-Dtg-bJ3T.cjs → proxy-BvM4yewA.cjs} +441 -342
  20. package/dist/chunks/proxy-BvM4yewA.cjs.map +1 -0
  21. package/dist/chunks/{proxy-r7lARftl.esm.js → proxy-D2C49sXH.esm.js} +401 -330
  22. package/dist/chunks/proxy-D2C49sXH.esm.js.map +1 -0
  23. package/dist/debug.cjs +17 -4
  24. package/dist/debug.cjs.map +1 -1
  25. package/dist/debug.d.ts +2 -2
  26. package/dist/debug.esm.js +17 -3
  27. package/dist/debug.esm.js.map +1 -1
  28. package/dist/index.d.ts +84 -209
  29. package/dist/mutts.umd.js +842 -1362
  30. package/dist/mutts.umd.js.map +1 -1
  31. package/dist/mutts.umd.min.js +1 -1
  32. package/dist/mutts.umd.min.js.map +1 -1
  33. package/dist/node.cjs +51 -49
  34. package/dist/node.cjs.map +1 -1
  35. package/dist/node.d.ts +2 -2
  36. package/dist/node.dev.cjs +51 -49
  37. package/dist/node.dev.cjs.map +1 -1
  38. package/dist/node.dev.d.ts +2 -2
  39. package/dist/node.dev.esm.js +3 -3
  40. package/dist/node.esm.js +3 -3
  41. package/dist/{types-W5vD6m2n.d.ts → types-Bx2PhORg.d.ts} +38 -47
  42. package/docs/ai/api-reference.md +0 -14
  43. package/docs/ai/manual.md +2 -22
  44. package/docs/reactive/advanced.md +13 -14
  45. package/docs/reactive/attend.md +1 -2
  46. package/docs/reactive/collections.md +2 -149
  47. package/docs/reactive/core.md +218 -96
  48. package/docs/reactive/debugging.md +2 -2
  49. package/docs/reactive/resource.md +1 -1
  50. package/docs/reactive.md +1 -3
  51. package/docs/zone.md +1 -1
  52. package/package.json +18 -9
  53. package/dist/chunks/async-browser-BU_IfxYD.cjs +0 -216
  54. package/dist/chunks/async-browser-BU_IfxYD.cjs.map +0 -1
  55. package/dist/chunks/async-core-CRLKP3l-.cjs +0 -29
  56. package/dist/chunks/async-core-CRLKP3l-.cjs.map +0 -1
  57. package/dist/chunks/async-node-3PrbVAbB.cjs.map +0 -1
  58. package/dist/chunks/index-CaaQQlPJ.esm.js.map +0 -1
  59. package/dist/chunks/proxy-Dtg-bJ3T.cjs.map +0 -1
  60. package/dist/chunks/proxy-r7lARftl.esm.js.map +0 -1
  61. package/docs/reactive/scan.md +0 -324
package/dist/node.cjs CHANGED
@@ -1,51 +1,46 @@
1
1
  'use strict';
2
2
 
3
- require('./chunks/async-node-3PrbVAbB.cjs');
4
- var browser = require('./browser.cjs');
5
- var proxy = require('./chunks/proxy-Dtg-bJ3T.cjs');
6
- var asyncCore = require('./chunks/async-core-CRLKP3l-.cjs');
3
+ require('./chunks/node-Dd0esp5F.cjs');
4
+ var index = require('./chunks/index-yK0HVxHv.cjs');
5
+ var proxy = require('./chunks/proxy-BvM4yewA.cjs');
7
6
  require('node:async_hooks');
8
- require('./chunks/async-browser-BU_IfxYD.cjs');
9
7
 
10
8
 
11
9
 
12
- exports.ArrayReadForward = browser.ArrayReadForward;
13
- exports.Destroyable = browser.Destroyable;
14
- exports.DestructionError = browser.DestructionError;
15
- exports.Eventful = browser.Eventful;
16
- exports.Indexable = browser.Indexable;
17
- exports.Register = browser.Register;
18
- exports.allocated = browser.allocated;
19
- exports.allocatedValues = browser.allocatedValues;
20
- exports.arrayDiff = browser.arrayDiff;
21
- exports.attend = browser.attend;
22
- exports.cache = browser.cache;
23
- exports.cached = browser.cached;
24
- exports.callOnGC = browser.callOnGC;
25
- exports.chainPromise = browser.chainPromise;
26
- exports.debounce = browser.debounce;
27
- exports.deepWatch = browser.deepWatch;
28
- exports.deprecated = browser.deprecated;
29
- exports.descriptor = browser.descriptor;
30
- exports.destructor = browser.destructor;
31
- exports.forwardArray = browser.forwardArray;
32
- exports.getAt = browser.getAt;
33
- exports.isCached = browser.isCached;
34
- exports.lift = browser.lift;
35
- exports.memoize = browser.memoize;
36
- exports.morph = browser.morph;
37
- exports.organize = browser.organize;
38
- exports.organized = browser.organized;
39
- exports.profileInfo = browser.profileInfo;
40
- exports.project = browser.morph;
41
- exports.register = browser.register;
42
- exports.resource = browser.resource;
43
- exports.scan = browser.scan;
44
- exports.setAt = browser.setAt;
45
- exports.throttle = browser.throttle;
46
- exports.unreactive = browser.unreactive;
47
- exports.watch = browser.watch;
48
- exports.when = browser.when;
10
+ exports.ArrayReadForward = index.ArrayReadForward;
11
+ exports.Destroyable = index.Destroyable;
12
+ exports.DestructionError = index.DestructionError;
13
+ exports.Eventful = index.Eventful;
14
+ exports.Indexable = index.Indexable;
15
+ exports.allocated = index.allocated;
16
+ exports.allocatedValues = index.allocatedValues;
17
+ exports.arrayDiff = index.arrayDiff;
18
+ exports.attend = index.attend;
19
+ exports.cache = index.cache;
20
+ exports.cached = index.cached;
21
+ exports.callOnGC = index.callOnGC;
22
+ exports.chainPromise = index.chainPromise;
23
+ exports.debounce = index.debounce;
24
+ exports.deepWatch = index.deepWatch;
25
+ exports.deprecated = index.deprecated;
26
+ exports.descriptor = index.descriptor;
27
+ exports.destructor = index.destructor;
28
+ exports.forwardArray = index.forwardArray;
29
+ exports.getAt = index.getAt;
30
+ exports.isCached = index.isCached;
31
+ exports.lift = index.lift;
32
+ exports.memoize = index.memoize;
33
+ exports.morph = index.morph;
34
+ exports.organize = index.organize;
35
+ exports.organized = index.organized;
36
+ exports.profileInfo = index.profileInfo;
37
+ exports.project = index.morph;
38
+ exports.resource = index.resource;
39
+ exports.setAt = index.setAt;
40
+ exports.throttle = index.throttle;
41
+ exports.unreactive = index.unreactive;
42
+ exports.watch = index.watch;
43
+ exports.when = index.when;
49
44
  exports.AZone = proxy.AZone;
50
45
  exports.DecoratorError = proxy.DecoratorError;
51
46
  exports.IterableWeakMap = proxy.IterableWeakMap;
@@ -60,18 +55,23 @@ exports.Zone = proxy.Zone;
60
55
  exports.ZoneAggregator = proxy.ZoneAggregator;
61
56
  exports.ZoneHistory = proxy.ZoneHistory;
62
57
  exports.addBatchCleanup = proxy.addBatchCleanup;
58
+ exports.addUnreactiveProps = proxy.addUnreactiveProps;
63
59
  exports.arrayEquals = proxy.arrayEquals;
60
+ exports.assertUntracked = proxy.assertUntracked;
61
+ exports.asyncHook = proxy.asyncHook;
62
+ exports.asyncHooks = proxy.asyncHooks;
64
63
  exports.asyncZone = proxy.asyncZone;
65
64
  exports.atom = proxy.atom;
66
65
  exports.atomic = proxy.atomic;
67
66
  exports.biDi = proxy.biDi;
67
+ exports.captured = proxy.captured;
68
68
  exports.caught = proxy.caught;
69
- exports.cleanedBy = proxy.cleanedBy;
70
- exports.cleanup = proxy.cleanup;
71
69
  exports.createFlavor = proxy.createFlavor;
70
+ exports.debugPreset = proxy.debugPreset;
72
71
  exports.decorator = proxy.decorator;
73
72
  exports.deepCompare = proxy.deepCompare;
74
73
  exports.defer = proxy.defer;
74
+ exports.devPreset = proxy.devPreset;
75
75
  exports.effect = proxy.effect;
76
76
  exports.effectAggregator = proxy.effectAggregator;
77
77
  exports.flavorOptions = proxy.flavorOptions;
@@ -80,30 +80,32 @@ exports.formatCleanupReason = proxy.formatCleanupReason;
80
80
  exports.getActivationLog = proxy.getActivationLog;
81
81
  exports.getActiveEffect = proxy.getActiveEffect;
82
82
  exports.getState = proxy.getState;
83
- exports.immutables = proxy.immutables;
83
+ exports.hooks = proxy.hooks;
84
84
  exports.isConstructor = proxy.isConstructor;
85
+ exports.isDev = proxy.isDev;
85
86
  exports.isNonReactive = proxy.isNonReactive;
86
87
  exports.isObject = proxy.isObject;
88
+ exports.isProd = proxy.isProd;
87
89
  exports.isReactive = proxy.isReactive;
90
+ exports.isTest = proxy.isTest;
88
91
  exports.legacyDecorator = proxy.legacyDecorator;
92
+ exports.link = proxy.link;
89
93
  exports.mixin = proxy.mixin;
90
94
  exports.modernDecorator = proxy.modernDecorator;
91
95
  exports.named = proxy.named;
92
96
  exports.objectToProxy = proxy.objectToProxy;
93
97
  exports.onEffectThrow = proxy.onEffectThrow;
98
+ exports.prodPreset = proxy.prodPreset;
94
99
  exports.proxyToObject = proxy.proxyToObject;
95
100
  exports.reactive = proxy.reactive;
96
101
  exports.reactiveOptions = proxy.options;
97
102
  exports.reset = proxy.reset;
98
103
  exports.root = proxy.root;
99
- exports.stopped = proxy.stopped;
100
104
  exports.tag = proxy.tag;
101
105
  exports.touched = proxy.touched;
102
106
  exports.touched1 = proxy.touched1;
107
+ exports.unlink = proxy.unlink;
103
108
  exports.untracked = proxy.untracked;
104
109
  exports.unwrap = proxy.unwrap;
105
110
  exports.zip = proxy.zip;
106
- exports.asyncHook = asyncCore.asyncHook;
107
- exports.asyncHooks = asyncCore.asyncHooks;
108
- exports.hooks = asyncCore.hooks;
109
111
  //# sourceMappingURL=node.cjs.map
package/dist/node.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"node.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"node.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/node.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { ArrayDiffResult, ArrayReadForward, ContextManager, Decorator, DecoratorDescription, DecoratorError, DecoratorFactory, Destroyable, DestructionError, Eventful, EventsBase, GenericClassDecorator, Hook, Indexable, IterableWeakMap, IterableWeakSet, LegacyClassDecorator, LegacyPropertyDecorator, Memoizable, MemoizableArgument, MixinClass, MixinFunction, ModernAccessorDecorator, ModernClassDecorator, ModernGetterDecorator, ModernMethodDecorator, ModernSetterDecorator, PromiseChain, ReactiveBase, Register, Resource, Restorer, ScanResult, addBatchCleanup, allocated, allocatedValues, arrayDiff, arrayEquals, asyncHook, asyncHooks, atom, atomic, attend, biDi, cache, cached, callOnGC, caught, chainPromise, cleanedBy, createFlavor, debounce, decorator, deepCompare, deepWatch, defer, deprecated, descriptor, destructor, effect, effectAggregator, flavorOptions, flavored, forwardArray, getActivationLog, getActiveEffect, getAt, getState, hooks, immutables, isCached, isConstructor, isNonReactive, isObject, legacyDecorator, lift, memoize, mixin, modernDecorator, morph, named, onEffectThrow, organize, organized, profileInfo, morph as project, reactive, register, reset, resource, root, scan, setAt, tag, throttle, touched, touched1, unreactive, untracked, watch, when, zip } from './index.js';
2
- export { A as AZone, h as CleanupReason, e as EffectAccess, b as EffectCleanup, d as EffectCloser, g as EffectOptions, E as EffectTrigger, a as Evolution, F as FunctionWrapper, P as PropTrigger, R as ReactiveError, i as ReactiveErrorCode, S as ScopedCallback, j as Zone, Z as ZoneAggregator, k as ZoneHistory, l as asyncZone, c as cleanup, m as formatCleanupReason, n as isReactive, o as objectToProxy, p as proxyToObject, q as reactiveOptions, s as stopped, u as unwrap } from './types-W5vD6m2n.js';
1
+ export { ArrayDiffResult, ArrayReadForward, ContextManager, Decorator, DecoratorDescription, DecoratorError, DecoratorFactory, Destroyable, DestructionError, Eventful, EventsBase, GenericClassDecorator, Hook, Indexable, IterableWeakMap, IterableWeakSet, LegacyClassDecorator, LegacyPropertyDecorator, Memoizable, MemoizableArgument, MixinClass, MixinFunction, ModernAccessorDecorator, ModernClassDecorator, ModernGetterDecorator, ModernMethodDecorator, ModernSetterDecorator, PromiseChain, ReactiveBase, Resource, Restorer, addBatchCleanup, addUnreactiveProps, allocated, allocatedValues, arrayDiff, arrayEquals, assertUntracked, asyncHook, asyncHooks, atom, atomic, attend, biDi, cache, cached, callOnGC, captured, caught, chainPromise, createFlavor, debounce, decorator, deepCompare, deepWatch, defer, deprecated, descriptor, destructor, effect, effectAggregator, flavorOptions, flavored, forwardArray, getActivationLog, getActiveEffect, getAt, getState, hooks, isCached, isConstructor, isDev, isNonReactive, isObject, isProd, isTest, legacyDecorator, lift, link, memoize, mixin, modernDecorator, morph, named, onEffectThrow, organize, organized, profileInfo, morph as project, reactive, reset, resource, root, setAt, tag, throttle, touched, touched1, unlink, unreactive, untracked, watch, when, zip } from './index.js';
2
+ export { A as AZone, C as CleanupReason, c as EffectAccess, b as EffectCleanup, d as EffectCloser, g as EffectOptions, E as EffectTrigger, a as Evolution, G as GetterWrapper, H as HistoryValue, P as PropTrigger, R as ReactiveError, h as ReactiveErrorCode, S as ScopedCallback, i as Zone, Z as ZoneAggregator, j as ZoneHistory, k as asyncZone, l as debugPreset, m as devPreset, n as formatCleanupReason, o as isReactive, p as objectToProxy, q as prodPreset, r as proxyToObject, s as reactiveOptions, u as unwrap } from './types-Bx2PhORg.js';
package/dist/node.dev.cjs CHANGED
@@ -1,52 +1,47 @@
1
1
  'use strict';
2
2
 
3
3
  require('./debug.cjs');
4
- require('./chunks/async-node-3PrbVAbB.cjs');
5
- var browser = require('./browser.cjs');
6
- var proxy = require('./chunks/proxy-Dtg-bJ3T.cjs');
7
- var asyncCore = require('./chunks/async-core-CRLKP3l-.cjs');
4
+ require('./chunks/node-Dd0esp5F.cjs');
5
+ var index = require('./chunks/index-yK0HVxHv.cjs');
6
+ var proxy = require('./chunks/proxy-BvM4yewA.cjs');
8
7
  require('node:async_hooks');
9
- require('./chunks/async-browser-BU_IfxYD.cjs');
10
8
 
11
9
 
12
10
 
13
- exports.ArrayReadForward = browser.ArrayReadForward;
14
- exports.Destroyable = browser.Destroyable;
15
- exports.DestructionError = browser.DestructionError;
16
- exports.Eventful = browser.Eventful;
17
- exports.Indexable = browser.Indexable;
18
- exports.Register = browser.Register;
19
- exports.allocated = browser.allocated;
20
- exports.allocatedValues = browser.allocatedValues;
21
- exports.arrayDiff = browser.arrayDiff;
22
- exports.attend = browser.attend;
23
- exports.cache = browser.cache;
24
- exports.cached = browser.cached;
25
- exports.callOnGC = browser.callOnGC;
26
- exports.chainPromise = browser.chainPromise;
27
- exports.debounce = browser.debounce;
28
- exports.deepWatch = browser.deepWatch;
29
- exports.deprecated = browser.deprecated;
30
- exports.descriptor = browser.descriptor;
31
- exports.destructor = browser.destructor;
32
- exports.forwardArray = browser.forwardArray;
33
- exports.getAt = browser.getAt;
34
- exports.isCached = browser.isCached;
35
- exports.lift = browser.lift;
36
- exports.memoize = browser.memoize;
37
- exports.morph = browser.morph;
38
- exports.organize = browser.organize;
39
- exports.organized = browser.organized;
40
- exports.profileInfo = browser.profileInfo;
41
- exports.project = browser.morph;
42
- exports.register = browser.register;
43
- exports.resource = browser.resource;
44
- exports.scan = browser.scan;
45
- exports.setAt = browser.setAt;
46
- exports.throttle = browser.throttle;
47
- exports.unreactive = browser.unreactive;
48
- exports.watch = browser.watch;
49
- exports.when = browser.when;
11
+ exports.ArrayReadForward = index.ArrayReadForward;
12
+ exports.Destroyable = index.Destroyable;
13
+ exports.DestructionError = index.DestructionError;
14
+ exports.Eventful = index.Eventful;
15
+ exports.Indexable = index.Indexable;
16
+ exports.allocated = index.allocated;
17
+ exports.allocatedValues = index.allocatedValues;
18
+ exports.arrayDiff = index.arrayDiff;
19
+ exports.attend = index.attend;
20
+ exports.cache = index.cache;
21
+ exports.cached = index.cached;
22
+ exports.callOnGC = index.callOnGC;
23
+ exports.chainPromise = index.chainPromise;
24
+ exports.debounce = index.debounce;
25
+ exports.deepWatch = index.deepWatch;
26
+ exports.deprecated = index.deprecated;
27
+ exports.descriptor = index.descriptor;
28
+ exports.destructor = index.destructor;
29
+ exports.forwardArray = index.forwardArray;
30
+ exports.getAt = index.getAt;
31
+ exports.isCached = index.isCached;
32
+ exports.lift = index.lift;
33
+ exports.memoize = index.memoize;
34
+ exports.morph = index.morph;
35
+ exports.organize = index.organize;
36
+ exports.organized = index.organized;
37
+ exports.profileInfo = index.profileInfo;
38
+ exports.project = index.morph;
39
+ exports.resource = index.resource;
40
+ exports.setAt = index.setAt;
41
+ exports.throttle = index.throttle;
42
+ exports.unreactive = index.unreactive;
43
+ exports.watch = index.watch;
44
+ exports.when = index.when;
50
45
  exports.AZone = proxy.AZone;
51
46
  exports.DecoratorError = proxy.DecoratorError;
52
47
  exports.IterableWeakMap = proxy.IterableWeakMap;
@@ -61,18 +56,23 @@ exports.Zone = proxy.Zone;
61
56
  exports.ZoneAggregator = proxy.ZoneAggregator;
62
57
  exports.ZoneHistory = proxy.ZoneHistory;
63
58
  exports.addBatchCleanup = proxy.addBatchCleanup;
59
+ exports.addUnreactiveProps = proxy.addUnreactiveProps;
64
60
  exports.arrayEquals = proxy.arrayEquals;
61
+ exports.assertUntracked = proxy.assertUntracked;
62
+ exports.asyncHook = proxy.asyncHook;
63
+ exports.asyncHooks = proxy.asyncHooks;
65
64
  exports.asyncZone = proxy.asyncZone;
66
65
  exports.atom = proxy.atom;
67
66
  exports.atomic = proxy.atomic;
68
67
  exports.biDi = proxy.biDi;
68
+ exports.captured = proxy.captured;
69
69
  exports.caught = proxy.caught;
70
- exports.cleanedBy = proxy.cleanedBy;
71
- exports.cleanup = proxy.cleanup;
72
70
  exports.createFlavor = proxy.createFlavor;
71
+ exports.debugPreset = proxy.debugPreset;
73
72
  exports.decorator = proxy.decorator;
74
73
  exports.deepCompare = proxy.deepCompare;
75
74
  exports.defer = proxy.defer;
75
+ exports.devPreset = proxy.devPreset;
76
76
  exports.effect = proxy.effect;
77
77
  exports.effectAggregator = proxy.effectAggregator;
78
78
  exports.flavorOptions = proxy.flavorOptions;
@@ -81,30 +81,32 @@ exports.formatCleanupReason = proxy.formatCleanupReason;
81
81
  exports.getActivationLog = proxy.getActivationLog;
82
82
  exports.getActiveEffect = proxy.getActiveEffect;
83
83
  exports.getState = proxy.getState;
84
- exports.immutables = proxy.immutables;
84
+ exports.hooks = proxy.hooks;
85
85
  exports.isConstructor = proxy.isConstructor;
86
+ exports.isDev = proxy.isDev;
86
87
  exports.isNonReactive = proxy.isNonReactive;
87
88
  exports.isObject = proxy.isObject;
89
+ exports.isProd = proxy.isProd;
88
90
  exports.isReactive = proxy.isReactive;
91
+ exports.isTest = proxy.isTest;
89
92
  exports.legacyDecorator = proxy.legacyDecorator;
93
+ exports.link = proxy.link;
90
94
  exports.mixin = proxy.mixin;
91
95
  exports.modernDecorator = proxy.modernDecorator;
92
96
  exports.named = proxy.named;
93
97
  exports.objectToProxy = proxy.objectToProxy;
94
98
  exports.onEffectThrow = proxy.onEffectThrow;
99
+ exports.prodPreset = proxy.prodPreset;
95
100
  exports.proxyToObject = proxy.proxyToObject;
96
101
  exports.reactive = proxy.reactive;
97
102
  exports.reactiveOptions = proxy.options;
98
103
  exports.reset = proxy.reset;
99
104
  exports.root = proxy.root;
100
- exports.stopped = proxy.stopped;
101
105
  exports.tag = proxy.tag;
102
106
  exports.touched = proxy.touched;
103
107
  exports.touched1 = proxy.touched1;
108
+ exports.unlink = proxy.unlink;
104
109
  exports.untracked = proxy.untracked;
105
110
  exports.unwrap = proxy.unwrap;
106
111
  exports.zip = proxy.zip;
107
- exports.asyncHook = asyncCore.asyncHook;
108
- exports.asyncHooks = asyncCore.asyncHooks;
109
- exports.hooks = asyncCore.hooks;
110
112
  //# sourceMappingURL=node.dev.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"node.dev.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"node.dev.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- export { A as AZone, h as CleanupReason, e as EffectAccess, b as EffectCleanup, d as EffectCloser, g as EffectOptions, E as EffectTrigger, a as Evolution, F as FunctionWrapper, P as PropTrigger, R as ReactiveError, i as ReactiveErrorCode, S as ScopedCallback, j as Zone, Z as ZoneAggregator, k as ZoneHistory, l as asyncZone, c as cleanup, m as formatCleanupReason, n as isReactive, o as objectToProxy, p as proxyToObject, q as reactiveOptions, s as stopped, u as unwrap } from './types-W5vD6m2n.js';
2
- export { ArrayDiffResult, ArrayReadForward, ContextManager, Decorator, DecoratorDescription, DecoratorError, DecoratorFactory, Destroyable, DestructionError, Eventful, EventsBase, GenericClassDecorator, Hook, Indexable, IterableWeakMap, IterableWeakSet, LegacyClassDecorator, LegacyPropertyDecorator, Memoizable, MemoizableArgument, MixinClass, MixinFunction, ModernAccessorDecorator, ModernClassDecorator, ModernGetterDecorator, ModernMethodDecorator, ModernSetterDecorator, PromiseChain, ReactiveBase, Register, Resource, Restorer, ScanResult, addBatchCleanup, allocated, allocatedValues, arrayDiff, arrayEquals, asyncHook, asyncHooks, atom, atomic, attend, biDi, cache, cached, callOnGC, caught, chainPromise, cleanedBy, createFlavor, debounce, decorator, deepCompare, deepWatch, defer, deprecated, descriptor, destructor, effect, effectAggregator, flavorOptions, flavored, forwardArray, getActivationLog, getActiveEffect, getAt, getState, hooks, immutables, isCached, isConstructor, isNonReactive, isObject, legacyDecorator, lift, memoize, mixin, modernDecorator, morph, named, onEffectThrow, organize, organized, profileInfo, morph as project, reactive, register, reset, resource, root, scan, setAt, tag, throttle, touched, touched1, unreactive, untracked, watch, when, zip } from './index.js';
1
+ export { A as AZone, C as CleanupReason, c as EffectAccess, b as EffectCleanup, d as EffectCloser, g as EffectOptions, E as EffectTrigger, a as Evolution, G as GetterWrapper, H as HistoryValue, P as PropTrigger, R as ReactiveError, h as ReactiveErrorCode, S as ScopedCallback, i as Zone, Z as ZoneAggregator, j as ZoneHistory, k as asyncZone, l as debugPreset, m as devPreset, n as formatCleanupReason, o as isReactive, p as objectToProxy, q as prodPreset, r as proxyToObject, s as reactiveOptions, u as unwrap } from './types-Bx2PhORg.js';
2
+ export { ArrayDiffResult, ArrayReadForward, ContextManager, Decorator, DecoratorDescription, DecoratorError, DecoratorFactory, Destroyable, DestructionError, Eventful, EventsBase, GenericClassDecorator, Hook, Indexable, IterableWeakMap, IterableWeakSet, LegacyClassDecorator, LegacyPropertyDecorator, Memoizable, MemoizableArgument, MixinClass, MixinFunction, ModernAccessorDecorator, ModernClassDecorator, ModernGetterDecorator, ModernMethodDecorator, ModernSetterDecorator, PromiseChain, ReactiveBase, Resource, Restorer, addBatchCleanup, addUnreactiveProps, allocated, allocatedValues, arrayDiff, arrayEquals, assertUntracked, asyncHook, asyncHooks, atom, atomic, attend, biDi, cache, cached, callOnGC, captured, caught, chainPromise, createFlavor, debounce, decorator, deepCompare, deepWatch, defer, deprecated, descriptor, destructor, effect, effectAggregator, flavorOptions, flavored, forwardArray, getActivationLog, getActiveEffect, getAt, getState, hooks, isCached, isConstructor, isDev, isNonReactive, isObject, isProd, isTest, legacyDecorator, lift, link, memoize, mixin, modernDecorator, morph, named, onEffectThrow, organize, organized, profileInfo, morph as project, reactive, reset, resource, root, setAt, tag, throttle, touched, touched1, unlink, unreactive, untracked, watch, when, zip } from './index.js';
@@ -1,6 +1,6 @@
1
1
  import './debug.esm.js';
2
- import './chunks/node-nKJBk8iJ.esm.js';
3
- export { A as ArrayReadForward, D as Destroyable, a as DestructionError, E as Eventful, I as Indexable, R as Register, b as allocated, c as allocatedValues, d as arrayDiff, e as attend, f as cache, g as cached, h as callOnGC, i as chainPromise, j as debounce, k as deepWatch, l as deprecated, m as descriptor, n as destructor, o as forwardArray, p as getAt, q as isCached, r as lift, s as memoize, t as morph, u as organize, v as organized, w as profileInfo, t as project, x as register, y as resource, z as scan, B as setAt, C as throttle, F as unreactive, G as watch, H as when } from './chunks/index-CaaQQlPJ.esm.js';
4
- export { A as AZone, D as DecoratorError, I as IterableWeakMap, a as IterableWeakSet, R as ReactiveBase, b as ReactiveError, c as ReactiveErrorCode, Z as Zone, d as ZoneAggregator, e as ZoneHistory, f as addBatchCleanup, g as arrayEquals, h as asyncHook, i as asyncHooks, j as asyncZone, k as atom, l as atomic, m as biDi, n as caught, o as cleanedBy, p as cleanup, q as createFlavor, r as decorator, s as deepCompare, t as defer, u as effect, v as effectAggregator, w as flavorOptions, x as flavored, y as formatCleanupReason, z as getActivationLog, B as getActiveEffect, C as getState, E as hooks, F as immutables, G as isConstructor, H as isNonReactive, J as isObject, K as isReactive, L as legacyDecorator, M as mixin, N as modernDecorator, O as named, P as objectToProxy, Q as onEffectThrow, S as proxyToObject, T as reactive, U as reactiveOptions, V as reset, W as root, X as stopped, Y as tag, _ as touched, $ as touched1, a0 as untracked, a1 as unwrap, a2 as zip } from './chunks/proxy-r7lARftl.esm.js';
2
+ import './chunks/node-Bo7WU5S2.esm.js';
3
+ export { A as ArrayReadForward, D as Destroyable, a as DestructionError, E as Eventful, I as Indexable, b as allocated, c as allocatedValues, d as arrayDiff, e as attend, f as cache, g as cached, h as callOnGC, i as chainPromise, j as debounce, k as deepWatch, l as deprecated, m as descriptor, n as destructor, o as forwardArray, p as getAt, q as isCached, r as lift, s as memoize, t as morph, u as organize, v as organized, w as profileInfo, t as project, x as resource, y as setAt, z as throttle, B as unreactive, C as watch, F as when } from './chunks/index-BUop6B2U.esm.js';
4
+ export { A as AZone, D as DecoratorError, I as IterableWeakMap, a as IterableWeakSet, R as ReactiveBase, b as ReactiveError, c as ReactiveErrorCode, Z as Zone, d as ZoneAggregator, e as ZoneHistory, f as addBatchCleanup, g as addUnreactiveProps, h as arrayEquals, i as assertUntracked, j as asyncHook, k as asyncHooks, l as asyncZone, m as atom, n as atomic, o as biDi, p as captured, q as caught, r as createFlavor, s as debugPreset, t as decorator, u as deepCompare, v as defer, w as devPreset, x as effect, y as effectAggregator, z as flavorOptions, B as flavored, C as formatCleanupReason, E as getActivationLog, F as getActiveEffect, G as getState, H as hooks, J as isConstructor, K as isDev, L as isNonReactive, M as isObject, N as isProd, O as isReactive, P as isTest, Q as legacyDecorator, S as link, T as mixin, U as modernDecorator, V as named, W as objectToProxy, X as onEffectThrow, Y as prodPreset, _ as proxyToObject, $ as reactive, a0 as reactiveOptions, a1 as reset, a2 as root, a3 as tag, a4 as touched, a5 as touched1, a6 as unlink, a7 as untracked, a8 as unwrap, a9 as zip } from './chunks/proxy-D2C49sXH.esm.js';
5
5
  import 'node:async_hooks';
6
6
  //# sourceMappingURL=node.dev.esm.js.map
package/dist/node.esm.js CHANGED
@@ -1,5 +1,5 @@
1
- import './chunks/node-nKJBk8iJ.esm.js';
2
- export { A as ArrayReadForward, D as Destroyable, a as DestructionError, E as Eventful, I as Indexable, R as Register, b as allocated, c as allocatedValues, d as arrayDiff, e as attend, f as cache, g as cached, h as callOnGC, i as chainPromise, j as debounce, k as deepWatch, l as deprecated, m as descriptor, n as destructor, o as forwardArray, p as getAt, q as isCached, r as lift, s as memoize, t as morph, u as organize, v as organized, w as profileInfo, t as project, x as register, y as resource, z as scan, B as setAt, C as throttle, F as unreactive, G as watch, H as when } from './chunks/index-CaaQQlPJ.esm.js';
3
- export { A as AZone, D as DecoratorError, I as IterableWeakMap, a as IterableWeakSet, R as ReactiveBase, b as ReactiveError, c as ReactiveErrorCode, Z as Zone, d as ZoneAggregator, e as ZoneHistory, f as addBatchCleanup, g as arrayEquals, h as asyncHook, i as asyncHooks, j as asyncZone, k as atom, l as atomic, m as biDi, n as caught, o as cleanedBy, p as cleanup, q as createFlavor, r as decorator, s as deepCompare, t as defer, u as effect, v as effectAggregator, w as flavorOptions, x as flavored, y as formatCleanupReason, z as getActivationLog, B as getActiveEffect, C as getState, E as hooks, F as immutables, G as isConstructor, H as isNonReactive, J as isObject, K as isReactive, L as legacyDecorator, M as mixin, N as modernDecorator, O as named, P as objectToProxy, Q as onEffectThrow, S as proxyToObject, T as reactive, U as reactiveOptions, V as reset, W as root, X as stopped, Y as tag, _ as touched, $ as touched1, a0 as untracked, a1 as unwrap, a2 as zip } from './chunks/proxy-r7lARftl.esm.js';
1
+ import './chunks/node-Bo7WU5S2.esm.js';
2
+ export { A as ArrayReadForward, D as Destroyable, a as DestructionError, E as Eventful, I as Indexable, b as allocated, c as allocatedValues, d as arrayDiff, e as attend, f as cache, g as cached, h as callOnGC, i as chainPromise, j as debounce, k as deepWatch, l as deprecated, m as descriptor, n as destructor, o as forwardArray, p as getAt, q as isCached, r as lift, s as memoize, t as morph, u as organize, v as organized, w as profileInfo, t as project, x as resource, y as setAt, z as throttle, B as unreactive, C as watch, F as when } from './chunks/index-BUop6B2U.esm.js';
3
+ export { A as AZone, D as DecoratorError, I as IterableWeakMap, a as IterableWeakSet, R as ReactiveBase, b as ReactiveError, c as ReactiveErrorCode, Z as Zone, d as ZoneAggregator, e as ZoneHistory, f as addBatchCleanup, g as addUnreactiveProps, h as arrayEquals, i as assertUntracked, j as asyncHook, k as asyncHooks, l as asyncZone, m as atom, n as atomic, o as biDi, p as captured, q as caught, r as createFlavor, s as debugPreset, t as decorator, u as deepCompare, v as defer, w as devPreset, x as effect, y as effectAggregator, z as flavorOptions, B as flavored, C as formatCleanupReason, E as getActivationLog, F as getActiveEffect, G as getState, H as hooks, J as isConstructor, K as isDev, L as isNonReactive, M as isObject, N as isProd, O as isReactive, P as isTest, Q as legacyDecorator, S as link, T as mixin, U as modernDecorator, V as named, W as objectToProxy, X as onEffectThrow, Y as prodPreset, _ as proxyToObject, $ as reactive, a0 as reactiveOptions, a1 as reset, a2 as root, a3 as tag, a4 as touched, a5 as touched1, a6 as unlink, a7 as untracked, a8 as unwrap, a9 as zip } from './chunks/proxy-D2C49sXH.esm.js';
4
4
  import 'node:async_hooks';
5
5
  //# sourceMappingURL=node.esm.js.map
@@ -4,9 +4,9 @@ declare abstract class AZone<T> {
4
4
  protected leave(entered: unknown): void;
5
5
  with<R>(value: T | undefined, fn: () => R): R;
6
6
  root<R>(fn: () => R): R;
7
- get zoned(): FunctionWrapper;
7
+ get zoned(): GetterWrapper;
8
8
  }
9
- type FunctionWrapper = <R>(fn: () => R) => R;
9
+ type GetterWrapper = <R>(fn: () => R) => R;
10
10
  declare class Zone<T> extends AZone<T> {
11
11
  active: T | undefined;
12
12
  }
@@ -35,6 +35,17 @@ declare class ZoneAggregator extends AZone<Map<AZone<unknown>, unknown>> {
35
35
  delete(z: AZone<unknown>): void;
36
36
  clear(): void;
37
37
  }
38
+ /**
39
+ * Aggregator of zones that should be preserved across async boundaries.
40
+ * If you add a zone here, it will be preserved across async boundaries.
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * import { Zone, asyncZone } from 'mutts'
45
+ * const userZone = new Zone<User>()
46
+ * asyncZone.add(userZone)
47
+ * ```
48
+ */
38
49
  declare const asyncZone: ZoneAggregator;
39
50
 
40
51
  /**
@@ -54,7 +65,7 @@ interface EffectAccess {
54
65
  * })
55
66
  * ```
56
67
  */
57
- tracked: FunctionWrapper;
68
+ tracked: GetterWrapper;
58
69
  /**
59
70
  * Tracks dependencies in the parent effect context
60
71
  * Use this when child effects should track dependencies in the parent,
@@ -72,7 +83,7 @@ interface EffectAccess {
72
83
  * })
73
84
  * ```
74
85
  */
75
- ascend: FunctionWrapper;
86
+ ascend: GetterWrapper;
76
87
  /**
77
88
  * `false` on the first execution, `true` or `CleanupReason` on subsequent runs.
78
89
  * `true` means this is a re-run but detailed reason gathering is disabled or unavailable.
@@ -91,6 +102,11 @@ interface EffectAccess {
91
102
  * ```
92
103
  */
93
104
  reaction: boolean | CleanupReason;
105
+ /**
106
+ * AbortSignal that is aborted when the effect is cleaned up or re-runs.
107
+ * Use this to cancel async operations (like fetch) when the effect is no longer valid.
108
+ */
109
+ signal: AbortSignal;
94
110
  }
95
111
  /**
96
112
  * Base type for effect callbacks - simple function without additional properties
@@ -113,6 +129,7 @@ type CleanupReason = {
113
129
  cause: CleanupReason;
114
130
  } | {
115
131
  type: 'stopped';
132
+ detail?: string;
116
133
  } | {
117
134
  type: 'gc';
118
135
  } | {
@@ -139,11 +156,9 @@ type CleanupReason = {
139
156
  */
140
157
  declare function formatCleanupReason(reason: CleanupReason, depth?: number): unknown[];
141
158
  /**
142
- * Type for effect cleanup functions with stopped state tracking
159
+ * Type for effect cleanup functions.
143
160
  */
144
- type EffectCleanup = ScopedCallback & {
145
- [stopped]: boolean;
146
- };
161
+ type EffectCleanup = ScopedCallback;
147
162
  /**
148
163
  * Type for the `runEffect` function of an effect - argument-less function to call to trigger the effect
149
164
  */
@@ -198,16 +213,8 @@ type State = {
198
213
  evolution: Evolution;
199
214
  next: State;
200
215
  } | {};
201
- /**
202
- * Symbol to check if an effect is stopped
203
- */
204
- declare const stopped: unique symbol;
205
- /**
206
- * Symbol to access effect cleanup function
207
- */
208
- declare const cleanup: unique symbol;
209
216
  type EffectCloser = (reason?: CleanupReason) => void;
210
- type CatchFunction = (error: any) => EffectCloser | undefined | void;
217
+ type CatchFunction = (error: unknown) => EffectCloser | undefined | void;
211
218
  /**
212
219
  * Structured error codes for machine-readable diagnosis
213
220
  */
@@ -304,6 +311,12 @@ declare const options: {
304
311
  * @param runningChain - The array of effects from the detected one to the currently running one
305
312
  */
306
313
  skipRunningEffect: (_effect: EffectTrigger) => void;
314
+ /**
315
+ * Debug purpose: called when an effect starts executing.
316
+ * @param effect - The effect being executed (root function)
317
+ * @param reaction - false for initial creation, true/CleanupReason for subsequent runs
318
+ */
319
+ effectRun: (_effect: Function, _reaction: boolean | CleanupReason) => void;
307
320
  /**
308
321
  * Debug purpose: maximum effect chain (like call stack max depth)
309
322
  * Used to prevent infinite loops
@@ -431,39 +444,17 @@ declare const options: {
431
444
  enableHistory: boolean;
432
445
  historySize: number;
433
446
  } | null;
434
- /**
435
- * Configuration for zone hooks - control which async APIs are hooked
436
- * Each option controls whether the corresponding async API is wrapped to preserve effect context
437
- * Only applies when asyncMode is enabled (truthy)
438
- * @deprecated Should take all when we made sure PIXI.create, Game.create, ... are -> .root()
439
- */
440
- zones: {
441
- /**
442
- * Hook setTimeout to preserve effect context
443
- * @default true
444
- */
445
- setTimeout: boolean;
446
- /**
447
- * Hook setInterval to preserve effect context
448
- * @default true
449
- */
450
- setInterval: boolean;
451
- /**
452
- * Hook requestAnimationFrame (runs in untracked context when hooked)
453
- * @default true
454
- */
455
- requestAnimationFrame: boolean;
456
- /**
457
- * Hook queueMicrotask to preserve effect context
458
- * @default true
459
- */
460
- queueMicrotask: boolean;
461
- };
462
447
  };
448
+ /** Production preset: no introspection, heuristic cycle detection, minimal overhead */
449
+ declare const prodPreset: Partial<typeof options>;
450
+ /** Development preset (default): introspection on, early cycle detection, warnings */
451
+ declare const devPreset: Partial<typeof options>;
452
+ /** Debug preset: full diagnostics, throws on violations, rich lineage capture */
453
+ declare const debugPreset: Partial<typeof options>;
463
454
  declare const objectToProxy: WeakMap<object, object>;
464
455
  declare const proxyToObject: WeakMap<object, object>;
465
456
  declare function unwrap<T>(obj: T): T;
466
457
  declare function isReactive(obj: any): boolean;
467
458
 
468
- export { AZone as A, ReactiveError as R, ZoneAggregator as Z, cleanup as c, ReactiveErrorCode as i, Zone as j, ZoneHistory as k, asyncZone as l, formatCleanupReason as m, isReactive as n, objectToProxy as o, proxyToObject as p, options as q, stopped as s, unwrap as u };
469
- export type { CatchFunction as C, EffectTrigger as E, FunctionWrapper as F, PropTrigger as P, ScopedCallback as S, Evolution as a, EffectCleanup as b, EffectCloser as d, EffectAccess as e, State as f, EffectOptions as g, CleanupReason as h };
459
+ export { AZone as A, ReactiveError as R, ZoneAggregator as Z, ReactiveErrorCode as h, Zone as i, ZoneHistory as j, asyncZone as k, debugPreset as l, devPreset as m, formatCleanupReason as n, isReactive as o, objectToProxy as p, prodPreset as q, proxyToObject as r, options as s, unwrap as u };
460
+ export type { CleanupReason as C, EffectTrigger as E, GetterWrapper as G, HistoryValue as H, PropTrigger as P, ScopedCallback as S, Evolution as a, EffectCleanup as b, EffectAccess as c, EffectCloser as d, State as e, CatchFunction as f, EffectOptions as g };
@@ -55,20 +55,6 @@ export declare function biDi<T>(target: (val: T) => void, source: { get: () => T
55
55
  // COLLECTIONS
56
56
  // --------------------------------------------------------------------------------
57
57
 
58
- export interface Register<T, K extends PropertyKey = PropertyKey> extends Iterable<T> {
59
- length: number;
60
- [index: number]: T;
61
- get(key: K): T | undefined;
62
- set(key: K, value: T): void;
63
- hasKey(key: K): boolean;
64
- indexOfKey(key: K): number;
65
- remove(key: K): void;
66
- removeAt(index: number): T | undefined;
67
- push(...items: T[]): number;
68
- // ... complete array methods are supported
69
- }
70
-
71
- export declare function register<T, K extends PropertyKey = PropertyKey>(keyFn: (item: T) => K, initial?: Iterable<T>): Register<T, K>;
72
58
  export declare function project<S, R>(source: S, apply: (access: any, target: any) => any): R;
73
59
  export declare function organized<S, T>(source: S, apply: (access: any, target: T) => any, baseTarget?: T): T;
74
60
 
package/docs/ai/manual.md CHANGED
@@ -21,9 +21,9 @@ Proxy-based **fine-grained reactivity** — changes propagate synchronously thro
21
21
  **All exports come from `'mutts'`** — no subpath imports like `mutts/reactive` or `mutts/zone`.
22
22
 
23
23
  ```ts
24
- import { reactive, effect, memoize, morph, attend, lift, scan, cleanup,
24
+ import { reactive, effect, memoize, morph, attend, lift, cleanup,
25
25
  atom, atomic, defer, untracked, unreactive, watch, when, biDi, caught, why,
26
- cleanedBy, organized, Register,
26
+ cleanedBy, organized,
27
27
  Zone, asyncZone, ZoneHistory, ZoneAggregator,
28
28
  decorator, mixin, Eventful, Destroyable, flavored, Indexable, chainPromise,
29
29
  reactiveOptions, isReactive, unwrap, getState
@@ -274,18 +274,6 @@ await when(() => state.ready, { timeout: 5000 }) // rejects after 5s
274
274
 
275
275
  Array methods (`push`, `splice`, `sort`, etc.) all trigger reactivity.
276
276
 
277
- ### 4.1 Register — Keyed ordered collection
278
-
279
- ```ts
280
- const list = new Register(item => item.id, [{ id: 1, label: 'A' }])
281
- list.get(1) // O(1) lookup by key
282
- list.set(1, newItem) // update by key
283
- list.remove(1) // remove by key
284
- list.keep(x => x.active) // filter in-place
285
- list.upsert(v => list.push(v), ...items) // update or insert
286
- // Full array surface + CRUD events: on('add'|'delete'|'update'|'rekey', ...)
287
- ```
288
-
289
277
  ---
290
278
 
291
279
  ## 5. COLLECTION TRANSFORMS
@@ -321,14 +309,6 @@ const doubled = organized(source, (access, target) => {
321
309
  })
322
310
  ```
323
311
 
324
- ### 5.4 scan() — Reactive accumulation
325
-
326
- ```ts
327
- const result = scan(source, (acc, item) => acc + item.val, 0)
328
- // [1, 3, 6] — changing source[1] recomputes from index 1 onward
329
- // Items must be objects (WeakMap keys). Move-optimized.
330
- ```
331
-
332
312
  ### 5.6 lift() — Sync a computed array/object
333
313
 
334
314
  ```ts