atom.io 0.18.1 → 0.18.2

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.
Files changed (45) hide show
  1. package/dist/chunk-3J2EGSBE.js +31 -0
  2. package/dist/chunk-3J2EGSBE.js.map +1 -0
  3. package/dist/{chunk-JDUNWJFB.js → chunk-A4ZCNKWQ.js} +2 -2
  4. package/dist/chunk-A4ZCNKWQ.js.map +1 -0
  5. package/internal/dist/index.cjs +46 -100
  6. package/internal/dist/index.cjs.map +1 -1
  7. package/internal/dist/index.d.ts +23 -23
  8. package/internal/dist/index.js +46 -100
  9. package/internal/dist/index.js.map +1 -1
  10. package/internal/src/families/create-regular-atom-family.ts +4 -4
  11. package/internal/src/get-state/get-from-store.ts +2 -5
  12. package/internal/src/mutable/create-mutable-atom-family.ts +4 -4
  13. package/internal/src/selector/register-selector.ts +3 -14
  14. package/internal/src/set-state/set-into-store.ts +2 -5
  15. package/internal/src/store/withdraw-new-family-member.ts +38 -28
  16. package/internal/src/store/withdraw.ts +20 -23
  17. package/internal/src/subscribe/subscribe-to-state.ts +2 -3
  18. package/internal/src/subscribe/subscribe-to-timeline.ts +0 -5
  19. package/internal/src/subscribe/subscribe-to-transaction.ts +0 -5
  20. package/internal/src/timeline/add-atom-to-timeline.ts +6 -15
  21. package/internal/src/timeline/create-timeline.ts +0 -27
  22. package/package.json +6 -5
  23. package/react/dist/index.cjs +2 -3
  24. package/react/dist/index.cjs.map +1 -1
  25. package/react/dist/index.js +2 -3
  26. package/react/dist/index.js.map +1 -1
  27. package/react/src/use-tl.ts +2 -2
  28. package/react-devtools/dist/index.cjs +1 -1
  29. package/react-devtools/dist/index.cjs.map +1 -1
  30. package/react-devtools/dist/index.js +1 -1
  31. package/realtime-client/dist/index.cjs +1 -1
  32. package/realtime-client/dist/index.cjs.map +1 -1
  33. package/realtime-client/dist/index.js +13 -37
  34. package/realtime-client/dist/index.js.map +1 -1
  35. package/realtime-server/dist/index.cjs +3 -3
  36. package/realtime-server/dist/index.cjs.map +1 -1
  37. package/realtime-server/dist/index.js +3 -3
  38. package/realtime-server/dist/index.js.map +1 -1
  39. package/realtime-server/src/ipc-sockets/parent-socket.ts +4 -3
  40. package/realtime-testing/dist/index.cjs +43 -5
  41. package/realtime-testing/dist/index.cjs.map +1 -1
  42. package/realtime-testing/dist/index.js +4 -5
  43. package/realtime-testing/dist/index.js.map +1 -1
  44. package/realtime-testing/src/setup-realtime-test.tsx +3 -5
  45. package/dist/chunk-JDUNWJFB.js.map +0 -1
