mutts 1.0.7 → 1.0.8
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 +61 -23
- package/dist/async/browser.d.ts +2 -0
- package/dist/async/browser.d.ts.map +1 -0
- package/dist/async/index.d.ts +18 -0
- package/dist/async/index.d.ts.map +1 -0
- package/dist/async/node.d.ts +2 -0
- package/dist/async/node.d.ts.map +1 -0
- package/dist/{chunks/index-BFYK02LG.js → browser.cjs} +169 -60
- package/dist/browser.cjs.map +1 -0
- package/dist/browser.d.ts +1654 -1
- package/dist/browser.esm.js +260 -25
- package/dist/browser.esm.js.map +1 -1
- package/dist/chunks/async-browser-CA0jPWIi.cjs +304 -0
- package/dist/chunks/async-browser-CA0jPWIi.cjs.map +1 -0
- package/dist/chunks/async-core-UqHzvJ-S.cjs +25 -0
- package/dist/chunks/async-core-UqHzvJ-S.cjs.map +1 -0
- package/dist/chunks/async-node-BYHuGTni.cjs +103 -0
- package/dist/chunks/async-node-BYHuGTni.cjs.map +1 -0
- package/dist/chunks/{index-CNR6QRUl.esm.js → index-DhaOVusv.esm.js} +173 -53
- package/dist/chunks/index-DhaOVusv.esm.js.map +1 -0
- package/dist/decorator.d.ts +106 -0
- package/dist/decorator.d.ts.map +1 -0
- package/dist/destroyable.d.ts +87 -0
- package/dist/destroyable.d.ts.map +1 -0
- package/dist/devtools/devtool/devtools.d.ts +1 -0
- package/dist/devtools/devtool/devtools.d.ts.map +1 -0
- package/dist/devtools/devtool/panel.d.ts +2 -0
- package/dist/devtools/devtool/panel.d.ts.map +1 -0
- package/dist/entry-browser.d.ts +3 -0
- package/dist/entry-browser.d.ts.map +1 -0
- package/dist/entry-node.d.ts +3 -0
- package/dist/entry-node.d.ts.map +1 -0
- package/dist/eventful.d.ts +18 -0
- package/dist/eventful.d.ts.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/indexable.d.ts +243 -0
- package/dist/indexable.d.ts.map +1 -0
- package/dist/introspection.d.ts +27 -0
- package/dist/introspection.d.ts.map +1 -0
- package/dist/iterableWeak.d.ts +53 -0
- package/dist/iterableWeak.d.ts.map +1 -0
- package/dist/mixins.d.ts +25 -0
- package/dist/mixins.d.ts.map +1 -0
- package/dist/mutts.umd.js +1 -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 +105 -0
- package/dist/node.cjs.map +1 -0
- package/dist/node.d.ts +1 -2
- package/dist/node.esm.js +91 -32
- package/dist/node.esm.js.map +1 -1
- package/dist/promiseChain.d.ts +20 -0
- package/dist/promiseChain.d.ts.map +1 -0
- package/dist/reactive/array.d.ts +49 -0
- package/dist/reactive/array.d.ts.map +1 -0
- package/dist/reactive/buffer.d.ts +44 -0
- package/dist/reactive/buffer.d.ts.map +1 -0
- package/dist/reactive/change.d.ts +29 -0
- package/dist/reactive/change.d.ts.map +1 -0
- package/dist/reactive/debug.d.ts +111 -0
- package/dist/reactive/debug.d.ts.map +1 -0
- package/dist/reactive/deep-touch.d.ts +28 -0
- package/dist/reactive/deep-touch.d.ts.map +1 -0
- package/dist/reactive/deep-watch-state.d.ts +25 -0
- package/dist/reactive/deep-watch-state.d.ts.map +1 -0
- package/dist/reactive/deep-watch.d.ts +19 -0
- package/dist/reactive/deep-watch.d.ts.map +1 -0
- package/dist/reactive/effect-context.d.ts +7 -0
- package/dist/reactive/effect-context.d.ts.map +1 -0
- package/dist/reactive/effects.d.ts +151 -0
- package/dist/reactive/effects.d.ts.map +1 -0
- package/dist/reactive/index.d.ts +20 -0
- package/dist/reactive/index.d.ts.map +1 -0
- package/dist/reactive/interface.d.ts +64 -0
- package/dist/reactive/interface.d.ts.map +1 -0
- package/dist/reactive/map.d.ts +30 -0
- package/dist/reactive/map.d.ts.map +1 -0
- package/dist/reactive/memoize.d.ts +5 -0
- package/dist/reactive/memoize.d.ts.map +1 -0
- package/dist/reactive/non-reactive-state.d.ts +9 -0
- package/dist/reactive/non-reactive-state.d.ts.map +1 -0
- package/dist/reactive/non-reactive.d.ts +11 -0
- package/dist/reactive/non-reactive.d.ts.map +1 -0
- package/dist/reactive/project.d.ts +41 -0
- package/dist/reactive/project.d.ts.map +1 -0
- package/dist/reactive/proxy-state.d.ts +8 -0
- package/dist/reactive/proxy-state.d.ts.map +1 -0
- package/dist/reactive/proxy.d.ts +23 -0
- package/dist/reactive/proxy.d.ts.map +1 -0
- package/dist/reactive/record.d.ts +116 -0
- package/dist/reactive/record.d.ts.map +1 -0
- package/dist/reactive/register.d.ts +64 -0
- package/dist/reactive/register.d.ts.map +1 -0
- package/dist/reactive/registry.d.ts +20 -0
- package/dist/reactive/registry.d.ts.map +1 -0
- package/dist/reactive/set.d.ts +28 -0
- package/dist/reactive/set.d.ts.map +1 -0
- package/dist/reactive/tracking.d.ts +7 -0
- package/dist/reactive/tracking.d.ts.map +1 -0
- package/dist/reactive/types.d.ts +376 -0
- package/dist/reactive/types.d.ts.map +1 -0
- package/dist/std-decorators.d.ts +50 -0
- package/dist/std-decorators.d.ts.map +1 -0
- package/dist/utils.d.ts +49 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/zone.d.ts +40 -0
- package/dist/zone.d.ts.map +1 -0
- package/docs/std-decorators.md +69 -1
- package/docs/zone.md +7 -0
- package/package.json +39 -27
- package/src/async/browser.ts +266 -34
- package/src/async/index.ts +17 -2
- package/src/async/node.ts +89 -31
- package/src/entry-browser.ts +5 -0
- package/src/entry-node.ts +5 -0
- package/src/index.d.ts +12 -9
- package/src/index.ts +1 -0
- package/src/reactive/array.ts +139 -52
- package/src/reactive/effect-context.ts +3 -3
- package/src/reactive/index.ts +2 -1
- package/src/reactive/map.ts +1 -1
- package/src/reactive/set.ts +1 -1
- package/src/utils.ts +1 -1
- package/src/zone.ts +19 -8
- package/dist/browser.js +0 -161
- package/dist/browser.js.map +0 -1
- package/dist/chunks/index-BFYK02LG.js.map +0 -1
- package/dist/chunks/index-CNR6QRUl.esm.js.map +0 -1
- package/dist/node.js +0 -136
- package/dist/node.js.map +0 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown when decorator operations fail
|
|
3
|
+
*/
|
|
4
|
+
export declare class DecoratorError extends Error {
|
|
5
|
+
constructor(message: string);
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Legacy property decorator type for methods, getters, and setters
|
|
9
|
+
*/
|
|
10
|
+
export type LegacyPropertyDecorator<T> = (target: T, name: string | symbol, descriptor: PropertyDescriptor) => any;
|
|
11
|
+
/**
|
|
12
|
+
* Legacy class decorator type
|
|
13
|
+
*/
|
|
14
|
+
export type LegacyClassDecorator<T> = (target: T) => any;
|
|
15
|
+
/**
|
|
16
|
+
* Modern method decorator type
|
|
17
|
+
*/
|
|
18
|
+
export type ModernMethodDecorator<T> = (target: T, context: ClassMethodDecoratorContext) => any;
|
|
19
|
+
/**
|
|
20
|
+
* Modern getter decorator type
|
|
21
|
+
*/
|
|
22
|
+
export type ModernGetterDecorator<T> = (target: T, context: ClassGetterDecoratorContext) => any;
|
|
23
|
+
/**
|
|
24
|
+
* Modern setter decorator type
|
|
25
|
+
*/
|
|
26
|
+
export type ModernSetterDecorator<T> = (target: T, context: ClassSetterDecoratorContext) => any;
|
|
27
|
+
/**
|
|
28
|
+
* Modern accessor decorator type
|
|
29
|
+
*/
|
|
30
|
+
export type ModernAccessorDecorator<T> = (target: T, context: ClassAccessorDecoratorContext) => any;
|
|
31
|
+
/**
|
|
32
|
+
* Modern class decorator type
|
|
33
|
+
*/
|
|
34
|
+
export type ModernClassDecorator<T> = (target: T, context: ClassDecoratorContext) => any;
|
|
35
|
+
type DDMethod<T> = (original: (this: T, ...args: any[]) => any, target: any, name: PropertyKey) => ((this: T, ...args: any[]) => any) | void;
|
|
36
|
+
type DDGetter<T> = (original: (this: T) => any, target: any, name: PropertyKey) => ((this: T) => any) | void;
|
|
37
|
+
type DDSetter<T> = (original: (this: T, value: any) => void, target: any, name: PropertyKey) => ((this: T, value: any) => void) | void;
|
|
38
|
+
type DDClass<T> = <Ctor extends new (...args: any[]) => T = new (...args: any[]) => T>(target: Ctor) => Ctor | void;
|
|
39
|
+
/**
|
|
40
|
+
* Description object for creating decorators that work with both Legacy and Modern decorator proposals
|
|
41
|
+
*/
|
|
42
|
+
export interface DecoratorDescription<T> {
|
|
43
|
+
/** Handler for method decorators */
|
|
44
|
+
method?: DDMethod<T>;
|
|
45
|
+
/** Handler for class decorators */
|
|
46
|
+
class?: DDClass<T>;
|
|
47
|
+
/** Handler for getter decorators */
|
|
48
|
+
getter?: DDGetter<T>;
|
|
49
|
+
/** Handler for setter decorators */
|
|
50
|
+
setter?: DDSetter<T>;
|
|
51
|
+
/** Default handler for any decorator type not explicitly defined */
|
|
52
|
+
default?: (...args: any[]) => any;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Type for decorators that work with both Legacy and Modern decorator proposals
|
|
56
|
+
* Automatically infers the correct decorator type based on the description
|
|
57
|
+
*/
|
|
58
|
+
export type Decorator<T, Description extends DecoratorDescription<T>> = (Description extends {
|
|
59
|
+
method: DDMethod<T>;
|
|
60
|
+
} ? LegacyPropertyDecorator<T> & ModernMethodDecorator<T> : unknown) & (Description extends {
|
|
61
|
+
class: DDClass<new (...args: any[]) => T>;
|
|
62
|
+
} ? LegacyClassDecorator<new (...args: any[]) => T> & ModernClassDecorator<new (...args: any[]) => T> : unknown) & (Description extends {
|
|
63
|
+
getter: DDGetter<T>;
|
|
64
|
+
} ? LegacyPropertyDecorator<T> & ModernGetterDecorator<T> & ModernAccessorDecorator<T> : unknown) & (Description extends {
|
|
65
|
+
setter: DDSetter<T>;
|
|
66
|
+
} ? LegacyPropertyDecorator<T> & ModernSetterDecorator<T> & ModernAccessorDecorator<T> : unknown) & (Description extends {
|
|
67
|
+
default: infer Signature;
|
|
68
|
+
} ? Signature : unknown);
|
|
69
|
+
/**
|
|
70
|
+
* Factory type for creating decorators that work with both Legacy and Modern decorator proposals
|
|
71
|
+
*/
|
|
72
|
+
export type DecoratorFactory<T> = <Description extends DecoratorDescription<T>>(description: Description) => (Description extends {
|
|
73
|
+
method: DDMethod<T>;
|
|
74
|
+
} ? LegacyPropertyDecorator<T> & ModernMethodDecorator<T> : unknown) & (Description extends {
|
|
75
|
+
class: DDClass<new (...args: any[]) => T>;
|
|
76
|
+
} ? LegacyClassDecorator<new (...args: any[]) => T> & ModernClassDecorator<new (...args: any[]) => T> : unknown) & (Description extends {
|
|
77
|
+
getter: DDGetter<T>;
|
|
78
|
+
} ? LegacyPropertyDecorator<T> & ModernGetterDecorator<T> & ModernAccessorDecorator<T> : unknown) & (Description extends {
|
|
79
|
+
setter: DDSetter<T>;
|
|
80
|
+
} ? LegacyPropertyDecorator<T> & ModernSetterDecorator<T> & ModernAccessorDecorator<T> : unknown) & (Description extends {
|
|
81
|
+
default: infer Signature;
|
|
82
|
+
} ? Signature : unknown);
|
|
83
|
+
/**
|
|
84
|
+
* Creates a decorator that works with Legacy decorator proposals
|
|
85
|
+
* @param description - The decorator description object
|
|
86
|
+
* @returns A decorator function compatible with Legacy decorators
|
|
87
|
+
*/
|
|
88
|
+
export declare function legacyDecorator<T = any>(description: DecoratorDescription<T>): any;
|
|
89
|
+
/**
|
|
90
|
+
* Creates a decorator that works with Modern decorator proposals
|
|
91
|
+
* @param description - The decorator description object
|
|
92
|
+
* @returns A decorator function compatible with Modern decorators
|
|
93
|
+
*/
|
|
94
|
+
export declare function modernDecorator<T = any>(description: DecoratorDescription<T>): any;
|
|
95
|
+
/**
|
|
96
|
+
* Main decorator factory that automatically detects and works with both Legacy and Modern decorator proposals
|
|
97
|
+
* @param description - The decorator description object
|
|
98
|
+
* @returns A decorator that works in both Legacy and Modern environments
|
|
99
|
+
*/
|
|
100
|
+
export declare const decorator: DecoratorFactory<any>;
|
|
101
|
+
/**
|
|
102
|
+
* Generic class decorator type that works with both Legacy and Modern decorator proposals
|
|
103
|
+
*/
|
|
104
|
+
export type GenericClassDecorator<T> = LegacyClassDecorator<abstract new (...args: any[]) => T> & ModernClassDecorator<abstract new (...args: any[]) => T>;
|
|
105
|
+
export {};
|
|
106
|
+
//# sourceMappingURL=decorator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorator.d.ts","sourceRoot":"","sources":["../src/decorator.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,qBAAa,cAAe,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI3B;AAID;;GAEG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI,CACxC,MAAM,EAAE,CAAC,EACT,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,UAAU,EAAE,kBAAkB,KAC1B,GAAG,CAAA;AAER;;GAEG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,GAAG,CAAA;AAExD;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,2BAA2B,KAAK,GAAG,CAAA;AAE/F;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,2BAA2B,KAAK,GAAG,CAAA;AAE/F;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,2BAA2B,KAAK,GAAG,CAAA;AAE/F;;GAEG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,6BAA6B,KAAK,GAAG,CAAA;AAEnG;;GAEG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,qBAAqB,KAAK,GAAG,CAAA;AAIxF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AoB,CAAC,CAAC,CAAC,GAAG,GAAG,CAwClF;AAuBD;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,gBAAgB,CAAC,GAAG,CAS3C,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,oBAAoB,CAAC,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,GAC9F,oBAAoB,CAAC,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Symbol for marking destructor methods
|
|
3
|
+
*/
|
|
4
|
+
export declare const destructor: unique symbol;
|
|
5
|
+
/**
|
|
6
|
+
* Symbol for accessing allocated values in destroyable objects
|
|
7
|
+
*/
|
|
8
|
+
export declare const allocatedValues: unique symbol;
|
|
9
|
+
/**
|
|
10
|
+
* Error thrown when attempting to access a destroyed object
|
|
11
|
+
*/
|
|
12
|
+
export declare class DestructionError extends Error {
|
|
13
|
+
static throw<_T = void>(msg: string): () => never;
|
|
14
|
+
constructor(msg: string);
|
|
15
|
+
}
|
|
16
|
+
declare abstract class AbstractDestroyable<Allocated> {
|
|
17
|
+
abstract [destructor](allocated: Allocated): void;
|
|
18
|
+
[Symbol.dispose](): void;
|
|
19
|
+
}
|
|
20
|
+
interface Destructor<Allocated> {
|
|
21
|
+
destructor(allocated: Allocated): void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Creates a destroyable class with a base class and destructor object
|
|
25
|
+
* @param base - The base class to extend
|
|
26
|
+
* @param destructorObj - Object containing the destructor method
|
|
27
|
+
* @returns A destroyable class with static destroy and isDestroyable methods
|
|
28
|
+
*/
|
|
29
|
+
export declare function Destroyable<T extends new (...args: any[]) => any, Allocated extends Partial<InstanceType<T>>>(base: T, destructorObj: Destructor<Allocated>): (new (...args: ConstructorParameters<T>) => InstanceType<T> & {
|
|
30
|
+
[allocatedValues]: Allocated;
|
|
31
|
+
}) & {
|
|
32
|
+
destroy(obj: InstanceType<T>): boolean;
|
|
33
|
+
isDestroyable(obj: InstanceType<T>): boolean;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Creates a destroyable class with only a destructor object (no base class)
|
|
37
|
+
* @param destructorObj - Object containing the destructor method
|
|
38
|
+
* @returns A destroyable class with static destroy and isDestroyable methods
|
|
39
|
+
*/
|
|
40
|
+
export declare function Destroyable<Allocated extends Record<PropertyKey, any> = Record<PropertyKey, any>>(destructorObj: Destructor<Allocated>): (new () => {
|
|
41
|
+
[allocatedValues]: Allocated;
|
|
42
|
+
}) & {
|
|
43
|
+
destroy(obj: any): boolean;
|
|
44
|
+
isDestroyable(obj: any): boolean;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Creates a destroyable class with a base class (requires [destructor] method)
|
|
48
|
+
* @param base - The base class to extend
|
|
49
|
+
* @returns A destroyable class with static destroy and isDestroyable methods
|
|
50
|
+
*/
|
|
51
|
+
export declare function Destroyable<T extends new (...args: any[]) => any, Allocated extends Record<PropertyKey, any> = Record<PropertyKey, any>>(base: T): (new (...args: ConstructorParameters<T>) => AbstractDestroyable<Allocated> & InstanceType<T> & {
|
|
52
|
+
[allocatedValues]: Allocated;
|
|
53
|
+
}) & {
|
|
54
|
+
destroy(obj: InstanceType<T>): boolean;
|
|
55
|
+
isDestroyable(obj: InstanceType<T>): boolean;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Creates an abstract destroyable base class
|
|
59
|
+
* @returns An abstract destroyable class with static destroy and isDestroyable methods
|
|
60
|
+
*/
|
|
61
|
+
export declare function Destroyable<Allocated extends Record<PropertyKey, any> = Record<PropertyKey, any>>(): abstract new () => (AbstractDestroyable<Allocated> & {
|
|
62
|
+
[allocatedValues]: Allocated;
|
|
63
|
+
}) & {
|
|
64
|
+
destroy(obj: any): boolean;
|
|
65
|
+
isDestroyable(obj: any): boolean;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Decorator that marks properties to be stored in the allocated object and passed to the destructor
|
|
69
|
+
* Use with accessor properties or explicit get/set pairs
|
|
70
|
+
*/
|
|
71
|
+
export declare const allocated: import("./decorator").LegacyPropertyDecorator<any> & import("./decorator").ModernSetterDecorator<any> & import("./decorator").ModernAccessorDecorator<any>;
|
|
72
|
+
/**
|
|
73
|
+
* Registers a callback to be called when an object is garbage collected
|
|
74
|
+
* @param cb - The callback function to execute on garbage collection
|
|
75
|
+
* @returns The object whose reference can be collected
|
|
76
|
+
*/
|
|
77
|
+
export declare function callOnGC(cb: () => void): () => void;
|
|
78
|
+
/**
|
|
79
|
+
* Context Manager Protocol for `using` statement integration
|
|
80
|
+
* Provides automatic resource cleanup when used with the `using` statement
|
|
81
|
+
*/
|
|
82
|
+
export interface ContextManager<T = any> {
|
|
83
|
+
[Symbol.dispose](): void;
|
|
84
|
+
value?: T;
|
|
85
|
+
}
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=destroyable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destroyable.d.ts","sourceRoot":"","sources":["../src/destroyable.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,UAAU,eAAuB,CAAA;AAC9C;;GAEG;AACH,eAAO,MAAM,eAAe,eAAsB,CAAA;AAClD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IAC1C,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM;gBAKvB,GAAG,EAAE,MAAM;CAIvB;AAOD,uBAAe,mBAAmB,CAAC,SAAS;IAC3C,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IACjD,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI;CAGxB;AAED,UAAU,UAAU,CAAC,SAAS;IAC7B,UAAU,CAAC,S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,KAC7B,mBAAmB,CAAC,SAAS,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG;IAAE,CAAC,eAAe,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC,GAAG;IAC3F,OAAO,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,OAAO,CAAA;IACtC,aAAa,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,OAAO,CAAA;CAC5C,CAAA;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAC1B,SAAS,SAAS,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,KACjE,QAAQ,WAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,GAAG;IACzD,CAAC,eAAe,CAAC,EAAE,SAAS,CAAA;CAC5B,CAAC,GAAG;IACJ,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAA;IAC1B,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAA;CAChC,CAAA;AAwDD;;;GAGG;AACH,eAAO,MAAM,SAAS,4JAOpB,CAAA;AAEF;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,IAAI,cAStC;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,GAAG,GAAG;IACtC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,CAAA;IACxB,KAAK,CAAC,EAAE,CAAC,CAAA;CACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=devtools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devtools.d.ts","sourceRoot":"","sources":["../../../devtool/devtools.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../devtool/panel.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry-browser.d.ts","sourceRoot":"","sources":["../src/entry-browser.ts"],"names":[],"mappings":"AACA,OAAO,iBAAiB,CAAA;AAGxB,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry-node.d.ts","sourceRoot":"","sources":["../src/entry-node.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,CAAA;AAGrB,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base type for event maps - all event handlers must be functions
|
|
3
|
+
*/
|
|
4
|
+
export type EventsBase = Record<string, (...args: any[]) => void>;
|
|
5
|
+
/**
|
|
6
|
+
* A type-safe event system that provides a clean API for event handling
|
|
7
|
+
* @template Events - The event map defining event names and their handler signatures
|
|
8
|
+
*/
|
|
9
|
+
export declare class Eventful<Events extends EventsBase> {
|
|
10
|
+
#private;
|
|
11
|
+
hook(cb: <EventType extends keyof Events>(event: EventType, ...args: Parameters<Events[EventType]>) => void): () => void;
|
|
12
|
+
on(events: Partial<Events>): void;
|
|
13
|
+
on<EventType extends keyof Events>(event: EventType, cb: Events[EventType]): () => void;
|
|
14
|
+
off(events: Partial<Events>): void;
|
|
15
|
+
off<EventType extends keyof Events>(event: EventType, cb?: Events[EventType]): void;
|
|
16
|
+
emit<EventType extends keyof Events>(event: EventType, ...args: Parameters<Events[EventType]>): void;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=eventful.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventful.d.ts","sourceRoot":"","sources":["../src/eventful.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC,CAAA;AACjE;;;GAGG;AACH,qBAAa,QAAQ,CAAC,MAAM,SAAS,UAAU;;IAIvC,IAAI,CACV,EAAE,EAAE,CAAC,SAAS,SAAS,MAAM,MAAM,EAClC,KAAK,EAAE,SAAS,EAChB,GAAG,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,KAClC,IAAI,GACP,MAAM,IAAI;IAON,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI;IACjC,EAAE,CAAC,SAAS,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,CAAC,SAAS,CAAC,GAAG,MAAM,IAAI;IAoBvF,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI;IAClC,GAAG,CAAC,SAAS,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI;IAsBnF,IAAI,CAAC,SAAS,SAAS,MAAM,MAAM,EACzC,KAAK,EAAE,SAAS,EAChB,GAAG,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;CAMvC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './decorator';
|
|
2
|
+
export * from './destroyable';
|
|
3
|
+
export * from './eventful';
|
|
4
|
+
export * from './indexable';
|
|
5
|
+
export * from './iterableWeak';
|
|
6
|
+
export * from './mixins';
|
|
7
|
+
export * from './promiseChain';
|
|
8
|
+
export * from './reactive';
|
|
9
|
+
export * from './std-decorators';
|
|
10
|
+
export * from './utils';
|
|
11
|
+
export * from './zone';
|
|
12
|
+
export * from './async';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Symbol for defining custom getter logic for numeric index access
|
|
3
|
+
*/
|
|
4
|
+
export declare const getAt: unique symbol;
|
|
5
|
+
/**
|
|
6
|
+
* Symbol for defining custom setter logic for numeric index access
|
|
7
|
+
*/
|
|
8
|
+
export declare const setAt: unique symbol;
|
|
9
|
+
interface IndexingAt<Items = any> {
|
|
10
|
+
[getAt](index: number): Items;
|
|
11
|
+
}
|
|
12
|
+
interface Accessor<T, Items> {
|
|
13
|
+
get(this: T, index: number): Items;
|
|
14
|
+
set?(this: T, index: number, value: Items): void;
|
|
15
|
+
getLength?(this: T): number;
|
|
16
|
+
setLength?(this: T, value: number): void;
|
|
17
|
+
}
|
|
18
|
+
declare abstract class AbstractGetAt<Items = any> {
|
|
19
|
+
abstract [getAt](index: number): Items;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Creates an indexable class with a base class and accessor object
|
|
23
|
+
* @param base - The base class to extend
|
|
24
|
+
* @param accessor - Object containing get/set methods for numeric index access
|
|
25
|
+
* @returns A class that supports numeric index access
|
|
26
|
+
*/
|
|
27
|
+
export declare function Indexable<Items, Base extends abstract new (...args: any[]) => any>(base: Base, accessor: Accessor<InstanceType<Base>, Items>): new (...args: ConstructorParameters<Base>) => InstanceType<Base> & {
|
|
28
|
+
[x: number]: Items;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Creates an indexable class with only an accessor object (no base class)
|
|
32
|
+
* @param accessor - Object containing get/set methods for numeric index access
|
|
33
|
+
* @returns A class that supports numeric index access
|
|
34
|
+
*/
|
|
35
|
+
export declare function Indexable<Items>(accessor: Accessor<any, Items>): new () => {
|
|
36
|
+
[x: number]: Items;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Creates an indexable class with a base class that has [getAt] method
|
|
40
|
+
* @param base - The base class that implements [getAt] method
|
|
41
|
+
* @returns A class that supports numeric index access using the base class's [getAt] method
|
|
42
|
+
*/
|
|
43
|
+
export declare function Indexable<Base extends new (...args: any[]) => IndexingAt>(base: Base): new (...args: ConstructorParameters<Base>) => InstanceType<Base> & {
|
|
44
|
+
[x: number]: AtReturnType<InstanceType<Base>>;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Creates an abstract indexable base class
|
|
48
|
+
* @returns An abstract class that supports numeric index access
|
|
49
|
+
*/
|
|
50
|
+
export declare function Indexable<Items>(): abstract new (...args: any[]) => AbstractGetAt & {
|
|
51
|
+
[x: number]: Items;
|
|
52
|
+
};
|
|
53
|
+
type AtReturnType<T> = T extends {
|
|
54
|
+
[getAt](index: number): infer R;
|
|
55
|
+
} ? R : never;
|
|
56
|
+
/**
|
|
57
|
+
* Symbol for accessing the forwarded array in ArrayReadForward
|
|
58
|
+
*/
|
|
59
|
+
export declare const forwardArray: unique symbol;
|
|
60
|
+
/**
|
|
61
|
+
* A read-only array forwarder that implements all reading/iterating methods of Array
|
|
62
|
+
* but does not implement modification methods.
|
|
63
|
+
*
|
|
64
|
+
* The constructor takes a callback that returns an array, and all methods forward
|
|
65
|
+
* their behavior to the result of that callback.
|
|
66
|
+
*/
|
|
67
|
+
export declare class ArrayReadForward<T> {
|
|
68
|
+
protected get [forwardArray](): readonly T[];
|
|
69
|
+
/**
|
|
70
|
+
* Get the length of the array
|
|
71
|
+
*/
|
|
72
|
+
get length(): number;
|
|
73
|
+
/**
|
|
74
|
+
* Get an element at a specific index
|
|
75
|
+
*/
|
|
76
|
+
[index: number]: T | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Iterator protocol support
|
|
79
|
+
*/
|
|
80
|
+
[Symbol.iterator](): Iterator<T>;
|
|
81
|
+
/**
|
|
82
|
+
* Creates a new array with the results of calling a provided function on every element
|
|
83
|
+
*/
|
|
84
|
+
map<U>(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[];
|
|
85
|
+
/**
|
|
86
|
+
* Creates a new array with all elements that pass the test implemented by the provided function
|
|
87
|
+
*/
|
|
88
|
+
filter<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[];
|
|
89
|
+
filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[];
|
|
90
|
+
/**
|
|
91
|
+
* Executes a reducer function on each element of the array, resulting in a single output value
|
|
92
|
+
*/
|
|
93
|
+
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T;
|
|
94
|
+
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T;
|
|
95
|
+
reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U;
|
|
96
|
+
/**
|
|
97
|
+
* Executes a reducer function on each element of the array (right-to-left), resulting in a single output value
|
|
98
|
+
*/
|
|
99
|
+
reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T;
|
|
100
|
+
reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T;
|
|
101
|
+
reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U;
|
|
102
|
+
/**
|
|
103
|
+
* Executes a provided function once for each array element
|
|
104
|
+
*/
|
|
105
|
+
forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void;
|
|
106
|
+
/**
|
|
107
|
+
* Returns the value of the first element in the array that satisfies the provided testing function
|
|
108
|
+
*/
|
|
109
|
+
find<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S | undefined;
|
|
110
|
+
find(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T | undefined;
|
|
111
|
+
/**
|
|
112
|
+
* Returns the index of the first element in the array that satisfies the provided testing function
|
|
113
|
+
*/
|
|
114
|
+
findIndex(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): number;
|
|
115
|
+
/**
|
|
116
|
+
* Returns the value of the last element in the array that satisfies the provided testing function
|
|
117
|
+
*/
|
|
118
|
+
findLast<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S | undefined;
|
|
119
|
+
findLast(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Returns the index of the last element in the array that satisfies the provided testing function
|
|
122
|
+
*/
|
|
123
|
+
findLastIndex(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): number;
|
|
124
|
+
/**
|
|
125
|
+
* Determines whether an array includes a certain value among its entries
|
|
126
|
+
*/
|
|
127
|
+
includes(searchElement: T, fromIndex?: number): boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Returns the first index at which a given element can be found in the array
|
|
130
|
+
*/
|
|
131
|
+
indexOf(searchElement: T, fromIndex?: number): number;
|
|
132
|
+
/**
|
|
133
|
+
* Returns the last index at which a given element can be found in the array
|
|
134
|
+
*/
|
|
135
|
+
lastIndexOf(searchElement: T, fromIndex?: number): number;
|
|
136
|
+
/**
|
|
137
|
+
* Returns a shallow copy of a portion of an array into a new array object
|
|
138
|
+
*/
|
|
139
|
+
slice(start?: number, end?: number): T[];
|
|
140
|
+
/**
|
|
141
|
+
* Returns a new array comprised of this array joined with other array(s) and/or value(s)
|
|
142
|
+
*/
|
|
143
|
+
concat(...items: ConcatArray<T>[]): T[];
|
|
144
|
+
concat(...items: (T | ConcatArray<T>)[]): T[];
|
|
145
|
+
/**
|
|
146
|
+
* Tests whether all elements in the array pass the test implemented by the provided function
|
|
147
|
+
*/
|
|
148
|
+
every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Tests whether at least one element in the array passes the test implemented by the provided function
|
|
151
|
+
*/
|
|
152
|
+
some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Joins all elements of an array into a string
|
|
155
|
+
*/
|
|
156
|
+
join(separator?: string): string;
|
|
157
|
+
/**
|
|
158
|
+
* Returns a new array iterator that contains the keys for each index in the array
|
|
159
|
+
*/
|
|
160
|
+
keys(): IterableIterator<number>;
|
|
161
|
+
/**
|
|
162
|
+
* Returns a new array iterator that contains the values for each index in the array
|
|
163
|
+
*/
|
|
164
|
+
values(): IterableIterator<T>;
|
|
165
|
+
/**
|
|
166
|
+
* Returns a new array iterator that contains the key/value pairs for each index in the array
|
|
167
|
+
*/
|
|
168
|
+
entries(): IterableIterator<[number, T]>;
|
|
169
|
+
/**
|
|
170
|
+
* Returns a string representation of the array
|
|
171
|
+
*/
|
|
172
|
+
toString(): string;
|
|
173
|
+
/**
|
|
174
|
+
* Returns a localized string representing the array
|
|
175
|
+
*/
|
|
176
|
+
toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions | Intl.DateTimeFormatOptions): string;
|
|
177
|
+
/**
|
|
178
|
+
* Returns the element at the specified index, or undefined if the index is out of bounds
|
|
179
|
+
*/
|
|
180
|
+
at(index: number): T | undefined;
|
|
181
|
+
/**
|
|
182
|
+
* Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth
|
|
183
|
+
*/
|
|
184
|
+
flat(depth?: number): T[];
|
|
185
|
+
/**
|
|
186
|
+
* Returns a new array formed by applying a given callback function to each element of the array,
|
|
187
|
+
* and then flattening the result by one level
|
|
188
|
+
*/
|
|
189
|
+
flatMap<U, This = undefined>(callback: (this: This, value: T, index: number, array: readonly T[]) => U | ReadonlyArray<U>, thisArg?: This): U[];
|
|
190
|
+
/**
|
|
191
|
+
* Returns a new array with elements in reversed order (ES2023)
|
|
192
|
+
*/
|
|
193
|
+
toReversed(): T[];
|
|
194
|
+
/**
|
|
195
|
+
* Returns a new array with elements sorted (ES2023)
|
|
196
|
+
*/
|
|
197
|
+
toSorted(compareFn?: ((a: T, b: T) => number) | undefined): T[];
|
|
198
|
+
/**
|
|
199
|
+
* Returns a new array with some elements removed and/or replaced at a given index (ES2023)
|
|
200
|
+
*/
|
|
201
|
+
toSpliced(start: number, deleteCount?: number, ...items: T[]): T[];
|
|
202
|
+
/**
|
|
203
|
+
* Returns a new array with the element at the given index replaced with the given value (ES2023)
|
|
204
|
+
*/
|
|
205
|
+
with(index: number, value: T): T[];
|
|
206
|
+
get [Symbol.unscopables](): {
|
|
207
|
+
readonly [x: number]: boolean;
|
|
208
|
+
readonly length?: boolean;
|
|
209
|
+
toString?: boolean;
|
|
210
|
+
toLocaleString?: boolean;
|
|
211
|
+
concat?: boolean;
|
|
212
|
+
join?: boolean;
|
|
213
|
+
slice?: boolean;
|
|
214
|
+
indexOf?: boolean;
|
|
215
|
+
lastIndexOf?: boolean;
|
|
216
|
+
every?: boolean;
|
|
217
|
+
some?: boolean;
|
|
218
|
+
forEach?: boolean;
|
|
219
|
+
map?: boolean;
|
|
220
|
+
filter?: boolean;
|
|
221
|
+
reduce?: boolean;
|
|
222
|
+
reduceRight?: boolean;
|
|
223
|
+
find?: boolean;
|
|
224
|
+
findIndex?: boolean;
|
|
225
|
+
entries?: boolean;
|
|
226
|
+
keys?: boolean;
|
|
227
|
+
values?: boolean;
|
|
228
|
+
includes?: boolean;
|
|
229
|
+
flatMap?: boolean;
|
|
230
|
+
flat?: boolean;
|
|
231
|
+
at?: boolean;
|
|
232
|
+
findLast?: boolean;
|
|
233
|
+
findLastIndex?: boolean;
|
|
234
|
+
toReversed?: boolean;
|
|
235
|
+
toSorted?: boolean;
|
|
236
|
+
toSpliced?: boolean;
|
|
237
|
+
with?: boolean;
|
|
238
|
+
[Symbol.iterator]?: boolean;
|
|
239
|
+
readonly [Symbol.unscopables]?: boolean;
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
export {};
|
|
243
|
+
//# sourceMappingURL=indexable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexable.d.ts","sourceRoot":"","sources":["../src/indexable.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,KAAK,eAAkB,CAAA;AACpC;;GAEG;AACH,eAAO,MAAM,KAAK,eAAkB,CAAA;AAEpC,UAAU,UAAU,CAAC,KAAK,GAAG,GAAG;IAC/B,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAA;CAC7B;AAED,UAAU,QAAQ,CAAC,CAAC,EAAE,KAAK;IAC1B,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,CAAA;IAClC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IAChD,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM,CAAA;IAC3B,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACxC;AAED,uBAAe,aAAa,CAAC,KAAK,GAAG,GAAG;IACvC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK;CACtC;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,IAAI,SAAS,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACjF,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,GAC3C,KACF,GAAG,IAAI,E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C,CAAC,EAC5F,OAAO,CAAC,EAAE,IAAI,GACZ,CAAC,EAAE;IAIN;;OAEG;IACH,UAAU,IAAI,CAAC,EAAE;IAIjB;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC,GAAG,SAAS,GAAG,CAAC,EAAE;IAI/D;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE;IAKlE;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE;IAGlC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEvB;CACD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Introspection API for Mutts
|
|
3
|
+
* Designed for AI agents and advanced debugging tools to programmatically analyze the reactive system.
|
|
4
|
+
*/
|
|
5
|
+
import { type EffectNode, type GraphEdge, getDependencies, getDependencyGraph, getDependents, getMutationHistory, type MutationRecord, type ObjectNode, type ReactivityGraph } from './reactive/debug';
|
|
6
|
+
import { options, type ReactiveDebugInfo, ReactiveErrorCode } from './reactive/types';
|
|
7
|
+
export { getDependencyGraph, getDependents, getDependencies, getMutationHistory, options, ReactiveErrorCode, };
|
|
8
|
+
export type { MutationRecord, ReactivityGraph, EffectNode, ObjectNode, GraphEdge, ReactiveDebugInfo, };
|
|
9
|
+
/**
|
|
10
|
+
* Enable introspection features (history recording, etc.)
|
|
11
|
+
* @param config Configuration options
|
|
12
|
+
*/
|
|
13
|
+
export declare function enableIntrospection(config?: {
|
|
14
|
+
historySize?: number;
|
|
15
|
+
}): void;
|
|
16
|
+
/**
|
|
17
|
+
* Capture a complete snapshot of the current reactive state
|
|
18
|
+
*/
|
|
19
|
+
export declare function snapshot(): {
|
|
20
|
+
graph: {
|
|
21
|
+
nodes: (EffectNode | ObjectNode)[];
|
|
22
|
+
edges: GraphEdge[];
|
|
23
|
+
};
|
|
24
|
+
history: MutationRecord[];
|
|
25
|
+
timestamp: number;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=introspection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"introspection.d.ts","sourceRoot":"","sources":["../src/introspection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,UAAU,EAEf,KAAK,SAAS,EACd,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,OAAO,EAAE,KAAK,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAErF,OAAO,EACN,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,OAAO,EACP,iBAAiB,GACjB,CAAA;AAED,YAAY,EACX,cAAc,EACd,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,iBAAiB,GACjB,CAAA;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,GAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,QAMxE;AAED;;GAEG;AACH,wBAAgB,QAAQ;;;;;;;EAMvB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Uses weak references but still may iterate through them
|
|
3
|
+
* Note: The behavior is highly dependant on the garbage collector - some entries are perhaps deemed to be collected: don't resuscitate them
|
|
4
|
+
*/
|
|
5
|
+
export declare class IterableWeakMap<K extends WeakKey, V> implements Map<K, V> {
|
|
6
|
+
private uuids;
|
|
7
|
+
private refs;
|
|
8
|
+
private readonly registry;
|
|
9
|
+
constructor(entries?: Iterable<[K, V]>);
|
|
10
|
+
private createIterator;
|
|
11
|
+
clear(): void;
|
|
12
|
+
delete(key: K): boolean;
|
|
13
|
+
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
|
|
14
|
+
get(key: K): V | undefined;
|
|
15
|
+
has(key: K): boolean;
|
|
16
|
+
set(key: K, value: V): this;
|
|
17
|
+
get size(): number;
|
|
18
|
+
entries(): MapIterator<[K, V]>;
|
|
19
|
+
keys(): MapIterator<K>;
|
|
20
|
+
values(): MapIterator<V>;
|
|
21
|
+
[Symbol.iterator](): MapIterator<[K, V]>;
|
|
22
|
+
readonly [Symbol.toStringTag]: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Uses weak references but still may iterate through them
|
|
26
|
+
* Note: The behavior is highly dependant on the garbage collector - some entries are perhaps deemed to be collected: don't resuscitate them
|
|
27
|
+
*/
|
|
28
|
+
export declare class IterableWeakSet<K extends WeakKey> implements Set<K> {
|
|
29
|
+
private uuids;
|
|
30
|
+
private refs;
|
|
31
|
+
private readonly registry;
|
|
32
|
+
constructor(entries?: Iterable<K>);
|
|
33
|
+
private createIterator;
|
|
34
|
+
clear(): void;
|
|
35
|
+
add(value: K): this;
|
|
36
|
+
delete(value: K): boolean;
|
|
37
|
+
forEach(callbackfn: (value: K, value2: K, set: Set<K>) => void, thisArg?: any): void;
|
|
38
|
+
has(value: K): boolean;
|
|
39
|
+
get size(): number;
|
|
40
|
+
entries(): SetIterator<[K, K]>;
|
|
41
|
+
keys(): SetIterator<K>;
|
|
42
|
+
values(): SetIterator<K>;
|
|
43
|
+
[Symbol.iterator](): SetIterator<K>;
|
|
44
|
+
readonly [Symbol.toStringTag]: string;
|
|
45
|
+
union<U>(other: ReadonlySetLike<U>): Set<K | U>;
|
|
46
|
+
intersection<U>(other: ReadonlySetLike<U>): Set<K & U>;
|
|
47
|
+
difference<U>(other: ReadonlySetLike<U>): Set<K>;
|
|
48
|
+
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<K | U>;
|
|
49
|
+
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
50
|
+
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
51
|
+
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=iterableWeak.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iterableWeak.d.ts","sourceRoot":"","sources":["../src/iterableWeak.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,qBAAa,eAAe,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,CAAE,YAAW,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;IACtE,OAAO,CAAC,KAAK,CAA2B;IACxC,OAAO,CAAC,IAAI,CAAwC;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA8B;gBAE3C,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAOtC,OAAO,CAAC,cAAc;IAYtB,KAAK,IAAI,IAAI;IASb,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO;IAQvB,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,IAAI;IAGpF,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAK1B,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO;IAGpB,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAa3B,IAAI,IAAI,IAAI,MAAM,CAEjB;IACD,OAAO,IAAI,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAG9B,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