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.
Files changed (52) hide show
  1. package/data/dist/index.js +33 -25
  2. package/data/package.json +1 -4
  3. package/dist/{chunk-HYXKCFVY.js → chunk-IBTHB2PI.js} +59 -60
  4. package/dist/{chunk-MR5NETHW.js → chunk-IW6WYRS7.js} +4 -5
  5. package/dist/chunk-XWL6SNVU.js +7 -0
  6. package/dist/index.js +33 -21
  7. package/ephemeral/dist/index.js +1 -1
  8. package/ephemeral/package.json +1 -4
  9. package/eslint-plugin/dist/index.js +7 -8
  10. package/eslint-plugin/package.json +1 -4
  11. package/immortal/dist/index.js +1 -1
  12. package/immortal/package.json +1 -4
  13. package/internal/dist/index.js +173 -160
  14. package/internal/package.json +1 -4
  15. package/introspection/dist/index.js +32 -30
  16. package/introspection/package.json +1 -4
  17. package/json/dist/index.js +1 -1
  18. package/json/package.json +1 -4
  19. package/package.json +18 -50
  20. package/react/dist/index.js +2 -2
  21. package/react/package.json +1 -4
  22. package/react-devtools/dist/index.js +75 -68
  23. package/react-devtools/package.json +1 -4
  24. package/realtime/dist/index.js +8 -9
  25. package/realtime/package.json +1 -4
  26. package/realtime-client/dist/index.js +6 -6
  27. package/realtime-client/package.json +1 -4
  28. package/realtime-react/dist/index.js +9 -11
  29. package/realtime-react/package.json +1 -4
  30. package/realtime-server/dist/index.js +59 -54
  31. package/realtime-server/package.json +1 -4
  32. package/realtime-testing/dist/index.js +3 -3
  33. package/realtime-testing/package.json +1 -4
  34. package/transceivers/set-rtx/dist/index.js +11 -11
  35. package/transceivers/set-rtx/package.json +1 -4
  36. package/data/dist/index.cjs +0 -953
  37. package/dist/chunk-S4N6XNPH.js +0 -38
  38. package/dist/index.cjs +0 -215
  39. package/ephemeral/dist/index.cjs +0 -11
  40. package/eslint-plugin/dist/index.cjs +0 -388
  41. package/immortal/dist/index.cjs +0 -14
  42. package/internal/dist/index.cjs +0 -3405
  43. package/introspection/dist/index.cjs +0 -449
  44. package/json/dist/index.cjs +0 -128
  45. package/react/dist/index.cjs +0 -118
  46. package/react-devtools/dist/index.cjs +0 -2191
  47. package/realtime/dist/index.cjs +0 -120
  48. package/realtime-client/dist/index.cjs +0 -569
  49. package/realtime-react/dist/index.cjs +0 -189
  50. package/realtime-server/dist/index.cjs +0 -965
  51. package/realtime-testing/dist/index.cjs +0 -201
  52. package/transceivers/set-rtx/dist/index.cjs +0 -215
@@ -2,14 +2,11 @@
2
2
  "name": "atom.io-internal",
3
3
  "type": "module",
4
4
  "private": true,
5
- "main": "dist/index.cjs",
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 { __spreadValues } from '../../dist/chunk-S4N6XNPH.js';
1
+ import '../../dist/chunk-XWL6SNVU.js';
2
2
  import * as Internal from 'atom.io/internal';
3
3
  import { createRegularAtom, deposit, createStandaloneSelector, IMPLICIT, createRegularAtomFamily, Subject, createSelectorFamily } from 'atom.io/internal';
4
4
  import { getState } from 'atom.io';
