atom.io 0.14.4 → 0.14.6

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 (91) hide show
  1. package/data/dist/index.cjs +47 -1416
  2. package/data/dist/index.cjs.map +1 -1
  3. package/data/dist/index.d.cts +16 -317
  4. package/data/dist/index.d.ts +16 -317
  5. package/data/dist/index.js +4 -6
  6. package/data/dist/index.js.map +1 -1
  7. package/dist/chunk-NYTGCPHB.js +261 -0
  8. package/dist/chunk-NYTGCPHB.js.map +1 -0
  9. package/dist/chunk-PZLG2HP3.js +36 -0
  10. package/dist/chunk-PZLG2HP3.js.map +1 -0
  11. package/dist/chunk-XACXFU3B.js +46 -0
  12. package/dist/chunk-XACXFU3B.js.map +1 -0
  13. package/dist/index.cjs +55 -2330
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +21 -269
  16. package/dist/index.d.ts +21 -269
  17. package/dist/index.js +152 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/metafile-cjs.json +1 -1
  20. package/dist/metafile-esm.json +1 -1
  21. package/internal/dist/index.cjs +30 -159
  22. package/internal/dist/index.cjs.map +1 -1
  23. package/internal/dist/index.d.cts +28 -229
  24. package/internal/dist/index.d.ts +28 -229
  25. package/internal/dist/index.js +2027 -1
  26. package/internal/dist/index.js.map +1 -1
  27. package/introspection/dist/index.cjs +45 -1565
  28. package/introspection/dist/index.cjs.map +1 -1
  29. package/introspection/dist/index.d.cts +4 -376
  30. package/introspection/dist/index.d.ts +4 -376
  31. package/introspection/dist/index.js +298 -2
  32. package/introspection/dist/index.js.map +1 -1
  33. package/json/dist/index.cjs +5 -1502
  34. package/json/dist/index.cjs.map +1 -1
  35. package/json/dist/index.d.cts +7 -373
  36. package/json/dist/index.d.ts +7 -373
  37. package/json/dist/index.js +37 -1
  38. package/json/dist/index.js.map +1 -1
  39. package/package.json +1 -1
  40. package/react/dist/index.cjs +14 -1549
  41. package/react/dist/index.cjs.map +1 -1
  42. package/react/dist/index.d.cts +4 -377
  43. package/react/dist/index.d.ts +4 -377
  44. package/react/dist/index.js +62 -2
  45. package/react/dist/index.js.map +1 -1
  46. package/react-devtools/dist/index.cjs +135 -2153
  47. package/react-devtools/dist/index.cjs.map +1 -1
  48. package/react-devtools/dist/index.d.cts +24 -149
  49. package/react-devtools/dist/index.d.ts +24 -149
  50. package/react-devtools/dist/index.js +5 -3
  51. package/react-devtools/dist/index.js.map +1 -1
  52. package/realtime-client/dist/index.cjs +34 -1529
  53. package/realtime-client/dist/index.cjs.map +1 -1
  54. package/realtime-client/dist/index.d.cts +12 -384
  55. package/realtime-client/dist/index.d.ts +12 -384
  56. package/realtime-client/dist/index.js +165 -2
  57. package/realtime-client/dist/index.js.map +1 -1
  58. package/realtime-react/dist/index.cjs +35 -1727
  59. package/realtime-react/dist/index.cjs.map +1 -1
  60. package/realtime-react/dist/index.d.cts +9 -49
  61. package/realtime-react/dist/index.d.ts +9 -49
  62. package/realtime-react/dist/index.js +66 -4
  63. package/realtime-react/dist/index.js.map +1 -1
  64. package/realtime-server/dist/index.cjs +57 -1548
  65. package/realtime-server/dist/index.cjs.map +1 -1
  66. package/realtime-server/dist/index.d.cts +11 -394
  67. package/realtime-server/dist/index.d.ts +11 -394
  68. package/realtime-server/dist/index.js +21 -27
  69. package/realtime-server/dist/index.js.map +1 -1
  70. package/realtime-testing/dist/index.cjs +15 -2376
  71. package/realtime-testing/dist/index.cjs.map +1 -1
  72. package/realtime-testing/dist/index.d.cts +3 -489
  73. package/realtime-testing/dist/index.d.ts +3 -489
  74. package/realtime-testing/dist/index.js +10 -9
  75. package/realtime-testing/dist/index.js.map +1 -1
  76. package/transceivers/set-rtx/dist/index.cjs +9 -31
  77. package/transceivers/set-rtx/dist/index.cjs.map +1 -1
  78. package/transceivers/set-rtx/dist/index.d.cts +3 -29
  79. package/transceivers/set-rtx/dist/index.d.ts +3 -29
  80. package/transceivers/set-rtx/dist/index.js +3 -2
  81. package/transceivers/set-rtx/dist/index.js.map +1 -1
  82. package/dist/chunk-GMN5KH6A.js +0 -309
  83. package/dist/chunk-GMN5KH6A.js.map +0 -1
  84. package/dist/chunk-HQWWV67P.js +0 -62
  85. package/dist/chunk-HQWWV67P.js.map +0 -1
  86. package/dist/chunk-MK4OJD24.js +0 -67
  87. package/dist/chunk-MK4OJD24.js.map +0 -1
  88. package/dist/chunk-N7ADBQJG.js +0 -176
  89. package/dist/chunk-N7ADBQJG.js.map +0 -1
  90. package/dist/chunk-PURABO5G.js +0 -2581
  91. package/dist/chunk-PURABO5G.js.map +0 -1
