atom.io 0.14.4 → 0.14.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/data/dist/index.cjs +47 -1416
  2. package/data/dist/index.cjs.map +1 -1
  3. package/data/dist/index.d.cts +16 -317
  4. package/data/dist/index.d.ts +16 -317
  5. package/data/dist/index.js +4 -6
  6. package/data/dist/index.js.map +1 -1
  7. package/dist/chunk-NYTGCPHB.js +261 -0
  8. package/dist/chunk-NYTGCPHB.js.map +1 -0
  9. package/dist/chunk-PZLG2HP3.js +36 -0
  10. package/dist/chunk-PZLG2HP3.js.map +1 -0
  11. package/dist/chunk-XACXFU3B.js +46 -0
  12. package/dist/chunk-XACXFU3B.js.map +1 -0
  13. package/dist/index.cjs +55 -2330
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +21 -269
  16. package/dist/index.d.ts +21 -269
  17. package/dist/index.js +152 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/metafile-cjs.json +1 -1
  20. package/dist/metafile-esm.json +1 -1
  21. package/internal/dist/index.cjs +30 -159
  22. package/internal/dist/index.cjs.map +1 -1
  23. package/internal/dist/index.d.cts +28 -229
  24. package/internal/dist/index.d.ts +28 -229
  25. package/internal/dist/index.js +2027 -1
  26. package/internal/dist/index.js.map +1 -1
  27. package/introspection/dist/index.cjs +45 -1565
  28. package/introspection/dist/index.cjs.map +1 -1
  29. package/introspection/dist/index.d.cts +4 -376
  30. package/introspection/dist/index.d.ts +4 -376
  31. package/introspection/dist/index.js +298 -2
  32. package/introspection/dist/index.js.map +1 -1
  33. package/json/dist/index.cjs +5 -1502
  34. package/json/dist/index.cjs.map +1 -1
  35. package/json/dist/index.d.cts +7 -373
  36. package/json/dist/index.d.ts +7 -373
  37. package/json/dist/index.js +37 -1
  38. package/json/dist/index.js.map +1 -1
  39. package/package.json +1 -1
  40. package/react/dist/index.cjs +14 -1549
  41. package/react/dist/index.cjs.map +1 -1
  42. package/react/dist/index.d.cts +4 -377
  43. package/react/dist/index.d.ts +4 -377
  44. package/react/dist/index.js +62 -2
  45. package/react/dist/index.js.map +1 -1
  46. package/react-devtools/dist/index.cjs +135 -2153
  47. package/react-devtools/dist/index.cjs.map +1 -1
  48. package/react-devtools/dist/index.d.cts +24 -149
  49. package/react-devtools/dist/index.d.ts +24 -149
  50. package/react-devtools/dist/index.js +5 -3
  51. package/react-devtools/dist/index.js.map +1 -1
  52. package/realtime-client/dist/index.cjs +34 -1529
  53. package/realtime-client/dist/index.cjs.map +1 -1
  54. package/realtime-client/dist/index.d.cts +12 -384
  55. package/realtime-client/dist/index.d.ts +12 -384
  56. package/realtime-client/dist/index.js +165 -2
  57. package/realtime-client/dist/index.js.map +1 -1
  58. package/realtime-react/dist/index.cjs +35 -1727
  59. package/realtime-react/dist/index.cjs.map +1 -1
  60. package/realtime-react/dist/index.d.cts +9 -49
  61. package/realtime-react/dist/index.d.ts +9 -49
  62. package/realtime-react/dist/index.js +66 -4
  63. package/realtime-react/dist/index.js.map +1 -1
  64. package/realtime-server/dist/index.cjs +57 -1548
  65. package/realtime-server/dist/index.cjs.map +1 -1
  66. package/realtime-server/dist/index.d.cts +11 -394
  67. package/realtime-server/dist/index.d.ts +11 -394
  68. package/realtime-server/dist/index.js +21 -27
  69. package/realtime-server/dist/index.js.map +1 -1
  70. package/realtime-testing/dist/index.cjs +15 -2376
  71. package/realtime-testing/dist/index.cjs.map +1 -1
  72. package/realtime-testing/dist/index.d.cts +3 -489
  73. package/realtime-testing/dist/index.d.ts +3 -489
  74. package/realtime-testing/dist/index.js +10 -9
  75. package/realtime-testing/dist/index.js.map +1 -1
  76. package/transceivers/set-rtx/dist/index.cjs +9 -31
  77. package/transceivers/set-rtx/dist/index.cjs.map +1 -1
  78. package/transceivers/set-rtx/dist/index.d.cts +3 -29
  79. package/transceivers/set-rtx/dist/index.d.ts +3 -29
  80. package/transceivers/set-rtx/dist/index.js +3 -2
  81. package/transceivers/set-rtx/dist/index.js.map +1 -1
  82. package/dist/chunk-GMN5KH6A.js +0 -309
  83. package/dist/chunk-GMN5KH6A.js.map +0 -1
  84. package/dist/chunk-HQWWV67P.js +0 -62
  85. package/dist/chunk-HQWWV67P.js.map +0 -1
  86. package/dist/chunk-MK4OJD24.js +0 -67
  87. package/dist/chunk-MK4OJD24.js.map +0 -1
  88. package/dist/chunk-N7ADBQJG.js +0 -176
  89. package/dist/chunk-N7ADBQJG.js.map +0 -1
  90. package/dist/chunk-PURABO5G.js +0 -2581
  91. package/dist/chunk-PURABO5G.js.map +0 -1
