import { default as default_2 } from 'react'; import { FC } from 'react'; export declare type anchorCustomPositionType = { position: anchorNamedType; offset: { x?: number; y?: number; }; }; export declare type anchorNamedType = (typeof cAnchorEdge)[number]; export declare type anchorType = _anchorType | _anchorType[]; export declare type _anchorType = anchorNamedType | anchorCustomPositionType; export declare const arrowShapes: { readonly arrow1: { readonly svgElem: default_2.JSX.Element; readonly offsetForward: 0.25; }; readonly heart: { readonly svgElem: default_2.JSX.Element; readonly offsetForward: 0.1; }; readonly circle: { readonly svgElem: default_2.JSX.Element; readonly offsetForward: 0; }; }; export declare const cAnchorEdge: readonly ["middle", "left", "right", "top", "bottom", "auto"]; export declare const cArrowShapes: Array; export declare const cPaths: readonly ["smooth", "grid", "straight"]; export declare const cSvgElems: readonly ["circle", "ellipse", "line", "path", "polygon", "polyline", "rect"]; export declare type labelsType = { start?: labelType; middle?: labelType; end?: labelType; }; export declare type labelType = default_2.ReactElement | string; export declare type pathType = (typeof cPaths)[number]; /** * An element id, or any ref holding an element. * * Structural rather than React.RefObject or React.MutableRefObject on purpose: * React 19 redefined RefObject as mutable, and MutableRefObject is invariant, so * a MutableRefObject would not be assignable to one of * HTMLElement. A readonly reader accepts every shape either React version * produces. * * `Element` rather than `HTMLElement`, and `undefined` alongside `null`, because * this replaced a MutableRefObject that accepted everything: useRef with no * argument yields `T | undefined`, and an SVG element ref is neither an * HTMLElement nor unusable here - only getBoundingClientRect is ever called. */ export declare type refType = string | { readonly current: Element | null | undefined; }; export declare type svgCustomEdgeType = { /** a jsx svg element, for example ``. */ svgElem: default_2.ReactElement; offsetForward?: number; }; export declare type svgEdgeShapeType = (typeof cArrowShapes)[number]; export declare type svgEdgeType = svgEdgeShapeType | svgCustomEdgeType; /** * Props of any one of the svg elements an arrow part can be rendered as. * * Spelled out rather than written as JSX.IntrinsicElements[svgElemType]: React * 19 removed the global JSX namespace, so the published declarations stopped * compiling for anyone on @types/react 19. React.JSX would fix that but does not * exist on the older @types/react this package still supports, and SVGProps is * exactly what JSX.IntrinsicElements maps these tags to in every version. The * mapped type preserves the per-tag union rather than collapsing to * SVGProps, which would reject a ref typed for one specific element. */ export declare type svgElemPropsType = { [K in svgElemType]: default_2.SVGProps; }[svgElemType]; export declare type svgElemType = (typeof cSvgElems)[number]; export declare const useXarrow: () => () => void; declare const Xarrow: default_2.FC; export default Xarrow; export declare type xarrowPropsType = { start: refType; end: refType; startAnchor?: anchorType; endAnchor?: anchorType; labels?: labelType | labelsType; color?: string; lineColor?: string | null; headColor?: string | null; tailColor?: string | null; strokeWidth?: number; showHead?: boolean; headSize?: number; showTail?: boolean; tailSize?: number; path?: pathType; showXarrow?: boolean; curveness?: number; gridBreak?: string; /** rounds the corners of a `path="grid"` arrow. `true` uses `strokeWidth * 2`, a number is a radius in pixels. */ gridRadius?: boolean | number; dashness?: boolean | { strokeLen?: number; nonStrokeLen?: number; animation?: boolean | number; }; headShape?: svgEdgeShapeType | svgCustomEdgeType; tailShape?: svgEdgeShapeType | svgCustomEdgeType; animateDrawing?: boolean | number; zIndex?: number; passProps?: svgElemPropsType; SVGcanvasProps?: default_2.SVGAttributes; arrowBodyProps?: default_2.SVGProps; arrowHeadProps?: svgElemPropsType; arrowTailProps?: svgElemPropsType; divContainerProps?: default_2.HTMLProps; SVGcanvasStyle?: default_2.CSSProperties; divContainerStyle?: default_2.CSSProperties; _extendSVGcanvas?: number; _debug?: boolean; _cpx1Offset?: number; _cpy1Offset?: number; _cpx2Offset?: number; _cpy2Offset?: number; }; export declare const Xwrapper: FC<{ children?: default_2.ReactNode; }>; export { }