@html-graph/html-graph 7.8.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/html-graph.d.ts +39 -56
- package/dist/html-graph.js +786 -778
- package/dist/html-graph.umd.cjs +1 -1
- package/package.json +2 -1
package/dist/html-graph.d.ts
CHANGED
|
@@ -43,11 +43,13 @@ declare interface AddPortRequest {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export declare interface AnimatedLayoutAlgorithm {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
calculateNextCoordinates(params: AnimatedLayoutAlgorithmParams): ReadonlyMap<Identifier, Point>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export declare interface AnimatedLayoutAlgorithmParams {
|
|
50
|
+
readonly graph: Graph;
|
|
51
|
+
readonly dt: number;
|
|
52
|
+
readonly viewport: Viewport;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
export declare interface AnimatedLayoutConfig {
|
|
@@ -62,16 +64,6 @@ export declare interface AnimatedLayoutConfig {
|
|
|
62
64
|
readonly edgeEquilibriumLength?: number;
|
|
63
65
|
readonly edgeStiffness?: number;
|
|
64
66
|
readonly seed?: string;
|
|
65
|
-
/**
|
|
66
|
-
* @deprecated
|
|
67
|
-
* use convergenceVelocity instead
|
|
68
|
-
*/
|
|
69
|
-
readonly effectiveDistance?: number;
|
|
70
|
-
/**
|
|
71
|
-
* @deprecated
|
|
72
|
-
* use convergenceVelocity instead
|
|
73
|
-
*/
|
|
74
|
-
readonly convergenceDelta?: number;
|
|
75
67
|
readonly convergenceVelocity?: number;
|
|
76
68
|
readonly maxForce?: number;
|
|
77
69
|
readonly nodeForceCoefficient?: number;
|
|
@@ -560,23 +552,26 @@ export declare class Graph {
|
|
|
560
552
|
readonly onBeforeEdgeRemoved: EventHandler<Identifier>;
|
|
561
553
|
readonly onBeforeClear: EventHandler<void>;
|
|
562
554
|
constructor(graphStore: GraphStore);
|
|
563
|
-
|
|
564
|
-
|
|
555
|
+
hasNode(nodeId: Identifier): boolean;
|
|
556
|
+
getNode(nodeId: Identifier): GraphNode;
|
|
557
|
+
findNodeIdByElement(element: HTMLElement): Identifier | undefined;
|
|
565
558
|
getAllNodeIds(): readonly Identifier[];
|
|
566
|
-
|
|
559
|
+
hasPort(portId: Identifier): boolean;
|
|
560
|
+
getPort(portId: Identifier): GraphPort;
|
|
567
561
|
getAllPortIds(): readonly Identifier[];
|
|
568
|
-
getNodePortIds(nodeId: Identifier): readonly Identifier[]
|
|
569
|
-
|
|
562
|
+
getNodePortIds(nodeId: Identifier): readonly Identifier[];
|
|
563
|
+
findPortIdsByElement(element: HTMLElement): readonly Identifier[];
|
|
570
564
|
getAllEdgeIds(): readonly Identifier[];
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
565
|
+
hasEdge(edgeId: Identifier): boolean;
|
|
566
|
+
getEdge(edgeId: Identifier): GraphEdge;
|
|
567
|
+
getPortIncomingEdgeIds(portId: Identifier): readonly Identifier[];
|
|
568
|
+
getPortOutgoingEdgeIds(portId: Identifier): readonly Identifier[];
|
|
569
|
+
getPortCycleEdgeIds(portId: Identifier): readonly Identifier[];
|
|
570
|
+
getPortAdjacentEdgeIds(portId: Identifier): readonly Identifier[];
|
|
571
|
+
getNodeIncomingEdgeIds(nodeId: Identifier): readonly Identifier[];
|
|
572
|
+
getNodeOutgoingEdgeIds(nodeId: Identifier): readonly Identifier[];
|
|
573
|
+
getNodeCycleEdgeIds(nodeId: Identifier): readonly Identifier[];
|
|
574
|
+
getNodeAdjacentEdgeIds(nodeId: Identifier): readonly Identifier[];
|
|
580
575
|
}
|
|
581
576
|
|
|
582
577
|
export declare interface GraphEdge {
|
|
@@ -636,23 +631,26 @@ declare class GraphStore {
|
|
|
636
631
|
private readonly beforeClearEmitter;
|
|
637
632
|
readonly onBeforeClear: EventHandler<void>;
|
|
638
633
|
constructor();
|
|
634
|
+
hasNode(nodeId: Identifier): boolean;
|
|
635
|
+
getNode(nodeId: Identifier): StoreNode;
|
|
639
636
|
addNode(request: AddNodeRequest_2): void;
|
|
640
637
|
getAllNodeIds(): readonly Identifier[];
|
|
641
|
-
|
|
642
|
-
getElementNodeId(element: HTMLElement): Identifier | undefined;
|
|
638
|
+
findNodeIdByElement(element: HTMLElement): Identifier | undefined;
|
|
643
639
|
updateNode(nodeId: Identifier, request: UpdateNodeRequest_2): void;
|
|
644
640
|
removeNode(nodeId: Identifier): void;
|
|
641
|
+
hasPort(portId: Identifier): boolean;
|
|
642
|
+
getPort(portId: Identifier): StorePort;
|
|
645
643
|
addPort(request: AddPortRequest): void;
|
|
646
|
-
getPort(portId: Identifier): StorePort | undefined;
|
|
647
644
|
updatePort(portId: Identifier, request: UpdatePortRequest_2): void;
|
|
648
645
|
getAllPortIds(): readonly Identifier[];
|
|
649
|
-
|
|
650
|
-
getNodePortIds(nodeId: Identifier): readonly Identifier[]
|
|
646
|
+
findPortIdsByElement(element: HTMLElement): readonly Identifier[];
|
|
647
|
+
getNodePortIds(nodeId: Identifier): readonly Identifier[];
|
|
651
648
|
removePort(portId: Identifier): void;
|
|
649
|
+
hasEdge(edgeId: Identifier): boolean;
|
|
650
|
+
getEdge(edgeId: Identifier): StoreEdge;
|
|
652
651
|
addEdge(request: AddEdgeRequest_2): void;
|
|
653
652
|
updateEdge(edgeId: Identifier, request: UpdateEdgeRequest_2): void;
|
|
654
653
|
getAllEdgeIds(): readonly Identifier[];
|
|
655
|
-
getEdge(edgeId: Identifier): StoreEdge | undefined;
|
|
656
654
|
removeEdge(edgeId: Identifier): void;
|
|
657
655
|
clear(): void;
|
|
658
656
|
getPortIncomingEdgeIds(portId: Identifier): readonly Identifier[];
|
|
@@ -749,11 +747,7 @@ export declare class InteractiveEdgeShape implements StructuredEdgeShape {
|
|
|
749
747
|
}
|
|
750
748
|
|
|
751
749
|
export declare interface LayoutAlgorithm {
|
|
752
|
-
|
|
753
|
-
* TODO: v8
|
|
754
|
-
* make single parameter object
|
|
755
|
-
*/
|
|
756
|
-
calculateCoordinates(graph: Graph, viewport: Viewport): ReadonlyMap<Identifier, Point>;
|
|
750
|
+
calculateCoordinates(params: LayoutAlgorithmParams): ReadonlyMap<Identifier, Point>;
|
|
757
751
|
}
|
|
758
752
|
|
|
759
753
|
declare type LayoutAlgorithmConfig = {
|
|
@@ -768,16 +762,6 @@ declare type LayoutAlgorithmConfig = {
|
|
|
768
762
|
readonly nodeMass?: number;
|
|
769
763
|
readonly edgeEquilibriumLength?: number;
|
|
770
764
|
readonly edgeStiffness?: number;
|
|
771
|
-
/**
|
|
772
|
-
* @deprecated
|
|
773
|
-
* use convergenceVelocity instead
|
|
774
|
-
*/
|
|
775
|
-
readonly effectiveDistance?: number;
|
|
776
|
-
/**
|
|
777
|
-
* @deprecated
|
|
778
|
-
* use convergenceVelocity instead
|
|
779
|
-
*/
|
|
780
|
-
readonly convergenceDelta?: number;
|
|
781
765
|
readonly convergenceVelocity?: number;
|
|
782
766
|
readonly maxForce?: number;
|
|
783
767
|
readonly nodeForceCoefficient?: number;
|
|
@@ -787,13 +771,12 @@ declare type LayoutAlgorithmConfig = {
|
|
|
787
771
|
};
|
|
788
772
|
};
|
|
789
773
|
|
|
774
|
+
export declare interface LayoutAlgorithmParams {
|
|
775
|
+
readonly graph: Graph;
|
|
776
|
+
readonly viewport: Viewport;
|
|
777
|
+
}
|
|
778
|
+
|
|
790
779
|
export declare type LayoutApplyOn = {
|
|
791
|
-
/**
|
|
792
|
-
* @deprecated
|
|
793
|
-
* use "topologyChangeMacrotask" instead
|
|
794
|
-
*/
|
|
795
|
-
type: "topologyChangeTimeout";
|
|
796
|
-
} | {
|
|
797
780
|
type: "topologyChangeMacrotask";
|
|
798
781
|
} | {
|
|
799
782
|
type: "topologyChangeMicrotask";
|