Socket
Socket
Sign inDemoInstall

@jsplumb/community

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsplumb/community - npm Package Compare versions

Comparing version 4.0.0-RC6 to 4.0.0-RC7

6

dist/anchor-manager.d.ts
import { Endpoint } from "./endpoint/endpoint-impl";
import { Dictionary, ExtendedOffset, jsPlumbInstance, Offset } from "./core";
import { Connection } from "./connector/connection-impl";
import { ComputedAnchorPosition, Face, Orientation } from "./factory/anchor-factory";
import { Face, Orientation } from "./factory/anchor-factory";
import { ContinuousAnchor, ContinuousAnchorOptions } from "./anchor/continuous-anchor";
export declare type AnchorPlacement = [number, number, number, number, any?, any?];
export declare type AnchorFace = "top" | "right" | "bottom" | "left";
export declare class ContinuousAnchorFactory {
private continuousAnchorLocations;
clear(endpointId: string): void;
set(endpointId: string, pos: ComputedAnchorPosition): void;
set(endpointId: string, pos: AnchorPlacement): void;
get(instance: jsPlumbInstance, params?: ContinuousAnchorOptions): ContinuousAnchor;

@@ -11,0 +13,0 @@ }

import { jsPlumbInstance, Offset, PointArray } from "../core";
import { EventGenerator } from "../event-generator";
import { Endpoint } from "../endpoint/endpoint-impl";
import { AnchorComputeParams, AnchorId, AnchorOptions, AnchorOrientationHint, ComputedAnchorPosition, Orientation } from "../factory/anchor-factory";
import { AnchorComputeParams, AnchorId, AnchorOptions, AnchorOrientationHint, Orientation } from "../factory/anchor-factory";
import { AnchorPlacement } from "../anchor-manager";
export declare class Anchor extends EventGenerator {

@@ -20,3 +21,3 @@ instance: jsPlumbInstance;

timestamp: string;
lastReturnValue: ComputedAnchorPosition;
lastReturnValue: AnchorPlacement;
positionFinder: (dropPosition: Offset, elPosition: Offset, elSize: PointArray, constructorParams: any) => any;

@@ -27,5 +28,5 @@ clone: () => Anchor;

getOrientation(endpoint?: Endpoint): Orientation;
getCurrentLocation(params: AnchorComputeParams): ComputedAnchorPosition;
getCurrentLocation(params: AnchorComputeParams): AnchorPlacement;
setPosition(x: number, y: number, ox: AnchorOrientationHint, oy: AnchorOrientationHint, overrideLock?: boolean): void;
compute(params: AnchorComputeParams): ComputedAnchorPosition;
compute(params: AnchorComputeParams): AnchorPlacement;
equals(anchor: Anchor): boolean;

@@ -32,0 +33,0 @@ getCssClass(): string;

import { Anchor } from "./anchor";
import { AnchorComputeParams, AnchorOptions, ComputedAnchorPosition, Orientation } from "../factory/anchor-factory";
import { AnchorComputeParams, AnchorOptions, Orientation } from "../factory/anchor-factory";
import { jsPlumbInstance, PointArray } from "../core";
import { Endpoint } from "../endpoint/endpoint-impl";
import { AnchorPlacement } from "../anchor-manager";
export interface DynamicAnchorOptions extends AnchorOptions {

@@ -18,4 +19,4 @@ selector?: (xy: PointArray, wh: PointArray, txy: PointArray, twh: PointArray, anchors: Array<Anchor>) => Anchor;

getAnchors(): Array<Anchor>;
compute(params: AnchorComputeParams): ComputedAnchorPosition;
getCurrentLocation(params: AnchorComputeParams): ComputedAnchorPosition;
compute(params: AnchorComputeParams): AnchorPlacement;
getCurrentLocation(params: AnchorComputeParams): AnchorPlacement;
getOrientation(_endpoint?: Endpoint): Orientation;

@@ -22,0 +23,0 @@ over(anchor: Anchor, endpoint: Endpoint): void;

import { AbstractConnector, ConnectorComputeParams, PaintGeometry } from "./abstract-connector";
import { jsPlumbInstance } from "../core";
import { ComputedAnchorPosition } from "../factory/anchor-factory";
import { Connection } from "./connection-impl";
import { AnchorPlacement } from "../anchor-manager";
export interface AbstractBezierOptions {

@@ -23,5 +23,11 @@ showLoopback?: boolean;

isLoopbackCurrently: boolean;
geometry: {
controlPoints: [any, any];
source: AnchorPlacement;
target: AnchorPlacement;
};
getDefaultStubs(): [number, number];
constructor(instance: jsPlumbInstance, connection: Connection, params: any);
_compute(paintInfo: PaintGeometry, p: ConnectorComputeParams): void;
abstract _computeBezier(paintInfo: PaintGeometry, p: ConnectorComputeParams, sp: ComputedAnchorPosition, tp: ComputedAnchorPosition, _w: number, _h: number): void;
abstract _computeBezier(paintInfo: PaintGeometry, p: ConnectorComputeParams, sp: AnchorPlacement, tp: AnchorPlacement, _w: number, _h: number): void;
}
import { jsPlumbInstance, PointArray, PointXY, TypeDescriptor } from "../core";
import { Segment, SegmentBounds } from "./abstract-segment";
import { Endpoint } from "../endpoint/endpoint-impl";
import { ComputedAnchorPosition, Orientation } from "../factory/anchor-factory";
import { Orientation } from "../factory/anchor-factory";
import { ComponentOptions } from "../component/component";
import { Connection } from "./connection-impl";
import { AnchorPlacement } from "../anchor-manager";
/**

@@ -38,4 +39,4 @@ * Created by simon on 14/05/2019.

export declare type ConnectorComputeParams = {
sourcePos: ComputedAnchorPosition;
targetPos: ComputedAnchorPosition;
sourcePos: AnchorPlacement;
targetPos: AnchorPlacement;
sourceOrientation: Orientation;

@@ -86,2 +87,6 @@ targetOrientation: Orientation;

}
export interface Geometry {
source: any;
target: any;
}
export declare abstract class AbstractConnector implements Connector {

@@ -91,3 +96,3 @@ instance: jsPlumbInstance;

abstract type: string;
stub: number;
stub: number | [number, number];
sourceStub: number;

@@ -100,7 +105,7 @@ targetStub: number;

targetGap: number;
segments: Array<Segment>;
private segments;
totalLength: number;
segmentProportions: Array<[number, number]>;
segmentProportionalLengths: Array<number>;
private paintInfo;
protected paintInfo: PaintGeometry;
strokeWidth: number;

@@ -114,5 +119,16 @@ x: number;

cssClass: string;
abstract getDefaultStubs(): [number, number];
protected geometry: Geometry;
constructor(instance: jsPlumbInstance, connection: Connection, params: ConnectorOptions);
getTypeDescriptor(): string;
getIdPrefix(): string;
setGeometry(g: any, internal: boolean): void;
/**
* Subclasses can override this. By default we just pass back the geometry we are using internally.
*/
exportGeometry(): any;
/**
* Subclasses can override this. By default we just set the given geometry as our internal representation.
*/
importGeometry(g: any): boolean;
abstract _compute(geometry: PaintGeometry, params: ConnectorComputeParams): void;

@@ -119,0 +135,0 @@ resetBounds(): void;

@@ -5,2 +5,3 @@ import { AbstractSegment } from "./abstract-segment";

private instance;
static segmentType: string;
type: string;

@@ -7,0 +8,0 @@ cx: number;

import { AbstractBezierConnector, AbstractBezierOptions } from "./abstract-bezier-connector";
import { PaintGeometry, ConnectorComputeParams } from "./abstract-connector";
import { jsPlumbInstance } from "../core";
import { ComputedAnchorPosition } from "../factory/anchor-factory";
import { Connection } from "./connection-impl";
import { AnchorPlacement } from "../anchor-manager";
export declare class Bezier extends AbstractBezierConnector {

@@ -14,3 +14,3 @@ connection: Connection;

private _findControlPoint;
_computeBezier(paintInfo: PaintGeometry, p: ConnectorComputeParams, sp: ComputedAnchorPosition, tp: ComputedAnchorPosition, _w: number, _h: number): void;
_computeBezier(paintInfo: PaintGeometry, p: ConnectorComputeParams, sp: AnchorPlacement, tp: AnchorPlacement, _w: number, _h: number): void;
}

@@ -17,2 +17,3 @@ import { AbstractSegment, PointNearPath, SegmentBounds } from "./abstract-segment";

constructor(instance: jsPlumbInstance, params: any);
static segmentType: string;
type: string;

@@ -19,0 +20,0 @@ private static _translateLocation;

@@ -24,2 +24,3 @@ import { AbstractConnector, ConnectorOptions, ConnectorComputeParams, PaintGeometry } from "./abstract-connector";

isLoopbackCurrently: boolean;
getDefaultStubs(): [number, number];
constructor(instance: jsPlumbInstance, connection: Connection, params: FlowchartConnectorOptions);

@@ -26,0 +27,0 @@ private addASegment;

import { AbstractBezierConnector, AbstractBezierOptions } from "./abstract-bezier-connector";
import { jsPlumbInstance } from "../core";
import { ConnectorComputeParams, PaintGeometry } from "./abstract-connector";
import { ComputedAnchorPosition } from "../factory/anchor-factory";
import { Connection } from "./connection-impl";
import { AnchorPlacement } from "../anchor-manager";
export interface StateMachineOptions extends AbstractBezierOptions {

@@ -14,3 +14,3 @@ }

constructor(instance: jsPlumbInstance, connection: Connection, params: StateMachineOptions);
_computeBezier(paintInfo: PaintGeometry, params: ConnectorComputeParams, sp: ComputedAnchorPosition, tp: ComputedAnchorPosition, w: number, h: number): void;
_computeBezier(paintInfo: PaintGeometry, params: ConnectorComputeParams, sp: AnchorPlacement, tp: AnchorPlacement, w: number, h: number): void;
}
import { AbstractConnector, ConnectorComputeParams, PaintGeometry } from "./abstract-connector";
export declare class StraightConnector extends AbstractConnector {
type: string;
_compute(paintInfo: PaintGeometry, _: ConnectorComputeParams): void;
getDefaultStubs(): [number, number];
_compute(paintInfo: PaintGeometry, p: ConnectorComputeParams): void;
}

@@ -20,2 +20,3 @@ import { AbstractSegment, PointNearPath, SegmentBounds } from "./abstract-segment";

private _recalc;
static segmentType: string;
type: string;

@@ -22,0 +23,0 @@ getLength(): number;

@@ -33,4 +33,8 @@ export declare function cls(...className: Array<string>): string;

export declare const EVENT_DBL_CLICK = "dblclick";
export declare const EVENT_CONNECTION_MOUSEOVER = "connectionMouseOver";
export declare const EVENT_CONNECTION_MOUSEOUT = "connectionMouseOut";
export declare const EVENT_ENDPOINT_CLICK = "endpointClick";
export declare const EVENT_ENDPOINT_DBL_CLICK = "endpointDblClick";
export declare const EVENT_ENDPOINT_MOUSEOVER = "endpointMouseOver";
export declare const EVENT_ENDPOINT_MOUSEOUT = "endpointMouseOut";
export declare const EVENT_ELEMENT_CLICK = "elementClick";

@@ -37,0 +41,0 @@ export declare const EVENT_ELEMENT_DBL_CLICK = "elementDblClick";

@@ -54,2 +54,21 @@ import { jsPlumbDefaults, jsPlumbHelperFunctions } from "./defaults";

}
export interface BehaviouralTypeDescriptor extends TypeDescriptor {
filter?: string | Function;
filterExclude?: boolean;
extract?: Dictionary<string>;
uniqueEndpoint?: boolean;
onMaxConnections?: Function;
connectionType?: string;
}
interface SourceOrTargetDefinition {
enabled?: boolean;
def: BehaviouralTypeDescriptor;
endpoint?: Endpoint;
maxConnections?: number;
uniqueEndpoint?: boolean;
}
export interface SourceDefinition extends SourceOrTargetDefinition {
}
export interface TargetDefinition extends SourceOrTargetDefinition {
}
export interface DeleteOptions {

@@ -89,2 +108,3 @@ connection?: Connection;

h: number;
center?: PointXY;
};

