UNPKG

@eventcatalogtest/visualizer

Version:

ReactFlow nodes and visualizer components for EventCatalog Studio

81 lines (75 loc) 1.93 kB
import { Connection, MarkerType } from '@xyflow/react'; import * as react_jsx_runtime from 'react/jsx-runtime'; type NodeConfiguration = { type: string; icon: React.ComponentType; color: string; targetCanConnectTo?: string[]; sourceCanConnectTo?: string[]; validateConnection?: (connection: Connection) => boolean; getEdgeOptions?: (connection: Connection) => { label: string; markerEnd: { type: MarkerType; color: string; }; }; defaultData?: any; editor?: { title: string; subtitle: string; schema: any; }; }; type RegisteredNode = { type: string; category: string; component: React.ComponentType<any>; configuration: NodeConfiguration; }; type NodeCategory = { type: string; label: string; icon: React.ComponentType; }; type EventNodeData = { id: string; summary: string; version: string; owners?: string[]; sends?: string[]; receives?: string[]; name: string; specifications?: string[]; repository?: { url: string; }; styles?: { node: { color: string; label: string; }; icon: string; }; mode: 'simple' | 'full'; }; interface EventNodeProps { id: string; data: EventNodeData; selected?: boolean; } declare function EventNode(props: EventNodeProps): react_jsx_runtime.JSX.Element; declare const _default: NodeConfiguration; declare const nodes: { event: { component: typeof EventNode; config: NodeConfiguration; }; }; declare const nodeConfigs: { event: NodeConfiguration; }; declare const nodeComponents: { event: typeof EventNode; }; export { EventNode, type EventNodeData, type EventNodeProps, type NodeCategory, type NodeConfiguration, type RegisteredNode, _default as eventConfig, nodeComponents, nodeConfigs, nodes };