atom.io 0.19.4 → 0.20.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.
Files changed (98) hide show
  1. package/data/dist/index.js +1 -1
  2. package/data/src/dict.ts +1 -1
  3. package/data/src/join.ts +1 -1
  4. package/data/src/struct-family.ts +1 -1
  5. package/data/src/struct.ts +5 -3
  6. package/dist/index.d.ts +1 -0
  7. package/internal/dist/index.cjs +137 -95
  8. package/internal/dist/index.d.ts +13 -9
  9. package/internal/dist/index.js +137 -95
  10. package/internal/src/atom/index.ts +1 -1
  11. package/internal/src/caching.ts +13 -9
  12. package/internal/src/families/create-atom-family.ts +1 -1
  13. package/internal/src/families/find-in-store.ts +2 -2
  14. package/internal/src/families/index.ts +1 -1
  15. package/internal/src/future.ts +52 -15
  16. package/internal/src/index.ts +2 -2
  17. package/internal/src/mutable/create-mutable-atom-family.ts +2 -3
  18. package/internal/src/mutable/create-mutable-atom.ts +3 -3
  19. package/internal/src/mutable/get-update-token.ts +1 -0
  20. package/internal/src/operation.ts +3 -3
  21. package/internal/src/selector/delete-selector.ts +1 -1
  22. package/internal/src/selector/register-selector.ts +1 -1
  23. package/internal/src/set-state/set-into-store.ts +7 -1
  24. package/internal/src/store/deposit.ts +1 -1
  25. package/internal/src/store/store.ts +2 -2
  26. package/internal/src/store/withdraw-new-family-member.ts +1 -1
  27. package/internal/src/store/withdraw.ts +2 -3
  28. package/internal/src/subscribe/subscribe-to-state.ts +1 -0
  29. package/internal/src/subscribe/subscribe-to-timeline.ts +1 -0
  30. package/internal/src/subscribe/subscribe-to-transaction.ts +2 -1
  31. package/internal/src/timeline/add-atom-to-timeline.ts +2 -2
  32. package/internal/src/timeline/create-timeline.ts +1 -1
  33. package/internal/src/transaction/act-upon-store.ts +1 -1
  34. package/internal/src/transaction/apply-transaction.ts +1 -1
  35. package/internal/src/transaction/build-transaction.ts +2 -2
  36. package/internal/src/transaction/create-transaction.ts +2 -2
  37. package/internal/src/transaction/index.ts +1 -1
  38. package/internal/src/transaction/is-root-store.ts +1 -1
  39. package/introspection/src/attach-atom-index.ts +1 -1
  40. package/introspection/src/attach-introspection-states.ts +2 -2
  41. package/introspection/src/attach-selector-index.ts +1 -1
  42. package/introspection/src/attach-timeline-family.ts +2 -2
  43. package/introspection/src/attach-timeline-index.ts +1 -1
  44. package/introspection/src/attach-transaction-index.ts +2 -2
  45. package/introspection/src/attach-transaction-logs.ts +2 -2
  46. package/json/dist/index.cjs +35 -33
  47. package/json/dist/index.d.ts +5 -5
  48. package/json/src/index.ts +2 -3
  49. package/json/src/select-json-family.ts +1 -1
  50. package/json/src/select-json.ts +1 -2
  51. package/package.json +15 -15
  52. package/react/src/use-tl.ts +1 -1
  53. package/react-devtools/dist/index.cjs +99 -99
  54. package/react-devtools/dist/index.d.ts +2 -2
  55. package/react-devtools/dist/index.js +77 -77
  56. package/react-devtools/src/AtomIODevtools.tsx +2 -2
  57. package/react-devtools/src/TransactionIndex.tsx +2 -2
  58. package/react-devtools/src/Updates.tsx +1 -1
  59. package/react-devtools/src/index.ts +1 -1
  60. package/realtime/src/realtime-continuity.ts +1 -1
  61. package/realtime-client/dist/index.js +1 -1
  62. package/realtime-client/src/pull-atom-family-member.ts +1 -1
  63. package/realtime-client/src/pull-atom.ts +1 -1
  64. package/realtime-client/src/pull-mutable-atom-family-member.ts +2 -2
  65. package/realtime-client/src/sync-continuity.ts +1 -1
  66. package/realtime-react/dist/index.js +1 -1
  67. package/realtime-react/src/use-realtime-service.ts +1 -0
  68. package/realtime-react/src/use-sync-continuity.ts +2 -1
  69. package/realtime-server/dist/index.cjs +98 -98
  70. package/realtime-server/dist/index.d.ts +14 -14
  71. package/realtime-server/dist/index.js +100 -100
  72. package/realtime-server/src/index.ts +5 -5
  73. package/realtime-server/src/ipc-sockets/parent-socket.ts +3 -3
  74. package/realtime-server/src/realtime-action-receiver.ts +1 -1
  75. package/realtime-server/src/realtime-continuity-synchronizer.ts +2 -3
  76. package/realtime-server/src/realtime-family-provider.ts +1 -1
  77. package/realtime-server/src/realtime-mutable-family-provider.ts +1 -1
  78. package/realtime-server/src/realtime-mutable-provider.ts +2 -2
  79. package/realtime-server/src/realtime-server-stores/realtime-continuity-store.ts +2 -2
  80. package/realtime-server/src/realtime-server-stores/server-room-external-actions.ts +1 -1
  81. package/realtime-server/src/realtime-server-stores/server-room-external-store.ts +1 -0
  82. package/realtime-server/src/realtime-state-provider.ts +1 -1
  83. package/realtime-server/src/realtime-state-synchronizer.ts +1 -1
  84. package/realtime-testing/dist/index.js +2 -2
  85. package/realtime-testing/src/setup-realtime-test.tsx +3 -2
  86. package/src/atom.ts +1 -1
  87. package/src/find-state.ts +1 -1
  88. package/src/index.ts +1 -0
  89. package/src/logger.ts +1 -0
  90. package/src/selector.ts +1 -1
  91. package/src/silo.ts +4 -4
  92. package/src/subscribe.ts +2 -2
  93. package/src/timeline.ts +1 -1
  94. package/src/transaction.ts +3 -3
  95. package/transceivers/set-rtx/src/set-rtx.ts +1 -1
  96. package/dist/{chunk-ATKDGVTV.js → chunk-2AIFLP2B.js} +0 -0
  97. package/dist/{chunk-CC7IF7QF.js → chunk-3V3VWQ7X.js} +6 -6
  98. /package/dist/{chunk-MSCJWACE.js → chunk-SMZRGPN6.js} +0 -0
