@dagrejs/dagre 2.0.4 → 3.1.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.
Files changed (72) hide show
  1. package/dist/dagre.cjs.js +1 -1
  2. package/dist/dagre.cjs.js.map +4 -4
  3. package/dist/dagre.d.ts +1 -0
  4. package/dist/dagre.esm.js +1 -1
  5. package/dist/dagre.esm.js.map +4 -4
  6. package/dist/dagre.js +3049 -2176
  7. package/dist/dagre.js.map +4 -4
  8. package/dist/dagre.min.js +1 -1
  9. package/dist/dagre.min.js.map +4 -4
  10. package/dist/types/index.d.ts +26 -0
  11. package/dist/types/index.d.ts.map +1 -0
  12. package/dist/types/lib/acyclic.d.ts +6 -0
  13. package/dist/types/lib/acyclic.d.ts.map +1 -0
  14. package/dist/types/lib/add-border-segments.d.ts +4 -0
  15. package/dist/types/lib/add-border-segments.d.ts.map +1 -0
  16. package/dist/types/lib/coordinate-system.d.ts +26 -0
  17. package/dist/types/lib/coordinate-system.d.ts.map +1 -0
  18. package/dist/types/lib/data/list.d.ts +14 -0
  19. package/dist/types/lib/data/list.d.ts.map +1 -0
  20. package/dist/types/lib/debug.d.ts +3 -0
  21. package/dist/types/lib/debug.d.ts.map +1 -0
  22. package/dist/types/lib/graph-lib.d.ts +3 -0
  23. package/dist/types/lib/graph-lib.d.ts.map +1 -0
  24. package/dist/types/lib/greedy-fas.d.ts +4 -0
  25. package/dist/types/lib/greedy-fas.d.ts.map +1 -0
  26. package/dist/types/lib/layout.d.ts +4 -0
  27. package/dist/types/lib/layout.d.ts.map +1 -0
  28. package/dist/types/lib/nesting-graph.d.ts +5 -0
  29. package/dist/types/lib/nesting-graph.d.ts.map +1 -0
  30. package/dist/types/lib/normalize.d.ts +5 -0
  31. package/dist/types/lib/normalize.d.ts.map +1 -0
  32. package/dist/types/lib/order/add-subgraph-constraints.d.ts +3 -0
  33. package/dist/types/lib/order/add-subgraph-constraints.d.ts.map +1 -0
  34. package/dist/types/lib/order/barycenter.d.ts +9 -0
  35. package/dist/types/lib/order/barycenter.d.ts.map +1 -0
  36. package/dist/types/lib/order/build-layer-graph.d.ts +3 -0
  37. package/dist/types/lib/order/build-layer-graph.d.ts.map +1 -0
  38. package/dist/types/lib/order/cross-count.d.ts +3 -0
  39. package/dist/types/lib/order/cross-count.d.ts.map +1 -0
  40. package/dist/types/lib/order/index.d.ts +3 -0
  41. package/dist/types/lib/order/index.d.ts.map +1 -0
  42. package/dist/types/lib/order/init-order.d.ts +3 -0
  43. package/dist/types/lib/order/init-order.d.ts.map +1 -0
  44. package/dist/types/lib/order/resolve-conflicts.d.ts +15 -0
  45. package/dist/types/lib/order/resolve-conflicts.d.ts.map +1 -0
  46. package/dist/types/lib/order/sort-subgraph.d.ts +12 -0
  47. package/dist/types/lib/order/sort-subgraph.d.ts.map +1 -0
  48. package/dist/types/lib/order/sort.d.ts +16 -0
  49. package/dist/types/lib/order/sort.d.ts.map +1 -0
  50. package/dist/types/lib/parent-dummy-chains.d.ts +4 -0
  51. package/dist/types/lib/parent-dummy-chains.d.ts.map +1 -0
  52. package/dist/types/lib/position/bk.d.ts +37 -0
  53. package/dist/types/lib/position/bk.d.ts.map +1 -0
  54. package/dist/types/lib/position/index.d.ts +5 -0
  55. package/dist/types/lib/position/index.d.ts.map +1 -0
  56. package/dist/types/lib/rank/feasible-tree.d.ts +14 -0
  57. package/dist/types/lib/rank/feasible-tree.d.ts.map +1 -0
  58. package/dist/types/lib/rank/index.d.ts +4 -0
  59. package/dist/types/lib/rank/index.d.ts.map +1 -0
  60. package/dist/types/lib/rank/network-simplex.d.ts +13 -0
  61. package/dist/types/lib/rank/network-simplex.d.ts.map +1 -0
  62. package/dist/types/lib/rank/util.d.ts +5 -0
  63. package/dist/types/lib/rank/util.d.ts.map +1 -0
  64. package/dist/types/lib/type.d.ts +2 -0
  65. package/dist/types/lib/type.d.ts.map +1 -0
  66. package/dist/types/lib/types.d.ts +142 -0
  67. package/dist/types/lib/types.d.ts.map +1 -0
  68. package/dist/types/lib/util.d.ts +40 -0
  69. package/dist/types/lib/util.d.ts.map +1 -0
  70. package/dist/types/lib/version.d.ts +2 -0
  71. package/dist/types/lib/version.d.ts.map +1 -0
  72. package/package.json +32 -11