@@ -1,5 +1,9 @@
1
1
  'use strict';
2
2
 
3
+ var atom_io = require('atom.io');
4
+ var json = require('atom.io/json');
5
+ var internal = require('atom.io/internal');
6
+
3
7
  var __defProp = Object.defineProperty;
4
8
  var __defProps = Object.defineProperties;
5
9
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
@@ -20,77 +24,6 @@ var __spreadValues = (a, b) => {
20
24
  };
21
25
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
22
26
 
23
- // src/get-state.ts
24
- function getState(token, store = IMPLICIT.STORE) {
25
- var _a;
26
- const state = (_a = withdraw(token, store)) != null ? _a : withdrawNewFamilyMember(token, store);
27
- if (state === void 0) {
28
- throw new NotFoundError(token, store);
29
- }
30
- return readOrComputeValue(state, store);
31
- }
32
-
33
- // src/logger.ts
34
- var simpleLog = (logLevel) => (icon, tokenType, tokenKey, message, ...rest) => {
35
- console[logLevel](`${icon} ${tokenType} "${tokenKey}" ${message}`, ...rest);
36
- };
37
- var simpleLogger = {
38
- error: simpleLog(`error`),
39
- info: simpleLog(`info`),
40
- warn: simpleLog(`warn`)
41
- };
42
- var AtomIOLogger = class {
43
- constructor(logLevel, filter, logger = simpleLogger) {
44
- this.logLevel = logLevel;
45
- this.filter = filter;
46
- this.logger = logger;
47
- this.error = (...args) => {
48
- var _a, _b;
49
- if (((_b = (_a = this.filter) == null ? void 0 : _a.call(this, ...args)) != null ? _b : true) && this.logLevel !== null) {
50
- this.logger.error(...args);
51
- }
52
- };
53
- this.info = (...args) => {
54
- var _a, _b;
55
- if (((_b = (_a = this.filter) == null ? void 0 : _a.call(this, ...args)) != null ? _b : true) && this.logLevel === `info`) {
56
- this.logger.info(...args);
57
- }
58
- };
59
- this.warn = (...args) => {
60
- var _a, _b;
61
- if (((_b = (_a = this.filter) == null ? void 0 : _a.call(this, ...args)) != null ? _b : true) && this.logLevel !== `error` && this.logLevel !== null) {
62
- this.logger.warn(...args);
63
- }
64
- };
65
- }
66
- };
67
-
68
- // src/set-state.ts
69
- function setState(token, value, store = IMPLICIT.STORE) {
70
- var _a;
71
- const rejection = openOperation(token, store);
72
- if (rejection) {
73
- return;
74
- }
75
- const state = (_a = withdraw(token, store)) != null ? _a : withdrawNewFamilyMember(token, store);
76
- if (state === void 0) {
77
- throw new NotFoundError(token, store);
78
- }
79
- setAtomOrSelector(state, value, store);
80
- closeOperation(store);
81
- }
82
-
83
- // src/transaction.ts
84
- var runTransaction = (token, store = IMPLICIT.STORE) => (...parameters) => {
85
- const tx = withdraw(token, store);
86
- if (tx) {
87
- return tx.run(...parameters);
88
- }
89
- throw new Error(
90
- `Cannot run transaction "${token.key}": transaction not found in store "${store.config.name}".`
91
- );
92
- };
93
-
94
27
  // internal/src/future.ts