@@ -3,6 +3,7 @@ import { spawn } from "node:child_process"
3
3
 
4
4
  import { atomFamily, selectorFamily } from "atom.io"
5
5
  import type { Loadable } from "atom.io/data"
6
+
6
7
  import { ChildSocket } from "../ipc-sockets"
7
8
 
8
9
  export type RoomArguments =
@@ -1,5 +1,5 @@
1
1
  import type * as AtomIO from "atom.io"
2
- import { IMPLICIT, getFromStore, subscribeToState } from "atom.io/internal"
2
+ import { getFromStore, IMPLICIT, subscribeToState } from "atom.io/internal"
3
3
  import type { Json } from "atom.io/json"
4
4
 
5
5
  import type { ServerConfig } from "."
@@ -1,5 +1,5 @@
1
1
  import type * as AtomIO from "atom.io"
2
- import { IMPLICIT, getFromStore } from "atom.io/internal"
2
+ import { getFromStore, IMPLICIT } from "atom.io/internal"
3
3
  import type { Json } from "atom.io/json"
4
4
 
5
5
  import type { ServerConfig } from "."
@@ -1,7 +1,7 @@
1
1
  import { myUsernameState } from '../../dist/chunk-O47EQUM6.js';
2
- import { editRelationsInStore } from '../../dist/chunk-MSCJWACE.js';
2
+ import { editRelationsInStore } from '../../dist/chunk-SMZRGPN6.js';
3
3
  import '../../dist/chunk-FTONNX2R.js';
