## API Report File for "@jsplumb/common"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

import { AnchorOrientationHint } from '@jsplumb/core';
import { BoundingBox } from '@jsplumb/util';
import { Extents } from '@jsplumb/util';
import { PointXY } from '@jsplumb/util';

// Warning: (ae-internal-missing-underscore) The name "AbstractSegment" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export abstract class AbstractSegment implements Segment {
    constructor(params: SegmentParams);
    boundingBoxIntersection(box: BoundingBox): Array<PointXY>;
    boxIntersection(x: number, y: number, w: number, h: number): Array<PointXY>;
    // (undocumented)
    extents: Extents;
    findClosestPointOnPath(x: number, y: number): PointNearPath;
    abstract getLength(): number;
    // (undocumented)
    abstract getPath(isFirstSegment: boolean): string;
    // (undocumented)
    abstract gradientAtPoint(location: number, absolute?: boolean): number;
    lineIntersection(x1: number, y1: number, x2: number, y2: number): Array<PointXY>;
    // (undocumented)
    protected params: SegmentParams;
    // (undocumented)
    abstract pointAlongPathFrom(location: number, distance: number, absolute?: boolean): PointXY;
    // (undocumented)
    abstract pointOnPath(location: number, absolute?: boolean): PointXY;
    // (undocumented)
    abstract type: string;
    // (undocumented)
    x1: number;
    // (undocumented)
    x2: number;
    // (undocumented)
    y1: number;
    // (undocumented)
    y2: number;
}

// @public
export type AnchorId = keyof typeof AnchorLocations;

// @public
export enum AnchorLocations {
    // (undocumented)
    Assign = "Assign",
    AutoDefault = "AutoDefault",
    Bottom = "Bottom",
    BottomLeft = "BottomLeft",
    BottomRight = "BottomRight",
    Center = "Center",
    Continuous = "Continuous",
    ContinuousBottom = "ContinuousBottom",
    ContinuousLeft = "ContinuousLeft",
    ContinuousLeftRight = "ContinuousLeftRight",
    ContinuousRight = "ContinuousRight",
    ContinuousTop = "ContinuousTop",
    ContinuousTopBottom = "ContinuousTopBottom",
    Left = "Left",
    Perimeter = "Perimeter",
    Right = "Right",
    Top = "Top",
    TopLeft = "TopLeft",
    TopRight = "TopRight"
}

// @public (undocumented)
export interface AnchorOptions extends Record<string, any> {
    cssClass?: string;
}

// Warning: (ae-internal-missing-underscore) The name "AnchorPlacement" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export type AnchorPlacement = {
    curX: number;
    curY: number;
    x: number;
    y: number;
    ox: AnchorOrientationHint;
    oy: AnchorOrientationHint;
};

// @public
export type AnchorSpec = SingleAnchorSpec | Array<SingleAnchorSpec>;

// @public
export type ArrayAnchorSpec = [number, number, AnchorOrientationHint, AnchorOrientationHint, number?, number?];

// @public (undocumented)
export interface ArrowOverlayOptions extends OverlayOptions {
    // (undocumented)
    direction?: number;
    // (undocumented)
    foldback?: number;
    // (undocumented)
    length?: number;
    // (undocumented)
    paintStyle?: PaintStyle;
    // (undocumented)
    width?: number;
}

// @public (undocumented)
export interface BlankEndpointParams extends EndpointRepresentationParams {
}

// @public
export interface Connector {
    type: string;
}

// @public
export type ConnectorId = string;

// @public
export interface ConnectorOptions extends Record<string, any> {
    cssClass?: string;
    gap?: number;
    hoverClass?: string;
    stub?: number | number[];
}

// @public
export type ConnectorSpec = ConnectorId | ConnectorWithOptions;

// @public
export type ConnectorWithOptions = {
    type: ConnectorId;
    options: ConnectorOptions;
};

// @public
export const DEFAULT = "default";

// @public (undocumented)
export interface DotEndpointParams extends EndpointRepresentationParams {
    // (undocumented)
    radius?: number;
}

// Warning: (ae-internal-missing-underscore) The name "EMPTY_BOUNDS" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function EMPTY_BOUNDS(): Extents;

// @public (undocumented)
export type EndpointId = "Rectangle" | "Dot" | "Blank" | UserDefinedEndpointId;

// @public (undocumented)
export type EndpointParams = any;

// @public (undocumented)
export interface EndpointRepresentationParams {
    // (undocumented)
    cssClass?: string;
}

// @public (undocumented)
export type EndpointSpec = EndpointId | FullEndpointSpec;

