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.
Files changed (43) hide show
  1. package/data/dist/index.js +1 -1
  2. package/data/package.json +1 -1
  3. package/dist/{chunk-U2IICNHQ.js → chunk-F2X4B4VY.js} +5 -1
  4. package/dist/index.js +1 -1
  5. package/eslint-plugin/dist/index.cjs +233 -0
  6. package/eslint-plugin/dist/index.js +223 -0
  7. package/eslint-plugin/package.json +16 -0
  8. package/eslint-plugin/src/index.ts +12 -0
  9. package/eslint-plugin/src/rules/explicit-state-types.ts +55 -0
  10. package/eslint-plugin/src/rules/index.ts +2 -0
  11. package/eslint-plugin/src/rules/synchronous-selector-dependencies.ts +190 -0
  12. package/internal/dist/index.js +1 -1
  13. package/internal/package.json +1 -1
  14. package/introspection/dist/index.js +1 -1
  15. package/introspection/package.json +1 -1
  16. package/json/dist/index.cjs +5 -5
  17. package/json/dist/index.js +6 -6
  18. package/json/package.json +1 -1
  19. package/json/src/select-json-family.ts +5 -5
  20. package/package.json +27 -9
  21. package/react/dist/index.js +1 -1
  22. package/react/package.json +1 -1
  23. package/react-devtools/dist/index.cjs +92 -105
  24. package/react-devtools/dist/index.css +0 -3
  25. package/react-devtools/dist/index.js +70 -83
  26. package/react-devtools/package.json +1 -1
  27. package/react-devtools/src/Updates.tsx +10 -7
  28. package/react-devtools/src/devtools.scss +0 -3
  29. package/realtime/dist/index.js +1 -1
  30. package/realtime/package.json +1 -1
  31. package/realtime/src/shared-room-store.ts +1 -1
  32. package/realtime-client/dist/index.js +1 -1
  33. package/realtime-client/package.json +1 -1
  34. package/realtime-react/dist/index.js +1 -1
  35. package/realtime-react/package.json +1 -1
  36. package/realtime-server/dist/index.d.ts +3 -4
  37. package/realtime-server/dist/index.js +1 -1
  38. package/realtime-server/package.json +1 -1
  39. package/realtime-server/src/realtime-server-stores/server-user-store.ts +3 -2
  40. package/realtime-testing/dist/index.js +1 -1
  41. package/realtime-testing/package.json +1 -1
  42. package/transceivers/set-rtx/dist/index.js +1 -1
  43. 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-U2IICNHQ.js';
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 _a2;
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 = (_a2 = Object.getPrototypeOf(input)) == null ? void 0 : _a2.constructor.name;
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 _a2;
91
+ var _a;
92
92
  return logging && console.log(
93
93
  refinements.map((r) => r.name || `anon`).join(` | `),
94
94
  `>`,
95
- (_a2 = refinement.name) != null ? _a2 : `anon`,
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(a2, b2) {
139
- const sign = a2 < b2 ? `+` : `-`;
138
+ function diffNumber(a, b) {
139
+ const sign = a < b ? `+` : `-`;
140
140
  return {
141
- summary: `${sign}${Math.abs(a2 - b2)} (${a2} \u2192 ${b2})`
141
+ summary: `${sign}${Math.abs(a - b)} (${a} \u2192 ${b})`
142
142
  };
143
143
  }
144
- function diffString(a2, b2) {
145
- const sign = a2.length < b2.length ? `+` : `-`;
144
+ function diffString(a, b) {
145
+ const sign = a.length < b.length ? `+` : `-`;
146
146
  return {
147
- summary: `${sign}${Math.abs(a2.length - b2.length)} ("${a2}" \u2192 "${b2}")`
147
+ summary: `${sign}${Math.abs(a.length - b.length)} ("${a}" \u2192 "${b}")`
148
148
  };
149
149
  }
150
- function diffBoolean(a2, b2) {
150
+ function diffBoolean(a, b) {
151
151
  return {
152
- summary: `${a2} \u2192 ${b2}`
152
+ summary: `${a} \u2192 ${b}`
153
153
  };
154
154
  }
155
- function diffObject(a2, b2, recurse) {
155
+ function diffObject(a, b, recurse) {
156
156
  let summary = ``;
157
157
  const added = [];
158
158
  const removed = [];
159
159
  const changed = [];
160
- sprawl(a2, (path, nodeA) => {
160
+ sprawl(a, (path, nodeA) => {
161
161
  let key;
162
162
  for (key of path) {
163
- const nodeB = b2[key];
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(b2, (path, nodeB) => {
174
+ sprawl(b, (path, nodeB) => {
175
175
  let key;
176
176
  for (key of path) {
177
- const nodeA = a2[key];
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(a2, b2, recurse) {
192
- return diffObject(a2, b2, recurse);
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(a2, b2) {
210
- var _a2, _b;
211
- if (a2 === b2) {
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(a2) === JSON.stringify(b2)) {
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`, a2, b2);
219
+ console.error(`Error stringifying`, a, b);
220
220
  }
221
- const aRefined = (_a2 = this.leafRefinery.refine(a2)) != null ? _a2 : this.treeRefinery.refine(a2);
222
- const bRefined = (_b = this.leafRefinery.refine(b2)) != null ? _b : this.treeRefinery.refine(b2);
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(a2);
243
- const typeB = discoverType(b2);
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 _a2, _b, _c, _d, _e, _f;
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 _a3;
282
- (_a3 = inputRef.current) == null ? void 0 : _a3.focus();
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
- }, [(_a2 = inputRef.current) == null ? void 0 : _a2.value, props.value]);
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 _a2;
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 : (_a2 = min == null ? void 0 : min.toString()) != null ? _a2 : `0`;
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 _a2, _b, _c;
934
- return Number((_c = (_b = (_a2 = obj.number) != null ? _a2 : obj.size) != null ? _b : obj.count) != null ? _c : 0);
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 _a2 = data, rest = __objRest(_a2, [__restKey(key)]);
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 _a2;
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((_a2 = subSchema.properties) != null ? _a2 : {}) : [];
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
- return isMissing ? /* @__PURE__ */ jsx(
1180
- PropertyAdder,
1181
- {
1182
- propertyKey: key,
1183
- addProperty: makePropertyAdder(key, `string`),
1184
- disabled,
1185
- Components
1186
- },
1187
- key + `IsMissing`
1188
- ) : /* @__PURE__ */ jsx(
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 _a2, _b, _c;
1271
- const component = (_a2 = errorInfo == null ? void 0 : errorInfo.componentStack) == null ? void 0 : _a2.split(` `).filter(Boolean)[2];
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 _a2, _b;
1323
- (_b = (_a2 = this.props).onError) == null ? void 0 : _b.call(_a2, error, errorInfo);
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 _a2, _b;
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 = (_a2 = node.family) == null ? void 0 : _a2.subKey) != null ? _b : node.key }),
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
- return `newValue` in update ? /* @__PURE__ */ jsx(
1641
- article.AtomUpdate,
1642
- {
1643
- serialNumber: index,
1644
- atomUpdate: update
1645
- },
1646
- `${transactionUpdate.key}:${index}:${update.key}`
1647
- ) : /* @__PURE__ */ jsx(
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,
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "private": true,
5
5
  "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
6
+ "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
@@ -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
- return `newValue` in update ? (
97
- <article.AtomUpdate
98
- key={`${transactionUpdate.key}:${index}:${update.key}`}
99
- serialNumber={index}
100
- atomUpdate={update}
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}
@@ -130,9 +130,6 @@ main.atom_io_devtools {
130
130
  }
131
131
  section.transaction_log {
132
132
  margin-top: 0;
133
- header: {
134
- padding: 5px;
135
- }
136
133
  main {
137
134
  display: flex;
138
135
  flex-flow: row wrap;
@@ -1,4 +1,4 @@
1
- import '../../dist/chunk-U2IICNHQ.js';
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';
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "private": true,
5
5
  "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
6
+ "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
@@ -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-U2IICNHQ.js';
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';
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "private": true,
5
5
  "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
6
+ "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
@@ -1,5 +1,5 @@
1
1
  import { syncContinuity } from '../../dist/chunk-ATKDGVTV.js';
2
- import '../../dist/chunk-U2IICNHQ.js';
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';
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "private": true,
5
5
  "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
6
+ "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
@@ -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 * as atom_io_transceivers_set_rtx from 'atom.io/transceivers/set-rtx';
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>, atom_io_transceivers_set_rtx.SetRTXJson<string>>;
108
- declare const userIndex: AtomIO.MutableAtomToken<SetRTX<string>, atom_io_transceivers_set_rtx.SetRTXJson<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-U2IICNHQ.js';
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';
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "private": true,
5
5
  "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
6
+ "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
@@ -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-U2IICNHQ.js';
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';
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "private": true,
5
5
  "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
6
+ "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
@@ -1,4 +1,4 @@
1
- import '../../../dist/chunk-U2IICNHQ.js';
1
+ import '../../../dist/chunk-F2X4B4VY.js';
2
2
  import { Subject } from 'atom.io/internal';
3
3
  import { stringifyJson, parseJson } from 'atom.io/json';
4
4
 
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "private": true,
5
5
  "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
6
+ "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {