UNPKG

@joint/react

Version:

React bindings and hooks for JointJS to build interactive diagrams and graphs.

22 lines (21 loc) 894 B
import { type dia, type Vectorizer } from '@joint/core'; export declare const PORTAL_SELECTOR = "react-port-portal"; export interface PortElementsCacheEntry { portElement: Vectorizer; portLabelElement?: Vectorizer | null; portSelectors: Record<string, SVGElement | SVGElement[]>; portLabelSelectors?: Record<string, SVGElement | SVGElement[]>; portContentElement: Vectorizer; portContentSelectors?: Record<string, SVGElement | SVGElement[]>; } /** * Creates a data structure to manage port elements in a JointJS graph. * @returns An object with methods to set, get, clear, and delete port elements. * @group Data * @category Port */ export declare function createPortsData(): { set(cellId: dia.Cell.ID, portElementsCache: Record<string, PortElementsCacheEntry>): void; get(cellId: dia.Cell.ID, portId: string): SVGElement | undefined; clear(): void; };