import * as d3 from 'd3'; import { Point } from '../../util/canvas-util'; import { LineFunction, LineShape, LineStyle } from '../../util/line'; import { CursorStyle } from '../../util/style'; import { Side } from '../../util/svg-util'; import { BackgroundConfig, DotsGridConfig, EmptyGridConfig, GridConfig, SolidBackgroundConfig } from '../config/diagram-canvas-config'; import { DiagramField } from '../model/diagram-field'; import { DiagramNode } from '../model/diagram-node'; import { DiagramPort } from '../model/diagram-port'; import { DiagramSection } from '../model/diagram-section'; import { DiagramCanvas } from './diagram-canvas'; /** * Checks if the given pointer event was produced with a secondary button press. * @private * @param event A pointer event. * @returns `true` if the given pointer event was produced with a secondary button press, `false` otherwise. */ export declare const isSecondaryButton: (event: MouseEvent) => boolean; /** * Obtain the pointer event which is valid for passing to the `d3.pointer()` function. * @param event A pointer event. * @returns A pointer event which can be passed to the `d3.pointer()` function. */ export declare const getEventHoldingCoordinates: (event: MouseEvent | d3.D3DragEvent) => unknown; /** * Get the SVG path of a diagram connection. * @private * @see linePath */ export declare const getConnectionPath: (shape: LineShape | LineFunction, startCoords: Point, endCoords: Point, startDirection: Side | undefined, endDirection: Side | undefined, points: Point[], width: number, startMarkerWidth: number | undefined, endMarkerWidth: number | undefined) => string; export declare const setCursorStyle: (style?: CursorStyle) => void; export declare const getRelatedNodeOrItself: (element: DiagramNode | DiagramSection | DiagramPort | DiagramField) => DiagramNode | DiagramSection | DiagramPort | DiagramField; export declare const needsResizerX: (element: DiagramNode | DiagramSection) => boolean; export declare const needsResizerY: (element: DiagramNode | DiagramSection) => boolean; export declare const needsResizerXY: (element: DiagramNode | DiagramSection) => boolean; export declare const initializeLook: (selection: d3.Selection) => void; export declare const SHAPED_LOOK_DEFAULTS: { fillColor: string; borderColor: string; borderThickness: number; borderStyle: LineStyle; }; export declare const updateLook: (selection: d3.Selection) => void; export declare const BACKGROUND_DEFAULTS: SolidBackgroundConfig; export declare const GRID_DEFAULTS: EmptyGridConfig; export declare const DOTS_GRID_DEFAULTS: DotsGridConfig; export declare const initializeBackground: (canvasView: d3.Selection, backgroundConfig: BackgroundConfig | undefined | null) => d3.Selection | d3.Selection; export declare const applyGridDefaults: (gridConfig?: GridConfig) => GridConfig; export declare const initializeGrid: (canvas: DiagramCanvas, canvasView: d3.Selection, canvasDefs: d3.Selection, gridPatternId: string, gridConfig: GridConfig) => d3.Selection | undefined; export declare const getGridSpacingX: (gridConfig: GridConfig) => number; export declare const getGridSpacingY: (gridConfig: GridConfig) => number;