@graphql-hive/laboratory
Version:
[Hive](https://the-guild.dev/graphql/hive) is a fully open-source schema registry, analytics, metrics and gateway for [GraphQL federation](https://the-guild.dev/graphql/hive/federation) and other GraphQL APIs.
41 lines (40 loc) • 1.22 kB
TypeScript
import { LucideProps } from 'lucide-react';
import { default as dagre } from '@dagrejs/dagre';
export interface FlowNode {
id: string;
title: string;
next?: string[];
icon?: (props: LucideProps) => React.ReactNode;
content?: (props: {
node: FlowNode;
}) => React.ReactNode;
headerSuffix?: (props: {
node: FlowNode;
}) => React.ReactNode;
children?: FlowNode[];
maxWidth?: number;
}
export interface FlowGraphInternal extends FlowNode {
x: number;
y: number;
width: number;
height: number;
}
export type Point = {
x: number;
y: number;
};
export declare function orthogonalPoints(from: Point, to: Point, t?: number): [Point, Point, Point, Point];
export declare function roundedOrthogonalPath([p0, p1, p2, p3]: [Point, Point, Point, Point], radius?: number): string;
export declare const Flow: (props: {
nodes: FlowNode[];
margin?: number;
gapX?: number;
gapY?: number;
onGraphLayout?: (graph: dagre.graphlib.Graph) => void;
disableBackground?: boolean;
disableGestures?: boolean;
className?: string;
containerClassName?: string;
isChild?: boolean;
}) => import("react/jsx-runtime").JSX.Element;