@html-graph/html-graph 7.9.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 +30 -75
- package/dist/html-graph.js +261 -297
- package/dist/html-graph.umd.cjs +1 -1
- package/package.json +1 -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;
|
|
@@ -561,35 +553,25 @@ export declare class Graph {
|
|
|
561
553
|
readonly onBeforeClear: EventHandler<void>;
|
|
562
554
|
constructor(graphStore: GraphStore);
|
|
563
555
|
hasNode(nodeId: Identifier): boolean;
|
|
564
|
-
getNode(nodeId: Identifier): GraphNode
|
|
565
|
-
findNodeIdByElement(element: HTMLElement): Identifier |
|
|
566
|
-
/**
|
|
567
|
-
* @deprecated
|
|
568
|
-
* use findNodeIdByElement instead
|
|
569
|
-
*/
|
|
570
|
-
getElementNodeId(element: HTMLElement): Identifier | null;
|
|
556
|
+
getNode(nodeId: Identifier): GraphNode;
|
|
557
|
+
findNodeIdByElement(element: HTMLElement): Identifier | undefined;
|
|
571
558
|
getAllNodeIds(): readonly Identifier[];
|
|
572
559
|
hasPort(portId: Identifier): boolean;
|
|
573
|
-
getPort(portId: Identifier): GraphPort
|
|
560
|
+
getPort(portId: Identifier): GraphPort;
|
|
574
561
|
getAllPortIds(): readonly Identifier[];
|
|
575
|
-
getNodePortIds(nodeId: Identifier): readonly Identifier[]
|
|
576
|
-
/**
|
|
577
|
-
* @deprecated
|
|
578
|
-
* use findPortIdsByElement instead
|
|
579
|
-
*/
|
|
580
|
-
getElementPortIds(element: HTMLElement): readonly Identifier[];
|
|
562
|
+
getNodePortIds(nodeId: Identifier): readonly Identifier[];
|
|
581
563
|
findPortIdsByElement(element: HTMLElement): readonly Identifier[];
|
|
582
564
|
getAllEdgeIds(): readonly Identifier[];
|
|
583
565
|
hasEdge(edgeId: Identifier): boolean;
|
|
584
|
-
getEdge(edgeId: Identifier): GraphEdge
|
|
585
|
-
getPortIncomingEdgeIds(portId: Identifier): readonly Identifier[]
|
|
586
|
-
getPortOutgoingEdgeIds(portId: Identifier): readonly Identifier[]
|
|
587
|
-
getPortCycleEdgeIds(portId: Identifier): readonly Identifier[]
|
|
588
|
-
getPortAdjacentEdgeIds(portId: Identifier): readonly Identifier[]
|
|
589
|
-
getNodeIncomingEdgeIds(nodeId: Identifier): readonly Identifier[]
|
|
590
|
-
getNodeOutgoingEdgeIds(nodeId: Identifier): readonly Identifier[]
|
|
591
|
-
getNodeCycleEdgeIds(nodeId: Identifier): readonly Identifier[]
|
|
592
|
-
getNodeAdjacentEdgeIds(nodeId: Identifier): readonly Identifier[]
|
|
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[];
|
|
593
575
|
}
|
|
594
576
|
|
|
595
577
|
export declare interface GraphEdge {
|
|
@@ -650,34 +632,22 @@ declare class GraphStore {
|
|
|
650
632
|
readonly onBeforeClear: EventHandler<void>;
|
|
651
633
|
constructor();
|
|
652
634
|
hasNode(nodeId: Identifier): boolean;
|
|
653
|
-
|
|
654
|
-
* TODO: v8
|
|
655
|
-
* throw error when node does not exist
|
|
656
|
-
*/
|
|
657
|
-
getNode(nodeId: Identifier): StoreNode | undefined;
|
|
635
|
+
getNode(nodeId: Identifier): StoreNode;
|
|
658
636
|
addNode(request: AddNodeRequest_2): void;
|
|
659
637
|
getAllNodeIds(): readonly Identifier[];
|
|
660
638
|
findNodeIdByElement(element: HTMLElement): Identifier | undefined;
|
|
661
639
|
updateNode(nodeId: Identifier, request: UpdateNodeRequest_2): void;
|
|
662
640
|
removeNode(nodeId: Identifier): void;
|
|
663
641
|
hasPort(portId: Identifier): boolean;
|
|
664
|
-
|
|
665
|
-
* TODO: v8
|
|
666
|
-
* throw error when port does not exist
|
|
667
|
-
*/
|
|
668
|
-
getPort(portId: Identifier): StorePort | undefined;
|
|
642
|
+
getPort(portId: Identifier): StorePort;
|
|
669
643
|
addPort(request: AddPortRequest): void;
|
|
670
644
|
updatePort(portId: Identifier, request: UpdatePortRequest_2): void;
|
|
671
645
|
getAllPortIds(): readonly Identifier[];
|
|
672
646
|
findPortIdsByElement(element: HTMLElement): readonly Identifier[];
|
|
673
|
-
getNodePortIds(nodeId: Identifier): readonly Identifier[]
|
|
647
|
+
getNodePortIds(nodeId: Identifier): readonly Identifier[];
|
|
674
648
|
removePort(portId: Identifier): void;
|
|
675
649
|
hasEdge(edgeId: Identifier): boolean;
|
|
676
|
-
|
|
677
|
-
* TODO: v8
|
|
678
|
-
* throw error when edge does not exist
|
|
679
|
-
*/
|
|
680
|
-
getEdge(edgeId: Identifier): StoreEdge | undefined;
|
|
650
|
+
getEdge(edgeId: Identifier): StoreEdge;
|
|
681
651
|
addEdge(request: AddEdgeRequest_2): void;
|
|
682
652
|
updateEdge(edgeId: Identifier, request: UpdateEdgeRequest_2): void;
|
|
683
653
|
getAllEdgeIds(): readonly Identifier[];
|
|
@@ -777,11 +747,7 @@ export declare class InteractiveEdgeShape implements StructuredEdgeShape {
|
|
|
777
747
|
}
|
|
778
748
|
|
|
779
749
|
export declare interface LayoutAlgorithm {
|
|
780
|
-
|
|
781
|
-
* TODO: v8
|
|
782
|
-
* make single parameter object
|
|
783
|
-
*/
|
|
784
|
-
calculateCoordinates(graph: Graph, viewport: Viewport): ReadonlyMap<Identifier, Point>;
|
|
750
|
+
calculateCoordinates(params: LayoutAlgorithmParams): ReadonlyMap<Identifier, Point>;
|
|
785
751
|
}
|
|
786
752
|
|
|
787
753
|
declare type LayoutAlgorithmConfig = {
|
|
@@ -796,16 +762,6 @@ declare type LayoutAlgorithmConfig = {
|
|
|
796
762
|
readonly nodeMass?: number;
|
|
797
763
|
readonly edgeEquilibriumLength?: number;
|
|
798
764
|
readonly edgeStiffness?: number;
|
|
799
|
-
/**
|
|
800
|
-
* @deprecated
|
|
801
|
-
* use convergenceVelocity instead
|
|
802
|
-
*/
|
|
803
|
-
readonly effectiveDistance?: number;
|
|
804
|
-
/**
|
|
805
|
-
* @deprecated
|
|
806
|
-
* use convergenceVelocity instead
|
|
807
|
-
*/
|
|
808
|
-
readonly convergenceDelta?: number;
|
|
809
765
|
readonly convergenceVelocity?: number;
|
|
810
766
|
readonly maxForce?: number;
|
|
811
767
|
readonly nodeForceCoefficient?: number;
|
|
@@ -815,13 +771,12 @@ declare type LayoutAlgorithmConfig = {
|
|
|
815
771
|
};
|
|
816
772
|
};
|
|
817
773
|
|
|
774
|
+
export declare interface LayoutAlgorithmParams {
|
|
775
|
+
readonly graph: Graph;
|
|
776
|
+
readonly viewport: Viewport;
|
|
777
|
+
}
|
|
778
|
+
|
|
818
779
|
export declare type LayoutApplyOn = {
|
|
819
|
-
/**
|
|
820
|
-
* @deprecated
|
|
821
|
-
* use "topologyChangeMacrotask" instead
|
|
822
|
-
*/
|
|
823
|
-
type: "topologyChangeTimeout";
|
|
824
|
-
} | {
|
|
825
780
|
type: "topologyChangeMacrotask";
|
|
826
781
|
} | {
|
|
827
782
|
type: "topologyChangeMicrotask";
|