atom.io 0.18.3 → 0.19.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 (56) hide show
  1. package/data/dist/index.cjs +173 -1
  2. package/data/dist/index.d.ts +52 -21
  3. package/data/dist/index.js +12 -331
  4. package/data/src/join.ts +321 -53
  5. package/dist/{chunk-CVBEVTM5.js → chunk-7VCCW45K.js} +1 -39
  6. package/dist/chunk-7ZR244C2.js +489 -0
  7. package/dist/index.cjs +1 -0
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.js +1 -0
  10. package/internal/dist/index.cjs +1 -1
  11. package/internal/dist/index.d.ts +1 -1
  12. package/internal/dist/index.js +1 -1
  13. package/internal/src/mutable/tracker.ts +1 -1
  14. package/internal/src/set-state/become.ts +1 -1
  15. package/internal/src/subscribe/subscribe-to-state.ts +2 -2
  16. package/internal/src/timeline/add-atom-to-timeline.ts +3 -3
  17. package/internal/src/transaction/build-transaction.ts +1 -1
  18. package/introspection/dist/index.cjs +3 -2
  19. package/introspection/dist/index.d.ts +4 -4
  20. package/introspection/dist/index.js +3 -2
  21. package/introspection/src/attach-atom-index.ts +5 -4
  22. package/introspection/src/index.ts +3 -3
  23. package/json/dist/index.d.ts +1 -1
  24. package/json/dist/index.js +2 -2
  25. package/package.json +18 -19
  26. package/react-devtools/dist/index.cjs +218 -927
  27. package/react-devtools/dist/index.css +0 -18
  28. package/react-devtools/dist/index.d.ts +4 -4
  29. package/react-devtools/dist/index.js +181 -833
  30. package/react-devtools/src/AtomIODevtools.tsx +2 -1
  31. package/react-devtools/src/Button.tsx +3 -1
  32. package/react-devtools/src/StateEditor.tsx +13 -16
  33. package/react-devtools/src/StateIndex.tsx +22 -19
  34. package/react-devtools/src/TimelineIndex.tsx +11 -4
  35. package/react-devtools/src/TransactionIndex.tsx +10 -3
  36. package/react-devtools/src/Updates.tsx +10 -3
  37. package/realtime/dist/index.cjs +4 -2
  38. package/realtime/dist/index.d.ts +1 -96
  39. package/realtime/dist/index.js +5 -3
  40. package/realtime/src/shared-room-store.ts +5 -3
  41. package/realtime-react/dist/index.cjs +1 -1
  42. package/realtime-react/dist/index.js +1 -1
  43. package/realtime-react/src/use-single-effect.ts +1 -1
  44. package/realtime-server/dist/index.cjs +162 -18
  45. package/realtime-server/dist/index.d.ts +2 -92
  46. package/realtime-server/dist/index.js +31 -17
  47. package/realtime-server/src/ipc-sockets/child-socket.ts +1 -1
  48. package/realtime-server/src/realtime-continuity-synchronizer.ts +8 -6
  49. package/realtime-server/src/realtime-server-stores/server-room-external-actions.ts +22 -10
  50. package/realtime-server/src/realtime-server-stores/server-room-external-store.ts +2 -2
  51. package/realtime-testing/dist/index.cjs +48 -6
  52. package/realtime-testing/dist/index.js +10 -3
  53. package/realtime-testing/src/setup-realtime-test.tsx +9 -3
  54. package/src/silo.ts +4 -0
  55. package/src/validators.ts +2 -2
  56. /package/dist/{chunk-VAE5OCKN.js → chunk-BF4MVQF6.js} +0 -0
@@ -1,4 +1,4 @@
1
- import type { ReadonlySelectorToken, RegularAtomToken } from "atom.io"
1
+ import type { AtomToken, ReadonlySelectorToken } from "atom.io"
2
2
  import type { Store } from "atom.io/internal"
