atom.io 0.25.5 → 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 (54) hide show
  1. package/data/dist/index.js +33 -25
  2. package/data/package.json +1 -4
  3. package/data/src/join.ts +0 -1
  4. package/dist/{chunk-HYXKCFVY.js → chunk-IBTHB2PI.js} +59 -60
  5. package/dist/{chunk-MR5NETHW.js → chunk-IW6WYRS7.js} +4 -5
  6. package/dist/chunk-XWL6SNVU.js +7 -0
  7. package/dist/index.js +33 -21
  8. package/ephemeral/dist/index.js +1 -1
  9. package/ephemeral/package.json +1 -4
  10. package/eslint-plugin/dist/index.d.ts +1 -1
  11. package/eslint-plugin/dist/index.js +7 -8
  12. package/eslint-plugin/package.json +1 -4
  13. package/immortal/dist/index.js +1 -1
  14. package/immortal/package.json +1 -4
  15. package/internal/dist/index.js +173 -160
  16. package/internal/package.json +1 -4
  17. package/introspection/dist/index.js +32 -30
  18. package/introspection/package.json +1 -4
  19. package/json/dist/index.js +1 -1
  20. package/json/package.json +1 -4
  21. package/package.json +27 -58
  22. package/react/dist/index.js +2 -2
  23. package/react/package.json +1 -4
  24. package/react-devtools/dist/index.js +75 -68
  25. package/react-devtools/package.json +1 -4
  26. package/realtime/dist/index.js +8 -9
  27. package/realtime/package.json +1 -4
  28. package/realtime-client/dist/index.js +6 -6
  29. package/realtime-client/package.json +1 -4
  30. package/realtime-react/dist/index.js +9 -11
  31. package/realtime-react/package.json +1 -4
  32. package/realtime-server/dist/index.js +59 -54
  33. package/realtime-server/package.json +1 -4
  34. package/realtime-testing/dist/index.js +3 -3
  35. package/realtime-testing/package.json +1 -4
  36. package/transceivers/set-rtx/dist/index.js +11 -11
  37. package/transceivers/set-rtx/package.json +1 -4
  38. package/data/dist/index.cjs +0 -953
  39. package/dist/chunk-S4N6XNPH.js +0 -38
  40. package/dist/index.cjs +0 -215
  41. package/ephemeral/dist/index.cjs +0 -11
  42. package/eslint-plugin/dist/index.cjs +0 -388
  43. package/immortal/dist/index.cjs +0 -14
  44. package/internal/dist/index.cjs +0 -3405
  45. package/introspection/dist/index.cjs +0 -449
  46. package/json/dist/index.cjs +0 -128
  47. package/react/dist/index.cjs +0 -118
  48. package/react-devtools/dist/index.cjs +0 -2191
  49. package/realtime/dist/index.cjs +0 -120
  50. package/realtime-client/dist/index.cjs +0 -569
  51. package/realtime-react/dist/index.cjs +0 -189
  52. package/realtime-server/dist/index.cjs +0 -965
  53. package/realtime-testing/dist/index.cjs +0 -201
  54. 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.5",
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,
@@ -56,16 +56,16 @@
56
56
  "@types/npmlog": "7.0.0",
57
57
  "@types/react": "18.3.3",
58
58
  "@types/tmp": "0.2.6",
59
- "@typescript-eslint/parser": "7.17.0",
60
- "@typescript-eslint/rule-tester": "7.17.0",
61
- "@vitest/coverage-v8": "2.0.4",
62
- "@vitest/ui": "2.0.4",
59
+ "@typescript-eslint/parser": "8.0.0",
60
+ "@typescript-eslint/rule-tester": "8.0.0",
61
+ "@vitest/coverage-v8": "2.0.5",
62
+ "@vitest/ui": "2.0.5",
63
63
  "concurrently": "8.2.2",
64
- "drizzle-kit": "0.23.0",
64
+ "drizzle-kit": "0.23.1",
65
65
  "drizzle-orm": "0.32.1",
