@dxos/app-graph 0.8.4-main.5ad4a44 → 0.8.4-main.66e292d

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.
package/src/graph.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Registry, Rx } from '@effect-rx/rx-react';
5
+ import { Atom, Registry } from '@effect-atom/atom-react';
6
6
  import * as Function from 'effect/Function';
7
7
  import * as Option from 'effect/Option';
8
8
  import * as Record from 'effect/Record';
@@ -16,7 +16,9 @@ import { type MakeOptional, isNonNullable } from '@dxos/util';
16
16
  import { type Action, type ActionGroup, type Node, type NodeArg, type Relation } from './node';
17
17
 
18
18
  const graphSymbol = Symbol('graph');
19
- type DeepWriteable<T> = { -readonly [K in keyof T]: T[K] extends object ? DeepWriteable<T[K]> : T[K] };
19
+ type DeepWriteable<T> = {
20
+ -readonly [K in keyof T]: T[K] extends object ? DeepWriteable<T[K]> : T[K];
21
+ };
20
22
  type NodeInternal = DeepWriteable<Node> & { [graphSymbol]: Graph };
21
23
 
22
24
  /**
@@ -79,32 +81,32 @@ export interface ReadableGraph {
79
81
  */
80
82
  toJSON(id?: string): object;
81
83
 
82
- json(id?: string): Rx.Rx<any>;
84
+ json(id?: string): Atom.Atom<any>;
83
85
 
84
86
  /**
85
- * Get the rx key for the node with the given id.
87
+ * Get the atom key for the node with the given id.
86
88
  */
87
- node(id: string): Rx.Rx<Option.Option<Node>>;
89
+ node(id: string): Atom.Atom<Option.Option<Node>>;
88
90
 
89
91
  /**
90
- * Get the rx key for the node with the given id.
92
+ * Get the atom key for the node with the given id.
91
93
  */
92
- nodeOrThrow(id: string): Rx.Rx<Node>;
94
+ nodeOrThrow(id: string): Atom.Atom<Node>;
93
95
 
94
96
  /**
95
- * Get the rx key for the connections of the node with the given id.
97
+ * Get the atom key for the connections of the node with the given id.
96
98
  */
97
- connections(id: string, relation?: Relation): Rx.Rx<Node[]>;
99
+ connections(id: string, relation?: Relation): Atom.Atom<Node[]>;
98
100
 
99
101
  /**
100
- * Get the rx key for the actions of the node with the given id.
102
+ * Get the atom key for the actions of the node with the given id.
101
103
  */
102
- actions(id: string): Rx.Rx<(Action | ActionGroup)[]>;
104
+ actions(id: string): Atom.Atom<(Action | ActionGroup)[]>;
103
105
 
104
106
  /**
105
- * Get the rx key for the edges of the node with the given id.
107
+ * Get the atom key for the edges of the node with the given id.
106
108
  */
107
- edges(id: string): Rx.Rx<Edges>;
109
+ edges(id: string): Atom.Atom<Edges>;
108
110
 
109
111
  /**
110
112
  * Alias for `getNodeOrThrow(ROOT_ID)`.
@@ -228,7 +230,10 @@ export interface WritableGraph extends ExpandableGraph {
228
230
  * The Graph represents the user interface information architecture of the application constructed via plugins.
229
231
  */
