atom.io 0.31.1 → 0.32.1

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 (162) hide show
  1. package/data/dist/index.d.ts +3 -154
  2. package/data/dist/index.js +11 -559
  3. package/data/src/index.ts +0 -2
  4. package/data/src/struct-family.ts +1 -1
  5. package/data/src/struct.ts +1 -2
  6. package/dist/chunk-3PQTWLQQ.js +83 -0
  7. package/dist/chunk-3ZFTRSNG.js +523 -0
  8. package/dist/chunk-4LWKCEW3.js +14 -0
  9. package/dist/chunk-KVI5OBF2.js +153 -0
  10. package/dist/{chunk-Y5MBNTVU.js → chunk-UQEYZ3OI.js} +1814 -721
  11. package/dist/chunk-UYYKOGZQ.js +1034 -0
  12. package/dist/chunk-VRJP2PCU.js +631 -0
  13. package/dist/chunk-X7SD2NXU.js +108 -0
  14. package/dist/index.d.ts +137 -12
  15. package/dist/index.js +1 -228
  16. package/eslint-plugin/dist/index.d.ts +1 -30
  17. package/eslint-plugin/dist/index.js +3 -149
  18. package/eslint-plugin/src/index.ts +0 -1
  19. package/eslint-plugin/src/rules/explicit-state-types.ts +1 -0
  20. package/eslint-plugin/src/rules/index.ts +0 -1
  21. package/eslint-plugin/src/rules/synchronous-selector-dependencies.ts +1 -0
  22. package/eslint-plugin/src/walk.ts +1 -0
  23. package/internal/dist/index.d.ts +129 -58
  24. package/internal/dist/index.js +1 -1
  25. package/internal/src/atom/create-regular-atom.ts +3 -3
  26. package/internal/src/atom/dispose-atom.ts +4 -13
  27. package/internal/src/atom/is-default.ts +3 -3
  28. package/internal/src/caching.ts +5 -5
  29. package/internal/src/capitalize.ts +3 -0
  30. package/internal/src/families/create-readonly-selector-family.ts +5 -6
  31. package/internal/src/families/create-writable-selector-family.ts +1 -4
  32. package/internal/src/families/dispose-from-store.ts +3 -13
  33. package/internal/src/get-state/get-from-store.ts +2 -2
  34. package/internal/src/get-state/read-or-compute-value.ts +1 -1
  35. package/internal/src/index.ts +2 -0
  36. package/internal/src/install-into-store.ts +1 -1
  37. package/internal/src/join/edit-relations-in-store.ts +32 -0
  38. package/internal/src/join/find-relations-in-store.ts +124 -0
  39. package/internal/src/join/get-internal-relations-from-store.ts +14 -0
  40. package/internal/src/join/get-join.ts +31 -0
  41. package/internal/src/join/index.ts +5 -0
  42. package/{data/src/join.ts → internal/src/join/join-internal.ts} +21 -430
  43. package/internal/src/junction.ts +7 -4
  44. package/internal/src/keys.ts +7 -7
  45. package/internal/src/mutable/create-mutable-atom-family.ts +1 -1
  46. package/internal/src/mutable/create-mutable-atom.ts +3 -3
  47. package/internal/src/mutable/get-json-token.ts +1 -1
  48. package/internal/src/mutable/tracker-family.ts +19 -17
  49. package/internal/src/mutable/tracker.ts +8 -8
  50. package/internal/src/pretty-print.ts +1 -1
  51. package/internal/src/selector/create-readonly-selector.ts +3 -7
  52. package/internal/src/selector/create-writable-selector.ts +4 -4
  53. package/internal/src/selector/dispose-selector.ts +20 -11
  54. package/internal/src/selector/get-selector-dependency-keys.ts +1 -1
  55. package/internal/src/selector/register-selector.ts +6 -9
  56. package/internal/src/selector/trace-selector-atoms.ts +2 -2
  57. package/internal/src/set-state/copy-mutable-if-needed.ts +1 -1
  58. package/internal/src/set-state/emit-update.ts +4 -2
  59. package/internal/src/set-state/evict-downstream.ts +1 -1
  60. package/internal/src/set-state/set-atom-or-selector.ts +1 -1
  61. package/internal/src/set-state/set-atom.ts +10 -10
  62. package/internal/src/set-state/set-into-store.ts +2 -2
  63. package/internal/src/set-state/stow-update.ts +1 -1
  64. package/internal/src/store/store.ts +1 -1
  65. package/internal/src/store/withdraw.ts +22 -22
  66. package/internal/src/subscribe/recall-state.ts +1 -1
  67. package/internal/src/subscribe/subscribe-in-store.ts +3 -3
  68. package/internal/src/subscribe/subscribe-to-root-atoms.ts +3 -3
  69. package/internal/src/subscribe/subscribe-to-state.ts +5 -5
  70. package/internal/src/subscribe/subscribe-to-timeline.ts +3 -3
  71. package/internal/src/subscribe/subscribe-to-transaction.ts +3 -3
  72. package/internal/src/timeline/create-timeline.ts +19 -38
  73. package/internal/src/timeline/time-travel.ts +2 -1
  74. package/internal/src/transaction/act-upon-store.ts +2 -2
  75. package/internal/src/transaction/apply-transaction.ts +5 -5
  76. package/internal/src/transaction/assign-transaction-to-continuity.ts +1 -1
  77. package/internal/src/transaction/build-transaction.ts +5 -8
  78. package/internal/src/transaction/create-transaction.ts +3 -3
  79. package/internal/src/transaction/get-epoch-number.ts +3 -3
  80. package/internal/src/transaction/set-epoch-number.ts +2 -2
  81. package/introspection/dist/index.js +2 -620
  82. package/json/dist/index.d.ts +2 -2
  83. package/json/dist/index.js +1 -80
  84. package/json/src/select-json-family.ts +3 -14
  85. package/package.json +31 -49
  86. package/react/dist/index.js +2 -82
  87. package/react/src/use-o.ts +1 -1
  88. package/react/src/use-tl.ts +2 -2
  89. package/react-devtools/dist/index.css +16 -14
  90. package/react-devtools/dist/index.js +31 -18
  91. package/react-devtools/src/Updates.tsx +12 -0
  92. package/react-devtools/src/devtools.scss +16 -14
  93. package/react-devtools/src/json-editor/editors-by-type/utilities/cast-to-json.ts +2 -1
  94. package/realtime/dist/index.d.ts +1 -2
  95. package/realtime/dist/index.js +2 -107
  96. package/realtime/src/realtime-continuity.ts +3 -2
  97. package/realtime/src/shared-room-store.ts +1 -2
  98. package/realtime-client/dist/index.d.ts +9 -9
  99. package/realtime-client/dist/index.js +3 -509
  100. package/realtime-client/src/continuity/register-and-attempt-confirmed-update.ts +3 -3
  101. package/realtime-client/src/continuity/use-conceal-state.ts +1 -1
  102. package/realtime-client/src/pull-atom-family-member.ts +2 -2
  103. package/realtime-client/src/pull-atom.ts +2 -2
  104. package/realtime-client/src/pull-mutable-atom-family-member.ts +2 -2
  105. package/realtime-client/src/pull-mutable-atom.ts +2 -2
  106. package/realtime-client/src/pull-selector-family-member.ts +4 -4
  107. package/realtime-client/src/pull-selector.ts +4 -4
  108. package/realtime-client/src/push-state.ts +5 -10
  109. package/realtime-client/src/server-action.ts +4 -4
  110. package/realtime-client/src/sync-continuity.ts +6 -6
  111. package/realtime-react/dist/index.js +5 -154
  112. package/realtime-react/src/use-pull-atom-family-member.ts +1 -1
  113. package/realtime-react/src/use-pull-atom.ts +1 -1
  114. package/realtime-react/src/use-pull-mutable-atom.ts +1 -1
  115. package/realtime-react/src/use-pull-mutable-family-member.ts +1 -1
  116. package/realtime-react/src/use-pull-selector-family-member.ts +1 -1
  117. package/realtime-react/src/use-pull-selector.ts +1 -1
  118. package/realtime-react/src/use-push.ts +1 -1
  119. package/realtime-react/src/use-server-action.ts +2 -2
  120. package/realtime-react/src/use-sync-continuity.ts +1 -1
  121. package/realtime-server/dist/index.d.ts +2 -4
  122. package/realtime-server/dist/index.js +3 -1001
  123. package/realtime-server/src/continuity/prepare-to-serve-transaction-request.ts +1 -1
  124. package/realtime-server/src/continuity/prepare-to-sync-realtime-continuity.ts +3 -3
  125. package/realtime-server/src/continuity/subscribe-to-continuity-actions.ts +2 -2
  126. package/realtime-server/src/continuity/subscribe-to-continuity-perpectives.ts +2 -2
  127. package/realtime-server/src/ipc-sockets/child-socket.ts +2 -0
  128. package/realtime-server/src/realtime-action-receiver.ts +1 -1
  129. package/realtime-server/src/realtime-family-provider.ts +2 -2
  130. package/realtime-server/src/realtime-mutable-family-provider.ts +2 -2
  131. package/realtime-server/src/realtime-mutable-provider.ts +2 -2
  132. package/realtime-server/src/realtime-server-stores/server-room-external-actions.ts +2 -1
  133. package/realtime-server/src/realtime-server-stores/server-room-external-store.ts +1 -1
  134. package/realtime-server/src/realtime-server-stores/server-sync-store.ts +10 -2
  135. package/realtime-server/src/realtime-server-stores/server-user-store.ts +1 -2
  136. package/realtime-server/src/realtime-state-provider.ts +2 -2
  137. package/realtime-testing/dist/index.js +20 -22
  138. package/realtime-testing/src/setup-realtime-test.tsx +2 -1
  139. package/src/index.ts +4 -0
  140. package/src/join.ts +218 -0
  141. package/src/silo.ts +4 -4
  142. package/src/timeline.ts +1 -1
  143. package/src/transaction.ts +4 -8
  144. package/transceivers/set-rtx/dist/index.d.ts +4 -3
  145. package/transceivers/set-rtx/dist/index.js +1 -215
  146. package/transceivers/set-rtx/src/set-rtx.ts +4 -7
  147. package/web/dist/index.js +1 -15
  148. package/data/src/until.ts +0 -15
  149. package/ephemeral/dist/index.d.ts +0 -67
  150. package/ephemeral/dist/index.js +0 -9
  151. package/ephemeral/package.json +0 -13
  152. package/ephemeral/src/index.ts +0 -1
  153. package/eslint-plugin/src/rules/lifespan.ts +0 -203
  154. package/immortal/dist/index.d.ts +0 -12
  155. package/immortal/dist/index.js +0 -9
  156. package/immortal/package.json +0 -13
  157. package/immortal/src/index.ts +0 -1
  158. package/immortal/src/seek-state.ts +0 -60
  159. package/react-devtools/src/json-editor/assets/Untitled-1.ai +2 -1436
  160. package/react-devtools/src/json-editor/assets/data-vis.ai +1 -1548
  161. package/react-devtools/src/json-editor/comp/json-editor-sketches.ai +5 -1449
  162. /package/{ephemeral/src → src}/find-state.ts +0 -0
