@knowvah/dot-engine 0.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.
- package/LICENSE +277 -0
- package/README.md +292 -0
- package/dist/api/builder.d.ts +78 -0
- package/dist/api/builder.d.ts.map +1 -0
- package/dist/api/edge-ops.d.ts +45 -0
- package/dist/api/edge-ops.d.ts.map +1 -0
- package/dist/api/geometry.d.ts +159 -0
- package/dist/api/geometry.d.ts.map +1 -0
- package/dist/api/index.d.ts +24 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api.js +719 -0
- package/dist/api.js.map +7 -0
- package/dist/bundle.js +101 -0
- package/dist/cdt/bag.d.ts +58 -0
- package/dist/cdt/bag.d.ts.map +1 -0
- package/dist/cdt/hash-core.d.ts +40 -0
- package/dist/cdt/hash-core.d.ts.map +1 -0
- package/dist/cdt/hash.d.ts +74 -0
- package/dist/cdt/hash.d.ts.map +1 -0
- package/dist/cdt/index.d.ts +16 -0
- package/dist/cdt/index.d.ts.map +1 -0
- package/dist/cdt/splay-core.d.ts +78 -0
- package/dist/cdt/splay-core.d.ts.map +1 -0
- package/dist/cdt/splay.d.ts +63 -0
- package/dist/cdt/splay.d.ts.map +1 -0
- package/dist/cdt/strhash.d.ts +26 -0
- package/dist/cdt/strhash.d.ts.map +1 -0
- package/dist/cdt/types.d.ts +11 -0
- package/dist/cdt/types.d.ts.map +1 -0
- package/dist/common/arith.d.ts +35 -0
- package/dist/common/arith.d.ts.map +1 -0
- package/dist/common/arm-pow-data.d.ts +17 -0
- package/dist/common/arm-pow-data.d.ts.map +1 -0
- package/dist/common/arm-pow.d.ts +12 -0
- package/dist/common/arm-pow.d.ts.map +1 -0
- package/dist/common/arrows-constants.d.ts +97 -0
- package/dist/common/arrows-constants.d.ts.map +1 -0
- package/dist/common/arrows-geometry.d.ts +24 -0
- package/dist/common/arrows-geometry.d.ts.map +1 -0
- package/dist/common/arrows-miter.d.ts +24 -0
- package/dist/common/arrows-miter.d.ts.map +1 -0
- package/dist/common/arrows-shapes-poly.d.ts +24 -0
- package/dist/common/arrows-shapes-poly.d.ts.map +1 -0
- package/dist/common/arrows-shapes-util.d.ts +77 -0
- package/dist/common/arrows-shapes-util.d.ts.map +1 -0
- package/dist/common/arrows-shapes.d.ts +48 -0
- package/dist/common/arrows-shapes.d.ts.map +1 -0
- package/dist/common/arrows-types.d.ts +59 -0
- package/dist/common/arrows-types.d.ts.map +1 -0
- package/dist/common/arrows.d.ts +69 -0
- package/dist/common/arrows.d.ts.map +1 -0
- package/dist/common/color.d.ts +66 -0
- package/dist/common/color.d.ts.map +1 -0
- package/dist/common/colorData.d.ts +10 -0
- package/dist/common/colorData.d.ts.map +1 -0
- package/dist/common/compass-port.d.ts +39 -0
- package/dist/common/compass-port.d.ts.map +1 -0
- package/dist/common/crand.d.ts +42 -0
- package/dist/common/crand.d.ts.map +1 -0
- package/dist/common/edge-label-init.d.ts +51 -0
- package/dist/common/edge-label-init.d.ts.map +1 -0
- package/dist/common/edge-offset.d.ts +66 -0
- package/dist/common/edge-offset.d.ts.map +1 -0
- package/dist/common/ellipse-wedge.d.ts +10 -0
- package/dist/common/ellipse-wedge.d.ts.map +1 -0
- package/dist/common/emit-types.d.ts +255 -0
- package/dist/common/emit-types.d.ts.map +1 -0
- package/dist/common/fma.d.ts +10 -0
- package/dist/common/fma.d.ts.map +1 -0
- package/dist/common/graph-init.d.ts +61 -0
- package/dist/common/graph-init.d.ts.map +1 -0
- package/dist/common/html-entities.d.ts +17 -0
- package/dist/common/html-entities.d.ts.map +1 -0
- package/dist/common/html-string.d.ts +14 -0
- package/dist/common/html-string.d.ts.map +1 -0
- package/dist/common/htmltable-emit-fill.d.ts +84 -0
- package/dist/common/htmltable-emit-fill.d.ts.map +1 -0
- package/dist/common/htmltable-emit-rules.d.ts +79 -0
- package/dist/common/htmltable-emit-rules.d.ts.map +1 -0
- package/dist/common/htmltable-emit.d.ts +63 -0
- package/dist/common/htmltable-emit.d.ts.map +1 -0
- package/dist/common/htmltable-lex.d.ts +16 -0
- package/dist/common/htmltable-lex.d.ts.map +1 -0
- package/dist/common/htmltable-parse.d.ts +37 -0
- package/dist/common/htmltable-parse.d.ts.map +1 -0
- package/dist/common/htmltable-port.d.ts +15 -0
- package/dist/common/htmltable-port.d.ts.map +1 -0
- package/dist/common/htmltable-pos-runs.d.ts +88 -0
- package/dist/common/htmltable-pos-runs.d.ts.map +1 -0
- package/dist/common/htmltable-pos.d.ts +192 -0
- package/dist/common/htmltable-pos.d.ts.map +1 -0
- package/dist/common/htmltable-types.d.ts +237 -0
- package/dist/common/htmltable-types.d.ts.map +1 -0
- package/dist/common/htmltable.d.ts +74 -0
- package/dist/common/htmltable.d.ts.map +1 -0
- package/dist/common/layers.d.ts +20 -0
- package/dist/common/layers.d.ts.map +1 -0
- package/dist/common/make-label.d.ts +60 -0
- package/dist/common/make-label.d.ts.map +1 -0
- package/dist/common/multicolor.d.ts +46 -0
- package/dist/common/multicolor.d.ts.map +1 -0
- package/dist/common/nodeinit.d.ts +45 -0
- package/dist/common/nodeinit.d.ts.map +1 -0
- package/dist/common/poly-gencode.d.ts +40 -0
- package/dist/common/poly-gencode.d.ts.map +1 -0
- package/dist/common/poly-init.d.ts +51 -0
- package/dist/common/poly-init.d.ts.map +1 -0
- package/dist/common/poly-inside.d.ts +37 -0
- package/dist/common/poly-inside.d.ts.map +1 -0
- package/dist/common/poly-shapes-cases.d.ts +31 -0
- package/dist/common/poly-shapes-cases.d.ts.map +1 -0
- package/dist/common/poly-shapes-cases2.d.ts +25 -0
- package/dist/common/poly-shapes-cases2.d.ts.map +1 -0
- package/dist/common/poly-shapes-util.d.ts +42 -0
- package/dist/common/poly-shapes-util.d.ts.map +1 -0
- package/dist/common/poly-shapes.d.ts +39 -0
- package/dist/common/poly-shapes.d.ts.map +1 -0
- package/dist/common/poly-sizing.d.ts +189 -0
- package/dist/common/poly-sizing.d.ts.map +1 -0
- package/dist/common/poly-vertices.d.ts +42 -0
- package/dist/common/poly-vertices.d.ts.map +1 -0
- package/dist/common/postproc.d.ts +49 -0
- package/dist/common/postproc.d.ts.map +1 -0
- package/dist/common/ps-fontalias.d.ts +36 -0
- package/dist/common/ps-fontalias.d.ts.map +1 -0
- package/dist/common/random.d.ts +8 -0
- package/dist/common/random.d.ts.map +1 -0
- package/dist/common/record-port.d.ts +34 -0
- package/dist/common/record-port.d.ts.map +1 -0
- package/dist/common/record.d.ts +105 -0
- package/dist/common/record.d.ts.map +1 -0
- package/dist/common/shapeData.d.ts +186 -0
- package/dist/common/shapeData.d.ts.map +1 -0
- package/dist/common/shapes.d.ts +36 -0
- package/dist/common/shapes.d.ts.map +1 -0
- package/dist/common/spline-midpoint.d.ts +31 -0
- package/dist/common/spline-midpoint.d.ts.map +1 -0
- package/dist/common/splines-clip.d.ts +21 -0
- package/dist/common/splines-clip.d.ts.map +1 -0
- package/dist/common/splines-constants.d.ts +42 -0
- package/dist/common/splines-constants.d.ts.map +1 -0
- package/dist/common/splines-geom.d.ts +51 -0
- package/dist/common/splines-geom.d.ts.map +1 -0
- package/dist/common/splines-path-begin.d.ts +17 -0
- package/dist/common/splines-path-begin.d.ts.map +1 -0
- package/dist/common/splines-path-end.d.ts +17 -0
- package/dist/common/splines-path-end.d.ts.map +1 -0
- package/dist/common/splines-path-shared.d.ts +53 -0
- package/dist/common/splines-path-shared.d.ts.map +1 -0
- package/dist/common/splines-routespl.d.ts +40 -0
- package/dist/common/splines-routespl.d.ts.map +1 -0
- package/dist/common/splines-selfedge.d.ts +21 -0
- package/dist/common/splines-selfedge.d.ts.map +1 -0
- package/dist/common/splines.d.ts +18 -0
- package/dist/common/splines.d.ts.map +1 -0
- package/dist/common/style-resolve.d.ts +197 -0
- package/dist/common/style-resolve.d.ts.map +1 -0
- package/dist/common/subst.d.ts +31 -0
- package/dist/common/subst.d.ts.map +1 -0
- package/dist/common/taper.d.ts +23 -0
- package/dist/common/taper.d.ts.map +1 -0
- package/dist/common/textmeasure-factory.d.ts +33 -0
- package/dist/common/textmeasure-factory.d.ts.map +1 -0
- package/dist/common/textmeasure-lookup.d.ts +17 -0
- package/dist/common/textmeasure-lookup.d.ts.map +1 -0
- package/dist/common/textmeasure-lut-data-a.d.ts +13 -0
- package/dist/common/textmeasure-lut-data-a.d.ts.map +1 -0
- package/dist/common/textmeasure-lut-data-b.d.ts +12 -0
- package/dist/common/textmeasure-lut-data-b.d.ts.map +1 -0
- package/dist/common/textmeasure-lut-data-c.d.ts +13 -0
- package/dist/common/textmeasure-lut-data-c.d.ts.map +1 -0
- package/dist/common/textmeasure-lut-data.d.ts +27 -0
- package/dist/common/textmeasure-lut-data.d.ts.map +1 -0
- package/dist/common/textmeasure.d.ts +120 -0
- package/dist/common/textmeasure.d.ts.map +1 -0
- package/dist/common/types.d.ts +316 -0
- package/dist/common/types.d.ts.map +1 -0
- package/dist/common/xlabels-place.d.ts +125 -0
- package/dist/common/xlabels-place.d.ts.map +1 -0
- package/dist/debug.d.ts +58 -0
- package/dist/debug.d.ts.map +1 -0
- package/dist/errors.d.ts +63 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/gvc/anchor.d.ts +86 -0
- package/dist/gvc/anchor.d.ts.map +1 -0
- package/dist/gvc/context.d.ts +177 -0
- package/dist/gvc/context.d.ts.map +1 -0
- package/dist/gvc/default-context.d.ts +20 -0
- package/dist/gvc/default-context.d.ts.map +1 -0
- package/dist/gvc/device-cluster.d.ts +25 -0
- package/dist/gvc/device-cluster.d.ts.map +1 -0
- package/dist/gvc/device.d.ts +99 -0
- package/dist/gvc/device.d.ts.map +1 -0
- package/dist/gvc/edge-labels.d.ts +10 -0
- package/dist/gvc/edge-labels.d.ts.map +1 -0
- package/dist/gvc/emit-walk.d.ts +22 -0
- package/dist/gvc/emit-walk.d.ts.map +1 -0
- package/dist/gvc/image-resolver.d.ts +44 -0
- package/dist/gvc/image-resolver.d.ts.map +1 -0
- package/dist/gvc/job.d.ts +234 -0
- package/dist/gvc/job.d.ts.map +1 -0
- package/dist/gvc/textlayout.d.ts +33 -0
- package/dist/gvc/textlayout.d.ts.map +1 -0
- package/dist/gvc/textspan-emit.d.ts +41 -0
- package/dist/gvc/textspan-emit.d.ts.map +1 -0
- package/dist/gvc/usershape.d.ts +25 -0
- package/dist/gvc/usershape.d.ts.map +1 -0
- package/dist/gvc/viewport.d.ts +71 -0
- package/dist/gvc/viewport.d.ts.map +1 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +52862 -0
- package/dist/index.js.map +7 -0
- package/dist/label/index.d.ts +74 -0
- package/dist/label/index.d.ts.map +1 -0
- package/dist/label/node.d.ts +108 -0
- package/dist/label/node.d.ts.map +1 -0
- package/dist/label/rectangle.d.ts +60 -0
- package/dist/label/rectangle.d.ts.map +1 -0
- package/dist/label/split-q.d.ts +13 -0
- package/dist/label/split-q.d.ts.map +1 -0
- package/dist/label/xlabels-geom.d.ts +46 -0
- package/dist/label/xlabels-geom.d.ts.map +1 -0
- package/dist/label/xlabels-intersect.d.ts +79 -0
- package/dist/label/xlabels-intersect.d.ts.map +1 -0
- package/dist/label/xlabels.d.ts +67 -0
- package/dist/label/xlabels.d.ts.map +1 -0
- package/dist/layout/circo/blockpath.d.ts +120 -0
- package/dist/layout/circo/blockpath.d.ts.map +1 -0
- package/dist/layout/circo/blocks.d.ts +135 -0
- package/dist/layout/circo/blocks.d.ts.map +1 -0
- package/dist/layout/circo/blocktree.d.ts +51 -0
- package/dist/layout/circo/blocktree.d.ts.map +1 -0
- package/dist/layout/circo/circular.d.ts +59 -0
- package/dist/layout/circo/circular.d.ts.map +1 -0
- package/dist/layout/circo/index.d.ts +35 -0
- package/dist/layout/circo/index.d.ts.map +1 -0
- package/dist/layout/circo/init.d.ts +50 -0
- package/dist/layout/circo/init.d.ts.map +1 -0
- package/dist/layout/circo/position-helpers.d.ts +33 -0
- package/dist/layout/circo/position-helpers.d.ts.map +1 -0
- package/dist/layout/circo/position.d.ts +66 -0
- package/dist/layout/circo/position.d.ts.map +1 -0
- package/dist/layout/dot/acyclic.d.ts +8 -0
- package/dist/layout/dot/acyclic.d.ts.map +1 -0
- package/dist/layout/dot/aspect.d.ts +17 -0
- package/dist/layout/dot/aspect.d.ts.map +1 -0
- package/dist/layout/dot/classify.d.ts +52 -0
- package/dist/layout/dot/classify.d.ts.map +1 -0
- package/dist/layout/dot/cluster-path.d.ts +38 -0
- package/dist/layout/dot/cluster-path.d.ts.map +1 -0
- package/dist/layout/dot/cluster.d.ts +102 -0
- package/dist/layout/dot/cluster.d.ts.map +1 -0
- package/dist/layout/dot/compound-clip.d.ts +69 -0
- package/dist/layout/dot/compound-clip.d.ts.map +1 -0
- package/dist/layout/dot/compound-geom.d.ts +115 -0
- package/dist/layout/dot/compound-geom.d.ts.map +1 -0
- package/dist/layout/dot/compound.d.ts +56 -0
- package/dist/layout/dot/compound.d.ts.map +1 -0
- package/dist/layout/dot/conc.d.ts +88 -0
- package/dist/layout/dot/conc.d.ts.map +1 -0
- package/dist/layout/dot/decomp.d.ts +66 -0
- package/dist/layout/dot/decomp.d.ts.map +1 -0
- package/dist/layout/dot/edge-order.d.ts +27 -0
- package/dist/layout/dot/edge-order.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-arrow.d.ts +46 -0
- package/dist/layout/dot/edge-route-arrow.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-boxes.d.ts +75 -0
- package/dist/layout/dot/edge-route-boxes.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-chain.d.ts +67 -0
- package/dist/layout/dot/edge-route-chain.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-clip.d.ts +88 -0
- package/dist/layout/dot/edge-route-clip.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-faithful.d.ts +94 -0
- package/dist/layout/dot/edge-route-faithful.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-geom.d.ts +43 -0
- package/dist/layout/dot/edge-route-geom.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-helpers.d.ts +50 -0
- package/dist/layout/dot/edge-route-helpers.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-poly.d.ts +48 -0
- package/dist/layout/dot/edge-route-poly.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-rank.d.ts +57 -0
- package/dist/layout/dot/edge-route-rank.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-routing.d.ts +99 -0
- package/dist/layout/dot/edge-route-routing.d.ts.map +1 -0
- package/dist/layout/dot/edge-route.d.ts +57 -0
- package/dist/layout/dot/edge-route.d.ts.map +1 -0
- package/dist/layout/dot/fastgr.d.ts +147 -0
- package/dist/layout/dot/fastgr.d.ts.map +1 -0
- package/dist/layout/dot/flat-utils.d.ts +21 -0
- package/dist/layout/dot/flat-utils.d.ts.map +1 -0
- package/dist/layout/dot/flat.d.ts +152 -0
- package/dist/layout/dot/flat.d.ts.map +1 -0
- package/dist/layout/dot/graph-label.d.ts +18 -0
- package/dist/layout/dot/graph-label.d.ts.map +1 -0
- package/dist/layout/dot/index.d.ts +128 -0
- package/dist/layout/dot/index.d.ts.map +1 -0
- package/dist/layout/dot/init.d.ts +93 -0
- package/dist/layout/dot/init.d.ts.map +1 -0
- package/dist/layout/dot/label-order.d.ts +45 -0
- package/dist/layout/dot/label-order.d.ts.map +1 -0
- package/dist/layout/dot/mincross-build.d.ts +52 -0
- package/dist/layout/dot/mincross-build.d.ts.map +1 -0
- package/dist/layout/dot/mincross-cross.d.ts +80 -0
- package/dist/layout/dot/mincross-cross.d.ts.map +1 -0
- package/dist/layout/dot/mincross-flat.d.ts +27 -0
- package/dist/layout/dot/mincross-flat.d.ts.map +1 -0
- package/dist/layout/dot/mincross-order.d.ts +89 -0
- package/dist/layout/dot/mincross-order.d.ts.map +1 -0
- package/dist/layout/dot/mincross-utils.d.ts +60 -0
- package/dist/layout/dot/mincross-utils.d.ts.map +1 -0
- package/dist/layout/dot/mincross.d.ts +75 -0
- package/dist/layout/dot/mincross.d.ts.map +1 -0
- package/dist/layout/dot/ns-core.d.ts +37 -0
- package/dist/layout/dot/ns-core.d.ts.map +1 -0
- package/dist/layout/dot/ns-range.d.ts +17 -0
- package/dist/layout/dot/ns-range.d.ts.map +1 -0
- package/dist/layout/dot/ns-subtree.d.ts +78 -0
- package/dist/layout/dot/ns-subtree.d.ts.map +1 -0
- package/dist/layout/dot/ns.d.ts +86 -0
- package/dist/layout/dot/ns.d.ts.map +1 -0
- package/dist/layout/dot/ortho-adapter.d.ts +19 -0
- package/dist/layout/dot/ortho-adapter.d.ts.map +1 -0
- package/dist/layout/dot/pack-components.d.ts +100 -0
- package/dist/layout/dot/pack-components.d.ts.map +1 -0
- package/dist/layout/dot/position-aux.d.ts +110 -0
- package/dist/layout/dot/position-aux.d.ts.map +1 -0
- package/dist/layout/dot/position-bbox.d.ts +57 -0
- package/dist/layout/dot/position-bbox.d.ts.map +1 -0
- package/dist/layout/dot/position-cluster.d.ts +48 -0
- package/dist/layout/dot/position-cluster.d.ts.map +1 -0
- package/dist/layout/dot/position-ycoords.d.ts +42 -0
- package/dist/layout/dot/position-ycoords.d.ts.map +1 -0
- package/dist/layout/dot/position.d.ts +47 -0
- package/dist/layout/dot/position.d.ts.map +1 -0
- package/dist/layout/dot/rank-dot2.d.ts +114 -0
- package/dist/layout/dot/rank-dot2.d.ts.map +1 -0
- package/dist/layout/dot/rank.d.ts +119 -0
- package/dist/layout/dot/rank.d.ts.map +1 -0
- package/dist/layout/dot/sameport.d.ts +70 -0
- package/dist/layout/dot/sameport.d.ts.map +1 -0
- package/dist/layout/dot/self-loop.d.ts +54 -0
- package/dist/layout/dot/self-loop.d.ts.map +1 -0
- package/dist/layout/dot/splines-clone.d.ts +33 -0
- package/dist/layout/dot/splines-clone.d.ts.map +1 -0
- package/dist/layout/dot/splines-flat-labeled.d.ts +101 -0
- package/dist/layout/dot/splines-flat-labeled.d.ts.map +1 -0
- package/dist/layout/dot/splines-flat-multi.d.ts +35 -0
- package/dist/layout/dot/splines-flat-multi.d.ts.map +1 -0
- package/dist/layout/dot/splines-flat.d.ts +116 -0
- package/dist/layout/dot/splines-flat.d.ts.map +1 -0
- package/dist/layout/dot/splines-groups.d.ts +38 -0
- package/dist/layout/dot/splines-groups.d.ts.map +1 -0
- package/dist/layout/dot/splines-label.d.ts +105 -0
- package/dist/layout/dot/splines-label.d.ts.map +1 -0
- package/dist/layout/dot/splines-route-type.d.ts +28 -0
- package/dist/layout/dot/splines-route-type.d.ts.map +1 -0
- package/dist/layout/dot/splines-route.d.ts +99 -0
- package/dist/layout/dot/splines-route.d.ts.map +1 -0
- package/dist/layout/dot/splines.d.ts +157 -0
- package/dist/layout/dot/splines.d.ts.map +1 -0
- package/dist/layout/dot/straight-edges.d.ts +39 -0
- package/dist/layout/dot/straight-edges.d.ts.map +1 -0
- package/dist/layout/fdp/cluster-edges.d.ts +31 -0
- package/dist/layout/fdp/cluster-edges.d.ts.map +1 -0
- package/dist/layout/fdp/comp.d.ts +29 -0
- package/dist/layout/fdp/comp.d.ts.map +1 -0
- package/dist/layout/fdp/derive.d.ts +39 -0
- package/dist/layout/fdp/derive.d.ts.map +1 -0
- package/dist/layout/fdp/fdp-model.d.ts +101 -0
- package/dist/layout/fdp/fdp-model.d.ts.map +1 -0
- package/dist/layout/fdp/grid.d.ts +49 -0
- package/dist/layout/fdp/grid.d.ts.map +1 -0
- package/dist/layout/fdp/index.d.ts +36 -0
- package/dist/layout/fdp/index.d.ts.map +1 -0
- package/dist/layout/fdp/init.d.ts +26 -0
- package/dist/layout/fdp/init.d.ts.map +1 -0
- package/dist/layout/fdp/layout.d.ts +57 -0
- package/dist/layout/fdp/layout.d.ts.map +1 -0
- package/dist/layout/fdp/normalize.d.ts +18 -0
- package/dist/layout/fdp/normalize.d.ts.map +1 -0
- package/dist/layout/fdp/ports.d.ts +41 -0
- package/dist/layout/fdp/ports.d.ts.map +1 -0
- package/dist/layout/fdp/tlayout-init.d.ts +21 -0
- package/dist/layout/fdp/tlayout-init.d.ts.map +1 -0
- package/dist/layout/fdp/tlayout-parms.d.ts +98 -0
- package/dist/layout/fdp/tlayout-parms.d.ts.map +1 -0
- package/dist/layout/fdp/tlayout.d.ts +43 -0
- package/dist/layout/fdp/tlayout.d.ts.map +1 -0
- package/dist/layout/fdp/xlayout.d.ts +26 -0
- package/dist/layout/fdp/xlayout.d.ts.map +1 -0
- package/dist/layout/neato/bfs.d.ts +43 -0
- package/dist/layout/neato/bfs.d.ts.map +1 -0
- package/dist/layout/neato/cdt-surface.d.ts +16 -0
- package/dist/layout/neato/cdt-surface.d.ts.map +1 -0
- package/dist/layout/neato/conjgrad.d.ts +61 -0
- package/dist/layout/neato/conjgrad.d.ts.map +1 -0
- package/dist/layout/neato/delaunay.d.ts +28 -0
- package/dist/layout/neato/delaunay.d.ts.map +1 -0
- package/dist/layout/neato/dijkstra.d.ts +80 -0
- package/dist/layout/neato/dijkstra.d.ts.map +1 -0
- package/dist/layout/neato/fdp-adjust.d.ts +31 -0
- package/dist/layout/neato/fdp-adjust.d.ts.map +1 -0
- package/dist/layout/neato/index.d.ts +58 -0
- package/dist/layout/neato/index.d.ts.map +1 -0
- package/dist/layout/neato/init.d.ts +207 -0
- package/dist/layout/neato/init.d.ts.map +1 -0
- package/dist/layout/neato/legal.d.ts +7 -0
- package/dist/layout/neato/legal.d.ts.map +1 -0
- package/dist/layout/neato/matrix-ops.d.ts +28 -0
- package/dist/layout/neato/matrix-ops.d.ts.map +1 -0
- package/dist/layout/neato/multispline-router.d.ts +80 -0
- package/dist/layout/neato/multispline-router.d.ts.map +1 -0
- package/dist/layout/neato/multispline.d.ts +24 -0
- package/dist/layout/neato/multispline.d.ts.map +1 -0
- package/dist/layout/neato/overlap-prism.d.ts +26 -0
- package/dist/layout/neato/overlap-prism.d.ts.map +1 -0
- package/dist/layout/neato/overlap.d.ts +85 -0
- package/dist/layout/neato/overlap.d.ts.map +1 -0
- package/dist/layout/neato/sc-adjust.d.ts +33 -0
- package/dist/layout/neato/sc-adjust.d.ts.map +1 -0
- package/dist/layout/neato/sep-factor.d.ts +41 -0
- package/dist/layout/neato/sep-factor.d.ts.map +1 -0
- package/dist/layout/neato/set-aspect.d.ts +33 -0
- package/dist/layout/neato/set-aspect.d.ts.map +1 -0
- package/dist/layout/neato/sgd.d.ts +166 -0
- package/dist/layout/neato/sgd.d.ts.map +1 -0
- package/dist/layout/neato/splines.d.ts +153 -0
- package/dist/layout/neato/splines.d.ts.map +1 -0
- package/dist/layout/neato/stress-kernel.d.ts +53 -0
- package/dist/layout/neato/stress-kernel.d.ts.map +1 -0
- package/dist/layout/neato/stress.d.ts +158 -0
- package/dist/layout/neato/stress.d.ts.map +1 -0
- package/dist/layout/osage/index.d.ts +158 -0
- package/dist/layout/osage/index.d.ts.map +1 -0
- package/dist/layout/osage/layout.d.ts +49 -0
- package/dist/layout/osage/layout.d.ts.map +1 -0
- package/dist/layout/osage/types.d.ts +28 -0
- package/dist/layout/osage/types.d.ts.map +1 -0
- package/dist/layout/pack/array-pack.d.ts +114 -0
- package/dist/layout/pack/array-pack.d.ts.map +1 -0
- package/dist/layout/pack/index.d.ts +157 -0
- package/dist/layout/pack/index.d.ts.map +1 -0
- package/dist/layout/pack/poly-pack.d.ts +126 -0
- package/dist/layout/pack/poly-pack.d.ts.map +1 -0
- package/dist/layout/pack/poly-place.d.ts +27 -0
- package/dist/layout/pack/poly-place.d.ts.map +1 -0
- package/dist/layout/pack/spiral-search.d.ts +18 -0
- package/dist/layout/pack/spiral-search.d.ts.map +1 -0
- package/dist/layout/pack/test-helpers.d.ts +7 -0
- package/dist/layout/pack/test-helpers.d.ts.map +1 -0
- package/dist/layout/pack/types.d.ts +74 -0
- package/dist/layout/pack/types.d.ts.map +1 -0
- package/dist/layout/patchwork/index.d.ts +136 -0
- package/dist/layout/patchwork/index.d.ts.map +1 -0
- package/dist/layout/patchwork/tree-map.d.ts +32 -0
- package/dist/layout/patchwork/tree-map.d.ts.map +1 -0
- package/dist/layout/patchwork/tree-node.d.ts +46 -0
- package/dist/layout/patchwork/tree-node.d.ts.map +1 -0
- package/dist/layout/sfdp/index.d.ts +39 -0
- package/dist/layout/sfdp/index.d.ts.map +1 -0
- package/dist/layout/sfdp/init.d.ts +61 -0
- package/dist/layout/sfdp/init.d.ts.map +1 -0
- package/dist/layout/sfdp/multilevel.d.ts +23 -0
- package/dist/layout/sfdp/multilevel.d.ts.map +1 -0
- package/dist/layout/sfdp/quadtree.d.ts +45 -0
- package/dist/layout/sfdp/quadtree.d.ts.map +1 -0
- package/dist/layout/sfdp/sparse-matrix-multiply.d.ts +34 -0
- package/dist/layout/sfdp/sparse-matrix-multiply.d.ts.map +1 -0
- package/dist/layout/sfdp/sparse-matrix.d.ts +101 -0
- package/dist/layout/sfdp/sparse-matrix.d.ts.map +1 -0
- package/dist/layout/sfdp/sparse-solve.d.ts +14 -0
- package/dist/layout/sfdp/sparse-solve.d.ts.map +1 -0
- package/dist/layout/sfdp/spring-driver.d.ts +18 -0
- package/dist/layout/sfdp/spring-driver.d.ts.map +1 -0
- package/dist/layout/sfdp/spring-electrical.d.ts +61 -0
- package/dist/layout/sfdp/spring-electrical.d.ts.map +1 -0
- package/dist/layout/twopi/circle.d.ts +83 -0
- package/dist/layout/twopi/circle.d.ts.map +1 -0
- package/dist/layout/twopi/index.d.ts +24 -0
- package/dist/layout/twopi/index.d.ts.map +1 -0
- package/dist/layout/twopi/init.d.ts +85 -0
- package/dist/layout/twopi/init.d.ts.map +1 -0
- package/dist/layout/twopi/pipeline.d.ts +37 -0
- package/dist/layout/twopi/pipeline.d.ts.map +1 -0
- package/dist/layout/twopi/twopi-test-helpers.d.ts +12 -0
- package/dist/layout/twopi/twopi-test-helpers.d.ts.map +1 -0
- package/dist/model/algData.d.ts +175 -0
- package/dist/model/algData.d.ts.map +1 -0
- package/dist/model/cgraph-ops.d.ts +86 -0
- package/dist/model/cgraph-ops.d.ts.map +1 -0
- package/dist/model/edge.d.ts +80 -0
- package/dist/model/edge.d.ts.map +1 -0
- package/dist/model/edgeInfo.d.ts +299 -0
- package/dist/model/edgeInfo.d.ts.map +1 -0
- package/dist/model/geom.d.ts +149 -0
- package/dist/model/geom.d.ts.map +1 -0
- package/dist/model/graph.d.ts +135 -0
- package/dist/model/graph.d.ts.map +1 -0
- package/dist/model/graphInfo.d.ts +418 -0
- package/dist/model/graphInfo.d.ts.map +1 -0
- package/dist/model/index.d.ts +10 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model/layoutParams.d.ts +85 -0
- package/dist/model/layoutParams.d.ts.map +1 -0
- package/dist/model/node.d.ts +101 -0
- package/dist/model/node.d.ts.map +1 -0
- package/dist/model/nodeInfo.d.ts +278 -0
- package/dist/model/nodeInfo.d.ts.map +1 -0
- package/dist/model/rankEntry.d.ts +80 -0
- package/dist/model/rankEntry.d.ts.map +1 -0
- package/dist/ortho/chan-dict.d.ts +82 -0
- package/dist/ortho/chan-dict.d.ts.map +1 -0
- package/dist/ortho/fpq.d.ts +54 -0
- package/dist/ortho/fpq.d.ts.map +1 -0
- package/dist/ortho/index.d.ts +35 -0
- package/dist/ortho/index.d.ts.map +1 -0
- package/dist/ortho/maze-channels.d.ts +47 -0
- package/dist/ortho/maze-channels.d.ts.map +1 -0
- package/dist/ortho/maze.d.ts +27 -0
- package/dist/ortho/maze.d.ts.map +1 -0
- package/dist/ortho/ortho-parallel.d.ts +26 -0
- package/dist/ortho/ortho-parallel.d.ts.map +1 -0
- package/dist/ortho/ortho-route.d.ts +31 -0
- package/dist/ortho/ortho-route.d.ts.map +1 -0
- package/dist/ortho/partition.d.ts +34 -0
- package/dist/ortho/partition.d.ts.map +1 -0
- package/dist/ortho/rawgraph.d.ts +41 -0
- package/dist/ortho/rawgraph.d.ts.map +1 -0
- package/dist/ortho/sgraph.d.ts +74 -0
- package/dist/ortho/sgraph.d.ts.map +1 -0
- package/dist/ortho/trap-query.d.ts +32 -0
- package/dist/ortho/trap-query.d.ts.map +1 -0
- package/dist/ortho/trap-segment.d.ts +23 -0
- package/dist/ortho/trap-segment.d.ts.map +1 -0
- package/dist/ortho/trap-types.d.ts +91 -0
- package/dist/ortho/trap-types.d.ts.map +1 -0
- package/dist/ortho/trap-update.d.ts +12 -0
- package/dist/ortho/trap-update.d.ts.map +1 -0
- package/dist/ortho/trapezoid.d.ts +18 -0
- package/dist/ortho/trapezoid.d.ts.map +1 -0
- package/dist/ortho/types.d.ts +241 -0
- package/dist/ortho/types.d.ts.map +1 -0
- package/dist/parser/ast.d.ts +49 -0
- package/dist/parser/ast.d.ts.map +1 -0
- package/dist/parser/builder.d.ts +75 -0
- package/dist/parser/builder.d.ts.map +1 -0
- package/dist/parser/index.d.ts +97 -0
- package/dist/parser/index.d.ts.map +1 -0
- package/dist/pathplan/index.d.ts +8 -0
- package/dist/pathplan/index.d.ts.map +1 -0
- package/dist/pathplan/route.d.ts +9 -0
- package/dist/pathplan/route.d.ts.map +1 -0
- package/dist/pathplan/shortest.d.ts +5 -0
- package/dist/pathplan/shortest.d.ts.map +1 -0
- package/dist/pathplan/solvers.d.ts +5 -0
- package/dist/pathplan/solvers.d.ts.map +1 -0
- package/dist/pathplan/triang.d.ts +25 -0
- package/dist/pathplan/triang.d.ts.map +1 -0
- package/dist/pathplan/types.d.ts +22 -0
- package/dist/pathplan/types.d.ts.map +1 -0
- package/dist/pathplan/visibility.d.ts +13 -0
- package/dist/pathplan/visibility.d.ts.map +1 -0
- package/dist/pathplan/vispath.d.ts +9 -0
- package/dist/pathplan/vispath.d.ts.map +1 -0
- package/dist/rbtree/index.d.ts +127 -0
- package/dist/rbtree/index.d.ts.map +1 -0
- package/dist/render/color-resolve.d.ts +38 -0
- package/dist/render/color-resolve.d.ts.map +1 -0
- package/dist/render/dot.d.ts +379 -0
- package/dist/render/dot.d.ts.map +1 -0
- package/dist/render/index.d.ts +24 -0
- package/dist/render/index.d.ts.map +1 -0
- package/dist/render/json.d.ts +89 -0
- package/dist/render/json.d.ts.map +1 -0
- package/dist/render/map-test-helpers.d.ts +13 -0
- package/dist/render/map-test-helpers.d.ts.map +1 -0
- package/dist/render/map.d.ts +197 -0
- package/dist/render/map.d.ts.map +1 -0
- package/dist/render/public.d.ts +64 -0
- package/dist/render/public.d.ts.map +1 -0
- package/dist/render/svg-arrow-ops.d.ts +10 -0
- package/dist/render/svg-arrow-ops.d.ts.map +1 -0
- package/dist/render/svg-cluster.d.ts +9 -0
- package/dist/render/svg-cluster.d.ts.map +1 -0
- package/dist/render/svg-edge-ortho-radius.d.ts +31 -0
- package/dist/render/svg-edge-ortho-radius.d.ts.map +1 -0
- package/dist/render/svg-edge-split.d.ts +48 -0
- package/dist/render/svg-edge-split.d.ts.map +1 -0
- package/dist/render/svg-gradient.d.ts +46 -0
- package/dist/render/svg-gradient.d.ts.map +1 -0
- package/dist/render/svg-graph.d.ts +97 -0
- package/dist/render/svg-graph.d.ts.map +1 -0
- package/dist/render/svg-helpers.d.ts +122 -0
- package/dist/render/svg-helpers.d.ts.map +1 -0
- package/dist/render/svg-id.d.ts +28 -0
- package/dist/render/svg-id.d.ts.map +1 -0
- package/dist/render/svg-multicolor.d.ts +60 -0
- package/dist/render/svg-multicolor.d.ts.map +1 -0
- package/dist/render/svg-parallel-edge.d.ts +28 -0
- package/dist/render/svg-parallel-edge.d.ts.map +1 -0
- package/dist/render/svg-tapered-edge.d.ts +18 -0
- package/dist/render/svg-tapered-edge.d.ts.map +1 -0
- package/dist/render/svg.d.ts +104 -0
- package/dist/render/svg.d.ts.map +1 -0
- package/dist/render/xdot-public.d.ts +95 -0
- package/dist/render/xdot-public.d.ts.map +1 -0
- package/dist/render/xml-escape.d.ts +21 -0
- package/dist/render/xml-escape.d.ts.map +1 -0
- package/dist/render.js +52556 -0
- package/dist/render.js.map +7 -0
- package/dist/util/agxbuf.d.ts +72 -0
- package/dist/util/agxbuf.d.ts.map +1 -0
- package/dist/util/bsd-qsort.d.ts +22 -0
- package/dist/util/bsd-qsort.d.ts.map +1 -0
- package/dist/util/index.d.ts +11 -0
- package/dist/util/index.d.ts.map +1 -0
- package/dist/util/list.d.ts +47 -0
- package/dist/util/list.d.ts.map +1 -0
- package/dist/util/math.d.ts +54 -0
- package/dist/util/math.d.ts.map +1 -0
- package/dist/util/mt19937.d.ts +40 -0
- package/dist/util/mt19937.d.ts.map +1 -0
- package/dist/util/printf-round.d.ts +45 -0
- package/dist/util/printf-round.d.ts.map +1 -0
- package/dist/util/xml.d.ts +24 -0
- package/dist/util/xml.d.ts.map +1 -0
- package/dist/vpsc/Block.d.ts +116 -0
- package/dist/vpsc/Block.d.ts.map +1 -0
- package/dist/vpsc/Blocks.d.ts +66 -0
- package/dist/vpsc/Blocks.d.ts.map +1 -0
- package/dist/vpsc/Constraint.d.ts +51 -0
- package/dist/vpsc/Constraint.d.ts.map +1 -0
- package/dist/vpsc/HeapUtils.d.ts +37 -0
- package/dist/vpsc/HeapUtils.d.ts.map +1 -0
- package/dist/vpsc/Solver.d.ts +107 -0
- package/dist/vpsc/Solver.d.ts.map +1 -0
- package/dist/vpsc/SweepLine.d.ts +38 -0
- package/dist/vpsc/SweepLine.d.ts.map +1 -0
- package/dist/vpsc/Variable.d.ts +38 -0
- package/dist/vpsc/Variable.d.ts.map +1 -0
- package/dist/vpsc/index.d.ts +54 -0
- package/dist/vpsc/index.d.ts.map +1 -0
- package/dist/vpsc/sweepTypes.d.ts +29 -0
- package/dist/vpsc/sweepTypes.d.ts.map +1 -0
- package/dist/xdot/index.d.ts +6 -0
- package/dist/xdot/index.d.ts.map +1 -0
- package/dist/xdot/lex.d.ts +22 -0
- package/dist/xdot/lex.d.ts.map +1 -0
- package/dist/xdot/misc.d.ts +13 -0
- package/dist/xdot/misc.d.ts.map +1 -0
- package/dist/xdot/parse.d.ts +21 -0
- package/dist/xdot/parse.d.ts.map +1 -0
- package/dist/xdot/types.d.ts +152 -0
- package/dist/xdot/types.d.ts.map +1 -0
- package/package.json +113 -0
- package/src/api/builder.ts +277 -0
- package/src/api/edge-ops.ts +113 -0
- package/src/api/geometry.ts +307 -0
- package/src/api/index.ts +46 -0
- package/src/cdt/bag.ts +196 -0
- package/src/cdt/hash-core.ts +84 -0
- package/src/cdt/hash.ts +207 -0
- package/src/cdt/index.ts +17 -0
- package/src/cdt/splay-core.ts +301 -0
- package/src/cdt/splay.ts +191 -0
- package/src/cdt/strhash.ts +52 -0
- package/src/cdt/types.ts +13 -0
- package/src/common/arith.ts +39 -0
- package/src/common/arm-pow-data.ts +201 -0
- package/src/common/arm-pow.ts +296 -0
- package/src/common/arrows-constants.ts +175 -0
- package/src/common/arrows-geometry.ts +62 -0
- package/src/common/arrows-miter.ts +84 -0
- package/src/common/arrows-shapes-poly.ts +241 -0
- package/src/common/arrows-shapes-util.ts +162 -0
- package/src/common/arrows-shapes.ts +360 -0
- package/src/common/arrows-types.ts +59 -0
- package/src/common/arrows.ts +209 -0
- package/src/common/color.ts +340 -0
- package/src/common/colorData.ts +264 -0
- package/src/common/compass-port.ts +384 -0
- package/src/common/crand.ts +79 -0
- package/src/common/edge-label-init.ts +310 -0
- package/src/common/edge-offset.ts +140 -0
- package/src/common/ellipse-wedge.ts +189 -0
- package/src/common/emit-types.ts +332 -0
- package/src/common/fma.ts +52 -0
- package/src/common/graph-init.ts +359 -0
- package/src/common/html-entities.ts +299 -0
- package/src/common/html-string.ts +22 -0
- package/src/common/htmltable-emit-fill.ts +367 -0
- package/src/common/htmltable-emit-rules.ts +293 -0
- package/src/common/htmltable-emit.ts +345 -0
- package/src/common/htmltable-lex.ts +138 -0
- package/src/common/htmltable-parse.ts +539 -0
- package/src/common/htmltable-port.ts +32 -0
- package/src/common/htmltable-pos-runs.ts +313 -0
- package/src/common/htmltable-pos.ts +601 -0
- package/src/common/htmltable-types.ts +262 -0
- package/src/common/htmltable.ts +477 -0
- package/src/common/layers.ts +113 -0
- package/src/common/make-label.ts +192 -0
- package/src/common/multicolor.ts +167 -0
- package/src/common/nodeinit.ts +339 -0
- package/src/common/poly-gencode.ts +475 -0
- package/src/common/poly-init.ts +133 -0
- package/src/common/poly-inside.ts +202 -0
- package/src/common/poly-shapes-cases.ts +253 -0
- package/src/common/poly-shapes-cases2.ts +170 -0
- package/src/common/poly-shapes-util.ts +124 -0
- package/src/common/poly-shapes.ts +181 -0
- package/src/common/poly-sizing.ts +639 -0
- package/src/common/poly-vertices.ts +237 -0
- package/src/common/postproc.ts +436 -0
- package/src/common/ps-fontalias.ts +112 -0
- package/src/common/random.ts +37 -0
- package/src/common/record-port.ts +89 -0
- package/src/common/record.ts +523 -0
- package/src/common/shapeData.ts +502 -0
- package/src/common/shapes.ts +187 -0
- package/src/common/spline-midpoint.ts +105 -0
- package/src/common/splines-clip.ts +449 -0
- package/src/common/splines-constants.ts +53 -0
- package/src/common/splines-geom.ts +194 -0
- package/src/common/splines-path-begin.ts +243 -0
- package/src/common/splines-path-end.ts +231 -0
- package/src/common/splines-path-shared.ts +258 -0
- package/src/common/splines-routespl.ts +444 -0
- package/src/common/splines-selfedge.ts +403 -0
- package/src/common/splines.ts +33 -0
- package/src/common/style-resolve.ts +481 -0
- package/src/common/subst.ts +126 -0
- package/src/common/taper.ts +219 -0
- package/src/common/textmeasure-factory.ts +86 -0
- package/src/common/textmeasure-lookup.ts +50 -0
- package/src/common/textmeasure-lut-data-a.ts +182 -0
- package/src/common/textmeasure-lut-data-b.ts +140 -0
- package/src/common/textmeasure-lut-data-c.ts +221 -0
- package/src/common/textmeasure-lut-data.ts +78 -0
- package/src/common/textmeasure.ts +321 -0
- package/src/common/types.ts +425 -0
- package/src/common/xlabels-place.ts +475 -0
- package/src/debug.ts +38 -0
- package/src/errors.ts +95 -0
- package/src/gvc/anchor.ts +530 -0
- package/src/gvc/context.ts +260 -0
- package/src/gvc/default-context.ts +70 -0
- package/src/gvc/device-cluster.ts +114 -0
- package/src/gvc/device.ts +598 -0
- package/src/gvc/edge-labels.ts +116 -0
- package/src/gvc/emit-walk.ts +98 -0
- package/src/gvc/image-resolver.ts +137 -0
- package/src/gvc/job.ts +401 -0
- package/src/gvc/textlayout.ts +44 -0
- package/src/gvc/textspan-emit.ts +100 -0
- package/src/gvc/usershape.ts +33 -0
- package/src/gvc/viewport.ts +203 -0
- package/src/index.ts +165 -0
- package/src/label/index.ts +302 -0
- package/src/label/node.ts +278 -0
- package/src/label/rectangle.ts +123 -0
- package/src/label/split-q.ts +237 -0
- package/src/label/xlabels-geom.ts +132 -0
- package/src/label/xlabels-intersect.ts +421 -0
- package/src/label/xlabels.ts +212 -0
- package/src/layout/circo/blockpath.ts +560 -0
- package/src/layout/circo/blocks.ts +234 -0
- package/src/layout/circo/blocktree.ts +246 -0
- package/src/layout/circo/circular.ts +227 -0
- package/src/layout/circo/index.ts +90 -0
- package/src/layout/circo/init.ts +84 -0
- package/src/layout/circo/position-helpers.ts +104 -0
- package/src/layout/circo/position.ts +196 -0
- package/src/layout/dot/__fixtures__/xcoord-pivot-divergence.gv +79 -0
- package/src/layout/dot/acyclic.ts +60 -0
- package/src/layout/dot/aspect.ts +22 -0
- package/src/layout/dot/classify.ts +462 -0
- package/src/layout/dot/cluster-path.ts +200 -0
- package/src/layout/dot/cluster.ts +480 -0
- package/src/layout/dot/compound-clip.ts +224 -0
- package/src/layout/dot/compound-geom.ts +282 -0
- package/src/layout/dot/compound.ts +294 -0
- package/src/layout/dot/conc.ts +433 -0
- package/src/layout/dot/decomp.ts +165 -0
- package/src/layout/dot/edge-order.ts +62 -0
- package/src/layout/dot/edge-route-arrow.ts +87 -0
- package/src/layout/dot/edge-route-boxes.ts +99 -0
- package/src/layout/dot/edge-route-chain.ts +420 -0
- package/src/layout/dot/edge-route-clip.ts +253 -0
- package/src/layout/dot/edge-route-faithful.ts +404 -0
- package/src/layout/dot/edge-route-geom.ts +90 -0
- package/src/layout/dot/edge-route-helpers.ts +170 -0
- package/src/layout/dot/edge-route-poly.ts +174 -0
- package/src/layout/dot/edge-route-rank.ts +136 -0
- package/src/layout/dot/edge-route-routing.ts +219 -0
- package/src/layout/dot/edge-route.ts +490 -0
- package/src/layout/dot/fastgr.ts +377 -0
- package/src/layout/dot/flat-utils.ts +52 -0
- package/src/layout/dot/flat.ts +518 -0
- package/src/layout/dot/graph-label.ts +114 -0
- package/src/layout/dot/index.ts +302 -0
- package/src/layout/dot/init.ts +300 -0
- package/src/layout/dot/label-order.ts +161 -0
- package/src/layout/dot/mincross-build.ts +373 -0
- package/src/layout/dot/mincross-cross.ts +409 -0
- package/src/layout/dot/mincross-flat.ts +213 -0
- package/src/layout/dot/mincross-order.ts +401 -0
- package/src/layout/dot/mincross-utils.ts +170 -0
- package/src/layout/dot/mincross.ts +386 -0
- package/src/layout/dot/ns-core.ts +122 -0
- package/src/layout/dot/ns-range.ts +228 -0
- package/src/layout/dot/ns-subtree.ts +347 -0
- package/src/layout/dot/ns.ts +506 -0
- package/src/layout/dot/ortho-adapter.ts +133 -0
- package/src/layout/dot/pack-components.ts +433 -0
- package/src/layout/dot/position-aux.ts +382 -0
- package/src/layout/dot/position-bbox.ts +221 -0
- package/src/layout/dot/position-cluster.ts +286 -0
- package/src/layout/dot/position-ycoords.ts +287 -0
- package/src/layout/dot/position.ts +194 -0
- package/src/layout/dot/rank-dot2.ts +528 -0
- package/src/layout/dot/rank.ts +547 -0
- package/src/layout/dot/sameport.ts +278 -0
- package/src/layout/dot/self-loop.ts +147 -0
- package/src/layout/dot/splines-clone.ts +121 -0
- package/src/layout/dot/splines-flat-labeled.ts +408 -0
- package/src/layout/dot/splines-flat-multi.ts +188 -0
- package/src/layout/dot/splines-flat.ts +598 -0
- package/src/layout/dot/splines-groups.ts +190 -0
- package/src/layout/dot/splines-label.ts +432 -0
- package/src/layout/dot/splines-route-type.ts +44 -0
- package/src/layout/dot/splines-route.ts +478 -0
- package/src/layout/dot/splines.ts +538 -0
- package/src/layout/dot/straight-edges.ts +332 -0
- package/src/layout/fdp/cluster-edges.ts +0 -0
- package/src/layout/fdp/comp.ts +160 -0
- package/src/layout/fdp/derive.ts +272 -0
- package/src/layout/fdp/fdp-model.ts +238 -0
- package/src/layout/fdp/grid.ts +77 -0
- package/src/layout/fdp/index.ts +113 -0
- package/src/layout/fdp/init.ts +116 -0
- package/src/layout/fdp/layout.ts +485 -0
- package/src/layout/fdp/normalize.ts +100 -0
- package/src/layout/fdp/ports.ts +161 -0
- package/src/layout/fdp/tlayout-init.ts +230 -0
- package/src/layout/fdp/tlayout-parms.ts +234 -0
- package/src/layout/fdp/tlayout.ts +317 -0
- package/src/layout/fdp/xlayout.ts +350 -0
- package/src/layout/neato/bfs.ts +131 -0
- package/src/layout/neato/cdt-surface.ts +693 -0
- package/src/layout/neato/conjgrad.ts +159 -0
- package/src/layout/neato/delaunay.ts +259 -0
- package/src/layout/neato/dijkstra.ts +296 -0
- package/src/layout/neato/fdp-adjust.ts +124 -0
- package/src/layout/neato/index.ts +310 -0
- package/src/layout/neato/init.ts +505 -0
- package/src/layout/neato/legal.ts +316 -0
- package/src/layout/neato/matrix-ops.ts +112 -0
- package/src/layout/neato/multispline-router.ts +417 -0
- package/src/layout/neato/multispline.ts +427 -0
- package/src/layout/neato/overlap-prism.ts +503 -0
- package/src/layout/neato/overlap.ts +158 -0
- package/src/layout/neato/sc-adjust.ts +206 -0
- package/src/layout/neato/sep-factor.ts +118 -0
- package/src/layout/neato/set-aspect.ts +178 -0
- package/src/layout/neato/sgd.ts +461 -0
- package/src/layout/neato/splines.ts +1014 -0
- package/src/layout/neato/stress-kernel.ts +362 -0
- package/src/layout/neato/stress.ts +420 -0
- package/src/layout/osage/index.ts +548 -0
- package/src/layout/osage/layout.ts +254 -0
- package/src/layout/osage/types.ts +31 -0
- package/src/layout/pack/array-pack.ts +254 -0
- package/src/layout/pack/index.ts +570 -0
- package/src/layout/pack/poly-pack.ts +266 -0
- package/src/layout/pack/poly-place.ts +426 -0
- package/src/layout/pack/spiral-search.ts +106 -0
- package/src/layout/pack/test-helpers.ts +46 -0
- package/src/layout/pack/types.ts +85 -0
- package/src/layout/patchwork/index.ts +441 -0
- package/src/layout/patchwork/tree-map.ts +183 -0
- package/src/layout/patchwork/tree-node.ts +120 -0
- package/src/layout/sfdp/index.ts +231 -0
- package/src/layout/sfdp/init.ts +224 -0
- package/src/layout/sfdp/multilevel.ts +262 -0
- package/src/layout/sfdp/quadtree.ts +267 -0
- package/src/layout/sfdp/sparse-matrix-multiply.ts +160 -0
- package/src/layout/sfdp/sparse-matrix.ts +367 -0
- package/src/layout/sfdp/sparse-solve.ts +122 -0
- package/src/layout/sfdp/spring-driver.ts +209 -0
- package/src/layout/sfdp/spring-electrical.ts +431 -0
- package/src/layout/twopi/circle.ts +339 -0
- package/src/layout/twopi/index.ts +78 -0
- package/src/layout/twopi/init.ts +174 -0
- package/src/layout/twopi/pipeline.ts +98 -0
- package/src/layout/twopi/twopi-test-helpers.ts +44 -0
- package/src/model/algData.ts +194 -0
- package/src/model/cgraph-ops.ts +175 -0
- package/src/model/edge.ts +104 -0
- package/src/model/edgeInfo.ts +431 -0
- package/src/model/geom.ts +204 -0
- package/src/model/graph.ts +172 -0
- package/src/model/graphInfo.ts +528 -0
- package/src/model/index.ts +10 -0
- package/src/model/layoutParams.ts +127 -0
- package/src/model/node.ts +138 -0
- package/src/model/nodeInfo.ts +424 -0
- package/src/model/rankEntry.ts +95 -0
- package/src/ortho/chan-dict.ts +236 -0
- package/src/ortho/fpq.ts +149 -0
- package/src/ortho/index.ts +206 -0
- package/src/ortho/maze-channels.ts +196 -0
- package/src/ortho/maze.ts +311 -0
- package/src/ortho/ortho-parallel.ts +254 -0
- package/src/ortho/ortho-route.ts +349 -0
- package/src/ortho/partition.ts +303 -0
- package/src/ortho/rawgraph.ts +119 -0
- package/src/ortho/sgraph.ts +283 -0
- package/src/ortho/trap-query.ts +174 -0
- package/src/ortho/trap-segment.ts +303 -0
- package/src/ortho/trap-types.ts +171 -0
- package/src/ortho/trap-update.ts +89 -0
- package/src/ortho/trapezoid.ts +120 -0
- package/src/ortho/types.ts +286 -0
- package/src/parser/__fixtures__/directed.dot +10 -0
- package/src/parser/__fixtures__/simple.dot +7 -0
- package/src/parser/__fixtures__/subgraph.dot +17 -0
- package/src/parser/ast.ts +64 -0
- package/src/parser/builder.ts +401 -0
- package/src/parser/dot.d.ts +208 -0
- package/src/parser/dot.js +3321 -0
- package/src/parser/dot.pegjs +263 -0
- package/src/parser/index.ts +353 -0
- package/src/pathplan/index.ts +9 -0
- package/src/pathplan/route.ts +284 -0
- package/src/pathplan/shortest.ts +268 -0
- package/src/pathplan/solvers.ts +65 -0
- package/src/pathplan/triang.ts +221 -0
- package/src/pathplan/types.ts +16 -0
- package/src/pathplan/visibility.ts +170 -0
- package/src/pathplan/vispath.ts +118 -0
- package/src/rbtree/index.ts +418 -0
- package/src/render/color-resolve.ts +171 -0
- package/src/render/dot.ts +1514 -0
- package/src/render/index.ts +29 -0
- package/src/render/json.ts +734 -0
- package/src/render/map-test-helpers.ts +61 -0
- package/src/render/map.ts +528 -0
- package/src/render/public.ts +131 -0
- package/src/render/svg-arrow-ops.ts +113 -0
- package/src/render/svg-cluster.ts +24 -0
- package/src/render/svg-edge-ortho-radius.ts +228 -0
- package/src/render/svg-edge-split.ts +180 -0
- package/src/render/svg-gradient.ts +185 -0
- package/src/render/svg-graph.ts +415 -0
- package/src/render/svg-helpers.ts +623 -0
- package/src/render/svg-id.ts +76 -0
- package/src/render/svg-multicolor.ts +313 -0
- package/src/render/svg-parallel-edge.ts +123 -0
- package/src/render/svg-tapered-edge.ts +56 -0
- package/src/render/svg.ts +307 -0
- package/src/render/xdot-public.ts +164 -0
- package/src/render/xml-escape.ts +56 -0
- package/src/util/agxbuf.ts +138 -0
- package/src/util/bsd-qsort.ts +251 -0
- package/src/util/index.ts +25 -0
- package/src/util/list.ts +122 -0
- package/src/util/math.ts +104 -0
- package/src/util/mt19937.ts +143 -0
- package/src/util/printf-round.ts +163 -0
- package/src/util/xml.ts +184 -0
- package/src/vpsc/Block.ts +375 -0
- package/src/vpsc/Blocks.ts +164 -0
- package/src/vpsc/Constraint.ts +94 -0
- package/src/vpsc/HeapUtils.ts +88 -0
- package/src/vpsc/Solver.ts +274 -0
- package/src/vpsc/SweepLine.ts +214 -0
- package/src/vpsc/Variable.ts +54 -0
- package/src/vpsc/index.ts +122 -0
- package/src/vpsc/sweepTypes.ts +31 -0
- package/src/xdot/index.ts +7 -0
- package/src/xdot/lex.ts +151 -0
- package/src/xdot/misc.ts +226 -0
- package/src/xdot/parse.ts +349 -0
- package/src/xdot/types.ts +158 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
// SPDX-License-Identifier: EPL-2.0
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Core block and derived-graph data structures for the circo layout engine.
|
|
5
|
+
*
|
|
6
|
+
* Ports the type definitions from lib/circogen/block.h, lib/circogen/circular.h,
|
|
7
|
+
* and the DerivedGraph/DerivedNode/DerivedEdge helpers used across all passes.
|
|
8
|
+
*
|
|
9
|
+
* Also holds CircoCData (cdata) here to avoid a circular import with init.ts:
|
|
10
|
+
* cdata needs a back-reference to DerivedNode, so both must live in the same
|
|
11
|
+
* module.
|
|
12
|
+
*
|
|
13
|
+
* @see lib/circogen/block.h
|
|
14
|
+
* @see lib/circogen/circular.h
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type { Node } from '../../model/node.js';
|
|
18
|
+
import type { Edge } from '../../model/edge.js';
|
|
19
|
+
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
// Flag constants for CircoCData.flags
|
|
22
|
+
// @see lib/circogen/circular.h
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
export const FLAGS_VISITED = 0x01;
|
|
26
|
+
export const FLAGS_ONSTACK = 0x02;
|
|
27
|
+
export const FLAGS_ISPARENT = 0x04;
|
|
28
|
+
export const FLAGS_ONPATH = 0x08;
|
|
29
|
+
export const FLAGS_NEIGHBOR = 0x10;
|
|
30
|
+
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
// CircoCData — rich per-node layout data on derived-graph nodes (Passes 1–4)
|
|
33
|
+
// @see lib/circogen/circular.h:cdata
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Rich algorithm data stored on derived-graph nodes across Passes 1–4.
|
|
38
|
+
* Fields are reused across passes (mirrors the C union in cdata).
|
|
39
|
+
*
|
|
40
|
+
* @see lib/circogen/circular.h:cdata
|
|
41
|
+
*/
|
|
42
|
+
export interface CircoCData {
|
|
43
|
+
readonly kind: 'circo-cdata';
|
|
44
|
+
flags: number;
|
|
45
|
+
/** DFS parent (Pass 1). @see PARENT(n) */
|
|
46
|
+
parent: DerivedNode | null;
|
|
47
|
+
/** Block containing this node. @see BLOCK(n) */
|
|
48
|
+
block: unknown;
|
|
49
|
+
/** Biconnectivity fields (Pass 1). @see VAL(n), LOWVAL(n) */
|
|
50
|
+
bc: { val: number; lowVal: number };
|
|
51
|
+
/** Clone pointer (Pass 3a). @see CLONE(n) */
|
|
52
|
+
clone: Node | null;
|
|
53
|
+
/** Spanning-tree parent (Pass 3b). @see TPARENT(n) */
|
|
54
|
+
tparent: CircoCData | null;
|
|
55
|
+
leafone: CircoCData | null;
|
|
56
|
+
leaftwo: CircoCData | null;
|
|
57
|
+
fdist: number;
|
|
58
|
+
sdist: number;
|
|
59
|
+
/** Circle position index (Pass 3c/4). @see POSITION(n) */
|
|
60
|
+
pos: number;
|
|
61
|
+
/** Child-block mid-angle (Pass 4). @see PSI(n) */
|
|
62
|
+
psi: number;
|
|
63
|
+
/** Degree counter (reuses ND_order slot). @see DEGREE(n) */
|
|
64
|
+
degree: number;
|
|
65
|
+
/** Back-reference to the DerivedNode that owns this cdata. */
|
|
66
|
+
derivedNode: DerivedNode;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// ---------------------------------------------------------------------------
|
|
70
|
+
// SubGraph / DerivedGraph / DerivedNode / DerivedEdge
|
|
71
|
+
// ---------------------------------------------------------------------------
|
|
72
|
+
|
|
73
|
+
/** Lightweight subgraph used in the derived graph for circo. */
|
|
74
|
+
export interface SubGraph {
|
|
75
|
+
name: string;
|
|
76
|
+
nodes: DerivedNode[];
|
|
77
|
+
edges: DerivedEdge[];
|
|
78
|
+
parent: DerivedGraph;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** Strict undirected derived graph built in Pass 0. */
|
|
82
|
+
export interface DerivedGraph {
|
|
83
|
+
nodes: Map<string, DerivedNode>;
|
|
84
|
+
subgraphs: SubGraph[];
|
|
85
|
+
components: SubGraph[];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** Node in the derived graph with cdata attached. */
|
|
89
|
+
export interface DerivedNode {
|
|
90
|
+
name: string;
|
|
91
|
+
orig: Node;
|
|
92
|
+
pos: [number, number];
|
|
93
|
+
cdata: CircoCData;
|
|
94
|
+
lw: number;
|
|
95
|
+
rw: number;
|
|
96
|
+
ht: number;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Edge in the derived graph. */
|
|
100
|
+
export interface DerivedEdge {
|
|
101
|
+
tail: DerivedNode;
|
|
102
|
+
head: DerivedNode;
|
|
103
|
+
/** +1 tail→head, -1 head→tail, 0 = unset. @see EDGEORDER(e) */
|
|
104
|
+
order: number;
|
|
105
|
+
origEdge: Edge | null;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// ---------------------------------------------------------------------------
|
|
109
|
+
// Block — biconnected component
|
|
110
|
+
// @see lib/circogen/block.h:block_t
|
|
111
|
+
// ---------------------------------------------------------------------------
|
|
112
|
+
|
|
113
|
+
const COALESCED_F = 1;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* One biconnected component (or isolated node).
|
|
117
|
+
* @see lib/circogen/block.h:block_t
|
|
118
|
+
*/
|
|
119
|
+
export interface Block {
|
|
120
|
+
subGraph: SubGraph;
|
|
121
|
+
radius: number;
|
|
122
|
+
rad0: number;
|
|
123
|
+
circleList: Node[];
|
|
124
|
+
children: Block[];
|
|
125
|
+
/** Parent-connection angle for single-node blocks; -1 = unset. */
|
|
126
|
+
parentPos: number;
|
|
127
|
+
flags: number;
|
|
128
|
+
/** Cutpoint node connecting this block to its parent block. */
|
|
129
|
+
child: Node | null;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** @see lib/circogen/block.c:mkBlock */
|
|
133
|
+
export function mkBlock(sg: SubGraph): Block {
|
|
134
|
+
return {
|
|
135
|
+
subGraph: sg,
|
|
136
|
+
radius: 0,
|
|
137
|
+
rad0: 0,
|
|
138
|
+
circleList: [],
|
|
139
|
+
children: [],
|
|
140
|
+
parentPos: -1,
|
|
141
|
+
flags: 0,
|
|
142
|
+
child: null,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** @see lib/circogen/block.c:blockSize */
|
|
147
|
+
export function blockSize(bp: Block): number {
|
|
148
|
+
return bp.subGraph.nodes.length;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** @see lib/circogen/block.c:appendBlock */
|
|
152
|
+
export function appendBlock(bl: Block[], bp: Block): void {
|
|
153
|
+
bl.push(bp);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/** @see lib/circogen/block.c:insertBlock */
|
|
157
|
+
export function insertBlock(bl: Block[], bp: Block): void {
|
|
158
|
+
bl.unshift(bp);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** @see lib/circogen/block.h:SET_COALESCED */
|
|
162
|
+
export function setCoalesced(bp: Block): void {
|
|
163
|
+
bp.flags |= COALESCED_F;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** @see lib/circogen/block.h:COALESCED */
|
|
167
|
+
export function isCoalesced(bp: Block): boolean {
|
|
168
|
+
return (bp.flags & COALESCED_F) !== 0;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The node in the PARENT block this block hangs from:
|
|
173
|
+
* BLK_PARENT(b) = CHILD(b) ? PARENT(CHILD(b)) : 0.
|
|
174
|
+
* @see lib/circogen/block.h:BLK_PARENT
|
|
175
|
+
*/
|
|
176
|
+
export function blkParent(bp: Block): Node | null {
|
|
177
|
+
if (!bp.child) return null;
|
|
178
|
+
const cd = bp.child.info.alg as CircoCData | undefined;
|
|
179
|
+
if (cd?.kind !== 'circo-cdata') return null;
|
|
180
|
+
return cd.parent?.orig ?? null;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// ---------------------------------------------------------------------------
|
|
184
|
+
// CircState — layout state threaded through all passes
|
|
185
|
+
// @see lib/circogen/circular.h:circ_state
|
|
186
|
+
// ---------------------------------------------------------------------------
|
|
187
|
+
|
|
188
|
+
/** @see lib/circogen/circular.h:circ_state */
|
|
189
|
+
export interface CircState {
|
|
190
|
+
bl: Block[];
|
|
191
|
+
orderCount: number;
|
|
192
|
+
blockCount: number;
|
|
193
|
+
graphCopyCount: number;
|
|
194
|
+
spanningTreeCount: number;
|
|
195
|
+
minDist: number;
|
|
196
|
+
rootname: string;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const MINDIST = 1.0;
|
|
200
|
+
|
|
201
|
+
/** @see lib/circogen/circular.c:initGraphAttrs */
|
|
202
|
+
export function makeCircState(blockCount: number): CircState {
|
|
203
|
+
return {
|
|
204
|
+
bl: [],
|
|
205
|
+
orderCount: 1,
|
|
206
|
+
blockCount,
|
|
207
|
+
graphCopyCount: 0,
|
|
208
|
+
spanningTreeCount: 0,
|
|
209
|
+
minDist: MINDIST,
|
|
210
|
+
rootname: '',
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** Create a zero-initialised CircoCData for a given DerivedNode. */
|
|
215
|
+
export function makeCData(dn: DerivedNode): CircoCData {
|
|
216
|
+
// Temporarily assign; derivedNode is set by caller after construction.
|
|
217
|
+
return {
|
|
218
|
+
kind: 'circo-cdata',
|
|
219
|
+
flags: 0,
|
|
220
|
+
parent: null,
|
|
221
|
+
block: null,
|
|
222
|
+
bc: { val: 0, lowVal: 0 },
|
|
223
|
+
clone: null,
|
|
224
|
+
tparent: null,
|
|
225
|
+
leafone: null,
|
|
226
|
+
leaftwo: null,
|
|
227
|
+
fdist: 0,
|
|
228
|
+
sdist: 0,
|
|
229
|
+
pos: 0,
|
|
230
|
+
psi: 0,
|
|
231
|
+
degree: 0,
|
|
232
|
+
derivedNode: dn,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
// SPDX-License-Identifier: EPL-2.0
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Biconnected-component decomposition and block-cutpoint tree construction.
|
|
5
|
+
*
|
|
6
|
+
* Ports lib/circogen/blocktree.c.
|
|
7
|
+
*
|
|
8
|
+
* @see lib/circogen/blocktree.c
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { DerivedNode, DerivedEdge, DerivedGraph, SubGraph } from './blocks.js';
|
|
12
|
+
import { spanIncident } from './blockpath.js';
|
|
13
|
+
import {
|
|
14
|
+
type Block,
|
|
15
|
+
type CircState,
|
|
16
|
+
mkBlock,
|
|
17
|
+
blockSize,
|
|
18
|
+
appendBlock,
|
|
19
|
+
insertBlock,
|
|
20
|
+
} from './blocks.js';
|
|
21
|
+
import { FLAGS_ISPARENT } from './blocks.js';
|
|
22
|
+
|
|
23
|
+
// All interfaces at top-level so lizard doesn't count them inside functions.
|
|
24
|
+
|
|
25
|
+
/** DFS context object — avoids passing many params through recursive calls. */
|
|
26
|
+
export interface DfsCtx {
|
|
27
|
+
g: SubGraph;
|
|
28
|
+
state: CircState;
|
|
29
|
+
allEdges: DerivedEdge[];
|
|
30
|
+
stk: DerivedEdge[];
|
|
31
|
+
/** Derived-node creation order — agfstedge sort key. */
|
|
32
|
+
ord: Map<DerivedNode, number>;
|
|
33
|
+
/** Derived-edge creation order — agfstedge tie key. */
|
|
34
|
+
seq: Map<DerivedEdge, number>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
// Subgraph / block factories
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
export function makeBlockSubgraph(dg: DerivedGraph, state: CircState): SubGraph {
|
|
42
|
+
const name = `_block_${state.blockCount++}`;
|
|
43
|
+
const sg: SubGraph = { name, nodes: [], edges: [], parent: dg };
|
|
44
|
+
dg.subgraphs.push(sg);
|
|
45
|
+
return sg;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function makeBlock(dg: DerivedGraph, state: CircState): Block {
|
|
49
|
+
return mkBlock(makeBlockSubgraph(dg, state));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function addNodeToBlock(bp: Block, n: DerivedNode): void {
|
|
53
|
+
bp.subGraph.nodes.push(n);
|
|
54
|
+
n.cdata.block = bp;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// ---------------------------------------------------------------------------
|
|
58
|
+
// DFS edge-stack helpers
|
|
59
|
+
// ---------------------------------------------------------------------------
|
|
60
|
+
|
|
61
|
+
export function popEdgesUntil(stk: DerivedEdge[], e: DerivedEdge): DerivedEdge[] {
|
|
62
|
+
const popped: DerivedEdge[] = [];
|
|
63
|
+
let ep: DerivedEdge;
|
|
64
|
+
do {
|
|
65
|
+
ep = stk[stk.length - 1]!;
|
|
66
|
+
stk.pop();
|
|
67
|
+
popped.push(ep);
|
|
68
|
+
} while (ep !== e);
|
|
69
|
+
return popped;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function buildBlockFromEdges(
|
|
73
|
+
dg: DerivedGraph,
|
|
74
|
+
state: CircState,
|
|
75
|
+
popped: DerivedEdge[],
|
|
76
|
+
u: DerivedNode,
|
|
77
|
+
): Block | null {
|
|
78
|
+
let block: Block | null = null;
|
|
79
|
+
for (const ep of popped) {
|
|
80
|
+
const np = ep.order === 1 ? ep.head : ep.tail;
|
|
81
|
+
if (np.cdata.block === null) {
|
|
82
|
+
if (block === null) block = makeBlock(dg, state);
|
|
83
|
+
addNodeToBlock(block, np);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (block !== null && u.cdata.block === null && blockSize(block) > 1) {
|
|
87
|
+
addNodeToBlock(block, u);
|
|
88
|
+
}
|
|
89
|
+
return block;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function placeBlock(
|
|
93
|
+
state: CircState,
|
|
94
|
+
block: Block,
|
|
95
|
+
u: DerivedNode,
|
|
96
|
+
isRoot: boolean,
|
|
97
|
+
): void {
|
|
98
|
+
if (isRoot && u.cdata.block === block) {
|
|
99
|
+
insertBlock(state.bl, block);
|
|
100
|
+
} else {
|
|
101
|
+
appendBlock(state.bl, block);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// ---------------------------------------------------------------------------
|
|
106
|
+
// DFS — Tarjan biconnected components
|
|
107
|
+
// @see lib/circogen/blocktree.c:dfs
|
|
108
|
+
// ---------------------------------------------------------------------------
|
|
109
|
+
|
|
110
|
+
export function processArticulation(
|
|
111
|
+
ctx: DfsCtx,
|
|
112
|
+
u: DerivedNode,
|
|
113
|
+
v: DerivedNode,
|
|
114
|
+
e: DerivedEdge,
|
|
115
|
+
isRoot: boolean,
|
|
116
|
+
): void {
|
|
117
|
+
if (v.cdata.bc.lowVal < u.cdata.bc.val) return;
|
|
118
|
+
const popped = popEdgesUntil(ctx.stk, e);
|
|
119
|
+
const block = buildBlockFromEdges(ctx.g.parent, ctx.state, popped, u);
|
|
120
|
+
if (block !== null) placeBlock(ctx.state, block, u, isRoot);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function dfsVisitEdge(
|
|
124
|
+
ctx: DfsCtx,
|
|
125
|
+
u: DerivedNode,
|
|
126
|
+
e: DerivedEdge,
|
|
127
|
+
isRoot: boolean,
|
|
128
|
+
): void {
|
|
129
|
+
const v = e.head === u ? e.tail : e.head;
|
|
130
|
+
if (e.order === 0) e.order = e.head === u ? -1 : 1;
|
|
131
|
+
if (v.cdata.bc.val === 0) {
|
|
132
|
+
v.cdata.parent = u;
|
|
133
|
+
ctx.stk.push(e);
|
|
134
|
+
dfsVisit(ctx, v, false);
|
|
135
|
+
u.cdata.bc.lowVal = Math.min(u.cdata.bc.lowVal, v.cdata.bc.lowVal);
|
|
136
|
+
processArticulation(ctx, u, v, e, isRoot);
|
|
137
|
+
} else if (v !== u.cdata.parent) {
|
|
138
|
+
u.cdata.bc.lowVal = Math.min(u.cdata.bc.lowVal, v.cdata.bc.val);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function dfsVisit(ctx: DfsCtx, u: DerivedNode, isRoot: boolean): void {
|
|
143
|
+
u.cdata.bc.val = ctx.state.orderCount;
|
|
144
|
+
u.cdata.bc.lowVal = ctx.state.orderCount;
|
|
145
|
+
ctx.state.orderCount++;
|
|
146
|
+
// C dfs iterates agfstedge(g, u) — u's incident edges in (other-endpoint,
|
|
147
|
+
// seq) order, not the flat edge list. The DISCOVERY order decides the
|
|
148
|
+
// block-tree child order, which assigns each satellite block its angular
|
|
149
|
+
// slot around the cut vertex. @see lib/circogen/blocktree.c:62
|
|
150
|
+
const uEdges = spanIncident(u, ctx.allEdges, ctx.ord, ctx.seq);
|
|
151
|
+
for (const e of uEdges) dfsVisitEdge(ctx, u, e, isRoot);
|
|
152
|
+
if (isRoot && u.cdata.block === null) {
|
|
153
|
+
const block = makeBlock(ctx.g.parent, ctx.state);
|
|
154
|
+
addNodeToBlock(block, u);
|
|
155
|
+
insertBlock(ctx.state.bl, block);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function findBlocks(
|
|
160
|
+
g: SubGraph,
|
|
161
|
+
state: CircState,
|
|
162
|
+
allEdges: DerivedEdge[],
|
|
163
|
+
): void {
|
|
164
|
+
let root: DerivedNode | null = null;
|
|
165
|
+
if (state.rootname) root = g.parent.nodes.get(state.rootname) ?? null;
|
|
166
|
+
if (!root && g.nodes.length > 0) root = g.nodes[0]!;
|
|
167
|
+
if (!root) return;
|
|
168
|
+
const ord = new Map<DerivedNode, number>();
|
|
169
|
+
g.nodes.forEach((dn, i) => ord.set(dn, i));
|
|
170
|
+
const seq = new Map<DerivedEdge, number>();
|
|
171
|
+
allEdges.forEach((e, i) => seq.set(e, i));
|
|
172
|
+
dfsVisit({ g, state, allEdges, stk: [], ord, seq }, root, true);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// ---------------------------------------------------------------------------
|
|
176
|
+
// Block-cutpoint tree wiring
|
|
177
|
+
// @see lib/circogen/blocktree.c:createBlocktree
|
|
178
|
+
// ---------------------------------------------------------------------------
|
|
179
|
+
|
|
180
|
+
export function minValNode(bp: Block): { child: DerivedNode; parentNode: DerivedNode | null } {
|
|
181
|
+
let child = bp.subGraph.nodes[0]!;
|
|
182
|
+
let minVal = child.cdata.bc.val;
|
|
183
|
+
let parentNode = child.cdata.parent;
|
|
184
|
+
for (let j = 1; j < bp.subGraph.nodes.length; j++) {
|
|
185
|
+
const n = bp.subGraph.nodes[j]!;
|
|
186
|
+
if (n.cdata.bc.val < minVal) {
|
|
187
|
+
child = n;
|
|
188
|
+
minVal = n.cdata.bc.val;
|
|
189
|
+
parentNode = n.cdata.parent;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return { child, parentNode };
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export function wireBlock(bp: Block): void {
|
|
196
|
+
if (bp.subGraph.nodes.length === 0) return;
|
|
197
|
+
const { child, parentNode } = minValNode(bp);
|
|
198
|
+
bp.child = child.orig;
|
|
199
|
+
if (parentNode === null) return;
|
|
200
|
+
parentNode.cdata.flags |= FLAGS_ISPARENT;
|
|
201
|
+
const parentBlock = parentNode.cdata.block as Block | null;
|
|
202
|
+
if (parentBlock !== null) parentBlock.children.push(bp);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// ---------------------------------------------------------------------------
|
|
206
|
+
// Public API
|
|
207
|
+
// ---------------------------------------------------------------------------
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Build block-cutpoint tree from biconnected components.
|
|
211
|
+
* @see lib/circogen/blocktree.c:createBlocktree
|
|
212
|
+
*/
|
|
213
|
+
export function createBlocktree(
|
|
214
|
+
g: SubGraph,
|
|
215
|
+
state: CircState,
|
|
216
|
+
allEdges: DerivedEdge[],
|
|
217
|
+
): Block {
|
|
218
|
+
findBlocks(g, state, allEdges);
|
|
219
|
+
const root = state.bl[0]!;
|
|
220
|
+
for (let i = 1; i < state.bl.length; i++) wireBlock(state.bl[i]!);
|
|
221
|
+
state.bl = [];
|
|
222
|
+
return root;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Create a single block containing all nodes (oneblock=true).
|
|
227
|
+
* @see lib/circogen/circular.c:createOneBlock
|
|
228
|
+
*/
|
|
229
|
+
export function createOneBlock(g: SubGraph, state: CircState): Block {
|
|
230
|
+
const name = `_block_${state.blockCount++}`;
|
|
231
|
+
const sg: SubGraph = { name, nodes: [...g.nodes], edges: [], parent: g.parent };
|
|
232
|
+
g.parent.subgraphs.push(sg);
|
|
233
|
+
const bp = mkBlock(sg);
|
|
234
|
+
for (const n of sg.nodes) n.cdata.block = bp;
|
|
235
|
+
return bp;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Recursively free a block tree (post-order).
|
|
240
|
+
* @see lib/circogen/blocktree.c:freeBlocktree
|
|
241
|
+
*/
|
|
242
|
+
export function freeBlocktree(bp: Block): void {
|
|
243
|
+
for (const child of bp.children) freeBlocktree(child);
|
|
244
|
+
bp.circleList = [];
|
|
245
|
+
bp.children = [];
|
|
246
|
+
}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
// SPDX-License-Identifier: EPL-2.0
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Per-connected-component circular layout orchestration.
|
|
5
|
+
*
|
|
6
|
+
* Ports lib/circogen/circular.c (circularLayout) and the derived-graph
|
|
7
|
+
* construction from lib/circogen/circularinit.c (circomps, circoLayout).
|
|
8
|
+
*
|
|
9
|
+
* All functions are exported so lizard counts each one independently.
|
|
10
|
+
*
|
|
11
|
+
* @see lib/circogen/circular.c
|
|
12
|
+
* @see lib/circogen/circularinit.c
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { Graph } from '../../model/graph.js';
|
|
16
|
+
import type { Node } from '../../model/node.js';
|
|
17
|
+
import type { Edge } from '../../model/edge.js';
|
|
18
|
+
import type { CircoNData } from './init.js';
|
|
19
|
+
import {
|
|
20
|
+
type Block, type SubGraph, type DerivedGraph, type DerivedNode, type DerivedEdge,
|
|
21
|
+
makeCircState, makeCData,
|
|
22
|
+
} from './blocks.js';
|
|
23
|
+
import { createBlocktree, createOneBlock, freeBlocktree } from './blocktree.js';
|
|
24
|
+
import { nodesInSeq } from '../dot/decomp.js';
|
|
25
|
+
import { circPos } from './position.js';
|
|
26
|
+
import { ccomps, getPackInfo, packSubgraphs } from '../pack/index.js';
|
|
27
|
+
import { PackMode } from '../pack/types.js';
|
|
28
|
+
import { adjustNodesFull } from '../neato/fdp-adjust.js';
|
|
29
|
+
|
|
30
|
+
// ---------------------------------------------------------------------------
|
|
31
|
+
// Derived-graph construction
|
|
32
|
+
// @see lib/circogen/circularinit.c:circomps
|
|
33
|
+
// ---------------------------------------------------------------------------
|
|
34
|
+
|
|
35
|
+
/** Create a DerivedNode from an original graph node. */
|
|
36
|
+
export function makeDerivedNode(orig: Node): DerivedNode {
|
|
37
|
+
// Placeholder — cdata.derivedNode set after object construction.
|
|
38
|
+
const dn: DerivedNode = {
|
|
39
|
+
name: orig.name, orig,
|
|
40
|
+
pos: [0, 0],
|
|
41
|
+
cdata: null as unknown as DerivedNode['cdata'],
|
|
42
|
+
lw: orig.info.lw, rw: orig.info.rw, ht: orig.info.ht,
|
|
43
|
+
};
|
|
44
|
+
dn.cdata = makeCData(dn);
|
|
45
|
+
return dn;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Build strict undirected derived graph from g (drop self-loops).
|
|
49
|
+
* C creates derived nodes walking agfstnode (node-seq order) — the
|
|
50
|
+
* creation order IS the derived node seq. @see circularinit.c:circomps */
|
|
51
|
+
export function buildDerivedGraph(g: Graph): DerivedGraph {
|
|
52
|
+
const dg: DerivedGraph = { nodes: new Map(), subgraphs: [], components: [] };
|
|
53
|
+
for (const n of nodesInSeq(g)) {
|
|
54
|
+
const dn = makeDerivedNode(n);
|
|
55
|
+
dg.nodes.set(n.name, dn);
|
|
56
|
+
n.info.alg = dn.cdata; // link for derivedOf()
|
|
57
|
+
}
|
|
58
|
+
return dg;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Build derived edges (strict: no self-loops, no duplicates).
|
|
63
|
+
*
|
|
64
|
+
* C's circomps creates them per TAIL node in seq order via agfstout —
|
|
65
|
+
* `agedge(dg, dt, dh, NULL, 1)` on the strict derived graph dedups
|
|
66
|
+
* unordered pairs, keeping the FIRST encounter's orientation and seq.
|
|
67
|
+
* The derived-edge seq drives the block DFS's agfstedge iteration order
|
|
68
|
+
* (agedgeseqcmpf), which decides block numbering and tree child order.
|
|
69
|
+
* @see lib/circogen/circularinit.c:circomps
|
|
70
|
+
*/
|
|
71
|
+
export function buildDerivedEdges(g: Graph, dg: DerivedGraph): DerivedEdge[] {
|
|
72
|
+
const edges: DerivedEdge[] = [];
|
|
73
|
+
const seen = new Set<string>();
|
|
74
|
+
for (const n of nodesInSeq(g)) {
|
|
75
|
+
for (const e of n.outEdges(g)) {
|
|
76
|
+
if (e.tail === e.head) continue; // drop self-loops
|
|
77
|
+
const tail = dg.nodes.get(e.tail.name);
|
|
78
|
+
const head = dg.nodes.get(e.head.name);
|
|
79
|
+
if (!tail || !head) continue;
|
|
80
|
+
const key = [tail.name, head.name].sort().join('\0');
|
|
81
|
+
if (seen.has(key)) continue;
|
|
82
|
+
seen.add(key);
|
|
83
|
+
edges.push({ tail, head, order: 0, origEdge: e });
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return edges;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** Decompose derived graph into connected components with their edges. */
|
|
90
|
+
export function derivedComponents(g: Graph, dg: DerivedGraph, allEdges: DerivedEdge[]): SubGraph[] {
|
|
91
|
+
const comps = ccomps(g, '_cc');
|
|
92
|
+
return comps.map((sg, i) => {
|
|
93
|
+
const nodes: DerivedNode[] = [];
|
|
94
|
+
for (const n of sg.nodes.values()) {
|
|
95
|
+
const dn = dg.nodes.get(n.name);
|
|
96
|
+
if (dn) nodes.push(dn);
|
|
97
|
+
}
|
|
98
|
+
// cgraph subgraph iteration is ID-ordered (root creation order).
|
|
99
|
+
nodes.sort((a, b) => a.orig.id - b.orig.id);
|
|
100
|
+
const ns = new Set(nodes);
|
|
101
|
+
const edges = allEdges.filter((e) => ns.has(e.tail) && ns.has(e.head));
|
|
102
|
+
return { name: `_cc_${i}`, nodes, edges, parent: dg };
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// ---------------------------------------------------------------------------
|
|
107
|
+
// Single-component circular layout
|
|
108
|
+
// @see lib/circogen/circular.c:circularLayout
|
|
109
|
+
// ---------------------------------------------------------------------------
|
|
110
|
+
|
|
111
|
+
/** Position a single-node component at origin. */
|
|
112
|
+
export function layoutSingleNode(sg: SubGraph): void {
|
|
113
|
+
const dn = sg.nodes[0];
|
|
114
|
+
if (dn) { dn.orig.info.pos = [0, 0]; }
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** Read oneblock attribute from the original graph. */
|
|
118
|
+
export function isOneblock(realg: Graph): boolean {
|
|
119
|
+
return realg.attrs.get('oneblock') === 'true';
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** Read mindist attribute from the original graph (default 1.0). */
|
|
123
|
+
export function readMinDist(realg: Graph): number {
|
|
124
|
+
const v = parseFloat(realg.attrs.get('mindist') ?? '');
|
|
125
|
+
return isNaN(v) || v < 0 ? 1.0 : v;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Lay out one connected component of the derived graph.
|
|
130
|
+
* @see lib/circogen/circular.c:circularLayout
|
|
131
|
+
*/
|
|
132
|
+
export function circularLayout(sg: SubGraph, realg: Graph, blockCount: number, allEdges: DerivedEdge[]): number {
|
|
133
|
+
if (sg.nodes.length === 1) { layoutSingleNode(sg); return blockCount; }
|
|
134
|
+
const state = makeCircState(blockCount);
|
|
135
|
+
state.minDist = readMinDist(realg);
|
|
136
|
+
state.rootname = realg.attrs.get('root') ?? '';
|
|
137
|
+
let root: Block;
|
|
138
|
+
if (isOneblock(realg)) root = createOneBlock(sg, state);
|
|
139
|
+
else root = createBlocktree(sg, state, allEdges);
|
|
140
|
+
circPos(sg, root, state);
|
|
141
|
+
freeBlocktree(root);
|
|
142
|
+
return state.blockCount;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// ---------------------------------------------------------------------------
|
|
146
|
+
// Copy positions back to original graph
|
|
147
|
+
// @see lib/circogen/circularinit.c:copyPosns
|
|
148
|
+
// ---------------------------------------------------------------------------
|
|
149
|
+
|
|
150
|
+
export function copyPositions(_sg: SubGraph): void {
|
|
151
|
+
// assignPositions writes straight to dn.orig.info.pos (inches), so
|
|
152
|
+
// the C derived->orig copy is already done. coord is synced from pos
|
|
153
|
+
// (x72) later by splineEdgesShifted, exactly like C spline_edges.
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// ---------------------------------------------------------------------------
|
|
157
|
+
// Adjust nodes to remove overlap (stub — neato adjustNodes equivalent)
|
|
158
|
+
// @see lib/neatogen/adjust.c:adjustNodes
|
|
159
|
+
// ---------------------------------------------------------------------------
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Multi-component overlap adjustment stub. C runs adjustNodes(sg) on each
|
|
163
|
+
* DERIVED component subgraph before packing (circularinit.c:212); porting
|
|
164
|
+
* that requires width/pos plumbing on derived nodes and no divergent
|
|
165
|
+
* corpus case reaches it yet. The single-component path (adjustNodesFull
|
|
166
|
+
* on the real graph, circularinit.c:203) IS ported — see circoLayout.
|
|
167
|
+
*/
|
|
168
|
+
export function adjustNodes(_sg: SubGraph): void {
|
|
169
|
+
// deferred: see plans/xdot-conformance/decision-journal.md (PRISM entry)
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// ---------------------------------------------------------------------------
|
|
173
|
+
// circoLayout — top-level multi-component entry point
|
|
174
|
+
// @see lib/circogen/circularinit.c:circoLayout
|
|
175
|
+
// ---------------------------------------------------------------------------
|
|
176
|
+
|
|
177
|
+
export function circoLayout(g: Graph): void {
|
|
178
|
+
if (g.nodes.size === 0) return;
|
|
179
|
+
const dg = buildDerivedGraph(g);
|
|
180
|
+
const allEdges = buildDerivedEdges(g, dg);
|
|
181
|
+
const comps = derivedComponents(g, dg, allEdges);
|
|
182
|
+
dg.components = comps;
|
|
183
|
+
let blockCount = 0;
|
|
184
|
+
if (comps.length === 1) {
|
|
185
|
+
blockCount = circularLayout(comps[0]!, g, blockCount, allEdges);
|
|
186
|
+
copyPositions(comps[0]!);
|
|
187
|
+
// C: adjustNodes(g) on the REAL graph — overlap=false resolves to
|
|
188
|
+
// PRISM on the GTS reference build. @see circularinit.c:203
|
|
189
|
+
adjustNodesFull(g);
|
|
190
|
+
} else {
|
|
191
|
+
layoutMultiComponent(g, dg, comps, allEdges, blockCount);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** Pack and copy positions for multi-component graphs. */
|
|
196
|
+
export function layoutMultiComponent(
|
|
197
|
+
g: Graph, _dg: DerivedGraph, comps: SubGraph[], allEdges: DerivedEdge[], blockCount: number,
|
|
198
|
+
): void {
|
|
199
|
+
let bc = blockCount;
|
|
200
|
+
for (const sg of comps) { bc = circularLayout(sg, g, bc, allEdges); adjustNodes(sg); }
|
|
201
|
+
// C: getPackInfo(g, l_node, CL_OFFSET) — polyomino node-mode packing.
|
|
202
|
+
const pinfo = { aspect: 1, sz: 0, margin: 8, doSplines: false, mode: PackMode.Node, fixed: null, vals: null, flags: 0 };
|
|
203
|
+
getPackInfo(g, PackMode.Node, 8, pinfo);
|
|
204
|
+
// Build proxy Graph objects for packSubgraphs
|
|
205
|
+
const proxyGraphs = comps.map((sg) => buildProxyGraph(sg, g));
|
|
206
|
+
packSubgraphs(comps.length, proxyGraphs, g, pinfo);
|
|
207
|
+
// Copy packed coords back
|
|
208
|
+
for (let i = 0; i < comps.length; i++) copyPositions(comps[i]!);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/** Build a minimal Graph proxy so packSubgraphs can read node coords. */
|
|
212
|
+
export function buildProxyGraph(sg: SubGraph, root: Graph): Graph {
|
|
213
|
+
const proxy = new (root.constructor as new (n: string, k: string) => Graph)('_proxy', 'undirected');
|
|
214
|
+
proxy.info.dotroot = root;
|
|
215
|
+
for (const dn of sg.nodes) {
|
|
216
|
+
// Packing reads coord in POINTS; layout pos is in inches.
|
|
217
|
+
const p = dn.orig.info.pos ?? [0, 0];
|
|
218
|
+
dn.orig.info.coord = { x: (p[0] ?? 0) * 72, y: (p[1] ?? 0) * 72 };
|
|
219
|
+
proxy.nodes.set(dn.name, dn.orig);
|
|
220
|
+
}
|
|
221
|
+
return proxy;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// ---------------------------------------------------------------------------
|
|
225
|
+
// Edge type needed by the model but not part of circogen per se
|
|
226
|
+
// ---------------------------------------------------------------------------
|
|
227
|
+
void (0 as unknown as Edge); // keep import live for type checking
|