@@ -398,4 +418,4 @@ export declare type RectangleXY = BoundingBox;

setSourceEnabled(el: ElementSpec, state: boolean, connectionType?: string): any;
findFirstSourceDefinition(el: any, connectionType?: string): any;
findFirstTargetDefinition(el: any, connectionType?: string): any;
findFirstSourceDefinition(el: any, connectionType?: string): SourceDefinition;
findFirstTargetDefinition(el: any, connectionType?: string): TargetDefinition;
private findFirstDefinition;

@@ -416,3 +436,3 @@ isSource(el: any, connectionType?: string): any;

private _writeScopeAttribute;
makeSource(el: ElementSpec, params?: any, referenceParams?: any): jsPlumbInstance;
makeSource(el: ElementSpec, params?: BehaviouralTypeDescriptor, referenceParams?: any): jsPlumbInstance;
private _getScope;

@@ -426,3 +446,3 @@ getSourceScope(el: any | string): string;

setScope(el: any | string, scope: string): void;
makeTarget(el: ElementSpec, params: any, referenceParams?: any): jsPlumbInstance;
makeTarget(el: ElementSpec, params: BehaviouralTypeDescriptor, referenceParams?: any): jsPlumbInstance;
show(el: string | any, changeEndpoints?: boolean): jsPlumbInstance;

