import type { NodeState, EdgeState } from "../core/constants.js"; /** Shared interface for graph nodes used by the rendering runtime. */ export interface NodeInterface { readonly isNode: boolean; readonly id: string | number; getId(): string | number; getDegree(): number; getInDegree(): number; getOutDegree(): number; getSiblingIds(): (string | number)[]; getConnectedEdges(): EdgeInterface[]; addConnectedEdges(edge: EdgeInterface | EdgeInterface[]): void; removeConnectedEdges(edge: EdgeInterface | EdgeInterface[]): void; clearConnectedEdges(): void; getPropertyValue(key: string): unknown; setData(data: Record): void; setDataProperty(key: string, value: unknown): void; setState(state: NodeState): void; getState(): NodeState; isSelectable(): boolean; shouldHighlightConnectedEdges(): boolean; } /** Shared interface for graph edges used by the rendering runtime. */ export interface EdgeInterface { readonly isEdge: boolean; readonly id: string | number; getId(): string | number; isDirected(): boolean; getSourceNodeId(): string | number; getTargetNodeId(): string | number; getConnectedNodes(): NodeInterface[]; addNode(node: NodeInterface): void; removeNode(node: NodeInterface): void; getPropertyValue(key: string): unknown; setData(data: Record): void; setDataProperty(key: string, value: unknown): void; setState(state: EdgeState): void; getState(): EdgeState; } export type GraphProps = { onTransactionStart?: () => void; onTransactionEnd?: () => void; onNodeAdded?: (node: NodeInterface) => void; onNodeRemoved?: (node: NodeInterface) => void; onNodeUpdated?: (node: NodeInterface) => void; onEdgeAdded?: (edge: EdgeInterface) => void; onEdgeRemoved?: (edge: EdgeInterface) => void; onEdgeUpdated?: (edge: EdgeInterface) => void; }; /** Runtime abstraction consumed by the rendering engine. */ export declare abstract class Graph { private _props; protected constructor(props: PropsT); get props(): PropsT; setProps(props: PropsT): void; updateProps(props: PropsT): void; abstract get version(): number; abstract getNodes(): Iterable; abstract getEdges(): Iterable; abstract findNode(id: string | number): NodeInterface | undefined; findNodeById?(id: string | number): NodeInterface | undefined; getGraphName?(): string; triggerUpdate?(): void; abstract destroy?(): void; } //# sourceMappingURL=graph.d.ts.map