@@ -243,28 +243,28 @@ declare const IMPLICIT: {
243
243
  declare const clearStore: (store: Store) => void;
244
244
 
245
245
  type Withdrawable = Atom<any> | AtomFamily<any, any> | MutableAtom<any, any> | MutableAtomFamily<any, any, any> | ReadableState<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>;
246
- declare function withdraw<T>(token: RegularAtomToken<T>, store: Store): RegularAtom<T> | undefined;
247
- declare function withdraw<T extends Transceiver<any>>(token: MutableAtomToken<T, any>, store: Store): MutableAtom<T, any> | undefined;
248
- declare function withdraw<T>(token: AtomToken<T>, store: Store): Atom<T> | undefined;
249
- declare function withdraw<T>(token: WritableSelectorToken<T>, store: Store): WritableSelector<T> | undefined;
250
- declare function withdraw<T>(token: ReadonlySelectorToken<T>, store: Store): ReadonlySelector<T> | undefined;
251
- declare function withdraw<T>(token: SelectorToken<T>, store: Store): Selector<T> | undefined;
252
- declare function withdraw<T>(token: WritableToken<T>, store: Store): WritableState<T> | undefined;
253
- declare function withdraw<T>(token: ReadableToken<T>, store: Store): ReadableState<T> | undefined;
254
- declare function withdraw<T, K extends Json.Serializable>(token: RegularAtomFamilyToken<T, K>, store: Store): RegularAtomFamily<T, K> | undefined;
255
- declare function withdraw<T extends Transceiver<any>, J extends Json.Serializable, K extends Json.Serializable>(token: MutableAtomFamilyToken<T, J, K>, store: Store): MutableAtomFamily<T, J, K> | undefined;
256
- declare function withdraw<T, K extends Json.Serializable>(token: AtomFamilyToken<T>, store: Store): AtomFamily<T, any> | undefined;
257
- declare function withdraw<T, K extends Json.Serializable>(token: ReadonlySelectorFamilyToken<T, K>, store: Store): ReadonlySelectorFamily<T, any> | undefined;
258
- declare function withdraw<T, K extends Json.Serializable>(token: WritableSelectorFamilyToken<T, K>, store: Store): WritableSelectorFamily<T, any> | undefined;
259
- declare function withdraw<T, K extends Json.Serializable>(token: SelectorFamilyToken<T, K>, store: Store): SelectorFamily<T, any> | undefined;
260
- declare function withdraw<T>(token: TransactionToken<T>, store: Store): Transaction<T extends _n ? T : never> | undefined;
261
- declare function withdraw<T>(token: TimelineToken<T>, store: Store): Timeline<T extends TimelineManageable ? T : never> | undefined;
262
-
263
- declare function withdrawNewFamilyMember<T>(token: RegularAtomToken<T>, store: Store): Atom<T> | undefined;
264
- declare function withdrawNewFamilyMember<T>(token: WritableSelectorToken<T>, store: Store): WritableSelector<T> | undefined;
265
- declare function withdrawNewFamilyMember<T>(token: ReadonlySelectorToken<T>, store: Store): ReadonlySelector<T> | undefined;
266
- declare function withdrawNewFamilyMember<T>(token: WritableToken<T>, store: Store): WritableState<T> | undefined;
267
- declare function withdrawNewFamilyMember<T>(token: ReadableToken<T>, store: Store): ReadableState<T> | undefined;
246
+ declare function withdraw<T>(token: RegularAtomToken<T>, store: Store): RegularAtom<T>;
247
+ declare function withdraw<T extends Transceiver<any>>(token: MutableAtomToken<T, any>, store: Store): MutableAtom<T, any>;
248
+ declare function withdraw<T>(token: AtomToken<T>, store: Store): Atom<T>;
249
+ declare function withdraw<T>(token: WritableSelectorToken<T>, store: Store): WritableSelector<T>;
250
+ declare function withdraw<T>(token: ReadonlySelectorToken<T>, store: Store): ReadonlySelector<T>;
251
+ declare function withdraw<T>(token: SelectorToken<T>, store: Store): Selector<T>;
252
+ declare function withdraw<T>(token: WritableToken<T>, store: Store): WritableState<T>;
253
+ declare function withdraw<T>(token: ReadableToken<T>, store: Store): ReadableState<T>;
254
+ declare function withdraw<T, K extends Json.Serializable>(token: RegularAtomFamilyToken<T, K>, store: Store): RegularAtomFamily<T, K>;
255
+ declare function withdraw<T extends Transceiver<any>, J extends Json.Serializable, K extends Json.Serializable>(token: MutableAtomFamilyToken<T, J, K>, store: Store): MutableAtomFamily<T, J, K>;
256
+ declare function withdraw<T, K extends Json.Serializable>(token: AtomFamilyToken<T>, store: Store): AtomFamily<T, any>;
257
+ declare function withdraw<T, K extends Json.Serializable>(token: ReadonlySelectorFamilyToken<T, K>, store: Store): ReadonlySelectorFamily<T, any>;
258
+ declare function withdraw<T, K extends Json.Serializable>(token: WritableSelectorFamilyToken<T, K>, store: Store): WritableSelectorFamily<T, any>;
259
+ declare function withdraw<T, K extends Json.Serializable>(token: SelectorFamilyToken<T, K>, store: Store): SelectorFamily<T, any>;
260
+ declare function withdraw<T>(token: TransactionToken<T>, store: Store): Transaction<T extends _n ? T : never>;
261
+ declare function withdraw<T>(token: TimelineToken<T>, store: Store): Timeline<T extends TimelineManageable ? T : never>;
262
+
263
+ declare function withdrawOrCreate<T>(token: RegularAtomToken<T>, store: Store): Atom<T>;
264
+ declare function withdrawOrCreate<T>(token: WritableSelectorToken<T>, store: Store): WritableSelector<T>;
265
+ declare function withdrawOrCreate<T>(token: ReadonlySelectorToken<T>, store: Store): ReadonlySelector<T>;
266
+ declare function withdrawOrCreate<T>(token: WritableToken<T>, store: Store): WritableState<T>;
267
+ declare function withdrawOrCreate<T>(token: ReadableToken<T>, store: Store): ReadableState<T>;
268
268
 
269
269
  interface Transceiver<Signal extends Json.Serializable> {
270
270
  do: (update: Signal) => number | `OUT_OF_RANGE` | null;
@@ -484,4 +484,4 @@ type Selector<T> = ReadonlySelector<T> | WritableSelector<T>;
484
484
  type WritableState<T> = Atom<T> | WritableSelector<T>;
485
485
  type ReadableState<T> = Atom<T> | Selector<T>;
486
486
 
487
- 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, deleteAtom, deleteSelector, deposit, evictCachedValue, findInStore, getContinuityKey, getEnvironmentData, getEpochNumberOfAction, getEpochNumberOfContinuity, getFromStore, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getUpdateToken, ingestAtomUpdate, ingestSelectorUpdate, ingestTransactionUpdate, isAtomDefault, isAtomKey, isChildStore, isDone, isMutable, isReadonlySelectorKey, isRootStore, isSelectorKey, isStateKey, isTransceiver, markAtomAsDefault, markAtomAsNotDefault, markDone, newest, openOperation, readCachedValue, readOrComputeValue, registerSelector, setAtomOrSelector, setEpochNumberOfAction, setEpochNumberOfContinuity, setIntoStore, subscribeToRootAtoms, subscribeToState, subscribeToTimeline, subscribeToTransaction, timeTravel, traceAllSelectorAtoms, traceSelectorAtoms, updateSelectorAtoms, withdraw, withdrawNewFamilyMember };
487
+ 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, deleteAtom, deleteSelector, deposit, evictCachedValue, findInStore, getContinuityKey, getEnvironmentData, getEpochNumberOfAction, getEpochNumberOfContinuity, getFromStore, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getUpdateToken, ingestAtomUpdate, ingestSelectorUpdate, ingestTransactionUpdate, isAtomDefault, isAtomKey, isChildStore, isDone, isMutable, isReadonlySelectorKey, isRootStore, isSelectorKey, isStateKey, isTransceiver, markAtomAsDefault, markAtomAsNotDefault, markDone, newest, openOperation, readCachedValue, readOrComputeValue, registerSelector, setAtomOrSelector, setEpochNumberOfAction, setEpochNumberOfContinuity, setIntoStore, subscribeToRootAtoms, subscribeToState, subscribeToTimeline, subscribeToTransaction, timeTravel, traceAllSelectorAtoms, traceSelectorAtoms, updateSelectorAtoms, withdraw, withdrawOrCreate };
@@ -226,27 +226,37 @@ function withdraw(token, store) {
226
226
  }
