atom.io 0.30.7 → 0.31.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 (80) hide show
  1. package/data/dist/index.d.ts +20 -18
  2. package/data/dist/index.js +104 -172
  3. package/data/src/join.ts +138 -210
  4. package/dist/{chunk-UDHCFTYT.js → chunk-42UH5F5Q.js} +356 -744
  5. package/dist/chunk-ICGFFQ3H.js +272 -0
  6. package/dist/index.d.ts +52 -103
  7. package/dist/index.js +3 -11
  8. package/eslint-plugin/dist/index.d.ts +22 -3
  9. package/eslint-plugin/dist/index.js +7 -7
  10. package/immortal/dist/index.d.ts +1 -2
  11. package/immortal/dist/index.js +0 -3
  12. package/immortal/src/seek-state.ts +2 -14
  13. package/internal/dist/index.d.ts +48 -84
  14. package/internal/dist/index.js +2 -2
  15. package/internal/src/atom/dispose-atom.ts +31 -15
  16. package/internal/src/families/dispose-from-store.ts +15 -44
  17. package/internal/src/families/find-in-store.ts +15 -8
  18. package/internal/src/families/init-family-member.ts +1 -1
  19. package/internal/src/families/seek-in-store.ts +2 -14
  20. package/internal/src/get-state/get-from-store.ts +13 -79
  21. package/internal/src/get-trace.ts +7 -0
  22. package/internal/src/index.ts +2 -1
  23. package/internal/src/ingest-updates/ingest-creation-disposal.ts +63 -70
  24. package/internal/src/ingest-updates/ingest-transaction-update.ts +4 -0
  25. package/internal/src/junction.ts +52 -12
  26. package/internal/src/lineage.ts +0 -7
  27. package/internal/src/molecule.ts +7 -0
  28. package/internal/src/mutable/transceiver.ts +5 -5
  29. package/internal/src/pretty-print.ts +0 -4
  30. package/internal/src/selector/dispose-selector.ts +3 -5
  31. package/internal/src/selector/register-selector.ts +2 -26
  32. package/internal/src/set-state/set-into-store.ts +3 -2
  33. package/internal/src/store/counterfeit.ts +11 -25
  34. package/internal/src/store/deposit.ts +5 -39
  35. package/internal/src/store/store.ts +51 -12
  36. package/internal/src/store/withdraw.ts +3 -26
  37. package/internal/src/timeline/create-timeline.ts +133 -237
  38. package/internal/src/timeline/time-travel.ts +1 -8
  39. package/internal/src/transaction/build-transaction.ts +10 -5
  40. package/internal/src/transaction/index.ts +1 -1
  41. package/internal/src/utility-types.ts +2 -0
  42. package/introspection/dist/index.d.ts +2 -3
  43. package/introspection/dist/index.js +9 -9
  44. package/introspection/src/refinery.ts +1 -3
  45. package/json/dist/index.js +9 -40
  46. package/json/src/index.ts +2 -0
  47. package/json/src/select-json-family.ts +7 -44
  48. package/package.json +33 -28
  49. package/react/dist/index.js +2 -10
  50. package/react/src/parse-state-overloads.ts +3 -11
  51. package/react-devtools/dist/index.js +13 -13
  52. package/react-devtools/src/Updates.tsx +2 -0
  53. package/realtime-client/dist/index.d.ts +20 -12
  54. package/realtime-client/dist/index.js +241 -244
  55. package/realtime-client/src/continuity/index.ts +3 -0
  56. package/realtime-client/src/continuity/register-and-attempt-confirmed-update.ts +231 -0
  57. package/realtime-client/src/continuity/use-conceal-state.ts +11 -0
  58. package/realtime-client/src/continuity/use-reveal-state.ts +19 -0
  59. package/realtime-client/src/index.ts +1 -0
  60. package/realtime-client/src/sync-continuity.ts +18 -262
  61. package/realtime-react/dist/index.js +2 -2
  62. package/realtime-server/dist/index.d.ts +1 -1
  63. package/realtime-server/dist/index.js +2 -2
  64. package/realtime-server/src/index.ts +1 -1
  65. package/realtime-testing/dist/index.js +2 -3
  66. package/realtime-testing/src/setup-realtime-test.tsx +1 -2
  67. package/src/allocate.ts +311 -145
  68. package/src/dispose-state.ts +5 -21
  69. package/src/get-state.ts +3 -21
  70. package/src/molecule.ts +11 -133
  71. package/src/silo.ts +1 -12
  72. package/src/timeline.ts +2 -3
  73. package/src/transaction.ts +25 -38
  74. package/dist/chunk-ADMEAXYU.js +0 -167
  75. package/internal/src/molecule/create-molecule-family.ts +0 -30
  76. package/internal/src/molecule/dispose-molecule.ts +0 -79
  77. package/internal/src/molecule/grow-molecule-in-store.ts +0 -95
  78. package/internal/src/molecule/index.ts +0 -5
  79. package/internal/src/molecule/make-molecule-in-store.ts +0 -191
  80. package/internal/src/molecule/molecule-internal.ts +0 -52