@@ -429,0 +449,0 @@ hide(el: string | any, changeEndpoints?: boolean): jsPlumbInstance;

import { jsPlumbDefaults, jsPlumbHelperFunctions } from "../defaults";
import { Dictionary, jsPlumbInstance, Offset, PointArray, Size } from "../core";
import { Dictionary, jsPlumbInstance, Offset, PointArray, Size, SourceDefinition, TargetDefinition } from "../core";
import { DragManager } from "./drag-manager";
import { UIGroup } from "../group/group";
import { EventManager } from "./event-manager";
import { AbstractConnector, Endpoint, Overlay } from "..";
import { AbstractConnector, Collicat, CollicatOptions, Drag, ElementAttributes, Endpoint, Overlay } from "..";
import { jsPlumbList, jsPlumbListManager, jsPlumbListOptions } from "./lists";
export interface DragEventCallbackOptions {
drag: {
size: [number, number];
getDragElement: () => HTMLElement;
_size: [number, number];
getDragElement: () => jsPlumbDOMElement;
};
e: MouseEvent;
el: HTMLElement;
el: jsPlumbDOMElement;
pos: [number, number];

@@ -41,6 +41,7 @@ }

jtk: jsPlumbDOMInformation;
_jsPlumbTargetDefinitions: Array<any>;
_jsPlumbSourceDefinitions: Array<any>;
_jsPlumbTargetDefinitions: Array<TargetDefinition>;
_jsPlumbSourceDefinitions: Array<SourceDefinition>;
_jsPlumbList: any;
_jsPlumbScrollHandler?: Function;
_katavorioDrag?: Drag;
}