@@ -0,0 +1,26 @@
1
+ import * as graphlib from '@dagrejs/graphlib';
2
+ import { notime, time } from './lib/util';
3
+ import { layout } from './lib/layout';
4
+ import { debugOrdering as debug } from './lib/debug';
5
+ export { graphlib };
6
+ export { Graph } from '@dagrejs/graphlib';
7
+ export { version } from './lib/version';
8
+ export { layout } from './lib/layout';
9
+ export { debugOrdering as debug } from './lib/debug';
10
+ export declare const util: {
11
+ time: typeof time;
12
+ notime: typeof notime;
13
+ };
14
+ export type { GraphLabel, NodeConfig, EdgeConfig, LayoutConfig, LayoutOptions, NodeLabel, EdgeLabel, Point, OrderConstraint, WeightFunction, RankerFunction, Edge } from './lib/types';
15
+ declare const dagre: {
16
+ graphlib: typeof graphlib;
17
+ version: string;
18
+ layout: typeof layout;
19
+ debug: typeof debug;
20
+ util: {
21
+ time: typeof time;
22
+ notime: typeof notime;
23
+ };
24
+ };
25
+ export default dagre;
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAC,MAAM,EAAE,IAAI,EAAC,MAAM,YAAY,CAAC;AAExC,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AACpC,OAAO,EAAC,aAAa,IAAI,KAAK,EAAC,MAAM,aAAa,CAAC;AAEnD,OAAO,EAAC,QAAQ,EAAC,CAAC;AAElB,OAAO,EAAC,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AACtC,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AACpC,OAAO,EAAC,aAAa,IAAI,KAAK,EAAC,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,IAAI;;;CAAiB,CAAC;AAGnC,YAAY,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,SAAS,EACT,SAAS,EACT,KAAK,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACd,IAAI,EACP,MAAM,aAAa,CAAC;AAErB,QAAA,MAAM,KAAK;;;;;;;;;CAMV,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Graph } from "@dagrejs/graphlib";
2
+ import type { EdgeLabel, GraphLabel, NodeLabel } from "./types";
3
+ export { run, undo };
4
+ declare function run(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, oldGraph?: Graph | null): void;
5
+ declare function undo(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): void;
6
+ //# sourceMappingURL=acyclic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acyclic.d.ts","sourceRoot":"","sources":["../../../lib/acyclic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAGxC,OAAO,KAAK,EAAO,SAAS,EAAE,UAAU,EAAE,SAAS,EAAiB,MAAM,SAAS,CAAC;AAEpF,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,CAAC;AAEnB,iBAAS,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,CAiB1F;AAmDD,iBAAS,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,IAAI,CAYlE"}
@@ -0,0 +1,4 @@
1
+ import type { EdgeLabel, Graph, GraphLabel, NodeLabel } from "./types";
2
+ export default addBorderSegments;
3
+ declare function addBorderSegments(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): void;
4
+ //# sourceMappingURL=add-border-segments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-border-segments.d.ts","sourceRoot":"","sources":["../../../lib/add-border-segments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,SAAS,CAAC;AAErE,eAAe,iBAAiB,CAAC;AAEjC,iBAAS,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,IAAI,CAuB/E"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Transforms a point from subgraph-local coordinates to parent context coordinates.
3
+ * @param x X in subgraph
4
+ * @param y Y in subgraph
5
+ * @param clusterX X of cluster node in parent
6
+ * @param clusterY Y of cluster node in parent
7
+ * @param subgraphCenterX Center X of subgraph in subgraph coords
8
+ * @param subgraphCenterY Center Y of subgraph in subgraph coords
9
+ * @returns [x, y] in parent context
10
+ */
11
+ export declare function toParentCoords(x: number, y: number, clusterX: number, clusterY: number, subgraphCenterX: number, subgraphCenterY: number): [number, number];
12
+ /**
13
+ * Transforms a point from parent context coordinates to subgraph-local coordinates.
14
+ * @param x X in parent
15
+ * @param y Y in parent
16
+ * @param clusterX X of cluster node in parent
17
+ * @param clusterY Y of cluster node in parent
18
+ * @param subgraphCenterX Center X of subgraph in subgraph coords
19
+ * @param subgraphCenterY Center Y of subgraph in subgraph coords
20
+ * @returns [x, y] in subgraph-local coords
21
+ */
22
+ export declare function toSubgraphCoords(x: number, y: number, clusterX: number, clusterY: number, subgraphCenterX: number, subgraphCenterY: number): [number, number];
23
+ import type { Graph } from './types';
24
+ export declare function adjust(graph: Graph): void;
25
+ export declare function undo(graph: Graph): void;
26
+ //# sourceMappingURL=coordinate-system.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinate-system.d.ts","sourceRoot":"","sources":["../../../lib/coordinate-system.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAE3J;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAE7J;AACD,OAAO,KAAK,EAAY,KAAK,EAA+B,MAAM,SAAS,CAAC;AAE5E,wBAAgB,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAKzC;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAUvC"}
@@ -0,0 +1,14 @@
1
+ interface ListNode {
2
+ _next?: ListNode;
3
+ _prev?: ListNode;
4
+ [key: string]: unknown;
5
+ }
6
+ declare class List {
7
+ private _sentinel;
8
+ constructor();
9
+ dequeue(): ListNode | undefined;
10
+ enqueue(entry: ListNode): void;
11
+ toString(): string;
12
+ }
13
+ export default List;
14
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../lib/data/list.ts"],"names":[],"mappings":"AAKA,UAAU,QAAQ;IACd,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,KAAK,CAAC,EAAE,QAAQ,CAAC;IAEjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,cAAM,IAAI;IACN,OAAO,CAAC,SAAS,CAAW;;IAQ5B,OAAO,IAAI,QAAQ,GAAG,SAAS;IAU/B,OAAO,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAW9B,QAAQ,IAAI,MAAM;CAUrB;AAgBD,eAAe,IAAI,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Graph } from "./graph-lib";
2
+ export declare function debugOrdering(graph: Graph): Graph;
3
+ //# sourceMappingURL=debug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../lib/debug.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAGlC,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAsBjD"}
@@ -0,0 +1,3 @@
1
+ import { alg, Graph } from "@dagrejs/graphlib";
2
+ export { Graph, alg };
3
+ //# sourceMappingURL=graph-lib.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph-lib.d.ts","sourceRoot":"","sources":["../../../lib/graph-lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAC,KAAK,EAAE,GAAG,EAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Graph } from "./graph-lib";
2
+ import type { Edge, WeightFunction } from './types';
3
+ export default function greedyFAS(graph: Graph, weightFn?: WeightFunction): Edge[];
4
+ //# sourceMappingURL=greedy-fas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"greedy-fas.d.ts","sourceRoot":"","sources":["../../../lib/greedy-fas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAElC,OAAO,KAAK,EAAC,IAAI,EAAE,cAAc,EAAC,MAAM,SAAS,CAAC;AAyBlD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI,EAAE,CASjF"}
@@ -0,0 +1,4 @@
1
+ import { Graph } from "./graph-lib";
2
+ import type { EdgeLabel, GraphLabel, LayoutOptions, NodeLabel } from "./types";
3
+ export declare function layout(g: Graph<GraphLabel, NodeLabel, EdgeLabel>, opts?: LayoutOptions): Graph<GraphLabel, NodeLabel, EdgeLabel>;
4
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../lib/layout.ts"],"names":[],"mappings":"AAWA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,EAAO,SAAS,EAAE,UAAU,EAAE,aAAa,EAAkB,SAAS,EAAQ,MAAM,SAAS,CAAC;AA2B1G,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,IAAI,GAAE,aAAkB,GAAG,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,CAGpI"}
@@ -0,0 +1,5 @@
1
+ import type { EdgeLabel, Graph, GraphLabel, NodeLabel } from "./types";
2
+ export { run, cleanup, };
3
+ declare function run(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): void;
4
+ declare function cleanup(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): void;
5
+ //# sourceMappingURL=nesting-graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nesting-graph.d.ts","sourceRoot":"","sources":["../../../lib/nesting-graph.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,SAAS,CAAC;AAErE,OAAO,EACH,GAAG,EACH,OAAO,GACV,CAAC;AAyBF,iBAAS,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,IAAI,CAuBjE;AA0ED,iBAAS,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,IAAI,CAUrE"}
@@ -0,0 +1,5 @@
1
+ import type { EdgeLabel, Graph, GraphLabel, NodeLabel } from "./types";
2
+ export { run, undo };
3
+ declare function run(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): void;
4
+ declare function undo(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): void;
5
+ //# sourceMappingURL=normalize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../lib/normalize.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAO,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,SAAS,CAAC;AAE3E,OAAO,EACH,GAAG,EACH,IAAI,EACP,CAAC;AAkBF,iBAAS,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,IAAI,CAGjE;AA4CD,iBAAS,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,IAAI,CAoBlE"}
@@ -0,0 +1,3 @@
1
+ import type { Graph } from '../types';
2
+ export default function addSubgraphConstraints(graph: Graph, constraintGraph: Graph, vs: string[]): void;
3
+ //# sourceMappingURL=add-subgraph-constraints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-subgraph-constraints.d.ts","sourceRoot":"","sources":["../../../../lib/order/add-subgraph-constraints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,UAAU,CAAC;AAEpC,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,IAAI,CAgDvG"}
@@ -0,0 +1,9 @@
1
+ import type { Graph } from '../types';
2
+ interface BarycenterEntry {
3
+ v: string;
4
+ barycenter?: number;
5
+ weight?: number;
6
+ }
7
+ export default function barycenter(graph: Graph, movable?: string[]): BarycenterEntry[];
8
+ export {};
9
+ //# sourceMappingURL=barycenter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"barycenter.d.ts","sourceRoot":"","sources":["../../../../lib/order/barycenter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,UAAU,CAAC;AAEpC,UAAU,eAAe;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,GAAE,MAAM,EAAO,GAAG,eAAe,EAAE,CAsB1F"}
@@ -0,0 +1,3 @@
1
+ import type { Graph as GraphType } from '../types';
2
+ export default function buildLayerGraph(graph: GraphType, rank: number, relationship: "inEdges" | "outEdges", nodesWithRank?: string[]): GraphType;
3
+ //# sourceMappingURL=build-layer-graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-layer-graph.d.ts","sourceRoot":"","sources":["../../../../lib/order/build-layer-graph.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,KAAK,IAAI,SAAS,EAAC,MAAM,UAAU,CAAC;AAsCjD,MAAM,CAAC,OAAO,UAAU,eAAe,CACnC,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,SAAS,GAAG,UAAU,EACpC,aAAa,CAAC,EAAE,MAAM,EAAE,GACzB,SAAS,CAsCX"}
@@ -0,0 +1,3 @@
1
+ import type { Graph } from '../types';
2
+ export default function crossCount(graph: Graph, layering: string[][]): number;
3
+ //# sourceMappingURL=cross-count.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cross-count.d.ts","sourceRoot":"","sources":["../../../../lib/order/cross-count.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,UAAU,CAAC;AAkBpC,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,CAM7E"}
@@ -0,0 +1,3 @@
1
+ import type { Graph as GraphType, NodeCollection, OrderOptions } from '../types';
2
+ export default function order(graph: GraphType, opts?: OrderOptions, oldNodes?: NodeCollection): void;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/order/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAC,KAAK,IAAI,SAAS,EAAE,cAAc,EAAmB,YAAY,EAAC,MAAM,UAAU,CAAC;AAiBhG,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,GAAE,YAAiB,EAAE,QAAQ,GAAE,cAAqB,GAAG,IAAI,CAoC9G"}
@@ -0,0 +1,3 @@
1
+ import type { Graph, NodeCollection } from '../types';
2
+ export default function initOrder(graph: Graph, oldNodes?: NodeCollection): string[][];
3
+ //# sourceMappingURL=init-order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-order.d.ts","sourceRoot":"","sources":["../../../../lib/order/init-order.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,KAAK,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AAapD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,GAAE,cAAqB,GAAG,MAAM,EAAE,EAAE,CA8B3F"}
@@ -0,0 +1,15 @@
1
+ import type { Graph } from '../types';
2
+ interface BarycenterEntry {
3
+ v: string;
4
+ barycenter?: number;
5
+ weight?: number;
6
+ }
7
+ export interface ResolvedEntry {
8
+ vs: string[];
9
+ i: number;
10
+ barycenter?: number;
11
+ weight?: number;
12
+ }
13
+ export default function resolveConflicts(entries: BarycenterEntry[], constraintGraph: Graph): ResolvedEntry[];
14
+ export {};
15
+ //# sourceMappingURL=resolve-conflicts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-conflicts.d.ts","sourceRoot":"","sources":["../../../../lib/order/resolve-conflicts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,UAAU,CAAC;AAEpC,UAAU,eAAe;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAcD,MAAM,WAAW,aAAa;IAC1B,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AA2BD,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,eAAe,EAAE,KAAK,GAAG,aAAa,EAAE,CA6B5G"}
@@ -0,0 +1,12 @@
1
+ import type { Graph, NodeCollection } from '../types';
2
+ interface SubgraphResult {
3
+ vs: string[];
4
+ barycenter?: number;
5
+ weight?: number;
6
+ }
7
+ export default function sortSubgraph(graph: Graph, v: string, constraintGraph: Graph, oldNodes?: NodeCollection | boolean, biasRight?: boolean): SubgraphResult & {
8
+ result: SubgraphResult;
9
+ usedBias: boolean;
10
+ };
11
+ export {};
12
+ //# sourceMappingURL=sort-subgraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort-subgraph.d.ts","sourceRoot":"","sources":["../../../../lib/order/sort-subgraph.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,KAAK,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AAEpD,UAAU,cAAc;IACpB,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAQD,MAAM,CAAC,OAAO,UAAU,YAAY,CAChC,KAAK,EAAE,KAAK,EACZ,CAAC,EAAE,MAAM,EACT,eAAe,EAAE,KAAK,EACtB,QAAQ,CAAC,EAAE,cAAc,GAAG,OAAO,EACnC,SAAS,CAAC,EAAE,OAAO,GACpB,cAAc,GAAG;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CA2FhE"}
@@ -0,0 +1,16 @@
1
+ import type { Graph, NodeCollection } from '../types';
2
+ import { ResolvedEntry } from "./resolve-conflicts";
3
+ interface SortEntry {
4
+ vs: string[];
5
+ i: number;
6
+ barycenter?: number;
7
+ weight?: number;
8
+ }
9
+ interface SortResult {
10
+ vs: string[];
11
+ barycenter?: number;
12
+ weight?: number;
13
+ }
14
+ export default function sort(entries: SortEntry[], reversedPairs?: Record<string, ResolvedEntry> | boolean, oldNodes?: NodeCollection, graph?: Graph | null, biasRight?: boolean): SortResult;
15
+ export {};
16
+ //# sourceMappingURL=sort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../../../lib/order/sort.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,KAAK,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AACpD,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAElD,UAAU,SAAS;IACf,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,UAAU;IAChB,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CACxB,OAAO,EAAE,SAAS,EAAE,EACpB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,OAAO,EACvD,QAAQ,CAAC,EAAE,cAAc,EACzB,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,EACpB,SAAS,CAAC,EAAE,OAAO,GACpB,UAAU,CAiDZ"}
@@ -0,0 +1,4 @@
1
+ import type { EdgeLabel, Graph, GraphLabel, NodeLabel } from "./types";
2
+ export default parentDummyChains;
3
+ declare function parentDummyChains(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): void;
4
+ //# sourceMappingURL=parent-dummy-chains.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parent-dummy-chains.d.ts","sourceRoot":"","sources":["../../../lib/parent-dummy-chains.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,SAAS,CAAC;AAG3E,eAAe,iBAAiB,CAAC;AAYjC,iBAAS,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,IAAI,CA2C/E"}
@@ -0,0 +1,37 @@
1
+ import { Graph } from "../graph-lib";
2
+ import type { EdgeLabel, GraphLabel, NodeLabel } from "../types";
3
+ export { positionX, findType1Conflicts, findType2Conflicts, addConflict, hasConflict, verticalAlignment, horizontalCompaction, alignCoordinates, findSmallestWidthAlignment, balance };
4
+ type Conflicts = {
5
+ [key: string]: {
6
+ [key: string]: boolean;
7
+ };
8
+ };
9
+ type PositionMap = {
10
+ [key: string]: number;
11
+ };
12
+ type AlignmentResult = {
13
+ root: {
14
+ [key: string]: string;
15
+ };
16
+ align: {
17
+ [key: string]: string;
18
+ };
19
+ };
20
+ type XssMap = {
21
+ [key: string]: PositionMap;
22
+ };
23
+ declare function findType1Conflicts(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, layering: string[][]): Conflicts;
24
+ declare function findType2Conflicts(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, layering: string[][]): Conflicts;
25
+ declare function addConflict(conflicts: Conflicts, v: string, w: string): void;
26
+ declare function hasConflict(conflicts: Conflicts, v: string, w: string): boolean;
27
+ declare function verticalAlignment(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, layering: string[][], conflicts: Conflicts, neighborFn: (v: string) => string[], corePath?: string[]): AlignmentResult;
28
+ declare function horizontalCompaction(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, layering: string[][], root: {
29
+ [key: string]: string;
30
+ }, align: {
31
+ [key: string]: string;
32
+ }, reverseSep?: boolean): PositionMap;
33
+ declare function findSmallestWidthAlignment(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, xss: XssMap): PositionMap;
34
+ declare function alignCoordinates(xss: XssMap, alignTo: PositionMap): void;
35
+ declare function balance(xss: XssMap, align?: string | undefined): PositionMap;
36
+ declare function positionX(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, corePath?: string[]): PositionMap;
37
+ //# sourceMappingURL=bk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bk.d.ts","sourceRoot":"","sources":["../../../../lib/position/bk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAEnC,OAAO,KAAK,EAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AAO/D,OAAO,EACH,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,0BAA0B,EAC1B,OAAO,EACV,CAAC;AAEF,KAAK,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;CAAE,CAAC;AAC/D,KAAK,WAAW,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,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,MAAM,GAAG,MAAM,CAAA;CAAE,EAC/B,KAAK,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAChC,UAAU,GAAE,OAAe,GAC5B,WAAW,CAoFb;AAqCD,iBAAS,0BAA0B,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,WAAW,CAkB5G;AASD,iBAAS,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAuBjE;AAED,iBAAS,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,MAAM,GAAG,SAAqB,GAAG,WAAW,CAmBhF;AAED,iBAAS,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,WAAW,CAmCnG"}
@@ -0,0 +1,5 @@
1
+ import type { Graph } from '@dagrejs/graphlib';
2
+ import type { EdgeLabel, GraphLabel, NodeLabel } from "../types";
3
+ export { position };
4
+ declare function position(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, corePath?: string[]): void;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/position/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,EAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AAE/D,OAAO,EAAC,QAAQ,EAAC,CAAC;AAElB,iBAAS,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAK3F"}
@@ -0,0 +1,14 @@
1
+ import { Graph } from "../graph-lib";
2
+ import type { EdgeLabel, GraphLabel, NodeLabel } from "../types";
3
+ interface TreeNodeLabel {
4
+ low?: number;
5
+ lim?: number;
6
+ parent?: string;
7
+ }
8
+ interface TreeEdgeLabel {
9
+ cutvalue?: number;
10
+ }
11
+ export default feasibleTree;
12
+ export type { TreeNodeLabel, TreeEdgeLabel };
13
+ declare function feasibleTree(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): Graph<object, TreeNodeLabel, TreeEdgeLabel>;
14
+ //# sourceMappingURL=feasible-tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feasible-tree.d.ts","sourceRoot":"","sources":["../../../../lib/rank/feasible-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAEnC,OAAO,KAAK,EAAO,SAAS,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AAGrE,UAAU,aAAa;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAGD,UAAU,aAAa;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAe,YAAY,CAAC;AAC5B,YAAY,EAAC,aAAa,EAAE,aAAa,EAAC,CAAC;AA2B3C,iBAAS,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa,CAAC,CAsBjH"}
@@ -0,0 +1,4 @@
1
+ import type { EdgeLabel, Graph, GraphLabel, NodeLabel } from "../types";
2
+ export default rank;
3
+ declare function rank(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): void;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/rank/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAiB,MAAM,UAAU,CAAC;AAEtF,eAAe,IAAI,CAAC;AAqBpB,iBAAS,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,IAAI,CAoBlE"}
@@ -0,0 +1,13 @@
1
+ import { type TreeEdgeLabel, type TreeNodeLabel } from "./feasible-tree";
2
+ import type { Edge, EdgeLabel, Graph, GraphLabel, NodeLabel } from "../types";
3
+ export default networkSimplex;
4
+ declare function networkSimplex(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): void;
5
+ declare namespace networkSimplex {
6
+ var initLowLimValues: (tree: Graph<object, TreeNodeLabel, TreeEdgeLabel>, root?: string) => void;
7
+ var initCutValues: (tree: Graph<object, TreeNodeLabel, TreeEdgeLabel>, graph: Graph<GraphLabel, NodeLabel, EdgeLabel>) => void;
8
+ var calcCutValue: (tree: Graph<object, TreeNodeLabel, TreeEdgeLabel>, graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, child: string) => number;
9
+ var leaveEdge: (tree: Graph<object, TreeNodeLabel, TreeEdgeLabel>) => Edge | undefined;
10
+ var enterEdge: (tree: Graph<object, TreeNodeLabel, TreeEdgeLabel>, graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, edge: Edge) => Edge;
11
+ var exchangeEdges: (t: Graph<object, TreeNodeLabel, TreeEdgeLabel>, g: Graph<GraphLabel, NodeLabel, EdgeLabel>, e: Edge, f: Edge) => void;
12
+ }
13
+ //# sourceMappingURL=network-simplex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network-simplex.d.ts","sourceRoot":"","sources":["../../../../lib/rank/network-simplex.ts"],"names":[],"mappings":"AAAA,OAAqB,EAAC,KAAK,aAAa,EAAE,KAAK,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAIrF,OAAO,KAAK,EAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AAI5E,eAAe,cAAc,CAAC;AA2C9B,iBAAS,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,IAAI,CAc5E;kBAdQ,cAAc;iCA4ES,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa,CAAC,SAAS,MAAM,KAAG,IAAI;8BAzDpE,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa,CAAC,SAAS,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,KAAG,IAAI;6BAiBnG,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa,CAAC,SAAS,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,SAAS,MAAM,KAAG,MAAM;0BA2EtH,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa,CAAC,KAAG,IAAI,GAAG,SAAS;0BAO9D,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa,CAAC,SAAS,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,QAAQ,IAAI,KAAG,IAAI;2BAsC7G,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa,CAAC,KAAK,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,KAAK,IAAI,KAAK,IAAI,KAAG,IAAI"}
@@ -0,0 +1,5 @@
1
+ import type { Edge, EdgeLabel, Graph, GraphLabel, NodeLabel } from "../types";
2
+ export { longestPath, slack };
3
+ declare function longestPath(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): void;
4
+ declare function slack(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, edge: Edge): number;
5
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../lib/rank/util.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AAE5E,OAAO,EAAC,WAAW,EAAE,KAAK,EAAC,CAAC;AAuB5B,iBAAS,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,IAAI,CA6BzE;AAMD,iBAAS,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,MAAM,CAEjF"}
@@ -0,0 +1,2 @@
1
+ export * from "@dagrejs/graphlib";
2
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../lib/type.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,142 @@
1
+ import { Graph } from '@dagrejs/graphlib';
2
+ export type { Graph, Edge as GraphEdge } from '@dagrejs/graphlib';
3
+ export interface Point {
4
+ x: number;
5
+ y: number;
6
+ }
7
+ export interface NodeLabel {
8
+ width: number;
9
+ height: number;
10
+ x?: number;
11
+ y?: number;
12
+ rank?: number;
13
+ order?: number;
14
+ e?: number;
15
+ dummy?: 'edge' | 'border' | 'edge-label' | 'edge-proxy' | 'selfedge' | 'root';
16
+ borderType?: 'borderLeft' | 'borderRight';
17
+ borderTop?: string;
18
+ borderBottom?: string;
19
+ borderLeft?: string[];
20
+ borderRight?: string[];
21
+ minRank?: number;
22
+ maxRank?: number;
23
+ label?: string;
24
+ labelpos?: 'l' | 'c' | 'r';
25
+ class?: string;
26
+ padding?: number;
27
+ paddingX?: number;
28
+ paddingY?: number;
29
+ rx?: number;
30
+ ry?: number;
31
+ shape?: string;
32
+ edgeLabel?: EdgeLabel;
33
+ edgeObj?: Edge;
34
+ /**
35
+ * Optional direction for clusters/subgraphs. If set, overrides the global graph direction for this cluster.
36
+ */
37
+ rankdir?: 'TB' | 'BT' | 'LR' | 'RL';
38
+ /**
39
+ * Optional rank separation override for this cluster/subgraph.
40
+ */
41
+ ranksep?: number;
42
+ /**
43
+ * Optional node separation override for this cluster/subgraph.
44
+ */
45
+ nodesep?: number;
46
+ /**
47
+ * Optional alignment override for this cluster/subgraph.
48
+ */
49
+ align?: 'UL' | 'UR' | 'DL' | 'DR';
50
+ [key: string]: unknown;
51
+ }
52
+ export interface EdgeLabel {
53
+ points?: Point[];
54
+ width?: number;
55
+ height?: number;
56
+ minlen?: number;
57
+ weight?: number;
58
+ labelpos?: 'l' | 'c' | 'r';
59
+ labeloffset?: number;
60
+ labelRank?: number;
61
+ x?: number;
62
+ y?: number;
63
+ e?: number;
64
+ reversed?: boolean;
65
+ forwardName?: string;
66
+ selfEdge?: boolean;
67
+ nestingEdge?: boolean;
68
+ cutvalue?: number;
69
+ lim?: number;
70
+ low?: number;
71
+ parent?: string;
72
+ edgeLabel?: EdgeLabel;
73
+ edgeObj?: Edge;
74
+ [key: string]: unknown;
75
+ }
76
+ export interface GraphLabel {
77
+ width?: number;
78
+ height?: number;
79
+ compound?: boolean;
80
+ rankdir?: 'TB' | 'BT' | 'LR' | 'RL';
81
+ align?: 'UL' | 'UR' | 'DL' | 'DR';
82
+ nodesep?: number;
83
+ edgesep?: number;
84
+ ranksep?: number;
85
+ marginx?: number;
86
+ marginy?: number;
87
+ acyclicer?: 'greedy';
88
+ ranker?: 'network-simplex' | 'tight-tree' | 'longest-path';
89
+ rankalign?: 'top' | 'center' | 'bottom';
90
+ nestingRoot?: string;
91
+ nodeRankFactor?: number;
92
+ dummyChains?: string[];
93
+ [key: string]: unknown;
94
+ }
95
+ export interface NodeConfig {
96
+ width?: number;
97
+ height?: number;
98
+ }
99
+ export interface EdgeConfig {
100
+ minlen?: number;
101
+ weight?: number;
102
+ width?: number;
103
+ height?: number;
104
+ labelpos?: 'l' | 'c' | 'r';
105
+ labeloffset?: number;
106
+ }
107
+ export interface OrderOptions {
108
+ customOrder?: (graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, order: (graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, opts?: LayoutOptions, oldNodes?: NodeCollection) => void) => void;
109
+ disableOptimalOrderHeuristic?: boolean;
110
+ constraints?: OrderConstraint[];
111
+ }
112
+ export interface LayoutConfig extends OrderOptions {
113
+ useDynamic?: boolean;
114
+ corePath?: string[];
115
+ }
116
+ export interface OrderConstraint {
117
+ left: string;
118
+ right: string;
119
+ }
120
+ export type LayoutOptions = GraphLabel & NodeConfig & EdgeConfig & LayoutConfig;
121
+ export type RankerFunction = (graph: Graph<GraphLabel, NodeLabel, EdgeLabel>) => void;
122
+ export type WeightFunction = (edge: Edge) => number;
123
+ export type TimingFunction = (name: string, fn: () => void) => void;
124
+ export type WeightMap = {
125
+ [key: string]: number;
126
+ };
127
+ export interface PartitionResult<T> {
128
+ lhs: T[];
129
+ rhs: T[];
130
+ }
131
+ export interface ListEntry<T> {
132
+ value: T;
133
+ prev?: ListEntry<T>;
134
+ next?: ListEntry<T>;
135
+ }
136
+ export interface Edge {
137
+ v: string;
138
+ w: string;
139
+ name?: string;
140
+ }
141
+ export type NodeCollection = Record<string, NodeLabel> | null;
142
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAExC,YAAY,EAAC,KAAK,EAAE,IAAI,IAAI,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAGhE,MAAM,WAAW,KAAK;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb;AAGD,MAAM,WAAW,SAAS;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,CAAC,EA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, NodeLabel, PartitionResult, Point } from "./types";
3
+ export { addBorderNode, addDummyNode, applyWithChunking, asNonCompoundGraph, buildLayerMatrix, compareByOldOrder, intersectRect, mapValues, maxRank, normalizeRanks, notime, partition, pick, predecessorWeights, range, removeEmptyRanks, simplify, successorWeights, time, uniqueId, zipObject, };
4
+ declare function addDummyNode(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, type: 'root' | "edge" | "border" | "edge-label" | "edge-proxy" | "selfedge", attrs: Partial<NodeLabel>, name: string): string;
5
+ declare function simplify(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): Graph<GraphLabel, NodeLabel, EdgeLabel>;
6
+ declare function asNonCompoundGraph(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): Graph<GraphLabel, NodeLabel, EdgeLabel>;
7
+ declare function successorWeights(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): {
8
+ [key: string]: {
9
+ [key: string]: number;
10
+ };
11
+ };
12
+ declare function predecessorWeights(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): {
13
+ [key: string]: {
14
+ [key: string]: number;
15
+ };
16
+ };
17
+ declare function intersectRect(rect: NodeLabel, point: Point): Point;
18
+ declare function buildLayerMatrix(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): string[][];
19
+ declare function normalizeRanks(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): void;
20
+ declare function removeEmptyRanks(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): void;
21
+ declare function addBorderNode(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>, prefix: string, rank?: number, order?: number): string;
22
+ declare function applyWithChunking(fn: (...args: number[]) => number, argsArray: number[]): number;
23
+ declare function maxRank(graph: Graph<GraphLabel, NodeLabel, EdgeLabel>): number;
24
+ declare function partition<T>(collection: T[], fn: (value: T) => boolean): PartitionResult<T>;
25
+ declare function time<T>(name: string, fn: () => T): T;
26
+ declare function notime<T>(name: string, fn: () => T): T;
27
+ declare function uniqueId(prefix: string): string;
28
+ declare function range(start: number, limit?: number, step?: number): number[];
29
+ declare function pick<T extends Record<string, unknown>>(source: T, keys: string[]): Partial<T>;
30
+ declare function mapValues<T, R>(obj: {
31
+ [key: string]: T;
32
+ }, funcOrProp: ((val: T, key: string) => R) | string): {
33
+ [key: string]: R;
34
+ };
35
+ declare function zipObject<T>(props: string[], values: T[]): {
36
+ [key: string]: T;
37
+ };
38
+ export declare const GRAPH_NODE = "\0";
39
+ declare function compareByOldOrder(oldNodes: NodeCollection, nodeA: NodeLabel, nodeB: NodeLabel): number;
40
+ //# sourceMappingURL=util.d.ts.map