@@ -1,39 +1,37 @@
1
1
  import type * as AtomIO from "atom.io"
2
2
  import type { Store, Transceiver } from "atom.io/internal"
3
- import { IMPLICIT, seekInStore, withdraw } from "atom.io/internal"
4
3
 
5
4
  import { createWritableSelectorFamily } from "../../internal/src/families/create-writable-selector-family"
6
5
  import type { Canonical, Json, JsonInterface } from "."
7
- import { parseJson } from "."
8
6
 
9
7
  export function selectJsonFamily<
10
8
  T extends Transceiver<any>,
11
9
  J extends Json.Serializable,
12
10
  K extends Canonical,
13
11
  >(
12
+ store: Store,
14
13
  atomFamilyToken: AtomIO.MutableAtomFamilyToken<T, J, K>,
15
14
  transform: JsonInterface<T, J>,
16
- store: Store,
17
15
  ): AtomIO.WritableSelectorFamilyToken<J, K>
18
16
  export function selectJsonFamily<
19
17
  T,
20
18
  J extends Json.Serializable,
21
19
  K extends Canonical,
22
20
  >(
21
+ store: Store,
23
22
  atomFamilyToken: AtomIO.RegularAtomFamilyToken<T, K>,
24
23
  transform: JsonInterface<T, J>,
25
- store: Store,
26
24
  ): AtomIO.WritableSelectorFamilyToken<J, K>
