atom.io 0.19.3 → 0.20.0

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 (104) 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/eslint-plugin/dist/index.cjs +53 -0
  7. package/eslint-plugin/dist/index.js +52 -0
  8. package/eslint-plugin/src/index.ts +1 -0
  9. package/eslint-plugin/src/rules/explicit-state-types.ts +55 -0
  10. package/eslint-plugin/src/rules/index.ts +1 -0
  11. package/internal/dist/index.cjs +127 -92
  12. package/internal/dist/index.d.ts +13 -9
  13. package/internal/dist/index.js +127 -92
  14. package/internal/src/atom/index.ts +1 -1
  15. package/internal/src/caching.ts +13 -9
  16. package/internal/src/families/create-atom-family.ts +1 -1
  17. package/internal/src/families/find-in-store.ts +2 -2
  18. package/internal/src/families/index.ts +1 -1
  19. package/internal/src/future.ts +52 -15
  20. package/internal/src/index.ts +2 -2
  21. package/internal/src/mutable/create-mutable-atom-family.ts +2 -3
  22. package/internal/src/mutable/create-mutable-atom.ts +3 -3
  23. package/internal/src/mutable/get-update-token.ts +1 -0
  24. package/internal/src/selector/delete-selector.ts +1 -1
  25. package/internal/src/selector/register-selector.ts +1 -1
  26. package/internal/src/store/deposit.ts +1 -1
  27. package/internal/src/store/store.ts +2 -2
  28. package/internal/src/store/withdraw-new-family-member.ts +1 -1
  29. package/internal/src/store/withdraw.ts +2 -3
  30. package/internal/src/subscribe/subscribe-to-state.ts +1 -0
  31. package/internal/src/subscribe/subscribe-to-timeline.ts +1 -0
  32. package/internal/src/subscribe/subscribe-to-transaction.ts +2 -1
  33. package/internal/src/timeline/add-atom-to-timeline.ts +2 -2
  34. package/internal/src/timeline/create-timeline.ts +1 -1
  35. package/internal/src/transaction/act-upon-store.ts +1 -1
  36. package/internal/src/transaction/apply-transaction.ts +1 -1
  37. package/internal/src/transaction/build-transaction.ts +2 -2
  38. package/internal/src/transaction/create-transaction.ts +2 -2
  39. package/internal/src/transaction/index.ts +1 -1
  40. package/internal/src/transaction/is-root-store.ts +1 -1
  41. package/introspection/src/attach-atom-index.ts +1 -1
  42. package/introspection/src/attach-introspection-states.ts +2 -2
  43. package/introspection/src/attach-selector-index.ts +1 -1
  44. package/introspection/src/attach-timeline-family.ts +2 -2
  45. package/introspection/src/attach-timeline-index.ts +1 -1
  46. package/introspection/src/attach-transaction-index.ts +2 -2
  47. package/introspection/src/attach-transaction-logs.ts +2 -2
  48. package/json/dist/index.cjs +35 -33
  49. package/json/dist/index.d.ts +5 -5
  50. package/json/dist/index.js +5 -5
  51. package/json/src/index.ts +2 -3
  52. package/json/src/select-json-family.ts +6 -6
  53. package/json/src/select-json.ts +1 -2
  54. package/package.json +18 -15
  55. package/react/src/use-tl.ts +1 -1
  56. package/react-devtools/dist/index.cjs +99 -99
  57. package/react-devtools/dist/index.css +0 -3
  58. package/react-devtools/dist/index.d.ts +2 -2
  59. package/react-devtools/dist/index.js +77 -77
  60. package/react-devtools/src/AtomIODevtools.tsx +2 -2
  61. package/react-devtools/src/TransactionIndex.tsx +2 -2
  62. package/react-devtools/src/Updates.tsx +1 -1
  63. package/react-devtools/src/devtools.scss +0 -3
  64. package/react-devtools/src/index.ts +1 -1
  65. package/realtime/src/realtime-continuity.ts +1 -1
  66. package/realtime/src/shared-room-store.ts +1 -1
  67. package/realtime-client/dist/index.js +1 -1
  68. package/realtime-client/src/pull-atom-family-member.ts +1 -1
  69. package/realtime-client/src/pull-atom.ts +1 -1
  70. package/realtime-client/src/pull-mutable-atom-family-member.ts +2 -2
  71. package/realtime-client/src/sync-continuity.ts +1 -1
  72. package/realtime-react/dist/index.js +1 -1
  73. package/realtime-react/src/use-realtime-service.ts +1 -0
  74. package/realtime-react/src/use-sync-continuity.ts +2 -1
  75. package/realtime-server/dist/index.cjs +98 -98
  76. package/realtime-server/dist/index.d.ts +17 -18
  77. package/realtime-server/dist/index.js +100 -100
  78. package/realtime-server/src/index.ts +5 -5
  79. package/realtime-server/src/ipc-sockets/parent-socket.ts +3 -3
  80. package/realtime-server/src/realtime-action-receiver.ts +1 -1
  81. package/realtime-server/src/realtime-continuity-synchronizer.ts +2 -3
  82. package/realtime-server/src/realtime-family-provider.ts +1 -1
  83. package/realtime-server/src/realtime-mutable-family-provider.ts +1 -1
  84. package/realtime-server/src/realtime-mutable-provider.ts +2 -2
  85. package/realtime-server/src/realtime-server-stores/realtime-continuity-store.ts +2 -2
  86. package/realtime-server/src/realtime-server-stores/server-room-external-actions.ts +1 -1
  87. package/realtime-server/src/realtime-server-stores/server-room-external-store.ts +1 -0
  88. package/realtime-server/src/realtime-server-stores/server-user-store.ts +3 -2
  89. package/realtime-server/src/realtime-state-provider.ts +1 -1
  90. package/realtime-server/src/realtime-state-synchronizer.ts +1 -1
  91. package/realtime-testing/dist/index.js +2 -2
  92. package/realtime-testing/src/setup-realtime-test.tsx +3 -2
  93. package/src/atom.ts +1 -1
  94. package/src/find-state.ts +1 -1
  95. package/src/index.ts +1 -0
  96. package/src/selector.ts +1 -1
  97. package/src/silo.ts +4 -4
  98. package/src/subscribe.ts +2 -2
  99. package/src/timeline.ts +1 -1
  100. package/src/transaction.ts +3 -3
  101. package/transceivers/set-rtx/src/set-rtx.ts +1 -1
  102. package/dist/{chunk-ATKDGVTV.js → chunk-2AIFLP2B.js} +0 -0
  103. package/dist/{chunk-CC7IF7QF.js → chunk-3V3VWQ7X.js} +6 -6
  104. /package/dist/{chunk-MSCJWACE.js → chunk-SMZRGPN6.js} +0 -0
