import { GraphBlockHandler, GraphEmbedderHandler } from "./main.js"; import type { BlockGraphProperties, EntityVertexId, LinkEntityAndRightEntity, Subgraph } from "./main.js"; import type { Entity } from "@blockprotocol/type-system"; import type { FunctionComponent, RefObject } from "react"; export type BlockComponent = FunctionComponent>; /** * Create a GraphBlockHandler instance, using a reference to an element in the block. * * The graphModule will only be reconstructed if the element reference changes. * Updates to any callbacks after first constructing should be made by calling graphModule.on("messageName", callback); */ export declare const useGraphBlockModule: (ref: RefObject, constructorArgs?: Omit[0], "element">) => { graphModule: GraphBlockHandler; }; /** * Create a GraphBlockHandler instance, using a reference to an element in the block. * * The graphModule will only be reconstructed if the element reference changes. * Updates to any callbacks after first constructing should be made by: * 1. to register one, call graphModule.on("messageName", callback); * 2. to register multiple, call graphModule.registerCallbacks({ [messageName]: callback }); */ export declare const useGraphEmbedderModule: (ref: RefObject, constructorArgs: Omit[0], "element">) => { graphModule: GraphEmbedderHandler; }; export declare const useEntitySubgraph: (entitySubgraph: Subgraph<{ vertexId: EntityVertexId; element: RootEntity; }>) => { rootEntity: RootEntity; linkedEntities: RootEntityLinkedEntities; };