4
- import { recordToEntries } from '../../dist/chunk-CC7IF7QF.js';
4
+ import { recordToEntries } from '../../dist/chunk-3V3VWQ7X.js';
5
5
  import '../../dist/chunk-BWWVY5O5.js';
6
6
  import { __spreadProps, __spreadValues } from '../../dist/chunk-F2X4B4VY.js';
7
7
  import * as http from 'http';
@@ -1,13 +1,13 @@
1
1
  import * as http from "node:http"
2
2
 
3
- import { prettyDOM, render } from "@testing-library/react"
4
3
  import type { RenderResult } from "@testing-library/react"
4
+ import { prettyDOM, render } from "@testing-library/react"
5
5
  import * as AtomIO from "atom.io"
6
6
  import {
7
- IMPLICIT,
8
7
  clearStore,
9
8
  findInStore,
10
9
  getFromStore,
10
+ IMPLICIT,
11
11
  setIntoStore,
12
12
  } from "atom.io/internal"
13
13
  import * as AR from "atom.io/react"
@@ -21,6 +21,7 @@ import type { Socket as ClientSocket } from "socket.io-client"
21
21
  import { io } from "socket.io-client"
22
22
 
23
23
  import { recordToEntries } from "~/packages/anvl/src/object"
24
+
24
25
  import { editRelationsInStore } from "../../data/src/join"
25
26
  import { myUsernameState } from "../../realtime-client/src/realtime-client-stores"
26
27
 
package/src/atom.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import type { Store, Subject, Transceiver } from "atom.io/internal"
2
2
  import {
3
- IMPLICIT,
4
3
  createAtomFamily,
5
4
  createStandaloneAtom,
5
+ IMPLICIT,
6
6
  } from "atom.io/internal"
7
7
  import type { Json, JsonInterface } from "atom.io/json"
8
8
 
package/src/find-state.ts CHANGED
@@ -13,7 +13,7 @@ import type {
13
13
  WritableToken,
14
14
  } from "atom.io"
15
15
  import type { Transceiver } from "atom.io/internal"
16
- import { IMPLICIT, findInStore } from "atom.io/internal"
16
+ import { findInStore, IMPLICIT } from "atom.io/internal"
17
17
  import type { Json } from "atom.io/json"
18
18
 
19
19
  export function findState<
package/src/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { Transceiver } from "atom.io/internal"
2
2
  import type { Json } from "atom.io/json"
3
+
3
4
  import type { AtomFamily, AtomFamilyToken } from "./atom"
