atom.io 0.19.0 → 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 (43) hide show
  1. package/data/src/join.ts +24 -24
  2. package/dist/{chunk-CVBEVTM5.js → chunk-7VCCW45K.js} +1 -39
  3. package/dist/index.cjs +1 -0
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.js +1 -0
  6. package/internal/dist/index.cjs +1 -1
  7. package/internal/dist/index.d.ts +1 -1
  8. package/internal/dist/index.js +1 -1
  9. package/internal/src/mutable/tracker.ts +1 -1
  10. package/internal/src/set-state/become.ts +1 -1
  11. package/internal/src/subscribe/subscribe-to-state.ts +2 -2
  12. package/internal/src/timeline/add-atom-to-timeline.ts +3 -3
  13. package/internal/src/transaction/build-transaction.ts +1 -1
  14. package/introspection/dist/index.cjs +3 -2
  15. package/introspection/dist/index.d.ts +4 -4
  16. package/introspection/dist/index.js +3 -2
  17. package/introspection/src/attach-atom-index.ts +5 -4
  18. package/introspection/src/index.ts +3 -3
  19. package/json/dist/index.d.ts +1 -1
  20. package/json/dist/index.js +2 -2
  21. package/package.json +18 -19
  22. package/react-devtools/dist/index.cjs +218 -927
  23. package/react-devtools/dist/index.css +0 -18
  24. package/react-devtools/dist/index.d.ts +4 -4
  25. package/react-devtools/dist/index.js +181 -833
  26. package/react-devtools/src/AtomIODevtools.tsx +2 -1
  27. package/react-devtools/src/Button.tsx +3 -1
  28. package/react-devtools/src/StateEditor.tsx +13 -16
  29. package/react-devtools/src/StateIndex.tsx +22 -19
  30. package/react-devtools/src/TimelineIndex.tsx +11 -4
  31. package/react-devtools/src/TransactionIndex.tsx +10 -3
  32. package/react-devtools/src/Updates.tsx +10 -3
  33. package/realtime-react/dist/index.cjs +1 -1
  34. package/realtime-react/dist/index.js +1 -1
  35. package/realtime-react/src/use-single-effect.ts +1 -1
  36. package/realtime-server/dist/index.d.ts +1 -1
  37. package/realtime-server/src/ipc-sockets/child-socket.ts +1 -1
  38. package/realtime-server/src/realtime-server-stores/server-room-external-store.ts +2 -2
  39. package/realtime-testing/dist/index.js +1 -1
  40. package/realtime-testing/src/setup-realtime-test.tsx +1 -1
  41. package/src/silo.ts +4 -0
  42. package/src/validators.ts +2 -2
  43. /package/dist/{chunk-VAE5OCKN.js → chunk-BF4MVQF6.js} +0 -0
package/data/src/join.ts CHANGED
@@ -73,7 +73,7 @@ export type JoinStateFamilies<
73
73
  [string, Content] | null,
74
74
  string
75
75
  >
76
- }
76
+ }
77
77
  : {}) & {
78
78
  readonly [AB in ASide | BSide as AB extends ASide
79
79
  ? `${AB}KeyOf${Capitalize<BSide>}`
@@ -81,33 +81,33 @@ export type JoinStateFamilies<
81
81
  string | null,
82
82
  string
83
83
  >
84
- }
84
+ }
85
85
  : Cardinality extends `1:n`
86
- ? (Content extends Json.Object
86
+ ? (Content extends Json.Object
87
87
  ? {
88
88
  readonly [A in ASide as `${A}EntryOf${Capitalize<BSide>}`]: ReadonlySelectorFamily<
89
89
  [string, Content] | null,
90
90
  string
91
91
  >
92
- } & {
92
+ } & {
93
93
  readonly [B in BSide as `${B}EntriesOf${Capitalize<ASide>}`]: ReadonlySelectorFamily<
94
94
  [string, Content][],
95
95
  string
96
96
  >
97
- }
97
+ }
98
98
  : {}) & {
99
99
  readonly [A in ASide as `${A}KeyOf${Capitalize<BSide>}`]: ReadonlySelectorFamily<
100
100
  string | null,
101
101
  string
102
102
  >
103
- } & {
103
+ } & {
104
104
  readonly [B in BSide as `${B}KeysOf${Capitalize<ASide>}`]: ReadonlySelectorFamily<
105
105
  string[],
106
106
  string
107
107
  >
108
- }
109
- : Cardinality extends `n:n`
110
- ? (Content extends Json.Object
108
+ }
109
+ : Cardinality extends `n:n`
110
+ ? (Content extends Json.Object
111
111
  ? {
112
112
  readonly [AB in ASide | BSide as AB extends ASide
113
113
  ? `${AB}EntriesOf${Capitalize<BSide>}`
@@ -115,7 +115,7 @@ export type JoinStateFamilies<
115
115
  [string, Content][],
116
116
  string
117
117
  >
118
- }
118
+ }
119
119
  : {}) & {
120
120
  readonly [AB in ASide | BSide as AB extends ASide
121
121
  ? `${AB}KeysOf${Capitalize<BSide>}`
@@ -123,8 +123,8 @@ export type JoinStateFamilies<
123
123
  string[],
124
124
  string
125
125
  >
126
- }
127
- : never
126
+ }
127
+ : never
128
128
 