230
232
  export class Graph implements WritableGraph {
231
- readonly onNodeChanged = new Event<{ id: string; node: Option.Option<Node> }>();
233
+ readonly onNodeChanged = new Event<{
234
+ id: string;
235
+ node: Option.Option<Node>;
236
+ }>();
232
237
 
233
238
  private readonly _onExpand?: (id: string, relation: Relation) => void;
234
239
  private readonly _onInitialize?: (id: string) => Promise<void>;
@@ -239,55 +244,63 @@ export class Graph implements WritableGraph {
239
244
  private readonly _initialized = Record.empty<string, boolean>();
240
245
  private readonly _initialEdges = Record.empty<string, Edges>();
241
246
  private readonly _initialNodes = Record.fromEntries([
242
- [ROOT_ID, this._constructNode({ id: ROOT_ID, type: ROOT_TYPE, data: null, properties: {} })],
247
+ [
248
+ ROOT_ID,
249
+ this._constructNode({
250
+ id: ROOT_ID,
251
+ type: ROOT_TYPE,
252
+ data: null,
253
+ properties: {},
254
+ }),
255
+ ],
243
256
  ]);
244
257
 
245
258
  /** @internal */
246
- readonly _node = Rx.family<string, Rx.Writable<Option.Option<Node>>>((id) => {
259
+ readonly _node = Atom.family<string, Atom.Writable<Option.Option<Node>>>((id) => {
247
260
  const initial = Option.flatten(Record.get(this._initialNodes, id));
248
- return Rx.make<Option.Option<Node>>(initial).pipe(Rx.keepAlive, Rx.withLabel(`graph:node:${id}`));
261
+ return Atom.make<Option.Option<Node>>(initial).pipe(Atom.keepAlive, Atom.withLabel(`graph:node:${id}`));
249
262
  });
250
263
 
251
- private readonly _nodeOrThrow = Rx.family<string, Rx.Rx<Node>>((id) => {
252
- return Rx.make((get) => {
264
+ private readonly _nodeOrThrow = Atom.family<string, Atom.Atom<Node>>((id) => {
265
+ return Atom.make((get) => {
253
266
  const node = get(this._node(id));
254
267
  invariant(Option.isSome(node), `Node not available: ${id}`);
255
268
  return node.value;
256
269
  });
257
270
  });
258
271
 
259
- private readonly _edges = Rx.family<string, Rx.Writable<Edges>>((id) => {
272
+ private readonly _edges = Atom.family<string, Atom.Writable<Edges>>((id) => {
260
273
  const initial = Record.get(this._initialEdges, id).pipe(Option.getOrElse(() => ({ inbound: [], outbound: [] })));
261
- return Rx.make<Edges>(initial).pipe(Rx.keepAlive, Rx.withLabel(`graph:edges:${id}`));
274
+ return Atom.make<Edges>(initial).pipe(Atom.keepAlive, Atom.withLabel(`graph:edges:${id}`));
262
275
  });
263
276
 
264
- // NOTE: Currently the argument to the family needs to be referentially stable for the rx to be referentially stable.
265
- // TODO(wittjosiah): Rx feature request, support for something akin to `ComplexMap` to allow for complex arguments.
266
- private readonly _connections = Rx.family<string, Rx.Rx<Node[]>>((key) => {
267
- return Rx.make((get) => {
277
+ // NOTE: Currently the argument to the family needs to be referentially stable for the atom to be referentially stable.
278
+ // TODO(wittjosiah): Atom feature request, support for something akin to `ComplexMap` to allow for complex arguments.
279
+ private readonly _connections = Atom.family<string, Atom.Atom<Node[]>>((key) => {
280
+ return Atom.make((get) => {
268
281
  const [id, relation] = key.split('$');
269
282
  const edges = get(this._edges(id));
270
283
  return edges[relation as Relation]
271
284
  .map((id) => get(this._node(id)))
272
285
  .filter(Option.isSome)
273
286
  .map((o) => o.value);
274
- }).pipe(Rx.withLabel(`graph:connections:${key}`));
287
+ }).pipe(Atom.withLabel(`graph:connections:${key}`));
275
288
  });
276
289
 
277
- private readonly _actions = Rx.family<string, Rx.Rx<(Action | ActionGroup)[]>>((id) => {
278
- return Rx.make((get) => {
290
+ private readonly _actions = Atom.family<string, Atom.Atom<(Action | ActionGroup)[]>>((id) => {
291
+ return Atom.make((get) => {
279
292
  return get(this._connections(`${id}$outbound`)).filter(
280
293
  (node) => node.type === ACTION_TYPE || node.type === ACTION_GROUP_TYPE,
281
294
  );
282
- }).pipe(Rx.withLabel(`graph:actions:${id}`));
295
+ }).pipe(Atom.withLabel(`graph:actions:${id}`));
283
296
  });
284
297
 
285
- private readonly _json = Rx.family<string, Rx.Rx<any>>((id) => {
286
- return Rx.make((get) => {
298
+ private readonly _json = Atom.family<string, Atom.Atom<any>>((id) => {
299
+ return Atom.make((get) => {
287
300
  const toJSON = (node: Node, seen: string[] = []): any => {
288
301
  const nodes = get(this.connections(node.id));
289
302
  const obj: Record<string, any> = {
290
- id: node.id.length > 32 ? `${node.id.slice(0, 32)}...` : node.id,
303
+ id: node.id,
291
304
  type: node.type,
292
305
  };
293
306
  if (node.properties.label) {
@@ -307,7 +320,7 @@ export class Graph implements WritableGraph {
307
320
 
308
321
  const root = get(this.nodeOrThrow(id));
309
322
  return toJSON(root);
310
- }).pipe(Rx.withLabel(`graph:json:${id}`));
323
+ }).pipe(Atom.withLabel(`graph:json:${id}`));
311
324
  });
312
325
 
313
326
  constructor({ registry, nodes, edges, onInitialize, onExpand, onRemoveNode }: GraphParams = {}) {
@@ -337,15 +350,15 @@ export class Graph implements WritableGraph {
337
350
  return this._json(id);
338
351
  }
339
352
 
340
- node(id: string): Rx.Rx<Option.Option<Node>> {
353
+ node(id: string): Atom.Atom<Option.Option<Node>> {
341
354
  return this._node(id);
342
355
  }
343
356
 
344
- nodeOrThrow(id: string): Rx.Rx<Node> {
357
+ nodeOrThrow(id: string): Atom.Atom<Node> {
345
358
  return this._nodeOrThrow(id);
346
359
  }
347
360
 
348
- connections(id: string, relation: Relation = 'outbound'): Rx.Rx<Node[]> {
361
+ connections(id: string, relation: Relation = 'outbound'): Atom.Atom<Node[]> {
349
362
  return this._connections(`${id}$${relation}`);
350
363
  }
351
364
 
@@ -353,7 +366,7 @@ export class Graph implements WritableGraph {
353
366
  return this._actions(id);
354
367
  }
355
368
 
356
- edges(id: string): Rx.Rx<Edges> {
369
+ edges(id: string): Atom.Atom<Edges> {
357
370
  return this._edges(id);
358
371
  }
359
372
 
@@ -401,38 +414,48 @@ export class Graph implements WritableGraph {
401
414
  }
402
415
 
403
416
  addNodes(nodes: NodeArg<any, Record<string, any>>[]): void {
404
- Rx.batch(() => {
417
+ Atom.batch(() => {
405
418
  nodes.map((node) => this.addNode(node));
406
419
  });
407
420
  }
408
421
 
409
422
  addNode({ nodes, edges, ...nodeArg }: NodeArg<any, Record<string, any>>): void {
410
423
  const { id, type, data = null, properties = {} } = nodeArg;
411
- const nodeRx = this._node(id);
412
- const node = this._registry.get(nodeRx);
424
+ const nodeAtom = this._node(id);
425
+ const node = this._registry.get(nodeAtom);
413
426
  Option.match(node, {
414
427
  onSome: (node) => {
415
428
  const typeChanged = node.type !== type;
416
429
  const dataChanged = node.data !== data;
417
430
  const propertiesChanged = Object.keys(properties).some((key) => node.properties[key] !== properties[key]);
418
- log('existing node', { id, typeChanged, dataChanged, propertiesChanged });
431
+ log('existing node', {
432
+ id,
433
+ typeChanged,
434
+ dataChanged,
435
+ propertiesChanged,
436
+ });
419
437
  if (typeChanged || dataChanged || propertiesChanged) {
420
438
  log('updating node', { id, type, data, properties });
421
- const newNode = Option.some({ ...node, type, data, properties: { ...node.properties, ...properties } });
422
- this._registry.set(nodeRx, newNode);
439
+ const newNode = Option.some({
440
+ ...node,
441
+ type,
442
+ data,
443
+ properties: { ...node.properties, ...properties },
444
+ });
445
+ this._registry.set(nodeAtom, newNode);
423
446
  this.onNodeChanged.emit({ id, node: newNode });
424
447
  }
425
448
  },
426
449
  onNone: () => {
427
450
  log('new node', { id, type, data, properties });
428
451
  const newNode = this._constructNode({ id, type, data, properties });
429
- this._registry.set(nodeRx, newNode);
452
+ this._registry.set(nodeAtom, newNode);
430
453
  this.onNodeChanged.emit({ id, node: newNode });
431
454
  },
432
455
  });
433
456
 
434
457
  if (nodes) {
435
- // Rx.batch(() => {
458
+ // Atom.batch(() => {
436
459
  this.addNodes(nodes);
437
460
  const _edges = nodes.map((node) => ({ source: id, target: node.id }));
438
461
  this.addEdges(_edges);
@@ -445,15 +468,15 @@ export class Graph implements WritableGraph {
445
468
  }
446
469
 
447
470
  removeNodes(ids: string[], edges = false): void {
448
- Rx.batch(() => {
471
+ Atom.batch(() => {
449
472
  ids.map((id) => this.removeNode(id, edges));
450
473
  });
451
474
  }
452
475
 
453
476
  removeNode(id: string, edges = false): void {
454
- const nodeRx = this._node(id);
455
- // TODO(wittjosiah): Is there a way to mark these rx values for garbage collection?
456
- this._registry.set(nodeRx, Option.none());
477
+ const nodeAtom = this._node(id);
478
+ // TODO(wittjosiah): Is there a way to mark these atom values for garbage collection?
479
+ this._registry.set(nodeAtom, Option.none());
457
480
  this.onNodeChanged.emit({ id, node: Option.none() });
458
481
  // TODO(wittjosiah): Reset expanded and initialized flags?
459
482
 
@@ -470,55 +493,67 @@ export class Graph implements WritableGraph {
470
493
  }
471
494
 
472
495
  addEdges(edges: Edge[]): void {
473
- Rx.batch(() => {
496
+ Atom.batch(() => {
474
497
  edges.map((edge) => this.addEdge(edge));
475
498
  });
476
499
  }
477
500
 
478
501
  addEdge(edgeArg: Edge): void {
479
- const sourceRx = this._edges(edgeArg.source);
480
- const source = this._registry.get(sourceRx);
502
+ const sourceAtom = this._edges(edgeArg.source);
503
+ const source = this._registry.get(sourceAtom);
481
504
  if (!source.outbound.includes(edgeArg.target)) {
482
- log('add outbound edge', { source: edgeArg.source, target: edgeArg.target });
483
- this._registry.set(sourceRx, { inbound: source.inbound, outbound: [...source.outbound, edgeArg.target] });
505
+ log('add outbound edge', {
506
+ source: edgeArg.source,
507
+ target: edgeArg.target,
508
+ });
509
+ this._registry.set(sourceAtom, {
510
+ inbound: source.inbound,
511
+ outbound: [...source.outbound, edgeArg.target],
512
+ });
484
513
  }
485
514
 
486
- const targetRx = this._edges(edgeArg.target);
487
- const target = this._registry.get(targetRx);
515
+ const targetAtom = this._edges(edgeArg.target);
516
+ const target = this._registry.get(targetAtom);
488
517
  if (!target.inbound.includes(edgeArg.source)) {
489
- log('add inbound edge', { source: edgeArg.source, target: edgeArg.target });
490
- this._registry.set(targetRx, { inbound: [...target.inbound, edgeArg.source], outbound: target.outbound });
518
+ log('add inbound edge', {
519
+ source: edgeArg.source,
520
+ target: edgeArg.target,
521
+ });
522
+ this._registry.set(targetAtom, {
523
+ inbound: [...target.inbound, edgeArg.source],
524
+ outbound: target.outbound,
525
+ });
491
526
  }
492
527
  }
493
528
 
494
529
  removeEdges(edges: Edge[], removeOrphans = false): void {
495
- Rx.batch(() => {
530
+ Atom.batch(() => {
496
531
  edges.map((edge) => this.removeEdge(edge, removeOrphans));
497
532
  });
498
533
  }
499
534
 
500
535
  removeEdge(edgeArg: Edge, removeOrphans = false): void {
501
- const sourceRx = this._edges(edgeArg.source);
502
- const source = this._registry.get(sourceRx);
536
+ const sourceAtom = this._edges(edgeArg.source);
537
+ const source = this._registry.get(sourceAtom);
503
538
  if (source.outbound.includes(edgeArg.target)) {
504
- this._registry.set(sourceRx, {
539
+ this._registry.set(sourceAtom, {
505
540
  inbound: source.inbound,
506
541
  outbound: source.outbound.filter((id) => id !== edgeArg.target),
507
542
  });
508
543
  }
509
544
 
510
- const targetRx = this._edges(edgeArg.target);
511
- const target = this._registry.get(targetRx);
545
+ const targetAtom = this._edges(edgeArg.target);
546
+ const target = this._registry.get(targetAtom);
512
547
  if (target.inbound.includes(edgeArg.source)) {
513
- this._registry.set(targetRx, {
548
+ this._registry.set(targetAtom, {
514
549
  inbound: target.inbound.filter((id) => id !== edgeArg.source),
515
550
  outbound: target.outbound,
516
551
  });
517
552
  }
518
553
 
519
554
  if (removeOrphans) {
520
- const source = this._registry.get(sourceRx);
521
- const target = this._registry.get(targetRx);
555
+ const source = this._registry.get(sourceAtom);
556
+ const target = this._registry.get(targetAtom);
522
557
  if (source.outbound.length === 0 && source.inbound.length === 0 && edgeArg.source !== ROOT_ID) {
523
558
  this.removeNodes([edgeArg.source]);
524
559
  }
@@ -529,12 +564,12 @@ export class Graph implements WritableGraph {
529
564
  }
530
565
 
531
566
  sortEdges(id: string, relation: Relation, order: string[]): void {
532
- const edgesRx = this._edges(id);
533
- const edges = this._registry.get(edgesRx);
567
+ const edgesAtom = this._edges(id);
568
+ const edges = this._registry.get(edgesAtom);
534
569
  const unsorted = edges[relation].filter((id) => !order.includes(id)) ?? [];
535
570
  const sorted = order.filter((id) => edges[relation].includes(id)) ?? [];
536
571
  edges[relation].splice(0, edges[relation].length, ...[...sorted, ...unsorted]);
537
- this._registry.set(edgesRx, edges);
572
+ this._registry.set(edgesAtom, edges);
538
573
  }
539
574
 
540
575
  traverse({ visitor, source = ROOT_ID, relation = 'outbound' }: GraphTraversalOptions, path: string[] = []): void {
@@ -599,6 +634,11 @@ export class Graph implements WritableGraph {
599
634
 
600
635
  /** @internal */
601
636
  _constructNode(node: NodeArg<any>): Option.Option<Node> {
602
- return Option.some({ [graphSymbol]: this, data: null, properties: {}, ...node });
637
+ return Option.some({
638
+ [graphSymbol]: this,
639
+ data: null,
640
+ properties: {},
641
+ ...node,
642
+ });
603
643
  }
604
644
  }
package/src/node.ts CHANGED
@@ -77,7 +77,7 @@ export type InvokeParams = {
77
77
  caller?: string;
78
78
  };
79
79
 
80
- export type ActionData = (params?: InvokeParams) => MaybePromise<void>;
80
+ export type ActionData = (params?: InvokeParams) => MaybePromise<any>;
81
81
 
82
82
  export type Action<TProperties extends Record<string, any> = Record<string, any>> = Readonly<
83
83
  Omit<Node<ActionData, TProperties>, 'properties'> & {
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Registry, Rx } from '@effect-rx/rx-react';
5
+ import { Atom, Registry } from '@effect-atom/atom-react';
6
6
  import { signal } from '@preact/signals-core';
7
7
  import { afterEach, beforeEach, describe, expect, onTestFinished, test } from 'vitest';
8
8
 
@@ -14,25 +14,25 @@ import { EchoTestBuilder } from '@dxos/echo-db/testing';
14
14
  import { registerSignalsRuntime } from '@dxos/echo-signals';
15
15
 
16
16
  import { ROOT_ID } from './graph';
17
- import { GraphBuilder, createExtension, rxFromSignal } from './graph-builder';
18
- import { rxFromQuery } from './testing';
17
+ import { GraphBuilder, atomFromSignal, createExtension } from './graph-builder';
18
+ import { atomFromQuery } from './testing';
19
19
 
20
20
  registerSignalsRuntime();
21
21
 
22
22
  const EXAMPLE_TYPE = 'dxos.org/type/example';
23
23
 
24
24
  describe('signals integration', () => {
25
- test('creating rx from signal', () => {
25
+ test('creating atom from signal', () => {
26
26
  const registry = Registry.make();
27
27
  const state = signal<number>(0);
28
- const value = rxFromSignal(() => state.value);
29
- const inline = Rx.make((get) => {
30
- // NOTE: This will create a new rx instance each time.
31
- // This test is verifying that this behaves the same as using a stable rx instance.
28
+ const value = atomFromSignal(() => state.value);
29
+ const inline = Atom.make((get) => {
30
+ // NOTE: This will create a new atom instance each time.
31
+ // This test is verifying that this behaves the same as using a stable atom instance.
32
32
  // The parent will remain subscribed to one instance until the new one is created.
33
33
  // The old one will then be garbage collected because it is no longer referenced.
34
- const rx = rxFromSignal(() => get(value));
35
- return get(rx);
34
+ const atom = atomFromSignal(() => get(value));
35
+ return get(atom);
36
36
  });
37
37
 
38
38
  let count = 0;
@@ -72,15 +72,15 @@ describe('signals integration', () => {
72
72
  await dbBuilder.close();
73
73
  });
74
74
 
75
- test('rx references are loaded lazily and receive signal notifications', async () => {
75
+ test('atom references are loaded lazily and receive signal notifications', async () => {
76
76
  const registry = Registry.make();
77
77
  await using peer = await dbBuilder.createPeer();
78
78
 
79
79
  let outerId: string;
80
80
  {
81
81
  await using db = await peer.createDatabase();
82
- const inner = db.add({ name: 'inner' });
83
- const outer = db.add({ inner: Ref.make(inner) });
82
+ const inner = db.add(Obj.make(Type.Expando, { name: 'inner' }));
83
+ const outer = db.add(Obj.make(Type.Expando, { inner: Ref.make(inner) }));
84
84
  outerId = outer.id;
85
85
  await db.flush();
86
86
  }
@@ -89,23 +89,24 @@ describe('signals integration', () => {
89
89
  {
90
90
  await using db = await peer.openLastDatabase();
91
91
  const outer = (await db.query(Filter.ids(outerId)).first()) as any;
92
- const innerRx = rxFromSignal(() => outer.inner.target);
93
-
92
+ const innerAtom = atomFromSignal(() => outer.inner.target);
94
93
  const loaded = new Trigger();
94
+
95
95
  let count = 0;
96
- const cancel = registry.subscribe(innerRx, (inner) => {
96
+ const cancel = registry.subscribe(innerAtom, (inner) => {
97
97
  count++;
98
98
  if (inner) {
99
99
  loaded.wake();
100
100
  }
101
101
  });
102
+
102
103
  onTestFinished(() => cancel());
103
104
 
104
- expect(registry.get(innerRx)).to.eq(undefined);
105
+ expect(registry.get(innerAtom)).to.eq(undefined);
105
106
  expect(count).to.eq(1);
106
107
 
107
108
  await loaded.wait();
108
- expect(registry.get(innerRx)).to.include({ name: 'inner' });
109
+ expect(registry.get(innerAtom)).to.include({ name: 'inner' });
109
110
  expect(count).to.eq(2);
110
111
  }
111
112
  });
@@ -117,8 +118,8 @@ describe('signals integration', () => {
117
118
  let outerId, innerId: string;
118
119
  {
119
120
  await using db = await peer.createDatabase();
120
- const inner = db.add({ name: 'inner' });
121
- const outer = db.add({ inner: Ref.make(inner) });
121
+ const inner = db.add(Obj.make(Type.Expando, { name: 'inner' }));
122
+ const outer = db.add(Obj.make(Type.Expando, { inner: Ref.make(inner) }));
122
123
  innerId = inner.id;
123
124
  outerId = outer.id;
124
125
  await db.flush();
@@ -129,8 +130,8 @@ describe('signals integration', () => {
129
130
  {
130
131
  await using db = await peer.openLastDatabase();
131
132
  const outer = (await db.query(Filter.ids(outerId)).first()) as any;
132
- const innerRx = rxFromSignal(() => outer.inner.target);
133
- const inner = registry.get(innerRx);
133
+ const innerAtom = atomFromSignal(() => outer.inner.target);
134
+ const inner = registry.get(innerAtom);
134
135
  expect(inner).to.eq(undefined);
135
136
 
136
137
  const builder = new GraphBuilder({ registry });
@@ -138,8 +139,8 @@ describe('signals integration', () => {
138
139
  createExtension({
139
140
  id: 'outbound-connector',
140
141
  connector: () =>
141
- Rx.make((get) => {
142
- const inner = get(innerRx) as any;
142
+ Atom.make((get) => {
143
+ const inner = get(innerAtom) as any;
143
144
  return inner ? [{ id: inner.id, type: EXAMPLE_TYPE, data: inner.name }] : [];
144
145
  }),
145
146
  }),
@@ -184,9 +185,13 @@ describe('signals integration', () => {
184
185
  connector: () => {
185
186
  const query = db.query(Filter.type(Type.Expando));
186
187
 
187
- return Rx.make((get) => {
188
- const objects = get(rxFromQuery(query));
189
- return objects.map((object) => ({ id: object.id, type: EXAMPLE_TYPE, data: object.name }));
188
+ return Atom.make((get) => {
189
+ const objects = get(atomFromQuery(query));
190
+ return objects.map((object) => ({
191
+ id: object.id,
192
+ type: EXAMPLE_TYPE,
193
+ data: object.name,
194
+ }));
190
195
  });
191
196
  },
192
197
  }),