@@ -1,8 +1,8 @@
1
- import { findRelationsInStore } from '../../dist/chunk-MSCJWACE.js';
1
+ import { findRelationsInStore } from '../../dist/chunk-SMZRGPN6.js';
2
2
  import '../../dist/chunk-FTONNX2R.js';
3
3
  import { __spreadProps, __spreadValues } from '../../dist/chunk-F2X4B4VY.js';
4
4
  import { parseJson, stringifyJson } from 'atom.io/json';
5
- import { getUpdateToken, IMPLICIT, Subject, getFromStore, subscribeToState, findInStore, getJsonToken, isRootStore, subscribeToTransaction, actUponStore, setIntoStore } from 'atom.io/internal';
5
+ import { getUpdateToken, IMPLICIT, Subject, getFromStore, subscribeToState, findInStore, getJsonToken, actUponStore, isRootStore, subscribeToTransaction, setIntoStore } from 'atom.io/internal';
6
6
  import { SetRTX } from 'atom.io/transceivers/set-rtx';
7
7
  import * as AtomIO from 'atom.io';
8
8
  import { selectorFamily, atomFamily, atom } from 'atom.io';
@@ -306,6 +306,31 @@ var ParentSocket = class extends CustomSocket {
306
306
  this.relayServices.push(attachServices);
307
307
  }
308
308
  };