227
227
  target = target.child;
228
228
  }
229
+ throw new NotFoundError(token, store);
229
230
  }
230
231
 
231
232
  // internal/src/store/withdraw-new-family-member.ts
232
- function withdrawNewFamilyMember(token, store) {
233
- if (token.family) {
234
- store.logger.info(
235
- `\u{1F46A}`,
236
- token.type,
237
- token.key,
238
- `creating new family member in store "${store.config.name}"`
239
- );
240
- const target = newest(store);
241
- const family = target.families.get(token.family.key);
242
- if (family) {
243
- const jsonSubKey = JSON.parse(token.family.subKey);
244
- family(jsonSubKey);
245
- const state = withdraw(token, store);
246
- return state;
233
+ function withdrawOrCreate(token, store) {
234
+ try {
235
+ const state = withdraw(token, store);
236
+ return state;
237
+ } catch (notFoundError) {
238
+ if (token.family) {
239
+ store.logger.info(
240
+ `\u{1F46A}`,
241
+ token.type,
242
+ token.key,
243
+ `creating new family member in store "${store.config.name}"`
244
+ );
245
+ const target = newest(store);
246
+ const family = target.families.get(token.family.key);
247
+ if (family) {
248
+ const jsonSubKey = JSON.parse(token.family.subKey);
249
+ family(jsonSubKey);
250
+ const state = withdraw(token, store);
251
+ return state;
252
+ }
253
+ throw new NotFoundError(
254
+ { key: token.family.key, type: `${token.type}_family` },
255
+ store
256
+ );
247
257
  }
258
+ throw notFoundError;
248
259
  }
249
- return void 0;
250
260
  }
251
261
 
252
262
  // internal/src/future.ts
@@ -359,10 +369,11 @@ function createRegularAtomFamily(options, store) {
359
369
  const subKey = stringifyJson(key);
360
370
  const family = { key: options.key, subKey };
361
371
  const fullKey = `${options.key}(${subKey})`;
362
- const existing = withdraw({ key: fullKey, type: `atom` }, store);
372
+ const target2 = newest(store);
373
+ const atomAlreadyCreated = target2.atoms.has(fullKey);
363
374
  let token;
364
- if (existing) {
365
- token = deposit(existing);
375
+ if (atomAlreadyCreated) {
376
+ token = { type: `atom`, key: fullKey, family };
366
377
  } else {
367
378
  const individualOptions = {
368
379
  key: fullKey,
@@ -720,15 +731,11 @@ var setAtomOrSelector = (state, value, store) => {
720
731
 
721
732
  // internal/src/set-state/set-into-store.ts
722
733
  function setIntoStore(token, value, store) {
723
- var _a;
724
734
  const rejection = openOperation(token, store);
725
735
  if (rejection) {
726
736
  return;
727
737
  }
728
- const state = (_a = withdraw(token, store)) != null ? _a : withdrawNewFamilyMember(token, store);
729
- if (state === void 0) {
730
- throw new NotFoundError(token, store);
731
- }
738
+ const state = withdrawOrCreate(token, store);
732
739
  setAtomOrSelector(state, value, store);
733
740
  closeOperation(store);
734
741
  }
@@ -813,14 +820,8 @@ var updateSelectorAtoms = (selectorKey, dependency, store) => {
813
820
  // internal/src/selector/register-selector.ts
814
821
  var registerSelector = (selectorKey, store) => ({
815
822
  get: (dependency) => {
816
- var _a;
817
823
  const target = newest(store);
818
- const dependencyState = (_a = withdraw(dependency, store)) != null ? _a : withdrawNewFamilyMember(dependency, store);
819
- if (dependencyState === void 0) {
820
- throw new Error(
821
- `State "${dependency.key}" not found in store "${store.config.name}".`
822
- );
823
- }
824
+ const dependencyState = withdrawOrCreate(dependency, store);
824
825
  const dependencyValue = readOrComputeValue(dependencyState, store);
825
826
  store.logger.info(
826
827
  `\u{1F50C}`,
@@ -843,12 +844,7 @@ var registerSelector = (selectorKey, store) => ({
843
844
  return dependencyValue;
844
845
  },
845
846
  set: (WritableToken, newValue) => {
846
- const state = withdraw(WritableToken, store);
847
- if (state === void 0) {
848
- throw new Error(
849
- `State "${WritableToken.key}" not found in this store. Did you forget to initialize with the "atom" or "selector" function?`
850
- );
851
- }
847
+ const state = withdrawOrCreate(WritableToken, store);
852
848
  setAtomOrSelector(state, newValue, store);
853
849
  },
854
850
  find: (token, key) => findInStore(token, key, store)
@@ -1036,8 +1032,7 @@ var subscribeToRootAtoms = (selector, store) => {
1036
1032
 
1037
1033
  // internal/src/subscribe/subscribe-to-state.ts
1038
1034
  function subscribeToState(token, handleUpdate, key, store) {
1039
- var _a;
1040
- const state = (_a = withdraw(token, store)) != null ? _a : withdrawNewFamilyMember(token, store);
1035
+ const state = withdrawOrCreate(token, store);
1041
1036
  if (state === void 0) {
1042
1037
  throw new Error(
1043
1038
  `State "${token.key}" not found in this store. Did you forget to initialize with the "atom" or "selector" function?`
@@ -1072,11 +1067,6 @@ function subscribeToState(token, handleUpdate, key, store) {
1072
1067
  // internal/src/subscribe/subscribe-to-timeline.ts
1073
1068
  var subscribeToTimeline = (token, handleUpdate, key, store) => {
1074
1069
  const tl = withdraw(token, store);
1075
- if (tl === void 0) {
1076
- throw new Error(
1077
- `Cannot subscribe to timeline "${token.key}": timeline not found in store "${store.config.name}".`
1078
- );
1079
- }
1080
1070
  store.logger.info(`\u{1F440}`, `timeline`, token.key, `Adding subscription "${key}"`);
1081
1071
  const unsubscribe = tl.subject.subscribe(key, handleUpdate);
1082
1072
  return () => {
@@ -1093,11 +1083,6 @@ var subscribeToTimeline = (token, handleUpdate, key, store) => {
1093
1083
  // internal/src/subscribe/subscribe-to-transaction.ts
1094
1084
  var subscribeToTransaction = (token, handleUpdate, key, store) => {
1095
1085
  const tx = withdraw(token, store);
1096
- if (tx === void 0) {
1097
- throw new Error(
1098
- `Cannot subscribe to transaction "${token.key}": transaction not found in store "${store.config.name}".`
1099
- );
1100
- }
1101
1086
  store.logger.info(
1102
1087
  `\u{1F440}`,
1103
1088
  `transaction`,
@@ -1372,10 +1357,11 @@ function createMutableAtomFamily(options, store) {
1372
1357
  const subKey = stringifyJson(key);
1373
1358
  const family = { key: options.key, subKey };
1374
1359
  const fullKey = `${options.key}(${subKey})`;
1375
- const existing = withdraw({ key: fullKey, type: `mutable_atom` }, store);
1360
+ const target2 = newest(store);
1361
+ const atomAlreadyCreated = target2.atoms.has(fullKey);
1376
1362
  let token;
1377
- if (existing) {
1378
- token = deposit(existing);
1363
+ if (atomAlreadyCreated) {
1364
+ token = { type: `mutable_atom`, key: fullKey, family };
1379
1365
  } else {
1380
1366
  const individualOptions = {
1381
1367
  key: fullKey,
@@ -1598,11 +1584,7 @@ function getEnvironmentData(store) {
1598
1584
 
1599
1585
  // internal/src/get-state/get-from-store.ts
1600
1586
  function getFromStore(token, store) {
1601
- var _a;
1602
- const state = (_a = withdraw(token, store)) != null ? _a : withdrawNewFamilyMember(token, store);
1603
- if (state === void 0) {
1604
- throw new NotFoundError(token, store);
1605
- }
1587
+ const state = withdrawOrCreate(token, store);
1606
1588
  return readOrComputeValue(state, store);
1607
1589
  }
1608
1590
 
@@ -1674,16 +1656,11 @@ var LazyMap = class extends Map {
1674
1656
  // internal/src/timeline/add-atom-to-timeline.ts
1675
1657
  var addAtomToTimeline = (atomToken, tl, store) => {
1676
1658
  let maybeAtom = withdraw(atomToken, store);
1677
- if ((maybeAtom == null ? void 0 : maybeAtom.type) === `mutable_atom`) {
1659
+ if (maybeAtom.type === `mutable_atom`) {
1678
1660
  const updateToken = getUpdateToken(maybeAtom);
1679
1661
  maybeAtom = withdraw(updateToken, store);
1680
1662
  }
1681
1663
  const atom = maybeAtom;
1682
- if (atom === void 0) {
1683
- throw new Error(
1684
- `Cannot subscribe to atom "${atomToken.key}" because it has not been initialized in store "${store.config.name}"`
1685
- );
1686
- }
1687
1664
  store.timelineAtoms.set({ atomKey: atom.key, timelineKey: tl.key });
1688
1665
  atom.subject.subscribe(`timeline`, (update) => {
1689
1666
  var _a, _b, _c, _d, _e, _f;
@@ -1715,15 +1692,11 @@ var addAtomToTimeline = (atomToken, tl, store) => {
1715
1692
  }
1716
1693
  }
1717
1694
  if (currentTransactionKey) {
1718
- const currentTransaction = withdraw(
1719
- { key: currentTransactionKey, type: `transaction` },
1720
- store
1721
- );
1722
- if (currentTransaction === void 0) {
1723
- throw new Error(
1724
- `Transaction "${currentTransactionKey}" not found in store "${store.config.name}". This is surprising, because we are in the application phase of "${currentTransactionKey}".`
1725
- );
1726
- }
1695
+ const txToken = {
1696
+ key: currentTransactionKey,
1697
+ type: `transaction`
1698
+ };
1699
+ const currentTransaction = withdraw(txToken, store);
1727
1700
  if (tl.transactionKey !== currentTransactionKey) {
1728
1701
  if (tl.transactionKey) {
1729
1702
  store.logger.error(
@@ -1895,15 +1868,6 @@ function createTimeline(options, store, data) {
1895
1868
  if (tokenOrFamily.type === `atom_family` || tokenOrFamily.type === `mutable_atom_family`) {
1896
1869
  const familyToken = tokenOrFamily;
1897
1870
  const family = withdraw(familyToken, store);
1898
- if (family === void 0) {
1899
- store.logger.error(
1900
- `\u274C`,
1901
- `timeline`,
1902
- options.key,
1903
- `Failed to add family "${familyToken.key}" because it does not exist in the store`
1904
- );
1905
- continue;
1906
- }
1907
1871
  const familyKey = family.key;
1908
1872
  target.timelineAtoms.set({ atomKey: familyKey, timelineKey });
1909
1873
  family.subject.subscribe(`timeline:${options.key}`, (token2) => {
@@ -1916,26 +1880,8 @@ function createTimeline(options, store, data) {
1916
1880
  }
1917
1881
  } else {
1918
1882
  let atom = withdraw(tokenOrFamily, store);
1919
- if (atom === void 0) {
1920
- store.logger.error(
1921
- `\u274C`,
1922
- `timeline`,
1923
- options.key,
1924
- `Failed to add atom "${atomKey}" because it does not exist in the store`
1925
- );
1926
- continue;
1927
- }
1928
1883
  if (isMutable(atom)) {
1929
1884
  const updateAtom = withdraw(getUpdateToken(atom), store);
1930
- if (updateAtom === void 0) {
1931
- store.logger.error(
1932
- `\u274C`,
1933
- `timeline`,
1934
- options.key,
1935
- `Failed to add update atom "${atomKey}" because it does not exist in the store`
1936
- );
1937
- continue;
1938
- }
1939
1885
  atom = updateAtom;
1940
1886
  atomKey = atom.key;
1941
1887
  }
@@ -2277,6 +2223,6 @@ function getEpochNumberOfAction(transactionKey, store) {
2277
2223
  // internal/src/transaction/index.ts
2278
2224
  var TRANSACTION_PHASES = [`idle`, `building`, `applying`];
2279
2225
 
2280
- export { FamilyTracker, Future, IMPLICIT, LazyMap, NotFoundError, StatefulSubject, Store, Subject, TRANSACTION_PHASES, Tracker, abortTransaction, actUponStore, addAtomToTimeline, applyTransaction, arbitrary, assignTransactionToContinuity, become, buildTransaction, cacheValue, clearStore, closeOperation, createAtomFamily, createMutableAtom, createMutableAtomFamily, createReadonlySelector, createReadonlySelectorFamily, createRegularAtom, createRegularAtomFamily, createSelectorFamily, createStandaloneAtom, createStandaloneSelector, createTimeline, createTransaction, createWritableSelector, deleteAtom, deleteSelector, deposit, evictCachedValue, findInStore, getContinuityKey, getEnvironmentData, getEpochNumberOfAction, getEpochNumberOfContinuity, getFromStore, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getUpdateToken, ingestAtomUpdate, ingestSelectorUpdate, ingestTransactionUpdate, isAtomDefault, isAtomKey, isChildStore, isDone, isMutable, isReadonlySelectorKey, isRootStore, isSelectorKey, isStateKey, isTransceiver, markAtomAsDefault, markAtomAsNotDefault, markDone, newest, openOperation, readCachedValue, readOrComputeValue, registerSelector, setAtomOrSelector, setEpochNumberOfAction, setEpochNumberOfContinuity, setIntoStore, subscribeToRootAtoms, subscribeToState, subscribeToTimeline, subscribeToTransaction, timeTravel, traceAllSelectorAtoms, traceSelectorAtoms, updateSelectorAtoms, withdraw, withdrawNewFamilyMember };
2226
+ export { FamilyTracker, Future, IMPLICIT, LazyMap, NotFoundError, StatefulSubject, Store, Subject, TRANSACTION_PHASES, Tracker, abortTransaction, actUponStore, addAtomToTimeline, applyTransaction, arbitrary, assignTransactionToContinuity, become, buildTransaction, cacheValue, clearStore, closeOperation, createAtomFamily, createMutableAtom, createMutableAtomFamily, createReadonlySelector, createReadonlySelectorFamily, createRegularAtom, createRegularAtomFamily, createSelectorFamily, createStandaloneAtom, createStandaloneSelector, createTimeline, createTransaction, createWritableSelector, deleteAtom, deleteSelector, deposit, evictCachedValue, findInStore, getContinuityKey, getEnvironmentData, getEpochNumberOfAction, getEpochNumberOfContinuity, getFromStore, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getUpdateToken, ingestAtomUpdate, ingestSelectorUpdate, ingestTransactionUpdate, isAtomDefault, isAtomKey, isChildStore, isDone, isMutable, isReadonlySelectorKey, isRootStore, isSelectorKey, isStateKey, isTransceiver, markAtomAsDefault, markAtomAsNotDefault, markDone, newest, openOperation, readCachedValue, readOrComputeValue, registerSelector, setAtomOrSelector, setEpochNumberOfAction, setEpochNumberOfContinuity, setIntoStore, subscribeToRootAtoms, subscribeToState, subscribeToTimeline, subscribeToTransaction, timeTravel, traceAllSelectorAtoms, traceSelectorAtoms, updateSelectorAtoms, withdraw, withdrawOrCreate };
2281
2227
  //# sourceMappingURL=out.js.map
2282
2228
  //# sourceMappingURL=index.js.map