Skip to content

Commit cba5470

Browse files
committed
move entity to separate folder and cleanup imports
1 parent 3848e82 commit cba5470

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

packages/hypergraph-react/src/HypergraphSpaceContext.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import type { AnyDocumentId, DocHandle, Repo } from '@automerge/automerge-repo';
44
import { useRepo } from '@automerge/automerge-repo-react-hooks';
55
import { Entity, Utils } from '@graphprotocol/hypergraph';
6-
import type { DocumentContent } from '@graphprotocol/hypergraph/Entity';
76
import * as Schema from 'effect/Schema';
87
import { type ReactNode, createContext, useContext, useRef, useState, useSyncExternalStore } from 'react';
98

@@ -32,7 +31,7 @@ export function HypergraphSpaceProvider({ space, children }: { space: string; ch
3231
let current = ref.current;
3332
if (current === undefined || space !== current.space || repo !== current.repo) {
3433
const id = Utils.idToAutomergeId(space) as AnyDocumentId;
35-
const handle = repo.find<DocumentContent>(id);
34+
const handle = repo.find<Entity.DocumentContent>(id);
3635

3736
current = ref.current = {
3837
space,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type { DocHandle, Patch } from '@automerge/automerge-repo';
22
import * as VariantSchema from '@effect/experimental/VariantSchema';
33
import * as Data from 'effect/Data';
44
import * as Schema from 'effect/Schema';
5-
import { generateId } from './utils/generateId.js';
6-
import { hasArrayField } from './utils/hasArrayField.js';
5+
import { generateId } from '../utils/generateId.js';
6+
import { hasArrayField } from '../utils/hasArrayField.js';
77

88
const {
99
Class,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './entity.js';

packages/hypergraph/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
export * as Entity from './entity/index.js';
12
export * as Identity from './identity/index.js';
23
export * as Key from './key/index.js';
34
export * as Messages from './messages/index.js';
4-
export * as Entity from './Entity.js';
55
export * as SpaceEvents from './space-events/index.js';
66
export * from './store.js';
77
export * as Utils from './utils/index.js';

0 commit comments

Comments
 (0)