4
5
  import type {
5
6
  SelectorFamily,
package/src/logger.ts CHANGED
@@ -8,6 +8,7 @@ const LoggerIconDictionary = {
8
8
  "⏹️": `Time-travel complete`,
9
9
  "✅": `Realtime transaction success`,
10
10
  "✨": `Computation complete`,
11
+ "❗": `Must wait to proceed with attempted action`,
11
12
  "❌": `Conflict prevents attempted action`,
12
13
  "⭕": `Operation start`,
13
14
  "🐞": `Possible bug in AtomIO`,
package/src/selector.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import type { Store, Subject } from "atom.io/internal"
2
2
  import {
3
- IMPLICIT,
4
3
  createSelectorFamily,
5
4
  createStandaloneSelector,
5
+ IMPLICIT,
6
6
  } from "atom.io/internal"
7
7
  import type { Json } from "atom.io/json"
8
8
 
package/src/silo.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import type { Transceiver } from "atom.io/internal"
2
2
  import {
3
- Store,
4
3
  createAtomFamily,
5
4
  createSelectorFamily,
6
5
  createStandaloneAtom,
@@ -10,23 +9,24 @@ import {
10
9
  findInStore,
11
10
  getFromStore,
12
11
  setIntoStore,
12
+ Store,
13
13
  timeTravel,
14
14
  } from "atom.io/internal"
15
15
  import type { Json } from "atom.io/json"
16
16
 
17
17
  import type {
18
18
  AtomToken,
19
+ findState,
20
+ getState,
19
21
  MutableAtomFamily,
20
22
  MutableAtomFamilyOptions,
21
23
  MutableAtomOptions,
22
24
  MutableAtomToken,
25
+ redo,
23
26
  RegularAtomFamily,
24
27
  RegularAtomFamilyOptions,
25
28
  RegularAtomOptions,
26
29
  RegularAtomToken,
27
- findState,
28
- getState,
29
- redo,
30
30
  setState,
31
31
  timeline,
32
32
  undo,
package/src/subscribe.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { Store } from "atom.io/internal"
2
2
  import {
3
- IMPLICIT,
4
3
  arbitrary,
4
+ IMPLICIT,
5
5
  subscribeToState,
6
6
  subscribeToTimeline,
7
7
  subscribeToTransaction,
@@ -9,13 +9,13 @@ import {
9
9
 
10
10
  import type {
11
11
  FamilyMetadata,
12
+ Func,
12
13
  ReadableToken,
13
14
  TimelineManageable,
14
15
  TimelineToken,
15
16
  TimelineUpdate,
16
17
  TransactionToken,
17
18
  TransactionUpdate,
18
- Func,
19
19
  } from "."
20
20
 
21
21
  export type StateUpdate<T> = { newValue: T; oldValue: T }
package/src/timeline.ts CHANGED
@@ -4,7 +4,7 @@ import type {
4
4
  TimelineSelectorUpdate,
5
5
  TimelineTransactionUpdate,
6
6
  } from "atom.io/internal"
7
- import { IMPLICIT, createTimeline, timeTravel } from "atom.io/internal"
7
+ import { createTimeline, IMPLICIT, timeTravel } from "atom.io/internal"
8
8
 
9
9
  import type { AtomFamilyToken, AtomToken } from "."
10
10
 
@@ -1,17 +1,17 @@
1
1
  import type { EnvironmentData } from "atom.io/internal"
2
2
  import {
3
- IMPLICIT,
4
3
  actUponStore,
5
4
  arbitrary,
6
5
  createTransaction,
6
+ IMPLICIT,
7
7
  } from "atom.io/internal"
8
8
 
9
9
  import type {
10
+ findState,
11
+ Func,
10
12
  KeyedStateUpdate,
11
13
  ReadonlySelectorToken,
12
14
  WritableToken,
13
- findState,
14
- Func,
15
15
  } from "."
16
16
 
17
17
  export type TransactionToken<F extends Func> = {
@@ -1,6 +1,6 @@
1
1
  import type { Lineage, Transceiver, TransceiverMode } from "atom.io/internal"
2
2
  import { Subject } from "atom.io/internal"
3
- import type { Json, Stringified, primitive } from "atom.io/json"
3
+ import type { Json, primitive, Stringified } from "atom.io/json"
4
4
  import { parseJson, stringifyJson } from "atom.io/json"
5
5
 
6
6
  export type SetUpdate =
File without changes
@@ -1,3 +1,9 @@
1
+ // ../anvl/src/array/index.ts
2
+ var isArray = (isType) => (input) => Array.isArray(input) && input.every((item) => isType(item));
3
+ var map = (f) => (a) => a.map(f);
4
+ var every = (f = Boolean) => (a) => a.every(f);
5
+ var allTrue = every((x) => x === true);
6
+
1
7
  // ../anvl/src/function/pipe.ts
2
8
  function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
3
9
  switch (arguments.length) {
@@ -46,12 +52,6 @@ var fallback = (fn, fallbackValue) => {
46
52
  }
47
53
  };
48
54
 
49
- // ../anvl/src/array/index.ts
50
- var isArray = (isType) => (input) => Array.isArray(input) && input.every((item) => isType(item));
51
- var map = (f) => (a) => a.map(f);
52
- var every = (f = Boolean) => (a) => a.every(f);
53
- var allTrue = every((x) => x === true);
54
-
55
55
  // ../anvl/src/nullish/index.ts
56
56
  var isUndefined = (input) => input === void 0;
57
57
  var ifDefined = (validate) => (input) => isUndefined(input) || validate(input);
File without changes