@adbl/cells 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -14
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/{types → dist}/library/classes.d.ts +25 -56
- package/dist/library/classes.js +958 -0
- package/dist/library/classes.js.map +1 -0
- package/{types → dist}/library/index.d.ts +2 -1
- package/{library → dist/library}/index.js +3 -5
- package/dist/library/index.js.map +1 -0
- package/index.js +0 -2
- package/package.json +12 -4
- package/.vscode/settings.json +0 -4
- package/bun.lockb +0 -0
- package/library/classes.js +0 -958
- package/library/root.js +0 -44
- package/types/library/root.d.ts +0 -24
- /package/{types → dist}/index.d.ts +0 -0
package/library/root.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {import('./classes.js').Cell<any>} Watchable
|
|
3
|
-
* @typedef {import('./classes.js').DerivedCell<any>} DerivedCell
|
|
4
|
-
*
|
|
5
|
-
* @typedef GlobalEffectOptions
|
|
6
|
-
* @property {boolean} runOnce - Whether the effect should be removed after the first run.
|
|
7
|
-
* @property {boolean} ignoreDerivedCells - Whether the effect should be run even if the cell is a derived cell.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
export const root = {
|
|
11
|
-
/**
|
|
12
|
-
* An array of global effects that run before a source Cell is updated.
|
|
13
|
-
* @type {[Partial<GlobalEffectOptions>, ((value: unknown) => void)][]}
|
|
14
|
-
*/
|
|
15
|
-
globalPreEffects: [],
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* An array of global effects that run after a source Cell is updated.
|
|
19
|
-
* @type {[Partial<GlobalEffectOptions>, ((value: unknown) => void)][]}
|
|
20
|
-
*/
|
|
21
|
-
globalPostEffects: [],
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* The nesting level of batch operations.
|
|
25
|
-
* This will prevent nested batch operations from triggering effects when they finish.
|
|
26
|
-
* @type {number}
|
|
27
|
-
*/
|
|
28
|
-
batchNestingLevel: 0,
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* A map of effect tuples to be executed in a batch.
|
|
32
|
-
* The key in each entry is the effect, and the value is the list of arguments call it with.
|
|
33
|
-
* All callbacks in this map will be executed only once in a batch.
|
|
34
|
-
* @type {Map<Function, any[]>}
|
|
35
|
-
*/
|
|
36
|
-
batchedEffects: new Map(),
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* A value representing the computed values that are currently being calculated.
|
|
41
|
-
* It is an array so it can keep track of nested computed values.
|
|
42
|
-
* @type {DerivedCell[]}
|
|
43
|
-
*/
|
|
44
|
-
export const activeComputedValues = [];
|
package/types/library/root.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export namespace root {
|
|
2
|
-
let globalPreEffects: [Partial<GlobalEffectOptions>, ((value: unknown) => void)][];
|
|
3
|
-
let globalPostEffects: [Partial<GlobalEffectOptions>, ((value: unknown) => void)][];
|
|
4
|
-
let batchNestingLevel: number;
|
|
5
|
-
let batchedEffects: Map<Function, any[]>;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* A value representing the computed values that are currently being calculated.
|
|
9
|
-
* It is an array so it can keep track of nested computed values.
|
|
10
|
-
* @type {DerivedCell[]}
|
|
11
|
-
*/
|
|
12
|
-
export const activeComputedValues: import("./classes.js").DerivedCell<any>[];
|
|
13
|
-
export type Watchable = import('./classes.js').Cell<any>;
|
|
14
|
-
export type DerivedCell = import('./classes.js').DerivedCell<any>;
|
|
15
|
-
export type GlobalEffectOptions = {
|
|
16
|
-
/**
|
|
17
|
-
* - Whether the effect should be removed after the first run.
|
|
18
|
-
*/
|
|
19
|
-
runOnce: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* - Whether the effect should be run even if the cell is a derived cell.
|
|
22
|
-
*/
|
|
23
|
-
ignoreDerivedCells: boolean;
|
|
24
|
-
};
|
|
File without changes
|