UNPKG

react-easy-diagram

Version:

<img src="https://github.com/tokarchyn/react-easy-diagram/blob/main/repo/logo-with-name.png?raw=true" alt="React Easy Diagram logo" height="50">

37 lines 1.86 kB
/// <reference types="react" /> import { Point } from "../utils/point"; import { DirectionWithDiagonals } from "../utils/position"; import { LinkCreationState } from "./linkCreationState"; import { LinkState } from "./linkState"; import { VisualComponents, IVisualComponentsObject } from "./visualComponents"; import { IVisualComponentProps } from "./visualComponentState"; import { ReactDOMAttributes } from '@use-gesture/react/dist/declarations/src/types'; export declare class LinksSettings { private _pathConstructor; private _visualComponents; private _preferLinksDirection; private _defaultSvgMarkers; private _svgMarkers; constructor(); import: (obj?: ILinksSettings | undefined) => void; get pathConstructor(): ILinkPathConstructor; setPathConstructor: (value: ILinkPathConstructor | null | undefined) => void; get visualComponents(): VisualComponents<any, ILinkVisualComponentProps<any>>; get preferLinksDirection(): "horizontal" | "vertical" | "both"; get svgMarkers(): ReadonlyArray<React.FunctionComponent>; } export interface ILinkVisualComponentProps<TSettings = any> extends IVisualComponentProps<LinkState | LinkCreationState, TSettings> { bind: (...args: any[]) => ReactDOMAttributes; } export interface ILinksSettings extends IVisualComponentsObject<any, ILinkVisualComponentProps> { pathConstructor?: ILinkPathConstructor; preferLinksDirection?: LinksSettings['preferLinksDirection']; svgMarkers?: React.FunctionComponent[]; } export interface ILinkPathConstructorEndpointInfo { point: Point; portType?: string; direction?: DirectionWithDiagonals; } export declare type ILinkPathConstructor = (source: ILinkPathConstructorEndpointInfo, target: ILinkPathConstructorEndpointInfo) => string; //# sourceMappingURL=linksSettings.d.ts.map