atom.io 0.25.6 → 0.26.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.
- package/data/dist/index.js +33 -25
- package/data/package.json +1 -4
- package/dist/{chunk-HYXKCFVY.js → chunk-IBTHB2PI.js} +59 -60
- package/dist/{chunk-MR5NETHW.js → chunk-IW6WYRS7.js} +4 -5
- package/dist/chunk-XWL6SNVU.js +7 -0
- package/dist/index.js +33 -21
- package/ephemeral/dist/index.js +1 -1
- package/ephemeral/package.json +1 -4
- package/eslint-plugin/dist/index.js +7 -8
- package/eslint-plugin/package.json +1 -4
- package/immortal/dist/index.js +1 -1
- package/immortal/package.json +1 -4
- package/internal/dist/index.js +173 -160
- package/internal/package.json +1 -4
- package/introspection/dist/index.js +32 -30
- package/introspection/package.json +1 -4
- package/json/dist/index.js +1 -1
- package/json/package.json +1 -4
- package/package.json +18 -50
- package/react/dist/index.js +2 -2
- package/react/package.json +1 -4
- package/react-devtools/dist/index.js +75 -68
- package/react-devtools/package.json +1 -4
- package/realtime/dist/index.js +8 -9
- package/realtime/package.json +1 -4
- package/realtime-client/dist/index.js +6 -6
- package/realtime-client/package.json +1 -4
- package/realtime-react/dist/index.js +9 -11
- package/realtime-react/package.json +1 -4
- package/realtime-server/dist/index.js +59 -54
- package/realtime-server/package.json +1 -4
- package/realtime-testing/dist/index.js +3 -3
- package/realtime-testing/package.json +1 -4
- package/transceivers/set-rtx/dist/index.js +11 -11
- package/transceivers/set-rtx/package.json +1 -4
- package/data/dist/index.cjs +0 -953
- package/dist/chunk-S4N6XNPH.js +0 -38
- package/dist/index.cjs +0 -215
- package/ephemeral/dist/index.cjs +0 -11
- package/eslint-plugin/dist/index.cjs +0 -388
- package/immortal/dist/index.cjs +0 -14
- package/internal/dist/index.cjs +0 -3405
- package/introspection/dist/index.cjs +0 -449
- package/json/dist/index.cjs +0 -128
- package/react/dist/index.cjs +0 -118
- package/react-devtools/dist/index.cjs +0 -2191
- package/realtime/dist/index.cjs +0 -120
- package/realtime-client/dist/index.cjs +0 -569
- package/realtime-react/dist/index.cjs +0 -189
- package/realtime-server/dist/index.cjs +0 -965
- package/realtime-testing/dist/index.cjs +0 -201
- package/transceivers/set-rtx/dist/index.cjs +0 -215
package/data/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Junction } from '../../dist/chunk-
|
|
2
|
-
import '../../dist/chunk-
|
|
1
|
+
import { Junction } from '../../dist/chunk-IBTHB2PI.js';
|
|
2
|
+
import '../../dist/chunk-XWL6SNVU.js';
|
|
3
3
|
import { createStandaloneSelector, findInStore, IMPLICIT, getFromStore, setIntoStore, seekInStore, getJsonToken, disposeFromStore, withdraw, growMoleculeInStore, NotFoundError, initFamilyMemberInStore, createMutableAtomFamily, createRegularAtomFamily, createMoleculeFamily, newest, makeMoleculeInStore, isChildStore, createRegularAtom, createSelectorFamily, getJsonFamily } from 'atom.io/internal';
|
|
4
4
|
import { stringifyJson } from 'atom.io/json';
|
|
5
5
|
import { SetRTX } from 'atom.io/transceivers/set-rtx';
|
|
@@ -23,8 +23,37 @@ function capitalize(string) {
|
|
|
23
23
|
return string[0].toUpperCase() + string.slice(1);
|
|
24
24
|
}
|
|
25
25
|
var Join = class _Join {
|
|
26
|
+
options;
|
|
27
|
+
defaultContent;
|
|
28
|
+
toolkit;
|
|
29
|
+
retrieve;
|
|
30
|
+
molecules = /* @__PURE__ */ new Map();
|
|
31
|
+
relations;
|
|
32
|
+
states;
|
|
33
|
+
core;
|
|
34
|
+
transact(toolkit, run) {
|
|
35
|
+
const originalToolkit = this.toolkit;
|
|
36
|
+
this.toolkit = toolkit;
|
|
37
|
+
run(this);
|
|
38
|
+
this.toolkit = originalToolkit;
|
|
39
|
+
}
|
|
40
|
+
store;
|
|
41
|
+
alternates;
|
|
42
|
+
[Symbol.dispose]() {
|
|
43
|
+
this.alternates.delete(this.store.config.name);
|
|
44
|
+
}
|
|
45
|
+
in(store) {
|
|
46
|
+
const key = store.config.name;
|
|
47
|
+
const alternate = this.alternates.get(key);
|
|
48
|
+
if (alternate) {
|
|
49
|
+
return alternate;
|
|
50
|
+
}
|
|
51
|
+
const join2 = new _Join(this.options, this.defaultContent, store);
|
|
52
|
+
this.alternates.set(key, join2);
|
|
53
|
+
join2.alternates = this.alternates;
|
|
54
|
+
return join2;
|
|
55
|
+
}
|
|
26
56
|
constructor(options, defaultContent, store = IMPLICIT.STORE) {
|
|
27
|
-
this.molecules = /* @__PURE__ */ new Map();
|
|
28
57
|
this.store = store;
|
|
29
58
|
this.options = options;
|
|
30
59
|
this.defaultContent = defaultContent;
|
|
@@ -424,26 +453,6 @@ var Join = class _Join {
|
|
|
424
453
|
}
|
|
425
454
|
}
|
|
426
455
|
}
|
|
427
|
-
transact(toolkit, run) {
|
|
428
|
-
const originalToolkit = this.toolkit;
|
|
429
|
-
this.toolkit = toolkit;
|
|
430
|
-
run(this);
|
|
431
|
-
this.toolkit = originalToolkit;
|
|
432
|
-
}
|
|
433
|
-
[Symbol.dispose]() {
|
|
434
|
-
this.alternates.delete(this.store.config.name);
|
|
435
|
-
}
|
|
436
|
-
in(store) {
|
|
437
|
-
const key = store.config.name;
|
|
438
|
-
const alternate = this.alternates.get(key);
|
|
439
|
-
if (alternate) {
|
|
440
|
-
return alternate;
|
|
441
|
-
}
|
|
442
|
-
const join2 = new _Join(this.options, this.defaultContent, store);
|
|
443
|
-
this.alternates.set(key, join2);
|
|
444
|
-
join2.alternates = this.alternates;
|
|
445
|
-
return join2;
|
|
446
|
-
}
|
|
447
456
|
};
|
|
448
457
|
function join(options, defaultContent, store = IMPLICIT.STORE) {
|
|
449
458
|
const joins = getJoinMap(store);
|
|
@@ -466,12 +475,11 @@ function getJoinMap(store) {
|
|
|
466
475
|
return joins;
|
|
467
476
|
}
|
|
468
477
|
function getJoin(token, store) {
|
|
469
|
-
var _a;
|
|
470
478
|
const joinMap = getJoinMap(store);
|
|
471
479
|
let myJoin = joinMap.get(token.key);
|
|
472
480
|
if (myJoin === void 0) {
|
|
473
481
|
const rootJoinMap = getJoinMap(IMPLICIT.STORE);
|
|
474
|
-
myJoin =
|
|
482
|
+
myJoin = rootJoinMap.get(token.key)?.in(store);
|
|
475
483
|
if (myJoin === void 0) {
|
|
476
484
|
throw new Error(
|
|
477
485
|
`Join "${token.key}" not found in store "${store.config.name}"`
|
package/data/package.json
CHANGED
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
"name": "atom.io-data",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"private": true,
|
|
5
|
-
"main": "dist/index.
|
|
6
|
-
"module": "dist/index.js",
|
|
5
|
+
"main": "dist/index.js",
|
|
7
6
|
"types": "dist/index.d.ts",
|
|
8
7
|
"exports": {
|
|
9
8
|
".": {
|
|
10
9
|
"import": "./dist/index.js",
|
|
11
|
-
"browser": "./dist/index.js",
|
|
12
|
-
"require": "./dist/index.cjs",
|
|
13
10
|
"types": "./dist/index.d.ts"
|
|
14
11
|
}
|
|
15
12
|
}
|
|
@@ -1,56 +1,12 @@
|
|
|
1
1
|
// ../rel8/junction/src/junction.ts
|
|
2
2
|
var Junction = class {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
this.cardinality = data.cardinality;
|
|
11
|
-
if (!(config == null ? void 0 : config.externalStore)) {
|
|
12
|
-
this.relations = new Map((_a = data.relations) == null ? void 0 : _a.map(([a, b]) => [a, new Set(b)]));
|
|
13
|
-
this.contents = new Map(data.contents);
|
|
14
|
-
}
|
|
15
|
-
this.isContent = (_b = config == null ? void 0 : config.isContent) != null ? _b : null;
|
|
16
|
-
if (config == null ? void 0 : config.makeContentKey) {
|
|
17
|
-
this.makeContentKey = config.makeContentKey;
|
|
18
|
-
}
|
|
19
|
-
if (config == null ? void 0 : config.externalStore) {
|
|
20
|
-
const externalStore = config.externalStore;
|
|
21
|
-
this.has = (a, b) => externalStore.has(a, b);
|
|
22
|
-
this.addRelation = (a, b) => {
|
|
23
|
-
externalStore.addRelation(a, b);
|
|
24
|
-
};
|
|
25
|
-
this.deleteRelation = (a, b) => {
|
|
26
|
-
externalStore.deleteRelation(a, b);
|
|
27
|
-
};
|
|
28
|
-
this.replaceRelationsSafely = (a, bs) => {
|
|
29
|
-
externalStore.replaceRelationsSafely(a, bs);
|
|
30
|
-
};
|
|
31
|
-
this.replaceRelationsUnsafely = (a, bs) => {
|
|
32
|
-
externalStore.replaceRelationsUnsafely(a, bs);
|
|
33
|
-
};
|
|
34
|
-
this.getRelatedKeys = (key) => externalStore.getRelatedKeys(key);
|
|
35
|
-
if (externalStore.getContent) {
|
|
36
|
-
this.getContentInternal = (contentKey) => {
|
|
37
|
-
return externalStore.getContent(contentKey);
|
|
38
|
-
};
|
|
39
|
-
this.setContent = (contentKey, content) => {
|
|
40
|
-
externalStore.setContent(contentKey, content);
|
|
41
|
-
};
|
|
42
|
-
this.deleteContent = (contentKey) => {
|
|
43
|
-
externalStore.deleteContent(contentKey);
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
for (const [x, ys] of (_c = data.relations) != null ? _c : []) {
|
|
47
|
-
for (const y of ys) this.addRelation(x, y);
|
|
48
|
-
}
|
|
49
|
-
for (const [contentKey, content] of (_d = data.contents) != null ? _d : []) {
|
|
50
|
-
this.setContent(contentKey, content);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
3
|
+
a;
|
|
4
|
+
b;
|
|
5
|
+
cardinality;
|
|
6
|
+
relations = /* @__PURE__ */ new Map();
|
|
7
|
+
contents = /* @__PURE__ */ new Map();
|
|
8
|
+
isContent;
|
|
9
|
+
makeContentKey = (a, b) => `${a}:${b}`;
|
|
54
10
|
getRelatedKeys(key) {
|
|
55
11
|
return this.relations.get(key);
|
|
56
12
|
}
|
|
@@ -128,6 +84,53 @@ var Junction = class {
|
|
|
128
84
|
deleteContent(contentKey) {
|
|
129
85
|
this.contents.delete(contentKey);
|
|
130
86
|
}
|
|
87
|
+
constructor(data, config) {
|
|
88
|
+
this.a = data.between[0];
|
|
89
|
+
this.b = data.between[1];
|
|
90
|
+
this.cardinality = data.cardinality;
|
|
91
|
+
if (!config?.externalStore) {
|
|
92
|
+
this.relations = new Map(data.relations?.map(([a, b]) => [a, new Set(b)]));
|
|
93
|
+
this.contents = new Map(data.contents);
|
|
94
|
+
}
|
|
95
|
+
this.isContent = config?.isContent ?? null;
|
|
96
|
+
if (config?.makeContentKey) {
|
|
97
|
+
this.makeContentKey = config.makeContentKey;
|
|
98
|
+
}
|
|
99
|
+
if (config?.externalStore) {
|
|
100
|
+
const externalStore = config.externalStore;
|
|
101
|
+
this.has = (a, b) => externalStore.has(a, b);
|
|
102
|
+
this.addRelation = (a, b) => {
|
|
103
|
+
externalStore.addRelation(a, b);
|
|
104
|
+
};
|
|
105
|
+
this.deleteRelation = (a, b) => {
|
|
106
|
+
externalStore.deleteRelation(a, b);
|
|
107
|
+
};
|
|
108
|
+
this.replaceRelationsSafely = (a, bs) => {
|
|
109
|
+
externalStore.replaceRelationsSafely(a, bs);
|
|
110
|
+
};
|
|
111
|
+
this.replaceRelationsUnsafely = (a, bs) => {
|
|
112
|
+
externalStore.replaceRelationsUnsafely(a, bs);
|
|
113
|
+
};
|
|
114
|
+
this.getRelatedKeys = (key) => externalStore.getRelatedKeys(key);
|
|
115
|
+
if (externalStore.getContent) {
|
|
116
|
+
this.getContentInternal = (contentKey) => {
|
|
117
|
+
return externalStore.getContent(contentKey);
|
|
118
|
+
};
|
|
119
|
+
this.setContent = (contentKey, content) => {
|
|
120
|
+
externalStore.setContent(contentKey, content);
|
|
121
|
+
};
|
|
122
|
+
this.deleteContent = (contentKey) => {
|
|
123
|
+
externalStore.deleteContent(contentKey);
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
for (const [x, ys] of data.relations ?? []) {
|
|
127
|
+
for (const y of ys) this.addRelation(x, y);
|
|
128
|
+
}
|
|
129
|
+
for (const [contentKey, content] of data.contents ?? []) {
|
|
130
|
+
this.setContent(contentKey, content);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
131
134
|
toJSON() {
|
|
132
135
|
return {
|
|
133
136
|
between: [this.a, this.b],
|
|
@@ -137,9 +140,8 @@ var Junction = class {
|
|
|
137
140
|
};
|
|
138
141
|
}
|
|
139
142
|
set(a, ...rest) {
|
|
140
|
-
var _a;
|
|
141
143
|
const b = typeof rest[0] === `string` ? rest[0] : a[this.b];
|
|
142
|
-
const content =
|
|
144
|
+
const content = rest[1] ?? typeof rest[0] === `string` ? void 0 : rest[0];
|
|
143
145
|
a = typeof a === `string` ? a : a[this.a];
|
|
144
146
|
switch (this.cardinality) {
|
|
145
147
|
case `1:1`: {
|
|
@@ -202,7 +204,7 @@ var Junction = class {
|
|
|
202
204
|
replaceRelations(a, relations, config) {
|
|
203
205
|
const hasContent = !Array.isArray(relations);
|
|
204
206
|
const bs = hasContent ? Object.keys(relations) : relations;
|
|
205
|
-
if (config
|
|
207
|
+
if (config?.reckless) {
|
|
206
208
|
this.replaceRelationsUnsafely(a, bs);
|
|
207
209
|
} else {
|
|
208
210
|
this.replaceRelationsSafely(a, bs);
|
|
@@ -227,8 +229,7 @@ var Junction = class {
|
|
|
227
229
|
const aRelations = this.getRelatedKeys(a);
|
|
228
230
|
if (aRelations) {
|
|
229
231
|
return [...aRelations].map((aRelation) => {
|
|
230
|
-
|
|
231
|
-
return [aRelation, (_a = this.getContent(a, aRelation)) != null ? _a : null];
|
|
232
|
+
return [aRelation, this.getContent(a, aRelation) ?? null];
|
|
232
233
|
});
|
|
233
234
|
}
|
|
234
235
|
}
|
|
@@ -236,18 +237,16 @@ var Junction = class {
|
|
|
236
237
|
const bRelations = this.getRelatedKeys(b);
|
|
237
238
|
if (bRelations) {
|
|
238
239
|
return [...bRelations].map((bRelation) => {
|
|
239
|
-
|
|
240
|
-
return [bRelation, (_a = this.getContent(bRelation, b)) != null ? _a : null];
|
|
240
|
+
return [bRelation, this.getContent(bRelation, b) ?? null];
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
return [];
|
|
245
245
|
}
|
|
246
246
|
has(a, b) {
|
|
247
|
-
var _a;
|
|
248
247
|
if (b) {
|
|
249
248
|
const setA = this.getRelatedKeys(a);
|
|
250
|
-
return
|
|
249
|
+
return setA?.has(b) ?? false;
|
|
251
250
|
}
|
|
252
251
|
return this.relations.has(a);
|
|
253
252
|
}
|
|
@@ -55,7 +55,7 @@ var fallback = (fn, fallbackValue) => {
|
|
|
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);
|
|
58
|
-
var ifNullish = (alt) => (input) => input
|
|
58
|
+
var ifNullish = (alt) => (input) => input ?? alt;
|
|
59
59
|
|
|
60
60
|
// ../anvl/src/object/access.ts
|
|
61
61
|
var access = (k) => Object.assign((obj) => obj[k], {
|
|
@@ -110,20 +110,19 @@ var doesExtend = (isValue) => hasProperties(isValue, ALLOW_EXTENSION);
|
|
|
110
110
|
// ../anvl/src/object/sprawl.ts
|
|
111
111
|
var sprawl = (tree, inspector) => {
|
|
112
112
|
const walk = (path, node) => {
|
|
113
|
-
var _a;
|
|
114
113
|
const inspect = (p, n) => {
|
|
115
114
|
const result2 = inspector(p, n);
|
|
116
115
|
if (result2) return result2;
|
|
117
116
|
return null;
|
|
118
117
|
};
|
|
119
118
|
const result = inspect(path, node);
|
|
120
|
-
if (
|
|
119
|
+
if (result?.jobComplete ?? result?.pathComplete) {
|
|
121
120
|
return result;
|
|
122
121
|
}
|
|
123
122
|
const childEntries = Array.isArray(node) ? node.map((v, i) => [i, v]) : isPlainObject(node) ? Object.entries(node) : [];
|
|
124
123
|
for (const [k, v] of childEntries) {
|
|
125
124
|
const subResult = walk([...path, k], v);
|
|
126
|
-
if (subResult
|
|
125
|
+
if (subResult?.jobComplete) {
|
|
127
126
|
return subResult;
|
|
128
127
|
}
|
|
129
128
|
}
|
|
@@ -134,7 +133,7 @@ var sprawl = (tree, inspector) => {
|
|
|
134
133
|
|
|
135
134
|
// ../anvl/src/object/index.ts
|
|
136
135
|
var delve = (obj, path) => {
|
|
137
|
-
const found = path.reduce((acc, key) => acc
|
|
136
|
+
const found = path.reduce((acc, key) => acc?.[key], obj);
|
|
138
137
|
return found === void 0 ? new Error(`Not found`) : { found };
|
|
139
138
|
};
|
|
140
139
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './chunk-
|
|
1
|
+
import './chunk-XWL6SNVU.js';
|
|
2
2
|
import * as Internal from 'atom.io/internal';
|
|
3
3
|
import { createStandaloneAtom, IMPLICIT, createAtomFamily, createMoleculeFamily, makeMoleculeInStore, Molecule, createStandaloneSelector, createSelectorFamily, Store, createTransaction, createTimeline, findInStore, getFromStore, setIntoStore, disposeFromStore, timeTravel, subscribeToTimeline, subscribeToTransaction, subscribeToState, arbitrary, actUponStore } from 'atom.io/internal';
|
|
4
4
|
import { stringifyJson } from 'atom.io/json';
|
|
@@ -45,25 +45,22 @@ var AtomIOLogger = class {
|
|
|
45
45
|
this.logLevel = logLevel;
|
|
46
46
|
this.filter = filter;
|
|
47
47
|
this.logger = logger;
|
|
48
|
-
this.error = (...args) => {
|
|
49
|
-
var _a, _b;
|
|
50
|
-
if (((_b = (_a = this.filter) == null ? void 0 : _a.call(this, ...args)) != null ? _b : true) && this.logLevel !== null) {
|
|
51
|
-
this.logger.error(...args);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
this.info = (...args) => {
|
|
55
|
-
var _a, _b;
|
|
56
|
-
if (((_b = (_a = this.filter) == null ? void 0 : _a.call(this, ...args)) != null ? _b : true) && this.logLevel === `info`) {
|
|
57
|
-
this.logger.info(...args);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
this.warn = (...args) => {
|
|
61
|
-
var _a, _b;
|
|
62
|
-
if (((_b = (_a = this.filter) == null ? void 0 : _a.call(this, ...args)) != null ? _b : true) && this.logLevel !== `error` && this.logLevel !== null) {
|
|
63
|
-
this.logger.warn(...args);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
48
|
}
|
|
49
|
+
error = (...args) => {
|
|
50
|
+
if ((this.filter?.(...args) ?? true) && this.logLevel !== null) {
|
|
51
|
+
this.logger.error(...args);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
info = (...args) => {
|
|
55
|
+
if ((this.filter?.(...args) ?? true) && this.logLevel === `info`) {
|
|
56
|
+
this.logger.info(...args);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
warn = (...args) => {
|
|
60
|
+
if ((this.filter?.(...args) ?? true) && this.logLevel !== `error` && this.logLevel !== null) {
|
|
61
|
+
this.logger.warn(...args);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
67
64
|
};
|
|
68
65
|
function moleculeFamily(options) {
|
|
69
66
|
return createMoleculeFamily(options, IMPLICIT.STORE);
|
|
@@ -93,6 +90,22 @@ function setState(token, p1, p2) {
|
|
|
93
90
|
}
|
|
94
91
|
}
|
|
95
92
|
var Silo = class {
|
|
93
|
+
store;
|
|
94
|
+
atom;
|
|
95
|
+
atomFamily;
|
|
96
|
+
selector;
|
|
97
|
+
selectorFamily;
|
|
98
|
+
transaction;
|
|
99
|
+
timeline;
|
|
100
|
+
findState;
|
|
101
|
+
getState;
|
|
102
|
+
setState;
|
|
103
|
+
disposeState;
|
|
104
|
+
subscribe;
|
|
105
|
+
undo;
|
|
106
|
+
redo;
|
|
107
|
+
moleculeFamily;
|
|
108
|
+
makeMolecule;
|
|
96
109
|
constructor(config, fromStore = null) {
|
|
97
110
|
const s = new Store(config, fromStore);
|
|
98
111
|
function _atom(options) {
|
|
@@ -165,8 +178,7 @@ function isToken(knownToken, unknownToken) {
|
|
|
165
178
|
return knownToken.key === unknownToken.key;
|
|
166
179
|
}
|
|
167
180
|
function belongsTo(family, unknownToken) {
|
|
168
|
-
|
|
169
|
-
return family.key === ((_a = unknownToken.family) == null ? void 0 : _a.key);
|
|
181
|
+
return family.key === unknownToken.family?.key;
|
|
170
182
|
}
|
|
171
183
|
|
|
172
184
|
export { AtomIOLogger, LOG_LEVELS, Silo, atom, atomFamily, belongsTo, disposeState, getState, isToken, makeMolecule, makeRootMolecule, moleculeFamily, redo, runTransaction, selector, selectorFamily, setState, simpleLog, simpleLogger, subscribe, timeline, transaction, undo };
|
package/ephemeral/dist/index.js
CHANGED
package/ephemeral/package.json
CHANGED
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
"name": "atom.io-ephemeral",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"private": true,
|
|
5
|
-
"main": "dist/index.
|
|
6
|
-
"module": "dist/index.js",
|
|
5
|
+
"main": "dist/index.js",
|
|
7
6
|
"types": "dist/index.d.ts",
|
|
8
7
|
"exports": {
|
|
9
8
|
".": {
|
|
10
9
|
"import": "./dist/index.js",
|
|
11
|
-
"browser": "./dist/index.js",
|
|
12
|
-
"require": "./dist/index.cjs",
|
|
13
10
|
"types": "./dist/index.d.ts"
|
|
14
11
|
}
|
|
15
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __export } from '../../dist/chunk-
|
|
1
|
+
import { __export } from '../../dist/chunk-XWL6SNVU.js';
|
|
2
2
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
3
3
|
|
|
4
4
|
// eslint-plugin/src/rules/index.ts
|
|
@@ -146,8 +146,7 @@ var lifespan = {
|
|
|
146
146
|
]
|
|
147
147
|
},
|
|
148
148
|
create(context) {
|
|
149
|
-
|
|
150
|
-
const storeLifespan = (_a = context.options[0]) != null ? _a : `ephemeral`;
|
|
149
|
+
const storeLifespan = context.options[0] ?? `ephemeral`;
|
|
151
150
|
return {
|
|
152
151
|
ImportDeclaration(node) {
|
|
153
152
|
const importSource = node.source.value;
|
|
@@ -168,7 +167,7 @@ var lifespan = {
|
|
|
168
167
|
}
|
|
169
168
|
const functionCallee = node.callee.type === `Identifier` ? node.callee : void 0;
|
|
170
169
|
const methodCallee = node.callee.type === `MemberExpression` && node.callee.property.type === `Identifier` ? node.callee.property : void 0;
|
|
171
|
-
const callee = functionCallee
|
|
170
|
+
const callee = functionCallee ?? methodCallee;
|
|
172
171
|
if (callee === void 0) {
|
|
173
172
|
return;
|
|
174
173
|
}
|
|
@@ -296,8 +295,8 @@ var synchronousSelectorDependencies = {
|
|
|
296
295
|
return `key` in prop && `name` in prop.key && prop.key.name === `get`;
|
|
297
296
|
}
|
|
298
297
|
);
|
|
299
|
-
const selectorLookup = selectorLookupProperty
|
|
300
|
-
if (
|
|
298
|
+
const selectorLookup = selectorLookupProperty?.value;
|
|
299
|
+
if (selectorLookup?.type === `FunctionExpression` || selectorLookup?.type === `ArrowFunctionExpression`) {
|
|
301
300
|
if (selectorLookup.body.type === `BlockStatement`) {
|
|
302
301
|
for (const statement of selectorLookup.body.body) {
|
|
303
302
|
if (statement.type === `ReturnStatement` && statement.argument) {
|
|
@@ -317,10 +316,10 @@ var synchronousSelectorDependencies = {
|
|
|
317
316
|
return `key` in prop && `name` in prop.key && prop.key.name === `get`;
|
|
318
317
|
}
|
|
319
318
|
);
|
|
320
|
-
selectorComputation = selectorComputationProperty
|
|
319
|
+
selectorComputation = selectorComputationProperty?.value;
|
|
321
320
|
}
|
|
322
321
|
}
|
|
323
|
-
if (
|
|
322
|
+
if (selectorComputation?.type === `FunctionExpression` || selectorComputation?.type === `ArrowFunctionExpression`) {
|
|
324
323
|
const nonDestructuredTransactorsName = selectorComputation.params[0] && `name` in selectorComputation.params[0] ? selectorComputation.params[0].name : void 0;
|
|
325
324
|
let awaited;
|
|
326
325
|
let awaitNode;
|
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
"name": "atom.io-eslint-plugin",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"private": true,
|
|
5
|
-
"main": "dist/index.
|
|
6
|
-
"module": "dist/index.js",
|
|
5
|
+
"main": "dist/index.js",
|
|
7
6
|
"types": "dist/index.d.ts",
|
|
8
7
|
"exports": {
|
|
9
8
|
".": {
|
|
10
9
|
"import": "./dist/index.js",
|
|
11
|
-
"browser": "./dist/index.js",
|
|
12
|
-
"require": "./dist/index.cjs",
|
|
13
10
|
"types": "./dist/index.d.ts"
|
|
14
11
|
}
|
|
15
12
|
}
|
package/immortal/dist/index.js
CHANGED
package/immortal/package.json
CHANGED
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
"name": "atom.io-immortal",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"private": true,
|
|
5
|
-
"main": "dist/index.
|
|
6
|
-
"module": "dist/index.js",
|
|
5
|
+
"main": "dist/index.js",
|
|
7
6
|
"types": "dist/index.d.ts",
|
|
8
7
|
"exports": {
|
|
9
8
|
".": {
|
|
10
9
|
"import": "./dist/index.js",
|
|
11
|
-
"browser": "./dist/index.js",
|
|
12
|
-
"require": "./dist/index.cjs",
|
|
13
10
|
"types": "./dist/index.d.ts"
|
|
14
11
|
}
|
|
15
12
|
}
|