309
+ function realtimeActionReceiver({
310
+ socket,
311
+ store = IMPLICIT.STORE
312
+ }) {
313
+ return function actionReceiver(tx) {
314
+ const fillTransactionRequest = (update) => {
315
+ const performanceKey = `tx-run:${tx.key}:${update.id}`;
316
+ const performanceKeyStart = `${performanceKey}:start`;
317
+ const performanceKeyEnd = `${performanceKey}:end`;
318
+ performance.mark(performanceKeyStart);
319
+ actUponStore(tx, update.id, store)(...update.params);
320
+ performance.mark(performanceKeyEnd);
321
+ const metric = performance.measure(
322
+ performanceKey,
323
+ performanceKeyStart,
324
+ performanceKeyEnd
325
+ );
326
+ store == null ? void 0 : store.logger.info(`\u{1F680}`, `transaction`, tx.key, update.id, metric.duration);
327
+ };
328
+ socket.on(`tx-run:${tx.key}`, fillTransactionRequest);
329
+ return () => {
330
+ socket.off(`tx-run:${tx.key}`, fillTransactionRequest);
331
+ };
332
+ };
333
+ }
309
334
  selectorFamily({
310
335
  key: `perspectiveRedactor`,
311
336
  get: ({ userId, syncGroupKey }) => ({ get, find }) => {
@@ -743,55 +768,6 @@ function realtimeContinuitySynchronizer({
743
768
  };
744
769
  };
745
770
  }
746
- function realtimeStateProvider({
747
- socket,
748
- store = IMPLICIT.STORE
749
- }) {
750
- return function stateProvider(token) {
751
- let unsubscribeFromStateUpdates;
752
- const fillSubRequest = () => {
753
- socket.emit(`serve:${token.key}`, getFromStore(token, store));
754
- unsubscribeFromStateUpdates = subscribeToState(
755
- token,
756
- ({ newValue }) => {
757
- socket.emit(`serve:${token.key}`, newValue);
758
- },
759
- `expose-single:${socket.id}`,
760
- store
761
- );
762
- const fillUnsubRequest = () => {
763
- socket.off(`unsub:${token.key}`, fillUnsubRequest);
764
- if (unsubscribeFromStateUpdates) {
765
- unsubscribeFromStateUpdates();
766
- unsubscribeFromStateUpdates = void 0;
767
- }
768
- };
769
- socket.on(`unsub:${token.key}`, fillUnsubRequest);
770
- };
771
- socket.on(`sub:${token.key}`, fillSubRequest);
772
- return () => {
773
- socket.off(`sub:${token.key}`, fillSubRequest);
774
- if (unsubscribeFromStateUpdates) {
775
- unsubscribeFromStateUpdates();
776
- unsubscribeFromStateUpdates = void 0;
777
- }
778
- };
779
- };
780
- }
781
- function realtimeStateSynchronizer({
782
- socket,
783
- store = IMPLICIT.STORE
784
- }) {
785
- return function stateSynchronizer(token) {
786
- const fillGetRequest = () => {
787
- socket.emit(`value:${token.key}`, getFromStore(token, store));
788
- };
789
- socket.on(`get:${token.key}`, fillGetRequest);
790
- return () => {
791
- socket.off(`get:${token.key}`, fillGetRequest);
792
- };
793
- };
794
- }
795
771
  function realtimeAtomFamilyProvider({
796
772
  socket,
797
773
  store = IMPLICIT.STORE
@@ -838,38 +814,6 @@ function realtimeAtomFamilyProvider({
838
814
  };
839
815
  };
840
816
  }
841
- function realtimeMutableProvider({
842
- socket,
843
- store = IMPLICIT.STORE
844
- }) {
845
- return function mutableProvider(token) {
846
- let unsubscribeFromStateUpdates = null;
847
- const jsonToken = getJsonToken(token);
848
- const trackerToken = getUpdateToken(token);
849
- const fillUnsubRequest = () => {
850
- socket.off(`unsub:${token.key}`, fillUnsubRequest);
851
- unsubscribeFromStateUpdates == null ? void 0 : unsubscribeFromStateUpdates();
852
- unsubscribeFromStateUpdates = null;
853
- };
854
- const fillSubRequest = () => {
855
- socket.emit(`init:${token.key}`, getFromStore(jsonToken, store));
856
- unsubscribeFromStateUpdates = subscribeToState(
857
- trackerToken,
858
- ({ newValue }) => {
859
- socket.emit(`next:${token.key}`, newValue);
860
- },
861
- `expose-single:${socket.id}`,
862
- store
863
- );
864
- socket.on(`unsub:${token.key}`, fillUnsubRequest);
865
- };
866
- socket.on(`sub:${token.key}`, fillSubRequest);
867
- return () => {
868
- socket.off(`sub:${token.key}`, fillSubRequest);
869
- unsubscribeFromStateUpdates == null ? void 0 : unsubscribeFromStateUpdates();
870
- };
871
- };
872
- }
873
817
  function realtimeMutableFamilyProvider({
874
818
  socket,
875
819
  store = IMPLICIT.STORE
@@ -918,6 +862,73 @@ function realtimeMutableFamilyProvider({
918
862
  };
919
863
  };
920
864
  }
865
+ function realtimeMutableProvider({
866
+ socket,
867
+ store = IMPLICIT.STORE
868
+ }) {
869
+ return function mutableProvider(token) {
870
+ let unsubscribeFromStateUpdates = null;
871
+ const jsonToken = getJsonToken(token);
872
+ const trackerToken = getUpdateToken(token);
873
+ const fillUnsubRequest = () => {
874
+ socket.off(`unsub:${token.key}`, fillUnsubRequest);
875
+ unsubscribeFromStateUpdates == null ? void 0 : unsubscribeFromStateUpdates();
876
+ unsubscribeFromStateUpdates = null;
877
+ };
878
+ const fillSubRequest = () => {
879
+ socket.emit(`init:${token.key}`, getFromStore(jsonToken, store));
880
+ unsubscribeFromStateUpdates = subscribeToState(
881
+ trackerToken,
882
+ ({ newValue }) => {
883
+ socket.emit(`next:${token.key}`, newValue);
884
+ },
885
+ `expose-single:${socket.id}`,
886
+ store
887
+ );
888
+ socket.on(`unsub:${token.key}`, fillUnsubRequest);
889
+ };
890
+ socket.on(`sub:${token.key}`, fillSubRequest);
891
+ return () => {
892
+ socket.off(`sub:${token.key}`, fillSubRequest);
893
+ unsubscribeFromStateUpdates == null ? void 0 : unsubscribeFromStateUpdates();
894
+ };
895
+ };
896
+ }
897
+ function realtimeStateProvider({
898
+ socket,
899
+ store = IMPLICIT.STORE
900
+ }) {
901
+ return function stateProvider(token) {
902
+ let unsubscribeFromStateUpdates;
903
+ const fillSubRequest = () => {
904
+ socket.emit(`serve:${token.key}`, getFromStore(token, store));
905
+ unsubscribeFromStateUpdates = subscribeToState(
906
+ token,
907
+ ({ newValue }) => {
908
+ socket.emit(`serve:${token.key}`, newValue);
909
+ },
910
+ `expose-single:${socket.id}`,
911
+ store
912
+ );
913
+ const fillUnsubRequest = () => {
914
+ socket.off(`unsub:${token.key}`, fillUnsubRequest);
915
+ if (unsubscribeFromStateUpdates) {
916
+ unsubscribeFromStateUpdates();
917
+ unsubscribeFromStateUpdates = void 0;
918
+ }
919
+ };
920
+ socket.on(`unsub:${token.key}`, fillUnsubRequest);
921
+ };
922
+ socket.on(`sub:${token.key}`, fillSubRequest);
923
+ return () => {
924
+ socket.off(`sub:${token.key}`, fillSubRequest);
925
+ if (unsubscribeFromStateUpdates) {
926
+ unsubscribeFromStateUpdates();
927
+ unsubscribeFromStateUpdates = void 0;
928
+ }
929
+ };
930
+ };
931
+ }
921
932
  function realtimeStateReceiver({
922
933
  socket,
923
934
  store = IMPLICIT.STORE
@@ -941,28 +952,17 @@ function realtimeStateReceiver({
941
952
  };
942
953
  };
943
954
  }
944
- function realtimeActionReceiver({
955
+ function realtimeStateSynchronizer({
945
956
  socket,
946
957
  store = IMPLICIT.STORE
947
958
  }) {
948
- return function actionReceiver(tx) {
949
- const fillTransactionRequest = (update) => {
950
- const performanceKey = `tx-run:${tx.key}:${update.id}`;
951
- const performanceKeyStart = `${performanceKey}:start`;
952
- const performanceKeyEnd = `${performanceKey}:end`;
953
- performance.mark(performanceKeyStart);
954
- actUponStore(tx, update.id, store)(...update.params);
955
- performance.mark(performanceKeyEnd);
956
- const metric = performance.measure(
957
- performanceKey,
958
- performanceKeyStart,
959
- performanceKeyEnd
960
- );
961
- store == null ? void 0 : store.logger.info(`\u{1F680}`, `transaction`, tx.key, update.id, metric.duration);
959
+ return function stateSynchronizer(token) {
960
+ const fillGetRequest = () => {
961
+ socket.emit(`value:${token.key}`, getFromStore(token, store));
962
962
  };
963
- socket.on(`tx-run:${tx.key}`, fillTransactionRequest);
963
+ socket.on(`get:${token.key}`, fillGetRequest);
964
964
  return () => {
965
- socket.off(`tx-run:${tx.key}`, fillTransactionRequest);
965
+ socket.off(`get:${token.key}`, fillGetRequest);
966
966
  };
967
967
  };
968
968
  }
@@ -2,15 +2,15 @@ import type { Store } from "atom.io/internal"
2
2
  import type { Json } from "atom.io/json"
3
3
 
4
4
  export * from "./ipc-sockets"
5
+ export * from "./realtime-action-receiver"
5
6
  export * from "./realtime-continuity-synchronizer"
6
- export * from "./realtime-server-stores"
7
- export * from "./realtime-state-provider"
8
- export * from "./realtime-state-synchronizer"
9
7
  export * from "./realtime-family-provider"
10
- export * from "./realtime-mutable-provider"
11
8
  export * from "./realtime-mutable-family-provider"
9
+ export * from "./realtime-mutable-provider"
10
+ export * from "./realtime-server-stores"
11
+ export * from "./realtime-state-provider"
12
12
  export * from "./realtime-state-receiver"
13
- export * from "./realtime-action-receiver"
13
+ export * from "./realtime-state-synchronizer"
14
14
  // export * from "./realtime-action-synchronizer.txt"
15
15
 
16
16
  export type Socket = {
@@ -1,10 +1,10 @@
1
1
  import { IMPLICIT, Subject } from "atom.io/internal"
2
- import { parseJson, stringifyJson } from "atom.io/json"
3
2
  import type { Json } from "atom.io/json"
4
-
3
+ import { parseJson, stringifyJson } from "atom.io/json"
5
4
  import { SetRTX } from "atom.io/transceivers/set-rtx"
6
- import { CustomSocket } from "./custom-socket"
5
+
7
6
  import type { EventBuffer, Events } from "./custom-socket"
7
+ import { CustomSocket } from "./custom-socket"
8
8
 
9
9
  export class SubjectSocket<
10
10
  I extends Events,
@@ -1,5 +1,5 @@
1
1
  import type * as AtomIO from "atom.io"
2
- import { IMPLICIT, actUponStore } from "atom.io/internal"
2
+ import { actUponStore, IMPLICIT } from "atom.io/internal"
3
3
  import type { JsonIO } from "atom.io/json"
4
4
 
5
5
  import type { ServerConfig } from "."
@@ -1,10 +1,10 @@
1
1
  import type * as AtomIO from "atom.io"
2
2
  import {
3
- IMPLICIT,
4
3
  actUponStore,
5
4
  findInStore,
6
5
  getFromStore,
7
6
  getJsonToken,
7
+ IMPLICIT,
8
8
  isRootStore,
9
9
  subscribeToState,
10
10
  subscribeToTransaction,
@@ -12,10 +12,9 @@ import {
12
12
  import type { Json, JsonIO } from "atom.io/json"
13
13
  import type { ContinuityToken } from "atom.io/realtime"
14
14
 
15
+ import { findRelationsInStore } from "../../data/src/join"
15
16
  import type { ServerConfig, Socket } from "."
16
17
  import { socketAtoms, usersOfSockets } from "."
17
-
18
- import { findRelationsInStore } from "../../data/src/join"
19
18
  import {
20
19
  redactTransactionUpdateContent,
21
20
  userUnacknowledgedQueues,
@@ -1,8 +1,8 @@
1
1
  import type * as AtomIO from "atom.io"
2
2
  import {
3
- IMPLICIT,
4
3
  findInStore,
5
4
  getFromStore,
5
+ IMPLICIT,
6
6
  subscribeToState,
7
7
  } from "atom.io/internal"
8
8
  import { type Json, stringifyJson } from "atom.io/json"
@@ -1,11 +1,11 @@
1
1
  import type * as AtomIO from "atom.io"
2
2
  import type { Transceiver } from "atom.io/internal"
3
3
  import {
4
- IMPLICIT,
5
4
  findInStore,
6
5
  getFromStore,
7
6
  getJsonToken,
8
7
  getUpdateToken,
8
+ IMPLICIT,
9
9
  subscribeToState,
10
10
  } from "atom.io/internal"
11
11
  import type { Json } from "atom.io/json"
@@ -1,12 +1,12 @@
1
1
  import type * as AtomIO from "atom.io"
2
+ import type { Transceiver } from "atom.io/internal"
2
3
  import {
3
- IMPLICIT,
4
4
  getFromStore,
5
5
  getJsonToken,
6
6
  getUpdateToken,
7
+ IMPLICIT,
7
8
  subscribeToState,
8
9
  } from "atom.io/internal"
9
- import type { Transceiver } from "atom.io/internal"
10
10
  import type { Json } from "atom.io/json"
11
11
 
12
12
  import type { ServerConfig } from "."
@@ -1,6 +1,6 @@
1
- import { selectorFamily } from "atom.io"
2
1
  import type { TransactionUpdate } from "atom.io"
3
- import { IMPLICIT, getJsonToken, getUpdateToken } from "atom.io/internal"
2
+ import { selectorFamily } from "atom.io"
3
+ import { getJsonToken, getUpdateToken, IMPLICIT } from "atom.io/internal"
4
4
  import type { JsonIO } from "atom.io/json"
5
5
  import { SyncGroup } from "atom.io/realtime"
6
6
  // import { completeUpdateAtoms } from "atom.io/realtime-server"
@@ -1,5 +1,5 @@
1
1
  import * as AtomIO from "atom.io"
2
- import { type Loadable, editRelations, editRelationsInStore } from "atom.io/data"
2
+ import { editRelations, editRelationsInStore, type Loadable } from "atom.io/data"
3
3
  import type { UserInRoomMeta } from "atom.io/realtime"
4
4
  import { roomIndex, usersInRooms } from "atom.io/realtime"
5
5
 
@@ -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,6 @@
1
1
  import { atom, atomFamily } from "atom.io"
2
2
  import { join } from "atom.io/data"
3
+ import type { SetRTXJson } from "atom.io/transceivers/set-rtx"
3
4
  import { SetRTX } from "atom.io/transceivers/set-rtx"
4
5
 
5
6
  import type { Socket } from ".."
@@ -9,14 +10,14 @@ export const socketAtoms = atomFamily<Socket | null, string>({
9
10
  default: null,
10
11
  })
11
12
 
12
- export const socketIndex = atom({
13
+ export const socketIndex = atom<SetRTX<string>, SetRTXJson<string>>({
13
14
  key: `socketsIndex`,
14
15
  mutable: true,
15
16
  default: () => new SetRTX<string>(),
16
17
  toJson: (set) => set.toJSON(),
17
18
  fromJson: (json) => SetRTX.fromJSON(json),
18
19
  })
19
- export const userIndex = atom({
20
+ export const userIndex = atom<SetRTX<string>, SetRTXJson<string>>({
20
21
  key: `usersIndex`,
21
22
  mutable: true,
22
23
  default: () => new SetRTX<string>(),
@@ -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/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