@@ -147,2 +148,12 @@ export declare type PosseSpec = string | {

removeList(el: jsPlumbDOMElement): void;
/**
* Helper method for other libs/code to get a DragManager.
* @param options
*/
createDragManager(options: CollicatOptions): Collicat;
svg: {
node: (name: string, attributes?: ElementAttributes) => SVGElement;
attr: (node: SVGElement, attributes: ElementAttributes) => void;
pos: (d: [number, number]) => string;
};
}

@@ -7,2 +7,3 @@ /**

import { EventManager } from "./event-manager";
import { DragEventCallbackOptions, jsPlumbDOMElement } from "./browser-jsplumb-instance";
export interface DragSelector {

@@ -14,3 +15,3 @@ filter?: string;

declare abstract class Base {
protected el: HTMLElement;
protected el: jsPlumbDOMElement;
protected k: Collicat;

@@ -21,3 +22,3 @@ abstract _class: string;

scopes: Array<string>;
constructor(el: HTMLElement, k: Collicat);
constructor(el: jsPlumbDOMElement, k: Collicat);
setEnabled(e: boolean): void;

@@ -31,3 +32,22 @@ isEnabled(): boolean;

export declare type GhostProxyGenerator = (el: HTMLElement) => HTMLElement;
export interface DragParams {
export interface DragHandlerOptions {
selector?: string;
start?: (p: DragEventCallbackOptions) => any;
stop?: (p: DragEventCallbackOptions) => any;
drag?: (p: DragEventCallbackOptions) => any;
beforeStart?: (beforeStartParams: any) => void;
dragInit?: (el: jsPlumbDOMElement) => any;
ghostProxy?: GhostProxyGenerator | boolean;
makeGhostProxy?: GhostProxyGenerator;
useGhostProxy?: (container: any, dragEl: any) => boolean;
ghostProxyParent?: HTMLElement;
constrain?: ConstrainFunction | boolean;
revert?: RevertFunction;
filter?: string;
filterExclude?: boolean;
snapThreshold?: number;
grid?: PointArray;
allowNegative?: boolean;
}
export interface DragParams extends DragHandlerOptions {
rightButtonCanDrag?: boolean;

@@ -38,11 +58,3 @@ consumeStartEvent?: boolean;

multipleDrop?: boolean;
ghostProxy?: GhostProxyGenerator | boolean;
makeGhostProxy?: GhostProxyGenerator;
selector?: string;
snapThreshold?: number;
grid?: PointArray;
allowNegative?: boolean;
constrain?: ConstrainFunction | boolean;
containment?: boolean;
revert?: RevertFunction;
canDrag?: Function;

@@ -53,5 +65,3 @@ consumeFilteredEvents?: boolean;

ignoreZoom?: boolean;
ghostProxyParent?: HTMLElement;
filter?: string;
filterExclude?: boolean;
scope?: string;
}

@@ -107,3 +117,3 @@ export interface DragSelector {

listeners: Dictionary<Array<Function>>;
constructor(el: HTMLElement, params: DragParams, k: Collicat);
constructor(el: jsPlumbDOMElement, params: DragParams, k: Collicat);
on(evt: string, fn: Function): void;

@@ -146,3 +156,3 @@ off(evt: string, fn: Function): void;

clearAllFilters(): void;
addSelector(params: any): void;
addSelector(params: DragHandlerOptions): void;
destroy(): void;

@@ -159,3 +169,11 @@ }

}
export declare class Collicat {
export interface jsPlumbDragManager {
getZoom(): number;
setZoom(z: number): void;
getInputFilterSelector(): string;
setInputFilterSelector(selector: string): void;
draggable(el: jsPlumbDOMElement, params: DragParams): Drag;
destroyDraggable(el: jsPlumbDOMElement): void;
}
export declare class Collicat implements jsPlumbDragManager {
eventManager: EventManager;

@@ -170,3 +188,3 @@ private zoom;

setZoom(z: number): void;
_prepareParams(p: DragParams): DragParams;
private _prepareParams;
/**

@@ -182,8 +200,8 @@ * Gets the selector identifying which input elements to filter from drag events.

* @param {String} selector Input filter selector to set.
* @return {Katavorio} Current instance; method may be chained.
* @return {Collicat} Current instance; method may be chained.
*/
setInputFilterSelector(selector: string): this;
draggable(el: any, params: DragParams): Drag;
destroyDraggable(el: any): void;
draggable(el: jsPlumbDOMElement, params: DragParams): Drag;
destroyDraggable(el: jsPlumbDOMElement): void;
}
export {};