@@ -9,7 +9,6 @@ import { getFromStore } from "../get-state"
9
9
  import { Junction } from "../junction"
10
10
  import { LazyMap } from "../lazy-map"
11
11
  import { newest } from "../lineage"
12
- import { makeMoleculeInStore } from "../molecule"
13
12
  import { getJsonToken } from "../mutable"
14
13
  import { setIntoStore } from "../set-state"
15
14
  import type { Store } from "../store"
@@ -35,6 +34,7 @@ export const buildTransaction = (
35
34
  atoms: new LazyMap(parent.atoms),
36
35
  atomsThatAreDefault: new Set(parent.atomsThatAreDefault),
37
36
  families: new LazyMap(parent.families),
37
+ joins: new LazyMap(parent.joins),
38
38
  operation: { open: false },
39
39
  readonlySelectors: new LazyMap(parent.readonlySelectors),
40
40
  timelines: new LazyMap(parent.timelines),
@@ -50,8 +50,15 @@ export const buildTransaction = (
50
50
  defaults: parent.defaults,
51
51
  disposalTraces: store.disposalTraces.copy(),
52
52
  molecules: new LazyMap(parent.molecules),
53
- moleculeFamilies: new LazyMap(parent.moleculeFamilies),
54
- moleculeInProgress: parent.moleculeInProgress,
53
+ moleculeGraph: new Junction(parent.moleculeGraph.toJSON(), {
54
+ makeContentKey: parent.moleculeGraph.makeContentKey,
55
+ }),
56
+ moleculeData: new Junction(parent.moleculeData.toJSON(), {
57
+ makeContentKey: parent.moleculeData.makeContentKey,
58
+ }),
59
+ moleculeJoins: new Junction(parent.moleculeJoins.toJSON(), {
60
+ makeContentKey: parent.moleculeJoins.makeContentKey,
61
+ }),
55
62
  miscResources: new LazyMap(parent.miscResources),
56
63
  }
57
64
  const epoch = getEpochNumberOfAction(key, store)
@@ -77,8 +84,6 @@ export const buildTransaction = (
77
84
  find: ((token, k) => findInStore(child, token, k)) as typeof findState,
78
85
  seek: ((token, k) => seekInStore(child, token, k)) as typeof seekState,
79
86
  json: (token) => getJsonToken(child, token),
80
- make: (context, family, k, ...args) =>
81
- makeMoleculeInStore(child, context, family, k, ...args),
82
87
  dispose: ((...ps: Parameters<typeof disposeState>) => {
83
88
  disposeFromStore(child, ...ps)
84
89
  }) as typeof disposeState,
@@ -1,6 +1,6 @@
1
1
  import type { ActorToolkit, TransactionUpdate } from "atom.io"
2
- import type { Junction } from "rel8/junction"
3
2
 
3
+ import type { Junction } from "../junction"
4
4
  import type { Func } from "../utility-types"
5
5
 
6
6
  export * from "./abort-transaction"
@@ -14,3 +14,5 @@ export type Count<N extends number, A extends any[] = []> = [
14
14
  export type Each<E extends any[]> = {
15
15
  [P in Count<E[`length`]>]: E[P]
16
16
  }
17
+
18
+ export type Refinement<A, B extends A> = (a: A) => a is B
@@ -1,6 +1,6 @@
1
1
  import { AtomToken, SelectorToken, ReadonlySelectorToken, TransactionToken, ReadonlySelectorFamilyToken, TransactionUpdate, TimelineToken, ReadableToken } from 'atom.io';
2
2
  import * as Internal from 'atom.io/internal';
3
- import { Func, Timeline, Store, Flat } from 'atom.io/internal';
3
+ import { Func, Timeline, Store, Refinement, Flat } from 'atom.io/internal';
4
4
  import { Json } from 'atom.io/json';
5
5
 
6
6
  type AtomTokenIndex = WritableTokenIndex<AtomToken<unknown>>;
@@ -55,7 +55,6 @@ declare class Auditor {
55
55
  [Symbol.dispose](): void;
56
56
  }
57
57
 
58
- type Refinement<A, B extends A> = (a: A) => a is B;
59
58
  type ClassSignature = abstract new (...args: any) => any;
60
59
  type RefinementStrategy = ClassSignature | Refinement<unknown, any>;
61
60
  type Supported<Refine extends RefinementStrategy> = Refine extends Refinement<unknown, infer T> ? T : Refine extends ClassSignature ? InstanceType<Refine> : never;
@@ -147,4 +146,4 @@ type FamilyNode<Token extends ReadableToken<unknown>> = {
147
146
  };
148
147
  type WritableTokenIndex<Token extends ReadableToken<unknown>> = Map<string, FamilyNode<Token> | Token>;
149
148
 
150
- export { Auditor, type ClassSignature, Differ, type FamilyNode, type InspectNode, type InspectionResult, type IntrospectionStates, type JsonType, type ListResourcesParam, type Refinement, type RefinementStrategy, type RefinementSupport, Refinery, type Supported, type WritableTokenIndex, attachIntrospectionStates, diffArray, diffBoolean, diffNumber, diffObject, diffString, discoverType, isPlainObject, jsonRefinery, jsonTreeRefinery, prettyJson, primitiveRefinery, sprawl };
149
+ export { Auditor, type ClassSignature, Differ, type FamilyNode, type InspectNode, type InspectionResult, type IntrospectionStates, type JsonType, type ListResourcesParam, type RefinementStrategy, type RefinementSupport, Refinery, type Supported, type WritableTokenIndex, attachIntrospectionStates, diffArray, diffBoolean, diffNumber, diffObject, diffString, discoverType, isPlainObject, jsonRefinery, jsonTreeRefinery, prettyJson, primitiveRefinery, sprawl };
@@ -40,7 +40,7 @@ var attachAtomIndex = (store) => {
40
40
  if (atomToken.family) {
41
41
  const { key: familyKey, subKey } = atomToken.family;
42
42
  let familyNode = self.get(familyKey);
43
- if (familyNode === void 0 || !(`familyMembers` in familyNode)) {
43
+ if (familyNode === undefined || !(`familyMembers` in familyNode)) {
44
44
  familyNode = {
45
45
  key: familyKey,
46
46
  familyMembers: /* @__PURE__ */ new Map()
@@ -74,7 +74,7 @@ var attachAtomIndex = (store) => {
74
74
  }
75
75
  ]
76
76
  },
77
- void 0
77
+ undefined
78
78
  );
79
79
  return createStandaloneSelector(store, {
80
80
  key: `\u{1F50D} Atom Token Index`,
@@ -122,7 +122,7 @@ var attachSelectorIndex = (store) => {
122
122
  if (selectorToken.family) {
123
123
  const { key: familyKey, subKey } = selectorToken.family;
124
124
  let familyNode = self.get(familyKey);
125
- if (familyNode === void 0 || !(`familyMembers` in familyNode)) {
125
+ if (familyNode === undefined || !(`familyMembers` in familyNode)) {
126
126
  familyNode = {
127
127
  key: familyKey,
128
128
  familyMembers: /* @__PURE__ */ new Map()
@@ -160,7 +160,7 @@ var attachSelectorIndex = (store) => {
160
160
  }
161
161
  ]
162
162
  },
163
- void 0
163
+ undefined
164
164
  );
165
165
  return createStandaloneSelector(store, {
166
166
  key: `\u{1F50D} Selector Token Index`,
@@ -220,7 +220,7 @@ var attachTimelineIndex = (store) => {
220
220
  }
221
221
  ]
222
222
  },
223
- void 0
223
+ undefined
224
224
  );
225
225
  const timelineTokenIndex = createStandaloneSelector(store, {
226
226
  key: `\u{1F50D} Timeline Token Index`,
@@ -247,7 +247,7 @@ var attachTransactionIndex = (store) => {
247
247
  }
248
248
  ]
249
249
  },
250
- void 0
250
+ undefined
251
251
  );
252
252
  const transactionTokenIndex = createStandaloneSelector(store, {
253
253
  key: `\u{1F50D} Transaction Token Index`,
@@ -326,7 +326,7 @@ var jsonRefinery = new Refinery({
326
326
  ...jsonTreeRefinery.supported
327
327
  });
328
328
  var discoverType = (input) => {
329
- if (input === void 0) {
329
+ if (input === undefined) {
330
330
  return `undefined`;
331
331
  }
332
332
  const refined = jsonRefinery.refine(input);
@@ -523,7 +523,7 @@ function diffObject(a, b, recurse) {
523
523
  let key;
524
524
  for (key of path) {
525
525
  const nodeB = b[key];
526
- if (nodeB === void 0) {
526
+ if (nodeB === undefined) {
527
527
  removed.push([key, JSON.stringify(nodeA)]);
528
528
  } else {
529
529
  const delta = recurse(nodeA, nodeB);
@@ -537,7 +537,7 @@ function diffObject(a, b, recurse) {
537
537
  let key;
538
538
  for (key of path) {
539
539
  const nodeA = a[key];
540
- if (nodeA === void 0) {
540
+ if (nodeA === undefined) {
541
541
  added.push([key, JSON.stringify(nodeB)]);
542
542
  }
543
543
  }
@@ -1,8 +1,6 @@
1
- import type { Flat } from "atom.io/internal"
1
+ import type { Flat, Refinement } from "atom.io/internal"
2
2
  import type { Json } from "atom.io/json"
3
3
 
4
- export type Refinement<A, B extends A> = (a: A) => a is B
5
-
6
4
  export type ClassSignature = abstract new (...args: any) => any
7
5
 
8
6
  export type RefinementStrategy = ClassSignature | Refinement<unknown, any>
@@ -1,7 +1,7 @@
1
- import { createWritableSelectorFamily } from '../../dist/chunk-UDHCFTYT.js';
2
- import '../../dist/chunk-ADMEAXYU.js';
1
+ import { createWritableSelectorFamily } from '../../dist/chunk-42UH5F5Q.js';
2
+ import '../../dist/chunk-ICGFFQ3H.js';
3
3
  import '../../dist/chunk-XWL6SNVU.js';
4
- import { createStandaloneSelector, IMPLICIT, growMoleculeInStore, initFamilyMemberInStore, withdraw, seekInStore } from 'atom.io/internal';
4
+ import { createStandaloneSelector, IMPLICIT, withdraw, seekInStore } from 'atom.io/internal';
5
5
 
6
6
  // json/src/entries.ts
7
7
  function fromEntries(entries) {
@@ -24,43 +24,12 @@ function selectJsonFamily(atomFamilyToken, transform, store = IMPLICIT.STORE) {
24
24
  store,
25
25
  {
26
26
  key: `${atomFamilyToken.key}:JSON`,
27
- get: (key) => ({ seek, get }) => {
28
- const existingState = seek(atomFamilyToken, key);
29
- if (existingState) {
30
- return transform.toJson(get(existingState));
31
- }
32
- const stringKey = stringifyJson(key);
33
- const molecule = store.molecules.get(stringKey);
34
- if (molecule) {
35
- const atom = growMoleculeInStore(molecule, atomFamilyToken, store);
36
- return transform.toJson(get(atom));
37
- }
38
- if (store.config.lifespan === `immortal`) {
39
- throw new Error(`No molecule found for key "${stringKey}"`);
40
- }
41
- const newToken = initFamilyMemberInStore(store, atomFamilyToken, key);
42
- return transform.toJson(get(newToken));
27
+ get: (key) => ({ get }) => {
28
+ const baseState = get(atomFamilyToken, key);
29
+ return transform.toJson(baseState);
43
30
  },
44
- set: (key) => ({ seek, set }, newValue) => {
45
- const existingState = seek(atomFamilyToken, key);
46
- if (existingState) {
47
- set(existingState, transform.fromJson(newValue));
48
- } else {
49
- const stringKey = stringifyJson(key);
50
- const molecule = store.molecules.get(stringKey);
51
- if (molecule) {
52
- const atom = growMoleculeInStore(molecule, atomFamilyToken, store);
53
- set(atom, transform.fromJson(newValue));
54
- } else {
55
- if (store.config.lifespan === `immortal`) {
56
- throw new Error(`No molecule found for key "${stringKey}"`);
57
- }
58
- set(
59
- initFamilyMemberInStore(store, atomFamilyToken, key),
60
- transform.fromJson(newValue)
61
- );
62
- }
63
- }
31
+ set: (key) => ({ set }, newValue) => {
32
+ set(atomFamilyToken, key, transform.fromJson(newValue));
64
33
  }
65
34
  },
66
35
  [`mutable`, `json`]
@@ -89,7 +58,7 @@ var JSON_PROTOTYPES = [
89
58
  ];
90
59
  var isJson = (input) => {
91
60
  if (input === null) return true;
92
- if (input === void 0) return false;
61
+ if (input === undefined) return false;
93
62
  const prototype = Object.getPrototypeOf(input);
94
63
  return JSON_PROTOTYPES.includes(prototype);
95
64
  };
package/json/src/index.ts CHANGED
@@ -6,7 +6,9 @@ export type primitive = boolean | number | string | null
6
6
 
7
7
  export namespace Json {
8
8
  export namespace Tree {
9
+ // eslint-disable-next-line @typescript-eslint/no-shadow
9
10
  export type Array<Element = unknown> = ReadonlyArray<Element>
11
+ // eslint-disable-next-line @typescript-eslint/no-shadow
10
12
  export type Object<K extends string = string, V = unknown> = Record<K, V>
11
13
  export type Fork = Array | Object
12
14
  export type Leaf = primitive
@@ -1,16 +1,10 @@
1
1
  import type * as AtomIO from "atom.io"
2
2
  import type { Store, Transceiver } from "atom.io/internal"
3
- import {
4
- growMoleculeInStore,
5
- IMPLICIT,
6
- initFamilyMemberInStore,
7
- seekInStore,
8
- withdraw,
9
- } from "atom.io/internal"
3
+ import { IMPLICIT, seekInStore, withdraw } from "atom.io/internal"
10
4
 
11
5
  import { createWritableSelectorFamily } from "../../internal/src/families/create-writable-selector-family"
12
6
  import type { Canonical, Json, JsonInterface } from "."
13
- import { parseJson, stringifyJson } from "."
7
+ import { parseJson } from "."
14
8
 
15
9
  export function selectJsonFamily<
16
10
  T extends Transceiver<any>,
@@ -47,45 +41,14 @@ export function selectJsonFamily<
47
41
  key: `${atomFamilyToken.key}:JSON`,
48
42
  get:
49
43
  (key) =>
50
- ({ seek, get }) => {
51
- const existingState = seek(atomFamilyToken, key)
52
- if (existingState) {
53
- return transform.toJson(get(existingState))
54
- }
55
- const stringKey = stringifyJson(key)
56
- const molecule = store.molecules.get(stringKey)
57
- if (molecule) {
58
- const atom = growMoleculeInStore(molecule, atomFamilyToken, store)
59
- return transform.toJson(get(atom))
60
- }
61
- if (store.config.lifespan === `immortal`) {
62
- throw new Error(`No molecule found for key "${stringKey}"`)
63
- }
64
- const newToken = initFamilyMemberInStore(store, atomFamilyToken, key)
65
- return transform.toJson(get(newToken))
44
+ ({ get }) => {
45
+ const baseState = get(atomFamilyToken, key)
46
+ return transform.toJson(baseState)
66
47
  },
67
48
  set:
68
49
  (key) =>
69
- ({ seek, set }, newValue) => {
70
- const existingState = seek(atomFamilyToken, key)
71
- if (existingState) {
72
- set(existingState, transform.fromJson(newValue))
73
- } else {
74
- const stringKey = stringifyJson(key)
75
- const molecule = store.molecules.get(stringKey)
76
- if (molecule) {
77
- const atom = growMoleculeInStore(molecule, atomFamilyToken, store)
78
- set(atom, transform.fromJson(newValue))
79
- } else {
80
- if (store.config.lifespan === `immortal`) {
81
- throw new Error(`No molecule found for key "${stringKey}"`)
82
- }
83
- set(
84
- initFamilyMemberInStore(store, atomFamilyToken, key),
85
- transform.fromJson(newValue),
86
- )
87
- }
88
- }
50
+ ({ set }, newValue) => {
51
+ set(atomFamilyToken, key, transform.fromJson(newValue))
89
52
  },
90
53
  },
91
54
  [`mutable`, `json`],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atom.io",
3
- "version": "0.30.7",
3
+ "version": "0.31.0",
4
4
  "description": "Composable and testable reactive data library.",
5
5
  "homepage": "https://atom.io.fyi",
6
6
  "sideEffects": false,
@@ -52,40 +52,45 @@
52
52
  }
53
53
  },
54
54
  "devDependencies": {
55
- "@testing-library/react": "16.1.0",
55
+ "@testing-library/react": "16.2.0",
56
56
  "@types/eslint": "9.6.1",
57
57
  "@types/estree": "1.0.6",
58
- "@types/http-proxy": "1.17.15",
58
+ "@types/http-proxy": "1.17.16",
59
59
  "@types/npmlog": "7.0.0",
60
- "@types/react": "19.0.2",
60
+ "@types/react": "19.0.10",
61
61
  "@types/tmp": "0.2.6",
62
- "@typescript-eslint/parser": "8.19.0",
63
- "@typescript-eslint/rule-tester": "8.19.0",
64
- "@vitest/coverage-v8": "3.0.0-beta.3",
65
- "@vitest/ui": "3.0.0-beta.3",
62
+ "@typescript-eslint/parser": "8.24.1",
63
+ "@typescript-eslint/rule-tester": "8.24.1",
64
+ "@typescript-eslint/utils": "8.24.1",
65
+ "@vitest/coverage-v8": "3.0.6",
66
+ "@vitest/ui": "3.0.6",
67
+ "bun-types": "1.2.2",
66
68
  "concurrently": "9.1.2",
67
- "drizzle-kit": "0.30.1",
68
- "drizzle-orm": "0.38.3",
69
- "eslint": "9.17.0",
70
- "happy-dom": "16.3.0",
69
+ "drizzle-kit": "0.30.4",
70
+ "drizzle-orm": "0.39.3",
71
+ "eslint": "9.20.1",
72
+ "happy-dom": "17.1.1",
71
73
  "http-proxy": "1.18.1",
72
- "motion": "11.15.0",
74
+ "motion": "12.4.7",
73
75
  "npmlog": "7.0.1",
76
+ "nyc": "17.1.0",
74
77
  "postgres": "3.4.5",
75
- "preact": "10.25.4",
78
+ "preact": "10.26.2",
76
79
  "react": "19.0.0",
77
80
  "react-dom": "19.0.0",
78
- "react-router-dom": "7.1.1",
81
+ "react-router-dom": "7.2.0",
79
82
  "socket.io": "4.8.1",
80
83
  "socket.io-client": "4.8.1",
81
84
  "tmp": "0.2.3",
82
- "tsup": "8.3.5",
83
- "tsx": "4.19.2",
84
- "typescript": "5.7.2",
85
- "vite": "6.0.7",
85
+ "tsup": "8.3.6",
86
+ "tsx": "4.19.3",
87
+ "typescript": "5.7.3",
88
+ "vite": "6.1.1",
86
89
  "vite-tsconfig-paths": "5.1.4",
87
- "vitest": "3.0.0-beta.3",
88
- "zod": "3.24.1"
90
+ "vitest": "3.0.6",
91
+ "zod": "3.24.2",
92
+ "break-check": "0.6.6",
93
+ "recoverage": "0.0.6"
89
94
  },
90
95
  "main": "dist/index.js",
91
96
  "types": "dist/index.d.ts",
@@ -251,17 +256,17 @@
251
256
  "build:transceivers:set-rtx": "cd transceivers/set-rtx && tsup",
252
257
  "build:web": "cd web && tsup",
253
258
  "lint:biome": "biome check -- .",
254
- "lint:eslint": "eslint --flag unstable_ts_config -- .",
255
- "lint:eslint:build": "bun run build:main",
259
+ "lint:eslint": "eslint -- .",
256
260
  "lint:types": "tsc --noEmit",
257
- "lint:types:watch": "tsc --watch --noEmit",
258
- "lint": "bun run lint:biome && bun run lint:eslint && bun run lint:types",
261
+ "watch:types": "tsc --watch --noEmit",
262
+ "lint": "concurrently \"bun:lint:*\"",
259
263
  "test": "vitest",
260
- "test:coverage": "vitest run --coverage",
261
- "test:once": "bun run test:manifest && cross-env IMPORT=dist vitest run",
264
+ "test:coverage": "vitest run --coverage && recoverage",
265
+ "test:build": "bun run test:manifest && cross-env IMPORT=dist vitest run",
266
+ "test:once": "echo tested built code",
262
267
  "test:once:public": "cross-env IMPORT=dist vitest run public",
263
268
  "test:manifest": "tsx __scripts__/manifest-test.node.ts",
264
- "test:semver": "bun ../break-check/src/break-check.x.ts --verbose",
269
+ "test:semver": "break-check --verbose",
265
270
  "postversion": "biome format --write package.json"
266
271
  }
267
272
  }
@@ -1,5 +1,5 @@
1
1
  import '../../dist/chunk-XWL6SNVU.js';
2
- import { IMPLICIT, setIntoStore, subscribeToState, getFromStore, findInStore, getJsonToken, withdraw, subscribeToTimeline, seekInStore, NotFoundError } from 'atom.io/internal';
2
+ import { IMPLICIT, setIntoStore, subscribeToState, getFromStore, findInStore, getJsonToken, withdraw, subscribeToTimeline } from 'atom.io/internal';
3
3
  import * as React5 from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
  import { undo, redo } from 'atom.io';
@@ -11,15 +11,7 @@ function parseStateOverloads(store, ...rest) {
11
11
  if (rest.length === 2) {
12
12
  const family = rest[0];
13
13
  const key = rest[1];
14
- if (store.config.lifespan === `immortal`) {
15
- const maybeToken = seekInStore(store, family, key);
16
- if (!maybeToken) {
17
- throw new NotFoundError(family, key, store);
18
- }
19
- token = maybeToken;
20
- } else {
21
- token = findInStore(store, family, key);
22
- }
14
+ token = findInStore(store, family, key);
23
15
  } else {
24
16
  token = rest[0];
25
17
  }
@@ -5,8 +5,8 @@ import type {
5
5
  WritableToken,
6
6
  } from "atom.io"
7
7
  import type { Store } from "atom.io/internal"
8
- import { findInStore, NotFoundError, seekInStore } from "atom.io/internal"
9
- import type { Canonical, Json } from "atom.io/json"
8
+ import { findInStore } from "atom.io/internal"
9
+ import type { Canonical } from "atom.io/json"
10
10
 
11
11
  export function parseStateOverloads<T, K extends Canonical>(
12
12
  store: Store,
@@ -27,15 +27,7 @@ export function parseStateOverloads<T, K extends Canonical>(
27
27
  const family = rest[0]
28
28
  const key = rest[1]
29
29
 
30
- if (store.config.lifespan === `immortal`) {
31
- const maybeToken = seekInStore(store, family, key)
32
- if (!maybeToken) {
33
- throw new NotFoundError(family, key, store)
34
- }
35
- token = maybeToken
36
- } else {
37
- token = findInStore(store, family, key)
38
- }
30
+ token = findInStore(store, family, key)
39
31
  } else {
40
32
  token = rest[0]
41
33
  }
@@ -92,7 +92,7 @@ function clampInto(min, max) {
92
92
  return (value) => value < min ? min : value > max ? max : value;
93
93
  }
94
94
  function round(value, decimalPlaces) {
95
- if (decimalPlaces === void 0) return value;
95
+ if (decimalPlaces === undefined) return value;
96
96
  const factor = 10 ** decimalPlaces;
97
97
  return Math.round(value * factor) / factor;
98
98
  }
@@ -130,7 +130,7 @@ var initRefinery = (constraints) => (input) => {
130
130
  return constrained;
131
131
  };
132
132
  var valueToText = (numericValue) => {
133
- if (numericValue === null || numericValue === void 0) {
133
+ if (numericValue === null || numericValue === undefined) {
134
134
  return ``;
135
135
  }
136
136
  return numericValue.toString();
@@ -154,7 +154,7 @@ var NumberInput = ({
154
154
  const [temporaryEntry, setTemporaryEntry] = useState(null);
155
155
  const userHasMadeDeliberateChange = useRef(false);
156
156
  const refine = initRefinery({ max, min, decimalPlaces, nullable: true });
157
- const allowDecimal = decimalPlaces === void 0 || decimalPlaces > 0;
157
+ const allowDecimal = decimalPlaces === undefined || decimalPlaces > 0;
158
158
  const handleBlur = () => {
159
159
  if (userHasMadeDeliberateChange.current) {
160
160
  set(refine(value ?? null));
@@ -164,7 +164,7 @@ var NumberInput = ({
164
164
  };
165
165
  const handleChange = (event) => {
166
166
  if (onChange) onChange(event);
167
- if (set === void 0) return;
167
+ if (set === undefined) return;
168
168
  userHasMadeDeliberateChange.current = true;
169
169
  const input = event.target.value;
170
170
  if (isValidNonNumber(input) || isDecimalInProgress(input)) {
@@ -233,7 +233,7 @@ var TextInput = ({
233
233
  type: "text",
234
234
  value,
235
235
  onChange: (e) => set?.(e.target.value),
236
- disabled: set === void 0,
236
+ disabled: set === undefined,
237
237
  placeholder,
238
238
  "data-testid": testid
239
239
  }
@@ -244,7 +244,7 @@ var TextInput = ({
244
244
  type: "text",
245
245
  value,
246
246
  onChange: (e) => set?.(e.target.value),
247
- disabled: set === void 0,
247
+ disabled: set === undefined,
248
248
  placeholder,
249
249
  "data-testid": testid
250
250
  }
@@ -255,7 +255,7 @@ var NonJsonEditor = ({
255
255
  data,
256
256
  testid
257
257
  }) => {
258
- return data === void 0 ? /* @__PURE__ */ jsx(
258
+ return data === undefined ? /* @__PURE__ */ jsx(
259
259
  ElasticInput,
260
260
  {
261
261
  disabled: true,
@@ -316,7 +316,7 @@ var JsonEditor_INTERNAL = ({
316
316
  ElasticInput,
317
317
  {
318
318
  value: name,
319
- onChange: disabled ? void 0 : (e) => {
319
+ onChange: disabled ? undefined : (e) => {
320
320
  rename(e.target.value);
321
321
  },
322
322
  disabled,
@@ -340,7 +340,7 @@ var JsonEditor_INTERNAL = ({
340
340
  recast && dataIsJson ? /* @__PURE__ */ jsx(
341
341
  "select",
342
342
  {
343
- onChange: disabled ? void 0 : (e) => {
343
+ onChange: disabled ? undefined : (e) => {
344
344
  recast(e.target.value);
345
345
  },
346
346
  value: refined.type,
@@ -744,7 +744,7 @@ var NumberEditor = ({
744
744
  {
745
745
  testid: `${testid}-number-input`,
746
746
  value: data,
747
- set: isReadonly(path) ? void 0 : (newValue) => {
747
+ set: isReadonly(path) ? undefined : (newValue) => {
748
748
  set(Number(newValue));
749
749
  },
750
750
  autoSize: true
@@ -763,7 +763,7 @@ var StringEditor = ({
763
763
  {
764
764
  testid: `${testid}-string-input`,
765
765
  value: data,
766
- set: isReadonly(path) ? void 0 : set,
766
+ set: isReadonly(path) ? undefined : set,
767
767
  autoSize: true
768
768
  }
769
769
  ) });
@@ -1132,7 +1132,7 @@ var TransactionUpdateFC = ({ serialNumber, transactionUpdate }) => {
1132
1132
  /* @__PURE__ */ jsxs("section", { className: "transaction_impact", children: [
1133
1133
  /* @__PURE__ */ jsx("span", { className: "detail", children: "impact: " }),
1134
1134
  transactionUpdate.updates.filter(
1135
- (token) => token.type !== `molecule_creation` && token.type !== `molecule_disposal` && token.type !== `state_creation` && token.type !== `state_disposal` && !token.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)
1135
+ (token) => token.type !== `molecule_creation` && token.type !== `molecule_disposal` && token.type !== `molecule_transfer` && token.type !== `state_creation` && token.type !== `state_disposal` && !token.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)
1136
1136
  ).map((update, index) => {
1137
1137
  switch (update.type) {
1138
1138
  case `atom_update`:
@@ -1178,7 +1178,7 @@ var TimelineUpdateFC = ({ timelineUpdate, serialNumber }) => {
1178
1178
  ")"
1179
1179
  ] }) }),
1180
1180
  /* @__PURE__ */ jsx("main", { children: timelineUpdate.type === `transaction_update` ? timelineUpdate.updates.filter(
1181
- (token) => token.type !== `molecule_creation` && token.type !== `molecule_disposal` && token.type !== `state_creation` && token.type !== `state_disposal` && !token.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)
1181
+ (token) => token.type !== `molecule_creation` && token.type !== `molecule_disposal` && token.type !== `molecule_transfer` && token.type !== `state_creation` && token.type !== `state_disposal` && !token.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)
1182
1182
  ).map((update, index) => {
1183
1183
  switch (update.type) {
1184
1184
  case `atom_update`:
@@ -95,6 +95,7 @@ const TransactionUpdateFC: React.FC<{
95
95
  (token) =>
96
96
  token.type !== `molecule_creation` &&
97
97
  token.type !== `molecule_disposal` &&
98
+ token.type !== `molecule_transfer` &&
98
99
  token.type !== `state_creation` &&
99
100
  token.type !== `state_disposal` &&
100
101
  !token.key.startsWith(`👁‍🗨`),
@@ -148,6 +149,7 @@ export const TimelineUpdateFC: React.FC<{
148
149
  (token) =>
149
150
  token.type !== `molecule_creation` &&
150
151
  token.type !== `molecule_disposal` &&
152
+ token.type !== `molecule_transfer` &&
151
153
  token.type !== `state_creation` &&
152
154
  token.type !== `state_disposal` &&
153
155
  !token.key.startsWith(`👁‍🗨`),