@html-graph/html-graph 8.3.0 → 8.5.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.
@@ -422,6 +422,10 @@ export declare type ConnectionTypeResolver = (portId: Identifier) => "direct" |
422
422
 
423
423
  declare type ConstantPriority = number;
424
424
 
425
+ export declare type CoordsTransformConfig = CoordsTransformFn | TransformDeclaration | readonly TransformDeclaration[];
426
+
427
+ export declare type CoordsTransformFn = (point: Point) => Point;
428
+
425
429
  declare type CustomPriority = PriorityFn;
426
430
 
427
431
  export declare interface Dimensions {
@@ -762,20 +766,25 @@ declare type LayoutAlgorithmConfig = {
762
766
  readonly instance: LayoutAlgorithm;
763
767
  } | {
764
768
  readonly type: "forceDirected";
765
- readonly dtSec?: number;
766
- readonly maxIterations?: number;
767
- readonly seed?: string;
768
- readonly nodeCharge?: number;
769
- readonly nodeMass?: number;
770
- readonly edgeEquilibriumLength?: number;
771
- readonly edgeStiffness?: number;
772
- readonly convergenceVelocity?: number;
773
- readonly maxForce?: number;
774
- readonly nodeForceCoefficient?: number;
769
+ readonly dtSec?: number | undefined;
770
+ readonly maxIterations?: number | undefined;
771
+ readonly seed?: string | undefined;
772
+ readonly nodeCharge?: number | undefined;
773
+ readonly nodeMass?: number | undefined;
774
+ readonly edgeEquilibriumLength?: number | undefined;
775
+ readonly edgeStiffness?: number | undefined;
776
+ readonly convergenceVelocity?: number | undefined;
777
+ readonly maxForce?: number | undefined;
778
+ readonly nodeForceCoefficient?: number | undefined;
775
779
  readonly barnesHut?: {
776
- readonly theta?: number;
777
- readonly areaRadiusThreshold?: number;
778
- };
780
+ readonly theta?: number | undefined;
781
+ readonly areaRadiusThreshold?: number | undefined;
782
+ } | undefined;
783
+ } | {
784
+ readonly type: "hierarchical";
785
+ readonly layerWidth?: number | undefined;
786
+ readonly layerSpace?: number | undefined;
787
+ readonly transform?: CoordsTransformConfig | undefined;
779
788
  };
780
789
 
781
790
  export declare interface LayoutAlgorithmParams {
@@ -947,6 +956,26 @@ export declare interface StructuredEdgeShape extends EdgeShape {
947
956
  readonly onAfterRender: EventHandler<StructuredEdgeRenderModel>;
948
957
  }
949
958
 
959
+ export declare type TransformDeclaration = {
960
+ readonly a?: number | undefined;
961
+ readonly b?: number | undefined;
962
+ readonly c?: number | undefined;
963
+ readonly d?: number | undefined;
964
+ readonly e?: number | undefined;
965
+ readonly f?: number | undefined;
966
+ } | {
967
+ readonly shift: Point;
968
+ } | {
969
+ readonly scale: number;
970
+ readonly origin?: Point;
971
+ } | {
972
+ readonly rotate: number;
973
+ readonly origin?: Point;
974
+ } | {
975
+ readonly mirror: number;
976
+ readonly origin?: Point;
977
+ };
978
+
950
979
  export declare interface TransformPayload {
951
980
  readonly scale: number;
952
981
  readonly x: number;