27
25
  export function selectJsonFamily<
28
26
  T,
29
27
  J extends Json.Serializable,
30
28
  K extends Canonical,
31
29
  >(
30
+ store: Store,
32
31
  atomFamilyToken:
33
32
  | AtomIO.MutableAtomFamilyToken<T extends Transceiver<any> ? T : never, J, K>
34
33
  | AtomIO.RegularAtomFamilyToken<T, K>,
35
34
  transform: JsonInterface<T, J>,
36
- store: Store = IMPLICIT.STORE,
37
35
  ): AtomIO.WritableSelectorFamilyToken<J, K> {
38
36
  const jsonFamily = createWritableSelectorFamily<J, K>(
39
37
  store,
@@ -53,14 +51,5 @@ export function selectJsonFamily<
53
51
  },
54
52
  [`mutable`, `json`],
55
53
  )
56
- const atomFamily = withdraw(atomFamilyToken, store)
57
- atomFamily.subject.subscribe(
58
- `store=${store.config.name}::json-selector-family`,
59
- (event) => {
60
- if (event.token.family) {
61
- seekInStore(store, jsonFamily, parseJson(event.token.family.subKey) as K)
62
- }
63
- },
64
- )
65
54
  return jsonFamily
66
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atom.io",
3
- "version": "0.31.1",
3
+ "version": "0.32.1",
4
4
  "description": "Composable and testable reactive data library.",
5
5
  "homepage": "https://atom.io.fyi",
6
6
  "sideEffects": false,
@@ -59,35 +59,35 @@
59
59
  "@types/npmlog": "7.0.0",
60
60
  "@types/react": "19.0.10",