66
66
  "eslint": "npm:eslint@8.57.0",
67
- "eslint-v9": "npm:eslint@9.7.0",
68
- "framer-motion": "11.3.17",
67
+ "eslint-v9": "npm:eslint@9.8.0",
68
+ "framer-motion": "11.3.19",
69
69
  "happy-dom": "14.12.3",
70
70
  "http-proxy": "1.18.1",
71
71
  "npmlog": "7.0.1",
@@ -78,10 +78,11 @@
78
78
  "socket.io-client": "4.7.5",
79
79
  "tmp": "0.2.3",
80
80
  "tsup": "8.2.3",
81
+ "tsx": "4.16.4",
81
82
  "typescript": "5.5.4",
82
- "vite": "5.3.4",
83
+ "vite": "5.3.5",
83
84
  "vite-tsconfig-paths": "4.3.2",
84
- "vitest": "2.0.4"
85
+ "vitest": "2.0.5"
85
86
  },
86
87
  "main": "dist/index.js",
87
88
  "types": "dist/index.d.ts",
@@ -137,115 +138,83 @@
137
138
  "exports": {
138
139
  "./package.json": "./package.json",
139
140
  ".": {
140
- "types": "./dist/index.d.ts",
141
- "browser": "./dist/index.js",
142
141
  "import": "./dist/index.js",
143
- "require": "./dist/index.cjs"
142
+ "types": "./dist/index.d.ts"
144
143
  },
145
144
  "./data/package.json": "./data/package.json",
146
145
  "./data": {
147
- "types": "./data/dist/index.d.ts",
148
- "browser": "./data/dist/index.js",
149
146
  "import": "./data/dist/index.js",
150
- "require": "./data/dist/index.cjs"
147
+ "types": "./data/dist/index.d.ts"
151
148
  },
152
149
  "./ephemeral/package.json": "./ephemeral/package.json",
153
150
  "./ephemeral": {
154
- "types": "./ephemeral/dist/index.d.ts",
155
- "browser": "./ephemeral/dist/index.js",
156
151
  "import": "./ephemeral/dist/index.js",
157
- "require": "./ephemeral/dist/index.cjs"
152
+ "types": "./ephemeral/dist/index.d.ts"
158
153
  },
159
154
  "./eslint-plugin/package.json": "./eslint-plugin/package.json",
160
155
  "./eslint-plugin": {
161
- "types": "./eslint-plugin/dist/index.d.ts",
162
- "browser": "./eslint-plugin/dist/index.js",
163
156
  "import": "./eslint-plugin/dist/index.js",
164
- "require": "./eslint-plugin/dist/index.cjs"
157
+ "types": "./eslint-plugin/dist/index.d.ts"
165
158
  },
166
159
  "./immortal/package.json": "./immortal/package.json",
167
160
  "./immortal": {
168
- "types": "./immortal/dist/index.d.ts",
169
- "browser": "./immortal/dist/index.js",
170
161
  "import": "./immortal/dist/index.js",
171
- "require": "./immortal/dist/index.cjs"
162
+ "types": "./immortal/dist/index.d.ts"
172
163
  },
173
164
  "./internal/package.json": "./internal/package.json",
174
165
  "./internal": {
175
- "types": "./internal/dist/index.d.ts",
176
- "browser": "./internal/dist/index.js",
177
166
  "import": "./internal/dist/index.js",
178
- "require": "./internal/dist/index.cjs"
167
+ "types": "./internal/dist/index.d.ts"
179
168
  },
180
169
  "./introspection/package.json": "./introspection/package.json",
181
170
  "./introspection": {
182
- "types": "./introspection/dist/index.d.ts",
183
- "browser": "./introspection/dist/index.js",
184
171
  "import": "./introspection/dist/index.js",
185
- "require": "./introspection/dist/index.cjs"
172
+ "types": "./introspection/dist/index.d.ts"
186
173
  },
187
174
  "./json/package.json": "./json/package.json",
188
175
  "./json": {
189
- "types": "./json/dist/index.d.ts",
190
- "browser": "./json/dist/index.js",
191
176
  "import": "./json/dist/index.js",
192
- "require": "./json/dist/index.cjs"
177
+ "types": "./json/dist/index.d.ts"
193
178
  },
194
179
  "./react/package.json": "./react/package.json",
195
180
  "./react": {
196
- "types": "./react/dist/index.d.ts",
197
- "browser": "./react/dist/index.js",
198
181
  "import": "./react/dist/index.js",
199
- "require": "./react/dist/index.cjs"
182
+ "types": "./react/dist/index.d.ts"
200
183
  },
201
184
  "./react-devtools/package.json": "./react-devtools/package.json",
202
185
  "./react-devtools": {
203
- "types": "./react-devtools/dist/index.d.ts",
204
- "browser": "./react-devtools/dist/index.js",
205
186
  "import": "./react-devtools/dist/index.js",
206
- "require": "./react-devtools/dist/index.cjs"
187
+ "types": "./react-devtools/dist/index.d.ts"
207
188
  },
208
189
  "./realtime/package.json": "./realtime/package.json",
209
190
  "./realtime": {
210
- "types": "./realtime/dist/index.d.ts",
211
- "browser": "./realtime/dist/index.js",
212
191
  "import": "./realtime/dist/index.js",
213
- "require": "./realtime/dist/index.cjs"
192
+ "types": "./realtime/dist/index.d.ts"
214
193
  },
215
194
  "./realtime-client/package.json": "./realtime-client/package.json",
216
195
  "./realtime-client": {
217
- "types": "./realtime-client/dist/index.d.ts",
218
- "browser": "./realtime-client/dist/index.js",
219
196
  "import": "./realtime-client/dist/index.js",
220
- "require": "./realtime-client/dist/index.cjs"
197
+ "types": "./realtime-client/dist/index.d.ts"
221
198
  },
222
199
  "./realtime-react/package.json": "./realtime-react/package.json",
223
200
  "./realtime-react": {
224
- "types": "./realtime-react/dist/index.d.ts",
225
- "browser": "./realtime-react/dist/index.js",
226
201
  "import": "./realtime-react/dist/index.js",
227
- "require": "./realtime-react/dist/index.cjs"
202
+ "types": "./realtime-react/dist/index.d.ts"
228
203
  },
229
204
  "./realtime-server/package.json": "./realtime-server/package.json",
230
205
  "./realtime-server": {
231
- "types": "./realtime-server/dist/index.d.ts",
232
- "browser": "./realtime-server/dist/index.js",
233
206
  "import": "./realtime-server/dist/index.js",
234
- "require": "./realtime-server/dist/index.cjs"
207
+ "types": "./realtime-server/dist/index.d.ts"
235
208
  },
236
209
  "./realtime-testing/package.json": "./realtime-testing/package.json",
237
210
  "./realtime-testing": {
238
- "types": "./realtime-testing/dist/index.d.ts",
239
- "browser": "./realtime-testing/dist/index.js",
240
211
  "import": "./realtime-testing/dist/index.js",
241
- "require": "./realtime-testing/dist/index.cjs"
212
+ "types": "./realtime-testing/dist/index.d.ts"
242
213
  },
243
214
  "./transceivers/set-rtx/package.json": "./transceivers/set-rtx/package.json",
244
215
  "./transceivers/set-rtx": {
245
- "types": "./transceivers/set-rtx/dist/index.d.ts",
246
- "browser": "./transceivers/set-rtx/dist/index.js",
247
216
  "import": "./transceivers/set-rtx/dist/index.js",
248
- "require": "./transceivers/set-rtx/dist/index.cjs"
217
+ "types": "./transceivers/set-rtx/dist/index.d.ts"
249
218
  }
250
219
  },
251
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
  }