atom.io 0.19.1 → 0.19.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 (97) hide show
  1. package/data/dist/index.cjs +99 -79
  2. package/data/dist/index.js +2 -2
  3. package/data/src/join.ts +67 -50
  4. package/dist/{chunk-YDOGCZ53.js → chunk-ATKDGVTV.js} +29 -29
  5. package/dist/{chunk-7VCCW45K.js → chunk-CC7IF7QF.js} +4 -3
  6. package/dist/{chunk-WX2NCOZR.js → chunk-FTONNX2R.js} +8 -8
  7. package/dist/{chunk-7ZR244C2.js → chunk-MSCJWACE.js} +92 -72
  8. package/dist/index.cjs +14 -7
  9. package/dist/index.d.ts +23 -35
  10. package/dist/index.js +14 -7
  11. package/internal/dist/index.cjs +55 -43
  12. package/internal/dist/index.d.ts +20 -20
  13. package/internal/dist/index.js +48 -36
  14. package/internal/src/atom/create-regular-atom.ts +7 -5
  15. package/internal/src/atom/delete-atom.ts +2 -2
  16. package/internal/src/families/create-readonly-selector-family.ts +2 -2
  17. package/internal/src/families/create-regular-atom-family.ts +1 -1
  18. package/internal/src/families/create-writable-selector-family.ts +1 -1
  19. package/internal/src/future.ts +4 -2
  20. package/internal/src/lineage.ts +1 -0
  21. package/internal/src/mutable/create-mutable-atom-family.ts +1 -1
  22. package/internal/src/mutable/create-mutable-atom.ts +7 -5
  23. package/internal/src/mutable/tracker.ts +3 -3
  24. package/internal/src/mutable/transceiver.ts +2 -2
  25. package/internal/src/selector/delete-selector.ts +1 -1
  26. package/internal/src/set-state/copy-mutable-if-needed.ts +1 -1
  27. package/internal/src/store/deposit.ts +5 -5
  28. package/internal/src/store/store.ts +5 -5
  29. package/internal/src/store/withdraw.ts +4 -5
  30. package/internal/src/subject.ts +3 -1
  31. package/internal/src/subscribe/subscribe-to-transaction.ts +4 -4
  32. package/internal/src/timeline/add-atom-to-timeline.ts +13 -8
  33. package/internal/src/timeline/create-timeline.ts +3 -4
  34. package/internal/src/transaction/act-upon-store.ts +5 -5
  35. package/internal/src/transaction/apply-transaction.ts +4 -4
  36. package/internal/src/transaction/build-transaction.ts +9 -6
  37. package/internal/src/transaction/create-transaction.ts +10 -10
  38. package/internal/src/transaction/index.ts +3 -3
  39. package/internal/src/transaction/is-root-store.ts +2 -2
  40. package/introspection/dist/index.d.ts +3 -3
  41. package/introspection/src/attach-introspection-states.ts +3 -3
  42. package/introspection/src/attach-transaction-index.ts +4 -4
  43. package/introspection/src/attach-transaction-logs.ts +8 -4
  44. package/json/dist/index.cjs +6 -2
  45. package/json/dist/index.js +6 -2
  46. package/json/src/select-json-family.ts +3 -2
  47. package/json/src/select-json.ts +3 -1
  48. package/package.json +243 -241
  49. package/react/dist/index.cjs +9 -3
  50. package/react/dist/index.js +9 -3
  51. package/react/src/use-i.ts +3 -1
  52. package/react/src/use-tl.ts +6 -2
  53. package/react-devtools/dist/index.cjs +116 -53
  54. package/react-devtools/dist/index.d.ts +3 -5
  55. package/react-devtools/dist/index.js +113 -51
  56. package/react-devtools/src/AtomIODevtools.tsx +3 -1
  57. package/react-devtools/src/Button.tsx +3 -1
  58. package/react-devtools/src/StateIndex.tsx +6 -2
  59. package/react-devtools/src/TimelineIndex.tsx +6 -2
  60. package/react-devtools/src/TransactionIndex.tsx +3 -3
  61. package/react-devtools/src/Updates.tsx +14 -6
  62. package/realtime/dist/index.cjs +1 -0
  63. package/realtime/dist/index.d.ts +2 -2
  64. package/realtime/dist/index.js +1 -0
  65. package/realtime/src/realtime-continuity.ts +4 -3
  66. package/realtime-client/dist/index.cjs +29 -29
  67. package/realtime-client/dist/index.d.ts +2 -2
  68. package/realtime-client/dist/index.js +1 -1
  69. package/realtime-client/src/server-action.ts +2 -2
  70. package/realtime-client/src/sync-continuity.ts +23 -23
  71. package/realtime-react/dist/index.cjs +29 -29
  72. package/realtime-react/dist/index.d.ts +2 -2
  73. package/realtime-react/dist/index.js +1 -1
  74. package/realtime-react/src/use-server-action.ts +3 -3
  75. package/realtime-server/dist/index.cjs +54 -44
  76. package/realtime-server/dist/index.d.ts +5 -5
  77. package/realtime-server/dist/index.js +34 -24
  78. package/realtime-server/src/ipc-sockets/child-socket.ts +6 -6
  79. package/realtime-server/src/ipc-sockets/custom-socket.ts +4 -8
  80. package/realtime-server/src/ipc-sockets/parent-socket.ts +13 -7
  81. package/realtime-server/src/realtime-action-receiver.ts +7 -5
  82. package/realtime-server/src/realtime-continuity-synchronizer.ts +3 -3
  83. package/realtime-server/src/realtime-state-receiver.ts +3 -1
  84. package/realtime-testing/dist/index.cjs +15 -13
  85. package/realtime-testing/dist/index.js +9 -7
  86. package/realtime-testing/src/setup-realtime-test.tsx +6 -4
  87. package/src/atom.ts +4 -8
  88. package/src/dispose.ts +1 -0
  89. package/src/index.ts +2 -9
  90. package/src/selector.ts +4 -8
  91. package/src/silo.ts +9 -3
  92. package/src/subscribe.ts +6 -6
  93. package/src/timeline.ts +4 -4
  94. package/src/transaction.ts +24 -24
  95. package/transceivers/set-rtx/dist/index.cjs +11 -12
  96. package/transceivers/set-rtx/dist/index.js +11 -12
  97. package/transceivers/set-rtx/src/set-rtx.ts +10 -10