61
61
  "@types/tmp": "0.2.6",
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.3",
62
+ "@typescript-eslint/parser": "8.25.0",
63
+ "@typescript-eslint/rule-tester": "8.25.0",
64
+ "@typescript-eslint/utils": "8.25.0",
65
+ "@vitest/coverage-v8": "3.0.7",
66
+ "@vitest/ui": "3.0.7",
67
+ "bun-types": "1.2.4",
68
68
  "concurrently": "9.1.2",
69
- "drizzle-kit": "0.30.4",
70
- "drizzle-orm": "0.39.3",
69
+ "drizzle-kit": "0.30.5",
70
+ "drizzle-orm": "0.40.0",
71
71
  "eslint": "9.21.0",
72
- "happy-dom": "17.1.4",
72
+ "happy-dom": "17.1.8",
73
73
  "http-proxy": "1.18.1",
74
74
  "motion": "12.4.7",
75
75
  "npmlog": "7.0.1",
76
76
  "nyc": "17.1.0",
77
77
  "postgres": "3.4.5",
78
- "preact": "10.26.2",
78
+ "preact": "10.26.3",
79
79
  "react": "19.0.0",
80
80
  "react-dom": "19.0.0",
81
81
  "react-router-dom": "7.2.0",
82
82
  "socket.io": "4.8.1",
83
83
  "socket.io-client": "4.8.1",
84
84
  "tmp": "0.2.3",
85
- "tsup": "8.3.6",
85
+ "tsup": "8.4.0",
86
86
  "tsx": "4.19.3",
87
- "typescript": "5.7.3",
88
- "vite": "6.1.1",
87
+ "typescript": "5.8.2",
88
+ "vite": "6.2.0",
89
89
  "vite-tsconfig-paths": "5.1.4",
90
- "vitest": "3.0.6",
90
+ "vitest": "3.0.7",
91
91
  "zod": "3.24.2",
92
92
  "break-check": "0.6.6",
93
93
  "recoverage": "0.0.7"
@@ -100,15 +100,9 @@
100
100
  "data/dist",
101
101
  "data/package.json",
102
102
  "data/src",
103
- "ephemeral/dist",
104
- "ephemeral/package.json",
105
- "ephemeral/src",
106
103
  "eslint-plugin/dist",
107
104
  "eslint-plugin/package.json",
108
105
  "eslint-plugin/src",
109
- "immortal/dist",
110
- "immortal/package.json",
111
- "immortal/src",
112
106
  "internal/dist",
113
107
  "internal/package.json",
114
108
  "internal/src",
@@ -157,21 +151,11 @@
157
151
  "import": "./data/dist/index.js",
158
152
  "types": "./data/dist/index.d.ts"
159
153
  },
160
- "./ephemeral/package.json": "./ephemeral/package.json",
161
- "./ephemeral": {
162
- "import": "./ephemeral/dist/index.js",
163
- "types": "./ephemeral/dist/index.d.ts"
164
- },
165
154
  "./eslint-plugin/package.json": "./eslint-plugin/package.json",
166
155
  "./eslint-plugin": {
167
156
  "import": "./eslint-plugin/dist/index.js",
168
157
  "types": "./eslint-plugin/dist/index.d.ts"
169
158
  },
170
- "./immortal/package.json": "./immortal/package.json",
171
- "./immortal": {
172
- "import": "./immortal/dist/index.js",
173
- "types": "./immortal/dist/index.d.ts"
174
- },
175
159
  "./internal/package.json": "./internal/package.json",
