import { Color, DiagramNode, ExclusiveUnion, Fqn, IconUrl, NonEmptyArray, RelationId, RelationshipArrowType, RelationshipLineType, ViewId } from '@likec4/core/types'; import { FunctionComponent } from 'react'; import { Simplify } from 'type-fest'; import { BaseEdge, BaseEdgeData, BaseEdgeProps, BaseNode, BaseNodeData, BaseNodeProps, NonOptional } from '../../base/types'; export declare namespace RelationshipsBrowserTypes { type Column = 'incomers' | 'subjects' | 'outgoers'; /** * The node's incoming and outgoing ports */ type Ports = { in: string[]; out: string[]; }; type ElementNodeData = Simplify> & { column: Column; fqn: Fqn; icon: string | null; ports: Ports; existsInCurrentView: boolean; }>; type CompoundNodeData = Simplify> & { column: Column; fqn: Fqn; depth: number; icon: IconUrl; ports: Ports; existsInCurrentView: boolean; }>; type EmptyNodeData = BaseNodeData & { column: Column; }; type ElementNode = BaseNode; type CompoundNode = BaseNode; type EmptyNode = BaseNode; type AnyNode = ElementNode | CompoundNode | EmptyNode; type NodeType = AnyNode['type']; type Node = Extract; type NodeProps = BaseNodeProps>; type NodeData = ExclusiveUnion<{ ElementNodeData: ElementNodeData; CompoundNodeData: CompoundNodeData; EmptyNodeData: EmptyNodeData; }>; type NodeRenderer = FunctionComponent>; type NodeRenderers = { [T in NodeType]: NodeRenderer; }; type EdgeData = Simplify; color: Color; label: string | null; navigateTo: ViewId | null; line: RelationshipLineType; head?: RelationshipArrowType; tail?: RelationshipArrowType; existsInCurrentView: boolean; }>; type Edge = BaseEdge; type EdgeProps = BaseEdgeProps; }