@@ -1,404 +1,21 @@
1
+ import { Transceiver, Store } from 'atom.io/internal';
1
2
  import * as SocketIO from 'socket.io';
3
+ import * as AtomIO from 'atom.io';
4
+ import { StateToken } from 'atom.io';
5
+ import { Json } from 'atom.io/json';
2
6
 
3
- type JsonInterface<T, J extends Serializable = Serializable> = {
4
- toJson: (t: T) => J;
5
- fromJson: (json: J) => T;
6
- };
7
-
8
- type primitive = boolean | number | string | null;
9
-
10
- type Serializable = primitive | Readonly<{
11
- [key: string]: Serializable;
12
- }> | ReadonlyArray<Serializable>;
13
- type Object$1<Key extends string = string, Value extends Serializable = Serializable> = Record<Key, Value>;
14
-
15
- type AtomFamily<T, K extends Serializable = Serializable> = ((key: K) => AtomToken<T>) & {
16
- key: string;
17
- type: `atom_family`;
18
- subject: Subject<AtomToken<T>>;
19
- mutable?: boolean;
20
- };
21
- type MutableAtomFamily<Core extends Transceiver<any>, SerializableCore extends Serializable, Key extends Serializable> = JsonInterface<Core, SerializableCore> & ((key: Key) => MutableAtomToken<Core, SerializableCore>) & {
22
- key: `${string}`;
23
- type: `atom_family`;
24
- subject: Subject<MutableAtomToken<Core, SerializableCore>>;
25
- mutable: true;
26
- };
27
-
28
- declare const LoggerIconDictionary: {
29
- readonly "\u231B": "Timeline event fully captured";
30
- readonly "\u23E9": "Timeline redo";
31
- readonly "\u23EA": "Timeline undo";
32
- readonly "\u23ED\uFE0F": "Transaction redo";
33
- readonly "\u23EE\uFE0F": "Transaction undo";
34
- readonly "\u23F3": "Timeline event partially captured";
35
- readonly "\u23F9\uFE0F": "Time-travel complete";
36
- readonly "\uD83D\uDC81": "Notice";
37
- readonly "\uD83D\uDD04": "Realtime transaction synchronized";
38
- readonly "\u2705": "Realtime transaction success";
39
- readonly "\u2728": "Computation complete";
40
- readonly "\u274C": "Conflict prevents attempted action";
41
- readonly "\u2B55": "Operation start";
42
- readonly "\uD83D\uDC1E": "Possible bug in AtomIO";
43
- readonly "\uD83D\uDC40": "Subscription added";
44
- readonly "\uD83D\uDC6A": "Family member added";
45
- readonly "\uD83D\uDCC1": "Stow update";
46
- readonly "\uD83D\uDCC3": "Copy mutable";
47
- readonly "\uD83D\uDCD6": "Read state";
48
- readonly "\uD83D\uDCDD": "Write state";
49
- readonly "\uD83D\uDCE2": "Notify subscribers";
50
- readonly "\uD83D\uDD0C": "Register dependency";
51
- readonly "\uD83D\uDD0D": "Discover root";
52
- readonly "\uD83D\uDD25": "Delete state";
53
- readonly "\uD83D\uDD27": "Create mutable atom";
54
- readonly "\uD83D\uDD28": "Create immutable atom";
55
- readonly "\uD83D\uDD34": "Operation complete";
56
- readonly "\uD83D\uDDD1": "Evict cached value";
57
- readonly "\uD83D\uDCA5": "Caught";
58
- readonly "\uD83D\uDE48": "Subscription canceled";
59
- readonly "\uD83D\uDEC4": "Apply transaction";
60
- readonly "\uD83D\uDEE0\uFE0F": "Install atom into store";
61
- readonly "\uD83D\uDEEB": "Begin transaction";
62
- readonly "\uD83D\uDEEC": "Complete transaction";
63
- readonly "\uD83E\uDDEE": "Computing selector";
64
- readonly "\uD83E\uDDF9": "Prepare to evict";
65
- readonly "\uD83E\uDE82": "Abort transaction";
66
- };
67
- type LoggerIcon = keyof typeof LoggerIconDictionary;
68
- declare const LOG_LEVELS: readonly ["info", "warn", "error"];
69
- type LogLevel = (typeof LOG_LEVELS)[number];
70
- type LogFn = (icon: LoggerIcon, tokenType: `atom` | `readonly_selector` | `selector` | `state` | `timeline` | `transaction` | `unknown`, tokenKey: string, message: string, ...rest: unknown[]) => void;
71
- type LogFilter = (...params: Parameters<LogFn>) => boolean;
72
- type Logger = Record<LogLevel, LogFn>;
73
- declare class AtomIOLogger implements Logger {
74
- logLevel: `error` | `info` | `warn` | null;
75
- private readonly filter?;
76
- private readonly logger;
77
- constructor(logLevel: `error` | `info` | `warn` | null, filter?: LogFilter | undefined, logger?: Logger);
78
- error: LogFn;
79
- info: LogFn;
80
- warn: LogFn;
81
- }
82
-
83
- type TransactionToken<_> = {
84
- key: string;
85
- type: `transaction`;
86
- __brand?: _;
87
- };
88
- type TransactionUpdate<ƒ extends ƒn> = {
89
- key: string;
90
- updates: (KeyedStateUpdate<unknown> | TransactionUpdate<ƒn>)[];
91
- params: Parameters<ƒ>;
92
- output: ReturnType<ƒ>;
93
- };
94
-
95
- type SelectorFamily<T, K extends Serializable = Serializable> = ((key: K) => SelectorToken<T>) & {
96
- key: string;
97
- type: `selector_family`;
98
- subject: Subject<SelectorToken<T>>;
99
- };
100
- type ReadonlySelectorFamily<T, K extends Serializable = Serializable> = ((key: K) => ReadonlySelectorToken<T>) & {
101
- key: string;
102
- type: `readonly_selector_family`;
103
- subject: Subject<ReadonlySelectorToken<T>>;
104
- };
105
-
106
- type StateUpdate<T> = {
107
- newValue: T;
108
- oldValue: T;
109
- };
110
- type KeyedStateUpdate<T> = StateUpdate<T> & {
111
- key: string;
112
- family?: FamilyMetadata;
113
- };
114
-
115
- type TimelineToken = {
116
- key: string;
117
- type: `timeline`;
118
- };
119
- type TimelineUpdate = TimelineAtomUpdate | TimelineSelectorUpdate | TimelineTransactionUpdate;
120
-
121
- type ƒn = (...parameters: any[]) => any;
122
- type AtomToken<_> = {
123
- key: string;
124
- type: `atom`;
125
- family?: FamilyMetadata;
126
- __brand?: _;
127
- };
128
- interface MutableAtomToken<T extends Transceiver<any>, J extends Serializable> extends AtomToken<T> {
129
- __asJSON?: J;
130
- __update?: T extends Transceiver<infer Update> ? Update : never;
131
- }
132
- type SelectorToken<_> = {
133
- key: string;
134
- type: `selector`;
135
- family?: FamilyMetadata;
136
- __brand?: _;
137
- };
138
- type StateToken<T> = AtomToken<T> | SelectorToken<T>;
139
- type ReadonlySelectorToken<_> = {
140
- key: string;
141
- type: `readonly_selector`;
142
- family?: FamilyMetadata;
143
- __brand?: _;
144
- };
145
- type FamilyMetadata = {
146
- key: string;
147
- subKey: string;
148
- };
149
-
150
- declare class Subject<T> {
151
- Subscriber: (value: T) => void;
152
- subscribers: Map<string, this[`Subscriber`]>;
153
- subscribe(key: string, subscriber: this[`Subscriber`]): () => void;
154
- private unsubscribe;
155
- next(value: T): void;
156
- }
157
- declare class StatefulSubject<T> extends Subject<T> {
158
- state: T;
159
- constructor(initialState: T);
160
- next(value: T): void;
161
- }
162
-
163
- type Selector<T> = {
164
- key: string;
165
- type: `selector`;
166
- family?: FamilyMetadata;
167
- install: (store: Store) => void;
168
- subject: Subject<{
169
- newValue: T;
170
- oldValue: T;
171
- }>;
172
- get: () => T;
173
- set: (newValue: T | ((oldValue: T) => T)) => void;
174
- };
175
- type ReadonlySelector<T> = {
176
- key: string;
177
- type: `readonly_selector`;
178
- family?: FamilyMetadata;
179
- install: (store: Store) => void;
180
- subject: Subject<{
181
- newValue: T;
182
- oldValue: T;
183
- }>;
184
- get: () => T;
185
- };
186
-
187
- type Transaction<ƒ extends ƒn> = {
188
- key: string;
189
- type: `transaction`;
190
- install: (store: Store) => void;
191
- subject: Subject<TransactionUpdate<ƒ>>;
192
- run: (...parameters: Parameters<ƒ>) => ReturnType<ƒ>;
193
- };
194
-
195
- type TransactionMeta<ƒ extends ƒn> = {
196
- phase: `applying` | `building`;
197
- time: number;
198
- update: TransactionUpdate<ƒ>;
199
- };
200
-
201
- type Refinement<Unrefined, Refined extends Unrefined> = (value: Unrefined) => value is Refined;
202
- type Cardinality = `1:1` | `1:n` | `n:n`;
203
-
204
- interface JunctionEntries<Content extends Object$1 | null> extends Object$1 {
205
- readonly relations: [string, string[]][];
206
- readonly contents: [string, Content][];
207
- }
208
- interface JunctionSchema<ASide extends string, BSide extends string> extends Object$1 {
209
- readonly between: [a: ASide, b: BSide];
210
- readonly cardinality: Cardinality;
211
- }
212
- type BaseExternalStoreConfiguration = {
213
- addRelation: (a: string, b: string) => void;
214
- deleteRelation: (a: string, b: string) => void;
215
- replaceRelationsSafely: (a: string, bs: string[]) => void;
216
- replaceRelationsUnsafely: (a: string, bs: string[]) => void;
217
- getRelatedKeys: (key: string) => Set<string> | undefined;
218
- has: (a: string, b?: string) => boolean;
219
- };
220
- type ExternalStoreWithContentConfiguration<Content extends Object$1> = {
221
- getContent: (contentKey: string) => Content | undefined;
222
- setContent: (contentKey: string, content: Content) => void;
223
- deleteContent: (contentKey: string) => void;
224
- };
225
- type Empty<Obj extends object> = {
226
- [Key in keyof Obj]?: undefined;
227
- };
228
- type ExternalStoreConfiguration<Content extends Object$1 | null> = Content extends Object$1 ? BaseExternalStoreConfiguration & ExternalStoreWithContentConfiguration<Content> : BaseExternalStoreConfiguration & Empty<ExternalStoreWithContentConfiguration<Object$1>>;
229
- type JunctionAdvancedConfiguration<Content extends Object$1 | null> = {
230
- externalStore?: ExternalStoreConfiguration<Content>;
231
- isContent?: Refinement<unknown, Content>;
232
- makeContentKey?: (a: string, b: string) => string;
233
- };
234
- type JunctionJSON<ASide extends string, BSide extends string, Content extends Object$1 | null> = JunctionEntries<Content> & JunctionSchema<ASide, BSide>;
235
- declare class Junction<const ASide extends string, const BSide extends string, const Content extends Object$1 | null = null> {
236
- readonly a: ASide;
237
- readonly b: BSide;
238
- readonly cardinality: Cardinality;
239
- readonly relations: Map<string, Set<string>>;
240
- readonly contents: Map<string, Content>;
241
- isContent: Refinement<unknown, Content> | null;
242
- makeContentKey: (a: string, b: string) => string;
243
- getRelatedKeys(key: string): Set<string> | undefined;
244
- protected addRelation(a: string, b: string): void;
245
- protected deleteRelation(a: string, b: string): void;
246
- protected replaceRelationsUnsafely(a: string, bs: string[]): void;
247
- protected replaceRelationsSafely(a: string, bs: string[]): void;
248
- protected getContentInternal(contentKey: string): Content | undefined;
249
- protected setContent(contentKey: string, content: Content): void;
250
- protected deleteContent(contentKey: string): void;
251
- constructor(data: JunctionSchema<ASide, BSide> & Partial<JunctionEntries<Content>>, config?: JunctionAdvancedConfiguration<Content>);
252
- toJSON(): JunctionJSON<ASide, BSide, Content>;
253
- set(a: string, ...rest: Content extends null ? [b: string] : [b: string, content: Content]): this;
254
- set(relation: {
255
- [Key in ASide | BSide]: string;
256
- }, ...rest: Content extends null ? [] | [b?: undefined] : [content: Content]): this;
257
- delete(a: string, b?: string): this;
258
- delete(relation: Record<ASide | BSide, string> | Record<ASide, string> | Record<BSide, string>, b?: undefined): this;
259
- getRelatedKey(key: string): string | undefined;
260
- replaceRelations(a: string, relations: Content extends null ? string[] : Record<string, Content>, config?: {
261
- reckless: boolean;
262
- }): this;
263
- getContent(a: string, b: string): Content | undefined;
264
- getRelationEntries(input: Record<ASide, string> | Record<BSide, string>): [string, Content][];
265
- has(a: string, b?: string): boolean;
266
- }
267
-
268
- interface Lineage {
269
- parent: typeof this | null;
270
- child: typeof this | null;
271
- }
272
-
273
- interface Transceiver<Signal extends Serializable> {
274
- do: (update: Signal) => void;
275
- undo: (update: Signal) => void;
276
- subscribe: (key: string, fn: (update: Signal) => void) => () => void;
277
- cacheUpdateNumber: number;
278
- getUpdateNumber: (update: Signal) => number;
279
- }
280
-
281
- /**
282
- * @internal Give the tracker a transceiver state and a store, and it will
283
- * subscribe to the transceiver's inner value. When the inner value changes,
284
- * the tracker will update its own state to reflect the change.
285
- */
286
- declare class Tracker<Mutable extends Transceiver<any>> {
287
- private Update;
288
- private initializeState;
289
- private unsubscribeFromInnerValue;
290
- private observeCore;
291
- private updateCore;
292
- mutableState: MutableAtomToken<Mutable, Serializable>;
293
- latestUpdateState: AtomToken<typeof this.Update | null>;
294
- constructor(mutableState: MutableAtomToken<Mutable, Serializable>, store: Store);
295
- }
296
-
297
- interface MutableAtom<T> extends Atom<T> {
298
- mutable: true;
299
- }
300
-
301
- type OperationProgress = {
302
- open: false;
303
- } | {
304
- open: true;
305
- done: Set<string>;
306
- prev: Map<string, any>;
307
- time: number;
308
- token: StateToken<any>;
309
- };
310
-
311
- type TimelineAtomUpdate = StateUpdate<unknown> & {
312
- key: string;
313
- type: `atom_update`;
314
- timestamp: number;
315
- family?: FamilyMetadata;
316
- };
317
- type TimelineSelectorUpdate = {
318
- key: string;
319
- type: `selector_update`;
320
- timestamp: number;
321
- atomUpdates: Omit<TimelineAtomUpdate, `timestamp`>[];
322
- };
323
- type TimelineTransactionUpdate = TransactionUpdate<ƒn> & {
324
- key: string;
325
- type: `transaction_update`;
326
- timestamp: number;
327
- };
328
- type Timeline = {
329
- type: `timeline`;
330
- key: string;
331
- at: number;
332
- shouldCapture?: (update: TimelineUpdate, timeline: Timeline) => boolean;
333
- timeTraveling: `into_future` | `into_past` | null;
334
- history: TimelineUpdate[];
335
- selectorTime: number | null;
336
- transactionKey: string | null;
337
- install: (store: Store) => void;
338
- subject: Subject<TimelineAtomUpdate | TimelineSelectorUpdate | TimelineTransactionUpdate | `redo` | `undo`>;
339
- };
340
-
341
- declare class Store implements Lineage {
342
- parent: Store | null;
343
- child: Store | null;
344
- valueMap: Map<string, any>;
345
- atoms: Map<string, Atom<any> | MutableAtom<any>>;
346
- selectors: Map<string, Selector<any>>;
347
- readonlySelectors: Map<string, ReadonlySelector<any>>;
348
- trackers: Map<string, Tracker<Transceiver<any>>>;
349
- families: Map<string, AtomFamily<any, any> | ReadonlySelectorFamily<any, any> | SelectorFamily<any, any>>;
350
- timelines: Map<string, Timeline>;
351
- transactions: Map<string, Transaction<ƒn>>;
352
- atomsThatAreDefault: Set<string>;
353
- timelineAtoms: Junction<"timelineKey", "atomKey", null>;
354
- selectorAtoms: Junction<"selectorKey", "atomKey", null>;
355
- selectorGraph: Junction<"upstreamSelectorKey", "downstreamSelectorKey", {
356
- source: string;
357
- }>;
358
- subject: {
359
- atomCreation: Subject<AtomToken<unknown>>;
360
- selectorCreation: Subject<ReadonlySelectorToken<unknown> | SelectorToken<unknown>>;
361
- transactionCreation: Subject<TransactionToken<ƒn>>;
362
- timelineCreation: Subject<TimelineToken>;
363
- transactionApplying: StatefulSubject<TransactionMeta<ƒn> | null>;
364
- operationStatus: Subject<OperationProgress>;
365
- };
366
- operation: OperationProgress;
367
- transactionMeta: TransactionMeta<ƒn> | null;
368
- config: {
369
- name: string;
370
- };
371
- loggers: AtomIOLogger[];
372
- logger: Logger;
373
- constructor(name: string, store?: Store | null);
374
- }
375
-
376
- type Atom<T> = {
377
- key: string;
378
- type: `atom`;
379
- mutable?: boolean;
380
- family?: FamilyMetadata;
381
- install: (store: Store) => void;
382
- subject: Subject<{
383
- newValue: T;
384
- oldValue: T;
385
- }>;
386
- default: T | (() => T);
387
- cleanup?: () => void;
388
- };
389
-
390
- declare const useExposeSingle: ({ socket, store, }: ServerConfig) => <J extends Serializable>(token: StateToken<J>) => () => void;
7
+ declare const useExposeSingle: ({ socket, store, }: ServerConfig) => <J extends Json.Serializable>(token: AtomIO.StateToken<J>) => () => void;
391
8
 
