mutts 1.0.9 → 1.0.11
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 +60 -35
- package/dist/browser.cjs +1333 -1760
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.ts +2 -1392
- package/dist/browser.dev.cjs +114 -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 +18 -97
- package/dist/browser.esm.js.map +1 -1
- package/dist/chunks/{async-browser-lvzLOCgk.cjs → async-browser-Dgr5CreQ.cjs} +16 -95
- package/dist/chunks/async-browser-Dgr5CreQ.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-Sf74wXTV.esm.js +2577 -0
- package/dist/chunks/index-Sf74wXTV.esm.js.map +1 -0
- package/dist/chunks/node-Bo7WU5S2.esm.js +96 -0
- package/dist/chunks/node-Bo7WU5S2.esm.js.map +1 -0
- package/dist/chunks/{index-VTO-b2vR.cjs → proxy-Cc79Lrzj.cjs} +2593 -3216
- package/dist/chunks/proxy-Cc79Lrzj.cjs.map +1 -0
- package/dist/chunks/{index-CtA2AWl3.esm.js → proxy-D2C49sXH.esm.js} +2570 -3174
- package/dist/chunks/proxy-D2C49sXH.esm.js.map +1 -0
- package/dist/debug.cjs +987 -28
- package/dist/debug.cjs.map +1 -1
- package/dist/debug.d.ts +37 -38
- package/dist/debug.esm.js +963 -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 +1322 -1
- package/dist/mutts.umd.js +6647 -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 +69 -63
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.ts +2 -2
- package/dist/node.dev.cjs +114 -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-Bx2PhORg.d.ts} +134 -88
- package/docs/ai/api-reference.md +11 -32
- package/docs/ai/manual.md +297 -239
- package/docs/reactive/advanced.md +318 -9
- package/docs/reactive/attend.md +2 -4
- package/docs/reactive/collections.md +22 -187
- package/docs/reactive/core.md +223 -131
- package/docs/reactive/debugging.md +119 -12
- package/docs/reactive/error-handling.md +10 -10
- package/docs/reactive/resource.md +125 -0
- package/docs/reactive.md +3 -4
- package/docs/utils.md +70 -0
- package/docs/zone.md +1 -1
- package/package.json +76 -38
- 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 +0 -3011
- 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/docs/reactive/scan.md +0 -293
- 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/src/indexable.d.ts
DELETED
|
@@ -1,243 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,UA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E;IAKlE;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE;IAGlC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEvB;CACD"}
|
|
@@ -1,27 +0,0 @@
|
|
|
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 '../debug/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
|
|
@@ -1 +0,0 @@
|
|
|
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,gBAAgB,CAAA;AACvB,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"}
|
|
@@ -1,53 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"iterableWeak.d.ts","sourceRoot":"","sources":["../../src/iterableWeak.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,qBAAa,eAA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AAG,CAAC,CAAC;IAc7D,UAAU,CAAC,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,OAAO;IAIpD,YAAY,CAAC,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,OAAO;IAStD,cAAc,CAAC,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,OAAO;CAIxD"}
|
package/dist/src/mixins.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A mixin function that takes a base class and returns a new class with mixed-in functionality
|
|
3
|
-
* @template Mixed - The functionality to be mixed in
|
|
4
|
-
*/
|
|
5
|
-
export type MixinFunction<Mixed> = <Base>(base: new (...args: any[]) => Base) => new (...args: any[]) => Base & Mixed;
|
|
6
|
-
/**
|
|
7
|
-
* A mixin class that can be used both as a base class and as a mixin function
|
|
8
|
-
* @template Mixed - The functionality to be mixed in
|
|
9
|
-
*/
|
|
10
|
-
export type MixinClass<Mixed> = new (...args: any[]) => Mixed;
|
|
11
|
-
/**
|
|
12
|
-
* Creates a mixin that can be used both as a class (extends) and as a function (mixin)
|
|
13
|
-
*
|
|
14
|
-
* This function supports:
|
|
15
|
-
* - Using mixins as base classes: `class MyClass extends MyMixin`
|
|
16
|
-
* - Using mixins as functions: `class MyClass extends MyMixin(SomeBase)`
|
|
17
|
-
* - Composing mixins: `const Composed = MixinA(MixinB)`
|
|
18
|
-
* - Type-safe property inference for all patterns
|
|
19
|
-
*
|
|
20
|
-
* @param mixinFunction - The function that creates the mixin
|
|
21
|
-
* @param unwrapFunction - Optional function to unwrap reactive objects for method calls
|
|
22
|
-
* @returns A mixin that can be used both as a class and as a function
|
|
23
|
-
*/
|
|
24
|
-
export declare function mixin<MixinFn extends (base: any) => new (...args: any[]) => any>(mixinFunction: MixinFn, unwrapFunction?: (obj: any) => any): (new (...args: any[]) => InstanceType<ReturnType<MixinFn>>) & (<Base>(base: abstract new (...args: any[]) => Base) => new (...args: any[]) => InstanceType<ReturnType<MixinFn>> & Base);
|
|
25
|
-
//# sourceMappingURL=mixins.d.ts.map
|
package/dist/src/mixins.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mixins.d.ts","sourceRoot":"","sources":["../../src/mixins.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,KAAK,IAAI,CAAC,IAAI,EACvC,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,KAC9B,KACJ,GAAG,IAAI,EAAE,GAAG,EAAE,KACV,IAAI,GAAG,KAAK,CAAA;AAEjB;;;GAGG;AACH,MAAM,MAAM,UAAU,CAAC,KAAK,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,KAAK,CAAA;AAE7D;;;;;;;;;;;;GAYG;AACH,wBAAgB,KAAK,CAAC,OAAO,SAAS,CAAC,IAAI,EAAE,GAAG,KAAK,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAC/E,aAAa,EAAE,OAAO,EACtB,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,GAChC,CAAC,KACH,GAAG,IAAI,EAAE,GAAG,EAAE,KACV,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,GACtC,CAAC,CAAC,IAAI,EACL,IAAI,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,KACvC,KACJ,GAAG,IAAI,EAAE,GAAG,EAAE,KACV,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAiF9C"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
type Resolved<T> = T extends Promise<infer U> ? Resolved<U> : T extends (...args: infer Args) => infer R ? (...args: Args) => Resolved<R> : T extends object ? {
|
|
2
|
-
[k in keyof T]: k extends 'then' | 'catch' | 'finally' ? T[k] : Resolved<T[k]>;
|
|
3
|
-
} : T;
|
|
4
|
-
type PromiseAnd<T> = Resolved<T> & Promise<Resolved<T>>;
|
|
5
|
-
/**
|
|
6
|
-
* Type that transforms promises into chainable objects
|
|
7
|
-
* Allows calling methods directly on promise results without awaiting them first
|
|
8
|
-
*/
|
|
9
|
-
export type PromiseChain<T> = T extends (...args: infer Args) => infer R ? PromiseAnd<(...args: Args) => PromiseChain<Resolved<R>>> : T extends object ? PromiseAnd<{
|
|
10
|
-
[k in keyof T]: k extends 'then' | 'catch' | 'finally' ? T[k] : PromiseChain<Resolved<T[k]>>;
|
|
11
|
-
}> : Promise<Resolved<T>>;
|
|
12
|
-
/**
|
|
13
|
-
* Transforms a promise or value into a chainable object
|
|
14
|
-
* Allows calling methods directly on promise results without awaiting them first
|
|
15
|
-
* @param given - The promise or value to make chainable
|
|
16
|
-
* @returns A chainable version of the input
|
|
17
|
-
*/
|
|
18
|
-
export declare function chainPromise<T>(given: Promise<T> | T): PromiseChain<T>;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=promiseChain.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promiseChain.d.ts","sourceRoot":"","sources":["../../src/promiseChain.ts"],"names":[],"mappings":"AAAA,KAAK,QAAQ,CAAC,CAAC,IACd,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GACvB,QAAQ,CAAC,CAAC,CAAC,GACX,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,IAAI,KAAK,MAAM,CAAC,GACzC,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,GAC9B,CAAC,SAAS,MAAM,GACf;KACC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,SAAS,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC9E,GACA,CAAC,CAAA;AACP,KAAK,UAAU,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;AACvD;;;GAGG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,IAAI,KAAK,MAAM,CAAC,GACrE,UAAU,CAAC,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GACxD,CAAC,SAAS,MAAM,GACf,UAAU,CAAC;KACV,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,SAAS,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC5F,CAAC,GACD,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;AA6DxB;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAqBtE"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export declare abstract class Indexer extends Array {
|
|
2
|
-
get(i: number): any;
|
|
3
|
-
set(i: number, value: any): void;
|
|
4
|
-
}
|
|
5
|
-
export declare abstract class ReactiveArray extends Array {
|
|
6
|
-
toJSON(): this;
|
|
7
|
-
get length(): number;
|
|
8
|
-
set length(value: number);
|
|
9
|
-
at(index: number): any;
|
|
10
|
-
toReversed(): any[];
|
|
11
|
-
toSorted(compareFn?: (a: any, b: any) => number): any[];
|
|
12
|
-
toSpliced(start: number, deleteCount?: number, ...items: any[]): any[];
|
|
13
|
-
with(index: number, value: any): any[];
|
|
14
|
-
entries(): any;
|
|
15
|
-
keys(): any;
|
|
16
|
-
values(): any;
|
|
17
|
-
[Symbol.iterator](): ArrayIterator<any>;
|
|
18
|
-
indexOf(searchElement: any, fromIndex?: number): number;
|
|
19
|
-
lastIndexOf(searchElement: any, fromIndex?: number): number;
|
|
20
|
-
includes(searchElement: any, fromIndex?: number): boolean;
|
|
21
|
-
find(predicate: (this: any, value: any, index: number, obj: any[]) => boolean, thisArg?: any): any;
|
|
22
|
-
find(searchElement: any, fromIndex?: number): any;
|
|
23
|
-
findIndex(predicate: (this: any, value: any, index: number, obj: any[]) => boolean, thisArg?: any): number;
|
|
24
|
-
findIndex(searchElement: any, fromIndex?: number): number;
|
|
25
|
-
flat(depth?: number): any[];
|
|
26
|
-
flatMap(callbackfn: (this: any, value: any, index: number, array: any[]) => any[], thisArg?: any): any[];
|
|
27
|
-
filter(callbackfn: (value: any, index: number, array: any[]) => boolean, thisArg?: any): any[];
|
|
28
|
-
map(callbackfn: (value: any, index: number, array: any[]) => any, thisArg?: any): any[];
|
|
29
|
-
reduce(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any;
|
|
30
|
-
reduceRight(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any;
|
|
31
|
-
slice(start?: number, end?: number): any[];
|
|
32
|
-
concat(...items: any[]): any[];
|
|
33
|
-
join(separator?: string): string;
|
|
34
|
-
forEach(callbackfn: (value: any, index: number, array: any[]) => void, thisArg?: any): void;
|
|
35
|
-
every<S>(predicate: (value: any, index: number, array: any[]) => value is S, thisArg?: any): this is S[];
|
|
36
|
-
every(callbackfn: (value: any, index: number, array: any[]) => boolean, thisArg?: any): boolean;
|
|
37
|
-
some(callbackfn: (value: any, index: number, array: any[]) => boolean, thisArg?: any): boolean;
|
|
38
|
-
push(...items: any[]): number;
|
|
39
|
-
pop(): any;
|
|
40
|
-
shift(): any;
|
|
41
|
-
unshift(...items: any[]): number;
|
|
42
|
-
splice(start: number, deleteCount?: number, ...items: any[]): any[];
|
|
43
|
-
reverse(): any[];
|
|
44
|
-
sort(compareFn?: (a: any, b: any) => number): this;
|
|
45
|
-
fill(value: any, start?: number, end?: number): this;
|
|
46
|
-
copyWithin(target: number, start: number, end?: number): this;
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=array.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../src/reactive/array.ts"],"names":[],"mappings":"AAsBA,8BAAsB,OAAQ,SAAQ,KAAK;IAC1C,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG;IAMnB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;CAKzB;AAmBD,8BAAsB,aAAc,SAAQ,KAAK;IAChD,MAAM;IAGN,IAAI,MAAM,IAAI,MAAM,CAGnB;IACD,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAQvB;IAED,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG;IAStB,UAAU,IAAI,GAAG,EAAE;IAKnB,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,MAAM,GAAG,GAAG,EAAE;IAKvD,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE;IAOtE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,EAAE;IAMtC,OAAO,IAAI,GAAG;IAKd,IAAI,IAAI,GAAG;IAKX,MAAM,IAAI,GAAG;IAKb,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,aAAa,CAAC,GAAG,CAAC;IAkBvC,OAAO,CAAC,aAAa,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM;IAmBvD,WAAW,CAAC,aAAa,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,MA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E,OAAO,CAAC,EAAE,GAAG,GAAG,OAAO;IAc9F,IAAI,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM;IAa7B,GAAG,IAAI,GAAG;IASV,KAAK,IAAI,GAAG;IASZ,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM;IAYhC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE;IAgCnE,OAAO,IAAI,GAAG,EAAE;IAQhB,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,MAAM,GAAG,IAAI;IASlD,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI;IAqBpD,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI;CA0B7D"}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import type { cleanup, EffectAccess, EffectCloser, ScopedCallback } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Reactively attends to each entry of a collection or each key yielded by an
|
|
4
|
-
* enumeration callback. For each key, an inner effect runs the callback. When a
|
|
5
|
-
* key disappears, its inner effect is disposed. The callback may return a cleanup
|
|
6
|
-
* (like a regular effect closer).
|
|
7
|
-
*
|
|
8
|
-
* Accepts arrays, records, Maps, Sets, or a raw `() => Iterable<Key>` callback.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```typescript
|
|
12
|
-
* // Record shorthand
|
|
13
|
-
* attend(record, (key) => { console.log(key, record[key]) })
|
|
14
|
-
*
|
|
15
|
-
* // Array shorthand
|
|
16
|
-
* attend(array, (index) => { console.log(index, array[index]) })
|
|
17
|
-
*
|
|
18
|
-
* // Raw enumeration callback
|
|
19
|
-
* attend(() => Object.keys(record), (key) => { ... })
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export declare function attend<T>(source: readonly T[], callback: (index: number) => EffectCloser | void): ScopedCallback;
|
|
23
|
-
export declare function attend<K, V>(source: Map<K, V>, callback: (key: K) => EffectCloser | void): ScopedCallback;
|
|
24
|
-
export declare function attend<T>(source: Set<T>, callback: (value: T) => EffectCloser | void): ScopedCallback;
|
|
25
|
-
export declare function attend<S extends Record<PropertyKey, any>>(source: S, callback: (key: keyof S & string) => EffectCloser | void): ScopedCallback;
|
|
26
|
-
export declare function attend<Key>(enumerate: () => Iterable<Key>, callback: (key: Key) => EffectCloser | void): ScopedCallback;
|
|
27
|
-
/**
|
|
28
|
-
* Result of a reactive scan, which is a reactive array of accumulated values
|
|
29
|
-
* with an attached cleanup function.
|
|
30
|
-
*/
|
|
31
|
-
export type ScanResult<Output> = readonly Output[] & {
|
|
32
|
-
[cleanup]: ScopedCallback;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Perform a reactive scan over an array of items.
|
|
36
|
-
*
|
|
37
|
-
* This implementation is highly optimized for performance and fine-grained reactivity:
|
|
38
|
-
* - **Incremental Updates**: Changes to an item only trigger re-computation from that
|
|
39
|
-
* point onwards in the result chain.
|
|
40
|
-
* - **Move Optimization**: If items are moved within the array, their accumulated
|
|
41
|
-
* values are reused as long as their predecessor remains the same.
|
|
42
|
-
* - **Duplicate Support**: Correctly handles multiple occurrences of the same object
|
|
43
|
-
* instance using an internal occurrence tracking mechanism.
|
|
44
|
-
* - **Memory Efficient**: Uses `WeakMap` for caching intermediates, which are
|
|
45
|
-
* automatically cleared when source items are garbage collected.
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```typescript
|
|
49
|
-
* const source = reactive([{ val: 1 }, { val: 2 }, { val: 3 }])
|
|
50
|
-
* const sum = scan(source, (acc, item) => acc + item.val, 0)
|
|
51
|
-
*
|
|
52
|
-
* expect([...sum]).toEqual([1, 3, 6])
|
|
53
|
-
*
|
|
54
|
-
* // Modifying an item only re-computes subsequent sums
|
|
55
|
-
* source[1].val = 10
|
|
56
|
-
* expect([...sum]).toEqual([1, 11, 14])
|
|
57
|
-
* ```
|
|
58
|
-
*
|
|
59
|
-
* @param source The source array of objects (will be made reactive)
|
|
60
|
-
* @param callback The accumulator function called with (accumulator, currentItem)
|
|
61
|
-
* @param initialValue The starting value for the accumulation
|
|
62
|
-
* @returns A reactive array of accumulated values, with a [cleanup] property to stop the tracking
|
|
63
|
-
*/
|
|
64
|
-
export declare function scan<Input extends object, Output>(source: readonly Input[], callback: (acc: Output, val: Input) => Output, initialValue: Output): ScanResult<Output>;
|
|
65
|
-
/**
|
|
66
|
-
* Lifts a callback that returns an array into a reactive array that automatically
|
|
67
|
-
* synchronizes with the source array returned by the callback.
|
|
68
|
-
*
|
|
69
|
-
* The returned reactive array will update whenever the callback's dependencies change,
|
|
70
|
-
* efficiently syncing only the elements that differ from the previous result.
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* ```typescript
|
|
74
|
-
* const items = reactive([1, 2, 3])
|
|
75
|
-
* const doubled = lift(() => items.map(x => x * 2))
|
|
76
|
-
*
|
|
77
|
-
* console.log([...doubled]) // [2, 4, 6]
|
|
78
|
-
*
|
|
79
|
-
* items.push(4)
|
|
80
|
-
* console.log([...doubled]) // [2, 4, 6, 8]
|
|
81
|
-
* ```
|
|
82
|
-
*
|
|
83
|
-
* @param cb Callback function that returns an array
|
|
84
|
-
* @returns A reactive array synchronized with the callback's result, with a [cleanup] property to stop tracking
|
|
85
|
-
*/
|
|
86
|
-
export declare function lift<Output extends any[]>(cb: (access: EffectAccess) => Output): Output & {
|
|
87
|
-
[cleanup]: ScopedCallback;
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* Lifts a callback that returns an object into a reactive object that automatically
|
|
91
|
-
* synchronizes with the source object returned by the callback.
|
|
92
|
-
*
|
|
93
|
-
* The returned reactive object will update whenever the callback's dependencies change,
|
|
94
|
-
* efficiently syncing only the properties that differ from the previous result using
|
|
95
|
-
* Object.assign(). Properties that no longer exist in the source are automatically removed.
|
|
96
|
-
*
|
|
97
|
-
* @example
|
|
98
|
-
* ```typescript
|
|
99
|
-
* const user = reactive({ name: 'John', age: 30 })
|
|
100
|
-
* const profile = lift(() => ({
|
|
101
|
-
* displayName: user.name.toUpperCase(),
|
|
102
|
-
* isAdult: user.age >= 18,
|
|
103
|
-
* description: `${user.name} is ${user.age} years old`
|
|
104
|
-
* }))
|
|
105
|
-
*
|
|
106
|
-
* console.log(profile.displayName) // JOHN
|
|
107
|
-
* console.log(profile.isAdult) // true
|
|
108
|
-
*
|
|
109
|
-
* user.name = 'Jane'
|
|
110
|
-
* console.log(profile.displayName) // JANE
|
|
111
|
-
* console.log(profile.description) // Jane is 30 years old
|
|
112
|
-
* ```
|
|
113
|
-
*
|
|
114
|
-
* @param cb Callback function that returns an object
|
|
115
|
-
* @returns A reactive object synchronized with the callback's result, with a [cleanup] property to stop tracking
|
|
116
|
-
*/
|
|
117
|
-
export declare function lift<Output extends object>(cb: (access: EffectAccess) => Output): Output & {
|
|
118
|
-
[cleanup]: ScopedCallback;
|
|
119
|
-
};
|
|
120
|
-
//# sourceMappingURL=buffer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../../../src/reactive/buffer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAiB,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAEjG;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EACvB,MAAM,EAAE,SAAS,CAAC,EAAE,EACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,YAAY,GAAG,IAAI,GAC9C,cAAc,CAAA;AACjB,wBAAgB,M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AE,YAAY,KAAK,MAAM,GAClC,MAAM,GAAG;IAAE,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAA;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,IAAI,CAAC,MAAM,SAAS,MAAM,EACzC,EAAE,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,MAAM,GAClC,MAAM,GAAG;IAAE,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAA"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type EffectTrigger, type Evolution, type State } from './types';
|
|
2
|
-
export declare function addState(obj: any, evolution: Evolution): void;
|
|
3
|
-
/**
|
|
4
|
-
* Gets the current state of a reactive object for evolution tracking
|
|
5
|
-
* @param obj - The reactive object
|
|
6
|
-
* @returns The current state object
|
|
7
|
-
*/
|
|
8
|
-
export declare function getState(obj: any): State;
|
|
9
|
-
export declare function collectEffects(obj: any, evolution: Evolution, effects: Set<EffectTrigger>, objectWatchers: Map<any, Set<EffectTrigger>>, ...keyChains: Iterable<any>[]): void;
|
|
10
|
-
/**
|
|
11
|
-
* Triggers effects for a single property change
|
|
12
|
-
* @param obj - The object that changed
|
|
13
|
-
* @param evolution - The type of change
|
|
14
|
-
* @param prop - The property that changed
|
|
15
|
-
*/
|
|
16
|
-
export declare function touched1(obj: any, evolution: Evolution, prop: any): void;
|
|
17
|
-
/**
|
|
18
|
-
* Triggers effects for property changes
|
|
19
|
-
* @param obj - The object that changed
|
|
20
|
-
* @param evolution - The type of change
|
|
21
|
-
* @param props - The properties that changed
|
|
22
|
-
*/
|
|
23
|
-
export declare function touched(obj: any, evolution: Evolution, props?: Iterable<any>): void;
|
|
24
|
-
/**
|
|
25
|
-
* Triggers only opaque effects for property changes
|
|
26
|
-
* Used by deep-touch to ensure opaque listeners are notified even when deep optimization is active
|
|
27
|
-
*/
|
|
28
|
-
export declare function touchedOpaque(obj: any, evolution: Evolution, prop: any): void;
|
|
29
|
-
//# sourceMappingURL=change.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"change.d.ts","sourceRoot":"","sources":["../../../src/reactive/change.ts"],"names":[],"mappings":"AAMA,OAAO,EAAY,KAAK,aAAa,EAAE,KAAK,SAAS,EAAc,KAAK,KAAK,EAAE,MAAM,SAAS,CAAA;AAI9F,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,QAMtD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,SAQhC;AAED,wBAAgB,cAAc,CAC7B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,GAAG,CAAC,aAAa,CAAC,EAC3B,cAAc,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC,EAC5C,GAAG,SAAS,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,QAsB7B;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,QAEjE;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,QAiB5E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,QA6BtE"}
|