import { ForceLayoutOptionsType } from './forceLayout'; import type { IconType, NodeMapVisualType, NodeMapStructuralType, NodeTypeStructural, PositionMapType, NodePositionType, LinkMapType, NodeMetadataType, NodeMetadataPayloadType } from './networkGraphShared'; export declare const MAX_ZOOM = 4; export declare const MAX_TEXT_WIDTH = 144; export declare const RECT_HORIZONTAL_PADDING = 12; export declare const RECT_VERTICAL_PADDING = 4; export declare const LINE_HEIGHT = 16; export declare const RECT_TOP_MARGIN = 4; export declare const LABEL_FONT_SIZE = 12; export declare const FONT = "12px 'Splunk Platform Sans', 'Splunk Data Sans', Roboto, Droid, 'Helvetica Neue', Helvetica, Arial, sans-serif"; export declare const DIM_OPACITY = 0.25; export declare const NODE_FOCUS_RING_GAP = 2; export declare const NODE_FOCUS_RING_STROKE_WIDTH = 3; export declare const NODE_FOCUS_RING_PADDING: number; export type LinkStyleType = 's' | 'z' | 'c' | 'straight'; export type ShowDirectionType = 'bidirection' | 'oneWay' | 'none'; export type PreferPortsType = 'none' | 'horizontal' | 'vertical'; export type LayoutType = 'grid' | 'preset' | 'hierarchical' | 'force'; export type LayoutDirectionType = 'horizontal' | 'vertical' | 'topBottom' | 'bottomTop' | 'leftRight' | 'rightLeft'; export type LayoutOptionsType = { nodeHorizontalPadding?: number; nodeVerticalPadding?: number; hierarchyDirection?: LayoutDirectionType; xPositions?: number[]; yPositions?: number[]; gridColumns?: number; } & ForceLayoutOptionsType; export type BoundingBoxType = { x: number; y: number; width: number; height: number; }; export type ZoomTransformType = { k: number; x: number; y: number; }; export type KeyboardNavigationDirection = 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown'; export type IconRenderInfo = { iconUrl?: string; shouldRenderRemoteIcon: boolean; }; export declare const getIconRenderInfo: (icon?: IconType) => IconRenderInfo; export declare const sanitizeSvgId: (id: string) => string; export declare const unsanitizeSvgId: (safeId: string) => string; export declare const createDynamicPayload: (metadata?: NodeMetadataType) => NodeMetadataPayloadType; export declare const shouldDimNode: (highlightedNode: NodeTypeStructural | null, currentNodeId: string) => boolean; export declare const shouldHighlightLink: (source: string, target: string, highlightedNode: string | null) => boolean; type UniqueNodesVisualParams = { nodeIds: string[]; nodeColors: string[] | string; iconColors: string[] | string; icons: IconType[]; nodeValues: number[]; resultLimit?: number; tooltipHeaderField?: string; tooltipNodeFields?: string[]; metadata?: NodeMetadataType[]; }; export declare const getUniqueNodesVisual: ({ nodeIds, nodeColors, iconColors, icons, nodeValues, resultLimit, tooltipHeaderField, tooltipNodeFields, metadata, }: UniqueNodesVisualParams) => NodeMapVisualType; export declare const getUniqueNodesStruct: (source: string[], target: string[], nodeIds: string[], nodeTexts: string[], nodeTypes: string[], nodeSizes: number[] | number, resultLimit?: number) => NodeMapStructuralType; export declare const updatePositions: (nodeMap: NodeMapStructuralType, positions: PositionMapType) => NodeMapStructuralType; export declare const getUniqueLinks: (source: string[], target: (string | null)[], linkColors: string[] | string, linkWidth: number[] | number, resultLimit?: number) => LinkMapType; export declare const getGridLayout: (nodeMap: NodeMapStructuralType, gridColumns: number | undefined, nodeHorizontalPadding?: number, nodeVerticalPadding?: number) => PositionMapType; export declare const getPresetLayout: (nodeMap: NodeMapStructuralType, xPositions: number[], yPositions: number[]) => PositionMapType; export declare const getHierarchicalLayout: (nodeMap: NodeMapStructuralType, nodeHorizontalPadding?: number, nodeVerticalPadding?: number, hierarchyDirection?: LayoutDirectionType) => PositionMapType; export declare const getLayout: (layout: LayoutType, nodeMapStruct: NodeMapStructuralType, layoutOptions: LayoutOptionsType) => PositionMapType; type NodeMapWithPositionsParams = { source: string[]; target: (string | null)[]; nodeIds: string[]; nodeTexts: string[]; nodeTypes: string[]; nodeSize?: number[] | number; layout: LayoutType; layoutOptions: LayoutOptionsType; resultLimit?: number; }; export declare const getNodeMapWithPositions: ({ source, target, nodeIds, nodeTexts, nodeTypes, nodeSize, layout, layoutOptions, resultLimit, }: NodeMapWithPositionsParams) => NodeMapStructuralType; export declare const truncateTextToMaxLines: (text?: string, font?: string, maxWidth?: number, maxLines?: number) => string[]; export declare const getNodeBounds: (node: NodeTypeStructural) => { x: number; y: number; x2: number; y2: number; }; export declare const getCentermostNodeId: (nodeMap: NodeMapStructuralType, transform: ZoomTransformType, viewportWidth: number, viewportHeight: number) => string | null; export declare const getNextNodeIdInDirection: (nodeMap: NodeMapStructuralType, currentNodeId: string | null, direction: KeyboardNavigationDirection) => string | null; export declare const getPanDeltaToRevealNode: (node: NodeTypeStructural, transform: ZoomTransformType, viewportWidth: number, viewportHeight: number) => { dx: number; dy: number; }; export declare const getAutoZoomAndPan: (nodeMap: NodeMapStructuralType, containerWidth: number, containerHeight: number) => { autoZoomLevel: number; autoCenter: number[]; }; export declare const nearlyEqual: (a: number, b: number, tolerance?: number, usePercentage?: boolean) => boolean; export declare const calculateMinZoomBounds: (autoZoomLevel: number, height: any, width: any) => { minZoomLevel: number; minZoomHeight: number; minZoomWidth: number; }; export declare const getZoomDisableState: (currentZoom: number | null | undefined, autoZoomLevel: number, minZoomLevel: number) => { disableZoomIn: boolean; disableZoomOut: boolean; }; export declare const getDefaultPreferPorts: (layout: LayoutType, hierarchyDirection: LayoutDirectionType) => PreferPortsType; export declare const getIsHorizontalDominant: (preferPorts: PreferPortsType, sourcePosition: NodePositionType, targetPosition: NodePositionType) => boolean; export declare const getArrowHeight: (linkSize: number, linkWidth: number) => number; export declare const getArrowWidth: (linkSize: number) => number; export declare const getMinDistanceForArrow: (arrowHeight: number) => number; export declare const getMinDistanceForCurve: (arrowHeight: number, linkStyle: LinkStyleType | undefined) => number; type LinkRenderInfoParams = { linkStyle: LinkStyleType; showDirection: ShowDirectionType; preferPorts: PreferPortsType; sourcePosition: NodePositionType; targetPosition: NodePositionType; sourceSize: number; targetSize: number; arrowHeight: number; }; export declare const getLinkRenderInfo: ({ linkStyle, showDirection, preferPorts, sourcePosition, targetPosition, sourceSize, targetSize, arrowHeight, }: LinkRenderInfoParams) => { effectiveLinkStyle: LinkStyleType; effectiveShowDirection: ShowDirectionType; }; type GetEdgePathParams = { linkStyle: LinkStyleType; sourcePosition: NodePositionType; targetPosition: NodePositionType; isBidirectional: boolean; showDirection: ShowDirectionType; arrowHeight?: number; arrowWidth?: number; preferPorts?: PreferPortsType; sourceNodeSize?: number; targetNodeSize?: number; linkWidth?: number; }; export declare const getEdgePath: ({ linkStyle, sourcePosition, targetPosition, isBidirectional, showDirection, arrowHeight, arrowWidth, preferPorts, sourceNodeSize, targetNodeSize, linkWidth, }: GetEdgePathParams) => string; export {}; //# sourceMappingURL=networkGraphUtils.d.ts.map