3
3
  import {
4
4
  IMPLICIT,
@@ -9,19 +9,20 @@ import {
9
9
 
10
10
  import type { WritableTokenIndex } from "."
11
11
 
12
- export type AtomTokenIndex = WritableTokenIndex<RegularAtomToken<unknown>>
12
+ export type AtomTokenIndex = WritableTokenIndex<AtomToken<unknown>>
13
13
 
14
14
  export const attachAtomIndex = (
15
15
  store: Store = IMPLICIT.STORE,
16
16
  ): ReadonlySelectorToken<AtomTokenIndex> => {
17
+ console.log(store.config)
17
18
  const atomTokenIndexState__INTERNAL = createRegularAtom<AtomTokenIndex>(
18
19
  {
19
20
  key: `👁‍🗨 Atom Token Index (Internal)`,
20
21
  default: () => {
21
22
  const defaultAtomIndex = [...store.atoms]
22
23
  .filter(([key]) => !key.includes(`👁‍🗨`))
23
- .reduce<AtomTokenIndex>((acc, [key]) => {
24
- acc[key] = { key, type: `atom` }
24
+ .reduce<AtomTokenIndex>((acc, [key, atom]) => {
25
+ acc[key] = { key, type: atom.type }
25
26
  return acc
26
27
  }, {})
27
28
  return defaultAtomIndex
@@ -1,6 +1,6 @@
1
1
  import type {
2
+ AtomToken,
2
3
  ReadonlySelectorToken,
3
- RegularAtomToken,
4
4
  WritableSelectorToken,
5
5
  } from "atom.io"
6
6
 
@@ -8,8 +8,8 @@ export * from "./attach-introspection-states"
8
8
 
9
9
  export type FamilyNode<
10
10
  Token extends
11
+ | AtomToken<unknown>
11
12
  | ReadonlySelectorToken<unknown>
12
- | RegularAtomToken<unknown>
13
13
  | WritableSelectorToken<unknown>,
14
14
  > = {
15
15
  key: string
@@ -18,7 +18,7 @@ export type FamilyNode<
18
18
 
19
19
  export type WritableTokenIndex<
20
20
  Token extends
21
+ | AtomToken<unknown>
21
22
  | ReadonlySelectorToken<unknown>
22
- | RegularAtomToken<unknown>
23
23
  | WritableSelectorToken<unknown>,
24
24
  > = Record<string, FamilyNode<Token> | Token>
@@ -26,7 +26,7 @@ declare namespace json {
26
26
  export type { json_Array as Array, Object$1 as Object, json_Serializable as Serializable };
27
27
  }
28
28
 
29
- declare const parseJson: <S extends Stringified<Serializable>>(str: string | S) => S extends Stringified<infer J extends Serializable> ? J : Serializable;
29
+ declare const parseJson: <S extends Stringified<Serializable>>(str: S | string) => S extends Stringified<infer J extends Serializable> ? J : Serializable;
30
30
  type Stringified<J extends Serializable> = string & {
31
31
  __json: J;
32
32
  };
@@ -1,5 +1,5 @@
1
- import { parseJson } from '../../dist/chunk-VAE5OCKN.js';
2
- export { JSON_DEFAULTS, JSON_TYPE_NAMES, isBoolean, isNull, isNumber, isPrimitive, isString, parseJson, stringSetJsonInterface, stringifyJson } from '../../dist/chunk-VAE5OCKN.js';
1
+ import { parseJson } from '../../dist/chunk-BF4MVQF6.js';
2
+ export { JSON_DEFAULTS, JSON_TYPE_NAMES, isBoolean, isNull, isNumber, isPrimitive, isString, parseJson, stringSetJsonInterface, stringifyJson } from '../../dist/chunk-BF4MVQF6.js';
3
3
  import '../../dist/chunk-U2IICNHQ.js';
4
4
  import { createStandaloneSelector, IMPLICIT, createSelectorFamily } from 'atom.io/internal';
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atom.io",
3
- "version": "0.18.3",
3
+ "version": "0.19.1",
4
4
  "description": "Composable and testable reactive data library.",
5
5
  "homepage": "https://atom.io.fyi",
6
6
  "sideEffects": false,
@@ -33,7 +33,7 @@
33
33
  "build:realtime-server": "cd realtime-server && tsup",
34
34
  "build:realtime-testing": "cd realtime-testing && tsup",
35
35
  "build:transceivers:set-rtx": "cd transceivers/set-rtx && tsup",
36
- "lint:biome": "biome check --diagnostic-level=warn -- .",
36
+ "lint:biome": "biome check -- .",
37
37
  "lint:eslint": "eslint .",
38
38
  "lint": "bun run lint:biome && bun run lint:eslint",
39
39
  "test": "vitest",
@@ -75,34 +75,33 @@
75
75
  }
76
76
  },
77
77
  "devDependencies": {
78
- "@testing-library/react": "14.2.1",
78
+ "@testing-library/react": "14.2.2",
79
79
  "@types/http-proxy": "1.17.14",
80
80
  "@types/npmlog": "7.0.0",
81
- "@types/react": "18.2.61",
81
+ "@types/react": "18.2.70",
82
82
  "@types/tmp": "0.2.6",
83
- "@vitest/coverage-v8": "1.3.1",
84
- "@vitest/ui": "1.3.1",
83
+ "@vitest/coverage-v8": "1.4.0",
84
+ "@vitest/ui": "1.4.0",
85
85
  "concurrently": "8.2.2",
86
86
  "drizzle-kit": "0.20.14",
87
- "drizzle-orm": "0.29.4",
88
- "eslint": "8.57.0",
89
- "framer-motion": "11.0.8",
90
- "happy-dom": "13.6.2",
87
+ "drizzle-orm": "0.30.4",
88
+ "framer-motion": "11.0.20",
89
+ "happy-dom": "14.3.6",
91
90
  "http-proxy": "1.18.1",
92
91
  "npmlog": "7.0.1",
93
- "postgres": "3.4.3",
94
- "preact": "10.19.6",
92
+ "postgres": "3.4.4",
93
+ "preact": "10.20.1",
95
94
  "react": "18.2.0",
96
95
  "react-dom": "18.2.0",
97
- "react-router-dom": "6.22.2",
98
- "socket.io": "4.7.4",
99
- "socket.io-client": "4.7.4",
96
+ "react-router-dom": "6.22.3",
97
+ "socket.io": "4.7.5",
98
+ "socket.io-client": "4.7.5",
100
99
  "tmp": "0.2.3",
101
100
  "tsup": "8.0.2",
102
- "typescript": "5.3.3",
103
- "vite": "5.1.4",
104
- "vite-tsconfig-paths": "4.3.1",
105
- "vitest": "1.3.1"
101
+ "typescript": "5.4.3",
102
+ "vite": "5.2.6",
103
+ "vite-tsconfig-paths": "4.3.2",
104
+ "vitest": "1.4.0"
106
105
  },
107
106
  "main": "dist/index.js",
108
107
  "types": "dist/index.d.ts",