import type { Schemes } from '../../schemes'; import type { Position } from '@selenite/commons'; import { BaseSocketPosition } from './base-socket-position'; export type Side = 'input' | 'output'; /** * Props for `DOMSocketPosition` class. */ export type Props = { /** * Allows to customize the position of the socket. By default, the position is shifted by 12px on the x-axis relative to the center of the socket. * @param position Center position of the socket * @param nodeId Node ID * @param side Side of the socket, 'input' or 'output' * @param key Socket key * @returns Custom position of the socket */ offset?: (position: Position, nodeId: string, side: Side, key: string) => Position; }; /** * Class for socket position calculation based on DOM elements. It uses `getElementCenter` function to calculate the position. */ export declare class DOMSocketPosition extends BaseSocketPosition { private props?; constructor(props?: Props | undefined); calculatePosition(nodeId: string, side: Side, key: string, element: HTMLElement): Promise; } /** * Wrapper function for `DOMSocketPosition` class. * @param props Props for `DOMSocketPosition` class */ export declare function getDOMSocketPosition(props?: Props): DOMSocketPosition;