95
28
  var Future = class extends Promise {
96
29
  constructor(executor) {
@@ -169,44 +102,6 @@ var evictCachedValue = (key, store) => {
169
102
  store.logger.info(`\u{1F5D1}`, `state`, key, `evicted`);
170
103
  };
171
104
 
172
- // ../anvl/src/json/index.ts
173
- var parseJson = (str) => JSON.parse(str);
174
- var stringifyJson = (json) => JSON.stringify(json);
175
-
176
- // json/src/select-json.ts
177
- var selectJson = (atom, transform, store = IMPLICIT.STORE) => {
178
- return createSelector(
179
- {
180
- key: `${atom.key}:JSON`,
181
- get: ({ get }) => transform.toJson(get(atom)),
182
- set: ({ set }, newValue) => set(atom, transform.fromJson(newValue))
183
- },
184
- void 0,
185
- store
186
- );
187
- };
188
-
189
- // json/src/select-json-family.ts
190
- var selectJsonFamily = (atomFamily, transform, store = IMPLICIT.STORE) => {
191
- const jsonFamily = createSelectorFamily(
192
- {
193
- key: `${atomFamily.key}:JSON`,
194
- get: (key) => ({ get }) => transform.toJson(get(atomFamily(key))),
195
- set: (key) => ({ set }, newValue) => set(atomFamily(key), transform.fromJson(newValue))
196
- },
197
- store
198
- );
199
- atomFamily.subject.subscribe(
200
- `store=${store.config.name}::json-selector-family`,
201
- (token) => {
202
- if (token.family) {
203
- jsonFamily(parseJson(token.family.subKey));
204
- }
205
- }
206
- );
207
- return jsonFamily;
208
- };
209
-
210
105
  // internal/src/read-or-compute-value.ts
211
106
  var readOrComputeValue = (state, store) => {
212
107
  if (isValueCached(state.key, store)) {
@@ -813,7 +708,7 @@ var Store = class {
813
708
  name: `IMPLICIT_STORE`
814
709
  };
815
710
  this.loggers = [
816
- new AtomIOLogger(`warn`, (_, __, key) => !key.includes(`\u{1F441}\u200D\u{1F5E8}`))
711
+ new atom_io.AtomIOLogger(`warn`, (_, __, key) => !key.includes(`\u{1F441}\u200D\u{1F5E8}`))
817
712
  ];
818
713
  this.logger = {
819
714
  error: (...messages) => {
@@ -1204,10 +1099,8 @@ var subscribeToRootAtoms = (state, store) => {
1204
1099
  });
1205
1100
  return dependencySubscriptions;
1206
1101
  };
1207
-
1208
- // internal/src/subscribe/subscribe-to-state.ts
1209
1102
  function subscribeToState(token, handleUpdate, key, store) {
1210
- const state = withdraw(token, store);
1103
+ const state = internal.withdraw(token, store);
1211
1104
  if (state === void 0) {
1212
1105
  throw new Error(
1213
1106
  `State "${token.key}" not found in this store. Did you forget to initialize with the "atom" or "selector" function?`
@@ -1215,7 +1108,7 @@ function subscribeToState(token, handleUpdate, key, store) {
1215
1108
  }
1216
1109
  const unsubFunction = state.subject.subscribe(key, handleUpdate);
1217
1110
  store.logger.info(`\u{1F440}`, state.type, state.key, `Adding subscription "${key}"`);
1218
- const dependencyUnsubFunctions = state.type !== `atom` ? subscribeToRootAtoms(state, store) : null;
1111
+ const dependencyUnsubFunctions = state.type !== `atom` ? internal.subscribeToRootAtoms(state, store) : null;
1219
1112
  const unsubscribe = dependencyUnsubFunctions === null ? () => {
1220
1113
  store.logger.info(
1221
1114
  `\u{1F648}`,
@@ -1238,10 +1131,8 @@ function subscribeToState(token, handleUpdate, key, store) {
1238
1131
  };
1239
1132
  return unsubscribe;
1240
1133
  }
1241
-
1242
- // internal/src/subscribe/subscribe-to-timeline.ts
1243
1134
  var subscribeToTimeline = (token, handleUpdate, key, store) => {
1244
- const tl = withdraw(token, store);
1135
+ const tl = internal.withdraw(token, store);
1245
1136
  if (tl === void 0) {
1246
1137
  throw new Error(
1247
1138
  `Cannot subscribe to timeline "${token.key}": timeline not found in store "${store.config.name}".`
@@ -1259,10 +1150,8 @@ var subscribeToTimeline = (token, handleUpdate, key, store) => {
1259
1150
  unsubscribe();
1260
1151
  };
1261
1152
  };
1262
-
1263
- // internal/src/subscribe/subscribe-to-transaction.ts
1264
1153
  var subscribeToTransaction = (token, handleUpdate, key, store) => {
1265
- const tx = withdraw(token, store);
1154
+ const tx = internal.withdraw(token, store);
1266
1155
  if (tx === void 0) {
1267
1156
  throw new Error(
1268
1157
  `Cannot subscribe to transaction "${token.key}": transaction not found in store "${store.config.name}".`
@@ -1285,8 +1174,6 @@ var subscribeToTransaction = (token, handleUpdate, key, store) => {
1285
1174
  unsubscribe();
1286
1175
  };
1287
1176
  };
1288
-
1289
- // internal/src/mutable/tracker.ts
1290
1177
  var Tracker = class {
1291
1178
  constructor(mutableState, store) {
1292
1179
  this.unsubscribeFromInnerValue = null;
@@ -1320,7 +1207,7 @@ var Tracker = class {
1320
1207
  return latestUpdateState;
1321
1208
  }
1322
1209
  observeCore(mutableState, latestUpdateState, store) {
1323
- const originalInnerValue = getState(mutableState, store);
1210
+ const originalInnerValue = atom_io.getState(mutableState, store);
1324
1211
  const target = newest(store);
1325
1212
  this.unsubscribeFromInnerValue = originalInnerValue.subscribe(
1326
1213
  `tracker:${store.config.name}:${target.transactionMeta === null ? `main` : target.transactionMeta.update.key}`,
@@ -1329,7 +1216,7 @@ var Tracker = class {
1329
1216
  mutableState.key,
1330
1217
  () => {
1331
1218
  unsubscribe();
1332
- setState(latestUpdateState, update, store);
1219
+ atom_io.setState(latestUpdateState, update, store);
1333
1220
  }
1334
1221
  );
1335
1222
  }
@@ -1348,7 +1235,7 @@ var Tracker = class {
1348
1235
  mutableState.key,
1349
1236
  () => {
1350
1237
  unsubscribe();
1351
- setState(latestUpdateState, update2, store);
1238
+ atom_io.setState(latestUpdateState, update2, store);
1352
1239
  }
1353
1240
  );
1354
1241
  }
@@ -1373,7 +1260,7 @@ var Tracker = class {
1373
1260
  { key: timelineId, type: `timeline` },
1374
1261
  (update) => {
1375
1262
  unsubscribe2();
1376
- setState(
1263
+ atom_io.setState(
1377
1264
  mutableState,
1378
1265
  (transceiver) => {
1379
1266
  if (update === `redo` && newValue) {
@@ -1396,11 +1283,11 @@ var Tracker = class {
1396
1283
  latestUpdateState.key,
1397
1284
  () => {
1398
1285
  unsubscribe();
1399
- const mutable = getState(mutableState, store);
1286
+ const mutable = atom_io.getState(mutableState, store);
1400
1287
  const updateNumber = newValue === null ? -1 : mutable.getUpdateNumber(newValue);
1401
1288
  const eventOffset = updateNumber - mutable.cacheUpdateNumber;
1402
1289
  if (newValue && eventOffset === 1) {
1403
- setState(
1290
+ atom_io.setState(
1404
1291
  mutableState,
1405
1292
  (transceiver) => (transceiver.do(newValue), transceiver),
1406
1293
  store
@@ -1425,7 +1312,7 @@ function createMutableAtom(options, store) {
1425
1312
  );
1426
1313
  const coreState = createAtom(options, void 0, store);
1427
1314
  new Tracker(coreState, store);
1428
- const jsonState = selectJson(coreState, options, store);
1315
+ const jsonState = json.selectJson(coreState, options, store);
1429
1316
  const target = newest(store);
1430
1317
  subscribeToState(
1431
1318
  jsonState,
@@ -1440,13 +1327,11 @@ function createMutableAtom(options, store) {
1440
1327
  );
1441
1328
  return coreState;
1442
1329
  }
1443
-
1444
- // internal/src/families/create-atom-family.ts
1445
1330
  function createAtomFamily(options, store) {
1446
1331
  const subject = new Subject();
1447
1332
  const atomFamily = Object.assign(
1448
1333
  (key) => {
1449
- const subKey = stringifyJson(key);
1334
+ const subKey = json.stringifyJson(key);
1450
1335
  const family = { key: options.key, subKey };
1451
1336
  const fullKey = `${options.key}(${subKey})`;
1452
1337
  const existing = withdraw({ key: fullKey, type: `atom` }, store);
@@ -1479,14 +1364,12 @@ function createAtomFamily(options, store) {
1479
1364
  target.families.set(options.key, atomFamily);
1480
1365
  return atomFamily;
1481
1366
  }
1482
-
1483
- // internal/src/families/create-readonly-selector-family.ts
1484
1367
  function createReadonlySelectorFamily(options, store) {
1485
1368
  const subject = new Subject();
1486
1369
  return Object.assign(
1487
1370
  (key) => {
1488
1371
  const target = newest(store);
1489
- const subKey = stringifyJson(key);
1372
+ const subKey = json.stringifyJson(key);
1490
1373
  const family = { key: options.key, subKey };
1491
1374
  const fullKey = `${options.key}(${subKey})`;
1492
1375
  const existing = target.readonlySelectors.get(fullKey);
@@ -1509,8 +1392,6 @@ function createReadonlySelectorFamily(options, store) {
1509
1392
  }
1510
1393
  );
1511
1394
  }
1512
-
1513
- // internal/src/families/create-selector-family.ts
1514
1395
  function createSelectorFamily(options, store) {
1515
1396
  const isReadonly = !(`set` in options);
1516
1397
  if (isReadonly) {
@@ -1520,7 +1401,7 @@ function createSelectorFamily(options, store) {
1520
1401
  const subject = new Subject();
1521
1402
  const selectorFamily = Object.assign(
1522
1403
  (key) => {
1523
- const subKey = stringifyJson(key);
1404
+ const subKey = json.stringifyJson(key);
1524
1405
  const family = { key: options.key, subKey };
1525
1406
  const fullKey = `${options.key}(${subKey})`;
1526
1407
  const existing = target.selectors.get(fullKey);
@@ -1563,7 +1444,7 @@ var FamilyTracker = class {
1563
1444
  `store=${store.config.name}::tracker-atom-family`,
1564
1445
  (atomToken) => {
1565
1446
  if (atomToken.family) {
1566
- const key = parseJson(atomToken.family.subKey);
1447
+ const key = json.parseJson(atomToken.family.subKey);
1567
1448
  this.findLatestUpdateState(key);
1568
1449
  new Tracker(atomToken, store);
1569
1450
  }
@@ -1573,7 +1454,7 @@ var FamilyTracker = class {
1573
1454
  `store=${store.config.name}::tracker-atom-family`,
1574
1455
  (atomToken) => {
1575
1456
  if (atomToken.family) {
1576
- const key = parseJson(atomToken.family.subKey);
1457
+ const key = json.parseJson(atomToken.family.subKey);
1577
1458
  const mutableAtomToken = this.findMutableState(key);
1578
1459
  new Tracker(mutableAtomToken, store);
1579
1460
  }
@@ -1588,7 +1469,7 @@ function createMutableAtomFamily(options, store) {
1588
1469
  createAtomFamily(options, store),
1589
1470
  options
1590
1471
  );
1591
- selectJsonFamily(coreFamily, options);
1472
+ json.selectJsonFamily(coreFamily, options);
1592
1473
  new FamilyTracker(coreFamily, store);
1593
1474
  return coreFamily;
1594
1475
  }
@@ -1708,7 +1589,7 @@ function createAtom(options, family, store) {
1708
1589
  const cleanupFunctions = [];
1709
1590
  for (const effect of options.effects) {
1710
1591
  const cleanup = effect({
1711
- setSelf: (next) => setState(token, next, store),
1592
+ setSelf: (next) => atom_io.setState(token, next, store),
1712
1593
  onSet: (handle) => subscribeToState(token, handle, `effect[${effectIndex}]`, store)
1713
1594
  });
1714
1595
  if (cleanup) {
@@ -2127,8 +2008,6 @@ function createTimeline(options, store, data) {
2127
2008
  store.subject.timelineCreation.next(token);
2128
2009
  return token;
2129
2010
  }
2130
-
2131
- // internal/src/timeline/time-travel.ts
2132
2011
  var timeTravel = (direction, token, store) => {
2133
2012
  const action = direction === `forward` ? `redo` : `undo`;
2134
2013
  store.logger.info(
@@ -2164,7 +2043,7 @@ var timeTravel = (direction, token, store) => {
2164
2043
  const updateValues = (atomUpdate) => {
2165
2044
  const { key, newValue, oldValue } = atomUpdate;
2166
2045
  const value = direction === `forward` ? newValue : oldValue;
2167
- setState({ key, type: `atom` }, value, store);
2046
+ atom_io.setState({ key, type: `atom` }, value, store);
2168
2047
  };
2169
2048
  const updateValuesFromTransactionUpdate = (transactionUpdate) => {
2170
2049
  const updates = direction === `forward` ? transactionUpdate.updates : [...transactionUpdate.updates].reverse();
@@ -2226,8 +2105,6 @@ var abortTransaction = (store) => {
2226
2105
  );
2227
2106
  target.parent.child = null;
2228
2107
  };
2229
-
2230
- // internal/src/transaction/apply-transaction.ts
2231
2108
  function ingestAtomUpdate(update, parent, child) {
2232
2109
  var _a, _b, _c;
2233
2110
  const { key, newValue } = update;
@@ -2255,7 +2132,7 @@ function ingestAtomUpdate(update, parent, child) {
2255
2132
  );
2256
2133
  }
2257
2134
  }
2258
- setState(token, newValue, parent);
2135
+ atom_io.setState(token, newValue, parent);
2259
2136
  }
2260
2137
  function ingestTransactionUpdate(transactionUpdate, parent, child) {
2261
2138
  for (const update of transactionUpdate.updates) {
@@ -2355,8 +2232,6 @@ var buildTransaction = (key, params, store) => {
2355
2232
  params
2356
2233
  );
2357
2234
  };
2358
-
2359
- // internal/src/transaction/create-transaction.ts
2360
2235
  function createTransaction(options, store) {
2361
2236
  const newTransaction = {
2362
2237
  key: options.key,
@@ -2366,9 +2241,9 @@ function createTransaction(options, store) {
2366
2241
  try {
2367
2242
  const output = options.do(
2368
2243
  {
2369
- get: (token2) => getState(token2, store),
2370
- set: (token2, value) => setState(token2, value, store),
2371
- run: (token2) => runTransaction(token2, store)
2244
+ get: (token2) => atom_io.getState(token2, store),
2245
+ set: (token2, value) => atom_io.setState(token2, value, store),
2246
+ run: (token2) => atom_io.runTransaction(token2, store)
2372
2247
  },
2373
2248
  ...params
2374
2249
  );
@@ -2389,8 +2264,6 @@ function createTransaction(options, store) {
2389
2264
  store.subject.transactionCreation.next(token);
2390
2265
  return token;
2391
2266
  }
2392
-
2393
- // internal/src/transaction/redo-transaction.ts
2394
2267
  var redoTransactionUpdate = (transactionUpdate, store) => {
2395
2268
  store.logger.info(`\u23ED\uFE0F`, `transaction`, transactionUpdate.key, `Redo`);
2396
2269
  for (const update of transactionUpdate.updates) {
@@ -2403,14 +2276,12 @@ var redoTransactionUpdate = (transactionUpdate, store) => {
2403
2276
  `State "${token.key}" not found in this store. This is surprising, because we are navigating the history of the store.`
2404
2277
  );
2405
2278
  }
2406
- setState(state, newValue, store);
2279
+ atom_io.setState(state, newValue, store);
2407
2280
  } else {
2408
2281
  redoTransactionUpdate(update, store);
2409
2282
  }
2410
2283
  }
2411
2284
  };
2412
-
2413
- // internal/src/transaction/undo-transaction.ts
2414
2285
  var undoTransactionUpdate = (transactionUpdate, store) => {
2415
2286
  store.logger.info(`\u23EE\uFE0F`, `transaction`, transactionUpdate.key, `Undo`);
2416
2287
  for (const update of transactionUpdate.updates.reverse()) {
@@ -2423,7 +2294,7 @@ var undoTransactionUpdate = (transactionUpdate, store) => {
2423
2294
  `State "${token.key}" not found in this store. This is surprising, because we are navigating the history of the store.`
2424
2295
  );
2425
2296
  }
2426
- setState(state, newValue, store);
2297
+ atom_io.setState(state, newValue, store);
2427
2298
  } else {
2428
2299
  undoTransactionUpdate(update, store);
2429
2300
  }