atom.io 0.24.5 → 0.24.6
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.d.ts +1 -1
- package/internal/dist/index.cjs +1448 -1394
- package/internal/dist/index.d.ts +10 -9
- package/internal/dist/index.js +1449 -1394
- package/internal/src/atom/dispose-atom.ts +5 -1
- package/internal/src/families/init-family-member.ts +11 -8
- package/internal/src/ingest-updates/ingest-creation-disposal.ts +22 -9
- package/internal/src/molecule/dispose-molecule.ts +27 -16
- package/internal/src/molecule/grow-molecule-in-store.ts +2 -6
- package/internal/src/molecule/make-molecule-in-store.ts +21 -15
- package/internal/src/mutable/tracker.ts +1 -1
- package/internal/src/selector/create-writable-selector.ts +9 -8
- package/internal/src/selector/dispose-selector.ts +4 -0
- package/internal/src/selector/register-selector.ts +3 -2
- package/internal/src/set-state/evict-downstream.ts +10 -8
- package/internal/src/store/store.ts +29 -25
- package/internal/src/timeline/create-timeline.ts +404 -104
- package/internal/src/timeline/index.ts +0 -1
- package/internal/src/transaction/build-transaction.ts +2 -1
- package/package.json +1 -1
- package/src/transaction.ts +1 -1
- package/internal/src/timeline/add-atom-to-timeline.ts +0 -265
package/internal/dist/index.d.ts
CHANGED
|
@@ -221,8 +221,6 @@ type Timeline<ManagedAtom extends TimelineManageable> = {
|
|
|
221
221
|
};
|
|
222
222
|
declare function createTimeline<ManagedAtom extends TimelineManageable>(options: TimelineOptions<ManagedAtom>, store: Store, data?: Timeline<ManagedAtom>): TimelineToken<ManagedAtom>;
|
|
223
223
|
|
|
224
|
-
declare const addAtomToTimeline: (atomToken: AtomToken<any>, tl: Timeline<any>, store: Store) => void;
|
|
225
|
-
|
|
226
224
|
declare const timeTravel: (action: `redo` | `undo`, token: TimelineToken<any>, store: Store) => void;
|
|
227
225
|
|
|
228
226
|
declare class Store implements Lineage {
|
|
@@ -232,22 +230,26 @@ declare class Store implements Lineage {
|
|
|
232
230
|
atoms: Map<string, Atom<any>>;
|
|
233
231
|
selectors: Map<string, WritableSelector<any>>;
|
|
234
232
|
readonlySelectors: Map<string, ReadonlySelector<any>>;
|
|
235
|
-
trackers: Map<string, Tracker<Transceiver<any>>>;
|
|
236
|
-
families: Map<string, WritableSelectorFamily<any, any> | MutableAtomFamily<any, any, any> | RegularAtomFamily<any, any> | ReadonlySelectorFamily<any, any>>;
|
|
237
|
-
timelines: Map<string, Timeline<any>>;
|
|
238
|
-
transactions: Map<string, Transaction<Func>>;
|
|
239
233
|
atomsThatAreDefault: Set<string>;
|
|
240
|
-
timelineAtoms: Junction<"timelineKey", "atomKey", null>;
|
|
241
234
|
selectorAtoms: Junction<"selectorKey", "atomKey", null>;
|
|
242
235
|
selectorGraph: Junction<"upstreamSelectorKey", "downstreamSelectorKey", {
|
|
243
236
|
source: string;
|
|
244
237
|
}>;
|
|
238
|
+
trackers: Map<string, Tracker<Transceiver<any>>>;
|
|
239
|
+
families: Map<string, WritableSelectorFamily<any, any> | MutableAtomFamily<any, any, any> | RegularAtomFamily<any, any> | ReadonlySelectorFamily<any, any>>;
|
|
240
|
+
transactions: Map<string, Transaction<Func>>;
|
|
241
|
+
transactionMeta: TransactionEpoch | TransactionProgress<Func>;
|
|
242
|
+
timelines: Map<string, Timeline<any>>;
|
|
243
|
+
timelineTopics: Junction<"timelineKey", "topicKey", {
|
|
244
|
+
topicType: `atom_family` | `atom` | `molecule_family` | `molecule`;
|
|
245
|
+
}>;
|
|
245
246
|
molecules: Map<string, Molecule<any>>;
|
|
246
247
|
moleculeFamilies: Map<string, atom_io.Flat<atom_io.MoleculeFamilyToken<any> & {
|
|
247
248
|
subject: Subject<atom_io.MoleculeDisposal | atom_io.MoleculeCreation<any>>;
|
|
248
249
|
dependsOn: `all` | `any`;
|
|
249
250
|
new: any;
|
|
250
251
|
}>>;
|
|
252
|
+
moleculeInProgress: string | null;
|
|
251
253
|
miscResources: Map<string, Disposable>;
|
|
252
254
|
on: {
|
|
253
255
|
atomCreation: Subject<AtomToken<unknown>>;
|
|
@@ -263,7 +265,6 @@ declare class Store implements Lineage {
|
|
|
263
265
|
moleculeDisposal: Subject<MoleculeToken<any>>;
|
|
264
266
|
};
|
|
265
267
|
operation: OperationProgress;
|
|
266
|
-
transactionMeta: TransactionEpoch | TransactionProgress<Func>;
|
|
267
268
|
config: {
|
|
268
269
|
name: string;
|
|
269
270
|
lifespan: `ephemeral` | `immortal`;
|
|
@@ -577,4 +578,4 @@ type Selector<T> = ReadonlySelector<T> | WritableSelector<T>;
|
|
|
577
578
|
type WritableState<T> = Atom<T> | WritableSelector<T>;
|
|
578
579
|
type ReadableState<T> = Atom<T> | Selector<T>;
|
|
579
580
|
|
|
580
|
-
export { type Atom, type AtomIOState, type AtomKey, type ChildStore, type EnvironmentData, FamilyTracker, Future, IMPLICIT, LazyMap, type Lineage, type Modify, Molecule, 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,
|
|
581
|
+
export { type Atom, type AtomIOState, type AtomKey, type ChildStore, type EnvironmentData, FamilyTracker, Future, IMPLICIT, LazyMap, type Lineage, type Modify, Molecule, 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, applyTransaction, arbitrary, assignTransactionToContinuity, become, buildTransaction, cacheValue, clearStore, closeOperation, createAtomFamily, createMoleculeFamily, createMutableAtom, createMutableAtomFamily, createReadonlySelector, createReadonlySelectorFamily, createRegularAtom, createRegularAtomFamily, createSelectorFamily, createStandaloneAtom, createStandaloneSelector, createTimeline, createTransaction, createWritableSelector, deposit, disposeAtom, disposeFromStore, disposeMolecule, disposeSelector, evictCachedValue, findInStore, getContinuityKey, getEnvironmentData, getEpochNumberOfAction, getEpochNumberOfContinuity, getFromStore, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getUpdateToken, growMoleculeInStore, ingestAtomUpdate, ingestCreationEvent, ingestDisposalEvent, ingestMoleculeCreationEvent, ingestMoleculeDisposalEvent, ingestSelectorUpdate, ingestTransactionUpdate, initFamilyMemberInStore, isAtomDefault, isAtomKey, isChildStore, isDone, isMutable, isReadonlySelectorKey, isRootStore, isSelectorKey, isStateKey, isTransceiver, makeMoleculeInStore, markAtomAsDefault, markAtomAsNotDefault, markDone, newest, openOperation, readCachedValue, readOrComputeValue, registerSelector, seekInStore, setAtomOrSelector, setEpochNumberOfAction, setEpochNumberOfContinuity, setIntoStore, subscribeToRootAtoms, subscribeToState, subscribeToTimeline, subscribeToTransaction, timeTravel, traceAllSelectorAtoms, traceSelectorAtoms, updateSelectorAtoms, withdraw };
|