@jsplumb/community
Advanced tools
Comparing version 4.0.0-RC41 to 4.0.0-RC42
{ | ||
"name": "@jsplumb/community", | ||
"version": "4.0.0-RC41", | ||
"version": "4.0.0-RC42", | ||
"description": "Visual connectivity for webapps. This package contains `community-core` and `browser-ui`, and is equivalent to the way that previous versions of the Community edition were packaged. Note that this package is effectively deprecated, and will not always be available. Try importing `@jsplumb/browser-ui` instead.", | ||
@@ -5,0 +5,0 @@ "main": "js/jsplumb.community.cjs.js", |
@@ -69,3 +69,2 @@ import { jsPlumbDefaults, jsPlumbHelperFunctions, Dictionary, Offset, PointArray, Size, jsPlumbElement, TypeDescriptor, JsPlumbInstance, AbstractConnector, Endpoint, Overlay, RedrawResult, PaintStyle, OverlayCapableComponent, Segment, LabelOverlay, Connection, Component, DeleteConnectionOptions } from '@jsplumb/community-core'; | ||
jtk: jsPlumbDOMInformation; | ||
_jsPlumbList: string; | ||
_jsPlumbScrollHandler?: Function; | ||
@@ -72,0 +71,0 @@ _katavorioDrag?: Drag; |
@@ -34,2 +34,7 @@ import { BrowserJsPlumbInstance, jsPlumbDOMElement } from "./browser-jsplumb-instance"; | ||
/** | ||
* Gets the list associated with the given element, if any. | ||
* @param el | ||
*/ | ||
getList(el: Element): JsPlumbList; | ||
/** | ||
* Destroy any scrollable list associated with the given element. | ||
@@ -50,2 +55,3 @@ * @param el | ||
private options; | ||
readonly id: string; | ||
_scrollHandler: Function; | ||
@@ -52,0 +58,0 @@ readonly domElement: jsPlumbDOMElement; |
import { Offset, PointArray } from '../common'; | ||
import { JsPlumbInstance } from "../core"; | ||
import { EventGenerator } from "../event-generator"; | ||
import { Endpoint } from "../endpoint/endpoint-impl"; | ||
import { Endpoint } from "../endpoint/endpoint"; | ||
import { AnchorComputeParams, AnchorId, AnchorOptions, AnchorOrientationHint, Orientation } from "../factory/anchor-factory"; | ||
import { AnchorPlacement } from "../anchor-manager"; | ||
import { AnchorPlacement } from "../router/router"; | ||
export declare class Anchor extends EventGenerator { | ||
@@ -8,0 +8,0 @@ instance: JsPlumbInstance; |
@@ -5,4 +5,4 @@ import { AnchorId, Face, Orientation, AnchorOptions, AnchorComputeParams } from "../factory/anchor-factory"; | ||
import { JsPlumbInstance } from "../core"; | ||
import { Endpoint } from "../endpoint/endpoint-impl"; | ||
import { AnchorPlacement } from "../anchor-manager"; | ||
import { Endpoint } from "../endpoint/endpoint"; | ||
import { AnchorPlacement } from "../router/router"; | ||
export interface ContinuousAnchorOptions extends AnchorOptions { | ||
@@ -9,0 +9,0 @@ faces?: Array<Face>; |
@@ -5,4 +5,4 @@ import { Anchor } from "./anchor"; | ||
import { JsPlumbInstance } from "../core"; | ||
import { Endpoint } from "../endpoint/endpoint-impl"; | ||
import { AnchorPlacement } from "../anchor-manager"; | ||
import { Endpoint } from "../endpoint/endpoint"; | ||
import { AnchorPlacement } from "../router/router"; | ||
export interface DynamicAnchorOptions extends AnchorOptions { | ||
@@ -9,0 +9,0 @@ selector?: (xy: PointArray, wh: PointArray, txy: PointArray, twh: PointArray, rotation: number, targetRotation: number, anchors: Array<Anchor>) => Anchor; |
import { UIGroup } from "./group/group"; | ||
import { Endpoint } from "./endpoint/endpoint-impl"; | ||
import { Endpoint } from "./endpoint/endpoint"; | ||
import { EndpointSpec } from "./endpoint/endpoint"; | ||
@@ -4,0 +4,0 @@ import { AnchorSpec } from "./factory/anchor-factory"; |
@@ -6,3 +6,3 @@ import { PaintStyle } from "../styles"; | ||
import { Connection } from "../connector/connection-impl"; | ||
import { Endpoint } from "../endpoint/endpoint-impl"; | ||
import { Endpoint } from "../endpoint/endpoint"; | ||
import { OverlaySpec } from "../overlay/overlay"; | ||
@@ -9,0 +9,0 @@ export declare type ComponentParameters = Record<string, any>; |
@@ -1,4 +0,4 @@ | ||
import { Endpoint } from "./endpoint/endpoint-impl"; | ||
import { Endpoint } from "./endpoint/endpoint"; | ||
export interface ProxyConnection { | ||
originalEp: Endpoint; | ||
} |
import { AbstractConnector, ConnectorComputeParams, PaintGeometry } from "./abstract-connector"; | ||
import { AnchorPlacement } from '../anchor-manager'; | ||
import { AnchorPlacement } from '../router/router'; | ||
import { Connection } from '../connector/connection-impl'; | ||
@@ -4,0 +4,0 @@ import { JsPlumbInstance } from "../core"; |
import { PointArray, PointXY, TypeDescriptor } from '../common'; | ||
import { JsPlumbInstance } from "../core"; | ||
import { Segment, SegmentBounds } from "./abstract-segment"; | ||
import { AnchorPlacement } from "../anchor-manager"; | ||
import { AnchorPlacement } from "../router/router"; | ||
import { Connection } from '../connector/connection-impl'; | ||
import { ComponentOptions } from '../component/component'; | ||
import { Orientation } from '../factory/anchor-factory'; | ||
import { Endpoint } from '../endpoint/endpoint-impl'; | ||
import { Endpoint } from '../endpoint/endpoint'; | ||
export interface ConnectorOptions extends Record<string, any> { | ||
@@ -10,0 +10,0 @@ } |
@@ -5,3 +5,3 @@ import { AbstractBezierConnector, AbstractBezierOptions } from "./abstract-bezier-connector"; | ||
import { Connection } from "./connection-impl"; | ||
import { AnchorPlacement } from "../anchor-manager"; | ||
import { AnchorPlacement } from "../router/router"; | ||
export declare class Bezier extends AbstractBezierConnector { | ||
@@ -8,0 +8,0 @@ connection: Connection; |
import { JsPlumbInstance } from "../core"; | ||
import { jsPlumbElement, TypeDescriptor } from '../common'; | ||
import { AbstractConnector } from "./abstract-connector"; | ||
import { Endpoint } from "../endpoint/endpoint-impl"; | ||
import { Endpoint } from "../endpoint/endpoint"; | ||
import { PaintStyle } from "../styles"; | ||
@@ -6,0 +6,0 @@ import { Component } from "../component/component"; |
@@ -5,3 +5,3 @@ import { AbstractBezierConnector, AbstractBezierOptions } from "./abstract-bezier-connector"; | ||
import { Connection } from "./connection-impl"; | ||
import { AnchorPlacement } from "../anchor-manager"; | ||
import { AnchorPlacement } from "../router/router"; | ||
export interface StateMachineOptions extends AbstractBezierOptions { | ||
@@ -8,0 +8,0 @@ } |
import { jsPlumbDefaults, jsPlumbHelperFunctions } from "./defaults"; | ||
import { Connection } from "./connector/connection-impl"; | ||
import { Endpoint } from "./endpoint/endpoint-impl"; | ||
import { Endpoint } from "./endpoint/endpoint"; | ||
import { FullOverlaySpec, OverlaySpec } from "./overlay/overlay"; | ||
import { AnchorPlacement, RedrawResult } from "./anchor-manager"; | ||
import { AnchorPlacement, RedrawResult } from "./router/router"; | ||
import { Dictionary, UpdateOffsetOptions, Offset, Size, jsPlumbElement, PointArray, ConnectParams, // <-- | ||
@@ -7,0 +7,0 @@ SourceDefinition, TargetDefinition, BehaviouralTypeDescriptor, TypeDescriptor } from './common'; |
import { EndpointRepresentation } from "./endpoints"; | ||
import { Orientation } from "../factory/anchor-factory"; | ||
import { Endpoint } from "./endpoint-impl"; | ||
import { AnchorPlacement } from "../anchor-manager"; | ||
import { Endpoint } from "./endpoint"; | ||
import { AnchorPlacement } from "../router/router"; | ||
export declare type ComputedBlankEndpoint = [number, number, number, number]; | ||
@@ -6,0 +6,0 @@ export declare class BlankEndpoint extends EndpointRepresentation<ComputedBlankEndpoint> { |
import { EndpointRepresentation } from "./endpoints"; | ||
import { Orientation } from "../factory/anchor-factory"; | ||
import { Endpoint } from "./endpoint-impl"; | ||
import { AnchorPlacement } from "../anchor-manager"; | ||
import { Endpoint } from "./endpoint"; | ||
import { AnchorPlacement } from "../router/router"; | ||
export declare type ComputedDotEndpoint = [number, number, number, number, number]; | ||
@@ -6,0 +6,0 @@ export declare class DotEndpoint extends EndpointRepresentation<ComputedDotEndpoint> { |
@@ -8,3 +8,5 @@ import { AnchorSpec } from "../factory/anchor-factory"; | ||
import { Connection } from "../connector/connection-impl"; | ||
import { Endpoint } from "./endpoint-impl"; | ||
import { EndpointRepresentation } from './endpoints'; | ||
import { JsPlumbInstance } from '../core'; | ||
import { OverlayCapableComponent } from '../component/overlay-capable-component'; | ||
export declare type EndpointId = "Rectangle" | "Dot" | "Blank" | UserDefinedEndpointId; | ||
@@ -60,1 +62,77 @@ export declare type UserDefinedEndpointId = string; | ||
} | ||
export declare class Endpoint<E = any> extends OverlayCapableComponent { | ||
instance: JsPlumbInstance; | ||
getIdPrefix(): string; | ||
getTypeDescriptor(): string; | ||
getXY(): { | ||
x: number; | ||
y: number; | ||
}; | ||
connections: Array<Connection>; | ||
anchor: Anchor; | ||
endpoint: EndpointRepresentation<any>; | ||
element: E; | ||
elementId: string; | ||
dragAllowedWhenFull: boolean; | ||
timestamp: string; | ||
portId: string; | ||
floatingEndpoint: EndpointRepresentation<any>; | ||
maxConnections: number; | ||
connectorClass: string; | ||
connectorHoverClass: string; | ||
_originalAnchor: AnchorSpec; | ||
deleteAfterDragStop: boolean; | ||
finalEndpoint: Endpoint<E>; | ||
enabled: boolean; | ||
isSource: boolean; | ||
isTarget: boolean; | ||
isTemporarySource: boolean; | ||
connectionCost: number; | ||
connectionsDirected: boolean; | ||
connectionsDetachable: boolean; | ||
reattachConnections: boolean; | ||
currentAnchorClass: string; | ||
referenceEndpoint: Endpoint<E>; | ||
connectionType: string; | ||
connector: ConnectorSpec; | ||
connectorOverlays: Array<OverlaySpec>; | ||
connectorStyle: PaintStyle; | ||
connectorHoverStyle: PaintStyle; | ||
dragProxy: any; | ||
deleteOnEmpty: boolean; | ||
private uuid; | ||
scope: string; | ||
defaultLabelLocation: [number, number]; | ||
getDefaultOverlayKey(): string; | ||
constructor(instance: JsPlumbInstance, params: InternalEndpointOptions<E>); | ||
private _updateAnchorClass; | ||
private prepareAnchor; | ||
setPreparedAnchor(anchor: Anchor): Endpoint; | ||
setAnchor(anchorParams: any): Endpoint; | ||
addConnection(conn: Connection): void; | ||
/** | ||
* Detaches this Endpoint from the given Connection. If `deleteOnEmpty` is set to true and there are no | ||
* Connections after this one is detached, the Endpoint is deleted. | ||
* @param connection | ||
* @param idx | ||
*/ | ||
detachFromConnection(connection: Connection, idx?: number, transientDetach?: boolean): void; | ||
deleteEveryConnection(params?: any): void; | ||
detachFrom(targetEndpoint: Endpoint): Endpoint; | ||
setVisible(v: boolean, doNotChangeConnections?: boolean, doNotNotifyOtherEndpoint?: boolean): void; | ||
applyType(t: any, typeMap: any): void; | ||
destroy(force?: boolean): void; | ||
isFull(): boolean; | ||
isFloating(): boolean; | ||
isConnectedTo(endpoint: Endpoint): boolean; | ||
setElementId(_elId: string): void; | ||
setDragAllowedWhenFull(allowed: boolean): void; | ||
equals(endpoint: Endpoint): boolean; | ||
getUuid(): string; | ||
connectorSelector(): Connection; | ||
prepareEndpoint<C>(ep: EndpointSpec | EndpointRepresentation<C>, typeId?: string): EndpointRepresentation<C>; | ||
setEndpoint(ep: EndpointSpec): void; | ||
setPreparedEndpoint<C>(ep: EndpointRepresentation<C>): void; | ||
addClass(clazz: string, dontUpdateOverlays?: boolean): void; | ||
removeClass(clazz: string, dontUpdateOverlays?: boolean): void; | ||
} |
import { JsPlumbInstance } from "../core"; | ||
import { Orientation } from "../factory/anchor-factory"; | ||
import { SegmentBounds } from "../connector/abstract-segment"; | ||
import { Endpoint } from "./endpoint-impl"; | ||
import { AnchorPlacement } from "../anchor-manager"; | ||
import { Endpoint } from "./endpoint"; | ||
import { AnchorPlacement } from "../router/router"; | ||
/** | ||
@@ -7,0 +7,0 @@ * Superclass for all types of Endpoint. This class is renderer |
import { EndpointRepresentation } from "./endpoints"; | ||
import { Orientation } from "../factory/anchor-factory"; | ||
import { Endpoint } from "./endpoint-impl"; | ||
import { AnchorPlacement } from "../anchor-manager"; | ||
import { Endpoint } from "./endpoint"; | ||
import { AnchorPlacement } from "../router/router"; | ||
export declare type ComputedRectangleEndpoint = [number, number, number, number]; | ||
@@ -6,0 +6,0 @@ export declare class RectangleEndpoint extends EndpointRepresentation<ComputedRectangleEndpoint> { |
import { Connection } from "../connector/connection-impl"; | ||
import { Endpoint } from "../endpoint/endpoint-impl"; | ||
import { Endpoint } from "../endpoint/endpoint"; | ||
import { PointArray } from "../common"; | ||
import { JsPlumbInstance } from "../core"; | ||
import { Anchor } from "../anchor/anchor"; | ||
import { AnchorPlacement } from "../anchor-manager"; | ||
import { AnchorPlacement } from "../router/router"; | ||
export declare type AnchorOrientationHint = -1 | 0 | 1; | ||
@@ -8,0 +8,0 @@ export declare type Orientation = [number, number]; |
import { EndpointRepresentation } from "../endpoint/endpoints"; | ||
import { Constructable } from "../common"; | ||
import { Endpoint } from "../endpoint/endpoint-impl"; | ||
import { Endpoint } from "../endpoint/endpoint"; | ||
export declare const EndpointFactory: { | ||
@@ -5,0 +5,0 @@ get: (ep: Endpoint<any>, name: string, params: any) => EndpointRepresentation<any>; |
@@ -23,3 +23,2 @@ export * from "./constants"; | ||
export * from './factory/endpoint-factory'; | ||
export * from "./endpoint/endpoint-impl"; | ||
export * from './endpoint/endpoints'; | ||
@@ -35,2 +34,4 @@ export * from './endpoint/dot-endpoint'; | ||
export * from "./factory/overlay-factory"; | ||
export * from './router/router'; | ||
export * from './router/default-router'; | ||
export * from "./anchor/anchor"; | ||
@@ -40,5 +41,3 @@ export * from "./anchor/dynamic-anchor"; | ||
export * from "./factory/anchor-factory"; | ||
export * from "./anchor-manager"; | ||
export * from "./connection"; | ||
export * from "./styles"; | ||
export * from "./util"; |
@@ -1,15 +0,18 @@ | ||
import { Router } from "./router"; | ||
import { AnchorManager, RedrawResult } from "../anchor-manager"; | ||
import { Router, RedrawResult } from "./router"; | ||
import { JsPlumbInstance } from "../core"; | ||
import { Offset } from '../common'; | ||
import { Connection } from '../connector/connection-impl'; | ||
import { Endpoint } from '../endpoint/endpoint-impl'; | ||
import { Endpoint } from '../endpoint/endpoint'; | ||
import { ViewportElement } from "../viewport"; | ||
export declare class DefaultRouter implements Router { | ||
import { Dictionary, Offset } from "../common"; | ||
import { AnchorComputeParams, Orientation } from "../factory/anchor-factory"; | ||
export declare class DefaultRouter<T extends { | ||
E: unknown; | ||
}> implements Router { | ||
instance: JsPlumbInstance; | ||
readonly anchorManager: AnchorManager; | ||
continuousAnchorLocations: Dictionary<[number, number, number, number]>; | ||
continuousAnchorOrientations: Dictionary<Orientation>; | ||
private anchorLists; | ||
constructor(instance: JsPlumbInstance); | ||
reset(): void; | ||
redraw(elementId: string, ui?: ViewportElement, timestamp?: string, offsetToUI?: Offset): RedrawResult; | ||
clearContinuousAnchorPlacement(elementId: string): void; | ||
getEndpointLocation(endpoint: Endpoint<any>, params: AnchorComputeParams): any; | ||
getContinuousAnchorLocation(elementId: string): [number, number, number, number]; | ||
@@ -20,2 +23,10 @@ getContinuousAnchorOrientation(endpointId: string): [number, number]; | ||
computePath(connection: Connection, timestamp: string): void; | ||
private placeAnchors; | ||
clearContinuousAnchorPlacement(endpointId: string): void; | ||
private removeEndpointFromAnchorLists; | ||
private connectionDetached; | ||
deleteEndpoint(endpoint: Endpoint): void; | ||
private _updateAnchorList; | ||
redraw(elementId: string, ui?: ViewportElement, timestamp?: string, offsetToUI?: Offset): RedrawResult; | ||
private calculateOrientation; | ||
} |
import { Connection } from '../connector/connection-impl'; | ||
import { Endpoint } from '../endpoint/endpoint-impl'; | ||
import { Endpoint } from '../endpoint/endpoint'; | ||
import { Offset } from '../common'; | ||
import { ViewportElement } from "../viewport"; | ||
import { RedrawResult } from "../anchor-manager"; | ||
export interface RedrawResult { | ||
c: Set<Connection>; | ||
e: Set<Endpoint>; | ||
} | ||
export declare type AnchorPlacement = [number, number, number, number]; | ||
export declare type ContinuousAnchorPlacement = [number, number, number, number, Connection, Connection]; | ||
export interface Router { | ||
@@ -7,0 +12,0 @@ reset(): void; |
import { SelectionBase } from './common'; | ||
import { AnchorSpec } from '../factory/anchor-factory'; | ||
import { Endpoint } from '../endpoint/endpoint-impl'; | ||
import { Endpoint } from '../endpoint/endpoint'; | ||
export declare class EndpointSelection extends SelectionBase<Endpoint> { | ||
@@ -5,0 +5,0 @@ setEnabled(e: boolean): EndpointSelection; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1679306
46938