@@ -190,16 +190,16 @@ var Junction = class {
190
190
  if (a === void 0 && typeof b === `string`) {
191
191
  const bRelations = this.getRelatedKeys(b);
192
192
  if (bRelations) {
193
- for (const a2 of bRelations) {
194
- this.delete(a2, b);
193
+ for (const bRelation of bRelations) {
194
+ this.delete(bRelation, b);
195
195
  }
196
196
  }
197
197
  }
198
198
  if (typeof a === `string` && b === void 0) {
199
199
  const aRelations = this.getRelatedKeys(a);
200
200
  if (aRelations) {
201
- for (const b2 of aRelations) {
202
- this.delete(a, b2);
201
+ for (const aRelation of aRelations) {
202
+ this.delete(a, aRelation);
203
203
  }
204
204
  }
205
205
  }
@@ -252,18 +252,18 @@ var Junction = class {
252
252
  if (a !== void 0 && b === void 0) {
253
253
  const aRelations = this.getRelatedKeys(a);
254
254
  if (aRelations) {
255
- return [...aRelations].map((b2) => {
255
+ return [...aRelations].map((aRelation) => {
256
256
  var _a;
257
- return [b2, (_a = this.getContent(a, b2)) != null ? _a : null];
257
+ return [aRelation, (_a = this.getContent(a, aRelation)) != null ? _a : null];
258
258
  });
259
259
  }
260
260
  }
261
261
  if (a === void 0 && b !== void 0) {
262
262
  const bRelations = this.getRelatedKeys(b);
263
263
  if (bRelations) {
264
- return [...bRelations].map((a2) => {
264
+ return [...bRelations].map((bRelation) => {
265
265
  var _a;
266
- return [a2, (_a = this.getContent(a2, b)) != null ? _a : null];
266
+ return [bRelation, (_a = this.getContent(bRelation, b)) != null ? _a : null];
267
267
  });
268
268
  }
269
269
  }
@@ -308,11 +308,13 @@ var Join = class _Join {
308
308
  this.alternates.set(store.config.name, this);
309
309
  this.transactors = {
310
310
  get: (token) => internal.getFromStore(token, store),
311
- set: (token, value) => internal.setIntoStore(token, value, store),
311
+ set: (token, value) => {
312
+ internal.setIntoStore(token, value, store);
313
+ },
312
314
  find: (token, key) => internal.findInStore(token, key, store)
313
315
  };
314
- const a = options.between[0];
315
- const b = options.between[1];
316
+ const aSide = options.between[0];
317
+ const bSide = options.between[1];
316
318
  const relatedKeysAtoms = internal.createMutableAtomFamily(
317
319
  {
318
320
  key: `${options.key}/relatedKeys`,
@@ -325,23 +327,23 @@ var Join = class _Join {
325
327
  );
326
328
  this.core = { findRelatedKeysState: relatedKeysAtoms };
327
329
  const getRelatedKeys = ({ find, get }, key) => get(find(relatedKeysAtoms, key));
328
- const addRelation = (transactors, a2, b2) => {
330
+ const addRelation = (transactors, a, b) => {
329
331
  const { set, find } = transactors;
330
- const aKeysState = find(relatedKeysAtoms, a2);
331
- const bKeysState = find(relatedKeysAtoms, b2);
332
- set(aKeysState, (aKeys) => aKeys.add(b2));
333
- set(bKeysState, (bKeys) => bKeys.add(a2));
332
+ const aKeysState = find(relatedKeysAtoms, a);
333
+ const bKeysState = find(relatedKeysAtoms, b);
334
+ set(aKeysState, (aKeys) => aKeys.add(b));
335
+ set(bKeysState, (bKeys) => bKeys.add(a));
334
336
  };
335
- const deleteRelation = (transactors, a2, b2) => {
337
+ const deleteRelation = (transactors, a, b) => {
336
338
  const { find, set } = transactors;
337
- const aKeysState = find(relatedKeysAtoms, a2);
338
- const bKeysState = find(relatedKeysAtoms, b2);
339
- set(aKeysState, (aKeys) => (aKeys.delete(b2), aKeys));
340
- set(bKeysState, (bKeys) => (bKeys.delete(a2), bKeys));
339
+ const aKeysState = find(relatedKeysAtoms, a);
340
+ const bKeysState = find(relatedKeysAtoms, b);
341
+ set(aKeysState, (aKeys) => (aKeys.delete(b), aKeys));
342
+ set(bKeysState, (bKeys) => (bKeys.delete(a), bKeys));
341
343
  };
342
- const replaceRelationsSafely = (transactors, a2, newRelationsOfA) => {
344
+ const replaceRelationsSafely = (transactors, a, newRelationsOfA) => {
343
345
  const { find, get, set } = transactors;
344
- const relationsOfAState = find(relatedKeysAtoms, a2);
346
+ const relationsOfAState = find(relatedKeysAtoms, a);
345
347
  const currentRelationsOfA = get(relationsOfAState);
346
348
  for (const currentRelationB of currentRelationsOfA) {
347
349
  const remainsRelated = newRelationsOfA.includes(currentRelationB);
@@ -350,7 +352,7 @@ var Join = class _Join {
350
352
  }
351
353
  const relationsOfBState = find(relatedKeysAtoms, currentRelationB);
352
354
  set(relationsOfBState, (relationsOfB) => {
353
- relationsOfB.delete(a2);
355
+ relationsOfB.delete(a);
354
356
  return relationsOfB;
355
357
  });
356
358
  }
@@ -359,10 +361,10 @@ var Join = class _Join {
359
361
  nextRelationsOfA.clear();
360
362
  for (const newRelationB of newRelationsOfA) {
361
363
  const relationsOfB = getRelatedKeys(transactors, newRelationB);
362
- const newRelationBIsAlreadyRelated = relationsOfB.has(a2);
364
+ const newRelationBIsAlreadyRelated = relationsOfB.has(a);
363
365
  if (this.relations.cardinality === `1:n`) {
364
366
  for (const previousOwner of relationsOfB) {
365
- if (previousOwner === a2) {
367
+ if (previousOwner === a) {
366
368
  continue;
367
369
  }
368
370
  const previousOwnerRelations = getRelatedKeys(
@@ -376,7 +378,7 @@ var Join = class _Join {
376
378
  }
377
379
  }
378
380
  if (!newRelationBIsAlreadyRelated) {
379
- relationsOfB.add(a2);
381
+ relationsOfB.add(a);
380
382
  }
381
383
  nextRelationsOfA.add(newRelationB);
382
384
  }
@@ -385,9 +387,9 @@ var Join = class _Join {
385
387
  return relationsOfA;
386
388
  });
387
389
  };
388
- const replaceRelationsUnsafely = (transactors, a2, newRelationsOfA) => {
390
+ const replaceRelationsUnsafely = (transactors, a, newRelationsOfA) => {
389
391
  const { find, set } = transactors;
390
- const relationsOfAState = find(relatedKeysAtoms, a2);
392
+ const relationsOfAState = find(relatedKeysAtoms, a);
391
393
  set(relationsOfAState, (relationsOfA) => {
392
394
  relationsOfA.transaction((nextRelationsOfA) => {
393
395
  for (const newRelationB of newRelationsOfA) {
@@ -400,23 +402,31 @@ var Join = class _Join {
400
402
  for (const newRelationB of newRelationsOfA) {
401
403
  const newRelationsBState = find(relatedKeysAtoms, newRelationB);
402
404
  set(newRelationsBState, (newRelationsB) => {
403
- newRelationsB.add(a2);
405
+ newRelationsB.add(a);
404
406
  return newRelationsB;
405
407
  });
406
408
  }
407
409
  return true;
408
410
  };
409
- const has = (transactors, a2, b2) => {
410
- const aKeys = getRelatedKeys(transactors, a2);
411
- return b2 ? aKeys.has(b2) : aKeys.size > 0;
411
+ const has = (transactors, a, b) => {
412
+ const aKeys = getRelatedKeys(transactors, a);
413
+ return b ? aKeys.has(b) : aKeys.size > 0;
412
414
  };
413
415
  const baseExternalStoreConfiguration = {
414
416
  getRelatedKeys: (key) => getRelatedKeys(this.transactors, key),
415
- addRelation: (a2, b2) => addRelation(this.transactors, a2, b2),
416
- deleteRelation: (a2, b2) => deleteRelation(this.transactors, a2, b2),
417
- replaceRelationsSafely: (a2, bs) => replaceRelationsSafely(this.transactors, a2, bs),
418
- replaceRelationsUnsafely: (a2, bs) => replaceRelationsUnsafely(this.transactors, a2, bs),
419
- has: (a2, b2) => has(this.transactors, a2, b2)
417
+ addRelation: (a, b) => {
418
+ addRelation(this.transactors, a, b);
419
+ },
420
+ deleteRelation: (a, b) => {
421
+ deleteRelation(this.transactors, a, b);
422
+ },
423
+ replaceRelationsSafely: (a, bs) => {
424
+ replaceRelationsSafely(this.transactors, a, bs);
425
+ },
426
+ replaceRelationsUnsafely: (a, bs) => {
427
+ replaceRelationsUnsafely(this.transactors, a, bs);
428
+ },
429
+ has: (a, b) => has(this.transactors, a, b)
420
430
  };
421
431
  let externalStore;
422
432
  let contentAtoms;
@@ -429,8 +439,12 @@ var Join = class _Join {
429
439
  store
430
440
  );
431
441
  const getContent = ({ find, get }, key) => get(find(contentAtoms, key));
432
- const setContent = ({ find, set }, key, content) => set(find(contentAtoms, key), content);
433
- const deleteContent = ({ find }, key) => atom_io.dispose(find(contentAtoms, key));
442
+ const setContent = ({ find, set }, key, content) => {
443
+ set(find(contentAtoms, key), content);
444
+ };
445
+ const deleteContent = ({ find }, key) => {
446
+ atom_io.dispose(find(contentAtoms, key));
447
+ };
434
448
  const externalStoreWithContentConfiguration = {
435
449
  getContent: (contentKey) => {
436
450
  const content = getContent(this.transactors, contentKey);
@@ -518,8 +532,8 @@ var Join = class _Join {
518
532
  switch (options.cardinality) {
519
533
  case `1:1`: {
520
534
  const findSingleRelatedKeyState = createSingleKeyStateFamily();
521
- const stateKeyA = `${a}KeyOf${capitalize(b)}`;
522
- const stateKeyB = `${b}KeyOf${capitalize(a)}`;
535
+ const stateKeyA = `${aSide}KeyOf${capitalize(bSide)}`;
536
+ const stateKeyB = `${bSide}KeyOf${capitalize(aSide)}`;
523
537
  const baseStates = {
524
538
  [stateKeyA]: findSingleRelatedKeyState,
525
539
  [stateKeyB]: findSingleRelatedKeyState
@@ -527,8 +541,8 @@ var Join = class _Join {
527
541
  let states;
528
542
  if (defaultContent) {
529
543
  const findSingleRelatedEntryState = createSingleEntryStateFamily();
530
- const entriesStateKeyA = `${a}EntryOf${capitalize(b)}`;
531
- const entriesStateKeyB = `${b}EntryOf${capitalize(a)}`;
544
+ const entriesStateKeyA = `${aSide}EntryOf${capitalize(bSide)}`;
545
+ const entriesStateKeyB = `${bSide}EntryOf${capitalize(aSide)}`;
532
546
  const contentStates = {
533
547
  [entriesStateKeyA]: findSingleRelatedEntryState,
534
548
  [entriesStateKeyB]: findSingleRelatedEntryState
@@ -544,8 +558,8 @@ var Join = class _Join {
544
558
  case `1:n`: {
545
559
  const findSingleRelatedKeyState = createSingleKeyStateFamily();
546
560
  const findMultipleRelatedKeysState = getMultipleKeyStateFamily();
547
- const stateKeyA = `${a}KeyOf${capitalize(b)}`;
548
- const stateKeyB = `${b}KeysOf${capitalize(a)}`;
561
+ const stateKeyA = `${aSide}KeyOf${capitalize(bSide)}`;
562
+ const stateKeyB = `${bSide}KeysOf${capitalize(aSide)}`;
549
563
  const baseStates = {
550
564
  [stateKeyA]: findSingleRelatedKeyState,
551
565
  [stateKeyB]: findMultipleRelatedKeysState
@@ -554,8 +568,10 @@ var Join = class _Join {
554
568
  if (defaultContent) {
555
569
  const findSingleRelatedEntryState = createSingleEntryStateFamily();
556
570
  const findMultipleRelatedEntriesState = getMultipleEntryStateFamily();
557
- const entriesStateKeyA = `${a}EntryOf${capitalize(b)}`;
558
- const entriesStateKeyB = `${b}EntriesOf${capitalize(a)}`;
571
+ const entriesStateKeyA = `${aSide}EntryOf${capitalize(bSide)}`;
572
+ const entriesStateKeyB = `${bSide}EntriesOf${capitalize(
573
+ aSide
574
+ )}`;
559
575
  const contentStates = {
560
576
  [entriesStateKeyA]: findSingleRelatedEntryState,
561
577
  [entriesStateKeyB]: findMultipleRelatedEntriesState
@@ -570,8 +586,8 @@ var Join = class _Join {
570
586
  }
571
587
  default: {
572
588
  const findMultipleRelatedKeysState = getMultipleKeyStateFamily();
573
- const stateKeyA = `${a}KeysOf${capitalize(b)}`;
574
- const stateKeyB = `${b}KeysOf${capitalize(a)}`;
589
+ const stateKeyA = `${aSide}KeysOf${capitalize(bSide)}`;
590
+ const stateKeyB = `${bSide}KeysOf${capitalize(aSide)}`;
575
591
  const baseStates = {
576
592
  [stateKeyA]: findMultipleRelatedKeysState,
577
593
  [stateKeyB]: findMultipleRelatedKeysState
@@ -579,8 +595,12 @@ var Join = class _Join {
579
595
  let states;
580
596
  if (defaultContent) {
581
597
  const findMultipleRelatedEntriesState = getMultipleEntryStateFamily();
582
- const entriesStateKeyA = `${a}EntriesOf${capitalize(b)}`;
583
- const entriesStateKeyB = `${b}EntriesOf${capitalize(a)}`;
598
+ const entriesStateKeyA = `${aSide}EntriesOf${capitalize(
599
+ bSide
600
+ )}`;
601
+ const entriesStateKeyB = `${bSide}EntriesOf${capitalize(
602
+ aSide
603
+ )}`;
584
604
  const contentStates = {
585
605
  [entriesStateKeyA]: findMultipleRelatedEntriesState,
586
606
  [entriesStateKeyB]: findMultipleRelatedEntriesState
@@ -618,21 +638,21 @@ function getJoinMap(store) {
618
638
  function getJoin(token, store) {
619
639
  var _a;
620
640
  const joinMap = getJoinMap(store);
621
- let join2 = joinMap.get(token.key);
622
- if (join2 === void 0) {
641
+ let myJoin = joinMap.get(token.key);
642
+ if (myJoin === void 0) {
623
643
  const rootJoinMap = getJoinMap(internal.IMPLICIT.STORE);
624
- join2 = (_a = rootJoinMap.get(token.key)) == null ? void 0 : _a.in(store);
625
- if (join2 === void 0) {
644
+ myJoin = (_a = rootJoinMap.get(token.key)) == null ? void 0 : _a.in(store);
645
+ if (myJoin === void 0) {
626
646
  throw new Error(
627
647
  `Join "${token.key}" not found in store "${store.config.name}"`
628
648
  );
629
649
  }
630
- joinMap.set(token.key, join2);
650
+ joinMap.set(token.key, myJoin);
631
651
  }
632
- return join2;
652
+ return myJoin;
633
653
  }
634
654
  function findRelationsInStore(token, key, store) {
635
- const join2 = getJoin(token, store);
655
+ const myJoin = getJoin(token, store);
636
656
  let relations;
637
657
  switch (token.cardinality) {
638
658
  case `1:1`: {
@@ -640,27 +660,27 @@ function findRelationsInStore(token, key, store) {
640
660
  const keyBA = `${token.b}KeyOf${capitalize(token.a)}`;
641
661
  relations = {
642
662
  get [keyAB]() {
643
- const familyAB = join2.states[keyAB];
663
+ const familyAB = myJoin.states[keyAB];
644
664
  const state = internal.findInStore(familyAB, key, store);
645
665
  return state;
646
666
  },
647
667
  get [keyBA]() {
648
- const familyBA = join2.states[keyBA];
668
+ const familyBA = myJoin.states[keyBA];
649
669
  const state = internal.findInStore(familyBA, key, store);
650
670
  return state;
651
671
  }
652
672
  };
653
673
  const entryAB = `${token.a}EntryOf${capitalize(token.b)}`;
654
- if (entryAB in join2.states) {
674
+ if (entryAB in myJoin.states) {
655
675
  const entryBA = `${token.b}EntryOf${capitalize(token.a)}`;
656
676
  Object.assign(relations, {
657
677
  get [entryAB]() {
658
- const familyAB = join2.states[entryAB];
678
+ const familyAB = myJoin.states[entryAB];
659
679
  const state = internal.findInStore(familyAB, key, store);
660
680
  return state;
661
681
  },
662
682
  get [entryBA]() {
663
- const familyBA = join2.states[entryBA];
683
+ const familyBA = myJoin.states[entryBA];
664
684
  const state = internal.findInStore(familyBA, key, store);
665
685
  return state;
666
686
  }
@@ -673,27 +693,27 @@ function findRelationsInStore(token, key, store) {
673
693
  const keysBA = `${token.b}KeysOf${capitalize(token.a)}`;
674
694
  relations = {
675
695
  get [keyAB]() {
676
- const familyAB = join2.states[keyAB];
696
+ const familyAB = myJoin.states[keyAB];
677
697
  const state = internal.findInStore(familyAB, key, store);
678
698
  return state;
679
699
  },
680
700
  get [keysBA]() {
681
- const familyBA = join2.states[keysBA];
701
+ const familyBA = myJoin.states[keysBA];
682
702
  const state = internal.findInStore(familyBA, key, store);
683
703
  return state;
684
704
  }
685
705
  };
686
706
  const entryAB = `${token.a}EntryOf${capitalize(token.b)}`;
687
- if (entryAB in join2.states) {
707
+ if (entryAB in myJoin.states) {
688
708
  const entriesBA = `${token.b}EntriesOf${capitalize(token.a)}`;
689
709
  Object.assign(relations, {
690
710
  get [entryAB]() {
691
- const familyAB = join2.states[entryAB];
711
+ const familyAB = myJoin.states[entryAB];
692
712
  const state = internal.findInStore(familyAB, key, store);
693
713
  return state;
694
714
  },
695
715
  get [entriesBA]() {
696
- const familyBA = join2.states[entriesBA];
716
+ const familyBA = myJoin.states[entriesBA];
697
717
  const state = internal.findInStore(familyBA, key, store);
698
718
  return state;
699
719
  }
@@ -706,27 +726,27 @@ function findRelationsInStore(token, key, store) {
706
726
  const keysBA = `${token.b}KeysOf${capitalize(token.a)}`;
707
727
  relations = {
708
728
  get [keysAB]() {
709
- const familyAB = join2.states[keysAB];
729
+ const familyAB = myJoin.states[keysAB];
710
730
  const state = internal.findInStore(familyAB, key, store);
711
731
  return state;
712
732
  },
713
733
  get [keysBA]() {
714
- const familyBA = join2.states[keysBA];
734
+ const familyBA = myJoin.states[keysBA];
715
735
  const state = internal.findInStore(familyBA, key, store);
716
736
  return state;
717
737
  }
718
738
  };
719
739
  const entriesAB = `${token.a}EntriesOf${capitalize(token.b)}`;
720
- if (entriesAB in join2.states) {
740
+ if (entriesAB in myJoin.states) {
721
741
  const entriesBA = `${token.b}EntriesOf${capitalize(token.a)}`;
722
742
  Object.assign(relations, {
723
743
  get [entriesAB]() {
724
- const familyAB = join2.states[entriesAB];
744
+ const familyAB = myJoin.states[entriesAB];
725
745
  const state = internal.findInStore(familyAB, key, store);
726
746
  return state;
727
747
  },
728
748
  get [entriesBA]() {
729
- const familyBA = join2.states[entriesBA];
749
+ const familyBA = myJoin.states[entriesBA];
730
750
  const state = internal.findInStore(familyBA, key, store);
731
751
  return state;
732
752
  }
@@ -740,23 +760,23 @@ function findRelations(token, key) {
740
760
  return findRelationsInStore(token, key, internal.IMPLICIT.STORE);
741
761
  }
742
762
  function editRelationsInStore(token, change, store) {
743
- const join2 = getJoin(token, store);
763
+ const myJoin = getJoin(token, store);
744
764
  const target = internal.newest(store);
745
765
  if (internal.isChildStore(target)) {
746
766
  const { transactors } = target.transactionMeta;
747
- join2.transact(transactors, ({ relations }) => {
767
+ myJoin.transact(transactors, ({ relations }) => {
748
768
  change(relations);
749
769
  });
750
770
  } else {
751
- change(join2.relations);
771
+ change(myJoin.relations);
752
772
  }
753
773
  }
754
774
  function editRelations(token, change) {
755
775
  editRelationsInStore(token, change, internal.IMPLICIT.STORE);
756
776
  }
757
777
  function getInternalRelationsFromStore(token, store) {
758
- const join2 = getJoin(token, store);
759
- const family = join2.core.findRelatedKeysState;
778
+ const myJoin = getJoin(token, store);
779
+ const family = myJoin.core.findRelatedKeysState;
760
780
  return family;
761
781
  }
762
782
  function getInternalRelations(token) {
@@ -1,5 +1,5 @@
1
- export { Join, editRelations, editRelationsInStore, findRelations, findRelationsInStore, getInternalRelations, getInternalRelationsFromStore, getJoin, getJoinMap, join } from '../../dist/chunk-7ZR244C2.js';
2
- import '../../dist/chunk-WX2NCOZR.js';
1
+ export { Join, editRelations, editRelationsInStore, findRelations, findRelationsInStore, getInternalRelations, getInternalRelationsFromStore, getJoin, getJoinMap, join } from '../../dist/chunk-MSCJWACE.js';
2
+ import '../../dist/chunk-FTONNX2R.js';
3
3
  import '../../dist/chunk-U2IICNHQ.js';
4
4
  import { createStandaloneSelector, findInStore, IMPLICIT, createRegularAtom, createRegularAtomFamily, createSelectorFamily } from 'atom.io/internal';
5
5