129
129
  export class Join<
130
130
  const ASide extends string,
@@ -615,47 +615,47 @@ export type JoinStates<
615
615
  : `${AB}EntryOf${Capitalize<ASide>}`]: ReadonlySelectorToken<
616
616
  [string, Content] | null
617
617
  >
618
- }
618
+ }
619
619
  : {}) & {
620
620
  readonly [AB in ASide | BSide as AB extends ASide
621
621
  ? `${AB}KeyOf${Capitalize<BSide>}`
622
622
  : `${AB}KeyOf${Capitalize<ASide>}`]: ReadonlySelectorToken<string | null>
623
- }
623
+ }
624
624
  : Cardinality extends `1:n`
625
- ? (Content extends Json.Object
625
+ ? (Content extends Json.Object
626
626
  ? {
627
627
  readonly [A in ASide as `${A}EntryOf${Capitalize<BSide>}`]: ReadonlySelectorToken<
628
628
  [string, Content] | null
629
629
  >
630
- } & {
630
+ } & {
631
631
  readonly [B in BSide as `${B}EntriesOf${Capitalize<ASide>}`]: ReadonlySelectorToken<
632
632
  [string, Content][]
633
633
  >
634
- }
634
+ }
635
635
  : {}) & {
636
636
  readonly [A in ASide as `${A}KeyOf${Capitalize<BSide>}`]: ReadonlySelectorToken<
637
637
  string | null
638
638
  >
639
- } & {
639
+ } & {
640
640
  readonly [B in BSide as `${B}KeysOf${Capitalize<ASide>}`]: ReadonlySelectorToken<
641
641
  string[]
642
642
  >
643
- }
644
- : Cardinality extends `n:n`
645
- ? (Content extends Json.Object
643
+ }
644
+ : Cardinality extends `n:n`
645
+ ? (Content extends Json.Object
646
646
  ? {
647
647
  readonly [AB in ASide | BSide as AB extends ASide
648
648
  ? `${AB}EntriesOf${Capitalize<BSide>}`
649
649
  : `${AB}EntriesOf${Capitalize<ASide>}`]: ReadonlySelectorToken<
650
650
  [string, Content][]
651
651
  >
652
- }
652
+ }
653
653
  : {}) & {
654
654
  readonly [AB in ASide | BSide as AB extends ASide
655
655
  ? `${AB}KeysOf${Capitalize<BSide>}`
656
656
  : `${AB}KeysOf${Capitalize<ASide>}`]: ReadonlySelectorToken<string[]>
657
- }
658
- : never
657
+ }
658
+ : never
659
659
 
660
660
  export function findRelationsInStore<
661
661
  ASide extends string,
@@ -34,18 +34,6 @@ var doNothing = () => void 0;
34
34
  var become = (nextVersionOfThing) => (originalThing) => nextVersionOfThing instanceof Function ? nextVersionOfThing(
35
35
  originalThing instanceof Function ? originalThing() : originalThing
36
36
  ) : nextVersionOfThing;
37
- var isModifier = (validate) => (sample) => {
38
- const sampleIsValid = validate(sample);
39
- if (!sampleIsValid) {
40
- throw new Error(`Invalid test case: JSON.stringify(${sample})`);
41
- }
42
- return (input) => {
43
- if (typeof input !== `function`)
44
- return false;
45
- const testResult = input(sample);
46
- return validate(testResult);
47
- };
48
- };
49
37
  var pass = (...params) => (fn) => fn(...params);
50
38
  var raiseError = (message) => {
51
39
  throw new Error(message);
@@ -58,24 +46,11 @@ var fallback = (fn, fallbackValue) => {
58
46
  }
59
47
  };
60
48
 
61
- // ../anvl/src/array/venn.ts
62
- var includesAll = (items) => (array) => {
63
- for (const item of items) {
64
- if (!array.includes(item))
65
- return false;
66
- }
67
- return true;
68
- };
69
- var comprises = (items) => (array) => includesAll(items)(array) && includesAll(array)(items);
70
-
71
49
  // ../anvl/src/array/index.ts
