atom.io 0.12.1 → 0.14.0
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/dist/index.cjs +9 -74
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -6
- package/dist/index.d.ts +9 -6
- package/dist/index.js +11 -74
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/internal/dist/index.cjs +1700 -1579
- package/internal/dist/index.cjs.map +1 -1
- package/internal/dist/index.d.cts +32 -15
- package/internal/dist/index.d.ts +32 -15
- package/internal/dist/index.js +1695 -1579
- package/internal/dist/index.js.map +1 -1
- package/internal/dist/metafile-cjs.json +1 -1
- package/internal/dist/metafile-esm.json +1 -1
- package/internal/src/atom/create-atom.ts +7 -6
- package/internal/src/atom/delete-atom.ts +11 -11
- package/internal/src/atom/is-default.ts +5 -5
- package/internal/src/caching.ts +12 -10
- package/internal/src/families/create-atom-family.ts +3 -3
- package/internal/src/families/create-readonly-selector-family.ts +3 -3
- package/internal/src/families/create-selector-family.ts +4 -4
- package/internal/src/index.ts +1 -0
- package/internal/src/keys.ts +4 -4
- package/internal/src/lazy-map.ts +6 -2
- package/internal/src/lineage.ts +18 -0
- package/internal/src/mutable/create-mutable-atom.ts +8 -6
- package/internal/src/mutable/get-json-family.ts +3 -3
- package/internal/src/mutable/tracker.ts +18 -13
- package/internal/src/operation.ts +19 -19
- package/internal/src/selector/create-read-write-selector.ts +5 -4
- package/internal/src/selector/create-readonly-selector.ts +4 -3
- package/internal/src/selector/create-selector.ts +6 -6
- package/internal/src/selector/delete-selector.ts +10 -10
- package/internal/src/selector/get-selector-dependency-keys.ts +2 -2
- package/internal/src/selector/register-selector.ts +4 -4
- package/internal/src/selector/update-selector-atoms.ts +4 -4
- package/internal/src/set-state/copy-mutable-if-needed.ts +4 -3
- package/internal/src/set-state/copy-mutable-in-transaction.ts +10 -16
- package/internal/src/set-state/copy-mutable-into-new-store.ts +1 -1
- package/internal/src/set-state/evict-downstream.ts +5 -5
- package/internal/src/set-state/set-atom.ts +6 -1
- package/internal/src/set-state/stow-update.ts +7 -2
- package/internal/src/store/store.ts +31 -24
- package/internal/src/store/withdraw-new-family-member.ts +3 -4
- package/internal/src/store/withdraw.ts +58 -59
- package/internal/src/subject.ts +14 -0
- package/internal/src/subscribe/index.ts +3 -0
- package/internal/src/subscribe/recall-state.ts +5 -11
- package/internal/src/subscribe/subscribe-to-state.ts +47 -0
- package/internal/src/subscribe/subscribe-to-timeline.ts +28 -0
- package/internal/src/subscribe/subscribe-to-transaction.ts +33 -0
- package/internal/src/timeline/add-atom-to-timeline.ts +37 -27
- package/internal/src/timeline/create-timeline.ts +6 -8
- package/internal/src/timeline/time-travel.ts +22 -4
- package/internal/src/transaction/abort-transaction.ts +5 -3
- package/internal/src/transaction/apply-transaction.ts +80 -58
- package/internal/src/transaction/build-transaction.ts +33 -23
- package/internal/src/transaction/create-transaction.ts +6 -9
- package/internal/src/transaction/index.ts +2 -10
- package/internal/src/transaction/redo-transaction.ts +15 -10
- package/internal/src/transaction/undo-transaction.ts +15 -16
- package/introspection/dist/index.cjs +2 -2
- package/introspection/dist/index.cjs.map +1 -1
- package/introspection/dist/index.js +3 -3
- package/introspection/dist/index.js.map +1 -1
- package/introspection/src/attach-atom-index.ts +2 -2
- package/introspection/src/attach-selector-index.ts +2 -2
- package/package.json +8 -8
- package/react/dist/index.cjs +39 -1
- package/react/dist/index.cjs.map +1 -1
- package/react/dist/index.d.cts +9 -2
- package/react/dist/index.d.ts +9 -2
- package/react/dist/index.js +41 -4
- package/react/dist/index.js.map +1 -1
- package/react/dist/metafile-cjs.json +1 -1
- package/react/dist/metafile-esm.json +1 -1
- package/react/src/store-hooks.ts +52 -3
- package/react-devtools/dist/index.cjs +22 -8
- package/react-devtools/dist/index.cjs.map +1 -1
- package/react-devtools/dist/index.d.cts +17 -9
- package/react-devtools/dist/index.d.ts +17 -9
- package/react-devtools/dist/index.js +22 -8
- package/react-devtools/dist/index.js.map +1 -1
- package/react-devtools/dist/metafile-cjs.json +1 -1
- package/react-devtools/dist/metafile-esm.json +1 -1
- package/react-devtools/src/Updates.tsx +22 -10
- package/realtime-client/dist/index.cjs +8 -7
- package/realtime-client/dist/index.cjs.map +1 -1
- package/realtime-client/dist/index.d.cts +3 -2
- package/realtime-client/dist/index.d.ts +3 -2
- package/realtime-client/dist/index.js +3 -2
- package/realtime-client/dist/index.js.map +1 -1
- package/realtime-client/dist/metafile-cjs.json +1 -1
- package/realtime-client/dist/metafile-esm.json +1 -1
- package/realtime-client/src/use-push.ts +4 -4
- package/realtime-client/src/use-server-action.ts +4 -4
- package/realtime-server/dist/index.cjs +46 -25
- package/realtime-server/dist/index.cjs.map +1 -1
- package/realtime-server/dist/index.d.cts +5 -5
- package/realtime-server/dist/index.d.ts +5 -5
- package/realtime-server/dist/index.js +38 -17
- package/realtime-server/dist/index.js.map +1 -1
- package/realtime-server/dist/metafile-cjs.json +1 -1
- package/realtime-server/dist/metafile-esm.json +1 -1
- package/realtime-server/src/hook-composition/expose-family.ts +7 -3
- package/realtime-server/src/hook-composition/expose-mutable-family.ts +13 -5
- package/realtime-server/src/hook-composition/expose-mutable.ts +11 -3
- package/realtime-server/src/hook-composition/expose-single.ts +6 -2
- package/realtime-server/src/hook-composition/receive-transaction.ts +14 -5
- package/src/subscribe.ts +37 -91
- package/src/transaction.ts +7 -2
- package/transceivers/set-rtx/dist/index.cjs.map +1 -1
- package/transceivers/set-rtx/dist/index.d.cts +2 -2
- package/transceivers/set-rtx/dist/index.d.ts +2 -2
- package/transceivers/set-rtx/dist/index.js.map +1 -1
- package/transceivers/set-rtx/dist/metafile-cjs.json +1 -1
- package/transceivers/set-rtx/dist/metafile-esm.json +1 -1
- package/transceivers/set-rtx/src/set-rtx.ts +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FamilyMetadata, SelectorOptions, SelectorToken, ReadonlySelectorOptions, ReadonlySelectorToken, Transactors, StateToken, ƒn, TransactionUpdate, TransactionOptions, TransactionToken, AtomToken, MutableAtomOptions, MutableAtomToken, MutableAtomFamilyOptions, MutableAtomFamily, SelectorFamily, AtomFamily, StateUpdate, TimelineUpdate, TimelineOptions, TimelineToken, ReadonlySelectorFamily, AtomIOLogger, Logger, AtomOptions, AtomFamilyOptions, ReadonlySelectorFamilyOptions, SelectorFamilyOptions } from 'atom.io';
|
|
1
|
+
import { FamilyMetadata, SelectorOptions, SelectorToken, ReadonlySelectorOptions, ReadonlySelectorToken, Transactors, StateToken, ƒn, TransactionUpdate, TransactionOptions, TransactionToken, AtomToken, MutableAtomOptions, MutableAtomToken, MutableAtomFamilyOptions, MutableAtomFamily, SelectorFamily, AtomFamily, StateUpdate, TimelineUpdate, TimelineOptions, TimelineToken, ReadonlySelectorFamily, AtomIOLogger, Logger, AtomOptions, AtomFamilyOptions, ReadonlySelectorFamilyOptions, SelectorFamilyOptions, UpdateHandler, TransactionUpdateHandler } from 'atom.io';
|
|
2
2
|
import { Json } from 'atom.io/json';
|
|
3
|
+
import { Store as Store$1 } from 'atom.io/internal';
|
|
3
4
|
|
|
4
5
|
declare class Subject<T> {
|
|
5
6
|
Subscriber: (value: T) => void;
|
|
@@ -8,6 +9,11 @@ declare class Subject<T> {
|
|
|
8
9
|
private unsubscribe;
|
|
9
10
|
next(value: T): void;
|
|
10
11
|
}
|
|
12
|
+
declare class StatefulSubject<T> extends Subject<T> {
|
|
13
|
+
state: T;
|
|
14
|
+
constructor(initialState: T);
|
|
15
|
+
next(value: T): void;
|
|
16
|
+
}
|
|
11
17
|
|
|
12
18
|
type Selector<T> = {
|
|
13
19
|
key: string;
|
|
@@ -78,23 +84,18 @@ type Transaction<ƒ extends ƒn> = {
|
|
|
78
84
|
run: (...parameters: Parameters<ƒ>) => ReturnType<ƒ>;
|
|
79
85
|
};
|
|
80
86
|
declare function createTransaction<ƒ extends ƒn>(options: TransactionOptions<ƒ>, store: Store): TransactionToken<ƒ>;
|
|
81
|
-
declare const target: (store: Store) => StoreCore;
|
|
82
87
|
|
|
83
|
-
declare const redoTransactionUpdate: <ƒ extends ƒn>(
|
|
88
|
+
declare const redoTransactionUpdate: <ƒ extends ƒn>(transactionUpdate: TransactionUpdate<ƒ>, store: Store) => void;
|
|
84
89
|
|
|
85
|
-
declare const undoTransactionUpdate: <ƒ extends ƒn>(
|
|
90
|
+
declare const undoTransactionUpdate: <ƒ extends ƒn>(transactionUpdate: TransactionUpdate<ƒ>, store: Store) => void;
|
|
86
91
|
|
|
87
92
|
declare const TRANSACTION_PHASES: readonly ["idle", "building", "applying"];
|
|
88
93
|
type TransactionPhase = (typeof TRANSACTION_PHASES)[number];
|
|
89
|
-
type
|
|
94
|
+
type TransactionMeta<ƒ extends ƒn> = {
|
|
90
95
|
phase: `applying` | `building`;
|
|
91
96
|
time: number;
|
|
92
|
-
|
|
97
|
+
update: TransactionUpdate<ƒ>;
|
|
93
98
|
};
|
|
94
|
-
type TransactionIdle = {
|
|
95
|
-
phase: `idle`;
|
|
96
|
-
};
|
|
97
|
-
type TransactionStatus<ƒ extends ƒn> = TransactionIdle | TransactionUpdateInProgress<ƒ>;
|
|
98
99
|
|
|
99
100
|
declare function deposit<T>(state: Atom<T>): AtomToken<T>;
|
|
100
101
|
declare function deposit<T>(state: Selector<T>): SelectorToken<T>;
|
|
@@ -177,6 +178,13 @@ declare class Junction<const ASide extends string, const BSide extends string, c
|
|
|
177
178
|
has(a: string, b?: string): boolean;
|
|
178
179
|
}
|
|
179
180
|
|
|
181
|
+
interface Lineage {
|
|
182
|
+
parent: typeof this | null;
|
|
183
|
+
child: typeof this | null;
|
|
184
|
+
}
|
|
185
|
+
declare function newest<T extends Lineage>(scion: T): T;
|
|
186
|
+
declare function eldest<T extends Lineage>(scion: T): T;
|
|
187
|
+
|
|
180
188
|
interface Transceiver<Signal extends Json.Serializable> {
|
|
181
189
|
do: (update: Signal) => void;
|
|
182
190
|
undo: (update: Signal) => void;
|
|
@@ -277,8 +285,9 @@ declare const addAtomToTimeline: (atomToken: AtomToken<any>, tl: Timeline, store
|
|
|
277
285
|
|
|
278
286
|
declare const timeTravel: (direction: `backward` | `forward`, token: TimelineToken, store: Store) => void;
|
|
279
287
|
|
|
280
|
-
|
|
281
|
-
|
|
288
|
+
declare class Store implements Lineage {
|
|
289
|
+
parent: Store | null;
|
|
290
|
+
child: Store | null;
|
|
282
291
|
valueMap: Map<string, any>;
|
|
283
292
|
atoms: Map<string, Atom<any> | MutableAtom<any>>;
|
|
284
293
|
selectors: Map<string, Selector<any>>;
|
|
@@ -298,10 +307,11 @@ declare class Store {
|
|
|
298
307
|
selectorCreation: Subject<ReadonlySelectorToken<unknown> | SelectorToken<unknown>>;
|
|
299
308
|
transactionCreation: Subject<TransactionToken<ƒn>>;
|
|
300
309
|
timelineCreation: Subject<TimelineToken>;
|
|
310
|
+
transactionApplying: StatefulSubject<TransactionMeta<ƒn> | null>;
|
|
301
311
|
operationStatus: Subject<OperationProgress>;
|
|
302
312
|
};
|
|
303
313
|
operation: OperationProgress;
|
|
304
|
-
|
|
314
|
+
transactionMeta: TransactionMeta<ƒn> | null;
|
|
305
315
|
config: {
|
|
306
316
|
name: string;
|
|
307
317
|
};
|
|
@@ -383,7 +393,8 @@ declare class LazyMap<K, V> extends Map<K, V> {
|
|
|
383
393
|
deleted: Set<K>;
|
|
384
394
|
constructor(source: Map<K, V>);
|
|
385
395
|
get(key: K): V | undefined;
|
|
386
|
-
|
|
396
|
+
set(key: K, value: V): this;
|
|
397
|
+
hasOwn(key: K): boolean;
|
|
387
398
|
has(key: K): boolean;
|
|
388
399
|
delete(key: K): boolean;
|
|
389
400
|
}
|
|
@@ -401,4 +412,10 @@ declare const setAtomOrSelector: <T>(state: Atom<T> | Selector<T>, value: T | ((
|
|
|
401
412
|
|
|
402
413
|
declare const subscribeToRootAtoms: <T>(state: ReadonlySelector<T> | Selector<T>, store: Store) => (() => void)[] | null;
|
|
403
414
|
|
|
404
|
-
|
|
415
|
+
declare function subscribeToState<T>(token: ReadonlySelectorToken<T> | StateToken<T>, handleUpdate: UpdateHandler<T>, key: string, store: Store$1): () => void;
|
|
416
|
+
|
|
417
|
+
declare const subscribeToTimeline: (token: TimelineToken, handleUpdate: (update: TimelineUpdate | `redo` | `undo`) => void, key: string, store: Store$1) => (() => void);
|
|
418
|
+
|
|
419
|
+
declare const subscribeToTransaction: <ƒ extends ƒn>(token: TransactionToken<ƒ>, handleUpdate: TransactionUpdateHandler<ƒ>, key: string, store: Store$1) => (() => void);
|
|
420
|
+
|
|
421
|
+
export { type Atom, type AtomKey, FamilyTracker, Future, IMPLICIT, LazyMap, type Lineage, type Modify, type MutableAtom, NotFoundError, type OperationProgress, type ReadonlySelector, type ReadonlySelectorKey, type Selector, type SelectorKey, type Signal, type StateKey, StatefulSubject, Store, Subject, TRANSACTION_PHASES, type Timeline, type TimelineAtomUpdate, type TimelineSelectorUpdate, type TimelineTransactionUpdate, Tracker, type Transaction, type TransactionMeta, type TransactionPhase, type Transceiver, type TransceiverMode, abortTransaction, addAtomToTimeline, applyTransaction, become, buildTransaction, cacheValue, clearStore, closeOperation, createAtom, createAtomFamily, createMutableAtom, createMutableAtomFamily, createReadonlySelectorFamily, createSelector, createSelectorFamily, createTimeline, createTransaction, deleteAtom, deleteSelector, deposit, eldest, evictCachedValue, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getUpdateToken, isAtomDefault, isAtomKey, isAtomMutable, isAtomTokenMutable, isDone, isReadonlySelectorKey, isSelectorDefault, isSelectorKey, isStateKey, isTransceiver, isValueCached, markAtomAsDefault, markAtomAsNotDefault, markDone, newest, openOperation, readCachedValue, readOrComputeValue, redoTransactionUpdate, registerSelector, setAtomOrSelector, subscribeToRootAtoms, subscribeToState, subscribeToTimeline, subscribeToTransaction, timeTravel, traceAllSelectorAtoms, traceSelectorAtoms, undoTransactionUpdate, updateSelectorAtoms, withdraw, withdrawNewFamilyMember };
|
package/internal/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FamilyMetadata, SelectorOptions, SelectorToken, ReadonlySelectorOptions, ReadonlySelectorToken, Transactors, StateToken, ƒn, TransactionUpdate, TransactionOptions, TransactionToken, AtomToken, MutableAtomOptions, MutableAtomToken, MutableAtomFamilyOptions, MutableAtomFamily, SelectorFamily, AtomFamily, StateUpdate, TimelineUpdate, TimelineOptions, TimelineToken, ReadonlySelectorFamily, AtomIOLogger, Logger, AtomOptions, AtomFamilyOptions, ReadonlySelectorFamilyOptions, SelectorFamilyOptions } from 'atom.io';
|
|
1
|
+
import { FamilyMetadata, SelectorOptions, SelectorToken, ReadonlySelectorOptions, ReadonlySelectorToken, Transactors, StateToken, ƒn, TransactionUpdate, TransactionOptions, TransactionToken, AtomToken, MutableAtomOptions, MutableAtomToken, MutableAtomFamilyOptions, MutableAtomFamily, SelectorFamily, AtomFamily, StateUpdate, TimelineUpdate, TimelineOptions, TimelineToken, ReadonlySelectorFamily, AtomIOLogger, Logger, AtomOptions, AtomFamilyOptions, ReadonlySelectorFamilyOptions, SelectorFamilyOptions, UpdateHandler, TransactionUpdateHandler } from 'atom.io';
|
|
2
2
|
import { Json } from 'atom.io/json';
|
|
3
|
+
import { Store as Store$1 } from 'atom.io/internal';
|
|
3
4
|
|
|
4
5
|
declare class Subject<T> {
|
|
5
6
|
Subscriber: (value: T) => void;
|
|
@@ -8,6 +9,11 @@ declare class Subject<T> {
|
|
|
8
9
|
private unsubscribe;
|
|
9
10
|
next(value: T): void;
|
|
10
11
|
}
|
|
12
|
+
declare class StatefulSubject<T> extends Subject<T> {
|
|
13
|
+
state: T;
|
|
14
|
+
constructor(initialState: T);
|
|
15
|
+
next(value: T): void;
|
|
16
|
+
}
|
|
11
17
|
|
|
12
18
|
type Selector<T> = {
|
|
13
19
|
key: string;
|
|
@@ -78,23 +84,18 @@ type Transaction<ƒ extends ƒn> = {
|
|
|
78
84
|
run: (...parameters: Parameters<ƒ>) => ReturnType<ƒ>;
|
|
79
85
|
};
|
|
80
86
|
declare function createTransaction<ƒ extends ƒn>(options: TransactionOptions<ƒ>, store: Store): TransactionToken<ƒ>;
|
|
81
|
-
declare const target: (store: Store) => StoreCore;
|
|
82
87
|
|
|
83
|
-
declare const redoTransactionUpdate: <ƒ extends ƒn>(
|
|
88
|
+
declare const redoTransactionUpdate: <ƒ extends ƒn>(transactionUpdate: TransactionUpdate<ƒ>, store: Store) => void;
|
|
84
89
|
|
|
85
|
-
declare const undoTransactionUpdate: <ƒ extends ƒn>(
|
|
90
|
+
declare const undoTransactionUpdate: <ƒ extends ƒn>(transactionUpdate: TransactionUpdate<ƒ>, store: Store) => void;
|
|
86
91
|
|
|
87
92
|
declare const TRANSACTION_PHASES: readonly ["idle", "building", "applying"];
|
|
88
93
|
type TransactionPhase = (typeof TRANSACTION_PHASES)[number];
|
|
89
|
-
type
|
|
94
|
+
type TransactionMeta<ƒ extends ƒn> = {
|
|
90
95
|
phase: `applying` | `building`;
|
|
91
96
|
time: number;
|
|
92
|
-
|
|
97
|
+
update: TransactionUpdate<ƒ>;
|
|
93
98
|
};
|
|
94
|
-
type TransactionIdle = {
|
|
95
|
-
phase: `idle`;
|
|
96
|
-
};
|
|
97
|
-
type TransactionStatus<ƒ extends ƒn> = TransactionIdle | TransactionUpdateInProgress<ƒ>;
|
|
98
99
|
|
|
99
100
|
declare function deposit<T>(state: Atom<T>): AtomToken<T>;
|
|
100
101
|
declare function deposit<T>(state: Selector<T>): SelectorToken<T>;
|
|
@@ -177,6 +178,13 @@ declare class Junction<const ASide extends string, const BSide extends string, c
|
|
|
177
178
|
has(a: string, b?: string): boolean;
|
|
178
179
|
}
|
|
179
180
|
|
|
181
|
+
interface Lineage {
|
|
182
|
+
parent: typeof this | null;
|
|
183
|
+
child: typeof this | null;
|
|
184
|
+
}
|
|
185
|
+
declare function newest<T extends Lineage>(scion: T): T;
|
|
186
|
+
declare function eldest<T extends Lineage>(scion: T): T;
|
|
187
|
+
|
|
180
188
|
interface Transceiver<Signal extends Json.Serializable> {
|
|
181
189
|
do: (update: Signal) => void;
|
|
182
190
|
undo: (update: Signal) => void;
|
|
@@ -277,8 +285,9 @@ declare const addAtomToTimeline: (atomToken: AtomToken<any>, tl: Timeline, store
|
|
|
277
285
|
|
|
278
286
|
declare const timeTravel: (direction: `backward` | `forward`, token: TimelineToken, store: Store) => void;
|
|
279
287
|
|
|
280
|
-
|
|
281
|
-
|
|
288
|
+
declare class Store implements Lineage {
|
|
289
|
+
parent: Store | null;
|
|
290
|
+
child: Store | null;
|
|
282
291
|
valueMap: Map<string, any>;
|
|
283
292
|
atoms: Map<string, Atom<any> | MutableAtom<any>>;
|
|
284
293
|
selectors: Map<string, Selector<any>>;
|
|
@@ -298,10 +307,11 @@ declare class Store {
|
|
|
298
307
|
selectorCreation: Subject<ReadonlySelectorToken<unknown> | SelectorToken<unknown>>;
|
|
299
308
|
transactionCreation: Subject<TransactionToken<ƒn>>;
|
|
300
309
|
timelineCreation: Subject<TimelineToken>;
|
|
310
|
+
transactionApplying: StatefulSubject<TransactionMeta<ƒn> | null>;
|
|
301
311
|
operationStatus: Subject<OperationProgress>;
|
|
302
312
|
};
|
|
303
313
|
operation: OperationProgress;
|
|
304
|
-
|
|
314
|
+
transactionMeta: TransactionMeta<ƒn> | null;
|
|
305
315
|
config: {
|
|
306
316
|
name: string;
|
|
307
317
|
};
|
|
@@ -383,7 +393,8 @@ declare class LazyMap<K, V> extends Map<K, V> {
|
|
|
383
393
|
deleted: Set<K>;
|
|
384
394
|
constructor(source: Map<K, V>);
|
|
385
395
|
get(key: K): V | undefined;
|
|
386
|
-
|
|
396
|
+
set(key: K, value: V): this;
|
|
397
|
+
hasOwn(key: K): boolean;
|
|
387
398
|
has(key: K): boolean;
|
|
388
399
|
delete(key: K): boolean;
|
|
389
400
|
}
|
|
@@ -401,4 +412,10 @@ declare const setAtomOrSelector: <T>(state: Atom<T> | Selector<T>, value: T | ((
|
|
|
401
412
|
|
|
402
413
|
declare const subscribeToRootAtoms: <T>(state: ReadonlySelector<T> | Selector<T>, store: Store) => (() => void)[] | null;
|
|
403
414
|
|
|
404
|
-
|
|
415
|
+
declare function subscribeToState<T>(token: ReadonlySelectorToken<T> | StateToken<T>, handleUpdate: UpdateHandler<T>, key: string, store: Store$1): () => void;
|
|
416
|
+
|
|
417
|
+
declare const subscribeToTimeline: (token: TimelineToken, handleUpdate: (update: TimelineUpdate | `redo` | `undo`) => void, key: string, store: Store$1) => (() => void);
|
|
418
|
+
|
|
419
|
+
declare const subscribeToTransaction: <ƒ extends ƒn>(token: TransactionToken<ƒ>, handleUpdate: TransactionUpdateHandler<ƒ>, key: string, store: Store$1) => (() => void);
|
|
420
|
+
|
|
421
|
+
export { type Atom, type AtomKey, FamilyTracker, Future, IMPLICIT, LazyMap, type Lineage, type Modify, type MutableAtom, NotFoundError, type OperationProgress, type ReadonlySelector, type ReadonlySelectorKey, type Selector, type SelectorKey, type Signal, type StateKey, StatefulSubject, Store, Subject, TRANSACTION_PHASES, type Timeline, type TimelineAtomUpdate, type TimelineSelectorUpdate, type TimelineTransactionUpdate, Tracker, type Transaction, type TransactionMeta, type TransactionPhase, type Transceiver, type TransceiverMode, abortTransaction, addAtomToTimeline, applyTransaction, become, buildTransaction, cacheValue, clearStore, closeOperation, createAtom, createAtomFamily, createMutableAtom, createMutableAtomFamily, createReadonlySelectorFamily, createSelector, createSelectorFamily, createTimeline, createTransaction, deleteAtom, deleteSelector, deposit, eldest, evictCachedValue, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getUpdateToken, isAtomDefault, isAtomKey, isAtomMutable, isAtomTokenMutable, isDone, isReadonlySelectorKey, isSelectorDefault, isSelectorKey, isStateKey, isTransceiver, isValueCached, markAtomAsDefault, markAtomAsNotDefault, markDone, newest, openOperation, readCachedValue, readOrComputeValue, redoTransactionUpdate, registerSelector, setAtomOrSelector, subscribeToRootAtoms, subscribeToState, subscribeToTimeline, subscribeToTransaction, timeTravel, traceAllSelectorAtoms, traceSelectorAtoms, undoTransactionUpdate, updateSelectorAtoms, withdraw, withdrawNewFamilyMember };
|