atom.io 0.14.5 → 0.14.7

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.
@@ -1,269 +0,0 @@
1
- import { FamilyMetadata, ƒn, TransactionUpdate, MutableAtomToken, AtomToken, StateToken, TimelineUpdate, StateUpdate, AtomFamily, ReadonlySelectorFamily, SelectorFamily, ReadonlySelectorToken, SelectorToken, TransactionToken, TimelineToken, AtomIOLogger, Logger } from 'atom.io';
2
-
3
- declare class Subject<T> {
4
- Subscriber: (value: T) => void;
5
- subscribers: Map<string, this[`Subscriber`]>;
6
- subscribe(key: string, subscriber: this[`Subscriber`]): () => void;
7
- private unsubscribe;
8
- next(value: T): void;
9
- }
10
- declare class StatefulSubject<T> extends Subject<T> {
11
- state: T;
12
- constructor(initialState: T);
13
- next(value: T): void;
14
- }
15
-
16
- type Selector<T> = {
17
- key: string;
18
- type: `selector`;
19
- family?: FamilyMetadata;
20
- install: (store: Store) => void;
21
- subject: Subject<{
22
- newValue: T;
23
- oldValue: T;
24
- }>;
25
- get: () => T;
26
- set: (newValue: T | ((oldValue: T) => T)) => void;
27
- };
28
- type ReadonlySelector<T> = {
29
- key: string;
30
- type: `readonly_selector`;
31
- family?: FamilyMetadata;
32
- install: (store: Store) => void;
33
- subject: Subject<{
34
- newValue: T;
35
- oldValue: T;
36
- }>;
37
- get: () => T;
38
- };
39
-
40
- type Transaction<ƒ extends ƒn> = {
41
- key: string;
42
- type: `transaction`;
43
- install: (store: Store) => void;
44
- subject: Subject<TransactionUpdate<ƒ>>;
45
- run: (...parameters: Parameters<ƒ>) => ReturnType<ƒ>;
46
- };
47
-
48
- type TransactionMeta<ƒ extends ƒn> = {
49
- phase: `applying` | `building`;
50
- time: number;
51
- update: TransactionUpdate<ƒ>;
52
- };
53
-
54
- type primitive = boolean | number | string | null;
55
-
56
- type Serializable = primitive | Readonly<{
57
- [key: string]: Serializable;
58
- }> | ReadonlyArray<Serializable>;
59
- type Object$1<Key extends string = string, Value extends Serializable = Serializable> = Record<Key, Value>;
60
-
61
- type Refinement<Unrefined, Refined extends Unrefined> = (value: Unrefined) => value is Refined;
62
- type Cardinality = `1:1` | `1:n` | `n:n`;
63
-
64
- interface JunctionEntries<Content extends Object$1 | null> extends Object$1 {
65
- readonly relations: [string, string[]][];
66
- readonly contents: [string, Content][];
67
- }
68
- interface JunctionSchema<ASide extends string, BSide extends string> extends Object$1 {
69
- readonly between: [a: ASide, b: BSide];
70
- readonly cardinality: Cardinality;
71
- }
72
- type BaseExternalStoreConfiguration = {
73
- addRelation: (a: string, b: string) => void;
74
- deleteRelation: (a: string, b: string) => void;
75
- replaceRelationsSafely: (a: string, bs: string[]) => void;
76
- replaceRelationsUnsafely: (a: string, bs: string[]) => void;
77
- getRelatedKeys: (key: string) => Set<string> | undefined;
78
- has: (a: string, b?: string) => boolean;
79
- };
80
- type ExternalStoreWithContentConfiguration<Content extends Object$1> = {
81
- getContent: (contentKey: string) => Content | undefined;
82
- setContent: (contentKey: string, content: Content) => void;
83
- deleteContent: (contentKey: string) => void;
84
- };
85
- type Empty<Obj extends object> = {
86
- [Key in keyof Obj]?: undefined;
87
- };
88
- type ExternalStoreConfiguration<Content extends Object$1 | null> = Content extends Object$1 ? BaseExternalStoreConfiguration & ExternalStoreWithContentConfiguration<Content> : BaseExternalStoreConfiguration & Empty<ExternalStoreWithContentConfiguration<Object$1>>;
89
- type JunctionAdvancedConfiguration<Content extends Object$1 | null> = {
90
- externalStore?: ExternalStoreConfiguration<Content>;
91
- isContent?: Refinement<unknown, Content>;
92
- makeContentKey?: (a: string, b: string) => string;
93
- };
94
- type JunctionJSON<ASide extends string, BSide extends string, Content extends Object$1 | null> = JunctionEntries<Content> & JunctionSchema<ASide, BSide>;
95
- declare class Junction<const ASide extends string, const BSide extends string, const Content extends Object$1 | null = null> {
96
- readonly a: ASide;
97
- readonly b: BSide;
98
- readonly cardinality: Cardinality;
99
- readonly relations: Map<string, Set<string>>;
100
- readonly contents: Map<string, Content>;
101
- isContent: Refinement<unknown, Content> | null;
102
- makeContentKey: (a: string, b: string) => string;
103
- getRelatedKeys(key: string): Set<string> | undefined;
104
- protected addRelation(a: string, b: string): void;
105
- protected deleteRelation(a: string, b: string): void;
106
- protected replaceRelationsUnsafely(a: string, bs: string[]): void;
107
- protected replaceRelationsSafely(a: string, bs: string[]): void;
108
- protected getContentInternal(contentKey: string): Content | undefined;
109
- protected setContent(contentKey: string, content: Content): void;
110
- protected deleteContent(contentKey: string): void;
111
- constructor(data: JunctionSchema<ASide, BSide> & Partial<JunctionEntries<Content>>, config?: JunctionAdvancedConfiguration<Content>);
112
- toJSON(): JunctionJSON<ASide, BSide, Content>;
113
- set(a: string, ...rest: Content extends null ? [b: string] : [b: string, content: Content]): this;
114
- set(relation: {
115
- [Key in ASide | BSide]: string;
116
- }, ...rest: Content extends null ? [] | [b?: undefined] : [content: Content]): this;
117
- delete(a: string, b?: string): this;
118
- delete(relation: Record<ASide | BSide, string> | Record<ASide, string> | Record<BSide, string>, b?: undefined): this;
119
- getRelatedKey(key: string): string | undefined;
120
- replaceRelations(a: string, relations: Content extends null ? string[] : Record<string, Content>, config?: {
121
- reckless: boolean;
122
- }): this;
123
- getContent(a: string, b: string): Content | undefined;
124
- getRelationEntries(input: Record<ASide, string> | Record<BSide, string>): [string, Content][];
125
- has(a: string, b?: string): boolean;
126
- }
127
-
128
- interface Lineage {
129
- parent: typeof this | null;
130
- child: typeof this | null;
131
- }
132
-
133
- interface Transceiver<Signal extends Serializable> {
134
- do: (update: Signal) => void;
135
- undo: (update: Signal) => void;
136
- subscribe: (key: string, fn: (update: Signal) => void) => () => void;
137
- cacheUpdateNumber: number;
138
- getUpdateNumber: (update: Signal) => number;
139
- }
140
-
141
- /**
142
- * @internal Give the tracker a transceiver state and a store, and it will
143
- * subscribe to the transceiver's inner value. When the inner value changes,
144
- * the tracker will update its own state to reflect the change.
145
- */
146
- declare class Tracker<Mutable extends Transceiver<any>> {
147
- private Update;
148
- private initializeState;
149
- private unsubscribeFromInnerValue;
150
- private observeCore;
151
- private updateCore;
152
- mutableState: MutableAtomToken<Mutable, Serializable>;
153
- latestUpdateState: AtomToken<typeof this.Update | null>;
154
- constructor(mutableState: MutableAtomToken<Mutable, Serializable>, store: Store);
155
- }
156
-
157
- interface MutableAtom<T> extends Atom<T> {
158
- mutable: true;
159
- }
160
-
161
- type OperationProgress = {
162
- open: false;
163
- } | {
164
- open: true;
165
- done: Set<string>;
166
- prev: Map<string, any>;
167
- time: number;
168
- token: StateToken<any>;
169
- };
170
-
171
- type TimelineAtomUpdate = StateUpdate<unknown> & {
172
- key: string;
173
- type: `atom_update`;
174
- timestamp: number;
175
- family?: FamilyMetadata;
176
- };
177
- type TimelineSelectorUpdate = {
178
- key: string;
179
- type: `selector_update`;
180
- timestamp: number;
181
- atomUpdates: Omit<TimelineAtomUpdate, `timestamp`>[];
182
- };
183
- type TimelineTransactionUpdate = TransactionUpdate<ƒn> & {
184
- key: string;
185
- type: `transaction_update`;
186
- timestamp: number;
187
- };
188
- type Timeline = {
189
- type: `timeline`;
190
- key: string;
191
- at: number;
192
- shouldCapture?: (update: TimelineUpdate, timeline: Timeline) => boolean;
193
- timeTraveling: `into_future` | `into_past` | null;
194
- history: TimelineUpdate[];
195
- selectorTime: number | null;
196
- transactionKey: string | null;
197
- install: (store: Store) => void;
198
- subject: Subject<TimelineAtomUpdate | TimelineSelectorUpdate | TimelineTransactionUpdate | `redo` | `undo`>;
199
- };
200
-
201
- declare class Store implements Lineage {
202
- parent: Store | null;
203
- child: Store | null;
204
- valueMap: Map<string, any>;
205
- atoms: Map<string, Atom<any> | MutableAtom<any>>;
206
- selectors: Map<string, Selector<any>>;
207
- readonlySelectors: Map<string, ReadonlySelector<any>>;
208
- trackers: Map<string, Tracker<Transceiver<any>>>;
209
- families: Map<string, AtomFamily<any, any> | ReadonlySelectorFamily<any, any> | SelectorFamily<any, any>>;
210
- timelines: Map<string, Timeline>;
211
- transactions: Map<string, Transaction<ƒn>>;
212
- atomsThatAreDefault: Set<string>;
213
- timelineAtoms: Junction<"timelineKey", "atomKey", null>;
214
- selectorAtoms: Junction<"selectorKey", "atomKey", null>;
215
- selectorGraph: Junction<"upstreamSelectorKey", "downstreamSelectorKey", {
216
- source: string;
217
- }>;
218
- subject: {
219
- atomCreation: Subject<AtomToken<unknown>>;
220
- selectorCreation: Subject<ReadonlySelectorToken<unknown> | SelectorToken<unknown>>;
221
- transactionCreation: Subject<TransactionToken<ƒn>>;
222
- timelineCreation: Subject<TimelineToken>;
223
- transactionApplying: StatefulSubject<TransactionMeta<ƒn> | null>;
224
- operationStatus: Subject<OperationProgress>;
225
- };
226
- operation: OperationProgress;
227
- transactionMeta: TransactionMeta<ƒn> | null;
228
- config: {
229
- name: string;
230
- };
231
- loggers: AtomIOLogger[];
232
- logger: Logger;
233
- constructor(name: string, store?: Store | null);
234
- }
235
-
236
- type Atom<T> = {
237
- key: string;
238
- type: `atom`;
239
- mutable?: boolean;
240
- family?: FamilyMetadata;
241
- install: (store: Store) => void;
242
- subject: Subject<{
243
- newValue: T;
244
- oldValue: T;
245
- }>;
246
- default: T | (() => T);
247
- cleanup?: () => void;
248
- };
249
-
250
- type AtomTokenIndex = StateTokenIndex<AtomToken<unknown>>;
251
-
252
- type SelectorTokenIndex = StateTokenIndex<ReadonlySelectorToken<unknown> | SelectorToken<unknown>>;
253
-
254
- declare const attachIntrospectionStates: (store?: Store) => {
255
- atomIndex: ReadonlySelectorToken<AtomTokenIndex>;
256
- selectorIndex: ReadonlySelectorToken<SelectorTokenIndex>;
257
- transactionIndex: ReadonlySelectorToken<TransactionToken<ƒn>[]>;
258
- findTransactionLogState: ReadonlySelectorFamily<TransactionUpdate<ƒn>[]>;
259
- timelineIndex: ReadonlySelectorToken<TimelineToken[]>;
260
- findTimelineState: ReadonlySelectorFamily<Timeline>;
261
- };
262
-
263
- type FamilyNode<Token extends AtomToken<unknown> | ReadonlySelectorToken<unknown> | SelectorToken<unknown>> = {
264
- key: string;
265
- familyMembers: Record<string, Token>;
266
- };
267
- type StateTokenIndex<Token extends AtomToken<unknown> | ReadonlySelectorToken<unknown> | SelectorToken<unknown>> = Record<string, FamilyNode<Token> | Token>;
268
-
269
- export { type FamilyNode, type StateTokenIndex, attachIntrospectionStates };
@@ -1,291 +0,0 @@
1
- import * as AtomIO from 'atom.io';
2
- import { FamilyMetadata, ƒn, TransactionUpdate, MutableAtomToken, AtomToken, StateToken, TimelineUpdate, StateUpdate, AtomFamily, ReadonlySelectorFamily, SelectorFamily, ReadonlySelectorToken, SelectorToken, TransactionToken, TimelineToken, AtomIOLogger, Logger } from 'atom.io';
3
-
4
- type JsonInterface<T, J extends Serializable = Serializable> = {
5
- toJson: (t: T) => J;
6
- fromJson: (json: J) => T;
7
- };
8
- declare const stringSetJsonInterface: JsonInterface<Set<string>, Array<string>>;
9
-
10
- type primitive = boolean | number | string | null;
11
- declare const isString: (input: unknown) => input is string;
12
- declare const isNumber: (input: unknown) => input is number;
13
- declare const isBoolean: (input: unknown) => input is boolean;
14
- declare const isNull: (input: unknown) => input is null;
15
- declare const isPrimitive: (input: unknown) => input is primitive;
16
-
17
- type Serializable = primitive | Readonly<{
18
- [key: string]: Serializable;
19
- }> | ReadonlyArray<Serializable>;
20
- type Object$1<Key extends string = string, Value extends Serializable = Serializable> = Record<Key, Value>;
21
- type Array<Element extends Serializable = Serializable> = ReadonlyArray<Element>;
22
-
23
- type json_Array<Element extends Serializable = Serializable> = Array<Element>;
24
- type json_Serializable = Serializable;
25
- declare namespace json {
26
- export type { json_Array as Array, Object$1 as Object, json_Serializable as Serializable };
27
- }
28
-
29
- declare const parseJson: <S extends Stringified<Serializable>>(str: string | S) => S extends Stringified<infer J extends Serializable> ? J : Serializable;
30
- type Stringified<J extends Serializable> = string & {
31
- __json: J;
32
- };
33
- declare const stringifyJson: <J extends Serializable>(json: J) => Stringified<J>;
34
- type Empty$1 = Record<string, never>;
35
- declare const JSON_TYPE_NAMES: readonly ["array", "boolean", "null", "number", "object", "string"];
36
- type JsonTypeName = (typeof JSON_TYPE_NAMES)[number];
37
- interface JsonTypes extends Record<JsonTypeName, Serializable> {
38
- array: Array;
39
- boolean: boolean;
40
- null: null;
41
- number: number;
42
- object: Object$1;
43
- string: string;
44
- }
45
- declare const JSON_DEFAULTS: JsonTypes;
46
-
47
- declare class Subject<T> {
48
- Subscriber: (value: T) => void;
49
- subscribers: Map<string, this[`Subscriber`]>;
50
- subscribe(key: string, subscriber: this[`Subscriber`]): () => void;
51
- private unsubscribe;
52
- next(value: T): void;
53
- }
54
- declare class StatefulSubject<T> extends Subject<T> {
55
- state: T;
56
- constructor(initialState: T);
57
- next(value: T): void;
58
- }
59
-
60
- type Selector<T> = {
61
- key: string;
62
- type: `selector`;
63
- family?: FamilyMetadata;
64
- install: (store: Store) => void;
65
- subject: Subject<{
66
- newValue: T;
67
- oldValue: T;
68
- }>;
69
- get: () => T;
70
- set: (newValue: T | ((oldValue: T) => T)) => void;
71
- };
72
- type ReadonlySelector<T> = {
73
- key: string;
74
- type: `readonly_selector`;
75
- family?: FamilyMetadata;
76
- install: (store: Store) => void;
77
- subject: Subject<{
78
- newValue: T;
79
- oldValue: T;
80
- }>;
81
- get: () => T;
82
- };
83
-
84
- type Transaction<ƒ extends ƒn> = {
85
- key: string;
86
- type: `transaction`;
87
- install: (store: Store) => void;
88
- subject: Subject<TransactionUpdate<ƒ>>;
89
- run: (...parameters: Parameters<ƒ>) => ReturnType<ƒ>;
90
- };
91
-
92
- type TransactionMeta<ƒ extends ƒn> = {
93
- phase: `applying` | `building`;
94
- time: number;
95
- update: TransactionUpdate<ƒ>;
96
- };
97
-
98
- type Refinement<Unrefined, Refined extends Unrefined> = (value: Unrefined) => value is Refined;
99
- type Cardinality = `1:1` | `1:n` | `n:n`;
100
-
101
- interface JunctionEntries<Content extends Object$1 | null> extends Object$1 {
102
- readonly relations: [string, string[]][];
103
- readonly contents: [string, Content][];
104
- }
105
- interface JunctionSchema<ASide extends string, BSide extends string> extends Object$1 {
106
- readonly between: [a: ASide, b: BSide];
107
- readonly cardinality: Cardinality;
108
- }
109
- type BaseExternalStoreConfiguration = {
110
- addRelation: (a: string, b: string) => void;
111
- deleteRelation: (a: string, b: string) => void;
112
- replaceRelationsSafely: (a: string, bs: string[]) => void;
113
- replaceRelationsUnsafely: (a: string, bs: string[]) => void;
114
- getRelatedKeys: (key: string) => Set<string> | undefined;
115
- has: (a: string, b?: string) => boolean;
116
- };
117
- type ExternalStoreWithContentConfiguration<Content extends Object$1> = {
118
- getContent: (contentKey: string) => Content | undefined;
119
- setContent: (contentKey: string, content: Content) => void;
120
- deleteContent: (contentKey: string) => void;
121
- };
122
- type Empty<Obj extends object> = {
123
- [Key in keyof Obj]?: undefined;
124
- };
125
- type ExternalStoreConfiguration<Content extends Object$1 | null> = Content extends Object$1 ? BaseExternalStoreConfiguration & ExternalStoreWithContentConfiguration<Content> : BaseExternalStoreConfiguration & Empty<ExternalStoreWithContentConfiguration<Object$1>>;
126
- type JunctionAdvancedConfiguration<Content extends Object$1 | null> = {
127
- externalStore?: ExternalStoreConfiguration<Content>;
128
- isContent?: Refinement<unknown, Content>;
129
- makeContentKey?: (a: string, b: string) => string;
130
- };
131
- type JunctionJSON<ASide extends string, BSide extends string, Content extends Object$1 | null> = JunctionEntries<Content> & JunctionSchema<ASide, BSide>;
132
- declare class Junction<const ASide extends string, const BSide extends string, const Content extends Object$1 | null = null> {
133
- readonly a: ASide;
134
- readonly b: BSide;
135
- readonly cardinality: Cardinality;
136
- readonly relations: Map<string, Set<string>>;
137
- readonly contents: Map<string, Content>;
138
- isContent: Refinement<unknown, Content> | null;
139
- makeContentKey: (a: string, b: string) => string;
140
- getRelatedKeys(key: string): Set<string> | undefined;
141
- protected addRelation(a: string, b: string): void;
142
- protected deleteRelation(a: string, b: string): void;
143
- protected replaceRelationsUnsafely(a: string, bs: string[]): void;
144
- protected replaceRelationsSafely(a: string, bs: string[]): void;
145
- protected getContentInternal(contentKey: string): Content | undefined;
146
- protected setContent(contentKey: string, content: Content): void;
147
- protected deleteContent(contentKey: string): void;
148
- constructor(data: JunctionSchema<ASide, BSide> & Partial<JunctionEntries<Content>>, config?: JunctionAdvancedConfiguration<Content>);
149
- toJSON(): JunctionJSON<ASide, BSide, Content>;
150
- set(a: string, ...rest: Content extends null ? [b: string] : [b: string, content: Content]): this;
151
- set(relation: {
152
- [Key in ASide | BSide]: string;
153
- }, ...rest: Content extends null ? [] | [b?: undefined] : [content: Content]): this;
154
- delete(a: string, b?: string): this;
155
- delete(relation: Record<ASide | BSide, string> | Record<ASide, string> | Record<BSide, string>, b?: undefined): this;
156
- getRelatedKey(key: string): string | undefined;
157
- replaceRelations(a: string, relations: Content extends null ? string[] : Record<string, Content>, config?: {
158
- reckless: boolean;
159
- }): this;
160
- getContent(a: string, b: string): Content | undefined;
161
- getRelationEntries(input: Record<ASide, string> | Record<BSide, string>): [string, Content][];
162
- has(a: string, b?: string): boolean;
163
- }
164
-
165
- interface Lineage {
166
- parent: typeof this | null;
167
- child: typeof this | null;
168
- }
169
-
170
- interface Transceiver<Signal extends Serializable> {
171
- do: (update: Signal) => void;
172
- undo: (update: Signal) => void;
173
- subscribe: (key: string, fn: (update: Signal) => void) => () => void;
174
- cacheUpdateNumber: number;
175
- getUpdateNumber: (update: Signal) => number;
176
- }
177
-
178
- /**
179
- * @internal Give the tracker a transceiver state and a store, and it will
180
- * subscribe to the transceiver's inner value. When the inner value changes,
181
- * the tracker will update its own state to reflect the change.
182
- */
183
- declare class Tracker<Mutable extends Transceiver<any>> {
184
- private Update;
185
- private initializeState;
186
- private unsubscribeFromInnerValue;
187
- private observeCore;
188
- private updateCore;
189
- mutableState: MutableAtomToken<Mutable, Serializable>;
190
- latestUpdateState: AtomToken<typeof this.Update | null>;
191
- constructor(mutableState: MutableAtomToken<Mutable, Serializable>, store: Store);
192
- }
193
-
194
- interface MutableAtom<T> extends Atom<T> {
195
- mutable: true;
196
- }
197
-
198
- type OperationProgress = {
199
- open: false;
200
- } | {
201
- open: true;
202
- done: Set<string>;
203
- prev: Map<string, any>;
204
- time: number;
205
- token: StateToken<any>;
206
- };
207
-
208
- type TimelineAtomUpdate = StateUpdate<unknown> & {
209
- key: string;
210
- type: `atom_update`;
211
- timestamp: number;
212
- family?: FamilyMetadata;
213
- };
214
- type TimelineSelectorUpdate = {
215
- key: string;
216
- type: `selector_update`;
217
- timestamp: number;
218
- atomUpdates: Omit<TimelineAtomUpdate, `timestamp`>[];
219
- };
220
- type TimelineTransactionUpdate = TransactionUpdate<ƒn> & {
221
- key: string;
222
- type: `transaction_update`;
223
- timestamp: number;
224
- };
225
- type Timeline = {
226
- type: `timeline`;
227
- key: string;
228
- at: number;
229
- shouldCapture?: (update: TimelineUpdate, timeline: Timeline) => boolean;
230
- timeTraveling: `into_future` | `into_past` | null;
231
- history: TimelineUpdate[];
232
- selectorTime: number | null;
233
- transactionKey: string | null;
234
- install: (store: Store) => void;
235
- subject: Subject<TimelineAtomUpdate | TimelineSelectorUpdate | TimelineTransactionUpdate | `redo` | `undo`>;
236
- };
237
-
238
- declare class Store implements Lineage {
239
- parent: Store | null;
240
- child: Store | null;
241
- valueMap: Map<string, any>;
242
- atoms: Map<string, Atom<any> | MutableAtom<any>>;
243
- selectors: Map<string, Selector<any>>;
244
- readonlySelectors: Map<string, ReadonlySelector<any>>;
245
- trackers: Map<string, Tracker<Transceiver<any>>>;
246
- families: Map<string, AtomFamily<any, any> | ReadonlySelectorFamily<any, any> | SelectorFamily<any, any>>;
247
- timelines: Map<string, Timeline>;
248
- transactions: Map<string, Transaction<ƒn>>;
249
- atomsThatAreDefault: Set<string>;
250
- timelineAtoms: Junction<"timelineKey", "atomKey", null>;
251
- selectorAtoms: Junction<"selectorKey", "atomKey", null>;
252
- selectorGraph: Junction<"upstreamSelectorKey", "downstreamSelectorKey", {
253
- source: string;
254
- }>;
255
- subject: {
256
- atomCreation: Subject<AtomToken<unknown>>;
257
- selectorCreation: Subject<ReadonlySelectorToken<unknown> | SelectorToken<unknown>>;
258
- transactionCreation: Subject<TransactionToken<ƒn>>;
259
- timelineCreation: Subject<TimelineToken>;
260
- transactionApplying: StatefulSubject<TransactionMeta<ƒn> | null>;
261
- operationStatus: Subject<OperationProgress>;
262
- };
263
- operation: OperationProgress;
264
- transactionMeta: TransactionMeta<ƒn> | null;
265
- config: {
266
- name: string;
267
- };
268
- loggers: AtomIOLogger[];
269
- logger: Logger;
270
- constructor(name: string, store?: Store | null);
271
- }
272
-
273
- type Atom<T> = {
274
- key: string;
275
- type: `atom`;
276
- mutable?: boolean;
277
- family?: FamilyMetadata;
278
- install: (store: Store) => void;
279
- subject: Subject<{
280
- newValue: T;
281
- oldValue: T;
282
- }>;
283
- default: T | (() => T);
284
- cleanup?: () => void;
285
- };
286
-
287
- declare const selectJson: <T, J extends Serializable>(atom: AtomIO.AtomToken<T>, transform: JsonInterface<T, J>, store?: Store) => AtomIO.SelectorToken<J>;
288
-
289
- declare const selectJsonFamily: <T, J extends Serializable, K extends Serializable>(atomFamily: AtomIO.AtomFamily<T, K>, transform: JsonInterface<T, J>, store?: Store) => AtomIO.SelectorFamily<J, K>;
290
-
291
- export { type Empty$1 as Empty, JSON_DEFAULTS, JSON_TYPE_NAMES, json as Json, type JsonInterface, type JsonTypeName, type JsonTypes, type Stringified, isBoolean, isNull, isNumber, isPrimitive, isString, parseJson, type primitive, selectJson, selectJsonFamily, stringSetJsonInterface, stringifyJson };