atom.io 0.19.2 → 0.19.4
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 +1 -1
- package/data/package.json +1 -1
- package/dist/{chunk-U2IICNHQ.js → chunk-F2X4B4VY.js} +5 -1
- package/dist/index.js +1 -1
- package/eslint-plugin/dist/index.cjs +233 -0
- package/eslint-plugin/dist/index.js +223 -0
- package/eslint-plugin/package.json +16 -0
- package/eslint-plugin/src/index.ts +12 -0
- package/eslint-plugin/src/rules/explicit-state-types.ts +55 -0
- package/eslint-plugin/src/rules/index.ts +2 -0
- package/eslint-plugin/src/rules/synchronous-selector-dependencies.ts +190 -0
- package/internal/dist/index.js +1 -1
- package/internal/package.json +1 -1
- package/introspection/dist/index.js +1 -1
- package/introspection/package.json +1 -1
- package/json/dist/index.cjs +5 -5
- package/json/dist/index.js +6 -6
- package/json/package.json +1 -1
- package/json/src/select-json-family.ts +5 -5
- package/package.json +27 -9
- package/react/dist/index.js +1 -1
- package/react/package.json +1 -1
- package/react-devtools/dist/index.cjs +92 -105
- package/react-devtools/dist/index.css +0 -3
- package/react-devtools/dist/index.js +70 -83
- package/react-devtools/package.json +1 -1
- package/react-devtools/src/Updates.tsx +10 -7
- package/react-devtools/src/devtools.scss +0 -3
- package/realtime/dist/index.js +1 -1
- package/realtime/package.json +1 -1
- package/realtime/src/shared-room-store.ts +1 -1
- package/realtime-client/dist/index.js +1 -1
- package/realtime-client/package.json +1 -1
- package/realtime-react/dist/index.js +1 -1
- package/realtime-react/package.json +1 -1
- package/realtime-server/dist/index.d.ts +3 -4
- package/realtime-server/dist/index.js +1 -1
- package/realtime-server/package.json +1 -1
- package/realtime-server/src/realtime-server-stores/server-user-store.ts +3 -2
- package/realtime-testing/dist/index.js +1 -1
- package/realtime-testing/package.json +1 -1
- package/transceivers/set-rtx/dist/index.js +1 -1
- package/transceivers/set-rtx/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { pipe, ifDefined, isArray, isRecord, doesExtend, isPlainObject, raiseError, sprawl, recordToEntries, fallback, doNothing, become, mapObject, delve } from '../../dist/chunk-CC7IF7QF.js';
|
|
2
2
|
import { lazyLocalStorageEffect } from '../../dist/chunk-BWWVY5O5.js';
|
|
3
3
|
import { JSON_TYPE_NAMES, isString, isNumber, isBoolean, stringifyJson, JSON_DEFAULTS } from '../../dist/chunk-BF4MVQF6.js';
|
|
4
|
-
import { __spreadProps, __spreadValues, __objRest, __restKey } from '../../dist/chunk-
|
|
4
|
+
import { __spreadProps, __spreadValues, __objRest, __restKey } from '../../dist/chunk-F2X4B4VY.js';
|
|
5
5
|
import { selectorFamily, atom, atomFamily, findState, undo, redo, getState } from 'atom.io';
|
|
6
6
|
import { attachIntrospectionStates } from 'atom.io/introspection';
|
|
7
7
|
import { useI, useO } from 'atom.io/react';
|
|
@@ -66,12 +66,12 @@ var refineJsonType = (data) => data === null ? { type: `null`, data: null } : is
|
|
|
66
66
|
data === void 0 ? `undefined passed to refineJsonType. This is not valid JSON.` : `${stringifyJson(data)} with prototype "${Object.getPrototypeOf(data).constructor.name}" passed to refineJsonType. This is not valid JSON.`
|
|
67
67
|
);
|
|
68
68
|
var isJson = (input) => {
|
|
69
|
-
var
|
|
69
|
+
var _a;
|
|
70
70
|
if (input === null)
|
|
71
71
|
return true;
|
|
72
72
|
if (input === void 0)
|
|
73
73
|
return false;
|
|
74
|
-
const prototype = (
|
|
74
|
+
const prototype = (_a = Object.getPrototypeOf(input)) == null ? void 0 : _a.constructor.name;
|
|
75
75
|
const refine = JSON_PROTOTYPES.includes(prototype);
|
|
76
76
|
return refine;
|
|
77
77
|
};
|
|
@@ -88,11 +88,11 @@ var mustSatisfyOneOfTheFollowing = (isTypeA, logging = false, refinements = [isT
|
|
|
88
88
|
const _ = {
|
|
89
89
|
[name]: (input) => refinements.some(
|
|
90
90
|
(refinement) => {
|
|
91
|
-
var
|
|
91
|
+
var _a;
|
|
92
92
|
return logging && console.log(
|
|
93
93
|
refinements.map((r) => r.name || `anon`).join(` | `),
|
|
94
94
|
`>`,
|
|
95
|
-
(
|
|
95
|
+
(_a = refinement.name) != null ? _a : `anon`,
|
|
96
96
|
`:`,
|
|
97
97
|
refinement(input)
|
|
98
98
|
), refinement(input);
|
|
@@ -135,32 +135,32 @@ var isLiteral = (value) => (input) => input === value;
|
|
|
135
135
|
var isWithin = (args) => (input) => args.includes(input);
|
|
136
136
|
|
|
137
137
|
// ../anvl/src/tree/differ.ts
|
|
138
|
-
function diffNumber(
|
|
139
|
-
const sign =
|
|
138
|
+
function diffNumber(a, b) {
|
|
139
|
+
const sign = a < b ? `+` : `-`;
|
|
140
140
|
return {
|
|
141
|
-
summary: `${sign}${Math.abs(
|
|
141
|
+
summary: `${sign}${Math.abs(a - b)} (${a} \u2192 ${b})`
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
function diffString(
|
|
145
|
-
const sign =
|
|
144
|
+
function diffString(a, b) {
|
|
145
|
+
const sign = a.length < b.length ? `+` : `-`;
|
|
146
146
|
return {
|
|
147
|
-
summary: `${sign}${Math.abs(
|
|
147
|
+
summary: `${sign}${Math.abs(a.length - b.length)} ("${a}" \u2192 "${b}")`
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
-
function diffBoolean(
|
|
150
|
+
function diffBoolean(a, b) {
|
|
151
151
|
return {
|
|
152
|
-
summary: `${
|
|
152
|
+
summary: `${a} \u2192 ${b}`
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
function diffObject(
|
|
155
|
+
function diffObject(a, b, recurse) {
|
|
156
156
|
let summary = ``;
|
|
157
157
|
const added = [];
|
|
158
158
|
const removed = [];
|
|
159
159
|
const changed = [];
|
|
160
|
-
sprawl(
|
|
160
|
+
sprawl(a, (path, nodeA) => {
|
|
161
161
|
let key;
|
|
162
162
|
for (key of path) {
|
|
163
|
-
const nodeB =
|
|
163
|
+
const nodeB = b[key];
|
|
164
164
|
if (nodeB === void 0) {
|
|
165
165
|
removed.push([key, JSON.stringify(nodeA)]);
|
|
166
166
|
} else {
|
|
@@ -171,10 +171,10 @@ function diffObject(a2, b2, recurse) {
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
|
-
sprawl(
|
|
174
|
+
sprawl(b, (path, nodeB) => {
|
|
175
175
|
let key;
|
|
176
176
|
for (key of path) {
|
|
177
|
-
const nodeA =
|
|
177
|
+
const nodeA = a[key];
|
|
178
178
|
if (nodeA === void 0) {
|
|
179
179
|
added.push([key, JSON.stringify(nodeB)]);
|
|
180
180
|
}
|
|
@@ -188,8 +188,8 @@ function diffObject(a2, b2, recurse) {
|
|
|
188
188
|
changed
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
function diffArray(
|
|
192
|
-
return diffObject(
|
|
191
|
+
function diffArray(a, b, recurse) {
|
|
192
|
+
return diffObject(a, b, recurse);
|
|
193
193
|
}
|
|
194
194
|
var Differ = class {
|
|
195
195
|
constructor(leafRefinery, treeRefinery, diffFunctions) {
|
|
@@ -206,20 +206,20 @@ var Differ = class {
|
|
|
206
206
|
this.treeDiffers[key] = diffFunction;
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
diff(
|
|
210
|
-
var
|
|
211
|
-
if (
|
|
209
|
+
diff(a, b) {
|
|
210
|
+
var _a, _b;
|
|
211
|
+
if (a === b) {
|
|
212
212
|
return { summary: `No Change` };
|
|
213
213
|
}
|
|
214
214
|
try {
|
|
215
|
-
if (JSON.stringify(
|
|
215
|
+
if (JSON.stringify(a) === JSON.stringify(b)) {
|
|
216
216
|
return { summary: `No Change` };
|
|
217
217
|
}
|
|
218
218
|
} catch (thrown) {
|
|
219
|
-
console.error(`Error stringifying`,
|
|
219
|
+
console.error(`Error stringifying`, a, b);
|
|
220
220
|
}
|
|
221
|
-
const aRefined = (
|
|
222
|
-
const bRefined = (_b = this.leafRefinery.refine(
|
|
221
|
+
const aRefined = (_a = this.leafRefinery.refine(a)) != null ? _a : this.treeRefinery.refine(a);
|
|
222
|
+
const bRefined = (_b = this.leafRefinery.refine(b)) != null ? _b : this.treeRefinery.refine(b);
|
|
223
223
|
if (aRefined !== null && bRefined !== null) {
|
|
224
224
|
if (aRefined.type === bRefined.type) {
|
|
225
225
|
if (aRefined.type in this.leafDiffers) {
|
|
@@ -239,8 +239,8 @@ var Differ = class {
|
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
-
const typeA = discoverType(
|
|
243
|
-
const typeB = discoverType(
|
|
242
|
+
const typeA = discoverType(a);
|
|
243
|
+
const typeB = discoverType(b);
|
|
244
244
|
if (typeA === typeB) {
|
|
245
245
|
return {
|
|
246
246
|
summary: `${typeA} \u2192 ${typeB}`
|
|
@@ -270,7 +270,7 @@ var button = {
|
|
|
270
270
|
OpenClose
|
|
271
271
|
};
|
|
272
272
|
var ElasticInput = forwardRef(function ElasticInputFC(props, ref) {
|
|
273
|
-
var
|
|
273
|
+
var _a, _b, _c, _d, _e, _f;
|
|
274
274
|
const inputRef = useRef(null);
|
|
275
275
|
const spanRef = useRef(null);
|
|
276
276
|
const [inputWidth, setInputWidth] = useState(`auto`);
|
|
@@ -278,8 +278,8 @@ var ElasticInput = forwardRef(function ElasticInputFC(props, ref) {
|
|
|
278
278
|
ref,
|
|
279
279
|
() => ({
|
|
280
280
|
focus: () => {
|
|
281
|
-
var
|
|
282
|
-
(
|
|
281
|
+
var _a2;
|
|
282
|
+
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
283
283
|
}
|
|
284
284
|
})
|
|
285
285
|
);
|
|
@@ -296,7 +296,7 @@ var ElasticInput = forwardRef(function ElasticInputFC(props, ref) {
|
|
|
296
296
|
clearInterval(interval);
|
|
297
297
|
};
|
|
298
298
|
}
|
|
299
|
-
}, [(
|
|
299
|
+
}, [(_a = inputRef.current) == null ? void 0 : _a.value, props.value]);
|
|
300
300
|
return /* @__PURE__ */ jsxs("div", { style: { display: `inline-block`, position: `relative` }, children: [
|
|
301
301
|
/* @__PURE__ */ jsx(
|
|
302
302
|
"input",
|
|
@@ -405,7 +405,7 @@ var NumberInput = ({
|
|
|
405
405
|
userHasMadeDeliberateChange.current = false;
|
|
406
406
|
};
|
|
407
407
|
const handleChange = (event) => {
|
|
408
|
-
var
|
|
408
|
+
var _a;
|
|
409
409
|
if (onChange)
|
|
410
410
|
onChange(event);
|
|
411
411
|
if (set === void 0)
|
|
@@ -414,7 +414,7 @@ var NumberInput = ({
|
|
|
414
414
|
const input = event.target.value;
|
|
415
415
|
if (isValidNonNumber(input) || isDecimalInProgress(input)) {
|
|
416
416
|
setTemporaryEntry(input);
|
|
417
|
-
const textInterpretation = isDecimalInProgress(input) ? input : (
|
|
417
|
+
const textInterpretation = isDecimalInProgress(input) ? input : (_a = min == null ? void 0 : min.toString()) != null ? _a : `0`;
|
|
418
418
|
const newValue = textToValue(textInterpretation, allowDecimal);
|
|
419
419
|
set(refine(newValue));
|
|
420
420
|
return;
|
|
@@ -608,19 +608,6 @@ var parseInteger = (input) => {
|
|
|
608
608
|
return input;
|
|
609
609
|
throw new IntegerParseError(input);
|
|
610
610
|
};
|
|
611
|
-
var _a;
|
|
612
|
-
var Fraction = class extends Number {
|
|
613
|
-
constructor(n, d) {
|
|
614
|
-
super(n / d);
|
|
615
|
-
this[_a] = () => this.numerator / this.denominator;
|
|
616
|
-
if (d === 0) {
|
|
617
|
-
throw new Error(`Denominator cannot be zero`);
|
|
618
|
-
}
|
|
619
|
-
this.numerator = parseInteger(n);
|
|
620
|
-
this.denominator = parseInteger(d);
|
|
621
|
-
}
|
|
622
|
-
};
|
|
623
|
-
_a = Symbol.toPrimitive;
|
|
624
611
|
var IntegerParseError = class extends Error {
|
|
625
612
|
constructor(value) {
|
|
626
613
|
super(`Could not parse integer from ${JSON.stringify(value)}`);
|
|
@@ -655,12 +642,6 @@ var Int = Object.assign((input) => parseInteger(input), {
|
|
|
655
642
|
};
|
|
656
643
|
}
|
|
657
644
|
});
|
|
658
|
-
function asNumber(input) {
|
|
659
|
-
return input;
|
|
660
|
-
}
|
|
661
|
-
asNumber(new Fraction(1, 2));
|
|
662
|
-
asNumber([new Fraction(1, 2)]);
|
|
663
|
-
asNumber({ a: new Fraction(1, 2) });
|
|
664
645
|
|
|
665
646
|
// ../anvl/src/json-schema/refs.ts
|
|
666
647
|
function isJsonSchemaRef(input) {
|
|
@@ -930,8 +911,8 @@ var stringToObject = (str) => {
|
|
|
930
911
|
var objectToString = (obj) => JSON.stringify(obj);
|
|
931
912
|
var objectToBoolean = (obj) => obj.true === true;
|
|
932
913
|
var objectToNumber = (obj) => {
|
|
933
|
-
var
|
|
934
|
-
return Number((_c = (_b = (
|
|
914
|
+
var _a, _b, _c;
|
|
915
|
+
return Number((_c = (_b = (_a = obj.number) != null ? _a : obj.size) != null ? _b : obj.count) != null ? _c : 0);
|
|
935
916
|
};
|
|
936
917
|
var objectToArray = (obj) => Object.entries(obj);
|
|
937
918
|
var booleanToString = (bool) => bool.toString();
|
|
@@ -1078,7 +1059,7 @@ var makePropertyRenamers = (data, set, stableKeyMapRef) => mapObject(
|
|
|
1078
1059
|
);
|
|
1079
1060
|
var makePropertyRemovers = (data, set) => mapObject(data, (_, key) => () => {
|
|
1080
1061
|
set(() => {
|
|
1081
|
-
const
|
|
1062
|
+
const _a = data, rest = __objRest(_a, [__restKey(key)]);
|
|
1082
1063
|
return rest;
|
|
1083
1064
|
});
|
|
1084
1065
|
});
|
|
@@ -1130,7 +1111,7 @@ var ObjectEditor = ({
|
|
|
1130
1111
|
set,
|
|
1131
1112
|
Components
|
|
1132
1113
|
}) => {
|
|
1133
|
-
var
|
|
1114
|
+
var _a;
|
|
1134
1115
|
const disabled = isReadonly(path);
|
|
1135
1116
|
const stableKeyMap = useRef(
|
|
1136
1117
|
Object.keys(data).reduce(
|
|
@@ -1148,7 +1129,7 @@ var ObjectEditor = ({
|
|
|
1148
1129
|
const sortProperties = makePropertySorter(data, set);
|
|
1149
1130
|
const makePropertyAdder = makePropertyCreationInterface(data, set);
|
|
1150
1131
|
const subSchema = isPlainObject(schema) ? findSubSchema(schema)(path) : true;
|
|
1151
|
-
const schemaKeys = isLiteral(true)(subSchema) ? true : isObjectSchema(subSchema) ? Object.keys((
|
|
1132
|
+
const schemaKeys = isLiteral(true)(subSchema) ? true : isObjectSchema(subSchema) ? Object.keys((_a = subSchema.properties) != null ? _a : {}) : [];
|
|
1152
1133
|
const dataKeys = Object.keys(data);
|
|
1153
1134
|
const [unofficialKeys, officialKeys] = dataKeys.reduce(
|
|
1154
1135
|
([unofficial, official], key) => {
|
|
@@ -1176,16 +1157,19 @@ var ObjectEditor = ({
|
|
|
1176
1157
|
const originalPath = [...path, originalKey];
|
|
1177
1158
|
const isOfficial = schemaKeys === true || schemaKeys.includes(key);
|
|
1178
1159
|
const isMissing = missingKeys.includes(key);
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1160
|
+
if (isMissing) {
|
|
1161
|
+
return /* @__PURE__ */ jsx(
|
|
1162
|
+
PropertyAdder,
|
|
1163
|
+
{
|
|
1164
|
+
propertyKey: key,
|
|
1165
|
+
addProperty: makePropertyAdder(key, `string`),
|
|
1166
|
+
disabled,
|
|
1167
|
+
Components
|
|
1168
|
+
},
|
|
1169
|
+
key + `IsMissing`
|
|
1170
|
+
);
|
|
1171
|
+
}
|
|
1172
|
+
return /* @__PURE__ */ jsx(
|
|
1189
1173
|
JsonEditor_INTERNAL,
|
|
1190
1174
|
{
|
|
1191
1175
|
schema,
|
|
@@ -1267,8 +1251,8 @@ var StringEditor = ({
|
|
|
1267
1251
|
) });
|
|
1268
1252
|
};
|
|
1269
1253
|
var DefaultFallback = ({ error, errorInfo }) => {
|
|
1270
|
-
var
|
|
1271
|
-
const component = (
|
|
1254
|
+
var _a, _b, _c;
|
|
1255
|
+
const component = (_a = errorInfo == null ? void 0 : errorInfo.componentStack) == null ? void 0 : _a.split(` `).filter(Boolean)[2];
|
|
1272
1256
|
const message = (_c = (_b = error == null ? void 0 : error.toString()) != null ? _b : errorInfo == null ? void 0 : errorInfo.componentStack) != null ? _c : `Unknown error`;
|
|
1273
1257
|
return /* @__PURE__ */ jsx(
|
|
1274
1258
|
"div",
|
|
@@ -1319,8 +1303,8 @@ var ErrorBoundary = class extends Component {
|
|
|
1319
1303
|
this.state = {};
|
|
1320
1304
|
}
|
|
1321
1305
|
componentDidCatch(error, errorInfo) {
|
|
1322
|
-
var
|
|
1323
|
-
(_b = (
|
|
1306
|
+
var _a, _b;
|
|
1307
|
+
(_b = (_a = this.props).onError) == null ? void 0 : _b.call(_a, error, errorInfo);
|
|
1324
1308
|
this.setState({
|
|
1325
1309
|
error,
|
|
1326
1310
|
errorInfo
|
|
@@ -1472,7 +1456,7 @@ var findStateTypeState = selectorFamily({
|
|
|
1472
1456
|
}
|
|
1473
1457
|
});
|
|
1474
1458
|
var StateIndexLeafNode = ({ node, isOpenState, typeState }) => {
|
|
1475
|
-
var
|
|
1459
|
+
var _a, _b;
|
|
1476
1460
|
const setIsOpen = useI(isOpenState);
|
|
1477
1461
|
const isOpen = useO(isOpenState);
|
|
1478
1462
|
const state = useO(node);
|
|
@@ -1499,7 +1483,7 @@ var StateIndexLeafNode = ({ node, isOpenState, typeState }) => {
|
|
|
1499
1483
|
console.log(node, getState(node));
|
|
1500
1484
|
},
|
|
1501
1485
|
children: [
|
|
1502
|
-
/* @__PURE__ */ jsx("h2", { children: (_b = (
|
|
1486
|
+
/* @__PURE__ */ jsx("h2", { children: (_b = (_a = node.family) == null ? void 0 : _a.subKey) != null ? _b : node.key }),
|
|
1503
1487
|
/* @__PURE__ */ jsxs("span", { className: "type detail", children: [
|
|
1504
1488
|
"(",
|
|
1505
1489
|
stateType,
|
|
@@ -1637,14 +1621,17 @@ var TransactionUpdateFC = ({ serialNumber, transactionUpdate }) => {
|
|
|
1637
1621
|
/* @__PURE__ */ jsxs("section", { className: "transaction_impact", children: [
|
|
1638
1622
|
/* @__PURE__ */ jsx("span", { className: "detail", children: "impact: " }),
|
|
1639
1623
|
transactionUpdate.updates.filter((token) => !token.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)).map((update, index) => {
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1624
|
+
if (`newValue` in update) {
|
|
1625
|
+
return /* @__PURE__ */ jsx(
|
|
1626
|
+
article.AtomUpdate,
|
|
1627
|
+
{
|
|
1628
|
+
serialNumber: index,
|
|
1629
|
+
atomUpdate: update
|
|
1630
|
+
},
|
|
1631
|
+
`${transactionUpdate.key}:${index}:${update.key}`
|
|
1632
|
+
);
|
|
1633
|
+
}
|
|
1634
|
+
return /* @__PURE__ */ jsx(
|
|
1648
1635
|
TransactionUpdateFC,
|
|
1649
1636
|
{
|
|
1650
1637
|
serialNumber: index,
|
|
@@ -93,13 +93,16 @@ const TransactionUpdateFC: React.FC<{
|
|
|
93
93
|
{transactionUpdate.updates
|
|
94
94
|
.filter((token) => !token.key.startsWith(`👁🗨`))
|
|
95
95
|
.map((update, index) => {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
if (`newValue` in update) {
|
|
97
|
+
return (
|
|
98
|
+
<article.AtomUpdate
|
|
99
|
+
key={`${transactionUpdate.key}:${index}:${update.key}`}
|
|
100
|
+
serialNumber={index}
|
|
101
|
+
atomUpdate={update}
|
|
102
|
+
/>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
return (
|
|
103
106
|
<TransactionUpdateFC
|
|
104
107
|
key={`${transactionUpdate.key}:${index}:${update.key}`}
|
|
105
108
|
serialNumber={index}
|
package/realtime/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../../dist/chunk-
|
|
1
|
+
import '../../dist/chunk-F2X4B4VY.js';
|
|
2
2
|
import { assignTransactionToContinuity, IMPLICIT, setEpochNumberOfContinuity, getUpdateToken } from 'atom.io/internal';
|
|
3
3
|
import { atom, selectorFamily } from 'atom.io';
|
|
4
4
|
import { join, getInternalRelations } from 'atom.io/data';
|
package/realtime/package.json
CHANGED
|
@@ -12,7 +12,7 @@ export const usersInThisRoomIndex = atom<SetRTX<string>, SetRTXJson<string>>({
|
|
|
12
12
|
fromJson: (json) => SetRTX.fromJSON(json),
|
|
13
13
|
})
|
|
14
14
|
|
|
15
|
-
export const roomIndex = atom({
|
|
15
|
+
export const roomIndex = atom<SetRTX<string>, SetRTXJson<string>>({
|
|
16
16
|
key: `roomIndex`,
|
|
17
17
|
default: () => new SetRTX<string>(),
|
|
18
18
|
mutable: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { syncContinuity } from '../../dist/chunk-ATKDGVTV.js';
|
|
2
2
|
export { confirmedUpdateQueue, myIdState, myIdState__INTERNAL, myUsernameState, optimisticUpdateQueue } from '../../dist/chunk-O47EQUM6.js';
|
|
3
3
|
import '../../dist/chunk-BWWVY5O5.js';
|
|
4
|
-
import '../../dist/chunk-
|
|
4
|
+
import '../../dist/chunk-F2X4B4VY.js';
|
|
5
5
|
import * as Internal from 'atom.io/internal';
|
|
6
6
|
import { setIntoStore, getJsonToken, getUpdateToken } from 'atom.io/internal';
|
|
7
7
|
import { parseJson } from 'atom.io/json';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { syncContinuity } from '../../dist/chunk-ATKDGVTV.js';
|
|
2
|
-
import '../../dist/chunk-
|
|
2
|
+
import '../../dist/chunk-F2X4B4VY.js';
|
|
3
3
|
import { useI, StoreContext, useO } from 'atom.io/react';
|
|
4
4
|
import * as RTC from 'atom.io/realtime-client';
|
|
5
5
|
import * as React from 'react';
|
|
@@ -6,8 +6,7 @@ import * as AtomIO from 'atom.io';
|
|
|
6
6
|
import { TransactionUpdateContent, TransactionUpdate, WritableToken } from 'atom.io';
|
|
7
7
|
import * as atom_io_data from 'atom.io/data';
|
|
8
8
|
import { Loadable } from 'atom.io/data';
|
|
9
|
-
import
|
|
10
|
-
import { SetRTX } from 'atom.io/transceivers/set-rtx';
|
|
9
|
+
import { SetRTX, SetRTXJson } from 'atom.io/transceivers/set-rtx';
|
|
11
10
|
|
|
12
11
|
type Events = Json.Object<string, Json.Serializable[]>;
|
|
13
12
|
type StringifiedEvent<Key extends string, Params extends Json.Serializable[]> = Stringified<[Key, ...Params]>;
|
|
@@ -104,8 +103,8 @@ declare const actionOcclusionAtoms: AtomIO.RegularAtomFamilyTokenWithCall<{
|
|
|
104
103
|
declare const userUnacknowledgedQueues: AtomIO.RegularAtomFamilyTokenWithCall<Pick<TransactionUpdate<any>, "key" | "epoch" | "id" | "updates" | "output">[], string>;
|
|
105
104
|
|
|
106
105
|
declare const socketAtoms: AtomIO.RegularAtomFamilyTokenWithCall<Socket | null, string>;
|
|
107
|
-
declare const socketIndex: AtomIO.MutableAtomToken<SetRTX<string>,
|
|
108
|
-
declare const userIndex: AtomIO.MutableAtomToken<SetRTX<string>,
|
|
106
|
+
declare const socketIndex: AtomIO.MutableAtomToken<SetRTX<string>, SetRTXJson<string>>;
|
|
107
|
+
declare const userIndex: AtomIO.MutableAtomToken<SetRTX<string>, SetRTXJson<string>>;
|
|
109
108
|
declare const usersOfSockets: atom_io_data.JoinToken<"user", "socket", "1:1", null>;
|
|
110
109
|
|
|
111
110
|
type StateProvider = ReturnType<typeof realtimeStateProvider>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { findRelationsInStore } from '../../dist/chunk-MSCJWACE.js';
|
|
2
2
|
import '../../dist/chunk-FTONNX2R.js';
|
|
3
|
-
import { __spreadProps, __spreadValues } from '../../dist/chunk-
|
|
3
|
+
import { __spreadProps, __spreadValues } from '../../dist/chunk-F2X4B4VY.js';
|
|
4
4
|
import { parseJson, stringifyJson } from 'atom.io/json';
|
|
5
5
|
import { getUpdateToken, IMPLICIT, Subject, getFromStore, subscribeToState, findInStore, getJsonToken, isRootStore, subscribeToTransaction, actUponStore, setIntoStore } from 'atom.io/internal';
|
|
6
6
|
import { SetRTX } from 'atom.io/transceivers/set-rtx';
|
|
@@ -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>(),
|
|
@@ -3,7 +3,7 @@ import { editRelationsInStore } from '../../dist/chunk-MSCJWACE.js';
|
|
|
3
3
|
import '../../dist/chunk-FTONNX2R.js';
|
|
4
4
|
import { recordToEntries } from '../../dist/chunk-CC7IF7QF.js';
|
|
5
5
|
import '../../dist/chunk-BWWVY5O5.js';
|
|
6
|
-
import { __spreadProps, __spreadValues } from '../../dist/chunk-
|
|
6
|
+
import { __spreadProps, __spreadValues } from '../../dist/chunk-F2X4B4VY.js';
|
|
7
7
|
import * as http from 'http';
|
|
8
8
|
import { render, prettyDOM } from '@testing-library/react';
|
|
9
9
|
import * as AtomIO from 'atom.io';
|