import { type dia } from '@joint/core'; import type { GraphElement } from '../../types/element-types'; import type { GraphLink } from '../../types/link-types'; export interface Ports { readonly groups?: Record; readonly items?: dia.Element.Port[]; } export type JointAttributes = Omit; export type GraphCell = Element | GraphLink; /** * Get element via cell * @param cell - The cell to get the element from. * @returns - The element. * @group utils * @private * @description * This function is used to get an element from a cell. * It extracts the size, position, and attributes from the cell and returns them as an element. * It also adds the id, isElement, isLink, data, type, and ports to the element. * @example * ```ts * const element = getElement(cell); * console.log(element); * ``` */ export declare function getElement(cell: dia.Cell): Element; /** * Get link via cell * @param cell - The cell to get the link from. * @returns - The link. * @group utils * @private * @description * This function is used to get a link from a cell. * It extracts the source, target, and attributes from the cell and returns them as a link. * It also adds the id, isElement, isLink, type, z, markup, and defaultLabel to the link. * @example * ```ts * const link = getLink(cell); * console.log(link); * ``` */ export declare function getLink(cell: dia.Cell): GraphLink; /** * Get cell via cell * @param cell - The cell to get the cell from. * @returns - The cell. * @group utils * @private * @description * This function is used to get a cell from a cell. * It checks if the cell is an element or a link and returns the appropriate value. * @example * ```ts * const cell = getCell(cell); * console.log(cell); * ``` */ export declare function getCell(cell: dia.Cell): GraphCell;