@@ -1,4 +0,4 @@

import { BrowserJsPlumbInstance } from "./browser-jsplumb-instance";
import { Dictionary } from "../core";
import { Drag } from "./collicat";
import { BrowserJsPlumbInstance, jsPlumbDOMElement } from "./browser-jsplumb-instance";
import { Dictionary, PointArray } from "../core";
import { Drag, DragHandlerOptions, GhostProxyGenerator } from "./collicat";
export declare const CLASS_DRAG_SELECTED = "jtk-drag-selected";

@@ -19,5 +19,22 @@ export declare const CLASS_DRAG_ACTIVE = "jtk-drag-active";

selector: string;
onStart: (params: any) => boolean;
onDrag: (params: any) => void;
onStop: (params: any) => void;
onStart: (params: {
e: MouseEvent;
el: jsPlumbDOMElement;
finalPos: PointArray;
drag: Drag;
}) => boolean;
onDrag: (params: {
e: MouseEvent;
el: jsPlumbDOMElement;
finalPos: PointArray;
pos: PointArray;
drag: Drag;
}) => void;
onStop: (params: {
e: MouseEvent;
el: jsPlumbDOMElement;
finalPos: PointArray;
pos: PointArray;
drag: Drag;
}) => void;
onDragInit: (el: HTMLElement) => HTMLElement;

@@ -29,4 +46,4 @@ reset: () => void;