@@ -177,27 +177,24 @@ var attachTimelineFamily = (store = IMPLICIT.STORE) => {
177
177
  const findTimelineLogState__INTERNAL = createRegularAtomFamily(
178
178
  {
179
179
  key: `\u{1F441}\u200D\u{1F5E8} Timeline Update Log (Internal)`,
180
- default: (key) => {
181
- var _a;
182
- return (_a = store.timelines.get(key)) != null ? _a : {
183
- type: `timeline`,
184
- key: ``,
185
- at: 0,
186
- timeTraveling: null,
187
- history: [],
188
- selectorTime: null,
189
- transactionKey: null,
190
- install: () => {
191
- },
192
- subject: new Subject(),
193
- subscriptions: /* @__PURE__ */ new Map()
194
- };
180
+ default: (key) => store.timelines.get(key) ?? {
181
+ type: `timeline`,
182
+ key: ``,
183
+ at: 0,
184
+ timeTraveling: null,
185
+ history: [],
186
+ selectorTime: null,
187
+ transactionKey: null,
188
+ install: () => {
189
+ },
190
+ subject: new Subject(),
191
+ subscriptions: /* @__PURE__ */ new Map()
195
192
  },
196
193
  effects: (key) => [
197
194
  ({ setSelf }) => {
198
195
  const tl = store.timelines.get(key);
199
- tl == null ? void 0 : tl.subject.subscribe(`introspection`, (_) => {
200
- setSelf(__spreadValues({}, tl));
196
+ tl?.subject.subscribe(`introspection`, (_) => {
197
+ setSelf({ ...tl });
201
198
  });
202
199
  }
203
200
  ]
@@ -281,7 +278,7 @@ var attachTransactionLogs = (store = IMPLICIT.STORE) => {
281
278
  effects: (key) => [
282
279
  ({ setSelf }) => {
283
280
  const tx = store.transactions.get(key);
284
- tx == null ? void 0 : tx.subject.subscribe(`introspection`, (transactionUpdate) => {
281
+ tx?.subject.subscribe(`introspection`, (transactionUpdate) => {
285
282
  if (transactionUpdate.key === key) {
286
283
  setSelf((state) => [...state, transactionUpdate]);
287
284
  }
@@ -312,15 +309,12 @@ var attachIntrospectionStates = (store = Internal.IMPLICIT.STORE) => {
312
309
  findTimelineState: attachTimelineFamily(store)
313
310
  };
314
311
  };
315
- var _Auditor = class _Auditor {
312
+ var Auditor = class _Auditor {
316
313
  /**
317
314
  * @param {Store} store - The store to audit.
318
315
  */
319
316
  constructor(store = Internal.IMPLICIT.STORE) {
320
317
  this.store = store;
321
- this.auditorCreatedAt = performance.now();
322
- this.statesCreatedAt = /* @__PURE__ */ new Map();
323
- this.disposed = false;
324
318
  this.atomIndex = attachAtomIndex(this.store);
325
319
  this.selectorIndex = attachSelectorIndex(this.store);
326
320
  this.unsubscribeFromAtomCreation = this.store.on.atomCreation.subscribe(
@@ -351,6 +345,19 @@ var _Auditor = class _Auditor {
351
345
  }
352
346
  );
353
347
  }
348
+ auditorCreatedAt = performance.now();
349
+ statesCreatedAt = /* @__PURE__ */ new Map();
350
+ atomIndex;
351
+ selectorIndex;
352
+ disposed = false;
353
+ unsubscribeFromAtomCreation;
354
+ unsubscribeFromAtomDisposal;
355
+ unsubscribeFromSelectorCreation;
356
+ unsubscribeFromSelectorDisposal;
357
+ static DEFAULT_LIST_RESOURCES_PARAM = {
358
+ atomFamilies: true,
359
+ selectorFamilies: true
360
+ };
354
361
  /**
355
362
  * Lists all resources in the store, along with their creation time.
356
363
  *
@@ -376,7 +383,7 @@ var _Auditor = class _Auditor {
376
383
  const tokens = familyNode.familyMembers.values();
377
384
  for (const token of tokens) {
378
385
  const storedTime = this.statesCreatedAt.get(token.key);
379
- const creationTime = storedTime != null ? storedTime : this.auditorCreatedAt;
386
+ const creationTime = storedTime ?? this.auditorCreatedAt;
380
387
  const age = currentTime - creationTime;
381
388
  resources.push([token, age]);
382
389
  }
@@ -387,7 +394,7 @@ var _Auditor = class _Auditor {
387
394
  const tokens = familyNode.familyMembers.values();
388
395
  for (const token of tokens) {
389
396
  const storedTime = this.statesCreatedAt.get(token.key);
390
- const creationTime = storedTime != null ? storedTime : this.auditorCreatedAt;
397
+ const creationTime = storedTime ?? this.auditorCreatedAt;
391
398
  const age = currentTime - creationTime;
392
399
  resources.push([token, age]);
393
400
  }
@@ -403,10 +410,5 @@ var _Auditor = class _Auditor {
403
410
  this.disposed = true;
404
411
  }
405
412
  };
406
- _Auditor.DEFAULT_LIST_RESOURCES_PARAM = {
407
- atomFamilies: true,
408
- selectorFamilies: true
409
- };
410
- var Auditor = _Auditor;
411
413
 
412
414
  export { Auditor, attachIntrospectionStates };
@@ -2,14 +2,11 @@
2
2
  "name": "atom.io-introspection",
3
3
  "type": "module",
4
4
  "private": true,
5
- "main": "dist/index.cjs",
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,6 +1,6 @@
1
1
  import { stringifyJson, parseJson } from '../../dist/chunk-BF4MVQF6.js';
2
2
  export { JSON_DEFAULTS, JSON_TYPE_NAMES, isBoolean, isNull, isNumber, isPrimitive, isString, parseJson, stringSetJsonInterface, stringifyJson } from '../../dist/chunk-BF4MVQF6.js';
3
- import '../../dist/chunk-S4N6XNPH.js';
3
+ import '../../dist/chunk-XWL6SNVU.js';
4
4
  import { createStandaloneSelector, IMPLICIT, createSelectorFamily, growMoleculeInStore, initFamilyMemberInStore, seekInStore } from 'atom.io/internal';
5
5
 
6
6
  var selectJson = (atom, transform, store = IMPLICIT.STORE) => {
package/json/package.json CHANGED
@@ -2,14 +2,11 @@
2
2
  "name": "atom.io-json",
3
3
  "type": "module",
4
4
  "private": true,
5
- "main": "dist/index.cjs",
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atom.io",
3
- "version": "0.25.6",
3
+ "version": "0.26.0",
4
4
  "description": "Composable and testable reactive data library.",
5
5
  "homepage": "https://atom.io.fyi",
6
6
  "sideEffects": false,
@@ -78,7 +78,7 @@
78
78
  "socket.io-client": "4.7.5",
79
79
  "tmp": "0.2.3",
80
80
  "tsup": "8.2.3",
81
- "tsx": "4.16.3",
81
+ "tsx": "4.16.4",
82
82
  "typescript": "5.5.4",
83
83
  "vite": "5.3.5",
84
84
  "vite-tsconfig-paths": "4.3.2",
@@ -138,115 +138,83 @@
138
138
  "exports": {
139
139
  "./package.json": "./package.json",
140
140
  ".": {
141
- "types": "./dist/index.d.ts",
142
- "browser": "./dist/index.js",
143
141
  "import": "./dist/index.js",
144
- "require": "./dist/index.cjs"
142
+ "types": "./dist/index.d.ts"
145
143
  },
146
144
  "./data/package.json": "./data/package.json",
147
145
  "./data": {
148
- "types": "./data/dist/index.d.ts",
149
- "browser": "./data/dist/index.js",
150
146
  "import": "./data/dist/index.js",
151
- "require": "./data/dist/index.cjs"
147
+ "types": "./data/dist/index.d.ts"
152
148
  },
153
149
  "./ephemeral/package.json": "./ephemeral/package.json",
154
150
  "./ephemeral": {
155
- "types": "./ephemeral/dist/index.d.ts",
156
- "browser": "./ephemeral/dist/index.js",
157
151
  "import": "./ephemeral/dist/index.js",
158
- "require": "./ephemeral/dist/index.cjs"
152
+ "types": "./ephemeral/dist/index.d.ts"
159
153
  },
160
154
  "./eslint-plugin/package.json": "./eslint-plugin/package.json",
161
155
  "./eslint-plugin": {
162
- "types": "./eslint-plugin/dist/index.d.ts",
163
- "browser": "./eslint-plugin/dist/index.js",
164
156
  "import": "./eslint-plugin/dist/index.js",
165
- "require": "./eslint-plugin/dist/index.cjs"
157
+ "types": "./eslint-plugin/dist/index.d.ts"
166
158
  },
167
159
  "./immortal/package.json": "./immortal/package.json",
168
160
  "./immortal": {
169
- "types": "./immortal/dist/index.d.ts",
170
- "browser": "./immortal/dist/index.js",
171
161
  "import": "./immortal/dist/index.js",
172
- "require": "./immortal/dist/index.cjs"
162
+ "types": "./immortal/dist/index.d.ts"
173
163
  },
174
164
  "./internal/package.json": "./internal/package.json",
175
165
  "./internal": {
176
- "types": "./internal/dist/index.d.ts",
177
- "browser": "./internal/dist/index.js",
178
166
  "import": "./internal/dist/index.js",
179
- "require": "./internal/dist/index.cjs"
167
+ "types": "./internal/dist/index.d.ts"
180
168
  },
181
169
  "./introspection/package.json": "./introspection/package.json",
182
170
  "./introspection": {
183
- "types": "./introspection/dist/index.d.ts",
184
- "browser": "./introspection/dist/index.js",
185
171
  "import": "./introspection/dist/index.js",
186
- "require": "./introspection/dist/index.cjs"
172
+ "types": "./introspection/dist/index.d.ts"
187
173
  },
188
174
  "./json/package.json": "./json/package.json",
189
175
  "./json": {
190
- "types": "./json/dist/index.d.ts",
191
- "browser": "./json/dist/index.js",
192
176
  "import": "./json/dist/index.js",
193
- "require": "./json/dist/index.cjs"
177
+ "types": "./json/dist/index.d.ts"
194
178
  },
195
179
  "./react/package.json": "./react/package.json",
196
180
  "./react": {
197
- "types": "./react/dist/index.d.ts",
198
- "browser": "./react/dist/index.js",
199
181
  "import": "./react/dist/index.js",
200
- "require": "./react/dist/index.cjs"
182
+ "types": "./react/dist/index.d.ts"
201
183
  },
202
184
  "./react-devtools/package.json": "./react-devtools/package.json",
203
185
  "./react-devtools": {
204
- "types": "./react-devtools/dist/index.d.ts",
205
- "browser": "./react-devtools/dist/index.js",
206
186
  "import": "./react-devtools/dist/index.js",
207
- "require": "./react-devtools/dist/index.cjs"
187
+ "types": "./react-devtools/dist/index.d.ts"
208
188
  },
209
189
  "./realtime/package.json": "./realtime/package.json",
210
190
  "./realtime": {
211
- "types": "./realtime/dist/index.d.ts",
212
- "browser": "./realtime/dist/index.js",
213
191
  "import": "./realtime/dist/index.js",
214
- "require": "./realtime/dist/index.cjs"
192
+ "types": "./realtime/dist/index.d.ts"
215
193
  },
216
194
  "./realtime-client/package.json": "./realtime-client/package.json",
217
195
  "./realtime-client": {
218
- "types": "./realtime-client/dist/index.d.ts",
219
- "browser": "./realtime-client/dist/index.js",
220
196
  "import": "./realtime-client/dist/index.js",
221
- "require": "./realtime-client/dist/index.cjs"
197
+ "types": "./realtime-client/dist/index.d.ts"
222
198
  },
223
199
  "./realtime-react/package.json": "./realtime-react/package.json",
224
200
  "./realtime-react": {
225
- "types": "./realtime-react/dist/index.d.ts",
226
- "browser": "./realtime-react/dist/index.js",
227
201
  "import": "./realtime-react/dist/index.js",
228
- "require": "./realtime-react/dist/index.cjs"
202
+ "types": "./realtime-react/dist/index.d.ts"
229
203
  },
230
204
  "./realtime-server/package.json": "./realtime-server/package.json",
231
205
  "./realtime-server": {
232
- "types": "./realtime-server/dist/index.d.ts",
233
- "browser": "./realtime-server/dist/index.js",
234
206
  "import": "./realtime-server/dist/index.js",
235
- "require": "./realtime-server/dist/index.cjs"
207
+ "types": "./realtime-server/dist/index.d.ts"
236
208
  },
237
209
  "./realtime-testing/package.json": "./realtime-testing/package.json",
238
210
  "./realtime-testing": {
239
- "types": "./realtime-testing/dist/index.d.ts",
240
- "browser": "./realtime-testing/dist/index.js",
241
211
  "import": "./realtime-testing/dist/index.js",
242
- "require": "./realtime-testing/dist/index.cjs"
212
+ "types": "./realtime-testing/dist/index.d.ts"
243
213
  },
244
214
  "./transceivers/set-rtx/package.json": "./transceivers/set-rtx/package.json",
245
215
  "./transceivers/set-rtx": {
246
- "types": "./transceivers/set-rtx/dist/index.d.ts",
247
- "browser": "./transceivers/set-rtx/dist/index.js",
248
216
  "import": "./transceivers/set-rtx/dist/index.js",
249
- "require": "./transceivers/set-rtx/dist/index.cjs"
217
+ "types": "./transceivers/set-rtx/dist/index.d.ts"
250
218
  }
251
219
  },
252
220
  "scripts": {
@@ -1,4 +1,4 @@
1
- import '../../dist/chunk-S4N6XNPH.js';
1
+ import '../../dist/chunk-XWL6SNVU.js';
2
2
  import { IMPLICIT, setIntoStore, subscribeToState, getFromStore, findInStore, getJsonToken, withdraw, subscribeToTimeline, seekInStore, NotFoundError } from 'atom.io/internal';
3
3
  import * as React5 from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
@@ -75,7 +75,7 @@ function useTL(token) {
75
75
  };
76
76
  const meta = React5.useRef(rebuildMeta());
77
77
  const retrieve = () => {
78
- if (meta.current.at !== (timeline == null ? void 0 : timeline.at) || meta.current.length !== (timeline == null ? void 0 : timeline.history.length) || tokenRef.current !== token) {
78
+ if (meta.current.at !== timeline?.at || meta.current.length !== timeline?.history.length || tokenRef.current !== token) {
79
79
  tokenRef.current = token;
80
80
  meta.current = rebuildMeta();
81
81
  }
@@ -2,14 +2,11 @@
2
2
  "name": "atom.io-react",
3
3
  "type": "module",
4
4
  "private": true,
5
- "main": "dist/index.cjs",
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
  }