mutts 1.0.9 → 1.0.10
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/README.md +58 -33
- package/dist/browser.cjs +1371 -1206
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.ts +2 -1392
- package/dist/browser.dev.cjs +110 -0
- package/dist/browser.dev.cjs.map +1 -0
- package/dist/browser.dev.d.ts +2 -0
- package/dist/browser.dev.esm.js +5 -0
- package/dist/browser.dev.esm.js.map +1 -0
- package/dist/browser.esm.js +6 -87
- package/dist/browser.esm.js.map +1 -1
- package/dist/chunks/{async-browser-lvzLOCgk.cjs → async-browser-BU_IfxYD.cjs} +4 -85
- package/dist/chunks/async-browser-BU_IfxYD.cjs.map +1 -0
- package/dist/chunks/{async-node-C3DeIb0y.cjs → async-node-3PrbVAbB.cjs} +3 -1
- package/dist/chunks/async-node-3PrbVAbB.cjs.map +1 -0
- package/dist/chunks/{index-2vea86wD.esm.js → index-CaaQQlPJ.esm.js} +1116 -953
- package/dist/chunks/index-CaaQQlPJ.esm.js.map +1 -0
- package/dist/chunks/node-nKJBk8iJ.esm.js +96 -0
- package/dist/chunks/node-nKJBk8iJ.esm.js.map +1 -0
- package/dist/chunks/{index-VTO-b2vR.cjs → proxy-Dtg-bJ3T.cjs} +2285 -2983
- package/dist/chunks/proxy-Dtg-bJ3T.cjs.map +1 -0
- package/dist/chunks/{index-CtA2AWl3.esm.js → proxy-r7lARftl.esm.js} +2273 -2948
- package/dist/chunks/proxy-r7lARftl.esm.js.map +1 -0
- package/dist/debug.cjs +973 -28
- package/dist/debug.cjs.map +1 -1
- package/dist/debug.d.ts +36 -37
- package/dist/debug.esm.js +949 -1
- package/dist/debug.esm.js.map +1 -1
- package/dist/devtools/manifest.json +1 -1
- package/dist/devtools/panel.html +1 -1
- package/dist/devtools/panel.js +107 -94
- package/dist/devtools/panel.js.map +1 -1
- package/dist/index.d.ts +1447 -1
- package/dist/mutts.umd.js +7167 -1
- package/dist/mutts.umd.js.map +1 -1
- package/dist/mutts.umd.min.js +1 -1
- package/dist/mutts.umd.min.js.map +1 -1
- package/dist/node.cjs +62 -60
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.ts +2 -2
- package/dist/node.dev.cjs +110 -0
- package/dist/node.dev.cjs.map +1 -0
- package/dist/node.dev.d.ts +2 -0
- package/dist/node.dev.esm.js +6 -0
- package/dist/node.dev.esm.js.map +1 -0
- package/dist/node.esm.js +4 -97
- package/dist/node.esm.js.map +1 -1
- package/dist/{types-DaHFfhlN.d.ts → types-W5vD6m2n.d.ts} +99 -44
- package/docs/ai/api-reference.md +11 -18
- package/docs/ai/manual.md +308 -230
- package/docs/reactive/advanced.md +312 -2
- package/docs/reactive/attend.md +1 -2
- package/docs/reactive/collections.md +21 -39
- package/docs/reactive/core.md +7 -37
- package/docs/reactive/debugging.md +117 -10
- package/docs/reactive/error-handling.md +10 -10
- package/docs/reactive/resource.md +125 -0
- package/docs/reactive/scan.md +32 -1
- package/docs/reactive.md +3 -2
- package/docs/utils.md +70 -0
- package/package.json +59 -30
- package/dist/chunks/async-browser-lvzLOCgk.cjs.map +0 -1
- package/dist/chunks/async-node-C3DeIb0y.cjs.map +0 -1
- package/dist/chunks/index-2vea86wD.esm.js.map +0 -1
- package/dist/chunks/index-CtA2AWl3.esm.js.map +0 -1
- package/dist/chunks/index-VTO-b2vR.cjs.map +0 -1
- package/dist/debug/debug.d.ts +0 -122
- package/dist/debug/debug.d.ts.map +0 -1
- package/dist/debug/index.d.ts +0 -4
- package/dist/debug/index.d.ts.map +0 -1
- package/dist/debug/lineage-panel.d.ts +0 -5
- package/dist/debug/lineage-panel.d.ts.map +0 -1
- package/dist/debug/lineage.d.ts +0 -79
- package/dist/debug/lineage.d.ts.map +0 -1
- package/dist/src/async/browser.d.ts +0 -2
- package/dist/src/async/browser.d.ts.map +0 -1
- package/dist/src/async/index.d.ts +0 -19
- package/dist/src/async/index.d.ts.map +0 -1
- package/dist/src/async/node.d.ts +0 -2
- package/dist/src/async/node.d.ts.map +0 -1
- package/dist/src/decorator.d.ts +0 -106
- package/dist/src/decorator.d.ts.map +0 -1
- package/dist/src/destroyable.d.ts +0 -87
- package/dist/src/destroyable.d.ts.map +0 -1
- package/dist/src/entry-browser.d.ts +0 -3
- package/dist/src/entry-browser.d.ts.map +0 -1
- package/dist/src/entry-node.d.ts +0 -3
- package/dist/src/entry-node.d.ts.map +0 -1
- package/dist/src/eventful.d.ts +0 -20
- package/dist/src/eventful.d.ts.map +0 -1
- package/dist/src/flavored.d.ts +0 -33
- package/dist/src/flavored.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -14
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/indexable.d.ts +0 -243
- package/dist/src/indexable.d.ts.map +0 -1
- package/dist/src/introspection.d.ts +0 -27
- package/dist/src/introspection.d.ts.map +0 -1
- package/dist/src/iterableWeak.d.ts +0 -53
- package/dist/src/iterableWeak.d.ts.map +0 -1
- package/dist/src/mixins.d.ts +0 -25
- package/dist/src/mixins.d.ts.map +0 -1
- package/dist/src/promiseChain.d.ts +0 -20
- package/dist/src/promiseChain.d.ts.map +0 -1
- package/dist/src/reactive/array.d.ts +0 -48
- package/dist/src/reactive/array.d.ts.map +0 -1
- package/dist/src/reactive/buffer.d.ts +0 -120
- package/dist/src/reactive/buffer.d.ts.map +0 -1
- package/dist/src/reactive/change.d.ts +0 -29
- package/dist/src/reactive/change.d.ts.map +0 -1
- package/dist/src/reactive/deep-touch.d.ts +0 -28
- package/dist/src/reactive/deep-touch.d.ts.map +0 -1
- package/dist/src/reactive/deep-watch-state.d.ts +0 -25
- package/dist/src/reactive/deep-watch-state.d.ts.map +0 -1
- package/dist/src/reactive/deep-watch.d.ts +0 -20
- package/dist/src/reactive/deep-watch.d.ts.map +0 -1
- package/dist/src/reactive/describe.d.ts +0 -12
- package/dist/src/reactive/describe.d.ts.map +0 -1
- package/dist/src/reactive/effect-context.d.ts +0 -34
- package/dist/src/reactive/effect-context.d.ts.map +0 -1
- package/dist/src/reactive/effects.d.ts +0 -164
- package/dist/src/reactive/effects.d.ts.map +0 -1
- package/dist/src/reactive/index.d.ts +0 -19
- package/dist/src/reactive/index.d.ts.map +0 -1
- package/dist/src/reactive/map.d.ts +0 -28
- package/dist/src/reactive/map.d.ts.map +0 -1
- package/dist/src/reactive/memoize.d.ts +0 -28
- package/dist/src/reactive/memoize.d.ts.map +0 -1
- package/dist/src/reactive/non-reactive-state.d.ts +0 -9
- package/dist/src/reactive/non-reactive-state.d.ts.map +0 -1
- package/dist/src/reactive/non-reactive.d.ts +0 -11
- package/dist/src/reactive/non-reactive.d.ts.map +0 -1
- package/dist/src/reactive/project.d.ts +0 -40
- package/dist/src/reactive/project.d.ts.map +0 -1
- package/dist/src/reactive/proxy-state.d.ts +0 -8
- package/dist/src/reactive/proxy-state.d.ts.map +0 -1
- package/dist/src/reactive/proxy.d.ts +0 -23
- package/dist/src/reactive/proxy.d.ts.map +0 -1
- package/dist/src/reactive/record.d.ts +0 -115
- package/dist/src/reactive/record.d.ts.map +0 -1
- package/dist/src/reactive/register.d.ts +0 -125
- package/dist/src/reactive/register.d.ts.map +0 -1
- package/dist/src/reactive/registry.d.ts +0 -21
- package/dist/src/reactive/registry.d.ts.map +0 -1
- package/dist/src/reactive/set.d.ts +0 -26
- package/dist/src/reactive/set.d.ts.map +0 -1
- package/dist/src/reactive/tracking.d.ts +0 -7
- package/dist/src/reactive/tracking.d.ts.map +0 -1
- package/dist/src/reactive/types.d.ts +0 -424
- package/dist/src/reactive/types.d.ts.map +0 -1
- package/dist/src/reactive/watch.d.ts +0 -48
- package/dist/src/reactive/watch.d.ts.map +0 -1
- package/dist/src/std-decorators.d.ts +0 -45
- package/dist/src/std-decorators.d.ts.map +0 -1
- package/dist/src/utils.d.ts +0 -49
- package/dist/src/utils.d.ts.map +0 -1
- package/dist/src/zone.d.ts +0 -40
- package/dist/src/zone.d.ts.map +0 -1
- package/docs/reactive/describe.md +0 -85
- package/docs/reactive/project.md +0 -93
- package/src/async/browser.ts +0 -323
- package/src/async/index.ts +0 -27
- package/src/async/node.ts +0 -92
- package/src/decorator.ts +0 -272
- package/src/destroyable.ts +0 -199
- package/src/entry-browser.ts +0 -5
- package/src/entry-node.ts +0 -5
- package/src/eventful.ts +0 -110
- package/src/flavored.ts +0 -106
- package/src/index.d.ts +0 -12
- package/src/index.ts +0 -64
- package/src/indexable.ts +0 -526
- package/src/introspection.ts +0 -59
- package/src/iterableWeak.ts +0 -233
- package/src/mixins.ts +0 -123
- package/src/promiseChain.ts +0 -110
- package/src/reactive/array.ts +0 -500
- package/src/reactive/buffer.ts +0 -328
- package/src/reactive/change.ts +0 -131
- package/src/reactive/deep-touch.ts +0 -273
- package/src/reactive/deep-watch-state.ts +0 -82
- package/src/reactive/deep-watch.ts +0 -171
- package/src/reactive/describe.ts +0 -39
- package/src/reactive/effect-context.ts +0 -83
- package/src/reactive/effects.ts +0 -1434
- package/src/reactive/index.ts +0 -72
- package/src/reactive/map.ts +0 -142
- package/src/reactive/memoize.ts +0 -186
- package/src/reactive/non-reactive-state.ts +0 -49
- package/src/reactive/non-reactive.ts +0 -43
- package/src/reactive/project.md +0 -107
- package/src/reactive/project.ts +0 -430
- package/src/reactive/proxy-state.ts +0 -27
- package/src/reactive/proxy.ts +0 -282
- package/src/reactive/record.ts +0 -181
- package/src/reactive/register.ts +0 -538
- package/src/reactive/registry.ts +0 -72
- package/src/reactive/set.ts +0 -117
- package/src/reactive/tracking.ts +0 -41
- package/src/reactive/types.ts +0 -520
- package/src/reactive/watch.ts +0 -180
- package/src/std-decorators.ts +0 -256
- package/src/utils.ts +0 -300
- package/src/zone.ts +0 -142
package/dist/node.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('./chunks/async-node-
|
|
3
|
+
require('./chunks/async-node-3PrbVAbB.cjs');
|
|
4
4
|
var browser = require('./browser.cjs');
|
|
5
|
-
var
|
|
5
|
+
var proxy = require('./chunks/proxy-Dtg-bJ3T.cjs');
|
|
6
6
|
var asyncCore = require('./chunks/async-core-CRLKP3l-.cjs');
|
|
7
7
|
require('node:async_hooks');
|
|
8
|
-
require('./chunks/async-browser-
|
|
8
|
+
require('./chunks/async-browser-BU_IfxYD.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -17,6 +17,7 @@ exports.Indexable = browser.Indexable;
|
|
|
17
17
|
exports.Register = browser.Register;
|
|
18
18
|
exports.allocated = browser.allocated;
|
|
19
19
|
exports.allocatedValues = browser.allocatedValues;
|
|
20
|
+
exports.arrayDiff = browser.arrayDiff;
|
|
20
21
|
exports.attend = browser.attend;
|
|
21
22
|
exports.cache = browser.cache;
|
|
22
23
|
exports.cached = browser.cached;
|
|
@@ -25,82 +26,83 @@ exports.chainPromise = browser.chainPromise;
|
|
|
25
26
|
exports.debounce = browser.debounce;
|
|
26
27
|
exports.deepWatch = browser.deepWatch;
|
|
27
28
|
exports.deprecated = browser.deprecated;
|
|
28
|
-
exports.describe = browser.describe;
|
|
29
29
|
exports.descriptor = browser.descriptor;
|
|
30
30
|
exports.destructor = browser.destructor;
|
|
31
31
|
exports.forwardArray = browser.forwardArray;
|
|
32
|
-
exports.getActiveProjection = browser.getActiveProjection;
|
|
33
32
|
exports.getAt = browser.getAt;
|
|
34
33
|
exports.isCached = browser.isCached;
|
|
35
34
|
exports.lift = browser.lift;
|
|
36
35
|
exports.memoize = browser.memoize;
|
|
36
|
+
exports.morph = browser.morph;
|
|
37
37
|
exports.organize = browser.organize;
|
|
38
38
|
exports.organized = browser.organized;
|
|
39
39
|
exports.profileInfo = browser.profileInfo;
|
|
40
|
-
exports.project = browser.
|
|
40
|
+
exports.project = browser.morph;
|
|
41
41
|
exports.register = browser.register;
|
|
42
|
+
exports.resource = browser.resource;
|
|
42
43
|
exports.scan = browser.scan;
|
|
43
44
|
exports.setAt = browser.setAt;
|
|
44
45
|
exports.throttle = browser.throttle;
|
|
45
46
|
exports.unreactive = browser.unreactive;
|
|
46
47
|
exports.watch = browser.watch;
|
|
47
|
-
exports.
|
|
48
|
-
exports.
|
|
49
|
-
exports.
|
|
50
|
-
exports.IterableWeakMap =
|
|
51
|
-
exports.IterableWeakSet =
|
|
52
|
-
exports.ReactiveBase =
|
|
53
|
-
exports.ReactiveError =
|
|
48
|
+
exports.when = browser.when;
|
|
49
|
+
exports.AZone = proxy.AZone;
|
|
50
|
+
exports.DecoratorError = proxy.DecoratorError;
|
|
51
|
+
exports.IterableWeakMap = proxy.IterableWeakMap;
|
|
52
|
+
exports.IterableWeakSet = proxy.IterableWeakSet;
|
|
53
|
+
exports.ReactiveBase = proxy.ReactiveBase;
|
|
54
|
+
exports.ReactiveError = proxy.ReactiveError;
|
|
54
55
|
Object.defineProperty(exports, "ReactiveErrorCode", {
|
|
55
56
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
57
|
+
get: function () { return proxy.ReactiveErrorCode; }
|
|
57
58
|
});
|
|
58
|
-
exports.Zone =
|
|
59
|
-
exports.ZoneAggregator =
|
|
60
|
-
exports.ZoneHistory =
|
|
61
|
-
exports.addBatchCleanup =
|
|
62
|
-
exports.arrayEquals =
|
|
63
|
-
exports.asyncZone =
|
|
64
|
-
exports.
|
|
65
|
-
exports.
|
|
66
|
-
exports.
|
|
67
|
-
exports.
|
|
68
|
-
exports.
|
|
69
|
-
exports.
|
|
70
|
-
exports.
|
|
71
|
-
exports.
|
|
72
|
-
exports.
|
|
73
|
-
exports.
|
|
74
|
-
exports.effect =
|
|
75
|
-
exports.effectAggregator =
|
|
76
|
-
exports.flavorOptions =
|
|
77
|
-
exports.flavored =
|
|
78
|
-
exports.
|
|
79
|
-
exports.
|
|
80
|
-
exports.
|
|
81
|
-
exports.
|
|
82
|
-
exports.
|
|
83
|
-
exports.
|
|
84
|
-
exports.
|
|
85
|
-
exports.
|
|
86
|
-
exports.
|
|
87
|
-
exports.
|
|
88
|
-
exports.
|
|
89
|
-
exports.
|
|
90
|
-
exports.
|
|
91
|
-
exports.
|
|
92
|
-
exports.
|
|
93
|
-
exports.
|
|
94
|
-
exports.
|
|
95
|
-
exports.
|
|
96
|
-
exports.reset =
|
|
97
|
-
exports.root =
|
|
98
|
-
exports.
|
|
99
|
-
exports.
|
|
100
|
-
exports.
|
|
101
|
-
exports.
|
|
102
|
-
exports.
|
|
103
|
-
exports.
|
|
59
|
+
exports.Zone = proxy.Zone;
|
|
60
|
+
exports.ZoneAggregator = proxy.ZoneAggregator;
|
|
61
|
+
exports.ZoneHistory = proxy.ZoneHistory;
|
|
62
|
+
exports.addBatchCleanup = proxy.addBatchCleanup;
|
|
63
|
+
exports.arrayEquals = proxy.arrayEquals;
|
|
64
|
+
exports.asyncZone = proxy.asyncZone;
|
|
65
|
+
exports.atom = proxy.atom;
|
|
66
|
+
exports.atomic = proxy.atomic;
|
|
67
|
+
exports.biDi = proxy.biDi;
|
|
68
|
+
exports.caught = proxy.caught;
|
|
69
|
+
exports.cleanedBy = proxy.cleanedBy;
|
|
70
|
+
exports.cleanup = proxy.cleanup;
|
|
71
|
+
exports.createFlavor = proxy.createFlavor;
|
|
72
|
+
exports.decorator = proxy.decorator;
|
|
73
|
+
exports.deepCompare = proxy.deepCompare;
|
|
74
|
+
exports.defer = proxy.defer;
|
|
75
|
+
exports.effect = proxy.effect;
|
|
76
|
+
exports.effectAggregator = proxy.effectAggregator;
|
|
77
|
+
exports.flavorOptions = proxy.flavorOptions;
|
|
78
|
+
exports.flavored = proxy.flavored;
|
|
79
|
+
exports.formatCleanupReason = proxy.formatCleanupReason;
|
|
80
|
+
exports.getActivationLog = proxy.getActivationLog;
|
|
81
|
+
exports.getActiveEffect = proxy.getActiveEffect;
|
|
82
|
+
exports.getState = proxy.getState;
|
|
83
|
+
exports.immutables = proxy.immutables;
|
|
84
|
+
exports.isConstructor = proxy.isConstructor;
|
|
85
|
+
exports.isNonReactive = proxy.isNonReactive;
|
|
86
|
+
exports.isObject = proxy.isObject;
|
|
87
|
+
exports.isReactive = proxy.isReactive;
|
|
88
|
+
exports.legacyDecorator = proxy.legacyDecorator;
|
|
89
|
+
exports.mixin = proxy.mixin;
|
|
90
|
+
exports.modernDecorator = proxy.modernDecorator;
|
|
91
|
+
exports.named = proxy.named;
|
|
92
|
+
exports.objectToProxy = proxy.objectToProxy;
|
|
93
|
+
exports.onEffectThrow = proxy.onEffectThrow;
|
|
94
|
+
exports.proxyToObject = proxy.proxyToObject;
|
|
95
|
+
exports.reactive = proxy.reactive;
|
|
96
|
+
exports.reactiveOptions = proxy.options;
|
|
97
|
+
exports.reset = proxy.reset;
|
|
98
|
+
exports.root = proxy.root;
|
|
99
|
+
exports.stopped = proxy.stopped;
|
|
100
|
+
exports.tag = proxy.tag;
|
|
101
|
+
exports.touched = proxy.touched;
|
|
102
|
+
exports.touched1 = proxy.touched1;
|
|
103
|
+
exports.untracked = proxy.untracked;
|
|
104
|
+
exports.unwrap = proxy.unwrap;
|
|
105
|
+
exports.zip = proxy.zip;
|
|
104
106
|
exports.asyncHook = asyncCore.asyncHook;
|
|
105
107
|
exports.asyncHooks = asyncCore.asyncHooks;
|
|
106
108
|
exports.hooks = asyncCore.hooks;
|
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 { ArrayReadForward, ContextManager, Decorator, DecoratorDescription, DecoratorError, DecoratorFactory, Destroyable, DestructionError, Eventful, EventsBase,
|
|
2
|
-
export { A as AZone, e as
|
|
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';
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
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');
|
|
8
|
+
require('node:async_hooks');
|
|
9
|
+
require('./chunks/async-browser-BU_IfxYD.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
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;
|
|
50
|
+
exports.AZone = proxy.AZone;
|
|
51
|
+
exports.DecoratorError = proxy.DecoratorError;
|
|
52
|
+
exports.IterableWeakMap = proxy.IterableWeakMap;
|
|
53
|
+
exports.IterableWeakSet = proxy.IterableWeakSet;
|
|
54
|
+
exports.ReactiveBase = proxy.ReactiveBase;
|
|
55
|
+
exports.ReactiveError = proxy.ReactiveError;
|
|
56
|
+
Object.defineProperty(exports, "ReactiveErrorCode", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () { return proxy.ReactiveErrorCode; }
|
|
59
|
+
});
|
|
60
|
+
exports.Zone = proxy.Zone;
|
|
61
|
+
exports.ZoneAggregator = proxy.ZoneAggregator;
|
|
62
|
+
exports.ZoneHistory = proxy.ZoneHistory;
|
|
63
|
+
exports.addBatchCleanup = proxy.addBatchCleanup;
|
|
64
|
+
exports.arrayEquals = proxy.arrayEquals;
|
|
65
|
+
exports.asyncZone = proxy.asyncZone;
|
|
66
|
+
exports.atom = proxy.atom;
|
|
67
|
+
exports.atomic = proxy.atomic;
|
|
68
|
+
exports.biDi = proxy.biDi;
|
|
69
|
+
exports.caught = proxy.caught;
|
|
70
|
+
exports.cleanedBy = proxy.cleanedBy;
|
|
71
|
+
exports.cleanup = proxy.cleanup;
|
|
72
|
+
exports.createFlavor = proxy.createFlavor;
|
|
73
|
+
exports.decorator = proxy.decorator;
|
|
74
|
+
exports.deepCompare = proxy.deepCompare;
|
|
75
|
+
exports.defer = proxy.defer;
|
|
76
|
+
exports.effect = proxy.effect;
|
|
77
|
+
exports.effectAggregator = proxy.effectAggregator;
|
|
78
|
+
exports.flavorOptions = proxy.flavorOptions;
|
|
79
|
+
exports.flavored = proxy.flavored;
|
|
80
|
+
exports.formatCleanupReason = proxy.formatCleanupReason;
|
|
81
|
+
exports.getActivationLog = proxy.getActivationLog;
|
|
82
|
+
exports.getActiveEffect = proxy.getActiveEffect;
|
|
83
|
+
exports.getState = proxy.getState;
|
|
84
|
+
exports.immutables = proxy.immutables;
|
|
85
|
+
exports.isConstructor = proxy.isConstructor;
|
|
86
|
+
exports.isNonReactive = proxy.isNonReactive;
|
|
87
|
+
exports.isObject = proxy.isObject;
|
|
88
|
+
exports.isReactive = proxy.isReactive;
|
|
89
|
+
exports.legacyDecorator = proxy.legacyDecorator;
|
|
90
|
+
exports.mixin = proxy.mixin;
|
|
91
|
+
exports.modernDecorator = proxy.modernDecorator;
|
|
92
|
+
exports.named = proxy.named;
|
|
93
|
+
exports.objectToProxy = proxy.objectToProxy;
|
|
94
|
+
exports.onEffectThrow = proxy.onEffectThrow;
|
|
95
|
+
exports.proxyToObject = proxy.proxyToObject;
|
|
96
|
+
exports.reactive = proxy.reactive;
|
|
97
|
+
exports.reactiveOptions = proxy.options;
|
|
98
|
+
exports.reset = proxy.reset;
|
|
99
|
+
exports.root = proxy.root;
|
|
100
|
+
exports.stopped = proxy.stopped;
|
|
101
|
+
exports.tag = proxy.tag;
|
|
102
|
+
exports.touched = proxy.touched;
|
|
103
|
+
exports.touched1 = proxy.touched1;
|
|
104
|
+
exports.untracked = proxy.untracked;
|
|
105
|
+
exports.unwrap = proxy.unwrap;
|
|
106
|
+
exports.zip = proxy.zip;
|
|
107
|
+
exports.asyncHook = asyncCore.asyncHook;
|
|
108
|
+
exports.asyncHooks = asyncCore.asyncHooks;
|
|
109
|
+
exports.hooks = asyncCore.hooks;
|
|
110
|
+
//# sourceMappingURL=node.dev.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.dev.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +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';
|
|
@@ -0,0 +1,6 @@
|
|
|
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';
|
|
5
|
+
import 'node:async_hooks';
|
|
6
|
+
//# sourceMappingURL=node.dev.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.dev.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/node.esm.js
CHANGED
|
@@ -1,98 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { A as AZone, D as DecoratorError,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// 1. Generic async_hooks implementation for Hooks
|
|
7
|
-
// This maintains support for 'asyncHooks.addHook' for generic use cases.
|
|
8
|
-
const contexts = new Map();
|
|
9
|
-
const activeUndoers = new Map();
|
|
10
|
-
// Helper to capture current hooks state
|
|
11
|
-
function captureRestorers() {
|
|
12
|
-
if (hooks.size === 0)
|
|
13
|
-
return [];
|
|
14
|
-
const restorers = [];
|
|
15
|
-
for (const h of hooks) {
|
|
16
|
-
const r = h();
|
|
17
|
-
if (r)
|
|
18
|
-
restorers.push(r);
|
|
19
|
-
}
|
|
20
|
-
return restorers;
|
|
21
|
-
}
|
|
22
|
-
// Manual Wrap function to handle Promise callbacks
|
|
23
|
-
function wrap(fn) {
|
|
24
|
-
if (typeof fn !== 'function')
|
|
25
|
-
return fn;
|
|
26
|
-
const restorers = captureRestorers();
|
|
27
|
-
if (restorers.length === 0)
|
|
28
|
-
return fn;
|
|
29
|
-
return function (...args) {
|
|
30
|
-
const undoers = [];
|
|
31
|
-
for (const restore of restorers) {
|
|
32
|
-
const u = restore();
|
|
33
|
-
if (u)
|
|
34
|
-
undoers.push(u);
|
|
35
|
-
}
|
|
36
|
-
try {
|
|
37
|
-
return fn.apply(this, args);
|
|
38
|
-
}
|
|
39
|
-
finally {
|
|
40
|
-
for (let i = undoers.length - 1; i >= 0; i--)
|
|
41
|
-
undoers[i]();
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const hook = createHook({
|
|
46
|
-
init(asyncId, _type, _triggerId, _resource) {
|
|
47
|
-
// Used for native resources like Timers
|
|
48
|
-
const restorers = captureRestorers();
|
|
49
|
-
if (restorers.length > 0)
|
|
50
|
-
contexts.set(asyncId, restorers);
|
|
51
|
-
},
|
|
52
|
-
before(asyncId) {
|
|
53
|
-
const restorers = contexts.get(asyncId);
|
|
54
|
-
if (!restorers)
|
|
55
|
-
return;
|
|
56
|
-
const undoers = [];
|
|
57
|
-
for (const restore of restorers) {
|
|
58
|
-
const u = restore();
|
|
59
|
-
if (u)
|
|
60
|
-
undoers.push(u);
|
|
61
|
-
}
|
|
62
|
-
if (undoers.length > 0)
|
|
63
|
-
activeUndoers.set(asyncId, undoers);
|
|
64
|
-
},
|
|
65
|
-
after(asyncId) {
|
|
66
|
-
const undoers = activeUndoers.get(asyncId);
|
|
67
|
-
if (!undoers)
|
|
68
|
-
return;
|
|
69
|
-
for (let i = undoers.length - 1; i >= 0; i--)
|
|
70
|
-
undoers[i]();
|
|
71
|
-
activeUndoers.delete(asyncId);
|
|
72
|
-
},
|
|
73
|
-
destroy(asyncId) {
|
|
74
|
-
contexts.delete(asyncId);
|
|
75
|
-
activeUndoers.delete(asyncId);
|
|
76
|
-
},
|
|
77
|
-
});
|
|
78
|
-
hook.enable();
|
|
79
|
-
// 2. Shadow Promise Implementation
|
|
80
|
-
// Ensures V8 await resumptions are visible as .then callbacks, wrapping them to restore context.
|
|
81
|
-
const OriginalPromise = globalThis.Promise;
|
|
82
|
-
const originalMethods = {
|
|
83
|
-
then: OriginalPromise.prototype.then,
|
|
84
|
-
catch: OriginalPromise.prototype.catch,
|
|
85
|
-
finally: OriginalPromise.prototype.finally};
|
|
86
|
-
// Patch prototype
|
|
87
|
-
OriginalPromise.prototype.then = function (onFulfilled, onRejected) {
|
|
88
|
-
return originalMethods.then.call(this, wrap(onFulfilled), wrap(onRejected));
|
|
89
|
-
};
|
|
90
|
-
OriginalPromise.prototype.catch = function (onRejected) {
|
|
91
|
-
return originalMethods.catch.call(this, wrap(onRejected));
|
|
92
|
-
};
|
|
93
|
-
OriginalPromise.prototype.finally = function (onFinally) {
|
|
94
|
-
return originalMethods.finally.call(this, wrap(onFinally));
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export { hooks };
|
|
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';
|
|
4
|
+
import 'node:async_hooks';
|
|
98
5
|
//# sourceMappingURL=node.esm.js.map
|
package/dist/node.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.esm.js","sources":[
|
|
1
|
+
{"version":3,"file":"node.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -74,28 +74,70 @@ interface EffectAccess {
|
|
|
74
74
|
*/
|
|
75
75
|
ascend: FunctionWrapper;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
77
|
+
* `false` on the first execution, `true` or `CleanupReason` on subsequent runs.
|
|
78
|
+
* `true` means this is a re-run but detailed reason gathering is disabled or unavailable.
|
|
79
|
+
* A `CleanupReason` describes *why* the previous run was torn down.
|
|
80
80
|
* @example
|
|
81
81
|
* ```typescript
|
|
82
82
|
* effect(({ reaction }) => {
|
|
83
83
|
* if (!reaction) {
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
84
|
+
* // First run — setup
|
|
85
|
+
* } else if (reaction !== true && reaction.type === 'propChange') {
|
|
86
|
+
* // Re-run due to dependency change (with details)
|
|
87
|
+
* for (const { evolution } of reaction.triggers)
|
|
88
|
+
* console.log(`${'prop' in evolution ? evolution.prop : evolution.method}: ${evolution.type}`)
|
|
89
89
|
* }
|
|
90
90
|
* })
|
|
91
91
|
* ```
|
|
92
92
|
*/
|
|
93
|
-
reaction: boolean;
|
|
93
|
+
reaction: boolean | CleanupReason;
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* Base type for effect callbacks - simple function without additional properties
|
|
97
97
|
*/
|
|
98
|
-
type ScopedCallback = () => void;
|
|
98
|
+
type ScopedCallback = (reason?: CleanupReason) => void;
|
|
99
|
+
type PropTrigger = {
|
|
100
|
+
obj: object;
|
|
101
|
+
evolution: Evolution;
|
|
102
|
+
dependency?: unknown;
|
|
103
|
+
touch?: unknown;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Reason for an effect cleanup/reaction
|
|
107
|
+
*/
|
|
108
|
+
type CleanupReason = {
|
|
109
|
+
type: 'propChange';
|
|
110
|
+
triggers: PropTrigger[];
|
|
111
|
+
} | {
|
|
112
|
+
type: 'invalidate';
|
|
113
|
+
cause: CleanupReason;
|
|
114
|
+
} | {
|
|
115
|
+
type: 'stopped';
|
|
116
|
+
} | {
|
|
117
|
+
type: 'gc';
|
|
118
|
+
} | {
|
|
119
|
+
type: 'lineage';
|
|
120
|
+
parent: CleanupReason;
|
|
121
|
+
} | {
|
|
122
|
+
type: 'error';
|
|
123
|
+
error: unknown;
|
|
124
|
+
} | {
|
|
125
|
+
type: 'multiple';
|
|
126
|
+
reasons: CleanupReason[];
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Console-friendly description of a `CleanupReason`.
|
|
130
|
+
* Returns an array of arguments to spread into `console.log` / `console.warn`,
|
|
131
|
+
* mixing strings and raw object references so the console can render them as inspectable values.
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```typescript
|
|
135
|
+
* effect(({ reaction }) => {
|
|
136
|
+
* if (reaction !== true) console.log(...formatCleanupReason(reaction))
|
|
137
|
+
* })
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
declare function formatCleanupReason(reason: CleanupReason, depth?: number): unknown[];
|
|
99
141
|
/**
|
|
100
142
|
* Type for effect cleanup functions with stopped state tracking
|
|
101
143
|
*/
|
|
@@ -164,49 +206,48 @@ declare const stopped: unique symbol;
|
|
|
164
206
|
* Symbol to access effect cleanup function
|
|
165
207
|
*/
|
|
166
208
|
declare const cleanup: unique symbol;
|
|
167
|
-
type EffectCloser = (
|
|
209
|
+
type EffectCloser = (reason?: CleanupReason) => void;
|
|
168
210
|
type CatchFunction = (error: any) => EffectCloser | undefined | void;
|
|
169
|
-
/**
|
|
170
|
-
* Context for a running projection item effect
|
|
171
|
-
*/
|
|
172
|
-
interface ProjectionContext {
|
|
173
|
-
source: any;
|
|
174
|
-
key?: any;
|
|
175
|
-
target: any;
|
|
176
|
-
depth: number;
|
|
177
|
-
parent?: ProjectionContext;
|
|
178
|
-
}
|
|
179
211
|
/**
|
|
180
212
|
* Structured error codes for machine-readable diagnosis
|
|
181
213
|
*/
|
|
182
214
|
declare enum ReactiveErrorCode {
|
|
183
|
-
CycleDetected = "
|
|
184
|
-
MaxDepthExceeded = "
|
|
185
|
-
MaxReactionExceeded = "
|
|
186
|
-
WriteInComputed = "
|
|
187
|
-
TrackingError = "
|
|
188
|
-
BrokenEffects = "
|
|
215
|
+
CycleDetected = "Cycle detected",
|
|
216
|
+
MaxDepthExceeded = "Max depth exceeded",
|
|
217
|
+
MaxReactionExceeded = "Max reaction exceeded",
|
|
218
|
+
WriteInComputed = "Write in computed",
|
|
219
|
+
TrackingError = "Tracking error",
|
|
220
|
+
BrokenEffects = "Broken effects"
|
|
189
221
|
}
|
|
190
222
|
type CycleDebugInfo = {
|
|
191
223
|
code: ReactiveErrorCode.CycleDetected;
|
|
192
224
|
cycle: string[];
|
|
193
225
|
details?: string;
|
|
226
|
+
causalChain?: string[];
|
|
227
|
+
lineage?: unknown;
|
|
194
228
|
};
|
|
195
229
|
type MaxDepthDebugInfo = {
|
|
196
230
|
code: ReactiveErrorCode.MaxDepthExceeded;
|
|
197
|
-
|
|
198
|
-
|
|
231
|
+
effectuatedRoots: any[];
|
|
232
|
+
cycle: any[] | null;
|
|
233
|
+
trace: string;
|
|
234
|
+
maxEffectChain: number;
|
|
235
|
+
queued: string[];
|
|
236
|
+
queuedCount: number;
|
|
237
|
+
causalChain?: string[];
|
|
238
|
+
lineage?: unknown;
|
|
199
239
|
};
|
|
200
240
|
type MaxReactionDebugInfo = {
|
|
201
241
|
code: ReactiveErrorCode.MaxReactionExceeded;
|
|
202
242
|
count: number;
|
|
203
243
|
effect: string;
|
|
244
|
+
causalChain?: string[];
|
|
245
|
+
lineage?: unknown;
|
|
204
246
|
};
|
|
205
247
|
type GenericDebugInfo = {
|
|
206
248
|
code: ReactiveErrorCode;
|
|
207
249
|
causalChain?: string[];
|
|
208
|
-
|
|
209
|
-
lineage?: any[];
|
|
250
|
+
lineage?: unknown;
|
|
210
251
|
[key: string]: any;
|
|
211
252
|
};
|
|
212
253
|
type ReactiveDebugInfo = CycleDebugInfo | MaxDepthDebugInfo | MaxReactionDebugInfo | GenericDebugInfo;
|
|
@@ -256,7 +297,7 @@ declare const options: {
|
|
|
256
297
|
* @param props - The properties that changed
|
|
257
298
|
* @param deps - The dependencies that changed
|
|
258
299
|
*/
|
|
259
|
-
touched: (_obj: any, _evolution: Evolution, _props?: any[], _deps?:
|
|
300
|
+
touched: (_obj: any, _evolution: Evolution, _props?: any[], _deps?: EffectTrigger[]) => void;
|
|
260
301
|
/**
|
|
261
302
|
* Debug purpose: called when an effect is skipped because it's already running
|
|
262
303
|
* @param effect - The effect that is already running
|
|
@@ -366,20 +407,30 @@ declare const options: {
|
|
|
366
407
|
asyncMode: AsyncExecutionMode | false;
|
|
367
408
|
warn: (...args: any[]) => void;
|
|
368
409
|
/**
|
|
369
|
-
*
|
|
410
|
+
* Introspection and debug aids. Set to `null` to disable all debug overhead in production.
|
|
411
|
+
*
|
|
412
|
+
* - `gatherReasons`: collect `PropTrigger[]` for `CleanupReason` on effect re-runs (default `true`)
|
|
413
|
+
* - `lineages`: what lineages to capture in PropTrigger (default `'touch'`)
|
|
414
|
+
* - `logErrors`: log errors with detailed context (default `true`)
|
|
415
|
+
* - `enableHistory`: keep a history of mutations (default `true`)
|
|
416
|
+
* - `historySize`: number of mutations to keep in history (default `50`)
|
|
417
|
+
*
|
|
418
|
+
* `enableDevTools()` sets `logErrors` to `true` automatically.
|
|
419
|
+
*
|
|
420
|
+
* @example
|
|
421
|
+
* ```typescript
|
|
422
|
+
* // Production: disable all introspection
|
|
423
|
+
* reactiveOptions.introspection = null
|
|
424
|
+
* ```
|
|
370
425
|
*/
|
|
371
426
|
introspection: {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
427
|
+
gatherReasons: {
|
|
428
|
+
lineages: "none" | "touch" | "dependency" | "both";
|
|
429
|
+
};
|
|
430
|
+
logErrors: boolean;
|
|
376
431
|
enableHistory: boolean;
|
|
377
|
-
/**
|
|
378
|
-
* Number of mutations to keep in history
|
|
379
|
-
* @default 50
|
|
380
|
-
*/
|
|
381
432
|
historySize: number;
|
|
382
|
-
};
|
|
433
|
+
} | null;
|
|
383
434
|
/**
|
|
384
435
|
* Configuration for zone hooks - control which async APIs are hooked
|
|
385
436
|
* Each option controls whether the corresponding async API is wrapped to preserve effect context
|
|
@@ -409,6 +460,10 @@ declare const options: {
|
|
|
409
460
|
queueMicrotask: boolean;
|
|
410
461
|
};
|
|
411
462
|
};
|
|
463
|
+
declare const objectToProxy: WeakMap<object, object>;
|
|
464
|
+
declare const proxyToObject: WeakMap<object, object>;
|
|
465
|
+
declare function unwrap<T>(obj: T): T;
|
|
466
|
+
declare function isReactive(obj: any): boolean;
|
|
412
467
|
|
|
413
|
-
export { AZone as A, ReactiveError as R, ZoneAggregator as Z, cleanup as c, ReactiveErrorCode as
|
|
414
|
-
export type { CatchFunction as C, EffectTrigger as E, FunctionWrapper as F,
|
|
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 };
|