atom.io 0.22.0 → 0.23.1
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/data/dist/index.cjs +17 -1
- package/data/dist/index.js +1 -1
- package/data/src/join.ts +30 -1
- package/dist/chunk-6MLFYN32.js +18 -0
- package/dist/{chunk-JA4V7TJY.js → chunk-7DT3PVS3.js} +18 -2
- package/dist/chunk-OAYGID5B.js +27 -0
- package/dist/index.cjs +2 -11
- package/dist/index.d.ts +51 -23
- package/dist/index.js +2 -11
- package/ephemeral/dist/index.d.ts +12 -0
- package/eslint-plugin/dist/index.cjs +0 -1
- package/eslint-plugin/dist/index.d.ts +73 -0
- package/eslint-plugin/dist/index.js +0 -1
- package/eslint-plugin/src/rules/lifespan.ts +0 -1
- package/immortal/dist/index.cjs +180 -20
- package/immortal/dist/index.d.ts +103 -0
- package/immortal/dist/index.js +134 -19
- package/immortal/src/index.ts +1 -0
- package/immortal/src/make-molecule.ts +222 -0
- package/immortal/src/molecule.ts +49 -16
- package/immortal/src/seek-state.ts +15 -2
- package/internal/dist/index.cjs +1119 -754
- package/internal/dist/index.d.ts +109 -12
- package/internal/dist/index.js +1098 -760
- package/internal/src/atom/create-regular-atom.ts +0 -2
- package/internal/src/atom/create-standalone-atom.ts +6 -2
- package/internal/src/atom/dispose-atom.ts +22 -2
- package/internal/src/families/create-readonly-selector-family.ts +7 -2
- package/internal/src/families/create-regular-atom-family.ts +6 -2
- package/internal/src/families/create-writable-selector-family.ts +7 -2
- package/internal/src/families/dispose-from-store.ts +22 -0
- package/internal/src/families/find-in-store.ts +0 -1
- package/internal/src/families/index.ts +1 -0
- package/internal/src/families/init-family-member.ts +22 -1
- package/internal/src/families/seek-in-store.ts +23 -6
- package/internal/src/ingest-updates/index.ts +1 -0
- package/internal/src/ingest-updates/ingest-creation-disposal.ts +104 -0
- package/internal/src/ingest-updates/ingest-transaction-update.ts +26 -4
- package/internal/src/mutable/create-mutable-atom-family.ts +6 -2
- package/internal/src/mutable/create-mutable-atom.ts +0 -2
- package/internal/src/mutable/get-json-token.ts +0 -1
- package/internal/src/mutable/tracker-family.ts +7 -7
- package/internal/src/not-found-error.ts +5 -0
- package/internal/src/selector/create-readonly-selector.ts +2 -3
- package/internal/src/selector/create-standalone-selector.ts +6 -2
- package/internal/src/selector/create-writable-selector.ts +2 -3
- package/internal/src/selector/dispose-selector.ts +32 -5
- package/internal/src/selector/register-selector.ts +2 -0
- package/internal/src/set-state/stow-update.ts +5 -1
- package/internal/src/store/deposit.ts +41 -7
- package/internal/src/store/store.ts +11 -0
- package/internal/src/store/withdraw.ts +28 -1
- package/internal/src/timeline/add-atom-to-timeline.ts +206 -182
- package/internal/src/timeline/create-timeline.ts +181 -60
- package/internal/src/timeline/time-travel.ts +20 -0
- package/internal/src/transaction/apply-transaction.ts +2 -12
- package/internal/src/transaction/build-transaction.ts +11 -2
- package/introspection/dist/index.cjs +2 -1
- package/introspection/dist/index.js +2 -1
- package/introspection/src/attach-timeline-family.ts +1 -0
- package/json/dist/index.cjs +3 -3
- package/json/dist/index.js +6 -5
- package/json/src/select-json-family.ts +3 -4
- package/package.json +8 -5
- package/react-devtools/dist/index.cjs +58 -47
- package/react-devtools/dist/index.js +60 -48
- package/react-devtools/src/TimelineIndex.tsx +15 -13
- package/react-devtools/src/Updates.tsx +41 -32
- package/realtime-server/dist/index.cjs +21 -10
- package/realtime-server/dist/index.d.ts +1 -1
- package/realtime-server/dist/index.js +21 -11
- package/realtime-server/src/realtime-server-stores/server-sync-store.ts +21 -11
- package/realtime-testing/dist/index.cjs +1 -0
- package/realtime-testing/dist/index.js +1 -1
- package/src/atom.ts +9 -3
- package/src/dispose-state.ts +3 -12
- package/src/index.ts +4 -0
- package/src/selector.ts +3 -3
- package/src/subscribe.ts +8 -4
- package/src/timeline.ts +18 -1
- package/src/transaction.ts +56 -4
- package/dist/chunk-BF4MVQF6.js +0 -44
package/internal/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { Func, TransactionToken, TransactionUpdate, TransactionOptions, TransactorsWithRunAndEnv, RegularAtomToken, MutableAtomToken, AtomToken, WritableSelectorToken, ReadonlySelectorToken, SelectorToken, WritableToken, ReadableToken, TimelineManageable, StateUpdate, TokenType, FamilyMetadata, TimelineUpdate, TimelineOptions, TimelineToken, WritableSelectorFamily, MutableAtomFamily, RegularAtomFamily, ReadonlySelectorFamily, AtomIOLogger, Logger, AtomFamily, SelectorFamily,
|
|
1
|
+
import { Func, TransactionToken, TransactionUpdate, TransactionOptions, TransactorsWithRunAndEnv, RegularAtomToken, MutableAtomToken, AtomToken, WritableSelectorToken, ReadonlySelectorToken, SelectorToken, WritableToken, ReadableToken, StateCreation, StateDisposal, MutableAtomFamilyToken, RegularAtomFamilyToken, WritableSelectorFamilyToken, ReadonlySelectorFamilyToken, WritableFamilyToken, ReadableFamilyToken, Flat, MoleculeCreation, MoleculeDisposal, TimelineManageable, StateUpdate, TokenType, FamilyMetadata, TimelineUpdate, TimelineOptions, TimelineToken, WritableSelectorFamily, MutableAtomFamily, RegularAtomFamily, ReadonlySelectorFamily, AtomIOLogger, Logger, AtomFamily, SelectorFamily, AtomFamilyToken, SelectorFamilyToken, MutableAtomOptions, MutableAtomFamilyOptions, RegularAtomOptions, RegularAtomFamilyOptions, ReadonlySelectorFamilyOptions, WritableSelectorFamilyOptions, KeyedStateUpdate, ReadonlySelectorOptions, WritableSelectorOptions, Transactors, UpdateHandler, TransactionUpdateHandler } from 'atom.io';
|
|
2
2
|
import { Json, JsonInterface } from 'atom.io/json';
|
|
3
|
-
import { Molecule } from 'atom.io/immortal';
|
|
3
|
+
import { Molecule as Molecule$1, MoleculeToken as MoleculeToken$1, MoleculeFamily as MoleculeFamily$1, MoleculeFamilyToken as MoleculeFamilyToken$1 } from 'atom.io/immortal';
|
|
4
|
+
import * as Internal from 'atom.io/internal';
|
|
5
|
+
import { Store as Store$1, Subject as Subject$1, Transceiver as Transceiver$1 } from 'atom.io/internal';
|
|
6
|
+
import { Join, JoinToken } from 'atom.io/data';
|
|
4
7
|
|
|
5
8
|
type primitive = boolean | number | string | null;
|
|
6
9
|
|
|
@@ -147,9 +150,70 @@ declare function deposit<T>(state: WritableSelector<T>): WritableSelectorToken<T
|
|
|
147
150
|
declare function deposit<T>(state: ReadonlySelector<T>): ReadonlySelectorToken<T>;
|
|
148
151
|
declare function deposit<T>(state: Selector<T>): SelectorToken<T>;
|
|
149
152
|
declare function deposit<T>(state: WritableState<T>): WritableToken<T>;
|
|
153
|
+
declare function deposit<K extends Json.Serializable, S extends {
|
|
154
|
+
[key: string]: any;
|
|
155
|
+
}, P extends any[]>(state: Molecule$1<K>): MoleculeToken$1<K, S, P>;
|
|
156
|
+
declare function deposit<K extends Json.Serializable, S extends {
|
|
157
|
+
[key: string]: any;
|
|
158
|
+
}, P extends any[]>(state: MoleculeFamily$1<K, S, P>): MoleculeFamilyToken$1<K, S, P>;
|
|
150
159
|
declare function deposit<T extends Func>(state: Transaction<T>): TransactionToken<T>;
|
|
151
160
|
declare function deposit<T>(state: ReadableState<T>): ReadableToken<T>;
|
|
152
161
|
|
|
162
|
+
declare class Molecule<Key extends Json.Serializable> {
|
|
163
|
+
readonly store: Store$1;
|
|
164
|
+
readonly token: MoleculeToken<Key, any, any>;
|
|
165
|
+
readonly type = "molecule";
|
|
166
|
+
get key(): Key;
|
|
167
|
+
readonly family?: MoleculeFamilyToken<Key, any, any>;
|
|
168
|
+
readonly above: Molecule<any>[];
|
|
169
|
+
readonly below: Molecule<any>[];
|
|
170
|
+
readonly tokens: ReadableToken<any>[];
|
|
171
|
+
readonly joins: Join<any, any, any, any>[];
|
|
172
|
+
readonly subject: Subject$1<StateCreation<any> | StateDisposal<any>>;
|
|
173
|
+
constructor(store: Store$1, above: Molecule<any> | Molecule<any>[] | undefined, token: MoleculeToken<Key, any, any>);
|
|
174
|
+
bond<T extends Transceiver$1<any>, J extends Json.Serializable, K extends string>(token: MutableAtomFamilyToken<T, J, K>): MutableAtomToken<T, J>;
|
|
175
|
+
bond<T, K extends Key>(token: RegularAtomFamilyToken<T, K>): RegularAtomToken<T>;
|
|
176
|
+
bond<T, K extends Json.Serializable>(token: WritableSelectorFamilyToken<T, K>): WritableSelectorToken<T>;
|
|
177
|
+
bond<T, K extends Json.Serializable>(token: ReadonlySelectorFamilyToken<T, K>): ReadonlySelectorToken<T>;
|
|
178
|
+
bond<T, K extends Json.Serializable>(token: WritableFamilyToken<T, K>): WritableToken<T>;
|
|
179
|
+
bond<T, K extends Json.Serializable>(token: ReadableFamilyToken<T, K>): ReadableToken<T>;
|
|
180
|
+
spawn<K extends Json.Serializable>(key: K): Molecule<K>;
|
|
181
|
+
with(molecule: Molecule<any>): (key: string) => Molecule<any>;
|
|
182
|
+
detach(child: Molecule<any>): void;
|
|
183
|
+
claim(child: Molecule<any>): void;
|
|
184
|
+
clear(): void;
|
|
185
|
+
join(token: JoinToken<any, any, any, any>): void;
|
|
186
|
+
private [Symbol.dispose];
|
|
187
|
+
dispose: () => void;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
type MoleculeConstructor<Key extends Json.Serializable, Struct extends {
|
|
191
|
+
[key: string]: any;
|
|
192
|
+
}, Params extends any[]> = new (context: Molecule<any>[], token: MoleculeToken<Key, Struct, Params>, ...params: Params) => Molecule<Key> & Struct;
|
|
193
|
+
type MoleculeFamilyToken<Key extends Json.Serializable, Struct extends {
|
|
194
|
+
[key: string]: any;
|
|
195
|
+
}, Params extends any[]> = {
|
|
196
|
+
key: string;
|
|
197
|
+
type: `molecule_family`;
|
|
198
|
+
__K?: Key;
|
|
199
|
+
__S?: Struct;
|
|
200
|
+
__P?: Params;
|
|
201
|
+
};
|
|
202
|
+
type MoleculeFamily<Key extends Json.Serializable, Struct extends {
|
|
203
|
+
[key: string]: any;
|
|
204
|
+
}, Params extends any[]> = Flat<MoleculeFamilyToken<Key, Struct, Params> & {
|
|
205
|
+
subject: Internal.Subject<MoleculeCreation<Key> | MoleculeDisposal<Key>>;
|
|
206
|
+
}> & MoleculeConstructor<Key, Struct, Params>;
|
|
207
|
+
type MoleculeToken<Key extends Json.Serializable, Struct extends {
|
|
208
|
+
[key: string]: any;
|
|
209
|
+
}, Params extends any[]> = {
|
|
210
|
+
key: Key;
|
|
211
|
+
type: `molecule`;
|
|
212
|
+
family?: MoleculeFamilyToken<Key, Struct, Params>;
|
|
213
|
+
__S?: Struct;
|
|
214
|
+
__P?: Params;
|
|
215
|
+
};
|
|
216
|
+
|
|
153
217
|
interface Lineage {
|
|
154
218
|
parent: typeof this | null;
|
|
155
219
|
child: typeof this | null;
|
|
@@ -170,34 +234,47 @@ declare const closeOperation: (store: Store) => void;
|
|
|
170
234
|
declare const isDone: (key: string, store: Store) => boolean;
|
|
171
235
|
declare const markDone: (key: string, store: Store) => void;
|
|
172
236
|
|
|
173
|
-
type TimelineAtomUpdate<ManagedAtom extends TimelineManageable> = StateUpdate<TokenType<ManagedAtom>> & {
|
|
237
|
+
type TimelineAtomUpdate<ManagedAtom extends TimelineManageable> = Flat<StateUpdate<TokenType<ManagedAtom>> & {
|
|
174
238
|
key: string;
|
|
175
239
|
type: `atom_update`;
|
|
176
240
|
timestamp: number;
|
|
177
241
|
family?: FamilyMetadata;
|
|
178
|
-
}
|
|
242
|
+
}>;
|
|
179
243
|
type TimelineSelectorUpdate<ManagedAtom extends TimelineManageable> = {
|
|
180
244
|
key: string;
|
|
181
245
|
type: `selector_update`;
|
|
182
246
|
timestamp: number;
|
|
183
247
|
atomUpdates: Omit<TimelineAtomUpdate<ManagedAtom>, `timestamp`>[];
|
|
184
248
|
};
|
|
185
|
-
type TimelineTransactionUpdate = TransactionUpdate<Func> & {
|
|
249
|
+
type TimelineTransactionUpdate = Flat<TransactionUpdate<Func> & {
|
|
186
250
|
key: string;
|
|
187
251
|
type: `transaction_update`;
|
|
188
252
|
timestamp: number;
|
|
189
|
-
}
|
|
253
|
+
}>;
|
|
254
|
+
type TimelineStateCreation<T extends ReadableToken<any>> = Flat<StateCreation<T> & {
|
|
255
|
+
timestamp: number;
|
|
256
|
+
}>;
|
|
257
|
+
type TimelineStateDisposal<T extends ReadableToken<any>> = Flat<StateDisposal<T> & {
|
|
258
|
+
timestamp: number;
|
|
259
|
+
}>;
|
|
260
|
+
type TimelineMoleculeCreation<Key extends Json.Serializable> = Flat<MoleculeCreation<Key> & {
|
|
261
|
+
timestamp: number;
|
|
262
|
+
}>;
|
|
263
|
+
type TimelineMoleculeDisposal<Key extends Json.Serializable> = Flat<MoleculeDisposal<Key> & {
|
|
264
|
+
timestamp: number;
|
|
265
|
+
}>;
|
|
190
266
|
type Timeline<ManagedAtom extends TimelineManageable> = {
|
|
191
267
|
type: `timeline`;
|
|
192
268
|
key: string;
|
|
193
269
|
at: number;
|
|
194
|
-
shouldCapture?: (update: TimelineUpdate<
|
|
270
|
+
shouldCapture?: (update: TimelineUpdate<ManagedAtom>, timeline: Timeline<ManagedAtom>) => boolean;
|
|
195
271
|
timeTraveling: `into_future` | `into_past` | null;
|
|
196
272
|
history: TimelineUpdate<ManagedAtom>[];
|
|
197
273
|
selectorTime: number | null;
|
|
198
274
|
transactionKey: string | null;
|
|
199
275
|
install: (store: Store) => void;
|
|
200
|
-
subject: Subject<
|
|
276
|
+
subject: Subject<TimelineUpdate<ManagedAtom> | `redo` | `undo`>;
|
|
277
|
+
subscriptions: Map<string, () => void>;
|
|
201
278
|
};
|
|
202
279
|
declare function createTimeline<ManagedAtom extends TimelineManageable>(options: TimelineOptions<ManagedAtom>, store: Store, data?: Timeline<ManagedAtom>): TimelineToken<ManagedAtom>;
|
|
203
280
|
|
|
@@ -222,7 +299,8 @@ declare class Store implements Lineage {
|
|
|
222
299
|
selectorGraph: Junction<"upstreamSelectorKey", "downstreamSelectorKey", {
|
|
223
300
|
source: string;
|
|
224
301
|
}>;
|
|
225
|
-
molecules: Map<string, Molecule<any>>;
|
|
302
|
+
molecules: Map<string, Molecule$1<any>>;
|
|
303
|
+
moleculeFamilies: Map<string, MoleculeFamily<any, any, any>>;
|
|
226
304
|
miscResources: Map<string, Disposable>;
|
|
227
305
|
on: {
|
|
228
306
|
atomCreation: Subject<AtomToken<unknown>>;
|
|
@@ -233,6 +311,9 @@ declare class Store implements Lineage {
|
|
|
233
311
|
transactionCreation: Subject<TransactionToken<Func>>;
|
|
234
312
|
transactionApplying: StatefulSubject<TransactionProgress<Func> | null>;
|
|
235
313
|
operationClose: Subject<OperationProgress>;
|
|
314
|
+
moleculeCreationStart: Subject<MoleculeToken<any, any, any>>;
|
|
315
|
+
moleculeCreationDone: Subject<MoleculeToken<any, any, any>>;
|
|
316
|
+
moleculeDisposal: Subject<MoleculeToken<any, any, any>>;
|
|
236
317
|
};
|
|
237
318
|
operation: OperationProgress;
|
|
238
319
|
transactionMeta: TransactionEpoch | TransactionProgress<Func>;
|
|
@@ -250,7 +331,7 @@ declare const IMPLICIT: {
|
|
|
250
331
|
};
|
|
251
332
|
declare const clearStore: (store: Store) => void;
|
|
252
333
|
|
|
253
|
-
type Withdrawable = Atom<any> | AtomFamily<any, any> | MutableAtom<any, any> | MutableAtomFamily<any, any, any> | ReadableState<any> | ReadonlySelector<any> | ReadonlySelectorFamily<any, any> | RegularAtom<any> | RegularAtomFamily<any, any> | Selector<any> | SelectorFamily<any, any> | Timeline<any> | Transaction<any> | WritableSelector<any> | WritableSelectorFamily<any, any> | WritableState<any>;
|
|
334
|
+
type Withdrawable = Atom<any> | AtomFamily<any, any> | Molecule$1<any> | MoleculeFamily$1<any, any, any> | MutableAtom<any, any> | MutableAtomFamily<any, any, any> | ReadableState<any> | ReadonlySelector<any> | ReadonlySelectorFamily<any, any> | RegularAtom<any> | RegularAtomFamily<any, any> | Selector<any> | SelectorFamily<any, any> | Timeline<any> | Transaction<any> | WritableSelector<any> | WritableSelectorFamily<any, any> | WritableState<any>;
|
|
254
335
|
declare function withdraw<T>(token: RegularAtomToken<T>, store: Store): RegularAtom<T>;
|
|
255
336
|
declare function withdraw<T extends Transceiver<any>>(token: MutableAtomToken<T, any>, store: Store): MutableAtom<T, any>;
|
|
256
337
|
declare function withdraw<T>(token: AtomToken<T>, store: Store): Atom<T>;
|
|
@@ -265,6 +346,12 @@ declare function withdraw<T, K extends Json.Serializable>(token: AtomFamilyToken
|
|
|
265
346
|
declare function withdraw<T, K extends Json.Serializable>(token: ReadonlySelectorFamilyToken<T, K>, store: Store): ReadonlySelectorFamily<T, any>;
|
|
266
347
|
declare function withdraw<T, K extends Json.Serializable>(token: WritableSelectorFamilyToken<T, K>, store: Store): WritableSelectorFamily<T, any>;
|
|
267
348
|
declare function withdraw<T, K extends Json.Serializable>(token: SelectorFamilyToken<T, K>, store: Store): SelectorFamily<T, any>;
|
|
349
|
+
declare function withdraw<K extends Json.Serializable, S extends {
|
|
350
|
+
[key: string]: any;
|
|
351
|
+
}, P extends any[]>(token: MoleculeToken$1<K, S, P>, store: Store): Molecule$1<K> & S;
|
|
352
|
+
declare function withdraw<K extends Json.Serializable, S extends {
|
|
353
|
+
[key: string]: any;
|
|
354
|
+
}, P extends any[]>(token: MoleculeFamilyToken$1<K, S, P>, store: Store): MoleculeFamily$1<K, S, P>;
|
|
268
355
|
declare function withdraw<T extends Func>(token: TransactionToken<T>, store: Store): Transaction<T extends Func ? T : never>;
|
|
269
356
|
declare function withdraw<T>(token: TimelineToken<T>, store: Store): Timeline<T extends TimelineManageable ? T : never>;
|
|
270
357
|
|
|
@@ -364,6 +451,8 @@ declare function createRegularAtomFamily<T, K extends Json.Serializable>(options
|
|
|
364
451
|
declare function createSelectorFamily<T, K extends Json.Serializable>(options: WritableSelectorFamilyOptions<T, K>, store: Store): WritableSelectorFamily<T, K>;
|
|
365
452
|
declare function createSelectorFamily<T, K extends Json.Serializable>(options: ReadonlySelectorFamilyOptions<T, K>, store: Store): ReadonlySelectorFamily<T, K>;
|
|
366
453
|
|
|
454
|
+
declare function disposeFromStore(token: MoleculeToken$1<any, any, any> | ReadableToken<any>, store?: Internal.Store): void;
|
|
455
|
+
|
|
367
456
|
declare function findInStore<T extends Transceiver<any>, J extends Json.Serializable, K extends Json.Serializable, Key extends K>(token: MutableAtomFamilyToken<T, J, K>, key: Key, store: Store): MutableAtomToken<T, J>;
|
|
368
457
|
declare function findInStore<T, K extends Json.Serializable, Key extends K>(token: RegularAtomFamilyToken<T, K>, key: Key, store: Store): RegularAtomToken<T>;
|
|
369
458
|
declare function findInStore<T, K extends Json.Serializable, Key extends K>(token: AtomFamilyToken<T, K>, key: Key, store: Store): AtomToken<T>;
|
|
@@ -390,6 +479,9 @@ declare function seekInStore<T, K extends Json.Serializable, Key extends K>(toke
|
|
|
390
479
|
declare function seekInStore<T, K extends Json.Serializable, Key extends K>(token: SelectorFamilyToken<T, K>, key: Key, store: Store): SelectorToken<T> | undefined;
|
|
391
480
|
declare function seekInStore<T, K extends Json.Serializable, Key extends K>(token: WritableFamilyToken<T, K>, key: Key, store: Store): WritableToken<T> | undefined;
|
|
392
481
|
declare function seekInStore<T, K extends Json.Serializable, Key extends K>(token: ReadableFamilyToken<T, K>, key: Key, store: Store): ReadableToken<T> | undefined;
|
|
482
|
+
declare function seekInStore<K extends Json.Serializable, S extends {
|
|
483
|
+
[key: string]: any;
|
|
484
|
+
}>(token: MoleculeFamilyToken$1<K, S, any[]>, key: K, store: Store): MoleculeToken$1<K, S, any[]> | undefined;
|
|
393
485
|
|
|
394
486
|
type EnvironmentData = {
|
|
395
487
|
window: typeof window | undefined;
|
|
@@ -404,6 +496,11 @@ declare const readOrComputeValue: <T>(state: ReadableState<T>, target: Store) =>
|
|
|
404
496
|
|
|
405
497
|
declare function ingestAtomUpdate(applying: `newValue` | `oldValue`, atomUpdate: KeyedStateUpdate<any>, store: Store): void;
|
|
406
498
|
|
|
499
|
+
declare function ingestCreationEvent(update: StateCreation<any>, applying: `newValue` | `oldValue`, store: Store): void;
|
|
500
|
+
declare function ingestDisposalEvent(update: StateDisposal<any>, applying: `newValue` | `oldValue`, store: Store): void;
|
|
501
|
+
declare function ingestMoleculeCreationEvent(update: MoleculeCreation<any>, applying: `newValue` | `oldValue`, store: Store): void;
|
|
502
|
+
declare function ingestMoleculeDisposalEvent(update: MoleculeDisposal<any>, applying: `newValue` | `oldValue`, store: Store): void;
|
|
503
|
+
|
|
407
504
|
declare function ingestSelectorUpdate(applying: `newValue` | `oldValue`, selectorUpdate: TimelineSelectorUpdate<any>, store: Store): void;
|
|
408
505
|
|
|
409
506
|
declare function ingestTransactionUpdate(applying: `newValue` | `oldValue`, transactionUpdate: TransactionUpdate<any>, store: Store): void;
|
|
@@ -437,7 +534,7 @@ declare class LazyMap<K, V> extends Map<K, V> {
|
|
|
437
534
|
delete(key: K): boolean;
|
|
438
535
|
}
|
|
439
536
|
|
|
440
|
-
type AtomIOToken = ReadableFamilyToken<any, any> | ReadableToken<any> | TimelineToken<any> | TransactionToken<any>;
|
|
537
|
+
type AtomIOToken = MoleculeFamilyToken$1<any, any, any> | MoleculeToken$1<any, any, any> | ReadableFamilyToken<any, any> | ReadableToken<any> | TimelineToken<any> | TransactionToken<any>;
|
|
441
538
|
declare class NotFoundError extends Error {
|
|
442
539
|
constructor(token: AtomIOToken, store: Store);
|
|
443
540
|
}
|
|
@@ -508,4 +605,4 @@ type Selector<T> = ReadonlySelector<T> | WritableSelector<T>;
|
|
|
508
605
|
type WritableState<T> = Atom<T> | WritableSelector<T>;
|
|
509
606
|
type ReadableState<T> = Atom<T> | Selector<T>;
|
|
510
607
|
|
|
511
|
-
export { type Atom, type AtomIOState, type AtomKey, type ChildStore, type EnvironmentData, FamilyTracker, Future, IMPLICIT, LazyMap, type Lineage, type Modify, type MutableAtom, NotFoundError, type OperationProgress, type ReadableState, type ReadonlySelector, type ReadonlySelectorKey, type RegularAtom, type RootStore, 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 TransactionEpoch, type TransactionPhase, type TransactionProgress, type Transceiver, type TransceiverMode, type Withdrawable, type WritableSelector, type WritableState, abortTransaction, actUponStore, addAtomToTimeline, applyTransaction, arbitrary, assignTransactionToContinuity, become, buildTransaction, cacheValue, clearStore, closeOperation, createAtomFamily, createMutableAtom, createMutableAtomFamily, createReadonlySelector, createReadonlySelectorFamily, createRegularAtom, createRegularAtomFamily, createSelectorFamily, createStandaloneAtom, createStandaloneSelector, createTimeline, createTransaction, createWritableSelector, deposit, disposeAtom, disposeSelector, evictCachedValue, findInStore, getContinuityKey, getEnvironmentData, getEpochNumberOfAction, getEpochNumberOfContinuity, getFromStore, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getUpdateToken, ingestAtomUpdate, ingestSelectorUpdate, ingestTransactionUpdate, initFamilyMember, isAtomDefault, isAtomKey, isChildStore, isDone, isMutable, isReadonlySelectorKey, isRootStore, isSelectorKey, isStateKey, isTransceiver, markAtomAsDefault, markAtomAsNotDefault, markDone, newest, openOperation, readCachedValue, readOrComputeValue, registerSelector, seekInStore, setAtomOrSelector, setEpochNumberOfAction, setEpochNumberOfContinuity, setIntoStore, subscribeToRootAtoms, subscribeToState, subscribeToTimeline, subscribeToTransaction, timeTravel, traceAllSelectorAtoms, traceSelectorAtoms, updateSelectorAtoms, withdraw };
|
|
608
|
+
export { type Atom, type AtomIOState, type AtomKey, type ChildStore, type EnvironmentData, FamilyTracker, Future, IMPLICIT, LazyMap, type Lineage, type Modify, type MutableAtom, NotFoundError, type OperationProgress, type ReadableState, type ReadonlySelector, type ReadonlySelectorKey, type RegularAtom, type RootStore, type Selector, type SelectorKey, type Signal, type StateKey, StatefulSubject, Store, Subject, TRANSACTION_PHASES, type Timeline, type TimelineAtomUpdate, type TimelineMoleculeCreation, type TimelineMoleculeDisposal, type TimelineSelectorUpdate, type TimelineStateCreation, type TimelineStateDisposal, type TimelineTransactionUpdate, Tracker, type Transaction, type TransactionEpoch, type TransactionPhase, type TransactionProgress, type Transceiver, type TransceiverMode, type Withdrawable, type WritableSelector, type WritableState, abortTransaction, actUponStore, addAtomToTimeline, applyTransaction, arbitrary, assignTransactionToContinuity, become, buildTransaction, cacheValue, clearStore, closeOperation, createAtomFamily, createMutableAtom, createMutableAtomFamily, createReadonlySelector, createReadonlySelectorFamily, createRegularAtom, createRegularAtomFamily, createSelectorFamily, createStandaloneAtom, createStandaloneSelector, createTimeline, createTransaction, createWritableSelector, deposit, disposeAtom, disposeFromStore, disposeSelector, evictCachedValue, findInStore, getContinuityKey, getEnvironmentData, getEpochNumberOfAction, getEpochNumberOfContinuity, getFromStore, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getUpdateToken, ingestAtomUpdate, ingestCreationEvent, ingestDisposalEvent, ingestMoleculeCreationEvent, ingestMoleculeDisposalEvent, ingestSelectorUpdate, ingestTransactionUpdate, initFamilyMember, isAtomDefault, isAtomKey, isChildStore, isDone, isMutable, isReadonlySelectorKey, isRootStore, isSelectorKey, isStateKey, isTransceiver, markAtomAsDefault, markAtomAsNotDefault, markDone, newest, openOperation, readCachedValue, readOrComputeValue, registerSelector, seekInStore, setAtomOrSelector, setEpochNumberOfAction, setEpochNumberOfContinuity, setIntoStore, subscribeToRootAtoms, subscribeToState, subscribeToTimeline, subscribeToTransaction, timeTravel, traceAllSelectorAtoms, traceSelectorAtoms, updateSelectorAtoms, withdraw };
|