176
160
  "./internal": {
177
161
  "import": "./internal/dist/index.js",
@@ -237,24 +221,22 @@
237
221
  "manifest": "tsx __scripts__/manifest-build.node.ts",
238
222
  "clean:build": "find . -type d -name 'dist' -not -path '*/node_modules/*' | xargs rm -rf",
239
223
  "build": "bun run clean:build && concurrently \"bun:build:*\"",
240
- "build:main": "tsup",
241
- "build:types": "tsup --dts",
242
- "build:data": "cd data && tsup",
243
- "build:ephemeral": "cd ephemeral && tsup",
244
- "build:eslint-plugin": "cd eslint-plugin && tsup",
245
- "build:immortal": "cd immortal && tsup",
246
- "build:internal": "cd internal && tsup",
247
- "build:introspection": "cd introspection && tsup",
248
- "build:json": "cd json && tsup",
249
- "build:react": "cd react && tsup",
250
- "build:react-devtools": "cd react-devtools && tsup",
251
- "build:realtime": "cd realtime && tsup",
252
- "build:realtime-client": "cd realtime-client && tsup",
253
- "build:realtime-react": "cd realtime-react && tsup",
254
- "build:realtime-server": "cd realtime-server && tsup",
255
- "build:realtime-testing": "cd realtime-testing && tsup",
256
- "build:transceivers:set-rtx": "cd transceivers/set-rtx && tsup",
257
- "build:web": "cd web && tsup",
224
+ "build:main": "tsup-node",
225
+ "build:types": "tsup-node --dts",
226
+ "build:data": "cd data && tsup-node",
227
+ "build:eslint-plugin": "cd eslint-plugin && tsup-node",
228
+ "build:internal": "cd internal && tsup-node",
229
+ "build:introspection": "cd introspection && tsup-node",
230
+ "build:json": "cd json && tsup-node",
231
+ "build:react": "cd react && tsup-node",
232
+ "build:react-devtools": "cd react-devtools && tsup-node",
233
+ "build:realtime": "cd realtime && tsup-node",
234
+ "build:realtime-client": "cd realtime-client && tsup-node",
235
+ "build:realtime-react": "cd realtime-react && tsup-node",
236
+ "build:realtime-server": "cd realtime-server && tsup-node",
237
+ "build:realtime-testing": "cd realtime-testing && tsup-node",
238
+ "build:transceivers:set-rtx": "cd transceivers/set-rtx && tsup-node",
239
+ "build:web": "cd web && tsup-node",
258
240
  "lint:biome": "biome check -- .",
259
241
  "lint:eslint": "eslint -- .",
260
242
  "lint:types": "tsc --noEmit",
@@ -1,83 +1,3 @@
1
+ export { StoreContext, StoreProvider, useI, useJSON, useO, useTL } from '../../dist/chunk-3PQTWLQQ.js';
2
+ import '../../dist/chunk-UQEYZ3OI.js';
1
3
  import '../../dist/chunk-XWL6SNVU.js';
2
- import { IMPLICIT, setIntoStore, subscribeToState, getFromStore, findInStore, getJsonToken, withdraw, subscribeToTimeline } from 'atom.io/internal';
3
- import * as React5 from 'react';
4
- import { jsx } from 'react/jsx-runtime';
5
- import { undo, redo } from 'atom.io';
6
-
7
- var StoreContext = React5.createContext(IMPLICIT.STORE);
8
- var StoreProvider = ({ children, store = IMPLICIT.STORE }) => /* @__PURE__ */ jsx(StoreContext.Provider, { value: store, children });
9
- function parseStateOverloads(store, ...rest) {
10
- let token;
11
- if (rest.length === 2) {
12
- const family = rest[0];
13
- const key = rest[1];
14
- token = findInStore(store, family, key);
15
- } else {
16
- token = rest[0];
17
- }
18
- return token;
19
- }
20
-
21
- // react/src/use-i.ts
22
- function useI(...params) {
23
- const store = React5.useContext(StoreContext);
24
- const token = parseStateOverloads(store, ...params);
25
- const setter = React5.useRef(null);
26
- if (setter.current === null) {
27
- setter.current = (next) => {
28
- setIntoStore(store, token, next);
29
- };
30
- }
31
- return setter.current;
32
- }
33
- function useO(...params) {
34
- const store = React5.useContext(StoreContext);
35
- const token = parseStateOverloads(store, ...params);
36
- const id = React5.useId();
37
- return React5.useSyncExternalStore(
38
- (dispatch) => subscribeToState(token, dispatch, `use-o:${id}`, store),
39
- () => getFromStore(store, token),
40
- () => getFromStore(store, token)
41
- );
42
- }
43
-
44
- // react/src/use-json.ts
45
- function useJSON(token, key) {
46
- const store = React5.useContext(StoreContext);
47
- const stateToken = token.type === `mutable_atom_family` ? findInStore(store, token, key) : token;
48
- const jsonToken = getJsonToken(store, stateToken);
49
- return useO(jsonToken);
50
- }
51
- function useTL(token) {
52
- const store = React5.useContext(StoreContext);
53
- const id = React5.useId();
54
- const timeline = withdraw(token, store);
55
- const tokenRef = React5.useRef(token);
56
- const rebuildMeta = () => {
57
- return {
58
- at: timeline.at,
59
- length: timeline.history.length,
60
- undo: () => {
61
- undo(token);
62
- },
63
- redo: () => {
64
- redo(token);
65
- }
66
- };
67
- };
68
- const meta = React5.useRef(rebuildMeta());
69
- const retrieve = () => {
70
- if (meta.current.at !== timeline?.at || meta.current.length !== timeline?.history.length || tokenRef.current !== token) {
71
- tokenRef.current = token;
72
- meta.current = rebuildMeta();
73
- }
74
- return meta.current;
75
- };
76
- return React5.useSyncExternalStore(
77
- (dispatch) => subscribeToTimeline(token, dispatch, `use-tl:${id}`, store),
78
- retrieve,
79
- retrieve
80
- );
81
- }
82
-
83
- export { StoreContext, StoreProvider, useI, useJSON, useO, useTL };
@@ -20,7 +20,7 @@ export function useO<T, K extends Canonical>(
20
20
  const token = parseStateOverloads(store, ...params)
21
21
  const id = React.useId()
22
22
  return React.useSyncExternalStore<T>(
23
- (dispatch) => subscribeToState(token, dispatch, `use-o:${id}`, store),
23
+ (dispatch) => subscribeToState(store, token, `use-o:${id}`, dispatch),
24
24
  () => getFromStore(store, token),
25
25
  () => getFromStore(store, token),
26
26
  )
@@ -15,7 +15,7 @@ export type TimelineMeta = {
15
15
  export function useTL(token: TimelineToken<any>): TimelineMeta {
16
16
  const store = React.useContext(StoreContext)
17
17
  const id = React.useId()
18
- const timeline = withdraw(token, store)
18
+ const timeline = withdraw(store, token)
19
19
  const tokenRef = React.useRef(token)
20
20
  const rebuildMeta = () => {
21
21
  return {
@@ -42,7 +42,7 @@ export function useTL(token: TimelineToken<any>): TimelineMeta {
42
42
  return meta.current
43
43
  }
44
44
  return React.useSyncExternalStore<TimelineMeta>(
45
- (dispatch) => subscribeToTimeline(token, dispatch, `use-tl:${id}`, store),
45
+ (dispatch) => subscribeToTimeline(store, token, `use-tl:${id}`, dispatch),
46
46
  retrieve,
47
47
  retrieve,
48
48
  )
@@ -9,20 +9,22 @@ main[data-css=atom_io_devtools] {
9
9
  --bg-color: #ddd;
10
10
  --bg-tint1: #e3e3e3;
11
11
  }
12
- box-sizing: border-box;
13
- color: var(--fg-color);
14
- background-color: var(--bg-color);
15
- border: 2px solid var(--fg-color);
16
- position: fixed;
17
- right: 0;
18
- bottom: 0;
19
- height: 100%;
20
- display: flex;
21
- flex-flow: column;
22
- max-height: 800px;
23
- width: 100%;
24
- max-width: 500px;
25
- overflow-y: scroll;
12
+ & {
13
+ box-sizing: border-box;
14
+ color: var(--fg-color);
15
+ background-color: var(--bg-color);
16
+ border: 2px solid var(--fg-color);
17
+ position: fixed;
18
+ right: 0;
19
+ bottom: 0;
20
+ height: 100%;
21
+ display: flex;
22
+ flex-flow: column;
23
+ max-height: 800px;
24
+ width: 100%;
25
+ max-width: 500px;
26
+ overflow-y: scroll;
27
+ }
26
28
  * {
27
29
  font-size: 16px;
28
30
  font-family: theia, monospace;
@@ -1,13 +1,11 @@
1
+ import { persistSync } from '../../dist/chunk-4LWKCEW3.js';
2
+ import { attachIntrospectionStates, jsonRefinery, primitiveRefinery, discoverType, prettyJson } from '../../dist/chunk-VRJP2PCU.js';
3
+ import { StoreContext, useI, useO } from '../../dist/chunk-3PQTWLQQ.js';
4
+ import { IMPLICIT, createStandaloneAtom, createAtomFamily, fromEntries, become, isJson, toEntries, JSON_DEFAULTS, findInStore, undo, redo, getState, stringifyJson } from '../../dist/chunk-UQEYZ3OI.js';
1
5
  import '../../dist/chunk-XWL6SNVU.js';
2
- import { StoreContext, useI, useO } from 'atom.io/react';
3
6
  import { motion, spring, LayoutGroup } from 'motion/react';
4
7
  import { forwardRef, useRef, useState, useImperativeHandle, useLayoutEffect, createContext, useId, Component, useContext, Fragment as Fragment$1 } from 'react';
5
- import { undo, redo, getState } from 'atom.io';
6
- import { IMPLICIT, createStandaloneAtom, createAtomFamily, findInStore, become } from 'atom.io/internal';
7
- import { jsonRefinery, attachIntrospectionStates, primitiveRefinery, prettyJson, discoverType } from 'atom.io/introspection';
8
8
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
9
- import { isJson, fromEntries, toEntries, JSON_DEFAULTS, stringifyJson } from 'atom.io/json';
10
- import { persistSync } from 'atom.io/web';
11
9
 
12
10
  var OpenClose = ({ isOpen, setIsOpen, disabled, testid }) => {
13
11
  return /* @__PURE__ */ jsx(
@@ -92,7 +90,7 @@ function clampInto(min, max) {
92
90
  return (value) => value < min ? min : value > max ? max : value;
93
91
  }
94
92
  function round(value, decimalPlaces) {
95
- if (decimalPlaces === undefined) return value;
93
+ if (decimalPlaces === void 0) return value;
96
94
  const factor = 10 ** decimalPlaces;
97
95
  return Math.round(value * factor) / factor;
98
96
  }
@@ -130,7 +128,7 @@ var initRefinery = (constraints) => (input) => {
130
128
  return constrained;
131
129
  };
132
130
  var valueToText = (numericValue) => {
133
- if (numericValue === null || numericValue === undefined) {
131
+ if (numericValue === null || numericValue === void 0) {
134
132
  return ``;
135
133
  }
136
134
  return numericValue.toString();
@@ -154,7 +152,7 @@ var NumberInput = ({
154
152
  const [temporaryEntry, setTemporaryEntry] = useState(null);
155
153
  const userHasMadeDeliberateChange = useRef(false);
156
154
  const refine = initRefinery({ max, min, decimalPlaces, nullable: true });
157
- const allowDecimal = decimalPlaces === undefined || decimalPlaces > 0;
155
+ const allowDecimal = decimalPlaces === void 0 || decimalPlaces > 0;
158
156
  const handleBlur = () => {
159
157
  if (userHasMadeDeliberateChange.current) {
160
158
  set(refine(value ?? null));
@@ -164,7 +162,7 @@ var NumberInput = ({
164
162
  };
165
163
  const handleChange = (event) => {
166
164
  if (onChange) onChange(event);
167
- if (set === undefined) return;
165
+ if (set === void 0) return;
168
166
  userHasMadeDeliberateChange.current = true;
169
167
  const input = event.target.value;
170
168
  if (isValidNonNumber(input) || isDecimalInProgress(input)) {
@@ -233,7 +231,7 @@ var TextInput = ({
233
231
  type: "text",
234
232
  value,
235
233
  onChange: (e) => set?.(e.target.value),
236
- disabled: set === undefined,
234
+ disabled: set === void 0,
237
235
  placeholder,
238
236
  "data-testid": testid
239
237
  }
@@ -244,7 +242,7 @@ var TextInput = ({
244
242
  type: "text",
245
243
  value,
246
244
  onChange: (e) => set?.(e.target.value),
247
- disabled: set === undefined,
245
+ disabled: set === void 0,
248
246
  placeholder,
249
247
  "data-testid": testid
250
248
  }
@@ -255,7 +253,7 @@ var NonJsonEditor = ({
255
253
  data,
256
254
  testid
257
255
  }) => {
258
- return data === undefined ? /* @__PURE__ */ jsx(
256
+ return data === void 0 ? /* @__PURE__ */ jsx(
259
257
  ElasticInput,
260
258
  {
261
259
  disabled: true,
@@ -316,7 +314,7 @@ var JsonEditor_INTERNAL = ({
316
314
  ElasticInput,
317
315
  {
318
316
  value: name,
319
- onChange: disabled ? undefined : (e) => {
317
+ onChange: disabled ? void 0 : (e) => {
320
318
  rename(e.target.value);
321
319
  },
322
320
  disabled,
@@ -340,7 +338,7 @@ var JsonEditor_INTERNAL = ({
340
338
  recast && dataIsJson ? /* @__PURE__ */ jsx(
341
339
  "select",
342
340
  {
343
- onChange: disabled ? undefined : (e) => {
341
+ onChange: disabled ? void 0 : (e) => {
344
342
  recast(e.target.value);
345
343
  },
346
344
  value: refined.type,
@@ -353,6 +351,8 @@ var JsonEditor_INTERNAL = ({
353
351
  }
354
352
  ) });
355
353
  };
354
+
355
+ // react-devtools/src/json-editor/editors-by-type/utilities/array-elements.ts
356
356
  var makeElementSetters = (data, set) => data.map((value, index) => (newValue) => {
357
357
  set(() => {
358
358
  const newData = [...data];
@@ -551,7 +551,8 @@ var castToJson = (input) => {
551
551
  }
552
552
  };
553
553
  }
554
- default: {
554
+ case `null`:
555
+ case void 0: {
555
556
  return {
556
557
  get array() {
557
558
  return nullToArray();
@@ -744,7 +745,7 @@ var NumberEditor = ({
744
745
  {
745
746
  testid: `${testid}-number-input`,
746
747
  value: data,
747
- set: isReadonly(path) ? undefined : (newValue) => {
748
+ set: isReadonly(path) ? void 0 : (newValue) => {
748
749
  set(Number(newValue));
749
750
  },
750
751
  autoSize: true
@@ -763,7 +764,7 @@ var StringEditor = ({
763
764
  {
764
765
  testid: `${testid}-string-input`,
765
766
  value: data,
766
- set: isReadonly(path) ? undefined : set,
767
+ set: isReadonly(path) ? void 0 : set,
767
768
  autoSize: true
768
769
  }
769
770
  ) });
@@ -1154,6 +1155,12 @@ var TransactionUpdateFC = ({ serialNumber, transactionUpdate }) => {
1154
1155
  },
1155
1156
  `${transactionUpdate.key}:${index}:${update.key}`
1156
1157
  );
1158
+ case `molecule_creation`:
1159
+ case `molecule_disposal`:
1160
+ case `molecule_transfer`:
1161
+ case `state_creation`:
1162
+ case `state_disposal`:
1163
+ return null;
1157
1164
  }
1158
1165
  })
1159
1166
  ] })
@@ -1200,6 +1207,12 @@ var TimelineUpdateFC = ({ timelineUpdate, serialNumber }) => {
1200
1207
  },
1201
1208
  `${timelineUpdate.key}:${index}:${update.key}`
1202
1209
  );
1210
+ case `molecule_creation`:
1211
+ case `molecule_disposal`:
1212
+ case `molecule_transfer`:
1213
+ case `state_creation`:
1214
+ case `state_disposal`:
1215
+ return null;
1203
1216
  }
1204
1217
  }) : timelineUpdate.type === `selector_update` ? timelineUpdate.atomUpdates.filter((token) => !token.key.startsWith(`\u{1F441}\u200D\u{1F5E8}`)).map((atomUpdate, index) => {
1205
1218
  return /* @__PURE__ */ jsx(
@@ -119,6 +119,12 @@ const TransactionUpdateFC: React.FC<{
119
119
  transactionUpdate={update}
120
120
  />
121
121
  )
122
+ case `molecule_creation`:
123
+ case `molecule_disposal`:
124
+ case `molecule_transfer`:
125
+ case `state_creation`:
126
+ case `state_disposal`:
127
+ return null
122
128
  }
123
129
  })}
124
130
  </section>
@@ -173,6 +179,12 @@ export const TimelineUpdateFC: React.FC<{
173
179
  transactionUpdate={update}
174
180
  />
175
181
  )
182
+ case `molecule_creation`:
183
+ case `molecule_disposal`:
184
+ case `molecule_transfer`:
185
+ case `state_creation`:
186
+ case `state_disposal`:
187
+ return null
176
188
  }
177
189
  })
178
190
  ) : timelineUpdate.type === `selector_update` ? (
@@ -8,20 +8,22 @@ main[data-css="atom_io_devtools"] {
8
8
  --bg-color: #ddd;
9
9
  --bg-tint1: #e3e3e3;
10
10
  }
11
- box-sizing: border-box;
12
- color: var(--fg-color);
13
- background-color: var(--bg-color);
14
- border: 2px solid var(--fg-color);
15
- position: fixed;
16
- right: 0;
17
- bottom: 0;
18
- height: 100%;
19
- display: flex;
20
- flex-flow: column;
21
- max-height: 800px;
22
- width: 100%;
23
- max-width: 500px;
24
- overflow-y: scroll;
11
+ & {
12
+ box-sizing: border-box;
13
+ color: var(--fg-color);
14
+ background-color: var(--bg-color);
15
+ border: 2px solid var(--fg-color);
16
+ position: fixed;
17
+ right: 0;
18
+ bottom: 0;
19
+ height: 100%;
20
+ display: flex;
21
+ flex-flow: column;
22
+ max-height: 800px;
23
+ width: 100%;
24
+ max-width: 500px;
25
+ overflow-y: scroll;
26
+ }
25
27
  * {
26
28
  font-size: 16px;
27
29
  font-family: theia, monospace;
@@ -130,7 +130,8 @@ export const castToJson = (
130
130
  },
131
131
  }
132
132
  }
133
- default: {
133
+ case `null`:
134
+ case undefined: {
134
135
  return {
135
136
  get array() {
136
137
  return Cast.nullToArray()
@@ -2,7 +2,6 @@ import * as atom_io from 'atom.io';
2
2
  import { AtomFamilyToken, ReadableFamilyToken, ReadableToken, TokenType, AtomToken, TransactionToken, MutableAtomToken } from 'atom.io';
3
3
  import { Canonical } from 'atom.io/json';
4
4
  import { UserKey } from 'atom.io/realtime-server';
5
- import * as atom_io_data from 'atom.io/data';
6
5
  import { SetRTX, SetRTXJson } from 'atom.io/transceivers/set-rtx';
7
6
 
8
7
  declare class InvariantMap<K, V> extends Map<K, V> {
@@ -46,7 +45,7 @@ type UserInRoomMeta = {
46
45
  enteredAtEpoch: number;
47
46
  };
48
47
  declare const DEFAULT_USER_IN_ROOM_META: UserInRoomMeta;
49
- declare const usersInRooms: atom_io_data.JoinToken<"room", string, "user", string, "1:n", UserInRoomMeta>;
48
+ declare const usersInRooms: atom_io.JoinToken<"room", string, "user", string, "1:n", UserInRoomMeta>;
50
49
  declare const usersInMyRoomView: atom_io.ReadonlySelectorFamilyToken<MutableAtomToken<SetRTX<string>, SetRTXJson<string>>[], string>;
51
50
 
52
51
  export { type ContinuityOptions, type ContinuityToken, DEFAULT_USER_IN_ROOM_META, InvariantMap, type PerspectiveToken, SyncGroup, type UserInRoomMeta, continuity, roomIndex, usersInMyRoomView, usersInRooms, usersInThisRoomIndex };