72
50
  var isArray = (isType) => (input) => Array.isArray(input) && input.every((item) => isType(item));
73
51
  var map = (f) => (a) => a.map(f);
74
52
  var every = (f = Boolean) => (a) => a.every(f);
75
53
  var allTrue = every((x) => x === true);
76
- var addTo = (a) => (x) => a.includes(x) ? a : [...a, x];
77
- var isEmptyArray = (input) => Array.isArray(input) && input.length === 0;
78
- var isOneOf = (...args) => (input) => args.includes(input);
79
54
 
80
55
  // ../anvl/src/nullish/index.ts
81
56
  var isUndefined = (input) => input === void 0;
@@ -103,7 +78,6 @@ var mob = (fn) => (obj) => mapObject(obj, fn);
103
78
  // ../anvl/src/object/refinement.ts
104
79
  var isNonNullObject = (input) => typeof input === `object` && input !== null;
105
80
  var isPlainObject = (input) => isNonNullObject(input) && Object.getPrototypeOf(input) === Object.prototype;
106
- var isEmptyObject = (input) => isPlainObject(input) && Object.keys(input).length === 0;
107
81
  var isRecord = (isKey, isValue) => (input) => isPlainObject(input) && Object.entries(input).every(([k, v]) => isKey(k) && isValue(v));