392
- declare const useExposeFamily: ({ socket, store, }: ServerConfig) => <J extends Serializable>(family: AtomFamily<J, Serializable> | SelectorFamily<J, Serializable>, index: StateToken<Set<string>>) => () => void;
9
+ declare const useExposeFamily: ({ socket, store, }: ServerConfig) => <J extends Json.Serializable>(family: AtomIO.AtomFamily<J, Json.Serializable> | AtomIO.SelectorFamily<J, Json.Serializable>, index: AtomIO.StateToken<Set<string>>) => () => void;
393
10
 
394
- declare const useExposeMutable: ({ socket, store, }: ServerConfig) => <Core extends Transceiver<Serializable>, SerializableCore extends Serializable>(token: MutableAtomToken<Core, SerializableCore>) => () => void;
11
+ declare const useExposeMutable: ({ socket, store, }: ServerConfig) => <Core extends Transceiver<Json.Serializable>, SerializableCore extends Json.Serializable>(token: AtomIO.MutableAtomToken<Core, SerializableCore>) => () => void;
395
12
 
396
- declare const useExposeMutableFamily: ({ socket, store, }: ServerConfig) => <Family extends MutableAtomFamily<Transceiver<Serializable>, Serializable, Serializable>>(family: Family, index: StateToken<Set<string>>) => () => void;
13
+ declare const useExposeMutableFamily: ({ socket, store, }: ServerConfig) => <Family extends AtomIO.MutableAtomFamily<Transceiver<Json.Serializable>, Json.Serializable, Json.Serializable>>(family: Family, index: AtomIO.StateToken<Set<string>>) => () => void;
397
14
 
398
- declare const useReceiveTransaction: ({ socket, store }: ServerConfig) => <ƒ extends ƒn>(tx: TransactionToken<ƒ>) => () => void;
399
- declare function useSyncTransaction({ socket, store, }: ServerConfig): <ƒ extends ƒn>(tx: TransactionToken<ƒ>) => () => void;
15
+ declare const useReceiveTransaction: ({ socket, store }: ServerConfig) => <ƒ extends AtomIO.ƒn>(tx: AtomIO.TransactionToken<ƒ>) => () => void;
16
+ declare function useSyncTransaction({ socket, store, }: ServerConfig): <ƒ extends AtomIO.ƒn>(tx: AtomIO.TransactionToken<ƒ>) => () => void;
400
17
 
401
- declare const useReceiveState: ({ socket, store }: ServerConfig) => <J extends Serializable>(token: StateToken<J>) => () => void;
18
+ declare const useReceiveState: ({ socket, store }: ServerConfig) => <J extends Json.Serializable>(token: StateToken<J>) => () => void;
402
19
 
403
20
  type ServerConfig = {
404
21
  socket: SocketIO.Socket;