// @public (undocumented)
export interface EndpointStyle extends PaintStyle, Record<string, any> {
}

// @public
export const FALSE = "false";

// @public
export type FullAnchorSpec = {
    type: AnchorId;
    options: AnchorOptions;
};

// @public (undocumented)
export type FullEndpointSpec = {
    type: EndpointId;
    options: EndpointParams;
};

// @public (undocumented)
export type FullOverlaySpec = {
    type: string;
    options: OverlayOptions;
};

// @public
export interface Geometry {
    // (undocumented)
    source: any;
    // (undocumented)
    target: any;
}

// @public (undocumented)
export interface LabelOverlayOptions extends OverlayOptions {
    // (undocumented)
    label: string | Function;
    // (undocumented)
    labelLocationAttribute?: string;
}

// @public (undocumented)
export interface OverlayOptions extends Record<string, any> {
    // (undocumented)
    attributes?: Record<string, string>;
    // (undocumented)
    cssClass?: string;
    // (undocumented)
    events?: Record<string, (value: any, event?: any) => any>;
    // (undocumented)
    id?: string;
    // (undocumented)
    location?: number | number[];
}

// @public (undocumented)
export type OverlaySpec = string | FullOverlaySpec;

// Warning: (ae-internal-missing-underscore) The name "PaintAxis" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export type PaintAxis = "y" | "x";

// @public (undocumented)
export interface PaintStyle {
    // (undocumented)
    dashstyle?: string;
    // (undocumented)
    fill?: string;
    // (undocumented)
    outlineStroke?: string;
    // (undocumented)
    outlineWidth?: number;
    // (undocumented)
    stroke?: string;
    // (undocumented)
    strokeWidth?: number;
}

// @public
export interface PerimeterAnchorOptions extends AnchorOptions {
    // (undocumented)
    anchorCount?: number;
    // (undocumented)
    rotation?: number;
    // (undocumented)
    shape: keyof PerimeterAnchorShapes;
}

// @public
export enum PerimeterAnchorShapes {
    // (undocumented)
    Circle = "Circle",
    // (undocumented)
    Diamond = "Diamond",
    // (undocumented)
    Ellipse = "Ellipse",
    // (undocumented)
    Rectangle = "Rectangle",
    // (undocumented)
    Square = "Square",
    // (undocumented)
    Triangle = "Triangle"
}

// Warning: (ae-internal-missing-underscore) The name "PointNearPath" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export type PointNearPath = {
    s?: Segment;
    d: number;
    x: number;
    y: number;
    l: number;
    x1: number;
    x2: number;
    y1: number;
    y2: number;
};

// @public (undocumented)
export interface RectangleEndpointParams extends EndpointRepresentationParams {
    // (undocumented)
    height?: number;
    // (undocumented)
    width?: number;
}

// Warning: (ae-internal-missing-underscore) The name "Segment" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export interface Segment {
    // (undocumented)
    boundingBoxIntersection(box: BoundingBox): Array<PointXY>;
    // (undocumented)
    boxIntersection(x: number, y: number, w: number, h: number): Array<PointXY>;
    // (undocumented)
    extents: Extents;
    // (undocumented)
    findClosestPointOnPath(x: number, y: number): PointNearPath;
    // (undocumented)
    getLength(): number;
    // (undocumented)
    getPath(isFirstSegment: boolean): string;
    // (undocumented)
    gradientAtPoint(location: number, absolute?: boolean): number;
    // (undocumented)
    lineIntersection(x1: number, y1: number, x2: number, y2: number): Array<PointXY>;
    // (undocumented)
    pointAlongPathFrom(location: number, distance: number, absolute?: boolean): PointXY;
    // (undocumented)
    pointOnPath(location: number, absolute?: boolean): PointXY;
    // (undocumented)
    type: string;
    // (undocumented)
    x1: number;
    // (undocumented)
    x2: number;
    // (undocumented)
    y1: number;
    // (undocumented)
    y2: number;
}

// Warning: (ae-internal-missing-underscore) The name "SegmentParams" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export interface SegmentParams {
    // (undocumented)
    x1: number;
    // (undocumented)
    x2: number;
    // (undocumented)
    y1: number;
    // (undocumented)
    y2: number;
}

// @public
export type SingleAnchorSpec = AnchorId | FullAnchorSpec | ArrayAnchorSpec;

// @public
export const TRUE = "true";

// @public
export const UNDEFINED = "undefined";

// @public (undocumented)
export type UserDefinedEndpointId = string;

// @public
export const WILDCARD = "*";

```
