atom.io 0.14.0 → 0.14.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.
- package/data/dist/index.cjs +1473 -52
- package/data/dist/index.cjs.map +1 -1
- package/data/dist/index.d.cts +315 -16
- package/data/dist/index.js +10 -267
- package/data/dist/index.js.map +1 -1
- package/data/package.json +5 -5
- package/data/src/join.ts +3 -3
- package/dist/chunk-5VJ77LZE.js +176 -0
- package/dist/chunk-5VJ77LZE.js.map +1 -0
- package/dist/chunk-CK7GNCU5.js +309 -0
- package/dist/chunk-CK7GNCU5.js.map +1 -0
- package/dist/chunk-KW7RA7IM.js +67 -0
- package/dist/chunk-KW7RA7IM.js.map +1 -0
- package/dist/chunk-LFXB7Y6M.js +68 -0
- package/dist/chunk-LFXB7Y6M.js.map +1 -0
- package/dist/chunk-NYCVSXQB.js +181 -0
- package/dist/chunk-NYCVSXQB.js.map +1 -0
- package/dist/chunk-TE3ZSTQ6.js +2516 -0
- package/dist/chunk-TE3ZSTQ6.js.map +1 -0
- package/dist/index.cjs +2244 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +268 -21
- package/dist/index.js +1 -152
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/internal/dist/index.cjs +208 -79
- package/internal/dist/index.cjs.map +1 -1
- package/internal/dist/index.d.cts +226 -27
- package/internal/dist/index.js +1 -2240
- package/internal/dist/index.js.map +1 -1
- package/internal/package.json +5 -5
- package/introspection/dist/index.cjs +1618 -46
- package/introspection/dist/index.cjs.map +1 -1
- package/introspection/dist/index.d.cts +374 -4
- package/introspection/dist/index.js +2 -316
- package/introspection/dist/index.js.map +1 -1
- package/introspection/package.json +5 -5
- package/json/dist/index.cjs +1560 -8
- package/json/dist/index.cjs.map +1 -1
- package/json/dist/index.d.cts +371 -7
- package/json/dist/index.js +1 -76
- package/json/dist/index.js.map +1 -1
- package/json/package.json +5 -5
- package/package.json +5 -4
- package/react/dist/index.cjs +1604 -14
- package/react/dist/index.cjs.map +1 -1
- package/react/dist/index.d.cts +375 -4
- package/react/dist/index.js +2 -68
- package/react/dist/index.js.map +1 -1
- package/react/package.json +5 -5
- package/react-devtools/dist/index.cjs +2268 -198
- package/react-devtools/dist/index.cjs.map +1 -1
- package/react-devtools/dist/index.css +2 -2
- package/react-devtools/dist/index.d.cts +148 -24
- package/react-devtools/dist/index.js +57 -297
- package/react-devtools/dist/index.js.map +1 -1
- package/react-devtools/package.json +5 -5
- package/realtime-client/dist/index.cjs +1585 -35
- package/realtime-client/dist/index.cjs.map +1 -1
- package/realtime-client/dist/index.d.cts +382 -12
- package/realtime-client/dist/index.js +2 -165
- package/realtime-client/dist/index.js.map +1 -1
- package/realtime-client/package.json +5 -5
- package/realtime-react/dist/index.cjs +1782 -35
- package/realtime-react/dist/index.cjs.map +1 -1
- package/realtime-react/dist/index.d.cts +49 -9
- package/realtime-react/dist/index.js +4 -66
- package/realtime-react/dist/index.js.map +1 -1
- package/realtime-react/package.json +5 -5
- package/realtime-server/dist/index.cjs +1604 -58
- package/realtime-server/dist/index.cjs.map +1 -1
- package/realtime-server/dist/index.d.cts +391 -11
- package/realtime-server/dist/index.js +27 -21
- package/realtime-server/dist/index.js.map +1 -1
- package/realtime-server/package.json +6 -6
- package/realtime-testing/dist/index.cjs +2352 -16
- package/realtime-testing/dist/index.cjs.map +1 -1
- package/realtime-testing/dist/index.d.cts +486 -3
- package/realtime-testing/dist/index.js +10 -31
- package/realtime-testing/dist/index.js.map +1 -1
- package/realtime-testing/package.json +5 -5
- package/transceivers/set-rtx/dist/index.cjs +31 -10
- package/transceivers/set-rtx/dist/index.cjs.map +1 -1
- package/transceivers/set-rtx/dist/index.d.cts +29 -3
- package/transceivers/set-rtx/dist/index.js +2 -3
- package/transceivers/set-rtx/dist/index.js.map +1 -1
- package/transceivers/set-rtx/package.json +6 -6
- package/data/dist/index.d.ts +0 -158
- package/data/dist/metafile-cjs.json +0 -1
- package/data/dist/metafile-esm.json +0 -1
- package/dist/index.d.ts +0 -243
- package/dist/metafile-esm.json +0 -1
- package/internal/dist/index.d.ts +0 -421
- package/internal/dist/metafile-cjs.json +0 -1
- package/internal/dist/metafile-esm.json +0 -1
- package/introspection/dist/index.d.ts +0 -24
- package/introspection/dist/metafile-cjs.json +0 -1
- package/introspection/dist/metafile-esm.json +0 -1
- package/json/dist/index.d.ts +0 -51
- package/json/dist/metafile-cjs.json +0 -1
- package/json/dist/metafile-esm.json +0 -1
- package/react/dist/index.d.ts +0 -23
- package/react/dist/metafile-cjs.json +0 -1
- package/react/dist/metafile-esm.json +0 -1
- package/react-devtools/dist/index.d.ts +0 -341
- package/react-devtools/dist/metafile-cjs.json +0 -1
- package/react-devtools/dist/metafile-esm.json +0 -1
- package/realtime-client/dist/index.d.ts +0 -22
- package/realtime-client/dist/metafile-cjs.json +0 -1
- package/realtime-client/dist/metafile-esm.json +0 -1
- package/realtime-react/dist/index.d.ts +0 -27
- package/realtime-react/dist/metafile-cjs.json +0 -1
- package/realtime-react/dist/metafile-esm.json +0 -1
- package/realtime-server/dist/index.d.ts +0 -25
- package/realtime-server/dist/metafile-cjs.json +0 -1
- package/realtime-server/dist/metafile-esm.json +0 -1
- package/realtime-testing/dist/index.d.ts +0 -49
- package/realtime-testing/dist/metafile-cjs.json +0 -1
- package/realtime-testing/dist/metafile-esm.json +0 -1
- package/transceivers/set-rtx/dist/index.d.ts +0 -40
- package/transceivers/set-rtx/dist/metafile-cjs.json +0 -1
- package/transceivers/set-rtx/dist/metafile-esm.json +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* ../hamr/src/react-data-designer/RelationEditor.module.scss */
|
|
2
2
|
.class {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-flow: row wrap;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
/* src/devtools.scss */
|
|
19
|
+
/* react-devtools/src/devtools.scss */
|
|
20
20
|
main.atom_io_devtools {
|
|
21
21
|
--fg-color: #eee;
|
|
22
22
|
--bg-color: #111;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import * as atom_io 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
|
-
import { Json } from 'atom.io/json';
|
|
4
|
-
|
|
5
1
|
type ClassSignature = abstract new (...args: any) => any;
|
|
6
2
|
|
|
7
3
|
type RefinementStrategy = ClassSignature | Refinement$1<unknown, any>;
|
|
@@ -24,6 +20,141 @@ interface Refinement$1<A, B extends A> {
|
|
|
24
20
|
|
|
25
21
|
type PlainObject = Record<keyof any, unknown>;
|
|
26
22
|
|
|
23
|
+
type primitive = boolean | number | string | null;
|
|
24
|
+
|
|
25
|
+
type Serializable = primitive | Readonly<{
|
|
26
|
+
[key: string]: Serializable;
|
|
27
|
+
}> | ReadonlyArray<Serializable>;
|
|
28
|
+
type Object$1<Key extends string = string, Value extends Serializable = Serializable> = Record<Key, Value>;
|
|
29
|
+
|
|
30
|
+
type AtomFamily<T, K extends Serializable = Serializable> = ((key: K) => AtomToken<T>) & {
|
|
31
|
+
key: string;
|
|
32
|
+
type: `atom_family`;
|
|
33
|
+
subject: Subject<AtomToken<T>>;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
declare const LoggerIconDictionary: {
|
|
37
|
+
readonly "\u231B": "Timeline event fully captured";
|
|
38
|
+
readonly "\u23E9": "Timeline redo";
|
|
39
|
+
readonly "\u23EA": "Timeline undo";
|
|
40
|
+
readonly "\u23ED\uFE0F": "Transaction redo";
|
|
41
|
+
readonly "\u23EE\uFE0F": "Transaction undo";
|
|
42
|
+
readonly "\u23F3": "Timeline event partially captured";
|
|
43
|
+
readonly "\u23F9\uFE0F": "Time-travel complete";
|
|
44
|
+
readonly "\uD83D\uDC81": "Notice";
|
|
45
|
+
readonly "\uD83D\uDD04": "Realtime transaction synchronized";
|
|
46
|
+
readonly "\u2705": "Realtime transaction success";
|
|
47
|
+
readonly "\u2728": "Computation complete";
|
|
48
|
+
readonly "\u274C": "Conflict prevents attempted action";
|
|
49
|
+
readonly "\u2B55": "Operation start";
|
|
50
|
+
readonly "\uD83D\uDC1E": "Possible bug in AtomIO";
|
|
51
|
+
readonly "\uD83D\uDC40": "Subscription added";
|
|
52
|
+
readonly "\uD83D\uDC6A": "Family member added";
|
|
53
|
+
readonly "\uD83D\uDCC1": "Stow update";
|
|
54
|
+
readonly "\uD83D\uDCC3": "Copy mutable";
|
|
55
|
+
readonly "\uD83D\uDCD6": "Read state";
|
|
56
|
+
readonly "\uD83D\uDCDD": "Write state";
|
|
57
|
+
readonly "\uD83D\uDCE2": "Notify subscribers";
|
|
58
|
+
readonly "\uD83D\uDD0C": "Register dependency";
|
|
59
|
+
readonly "\uD83D\uDD0D": "Discover root";
|
|
60
|
+
readonly "\uD83D\uDD25": "Delete state";
|
|
61
|
+
readonly "\uD83D\uDD27": "Create mutable atom";
|
|
62
|
+
readonly "\uD83D\uDD28": "Create immutable atom";
|
|
63
|
+
readonly "\uD83D\uDD34": "Operation complete";
|
|
64
|
+
readonly "\uD83D\uDDD1": "Evict cached value";
|
|
65
|
+
readonly "\uD83D\uDCA5": "Caught";
|
|
66
|
+
readonly "\uD83D\uDE48": "Subscription canceled";
|
|
67
|
+
readonly "\uD83D\uDEC4": "Apply transaction";
|
|
68
|
+
readonly "\uD83D\uDEE0\uFE0F": "Install atom into store";
|
|
69
|
+
readonly "\uD83D\uDEEB": "Begin transaction";
|
|
70
|
+
readonly "\uD83D\uDEEC": "Complete transaction";
|
|
71
|
+
readonly "\uD83E\uDDEE": "Computing selector";
|
|
72
|
+
readonly "\uD83E\uDDF9": "Prepare to evict";
|
|
73
|
+
readonly "\uD83E\uDE82": "Abort transaction";
|
|
74
|
+
};
|
|
75
|
+
type LoggerIcon = keyof typeof LoggerIconDictionary;
|
|
76
|
+
declare const LOG_LEVELS: readonly ["info", "warn", "error"];
|
|
77
|
+
type LogLevel = (typeof LOG_LEVELS)[number];
|
|
78
|
+
type LogFn = (icon: LoggerIcon, tokenType: `atom` | `readonly_selector` | `selector` | `state` | `timeline` | `transaction` | `unknown`, tokenKey: string, message: string, ...rest: unknown[]) => void;
|
|
79
|
+
type LogFilter = (...params: Parameters<LogFn>) => boolean;
|
|
80
|
+
type Logger = Record<LogLevel, LogFn>;
|
|
81
|
+
declare class AtomIOLogger implements Logger {
|
|
82
|
+
logLevel: `error` | `info` | `warn` | null;
|
|
83
|
+
private readonly filter?;
|
|
84
|
+
private readonly logger;
|
|
85
|
+
constructor(logLevel: `error` | `info` | `warn` | null, filter?: LogFilter | undefined, logger?: Logger);
|
|
86
|
+
error: LogFn;
|
|
87
|
+
info: LogFn;
|
|
88
|
+
warn: LogFn;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
type TransactionToken<_> = {
|
|
92
|
+
key: string;
|
|
93
|
+
type: `transaction`;
|
|
94
|
+
__brand?: _;
|
|
95
|
+
};
|
|
96
|
+
type TransactionUpdate<ƒ extends ƒn> = {
|
|
97
|
+
key: string;
|
|
98
|
+
updates: (KeyedStateUpdate<unknown> | TransactionUpdate<ƒn>)[];
|
|
99
|
+
params: Parameters<ƒ>;
|
|
100
|
+
output: ReturnType<ƒ>;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
type SelectorFamily<T, K extends Serializable = Serializable> = ((key: K) => SelectorToken<T>) & {
|
|
104
|
+
key: string;
|
|
105
|
+
type: `selector_family`;
|
|
106
|
+
subject: Subject<SelectorToken<T>>;
|
|
107
|
+
};
|
|
108
|
+
type ReadonlySelectorFamily<T, K extends Serializable = Serializable> = ((key: K) => ReadonlySelectorToken<T>) & {
|
|
109
|
+
key: string;
|
|
110
|
+
type: `readonly_selector_family`;
|
|
111
|
+
subject: Subject<ReadonlySelectorToken<T>>;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
type StateUpdate<T> = {
|
|
115
|
+
newValue: T;
|
|
116
|
+
oldValue: T;
|
|
117
|
+
};
|
|
118
|
+
type KeyedStateUpdate<T> = StateUpdate<T> & {
|
|
119
|
+
key: string;
|
|
120
|
+
family?: FamilyMetadata;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
type TimelineToken = {
|
|
124
|
+
key: string;
|
|
125
|
+
type: `timeline`;
|
|
126
|
+
};
|
|
127
|
+
type TimelineUpdate = TimelineAtomUpdate | TimelineSelectorUpdate | TimelineTransactionUpdate;
|
|
128
|
+
|
|
129
|
+
type ƒn = (...parameters: any[]) => any;
|
|
130
|
+
type AtomToken<_> = {
|
|
131
|
+
key: string;
|
|
132
|
+
type: `atom`;
|
|
133
|
+
family?: FamilyMetadata;
|
|
134
|
+
__brand?: _;
|
|
135
|
+
};
|
|
136
|
+
interface MutableAtomToken<T extends Transceiver<any>, J extends Serializable> extends AtomToken<T> {
|
|
137
|
+
__asJSON?: J;
|
|
138
|
+
__update?: T extends Transceiver<infer Update> ? Update : never;
|
|
139
|
+
}
|
|
140
|
+
type SelectorToken<_> = {
|
|
141
|
+
key: string;
|
|
142
|
+
type: `selector`;
|
|
143
|
+
family?: FamilyMetadata;
|
|
144
|
+
__brand?: _;
|
|
145
|
+
};
|
|
146
|
+
type StateToken<T> = AtomToken<T> | SelectorToken<T>;
|
|
147
|
+
type ReadonlySelectorToken<_> = {
|
|
148
|
+
key: string;
|
|
149
|
+
type: `readonly_selector`;
|
|
150
|
+
family?: FamilyMetadata;
|
|
151
|
+
__brand?: _;
|
|
152
|
+
};
|
|
153
|
+
type FamilyMetadata = {
|
|
154
|
+
key: string;
|
|
155
|
+
subKey: string;
|
|
156
|
+
};
|
|
157
|
+
|
|
27
158
|
declare class Subject<T> {
|
|
28
159
|
Subscriber: (value: T) => void;
|
|
29
160
|
subscribers: Map<string, this[`Subscriber`]>;
|
|
@@ -75,13 +206,6 @@ type TransactionMeta<ƒ extends ƒn> = {
|
|
|
75
206
|
update: TransactionUpdate<ƒ>;
|
|
76
207
|
};
|
|
77
208
|
|
|
78
|
-
type primitive = boolean | number | string | null;
|
|
79
|
-
|
|
80
|
-
type Serializable = primitive | Readonly<{
|
|
81
|
-
[key: string]: Serializable;
|
|
82
|
-
}> | ReadonlyArray<Serializable>;
|
|
83
|
-
type Object$1<Key extends string = string, Value extends Serializable = Serializable> = Record<Key, Value>;
|
|
84
|
-
|
|
85
209
|
type Refinement<Unrefined, Refined extends Unrefined> = (value: Unrefined) => value is Refined;
|
|
86
210
|
type Cardinality = `1:1` | `1:n` | `n:n`;
|
|
87
211
|
|
|
@@ -154,7 +278,7 @@ interface Lineage {
|
|
|
154
278
|
child: typeof this | null;
|
|
155
279
|
}
|
|
156
280
|
|
|
157
|
-
interface Transceiver<Signal extends
|
|
281
|
+
interface Transceiver<Signal extends Serializable> {
|
|
158
282
|
do: (update: Signal) => void;
|
|
159
283
|
undo: (update: Signal) => void;
|
|
160
284
|
subscribe: (key: string, fn: (update: Signal) => void) => () => void;
|
|
@@ -173,9 +297,9 @@ declare class Tracker<Mutable extends Transceiver<any>> {
|
|
|
173
297
|
private unsubscribeFromInnerValue;
|
|
174
298
|
private observeCore;
|
|
175
299
|
private updateCore;
|
|
176
|
-
mutableState: MutableAtomToken<Mutable,
|
|
300
|
+
mutableState: MutableAtomToken<Mutable, Serializable>;
|
|
177
301
|
latestUpdateState: AtomToken<typeof this.Update | null>;
|
|
178
|
-
constructor(mutableState: MutableAtomToken<Mutable,
|
|
302
|
+
constructor(mutableState: MutableAtomToken<Mutable, Serializable>, store: Store);
|
|
179
303
|
}
|
|
180
304
|
|
|
181
305
|
interface MutableAtom<T> extends Atom<T> {
|
|
@@ -307,17 +431,17 @@ declare class Differ<Leaf extends Record<string, any>, Tree extends Record<strin
|
|
|
307
431
|
|
|
308
432
|
declare const AtomIODevtools: () => JSX.Element;
|
|
309
433
|
|
|
310
|
-
declare const atomIndex:
|
|
311
|
-
declare const selectorIndex:
|
|
312
|
-
declare const transactionIndex:
|
|
313
|
-
declare const findTransactionLogState:
|
|
314
|
-
declare const timelineIndex:
|
|
315
|
-
declare const findTimelineState:
|
|
316
|
-
declare const devtoolsAreOpenState:
|
|
434
|
+
declare const atomIndex: ReadonlySelectorToken<AtomTokenIndex>;
|
|
435
|
+
declare const selectorIndex: ReadonlySelectorToken<SelectorTokenIndex>;
|
|
436
|
+
declare const transactionIndex: ReadonlySelectorToken<TransactionToken<ƒn>[]>;
|
|
437
|
+
declare const findTransactionLogState: ReadonlySelectorFamily<TransactionUpdate<ƒn>[]>;
|
|
438
|
+
declare const timelineIndex: ReadonlySelectorToken<TimelineToken[]>;
|
|
439
|
+
declare const findTimelineState: ReadonlySelectorFamily<Timeline>;
|
|
440
|
+
declare const devtoolsAreOpenState: AtomToken<boolean>;
|
|
317
441
|
type DevtoolsView = `atoms` | `selectors` | `timelines` | `transactions`;
|
|
318
|
-
declare const devtoolsViewSelectionState:
|
|
319
|
-
declare const devtoolsViewOptionsState:
|
|
320
|
-
declare const findViewIsOpenState:
|
|
442
|
+
declare const devtoolsViewSelectionState: AtomToken<DevtoolsView>;
|
|
443
|
+
declare const devtoolsViewOptionsState: AtomToken<DevtoolsView[]>;
|
|
444
|
+
declare const findViewIsOpenState: AtomFamily<boolean, string>;
|
|
321
445
|
declare const primitiveRefinery: Refinery<{
|
|
322
446
|
number: (input: unknown) => input is number;
|
|
323
447
|
string: (input: unknown) => input is string;
|