export interface GhostProxyingDragHandler extends DragHandler {
makeGhostProxy: (el: any) => any;
useGhostProxy: (container: any, dragEl: any) => boolean;
makeGhostProxy?: GhostProxyGenerator;
}

@@ -44,3 +61,3 @@ export declare class DragManager {

constructor(instance: BrowserJsPlumbInstance);
addHandler(handler: DragHandler, dragOptions?: any): void;
addHandler(handler: DragHandler, dragOptions?: DragHandlerOptions): void;
addFilter(filter: Function | string, exclude?: boolean): void;

@@ -47,0 +64,0 @@ removeFilter(filter: Function | string): void;

import { DragHandler } from "./drag-manager";
import { BrowserJsPlumbInstance, PosseSpec } from "./browser-jsplumb-instance";
import { BrowserJsPlumbInstance, jsPlumbDOMElement, PosseSpec } from "./browser-jsplumb-instance";
import { UIGroup } from "../group/group";
import { BoundingBox, Dictionary, Offset } from "../core";
import { BoundingBox, Dictionary, Offset, PointArray } from "../core";
import { Drag } from "./collicat";

@@ -42,7 +42,25 @@ declare type IntersectingGroup = {

onDragInit(el: HTMLElement): HTMLElement;
onStop(params: any): void;
onStop(params: {
e: MouseEvent;
el: jsPlumbDOMElement;
finalPos: PointArray;
pos: PointArray;
drag: Drag;
}): void;
private _cleanup;
reset(): void;
init(drag: Drag): void;
onDrag(params: any): void;
onStart(params: any): boolean;
onDrag(params: {
e: MouseEvent;
el: jsPlumbDOMElement;
finalPos: PointArray;
pos: PointArray;
drag: Drag;
}): void;
onStart(params: {
e: MouseEvent;
el: jsPlumbDOMElement;
finalPos: PointArray;
drag: Drag;
}): boolean;
addToDragSelection(el: string | HTMLElement): void;

@@ -49,0 +67,0 @@ clearDragSelection(): void;

@@ -5,3 +5,3 @@ import { DragHandler } from "./drag-manager";

import { Endpoint } from "../endpoint/endpoint-impl";
import { Dictionary } from "../core";
import { BoundingBox, Dictionary, PointArray } from "../core";
import { EndpointRepresentation } from "../endpoint/endpoints";

@@ -24,3 +24,7 @@ import { Drag } from "./collicat";

inPlaceCopy: any;
endpointDropTargets: Array<any>;
endpointDropTargets: Array<{
el: jsPlumbDOMElement;
endpoint: Endpoint;
r: BoundingBox;
}>;
currentDropTarget: any;

@@ -54,8 +58,25 @@ payload: any;

init(drag: Drag): void;
onStart(p: any): boolean;
onStart(p: {
e: MouseEvent;
el: jsPlumbDOMElement;
finalPos: PointArray;
drag: Drag;
}): boolean;
onBeforeStart(beforeStartParams: any): void;
onDrag(params: any): boolean;
onDrag(params: {
e: MouseEvent;
el: jsPlumbDOMElement;
finalPos: PointArray;
pos: PointArray;
drag: Drag;
}): boolean;
private _maybeCleanup;
private _reattachOrDiscard;
onStop(p: any): void;
onStop(p: {
e: MouseEvent;
el: jsPlumbDOMElement;
finalPos: PointArray;
pos: PointArray;
drag: Drag;
}): void;
/**

@@ -62,0 +83,0 @@ * Lookup a source definition on the given element.

@@ -1,5 +0,6 @@

import { AnchorComputeParams, AnchorOptions, ComputedAnchorPosition, Orientation } from "../factory/anchor-factory";
import { AnchorComputeParams, AnchorOptions, Orientation } from "../factory/anchor-factory";
import { Anchor } from "../anchor/anchor";
import { jsPlumbInstance, Size } from "../core";
import { Endpoint } from "../endpoint/endpoint-impl";
import { AnchorPlacement } from "../anchor-manager";
export interface FloatingAnchorOptions extends AnchorOptions {

@@ -16,5 +17,5 @@ reference: Anchor;

yDir: number;
_lastResult: ComputedAnchorPosition;
_lastResult: AnchorPlacement;
constructor(instance: jsPlumbInstance, params: FloatingAnchorOptions);
compute(params: AnchorComputeParams): ComputedAnchorPosition;
compute(params: AnchorComputeParams): AnchorPlacement;
getOrientation(_endpoint: Endpoint): Orientation;

@@ -33,3 +34,3 @@ /**

out(): void;
getCurrentLocation(params: AnchorComputeParams): ComputedAnchorPosition;
getCurrentLocation(params: AnchorComputeParams): AnchorPlacement;
}
import { EndpointRepresentation } from "./endpoints";
import { ComputedAnchorPosition, Orientation } from "../factory/anchor-factory";
import { Orientation } from "../factory/anchor-factory";
import { Endpoint } from "./endpoint-impl";
import { AnchorPlacement } from "../anchor-manager";
export declare type ComputedBlankEndpoint = [number, number, number, number];
export declare class BlankEndpoint<E> extends EndpointRepresentation<ComputedBlankEndpoint> {
constructor(endpoint: Endpoint, params?: any);
_compute(anchorPoint: ComputedAnchorPosition, orientation: Orientation, endpointStyle: any): ComputedBlankEndpoint;
_compute(anchorPoint: AnchorPlacement, orientation: Orientation, endpointStyle: any): ComputedBlankEndpoint;
getType(): string;
}
import { EndpointRepresentation } from "./endpoints";
import { ComputedAnchorPosition, Orientation } from "../factory/anchor-factory";
import { Orientation } from "../factory/anchor-factory";
import { Endpoint } from "./endpoint-impl";
import { AnchorPlacement } from "../anchor-manager";
export declare type ComputedDotEndpoint = [number, number, number, number, number];

@@ -10,4 +11,4 @@ export declare class DotEndpoint<E> extends EndpointRepresentation<ComputedDotEndpoint> {

constructor(endpoint: Endpoint, params?: any);
_compute(anchorPoint: ComputedAnchorPosition, orientation: Orientation, endpointStyle: any): ComputedDotEndpoint;
_compute(anchorPoint: AnchorPlacement, orientation: Orientation, endpointStyle: any): ComputedDotEndpoint;
getType(): string;
}
import { EndpointOptions, EndpointSpec } from "../endpoint/endpoint";
import { jsPlumbInstance, OffsetAndSize, Size } from "../core";
import { ComputedAnchorPosition } from "../factory/anchor-factory";
import { Anchor } from "../anchor/anchor";

@@ -10,3 +9,3 @@ import { OverlayCapableComponent } from "../component/overlay-capable-component";

import { EndpointRepresentation } from "./endpoints";
import { OverlaySpec } from "..";
import { AnchorPlacement, OverlaySpec } from "..";
export declare class Endpoint extends OverlayCapableComponent {

@@ -83,3 +82,3 @@ instance: jsPlumbInstance;

getUuid(): string;
computeAnchor(params: any): ComputedAnchorPosition;
computeAnchor(params: any): AnchorPlacement;
setElement(el: any): Endpoint;

@@ -94,3 +93,3 @@ connectorSelector(): Connection;

connectorPaintStyle?: PaintStyle;
anchorLoc?: ComputedAnchorPosition;
anchorLoc?: AnchorPlacement;
}): void;

@@ -97,0 +96,0 @@ prepareEndpoint<C>(ep: EndpointSpec | EndpointRepresentation<C>, typeId?: string): EndpointRepresentation<C>;

import { jsPlumbInstance } from "../core";
import { ComputedAnchorPosition, Orientation } from "../factory/anchor-factory";
import { Orientation } from "../factory/anchor-factory";
import { SegmentBounds } from "../connector/abstract-segment";
import { Endpoint } from "./endpoint-impl";
import { AnchorPlacement } from "../anchor-manager";
/**

@@ -21,3 +22,3 @@ * Superclass for all types of Endpoint. This class is renderer

abstract getType(): string;
abstract _compute(anchorPoint: ComputedAnchorPosition, orientation: Orientation, endpointStyle: any): C;
abstract _compute(anchorPoint: AnchorPlacement, orientation: Orientation, endpointStyle: any): C;
constructor(endpoint: Endpoint);

@@ -27,4 +28,4 @@ addClass(c: string): void;

clone(): EndpointRepresentation<C>;
compute(anchorPoint: ComputedAnchorPosition, orientation: Orientation, endpointStyle: any): void;
compute(anchorPoint: AnchorPlacement, orientation: Orientation, endpointStyle: any): void;
setVisible(v: boolean): void;
}
import { EndpointRepresentation } from "./endpoints";
import { ComputedAnchorPosition, Orientation } from "../factory/anchor-factory";
import { Orientation } from "../factory/anchor-factory";
import { Endpoint } from "./endpoint-impl";
import { AnchorPlacement } from "../anchor-manager";
export declare type ComputedRectangleEndpoint = [number, number, number, number];

@@ -9,4 +10,4 @@ export declare class RectangleEndpoint<E> extends EndpointRepresentation<ComputedRectangleEndpoint> {

constructor(endpoint: Endpoint, params?: any);
_compute(anchorPoint: ComputedAnchorPosition, orientation: Orientation, endpointStyle: any): ComputedRectangleEndpoint;
_compute(anchorPoint: AnchorPlacement, orientation: Orientation, endpointStyle: any): ComputedRectangleEndpoint;
getType(): string;
}

@@ -9,3 +9,3 @@ export declare abstract class EventGenerator {

constructor();
fire(event: string, value?: any, originalEvent?: Event): EventGenerator;
fire(event: string, value?: any, originalEvent?: Event): any;
private _drain;

@@ -20,1 +20,4 @@ unbind(eventOrListener?: string | Function, listener?: Function): EventGenerator;

}
export declare class OptimisticEventGenerator extends EventGenerator {
shouldFireEvent(event: string, value: any, originalEvent?: Event): boolean;
}

@@ -5,2 +5,3 @@ import { Connection } from "../connector/connection-impl";

import { Anchor } from "../anchor/anchor";
import { AnchorPlacement } from "../anchor-manager";
export declare type AnchorOrientationHint = -1 | 0 | 1;

@@ -24,3 +25,2 @@ export declare type Orientation = [AnchorOrientationHint, AnchorOrientationHint];

};
export declare type ComputedAnchorPosition = [number, number, number, number];
export interface AnchorOptions {

@@ -30,3 +30,3 @@ cssClass?: string;

export declare type AnchorId = "Assign" | "AutoDefault" | "Bottom" | "BottomCenter" | "BottomLeft" | "BottomRight" | "Center" | "Continuous" | "ContinuousBottom" | "ContinuousLeft" | "ContinuousRight" | "ContinuousTop" | "ContinuousLeftRight" | "ContinuousTopBottom" | "Left" | "LeftMiddle" | "Perimeter" | "Right" | "RightMiddle" | "Top" | "TopCenter" | "TopLeft" | "TopRight";
export declare type AnchorSpec = AnchorId | [AnchorId, AnchorOptions];
export declare type AnchorSpec = AnchorId | [AnchorId, AnchorOptions] | AnchorPlacement;
export declare const Anchors: {

@@ -33,0 +33,0 @@ get: (instance: jsPlumbInstance, name: string, args: any) => Anchor;

@@ -13,2 +13,3 @@ import { Dictionary, jsPlumbInstance, Offset } from "../core";

getGroupFor(el: any | string): UIGroup;
getGroups(): Array<UIGroup>;
removeGroup(group: string | UIGroup, deleteMembers?: boolean, manipulateDOM?: boolean, doNotFireEvent?: boolean): Dictionary<Offset>;

@@ -15,0 +16,0 @@ removeAllGroups(deleteMembers?: boolean, manipulateDOM?: boolean, doNotFireEvent?: boolean): void;

import { BrowserJsPlumbDefaults, BrowserJsPlumbInstance } from "./dom/browser-jsplumb-instance";
import { Constructable } from "./core";
import { jsPlumbHelperFunctions } from "./defaults";
import { Collicat, CollicatOptions } from "./dom";
import { AbstractConnector } from "./connector/abstract-connector";
export * from "./constants";

@@ -57,3 +58,5 @@ export * from "./core";

uuid(): string;
createDragManager(options: CollicatOptions): Collicat;
Connectors: {
register: (name: string, conn: Constructable<AbstractConnector>) => void;
};
}
{
"name": "@jsplumb/community",
"version": "4.0.0-RC6",
"version": "4.0.0-RC7",
"description": "Visual connectivity for webapps",

@@ -5,0 +5,0 @@ "main": "dist/js/jsplumb.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc