@knowvah/dot-engine 1.9.0 → 2.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/README.md +232 -30
- package/dist/api/builder.d.ts +3 -0
- package/dist/api/builder.d.ts.map +1 -1
- package/dist/api/edge-ops.d.ts +7 -0
- package/dist/api/edge-ops.d.ts.map +1 -1
- package/dist/api/geometry.d.ts +5 -2
- package/dist/api/geometry.d.ts.map +1 -1
- package/dist/api.js +159 -31
- package/dist/api.js.map +3 -3
- package/dist/async/collect.d.ts +49 -0
- package/dist/async/collect.d.ts.map +1 -0
- package/dist/async/fonts.d.ts +20 -0
- package/dist/async/fonts.d.ts.map +1 -0
- package/dist/async/render-async.d.ts +91 -0
- package/dist/async/render-async.d.ts.map +1 -0
- package/dist/async/render-into.d.ts +38 -0
- package/dist/async/render-into.d.ts.map +1 -0
- package/dist/async/sanitize.d.ts +28 -0
- package/dist/async/sanitize.d.ts.map +1 -0
- package/dist/common/htmltable-types.d.ts +3 -3
- package/dist/common/htmltable-types.d.ts.map +1 -1
- package/dist/common/make-label.d.ts.map +1 -1
- package/dist/common/poly-shapes.d.ts.map +1 -1
- package/dist/common/textmeasure-factory.d.ts +2 -0
- package/dist/common/textmeasure-factory.d.ts.map +1 -1
- package/dist/common/utils-inputscale.d.ts +19 -0
- package/dist/common/utils-inputscale.d.ts.map +1 -0
- package/dist/errors.d.ts +61 -5
- package/dist/errors.d.ts.map +1 -1
- package/dist/gvc/context.d.ts +36 -4
- package/dist/gvc/context.d.ts.map +1 -1
- package/dist/gvc/device.d.ts +5 -2
- package/dist/gvc/device.d.ts.map +1 -1
- package/dist/gvc/image-resolver.d.ts +16 -16
- package/dist/gvc/image-resolver.d.ts.map +1 -1
- package/dist/gvc/job.d.ts +1 -9
- package/dist/gvc/job.d.ts.map +1 -1
- package/dist/gvc/usershape.d.ts +2 -12
- package/dist/gvc/usershape.d.ts.map +1 -1
- package/dist/index.d.ts +27 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7560 -5446
- package/dist/index.js.map +4 -4
- package/dist/label/index.d.ts.map +1 -1
- package/dist/label/node.d.ts +0 -6
- package/dist/label/node.d.ts.map +1 -1
- package/dist/label/rectangle.d.ts +1 -7
- package/dist/label/rectangle.d.ts.map +1 -1
- package/dist/layout/circo/circular.d.ts +8 -5
- package/dist/layout/circo/circular.d.ts.map +1 -1
- package/dist/layout/dot/pack-components.d.ts +0 -19
- package/dist/layout/dot/pack-components.d.ts.map +1 -1
- package/dist/layout/dot/position.d.ts +7 -2
- package/dist/layout/dot/position.d.ts.map +1 -1
- package/dist/layout/fdp/derive.d.ts.map +1 -1
- package/dist/layout/fdp/index.d.ts.map +1 -1
- package/dist/layout/fdp/init.d.ts.map +1 -1
- package/dist/layout/fdp/layout.d.ts.map +1 -1
- package/dist/layout/fdp/ports.d.ts +0 -10
- package/dist/layout/fdp/ports.d.ts.map +1 -1
- package/dist/layout/fdp/xlayout.d.ts +0 -16
- package/dist/layout/fdp/xlayout.d.ts.map +1 -1
- package/dist/layout/neato/adjust-info.d.ts +117 -0
- package/dist/layout/neato/adjust-info.d.ts.map +1 -0
- package/dist/layout/neato/cdt-surface.d.ts.map +1 -1
- package/dist/layout/neato/constraint-adjust.d.ts +40 -0
- package/dist/layout/neato/constraint-adjust.d.ts.map +1 -0
- package/dist/layout/neato/edge-len.d.ts +20 -0
- package/dist/layout/neato/edge-len.d.ts.map +1 -0
- package/dist/layout/neato/fdp-adjust.d.ts +32 -4
- package/dist/layout/neato/fdp-adjust.d.ts.map +1 -1
- package/dist/layout/neato/index.d.ts +9 -6
- package/dist/layout/neato/index.d.ts.map +1 -1
- package/dist/layout/neato/init.d.ts +4 -11
- package/dist/layout/neato/init.d.ts.map +1 -1
- package/dist/layout/neato/kk-paths.d.ts +50 -0
- package/dist/layout/neato/kk-paths.d.ts.map +1 -0
- package/dist/layout/neato/kk-solve.d.ts +14 -0
- package/dist/layout/neato/kk-solve.d.ts.map +1 -0
- package/dist/layout/neato/kk.d.ts +44 -0
- package/dist/layout/neato/kk.d.ts.map +1 -0
- package/dist/layout/neato/multispline-router.d.ts.map +1 -1
- package/dist/layout/neato/poly.d.ts +50 -0
- package/dist/layout/neato/poly.d.ts.map +1 -0
- package/dist/layout/neato/sgd-dijkstra.d.ts +20 -0
- package/dist/layout/neato/sgd-dijkstra.d.ts.map +1 -0
- package/dist/layout/neato/sgd.d.ts +14 -9
- package/dist/layout/neato/sgd.d.ts.map +1 -1
- package/dist/layout/neato/start.d.ts +51 -0
- package/dist/layout/neato/start.d.ts.map +1 -0
- package/dist/layout/neato/vpsc-adjust.d.ts +21 -0
- package/dist/layout/neato/vpsc-adjust.d.ts.map +1 -0
- package/dist/layout/sfdp/index.d.ts.map +1 -1
- package/dist/layout/sfdp/init.d.ts +0 -9
- package/dist/layout/sfdp/init.d.ts.map +1 -1
- package/dist/layout/sfdp/spring-driver.d.ts.map +1 -1
- package/dist/layout/twopi/circle.d.ts +0 -7
- package/dist/layout/twopi/circle.d.ts.map +1 -1
- package/dist/ortho/ortho-parallel.d.ts.map +1 -1
- package/dist/ortho/trap-query.d.ts.map +1 -1
- package/dist/parser/index.d.ts +9 -5
- package/dist/parser/index.d.ts.map +1 -1
- package/dist/render/index.d.ts +2 -0
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/public.d.ts +9 -3
- package/dist/render/public.d.ts.map +1 -1
- package/dist/render/xdot-public.d.ts +7 -2
- package/dist/render/xdot-public.d.ts.map +1 -1
- package/dist/render.js +7355 -5476
- package/dist/render.js.map +4 -4
- package/dist/util/xml.d.ts.map +1 -1
- package/dist/vpsc/Solver.d.ts +1 -0
- package/dist/vpsc/Solver.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/builder.ts +73 -5
- package/src/api/edge-ops.ts +19 -0
- package/src/api/geometry.ts +22 -5
- package/src/async/collect.ts +204 -0
- package/src/async/fonts.ts +61 -0
- package/src/async/render-async.ts +205 -0
- package/src/async/render-into.ts +115 -0
- package/src/async/sanitize.ts +150 -0
- package/src/common/htmltable-types.ts +4 -5
- package/src/common/make-label.ts +10 -1
- package/src/common/poly-shapes.ts +4 -1
- package/src/common/textmeasure-factory.ts +11 -0
- package/src/common/utils-inputscale.ts +31 -0
- package/src/errors.ts +188 -5
- package/src/gvc/context.ts +96 -17
- package/src/gvc/device.ts +11 -6
- package/src/gvc/image-resolver.ts +25 -2
- package/src/gvc/job.ts +3 -1
- package/src/gvc/usershape.ts +6 -0
- package/src/index.ts +59 -43
- package/src/label/index.ts +6 -2
- package/src/label/node.ts +2 -1
- package/src/label/rectangle.ts +4 -2
- package/src/layout/circo/circular.ts +9 -6
- package/src/layout/dot/pack-components.ts +6 -2
- package/src/layout/dot/position.ts +21 -3
- package/src/layout/fdp/derive.ts +7 -6
- package/src/layout/fdp/index.ts +45 -5
- package/src/layout/fdp/init.ts +7 -6
- package/src/layout/fdp/layout.ts +2 -1
- package/src/layout/fdp/ports.ts +3 -2
- package/src/layout/fdp/xlayout.ts +3 -1
- package/src/layout/neato/adjust-info.ts +332 -0
- package/src/layout/neato/cdt-surface.ts +50 -30
- package/src/layout/neato/constraint-adjust.ts +466 -0
- package/src/layout/neato/edge-len.ts +36 -0
- package/src/layout/neato/fdp-adjust.ts +117 -12
- package/src/layout/neato/index.ts +36 -54
- package/src/layout/neato/init.ts +21 -36
- package/src/layout/neato/kk-paths.ts +146 -0
- package/src/layout/neato/kk-solve.ts +64 -0
- package/src/layout/neato/kk.ts +322 -0
- package/src/layout/neato/multispline-router.ts +4 -3
- package/src/layout/neato/poly.ts +493 -0
- package/src/layout/neato/sgd-dijkstra.ts +125 -0
- package/src/layout/neato/sgd.ts +63 -40
- package/src/layout/neato/start.ts +222 -0
- package/src/layout/neato/vpsc-adjust.ts +93 -0
- package/src/layout/sfdp/index.ts +4 -5
- package/src/layout/sfdp/init.ts +40 -4
- package/src/layout/sfdp/spring-driver.ts +30 -1
- package/src/layout/twopi/circle.ts +2 -1
- package/src/ortho/ortho-parallel.ts +2 -1
- package/src/ortho/trap-query.ts +2 -1
- package/src/parser/index.ts +11 -11
- package/src/render/index.ts +5 -0
- package/src/render/public.ts +24 -24
- package/src/render/svg.ts +1 -1
- package/src/render/xdot-public.ts +19 -18
- package/src/util/xml.ts +24 -30
- package/src/vpsc/Solver.ts +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/label/index.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,IAAI,EAAiC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/label/index.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,IAAI,EAAiC,MAAM,gBAAgB,CAAC;AAE1E,OAAO,EAGL,KAAK,IAAI,EACT,KAAK,MAAM,EAOZ,MAAM,WAAW,CAAC;AAInB,OAAO,cAAc,CAAC;AAMtB;;;;;;;;GAQG;AACH,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,+CAA+C;IAC/C,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAyDD;;;GAGG;AACH,wBAAgB,SAAS,IAAI,KAAK,CAEjC;AAsBD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,CAK3C;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AA4CD;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,CAGhE;AAiED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAOtE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,IAAI,CAEvD"}
|
package/dist/label/node.d.ts
CHANGED
package/dist/label/node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/label/node.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/label/node.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,IAAI,EAA6C,MAAM,gBAAgB,CAAC;AAUtF,kCAAkC;AAClC,eAAO,MAAM,QAAQ,KAAK,CAAC;AAS3B;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,IAAI,CAAC;IACX,qEAAqE;IACrE,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpB,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,EAAE,IAAI,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,aAAa,EAAE,CAAC;C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h
|
|
6
|
-
*/
|
|
7
1
|
/** @see label/index.h:NUMDIMS */
|
|
8
2
|
export declare const NUMDIMS = 2;
|
|
9
3
|
/** @see label/index.h:NUMSIDES (2*NUMDIMS) */
|
|
@@ -41,7 +35,7 @@ export declare function nullRect(): Rect;
|
|
|
41
35
|
* Returns 0 for undefined rects or zero-width dimensions.
|
|
42
36
|
* Throws if area overflows Number.MAX_SAFE_INTEGER (browser-safe substitute
|
|
43
37
|
* for C's graphviz_exit on UINT64_MAX overflow).
|
|
44
|
-
* @see label/rectangle.c:RectArea
|
|
38
|
+
* @see label/rectangle.c:RectArea (agerrorf + graphviz_exit at rectangle.c:73)
|
|
45
39
|
*/
|
|
46
40
|
export declare function rectArea(r: Rect): number;
|
|
47
41
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rectangle.d.ts","sourceRoot":"","sources":["../../src/label/rectangle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rectangle.d.ts","sourceRoot":"","sources":["../../src/label/rectangle.ts"],"names":[],"mappings":"AAWA,iCAAiC;AACjC,eAAO,MAAM,OAAO,IAAI,CAAC;AAEzB,8CAA8C;AAC9C,eAAO,MAAM,QAAQ,QAAc,CAAC;AAEpC;;;;GAIG;AACH,MAAM,WAAW,IAAI;IACnB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5C;AAED,2DAA2D;AAC3D,wBAAgB,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAc;AAEnD,4DAA4D;AAC5D,wBAAgB,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAwB;AAE7D,2DAA2D;AAC3D,wBAAgB,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAkB;AAEvD,4DAA4D;AAC5D,wBAAgB,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAA4B;AAWjE;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,CAItC;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,IAAI,IAAI,CAK/B;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAaxC;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,GAAG,IAAI,CAWnD;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,OAAO,CAQjD"}
|
|
@@ -44,11 +44,14 @@ export declare function readMinDist(realg: Graph): number;
|
|
|
44
44
|
export declare function circularLayout(sg: SubGraph, realg: Graph, blockCount: number, allEdges: DerivedEdge[]): number;
|
|
45
45
|
export declare function copyPositions(_sg: SubGraph): void;
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
47
|
+
* Per-component adjustNodes(sg). C calls it on each DERIVED component
|
|
48
|
+
* (circularinit.c:212), but the derived graph is a fresh root that never
|
|
49
|
+
* declares `overlap`, `normalize` or `scale`: agget(sg, "overlap") is NULL
|
|
50
|
+
* (AM_NONE) and removeOverlapWith only runs the no-op normalize/simpleScale.
|
|
51
|
+
* Verified against the native binary (T8, v2-silent-gaps): output is
|
|
52
|
+
* independent of those attributes, so this is a faithful no-op, not a gap.
|
|
53
|
+
* The single-component path (adjustNodesFull on the real graph,
|
|
54
|
+
* circularinit.c:203) IS ported — see circoLayout.
|
|
52
55
|
*/
|
|
53
56
|
export declare function adjustNodes(_sg: SubGraph): void;
|
|
54
57
|
export declare function circoLayout(g: Graph): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"circular.d.ts","sourceRoot":"","sources":["../../../src/layout/circo/circular.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;G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C;AAED,0DAA0D;AAC1D,wBAAgB,oBAAoB,CAClC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,UAAU,EAAE,MAAM,GAC1F,IAAI,CAWN;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,GAAG,KAAK,CAUhE"}
|
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Multi-component `pack` branch for the dot engine — the body of C's `doDot`
|
|
3
|
-
* (dotinit.c:doDot ≈437-500) for the case where `pack`/`packmode` is set and the
|
|
4
|
-
* graph has more than one connected component. Each component is laid out
|
|
5
|
-
* independently (everything in the dot pipeline except the final coordinate
|
|
6
|
-
* rotation/translation), then polyomino-packed via the shared pack module; the
|
|
7
|
-
* root graph is rotated/translated once by `gvPostprocess` afterwards.
|
|
8
|
-
*
|
|
9
|
-
* The port's pack ops run in points on `n.info.coord` (see pack/index.ts
|
|
10
|
-
* shiftOneGraph), so C's `attachPos`/`resetCoord` (which copy point coords to
|
|
11
|
-
* inches in `ND_pos` for the pack library and back) are NOT needed.
|
|
12
|
-
*
|
|
13
|
-
* Split out of index.ts per ADR-1 (keeps both files under the size/complexity
|
|
14
|
-
* caps and mirrors C's function boundaries: CLAUDE.md — the C source is the spec).
|
|
15
|
-
*
|
|
16
|
-
* @see lib/dotgen/dotinit.c:doDot
|
|
17
|
-
* @see lib/dotgen/dotinit.c:initSubg
|
|
18
|
-
* @see lib/dotgen/dotinit.c:copyClusterInfo
|
|
19
|
-
*/
|
|
20
1
|
import type { Graph } from '../../model/graph.js';
|
|
21
2
|
import type { PackInfo } from '../pack/index.js';
|
|
22
3
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pack-components.d.ts","sourceRoot":"","sources":["../../../src/layout/dot/pack-components.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pack-components.d.ts","sourceRoot":"","sources":["../../../src/layout/dot/pack-components.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAGlD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAqBjD;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,CAK7C;AAwED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,KAAK,GAAG;IAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAAC,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;CAAE,CA4B9F;AAOD;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,GAAG,IAAI,CAMrD;AAOD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,GAAG,IAAI,CA6B/D;AA2CD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,IAAI,CAgB5F;AAoFD;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,GACtE,IAAI,CAoBN"}
|
|
@@ -31,8 +31,13 @@ export declare function rankHasCrossEdge(rk: {
|
|
|
31
31
|
}, r: number): boolean;
|
|
32
32
|
/** @see lib/dotgen/position.c:connectGraph */
|
|
33
33
|
export declare function connectGraph(g: Graph): void;
|
|
34
|
-
/**
|
|
35
|
-
|
|
34
|
+
/**
|
|
35
|
+
* C's agget(g, "nslimit") INHERITS the root default, so a graph whose own
|
|
36
|
+
* attrs lack the key falls back to the parse-time snapshot, then the root
|
|
37
|
+
* (the same chain rank1 uses for nslimit1).
|
|
38
|
+
* @see lib/dotgen/position.c:nsiter2
|
|
39
|
+
*/
|
|
40
|
+
export declare function nsiter2(g: Graph): number;
|
|
36
41
|
/** @internal — expand rank slot array for leaf nodes */
|
|
37
42
|
export declare function expandRankSlots(rk: {
|
|
38
43
|
v: Node[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../src/layout/dot/position.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../src/layout/dot/position.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAuBhD;;;;;;;;GAQG;AACH,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAUjD;AAED,6CAA6C;AAC7C,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAGzC;AAMD,oFAAoF;AACpF,wBAAgB,mBAAmB,CACjC,EAAE,EAAE;IAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,EAC9C,CAAC,EAAE,MAAM,GACR,OAAO,CAOT;AAED,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,EAAE,EAAE;IAAE,CAAC,EAAE,IAAI,EAAE,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAOjF;AAED,8CAA8C;AAC9C,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAc3C;AAMD;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CASxC;AAMD,wDAAwD;AACxD,wBAAgB,eAAe,CAAC,EAAE,EAAE;IAAE,CAAC,EAAE,IAAI,EAAE,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAQhF;AAED,gDAAgD;AAChD,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAY5C;AAED,oDAAoD;AACpD,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAY3C;AAUD,8CAA8C;AAC9C,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CA+B5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derive.d.ts","sourceRoot":"","sources":["../../../src/layout/fdp/derive.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"derive.d.ts","sourceRoot":"","sources":["../../../src/layout/fdp/derive.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAwB3C,oEAAoE;AACpE,MAAM,WAAW,UAAU;IACzB,oDAAoD;IACpD,KAAK,EAAE,KAAK,CAAC;IACb,kEAAkE;IAClE,SAAS,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,6CAA6C;IAC7C,IAAI,EAAE,OAAO,kBAAkB,EAAE,QAAQ,CAAC;CAC3C;AAMD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAM1D;AAsLD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,GAAG,KAAK,GAAG,IAAI,CAiBrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/fdp/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/fdp/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAiBzD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAM7D;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAW3C;AA8CD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAiC9C;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,YAIvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/layout/fdp/init.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/layout/fdp/init.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AA6DlD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAkB9C;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAUzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/layout/fdp/layout.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/layout/fdp/layout.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAmBlD,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAuB3D,yCAAyC;AACzC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,GAAG,UAAU,CAY7C;AAMD;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,CAAC,EAAE,KAAK,EACR,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EACtB,MAAM,EAAE,KAAK,GACZ,IAAI,CAeN;AAuID;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAmB1D;AAWD;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAUpC;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,CA+B/C;AA6FD;;;;;GAKG;AACH,wBAAgB,MAAM,CACpB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GACtD,MAAM,CAmBR;AAyBD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAW1C"}
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cluster expansion ports: after the parent layout positions a
|
|
3
|
-
* cluster's derived node, the angles of its edges induce boundary
|
|
4
|
-
* ports for the cluster's own recursive layout.
|
|
5
|
-
*
|
|
6
|
-
* Spec read at the 15.0.0 tag.
|
|
7
|
-
*
|
|
8
|
-
* @see lib/fdpgen/layout.c:getEdgeList / genPorts / expandCluster
|
|
9
|
-
* (15.0.0)
|
|
10
|
-
*/
|
|
11
1
|
import type { Graph } from '../../model/graph.js';
|
|
12
2
|
import type { Node } from '../../model/node.js';
|
|
13
3
|
import type { Edge } from '../../model/edge.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ports.d.ts","sourceRoot":"","sources":["../../../src/layout/fdp/ports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ports.d.ts","sourceRoot":"","sources":["../../../src/layout/fdp/ports.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EACL,KAAK,KAAK,EAKX,MAAM,gBAAgB,CAAC;AAKxB,qEAAqE;AACrE,UAAU,IAAI;IACZ,CAAC,EAAE,IAAI,CAAC;IACR,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAgCD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,EAAE,CAmBrD;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GACvD,MAAM,CAcR;AAoBD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,GAAG,KAAK,CAuBvD"}
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* fdp expansion layout: grow the point-node layout so sized nodes do
|
|
3
|
-
* not overlap, by force iteration with overlap-aware repulsion.
|
|
4
|
-
*
|
|
5
|
-
* Spec read at the 15.0.0 tag (the post-tag Mlimit force cutoff is
|
|
6
|
-
* deliberately NOT ported — the golden refs predate it).
|
|
7
|
-
*
|
|
8
|
-
* The default overlap attribute is "9:prism": up to 9 x_layout tries,
|
|
9
|
-
* then removeOverlapAs with the remaining mode. x_layout does NOT always
|
|
10
|
-
* converge (many cluster/derived graphs reach the mode dispatch), so
|
|
11
|
-
* removeOverlapAs wires the ported neato adjust machinery: AM_PRISM via
|
|
12
|
-
* fdpAdjust, the scale family via scAdjust. On the GTS reference build
|
|
13
|
-
* overlap=false resolves to AM_PRISM (value 1000), not a no-op.
|
|
14
|
-
*
|
|
15
|
-
* @see lib/fdpgen/xlayout.c (15.0.0)
|
|
16
|
-
*/
|
|
17
1
|
import type { Graph } from '../../model/graph.js';
|
|
18
2
|
import { type XParams } from './fdp-model.js';
|
|
19
3
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xlayout.d.ts","sourceRoot":"","sources":["../../../src/layout/fdp/xlayout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"xlayout.d.ts","sourceRoot":"","sources":["../../../src/layout/fdp/xlayout.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAKlD,OAAO,EACL,KAAK,OAAO,EAKb,MAAM,gBAAgB,CAAC;AAsQxB;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAMxD"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Info_t machinery of neatogen's adjust.c shared by the Voronoi and
|
|
3
|
+
* oscale (`AM_SCALE`, "old scaling") adjusters: per-node polygons and site
|
|
4
|
+
* coordinates, the clipping bounding box, site sorting, coincident-node
|
|
5
|
+
* separation, the exact overlap count, and `sAdjust`. Voronoi-only functions
|
|
6
|
+
* (`vAdjust`, `newPos`, `addCorners`, `increaseBoundBox`, `nextOne`) are not
|
|
7
|
+
* ported.
|
|
8
|
+
*
|
|
9
|
+
* C keeps `nodeInfo`, `nsites`, `pxmin..pymax`, `xmin..deltax` as file
|
|
10
|
+
* statics and `state_t` for the rest; here they are one `InfoState` created
|
|
11
|
+
* per call (`newInfoState`). Units are inches, as in C. `Verbose` stderr
|
|
12
|
+
* output ("overlap [i] : n", "Number of iterations") is not reproduced: the
|
|
13
|
+
* port has no verbosity switch. `qsort` is unstable in C; `Array.sort` is
|
|
14
|
+
* stable, which only changes the order among sites with identical
|
|
15
|
+
* coordinates (all of which `rmEquality` treats as one group).
|
|
16
|
+
*
|
|
17
|
+
* @see lib/neatogen/adjust.c
|
|
18
|
+
*/
|
|
19
|
+
import type { Graph } from '../../model/graph.js';
|
|
20
|
+
import type { Node } from '../../model/node.js';
|
|
21
|
+
import type { Point } from '../../model/geom.js';
|
|
22
|
+
import type { Poly } from './poly.js';
|
|
23
|
+
/** @see lib/neatogen/site.h:Site */
|
|
24
|
+
export interface Site {
|
|
25
|
+
coord: Point;
|
|
26
|
+
sitenbr: number;
|
|
27
|
+
}
|
|
28
|
+
/** @see lib/neatogen/info.h:Info_t (Voronoi `verts` fields omitted) */
|
|
29
|
+
export interface InfoT {
|
|
30
|
+
site: Site;
|
|
31
|
+
overlaps: boolean;
|
|
32
|
+
poly: Poly;
|
|
33
|
+
node: Node;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* `state_t` plus the adjust.c file statics (`nodeInfo`, `nsites`, `pxmin`…,
|
|
37
|
+
* `xmin`…). `nsites` is `nodeInfo.length`.
|
|
38
|
+
* @see lib/neatogen/adjust.c:state_t
|
|
39
|
+
*/
|
|
40
|
+
export interface InfoState {
|
|
41
|
+
nodeInfo: InfoT[];
|
|
42
|
+
sites: Site[];
|
|
43
|
+
nw: Point;
|
|
44
|
+
ne: Point;
|
|
45
|
+
sw: Point;
|
|
46
|
+
se: Point;
|
|
47
|
+
pxmin: number;
|
|
48
|
+
pxmax: number;
|
|
49
|
+
pymin: number;
|
|
50
|
+
pymax: number;
|
|
51
|
+
xmin: number;
|
|
52
|
+
xmax: number;
|
|
53
|
+
ymin: number;
|
|
54
|
+
ymax: number;
|
|
55
|
+
deltax: number;
|
|
56
|
+
}
|
|
57
|
+
/** Fresh, empty state (`state_t st = {0}` and zeroed statics). */
|
|
58
|
+
export declare function newInfoState(): InfoState;
|
|
59
|
+
/**
|
|
60
|
+
* Extremes of the polygons, then the bounding box as a `voro_margin`
|
|
61
|
+
* (default 0.05) expansion of them. Requires at least one site.
|
|
62
|
+
* @see lib/neatogen/adjust.c:chkBoundBox
|
|
63
|
+
*/
|
|
64
|
+
export declare function chkBoundBox(st: InfoState, graph: Graph): void;
|
|
65
|
+
/**
|
|
66
|
+
* Create the Info_t array for every node of `graph` (polygons per
|
|
67
|
+
* `sepFactor`: additive margins use `makeAddPoly` in inches, scale margins
|
|
68
|
+
* use `makePoly`). Returns false (C: 1, `nodeInfo` freed) when a polygon
|
|
69
|
+
* cannot be made.
|
|
70
|
+
* @see lib/neatogen/adjust.c:makeInfo
|
|
71
|
+
*/
|
|
72
|
+
export declare function makeInfo(st: InfoState, graph: Graph): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Fill the site array from `nodeInfo` and sort it with `scomp`.
|
|
75
|
+
* @see lib/neatogen/adjust.c:sortSites
|
|
76
|
+
*/
|
|
77
|
+
export declare function sortSites(st: InfoState): void;
|
|
78
|
+
/** @see lib/neatogen/adjust.c:geomUpdate */
|
|
79
|
+
export declare function geomUpdate(st: InfoState, doSort: boolean): void;
|
|
80
|
+
/**
|
|
81
|
+
* Check for nodes with identical positions and tweak the positions.
|
|
82
|
+
* @see lib/neatogen/adjust.c:rmEquality
|
|
83
|
+
*/
|
|
84
|
+
export declare function rmEquality(st: InfoState): void;
|
|
85
|
+
/**
|
|
86
|
+
* Count number of node-node overlaps at iteration `iter` (exact polygon
|
|
87
|
+
* test), flagging the nodes involved.
|
|
88
|
+
* @see lib/neatogen/adjust.c:countOverlap
|
|
89
|
+
*/
|
|
90
|
+
export declare function countOverlap(st: InfoState, _iter: number): number;
|
|
91
|
+
/** @see lib/neatogen/adjust.c:rePos */
|
|
92
|
+
export declare function rePos(st: InfoState): void;
|
|
93
|
+
/**
|
|
94
|
+
* Scale positions up by 5% until no polygons overlap. Returns 1 when
|
|
95
|
+
* positions changed, 0 when there was nothing to do.
|
|
96
|
+
* @see lib/neatogen/adjust.c:sAdjust
|
|
97
|
+
*/
|
|
98
|
+
export declare function sAdjust(st: InfoState): number;
|
|
99
|
+
/**
|
|
100
|
+
* Enter new node positions into the graph.
|
|
101
|
+
* @see lib/neatogen/adjust.c:updateGraph
|
|
102
|
+
*/
|
|
103
|
+
export declare function updateGraph(st: InfoState): void;
|
|
104
|
+
/**
|
|
105
|
+
* Exact overlap count of the graph's nodes (`makeInfo` + `countOverlap(0)`);
|
|
106
|
+
* 0 when `makeInfo` fails.
|
|
107
|
+
* @see lib/neatogen/adjust.c:countOverlap
|
|
108
|
+
*/
|
|
109
|
+
export declare function countOverlapIn(g: Graph): number;
|
|
110
|
+
/**
|
|
111
|
+
* The AM_SCALE branch of `removeOverlapWith`: `makeInfo`, `chkBoundBox`,
|
|
112
|
+
* `sAdjust`, and `updateGraph` when sAdjust moved nodes. Returns sAdjust's
|
|
113
|
+
* result (0 when `makeInfo` fails). Requires at least one node.
|
|
114
|
+
* @see lib/neatogen/adjust.c:removeOverlapWith
|
|
115
|
+
*/
|
|
116
|
+
export declare function sAdjustGraph(g: Graph): number;
|
|
117
|
+
//# sourceMappingURL=adjust-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adjust-info.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/adjust-info.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAUtC,oCAAoC;AACpC,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,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E,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAgBjE;AAED,uCAAuC;AACvC,wBAAgB,KAAK,CAAC,EAAE,EAAE,SAAS,GAAG,IAAI,CAMzC;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,CAU7C;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,SAAS,GAAG,IAAI,CAI/C;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAI/C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAO7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdt-surface.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/cdt-surface.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cdt-surface.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/cdt-surface.ts"],"names":[],"mappings":"AAuCA,mEAAmE;AACnE,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,2EAA2E;IAC3E,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AA0lBD;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GACjE,OAAO,GAAG,IAAI,CAwDhB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orthogonal-ordering overlap removal — cAdjust (overlap=ortho*, portho*).
|
|
3
|
+
*
|
|
4
|
+
* Builds horizontal/vertical constraint graphs over the node boxes and solves
|
|
5
|
+
* them with network simplex (a linear objective, so `rank` is reused). Based
|
|
6
|
+
* on Marriott, Stuckey, Tam and He, "Removing Node Overlapping in Graph Layout
|
|
7
|
+
* Using Constrained Optimization", Constraints 8(2):143-172, 2003 (per the C
|
|
8
|
+
* source comment). All geometry is integer points scaled by SCALE (10).
|
|
9
|
+
*
|
|
10
|
+
* Deviations from C, all structural (results identical):
|
|
11
|
+
* - the visibility graph `vg` of mkConstraintG is a per-item adjacency array
|
|
12
|
+
* (C builds a strict cgraph whose out-edge order — by head sequence — equals
|
|
13
|
+
* the ascending list order used here);
|
|
14
|
+
* - cAdjust's `switch` is a mode -> plan table (same eight cases plus the
|
|
15
|
+
* PORTHO default);
|
|
16
|
+
* - constrainX/constrainY share `buildConstraintGraph` for the ortho choice.
|
|
17
|
+
*
|
|
18
|
+
* @see lib/neatogen/constraint.c:cAdjust
|
|
19
|
+
*/
|
|
20
|
+
import { Graph } from '../../model/graph.js';
|
|
21
|
+
/** @see lib/neatogen/adjust.h:adjust_mode */
|
|
22
|
+
export declare const AM_ORTHO = 5;
|
|
23
|
+
export declare const AM_ORTHO_YX = 6;
|
|
24
|
+
export declare const AM_ORTHOXY = 7;
|
|
25
|
+
export declare const AM_ORTHOYX = 8;
|
|
26
|
+
export declare const AM_PORTHO = 9;
|
|
27
|
+
export declare const AM_PORTHO_YX = 10;
|
|
28
|
+
export declare const AM_PORTHOXY = 11;
|
|
29
|
+
export declare const AM_PORTHOYX = 12;
|
|
30
|
+
/**
|
|
31
|
+
* Remove node overlaps with orthogonal-ordering constraints. mode is one of
|
|
32
|
+
* the eight AM_ORTHO and AM_PORTHO values (else AM_PORTHO). Returns 1
|
|
33
|
+
* if nodes were moved, 0 if no boxes overlapped.
|
|
34
|
+
*
|
|
35
|
+
* ND_pos is in inches; positions are rounded to integer points (x SCALE) while
|
|
36
|
+
* solving, then written back.
|
|
37
|
+
* @see lib/neatogen/constraint.c:cAdjust
|
|
38
|
+
*/
|
|
39
|
+
export declare function cAdjust(g: Graph, mode: number): number;
|
|
40
|
+
//# sourceMappingURL=constraint-adjust.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constraint-adjust.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/constraint-adjust.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAY7C,6CAA6C;AAC7C,eAAO,MAAM,QAAQ,IAAI,CAAC;AAC1B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,SAAS,IAAI,CAAC;AAC3B,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,eAAO,MAAM,WAAW,KAAK,CAAC;AA8Y9B;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAgBtD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edge lengths: scan_graph_mode's MODE_KK and MODE_SGD branches call
|
|
3
|
+
* setEdgeLen on every node, storing `len` (default 1.0) in ED_dist.
|
|
4
|
+
*
|
|
5
|
+
* @see lib/neatogen/stuff.c:setEdgeLen
|
|
6
|
+
* @see lib/neatogen/stuff.c:lenattr
|
|
7
|
+
*/
|
|
8
|
+
import type { Graph } from '../../model/graph.js';
|
|
9
|
+
import type { Edge } from '../../model/edge.js';
|
|
10
|
+
/** `dfltlen` passed by scan_graph_mode. @see lib/neatogen/stuff.c:scan_graph_mode */
|
|
11
|
+
export declare const DEFAULT_EDGE_LEN = 1;
|
|
12
|
+
/**
|
|
13
|
+
* The edge's `len`, or the default when it is absent or empty; a value that
|
|
14
|
+
* does not parse as a positive number warns and falls back to the default.
|
|
15
|
+
* @see lib/neatogen/stuff.c:lenattr
|
|
16
|
+
*/
|
|
17
|
+
export declare function lenattr(ep: Edge, g: Graph): number;
|
|
18
|
+
/** Store every edge's length in `info.dist` (ED_dist). @see lib/neatogen/stuff.c:setEdgeLen */
|
|
19
|
+
export declare function setEdgeLen(g: Graph): void;
|
|
20
|
+
//# sourceMappingURL=edge-len.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-len.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/edge-len.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEhD,qFAAqF;AACrF,eAAO,MAAM,gBAAgB,IAAM,CAAC;AAEpC;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,CAUlD;AAED,+FAA+F;AAC/F,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAEzC"}
|
|
@@ -21,11 +21,39 @@ export declare function overlapPrismTries(flag: string | undefined): number | nu
|
|
|
21
21
|
* @see lib/neatogen/adjust.c:fdpAdjust
|
|
22
22
|
*/
|
|
23
23
|
export declare function fdpAdjust(g: Graph, ntry: number): void;
|
|
24
|
+
/** Adjust modes, in C's enum order (modes above AM_SCALE take the early switch).
|
|
25
|
+
* @see lib/neatogen/adjust.h:AM_NONE */
|
|
26
|
+
export declare const AM_NONE = 0;
|
|
27
|
+
export declare const AM_VOR = 1;
|
|
28
|
+
export declare const AM_SCALE = 2;
|
|
29
|
+
export declare const AM_NSCALE = 3;
|
|
30
|
+
export declare const AM_SCALEXY = 4;
|
|
31
|
+
export declare const AM_COMPRESS = 13;
|
|
32
|
+
export declare const AM_VPSC = 14;
|
|
33
|
+
export declare const AM_IPSEP = 15;
|
|
34
|
+
export declare const AM_PRISM = 16;
|
|
35
|
+
/** @see lib/neatogen/adjust.h:adjust_data (mode, print, value) */
|
|
36
|
+
export interface AdjustData {
|
|
37
|
+
mode: number;
|
|
38
|
+
print: string;
|
|
39
|
+
value: number;
|
|
40
|
+
}
|
|
24
41
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
|
|
42
|
+
* Resolve an `overlap` value to its adjust mode (the PRISM try count lands in
|
|
43
|
+
* `value`).
|
|
44
|
+
* @see lib/neatogen/adjust.c:getAdjustMode
|
|
45
|
+
*/
|
|
46
|
+
export declare function getAdjustMode(flag: string | undefined): AdjustData;
|
|
47
|
+
/**
|
|
48
|
+
* Use `am` to decide if and how to remove node overlaps. normalize and
|
|
49
|
+
* simpleScale (only active with the `normalize`/`scale` attributes) are not
|
|
50
|
+
* ported (see sc-adjust module doc).
|
|
51
|
+
* @see lib/neatogen/adjust.c:removeOverlapWith
|
|
52
|
+
*/
|
|
53
|
+
export declare function removeOverlapWith(g: Graph, am: AdjustData): number;
|
|
54
|
+
/**
|
|
55
|
+
* Remove node overlap relying on the graph's `overlap` attribute.
|
|
56
|
+
* @see lib/neatogen/adjust.c:adjustNodes / removeOverlapAs
|
|
29
57
|
*/
|
|
30
58
|
export declare function adjustNodesFull(g: Graph): number;
|
|
31
59
|
//# sourceMappingURL=fdp-adjust.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fdp-adjust.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/fdp-adjust.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"fdp-adjust.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/fdp-adjust.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AA2ClD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAUzE;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAgCtD;AAED;wCACwC;AACxC,eAAO,MAAM,OAAO,IAAI,CAAC;AACzB,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,QAAQ,IAAI,CAAC;AAC1B,eAAO,MAAM,SAAS,IAAI,CAAC;AAC3B,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,eAAO,MAAM,OAAO,KAAK,CAAC;AAC1B,eAAO,MAAM,QAAQ,KAAK,CAAC;AAC3B,eAAO,MAAM,QAAQ,KAAK,CAAC;AAE3B,kEAAkE;AAClE,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAsBD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAMlE;AA8CD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,UAAU,GAAG,MAAM,CAKlE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAGhD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Neato layout engine entry point.
|
|
3
3
|
*
|
|
4
|
-
* Wires together neatoInitNode, setSeed, solveModel,
|
|
4
|
+
* Wires together neatoInitNode, setSeed, solveModel, adjustNodes,
|
|
5
5
|
* splineEdges, neatoTranslate, and neatoSetAspect into the full neato
|
|
6
6
|
* layout pipeline, and exports NEATO_LAYOUT_ENGINE for registration with
|
|
7
7
|
* GvcContext.
|
|
@@ -13,10 +13,10 @@ import type { Graph } from '../../model/graph.js';
|
|
|
13
13
|
import type { LayoutEngine } from '../../gvc/context.js';
|
|
14
14
|
export { MODE_KK, MODE_MAJOR, MODE_HIER, MODE_IPSEP, MODE_SGD, MODEL_SHORTPATH, MODEL_CIRCUIT, MODEL_SUBSET, MODEL_MDS, neatoInitNode, setSeed, solveModel, neatoTranslate, neatoSetAspect, neatoCleanup, } from './init.js';
|
|
15
15
|
/**
|
|
16
|
-
* Parse `
|
|
17
|
-
* Defaults to MODE_MAJOR when unset
|
|
16
|
+
* Parse the root `mode` attribute into a numeric mode constant (C neatoMode).
|
|
17
|
+
* Defaults to MODE_MAJOR when unset; warns and defaults on an unknown value.
|
|
18
18
|
*
|
|
19
|
-
* @see lib/neatogen/
|
|
19
|
+
* @see lib/neatogen/neatoinit.c:neatoMode
|
|
20
20
|
*/
|
|
21
21
|
export declare function parseMode(g: Graph): number;
|
|
22
22
|
/**
|
|
@@ -27,9 +27,12 @@ export declare function parseMode(g: Graph): number;
|
|
|
27
27
|
*/
|
|
28
28
|
export declare function parseModel(g: Graph): number;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Remove node overlaps per the `overlap` attribute: C's removeOverlapWith
|
|
31
|
+
* dispatch (prism, scale family, oscale, ortho*, portho*, vpsc, voronoi) for
|
|
32
|
+
* every mode, as neato_layout's adjustNodes call does.
|
|
31
33
|
*
|
|
32
|
-
* @see lib/neatogen/neatoinit.c:neato_layout (
|
|
34
|
+
* @see lib/neatogen/neatoinit.c:neato_layout (adjustNodes call)
|
|
35
|
+
* @see lib/neatogen/adjust.c:removeOverlapWith
|
|
33
36
|
*/
|
|
34
37
|
export declare function maybeRemoveOverlap(g: Graph): void;
|
|
35
38
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/index.ts"],"names":[],"mappings":"AACA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/index.ts"],"names":[],"mappings":"AACA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAqCzD,OAAO,EACL,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EACpD,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EACvD,aAAa,EAAE,OAAO,EAAE,UAAU,EAClC,cAAc,EAAE,cAAc,EAAE,YAAY,GAC7C,MAAM,WAAW,CAAC;AAMnB;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAE1C;AAcD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAK3C;AAMD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAEjD;AAMD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CA4D1C;AAsFD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,YAIjC,CAAC"}
|
|
@@ -11,6 +11,8 @@ import type { Graph } from '../../model/graph.js';
|
|
|
11
11
|
import type { Node } from '../../model/node.js';
|
|
12
12
|
import type { Edge } from '../../model/edge.js';
|
|
13
13
|
import type { VtxData } from './dijkstra.js';
|
|
14
|
+
import { checkStart } from './start.js';
|
|
15
|
+
export { checkStart };
|
|
14
16
|
/** Kamada-Kawai energy minimization. @see lib/neatogen/neatoprocs.h */
|
|
15
17
|
export declare const MODE_KK = 0;
|
|
16
18
|
/** Stress majorization (default). @see lib/neatogen/neatoprocs.h */
|
|
@@ -44,10 +46,8 @@ export declare function neatoInitNode(n: Node, dim?: number): void;
|
|
|
44
46
|
* majorization starts from the input layout instead of a random init; a `!`
|
|
45
47
|
* suffix or `pin=true` additionally sets info.pinned (P_PIN → isFixed).
|
|
46
48
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* (a `pos="27,42"` seeds (27,42), which orthog1 then centres). Must run AFTER
|
|
50
|
-
* neatoInitNode, which zeroes info.pos.
|
|
49
|
+
* `pos` is divided by PSinputscale when > 0 (neatoinit.c:90-95). Must run
|
|
50
|
+
* AFTER neatoInitNode, which zeroes info.pos.
|
|
51
51
|
* @see lib/neatogen/neatoinit.c:user_pos
|
|
52
52
|
*/
|
|
53
53
|
export declare function userPos(n: Node): boolean;
|
|
@@ -147,13 +147,6 @@ export declare function mapModelToStress(model: number): number;
|
|
|
147
147
|
export declare function runMajorization(g: Graph, mode: number, model: number): void;
|
|
148
148
|
/** Any edge carries a len attr (C: agattr_text(g, AGEDGE, "len")). */
|
|
149
149
|
export declare function graphHasLen(g: Graph): boolean;
|
|
150
|
-
/**
|
|
151
|
-
* Seed the RNG from the start attr; no attr means the default seed 1.
|
|
152
|
-
* start=regular/self are not ported (no suite input uses them).
|
|
153
|
-
* @see lib/neatogen/neatoinit.c:setSeed
|
|
154
|
-
* @see lib/neatogen/neatoinit.c:checkStart
|
|
155
|
-
*/
|
|
156
|
-
export declare function checkStart(g: Graph): void;
|
|
157
150
|
/**
|
|
158
151
|
* Build the vtx_data adjacency in C's makeGraphData shape: per node,
|
|
159
152
|
* out-edges then in-edges (agfstedge order), self entry at index 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/init.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC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