108
82
  var hasProperties = (isValue, options = { allowExtraProperties: false }) => {
109
83
  const name = `{${recordToEntries(
@@ -132,8 +106,6 @@ var hasProperties = (isValue, options = { allowExtraProperties: false }) => {
132
106
  };
133
107
  var ALLOW_EXTENSION = { allowExtraProperties: true };
134
108
  var doesExtend = (isValue) => hasProperties(isValue, ALLOW_EXTENSION);
135
- var DO_NOT_ALLOW_EXTENSION = { allowExtraProperties: false };
136
- var hasExactProperties = (isValue) => hasProperties(isValue, DO_NOT_ALLOW_EXTENSION);
137
109
 
138
110
  // ../anvl/src/object/sprawl.ts
139
111
  var sprawl = (tree, inspector) => {
@@ -161,19 +133,9 @@ var sprawl = (tree, inspector) => {
161
133
  };
162
134
 
163
135
  // ../anvl/src/object/index.ts
164
- var treeShake = (shouldDiscard = isUndefined) => (obj) => {
165
- const newObj = {};
166
- const entries = Object.entries(obj);
167
- for (const [key, val] of entries) {
168
- if (!shouldDiscard(val, key)) {
169
- newObj[key] = val;
170
- }
171
- }
172
- return newObj;
173
- };
174
136
  var delve = (obj, path) => {
175
137
  const found = path.reduce((acc, key) => acc == null ? void 0 : acc[key], obj);
176
138
  return found === void 0 ? new Error(`Not found`) : { found };
177
139
  };
178
140
 
179
- export { addTo, become, comprises, delve, doNothing, doesExtend, entriesToRecord, fallback, hasExactProperties, ifDefined, isArray, isEmptyArray, isEmptyObject, isModifier, isOneOf, isPlainObject, isRecord, map, mapObject, pipe, raiseError, recordToEntries, sprawl, treeShake };
141
+ export { become, delve, doNothing, doesExtend, fallback, ifDefined, isArray, isPlainObject, isRecord, mapObject, pipe, raiseError, recordToEntries, sprawl };
package/dist/index.cjs CHANGED
@@ -111,6 +111,7 @@ var Silo = class {
111
111
  this.selectorFamily = (options) => Internal.createSelectorFamily(options, s);
112
112
  this.transaction = (options) => Internal.createTransaction(options, s);
113
113
  this.timeline = (options) => Internal.createTimeline(options, s);
114
+ this.findState = (token, key) => Internal.findInStore(token, key, s);
114
115
  this.getState = (token) => Internal.getFromStore(token, s);
115
116
  this.setState = (token, newValue) => Internal.setIntoStore(token, newValue, s);
116
117
  this.subscribe = (token, handler, key) => subscribe(token, handler, key, s);
package/dist/index.d.ts CHANGED
@@ -254,6 +254,7 @@ declare class Silo {
254
254
  selectorFamily: typeof selectorFamily;
255
255
  transaction: typeof transaction;
256
256
  timeline: typeof timeline;
257
+ findState: typeof findState;
257
258
  getState: typeof getState;
258
259
  setState: typeof setState;
259
260
  subscribe: typeof subscribe;
package/dist/index.js CHANGED
@@ -90,6 +90,7 @@ var Silo = class {
90
90
  this.selectorFamily = (options) => createSelectorFamily(options, s);
91
91
  this.transaction = (options) => createTransaction(options, s);
92
92
  this.timeline = (options) => createTimeline(options, s);
93
+ this.findState = (token, key) => findInStore(token, key, s);
93
94
  this.getState = (token) => getFromStore(token, s);
94
95
  this.setState = (token, newValue) => setIntoStore(token, newValue, s);
95
96
  this.subscribe = (token, handler, key) => subscribe(token, handler, key, s);
@@ -2424,7 +2424,7 @@ var buildTransaction = (key, params, store, id) => {
2424
2424
  update: {
2425
2425
  key,
2426
2426
  id,
2427
- epoch: epoch === void 0 ? NaN : epoch + 1,
2427
+ epoch: epoch === void 0 ? Number.NaN : epoch + 1,
2428
2428
  updates: [],
2429
2429
  params,
2430
2430
  output: void 0
@@ -437,7 +437,7 @@ declare const traceAllSelectorAtoms: (selector: Selector<any>, store: Store) =>
437
437
  declare const updateSelectorAtoms: (selectorKey: string, dependency: ReadonlySelectorToken<unknown> | WritableToken<unknown>, store: Store) => void;
438
438
 
439
439
  type Modify<T> = (thing: T) => T;
440
- declare const become: <T>(nextVersionOfThing: T | Modify<T>) => (originalThing: T) => T;
440
+ declare const become: <T>(nextVersionOfThing: Modify<T> | T) => (originalThing: T) => T;
441
441
 
442
442
  declare const setAtomOrSelector: <T>(state: WritableState<T>, value: T | ((oldValue: T) => T), store: Store) => void;
443
443
 
@@ -2146,7 +2146,7 @@ var buildTransaction = (key, params, store, id) => {
2146
2146
  update: {
2147
2147
  key,
2148
2148
  id,
2149
- epoch: epoch === void 0 ? NaN : epoch + 1,
2149
+ epoch: epoch === void 0 ? Number.NaN : epoch + 1,
2150
2150
  updates: [],
2151
2151
  params,
2152
2152
  output: void 0
@@ -32,7 +32,7 @@ export class Tracker<Mutable extends Transceiver<any>> {
32
32
  ? {
33
33
  key: `*${mutableState.family.key}`,
34
34
  subKey: mutableState.family.subKey,
35
- }
35
+ }
36
36
  : undefined
37
37
  const latestUpdateState = createRegularAtom<
38
38
  (Mutable extends Transceiver<infer Signal> ? Signal : never) | null
@@ -6,5 +6,5 @@ export const become =
6
6
  nextVersionOfThing instanceof Function
7
7
  ? nextVersionOfThing(
8
8
  originalThing instanceof Function ? originalThing() : originalThing,
9
- )
9
+ )
10
10
  : nextVersionOfThing
@@ -32,7 +32,7 @@ export function subscribeToState<T>(
32
32
  `Removing subscription "${key}"`,
33
33
  )
34
34
  unsubFunction()
35
- }
35
+ }
36
36
  : () => {
37
37
  store.logger.info(
38
38
  `🙈`,
@@ -44,7 +44,7 @@ export function subscribeToState<T>(
44
44
  for (const unsubFromDependency of dependencyUnsubFunctions) {
45
45
  unsubFromDependency()
46
46
  }
47
- }
47
+ }
48
48
 
49
49
  return unsubscribe
50
50
  }
@@ -51,8 +51,8 @@ export const addAtomToTimeline = (
51
51
  currentTransactionKey
52
52
  ? `in transaction "${currentTransactionKey}"`
53
53
  : currentSelectorKey
54
- ? `in selector "${currentSelectorKey}"`
55
- : ``,
54
+ ? `in selector "${currentSelectorKey}"`
55
+ : ``,
56
56
  )
57
57
  if (tl.timeTraveling === null) {
58
58
  if (tl.selectorTime && tl.selectorTime !== currentSelectorTime) {
@@ -106,7 +106,7 @@ export const addAtomToTimeline = (
106
106
  (key) =>
107
107
  key === updateFromTx.key ||
108
108
  key === updateFromTx.family?.key,
109
- )
109
+ )
110
110
  : false
111
111
  })
112
112
  .map((updateFromTx) => {
@@ -50,7 +50,7 @@ export const buildTransaction = (
50
50
  update: {
51
51
  key,
52
52
  id,
53
- epoch: epoch === undefined ? NaN : epoch + 1,
53
+ epoch: epoch === undefined ? Number.NaN : epoch + 1,
54
54
  updates: [],
55
55
  params,
56
56
  output: undefined,
@@ -42,12 +42,13 @@ var __spreadValues = (a, b) => {
42
42
  };
43
43
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
44
44
  var attachAtomIndex = (store = Internal.IMPLICIT.STORE) => {
45
+ console.log(store.config);
45
46
  const atomTokenIndexState__INTERNAL = Internal.createRegularAtom(
46
47
  {
47
48
  key: `\u{1F441}\u200D\u{1F5E8} Atom Token Index (Internal)`,
48
49
  default: () => {
49
- const defaultAtomIndex = [...store.atoms].filter(([key]) => !key.includes(`\u{1F441}\u200D\u{1F5E8}`)).reduce((acc, [key]) => {
50
- acc[key] = { key, type: `atom` };
50
+ const defaultAtomIndex = [...store.atoms].filter(([key]) => !key.includes(`\u{1F441}\u200D\u{1F5E8}`)).reduce((acc, [key, atom]) => {
51
+ acc[key] = { key, type: atom.type };
51
52
  return acc;
52
53
  }, {});
53
54
  return defaultAtomIndex;
@@ -1,8 +1,8 @@
1
- import { RegularAtomToken, ReadonlySelectorToken, WritableSelectorToken, TransactionToken, ƒn as _n, ReadonlySelectorFamilyToken, TransactionUpdate, TimelineToken } from 'atom.io';
1
+ import { AtomToken, ReadonlySelectorToken, WritableSelectorToken, TransactionToken, ƒn as _n, ReadonlySelectorFamilyToken, TransactionUpdate, TimelineToken } from 'atom.io';
2
2
  import * as Internal from 'atom.io/internal';
3
3
  import { Timeline } from 'atom.io/internal';
4
4
 
5
- type AtomTokenIndex = WritableTokenIndex<RegularAtomToken<unknown>>;
5
+ type AtomTokenIndex = WritableTokenIndex<AtomToken<unknown>>;
6
6
 
7
7
  type SelectorTokenIndex = WritableTokenIndex<ReadonlySelectorToken<unknown> | WritableSelectorToken<unknown>>;
8
8
 
@@ -15,10 +15,10 @@ declare const attachIntrospectionStates: (store?: Internal.Store) => {
15
15
  findTimelineState: ReadonlySelectorFamilyToken<Timeline<any>, string>;
16
16
  };
17
17
 
18
- type FamilyNode<Token extends ReadonlySelectorToken<unknown> | RegularAtomToken<unknown> | WritableSelectorToken<unknown>> = {
18
+ type FamilyNode<Token extends AtomToken<unknown> | ReadonlySelectorToken<unknown> | WritableSelectorToken<unknown>> = {
19
19
  key: string;
20
20
  familyMembers: Record<string, Token>;
21
21
  };
22
- type WritableTokenIndex<Token extends ReadonlySelectorToken<unknown> | RegularAtomToken<unknown> | WritableSelectorToken<unknown>> = Record<string, FamilyNode<Token> | Token>;
22
+ type WritableTokenIndex<Token extends AtomToken<unknown> | ReadonlySelectorToken<unknown> | WritableSelectorToken<unknown>> = Record<string, FamilyNode<Token> | Token>;
23
23
 
24
24
  export { type FamilyNode, type WritableTokenIndex, attachIntrospectionStates };
@@ -3,12 +3,13 @@ import * as Internal from 'atom.io/internal';
3
3
  import { createRegularAtom, newest, createStandaloneSelector, IMPLICIT, createRegularAtomFamily, Subject, createSelectorFamily } from 'atom.io/internal';
4
4
 
5
5
  var attachAtomIndex = (store = IMPLICIT.STORE) => {
6
+ console.log(store.config);
6
7
  const atomTokenIndexState__INTERNAL = createRegularAtom(
7
8
  {
8
9
  key: `\u{1F441}\u200D\u{1F5E8} Atom Token Index (Internal)`,
9
10
  default: () => {
10
- const defaultAtomIndex = [...store.atoms].filter(([key]) => !key.includes(`\u{1F441}\u200D\u{1F5E8}`)).reduce((acc, [key]) => {
11
- acc[key] = { key, type: `atom` };
11
+ const defaultAtomIndex = [...store.atoms].filter(([key]) => !key.includes(`\u{1F441}\u200D\u{1F5E8}`)).reduce((acc, [key, atom]) => {
12
+ acc[key] = { key, type: atom.type };
12
13
  return acc;
13
14
  }, {});
14
15
  return defaultAtomIndex;
@@ -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.19.0",
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.62",
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.5",
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",