@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,302 @@
|
|
|
1
|
+
// SPDX-License-Identifier: EPL-2.0
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Dot layout engine entry point.
|
|
5
|
+
*
|
|
6
|
+
* Wires together the full dot layout pipeline:
|
|
7
|
+
* setAspect → dotInitSubg → dotInitNodeEdge →
|
|
8
|
+
* dotRank → dotMincross → dotPosition →
|
|
9
|
+
* removeFill → dotSameports → dotSplines → dotCompoundEdges
|
|
10
|
+
*
|
|
11
|
+
* Also exports DOT_LAYOUT_ENGINE, the LayoutEngine registration object
|
|
12
|
+
* used by GvcContext.
|
|
13
|
+
*
|
|
14
|
+
* @see lib/dotgen/dotinit.c:dot_layout
|
|
15
|
+
* @see lib/dotgen/dotinit.c:dotLayout (static)
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { Graph } from '../../model/graph.js';
|
|
19
|
+
import type { LayoutEngine } from '../../gvc/context.js';
|
|
20
|
+
import { setAspect } from './aspect.js';
|
|
21
|
+
import { dotRank } from './rank.js';
|
|
22
|
+
import { dotMincross } from './mincross.js';
|
|
23
|
+
import { dotPosition } from './position.js';
|
|
24
|
+
import { dotSameports } from './sameport.js';
|
|
25
|
+
import { dotSplines } from './splines.js';
|
|
26
|
+
import { dotCompoundEdges } from './compound.js';
|
|
27
|
+
import { mapbool } from './rank.js';
|
|
28
|
+
import { EDGETYPE_SPLINE, EDGETYPE_NONE, edgeTypeFromString } from './splines.js';
|
|
29
|
+
import {
|
|
30
|
+
dotInitSubg,
|
|
31
|
+
dotInitNodeEdge,
|
|
32
|
+
removeFill,
|
|
33
|
+
dotCleanup,
|
|
34
|
+
dotGraphInit,
|
|
35
|
+
} from './init.js';
|
|
36
|
+
import { gvPostprocess } from '../../common/postproc.js';
|
|
37
|
+
import {
|
|
38
|
+
getPack, getPackModeInfo, getPackInfo, PackMode,
|
|
39
|
+
} from '../pack/index.js';
|
|
40
|
+
import type { PackInfo } from '../pack/index.js';
|
|
41
|
+
import { ratioIsNone, layoutAndPack, cccompsWithClusters } from './pack-components.js';
|
|
42
|
+
|
|
43
|
+
// Re-export init helpers for external consumers.
|
|
44
|
+
export {
|
|
45
|
+
CL_CROSS,
|
|
46
|
+
dotInitNode,
|
|
47
|
+
dotInitEdge,
|
|
48
|
+
dotInitSubg,
|
|
49
|
+
dotInitNodeEdge,
|
|
50
|
+
removeFill,
|
|
51
|
+
dotCleanup,
|
|
52
|
+
dotGraphInit,
|
|
53
|
+
RANKDIR_TB,
|
|
54
|
+
RANKDIR_LR,
|
|
55
|
+
RANKDIR_BT,
|
|
56
|
+
RANKDIR_RL,
|
|
57
|
+
} from './init.js';
|
|
58
|
+
|
|
59
|
+
// ---------------------------------------------------------------------------
|
|
60
|
+
// setEdgeType — writes EDGETYPE into the low nibble of GD_flags
|
|
61
|
+
// @see lib/common/const.h:setEdgeType
|
|
62
|
+
// ---------------------------------------------------------------------------
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Stores the edge-type flag in the low 4 bits of g.info.flags.
|
|
66
|
+
* Mirrors the C macro setEdgeType(g, t).
|
|
67
|
+
*
|
|
68
|
+
* @see lib/common/const.h:setEdgeType
|
|
69
|
+
*/
|
|
70
|
+
export function setEdgeType(g: Graph, t: number): void {
|
|
71
|
+
g.info.flags = (g.info.flags & ~0xf) | (t & 0xf);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Set the edge type from the graph's `splines` attribute: unset → defaultValue,
|
|
76
|
+
* empty string → NONE, otherwise the parsed value. Mirrors C's setEdgeType
|
|
77
|
+
* (which reads `agget(g, "splines")`). @see lib/common/utils.c:setEdgeType
|
|
78
|
+
*
|
|
79
|
+
* C's `agget` resolves a graph attribute up the ancestor chain, so a component
|
|
80
|
+
* subgraph sees the root's `splines`. The port's `attrs` map holds only the
|
|
81
|
+
* attributes written on that graph, so walk to the root ourselves — otherwise
|
|
82
|
+
* the per-component call sites (neato's `gc`, sfdp's `sg`) read `undefined` and
|
|
83
|
+
* silently fall back to the default.
|
|
84
|
+
*/
|
|
85
|
+
export function setEdgeTypeFromAttr(g: Graph, defaultValue: number): void {
|
|
86
|
+
let s = g.attrs.get('splines');
|
|
87
|
+
for (let p = g.parent; s === undefined && p !== null; p = p.parent) {
|
|
88
|
+
s = p.attrs.get('splines');
|
|
89
|
+
}
|
|
90
|
+
let et: number;
|
|
91
|
+
if (s === undefined) et = defaultValue;
|
|
92
|
+
else if (s === '') et = EDGETYPE_NONE;
|
|
93
|
+
else et = edgeTypeFromString(s, defaultValue);
|
|
94
|
+
setEdgeType(g, et);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// ---------------------------------------------------------------------------
|
|
98
|
+
// getAttrInt — attribute reading helper
|
|
99
|
+
// ---------------------------------------------------------------------------
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Reads an integer graph attribute, returning defaultVal if not set.
|
|
103
|
+
* Mirrors late_int() from lib/common/utils.c for graph-level reads.
|
|
104
|
+
*
|
|
105
|
+
* @see lib/common/utils.c:late_int
|
|
106
|
+
*/
|
|
107
|
+
export function getAttrInt(g: Graph, key: string, defaultVal: number): number {
|
|
108
|
+
const v = g.attrs.get(key);
|
|
109
|
+
if (v === undefined || v === '') return defaultVal;
|
|
110
|
+
const n = parseInt(v, 10);
|
|
111
|
+
return isNaN(n) ? defaultVal : n;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// ---------------------------------------------------------------------------
|
|
115
|
+
// Pipeline phase helpers — each phase is its own function so that
|
|
116
|
+
// dotLayoutPipeline stays within the 30-line body limit.
|
|
117
|
+
// ---------------------------------------------------------------------------
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Phase 0: parse rankdir, set edge type, and run aspect + init passes.
|
|
121
|
+
* dotGraphInit must run first so g.info.flip is set before nodeinit uses it.
|
|
122
|
+
* @see lib/common/input.c:600-663 graph_init
|
|
123
|
+
* @see lib/dotgen/dotinit.c:dotLayout (static)
|
|
124
|
+
*/
|
|
125
|
+
export function dotPhaseInit(g: Graph): void {
|
|
126
|
+
dotGraphInit(g);
|
|
127
|
+
setEdgeTypeFromAttr(g, EDGETYPE_SPLINE);
|
|
128
|
+
setAspect(g);
|
|
129
|
+
dotInitSubg(g);
|
|
130
|
+
dotInitNodeEdge(g);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Phase 4a: post-position passes WITHOUT the final gvPostprocess —
|
|
135
|
+
* removeFill, sameports, splines, compound. This is C's static `dotLayout`
|
|
136
|
+
* tail; the per-component pack branch runs exactly this (gvPostprocess is run
|
|
137
|
+
* once on the root afterwards, not per component).
|
|
138
|
+
* @see lib/dotgen/dotinit.c:dotLayout (static)
|
|
139
|
+
*/
|
|
140
|
+
export function dotPhasePostNoFinish(g: Graph): void {
|
|
141
|
+
removeFill(g);
|
|
142
|
+
dotSameports(g);
|
|
143
|
+
dotSplines(g);
|
|
144
|
+
// C: if (mapbool(agget(g, "compound"))) dot_compoundEdges(g);
|
|
145
|
+
// agget on a pack-branch component subgraph (_cc_N) falls back to the
|
|
146
|
+
// attribute default declared by the root's `compound=true`, so C's gate
|
|
147
|
+
// passes per component; mirror that with a root fallback (local wins).
|
|
148
|
+
// @see lib/dotgen/dotinit.c:338
|
|
149
|
+
if (mapbool(g.attrs.get('compound') ?? g.root.attrs.get('compound'))) dotCompoundEdges(g);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Phase 4: post-position passes — the no-finish tail plus gvPostprocess to
|
|
154
|
+
* rotate/translate coordinates per rankdir.
|
|
155
|
+
* @see lib/dotgen/dotinit.c:dotLayout (static)
|
|
156
|
+
* @see lib/common/postproc.c:dotneato_postprocess
|
|
157
|
+
*/
|
|
158
|
+
export function dotPhasePost(g: Graph): void {
|
|
159
|
+
dotPhasePostNoFinish(g);
|
|
160
|
+
gvPostprocess(g);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// ---------------------------------------------------------------------------
|
|
164
|
+
// dotLayoutPipeline — the static dotLayout function from dotinit.c
|
|
165
|
+
// ---------------------------------------------------------------------------
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Runs the full dot layout pipeline on graph g.
|
|
169
|
+
*
|
|
170
|
+
* The optional `maxphase` attribute (read from g.attrs) controls how many
|
|
171
|
+
* phases run (1=rank only, 2=+mincross, 3=+position, ≥4 or absent=all).
|
|
172
|
+
*
|
|
173
|
+
* C's `dotLayout` checks `dot_mincross`'s return code and returns immediately
|
|
174
|
+
* on failure, skipping `dot_position` (phase 3) and `dotneato_postprocess`
|
|
175
|
+
* entirely — `dot_position` is never reached with a rank/cluster-window state
|
|
176
|
+
* that `dot_mincross` has already given up on (e.g. a cluster's rank window
|
|
177
|
+
* outliving root's rank-array allocation after malformed-input rankset
|
|
178
|
+
* recovery deletes cluster members but leaves the window unshrunk). The port
|
|
179
|
+
* previously discarded `dotMincross`'s return value and always ran
|
|
180
|
+
* `dotPosition` regardless, so `dotPosition` could observe exactly that
|
|
181
|
+
* unreachable-in-C state and crash (e.g. `position-ycoords.ts:clustHt`
|
|
182
|
+
* indexing the root rank array one past its allocated length).
|
|
183
|
+
* @see lib/dotgen/dotinit.c:dotLayout (static) — `if (rc != 0) return rc;`
|
|
184
|
+
* after `dot_mincross`, propagated through `doDot`/`dot_layout` to also
|
|
185
|
+
* skip `dotneato_postprocess`.
|
|
186
|
+
*
|
|
187
|
+
* C applies the identical `if (r != 0) return r;` check after `dot_position`
|
|
188
|
+
* (dotinit.c:322-325), also skipping `dotPhasePost` (removeFill/sameports/
|
|
189
|
+
* splines/compound) and `gvPostprocess`. `dot_position` fails when
|
|
190
|
+
* `dot_concentrate` fails (`rebuild_vlists: lead is null for rank N`, e.g.
|
|
191
|
+
* corpus 2825 — a cross-cluster rank=same plus rankset-conflict deletions
|
|
192
|
+
* leaves a cluster rank with no rankleader); C's renderer then walks the
|
|
193
|
+
* still-fully-connected `Agraph_t` but every node fails `node_in_box`
|
|
194
|
+
* against the never-computed (all-zero) `GD_bb`, so only cluster frames
|
|
195
|
+
* (also zero-sized, since `set_aspect`/cluster geometry never ran) reach
|
|
196
|
+
* the page. The port previously discarded `dotPosition`'s return value and
|
|
197
|
+
* always ran `dotPhasePost`, producing a full (non-degenerate) rendering
|
|
198
|
+
* where C produces near-empty output.
|
|
199
|
+
*/
|
|
200
|
+
export function dotLayoutPipeline(g: Graph): void {
|
|
201
|
+
const maxphase = getAttrInt(g, 'maxphase', -1);
|
|
202
|
+
dotPhaseInit(g);
|
|
203
|
+
dotRank(g);
|
|
204
|
+
if (maxphase === 1) return;
|
|
205
|
+
const rc = dotMincross(g);
|
|
206
|
+
if (rc !== 0) return;
|
|
207
|
+
if (maxphase === 2) return;
|
|
208
|
+
const posRc = dotPosition(g);
|
|
209
|
+
if (posRc !== 0) return;
|
|
210
|
+
if (maxphase === 3) return;
|
|
211
|
+
dotPhasePost(g);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// ---------------------------------------------------------------------------
|
|
215
|
+
// doDot — the pack-aware layout dispatcher
|
|
216
|
+
// @see lib/dotgen/dotinit.c:doDot
|
|
217
|
+
// ---------------------------------------------------------------------------
|
|
218
|
+
|
|
219
|
+
/** Offset/margin default for packing, in points. @see lib/pack/pack.h:CL_OFFSET */
|
|
220
|
+
const CL_OFFSET = 8;
|
|
221
|
+
|
|
222
|
+
/** A zeroed PackInfo the getPack* readers fill in. @see lib/pack/pack.h:pack_info */
|
|
223
|
+
function newPackInfo(): PackInfo {
|
|
224
|
+
return {
|
|
225
|
+
aspect: 1, sz: 0, margin: CL_OFFSET, doSplines: false,
|
|
226
|
+
mode: PackMode.Node, fixed: null, vals: null, flags: 0,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Port of C's `doDot`: when `pack`/`packmode` is set, decompose the graph into
|
|
232
|
+
* connected components, lay out each one, and polyomino-pack them; otherwise
|
|
233
|
+
* (and for a single component, or a non-R_NONE ratio) fall back to whole-graph
|
|
234
|
+
* `dotLayoutPipeline`. The thin component loop + cluster carry live in
|
|
235
|
+
* pack-components.ts (ADR-1). `dotLayoutPipeline` already includes the root
|
|
236
|
+
* `gvPostprocess`, so the simple arms map exactly to C's `dotLayout(g)` +
|
|
237
|
+
* `dotneato_postprocess(g)`; the pack arm runs `gvPostprocess` once inside
|
|
238
|
+
* `layoutAndPack`.
|
|
239
|
+
*
|
|
240
|
+
* @see lib/dotgen/dotinit.c:doDot
|
|
241
|
+
*/
|
|
242
|
+
export function doDot(g: Graph): void {
|
|
243
|
+
const pinfo = newPackInfo();
|
|
244
|
+
const Pack = getPack(g, -1, CL_OFFSET);
|
|
245
|
+
const mode = getPackModeInfo(g, PackMode.Undef, pinfo);
|
|
246
|
+
getPackInfo(g, PackMode.Node, CL_OFFSET, pinfo);
|
|
247
|
+
// No pack information: old dot with components handled during layout.
|
|
248
|
+
if (mode === PackMode.Undef && Pack < 0) {
|
|
249
|
+
dotLayoutPipeline(g);
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
// Fill in default values (C doDot: l_undef → l_graph; Pack<0 → CL_OFFSET).
|
|
253
|
+
let pack = Pack;
|
|
254
|
+
if (mode === PackMode.Undef) pinfo.mode = PackMode.Graph;
|
|
255
|
+
else if (pack < 0) pack = CL_OFFSET;
|
|
256
|
+
pinfo.margin = pack; // pack >= 0 here
|
|
257
|
+
pinfo.fixed = null;
|
|
258
|
+
// Cluster-aware decomposition: cluster members stay in one component, and each
|
|
259
|
+
// component carries a clone of its clusters/same-rank sets (C's cccomps).
|
|
260
|
+
const { comps, origOf } = cccompsWithClusters(g);
|
|
261
|
+
if (comps.length === 1) {
|
|
262
|
+
dotLayoutPipeline(g);
|
|
263
|
+
} else if (ratioIsNone(g)) {
|
|
264
|
+
pinfo.doSplines = true;
|
|
265
|
+
layoutAndPack(g, comps, pinfo, origOf);
|
|
266
|
+
} else {
|
|
267
|
+
// Non-trivial ratio with multiple components: C lays out the whole graph.
|
|
268
|
+
dotLayoutPipeline(g);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// ---------------------------------------------------------------------------
|
|
273
|
+
// dotLayoutEntry — the public LayoutEngine.layout function
|
|
274
|
+
// ---------------------------------------------------------------------------
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* LayoutEngine.layout implementation for the dot engine.
|
|
278
|
+
* Skips empty graphs (matching C's agnnodes(g) guard).
|
|
279
|
+
*
|
|
280
|
+
* @see lib/dotgen/dotinit.c:dot_layout
|
|
281
|
+
*/
|
|
282
|
+
export function dotLayoutEntry(g: Graph): void {
|
|
283
|
+
if (g.nodes.size === 0) return;
|
|
284
|
+
doDot(g);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// ---------------------------------------------------------------------------
|
|
288
|
+
// DOT_LAYOUT_ENGINE — registration object
|
|
289
|
+
// ---------------------------------------------------------------------------
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* The dot layout engine registration object.
|
|
293
|
+
* Register with GvcContext.register(DOT_LAYOUT_ENGINE).
|
|
294
|
+
*
|
|
295
|
+
* @see lib/gvc/gvplugin.h:gvlayout_engine_s
|
|
296
|
+
* @see lib/dotgen/dotinit.c:dot_layout
|
|
297
|
+
*/
|
|
298
|
+
export const DOT_LAYOUT_ENGINE: LayoutEngine = {
|
|
299
|
+
type: 'dot',
|
|
300
|
+
layout: dotLayoutEntry,
|
|
301
|
+
cleanup: dotCleanup,
|
|
302
|
+
};
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
// SPDX-License-Identifier: EPL-2.0
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* TypeScript port of lib/dotgen/dotinit.c — initialisation helpers for
|
|
5
|
+
* the dot layout pipeline (dot_init_node, dot_init_edge, dot_init_subg,
|
|
6
|
+
* dot_init_node_edge, removeFill, dot_cleanup).
|
|
7
|
+
*
|
|
8
|
+
* @see lib/dotgen/dotinit.c
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { Graph } from '../../model/graph.js';
|
|
12
|
+
import type { Node } from '../../model/node.js';
|
|
13
|
+
import type { Edge } from '../../model/edge.js';
|
|
14
|
+
import { commonInitNode, lateInt } from '../../common/nodeinit.js';
|
|
15
|
+
import { nonconstraintEdge } from './classify.js';
|
|
16
|
+
import { nodeAttr } from '../../common/poly-init.js';
|
|
17
|
+
import { NORMAL, deleteFastNode, removeFromRank } from './fastgr.js';
|
|
18
|
+
import { mapbool } from './rank.js';
|
|
19
|
+
import { initEdgeLabels } from '../../common/edge-label-init.js';
|
|
20
|
+
import { graphInit } from '../../common/graph-init.js';
|
|
21
|
+
import { agsubg, agdelnode, agdelsubg } from '../../model/cgraph-ops.js';
|
|
22
|
+
import { nodesInSeq } from './decomp.js';
|
|
23
|
+
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
// RANKDIR constants — re-exported from the shared graph_init port, which owns
|
|
26
|
+
// them (they are const.h values, not dot's). Kept exported here so the existing
|
|
27
|
+
// importers (postproc, compass-port, splines-flat, …) do not have to churn.
|
|
28
|
+
// @see lib/common/const.h RANKDIR_TB/LR/BT/RL
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
|
|
31
|
+
export { RANKDIR_TB, RANKDIR_LR, RANKDIR_BT, RANKDIR_RL } from '../../common/graph-init.js';
|
|
32
|
+
|
|
33
|
+
// ---------------------------------------------------------------------------
|
|
34
|
+
// dotGraphInit — dot's binding of the shared graph_init
|
|
35
|
+
// @see lib/common/input.c:600 graph_init
|
|
36
|
+
// @see lib/dotgen/dotinit.c:352 initSubg (GD_rankdir2 propagation)
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* dot's call into the engine-agnostic `graph_init`, plus the one piece of
|
|
41
|
+
* rankdir handling that is genuinely dot's: propagating GD_rankdir2 down to the
|
|
42
|
+
* clusters (C does this in dot's own `initSubg`, dotinit.c:352 — NOT in
|
|
43
|
+
* graph_init).
|
|
44
|
+
*
|
|
45
|
+
* dot is the only engine with `LAYOUT_USES_RANKDIR`
|
|
46
|
+
* (plugin/dot_layout/gvlayout_dot_layout.c:27), hence `useRankdir = true`: the
|
|
47
|
+
* effective rankdir (bits 0-1) tracks the attr instead of being pinned to TB.
|
|
48
|
+
*
|
|
49
|
+
* @see lib/common/input.c:600 graph_init
|
|
50
|
+
* @see lib/gvc/gvlayout.c:81 (graph_init(g, LAYOUT_USES_RANKDIR))
|
|
51
|
+
* @see lib/dotgen/dotinit.c:352 initSubg
|
|
52
|
+
*/
|
|
53
|
+
export function dotGraphInit(g: Graph): void {
|
|
54
|
+
graphInit(g, true);
|
|
55
|
+
initSubgraphRankdir(g);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Recursively propagate the root graph's rankdir2 to all subgraphs.
|
|
60
|
+
* @see lib/dotgen/dotinit.c:352
|
|
61
|
+
*/
|
|
62
|
+
function initSubgraphRankdir(g: Graph): void {
|
|
63
|
+
const nc = g.info.n_cluster ?? 0;
|
|
64
|
+
const clust = g.info.clust;
|
|
65
|
+
for (let c = 1; c <= nc; c++) {
|
|
66
|
+
if (clust && clust[c - 1]) {
|
|
67
|
+
const sg = clust[c - 1];
|
|
68
|
+
sg.info.rankdir = g.info.rankdir;
|
|
69
|
+
sg.info.flip = g.info.flip;
|
|
70
|
+
initSubgraphRankdir(sg);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// ---------------------------------------------------------------------------
|
|
76
|
+
// CL_CROSS — cost of cluster skeleton edge crossing
|
|
77
|
+
// @see lib/common/const.h:CL_CROSS
|
|
78
|
+
// ---------------------------------------------------------------------------
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Crossing penalty for cluster-skeleton / same-group edges.
|
|
82
|
+
* C uses 1000 except under _WIN32, where 100 avoids a 16-bit overflow.
|
|
83
|
+
* The oracle platform (and every modern build) takes the 1000 branch;
|
|
84
|
+
* mincross best-order selection on penalty plateaus depends on it.
|
|
85
|
+
* @see lib/common/const.h:CL_CROSS
|
|
86
|
+
*/
|
|
87
|
+
export const CL_CROSS = 1000;
|
|
88
|
+
|
|
89
|
+
// ---------------------------------------------------------------------------
|
|
90
|
+
// dotInitNode
|
|
91
|
+
// ---------------------------------------------------------------------------
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Initialises per-node layout data for the dot engine.
|
|
95
|
+
* Mirrors dot_init_node: binds Agnodeinfo_t and allocates edge lists.
|
|
96
|
+
*
|
|
97
|
+
* @see lib/dotgen/dotinit.c:dot_init_node
|
|
98
|
+
*/
|
|
99
|
+
export function dotInitNode(n: Node): void {
|
|
100
|
+
n.info.UF_size = 1;
|
|
101
|
+
if (!n.info.in) n.info.in = { list: [], size: 0 };
|
|
102
|
+
if (!n.info.out) n.info.out = { list: [], size: 0 };
|
|
103
|
+
if (!n.info.flat_in) n.info.flat_in = { list: [], size: 0 };
|
|
104
|
+
if (!n.info.flat_out) n.info.flat_out = { list: [], size: 0 };
|
|
105
|
+
if (!n.info.other) n.info.other = { list: [], size: 0 };
|
|
106
|
+
// Default lw = rw = 0.75in/2 × 72 = 27 pts; ht = 0.5in × 72 = 36 pts. C's
|
|
107
|
+
// dot_init_node has no such fallback (gv_nodesize always sets a size); this is
|
|
108
|
+
// only a guard for a node that reached here UNSIZED. Test `=== undefined`, not
|
|
109
|
+
// falsiness, so a legitimately-computed 0 (shape=plain) is not clobbered.
|
|
110
|
+
if (n.info.lw === undefined) n.info.lw = 27;
|
|
111
|
+
if (n.info.rw === undefined) n.info.rw = 27;
|
|
112
|
+
if (n.info.ht === undefined) n.info.ht = 36;
|
|
113
|
+
// Mark as a real (NORMAL) node so firstNormalNode() can find it.
|
|
114
|
+
n.info.node_type = NORMAL;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// ---------------------------------------------------------------------------
|
|
118
|
+
// dotInitEdge
|
|
119
|
+
// ---------------------------------------------------------------------------
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* True when tail and head carry the same non-empty `group` attribute.
|
|
123
|
+
* C compares interned refstr pointers (`tailgroup == headgroup`); cgraph's
|
|
124
|
+
* per-graph string pool makes that exactly content equality, and the
|
|
125
|
+
* `tailgroup[0]` guard excludes the shared "" default.
|
|
126
|
+
* @see lib/dotgen/dotinit.c:dot_init_edge (tailgroup/headgroup check)
|
|
127
|
+
*/
|
|
128
|
+
export function sameNonemptyGroup(e: Edge): boolean {
|
|
129
|
+
const tailgroup = nodeAttr(e.tail, e.tail.root, 'group') ?? '';
|
|
130
|
+
const headgroup = nodeAttr(e.head, e.head.root, 'group') ?? '';
|
|
131
|
+
return tailgroup !== '' && tailgroup === headgroup;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Reads the `constraint` edge attr and stores the parsed boolean on e.info.
|
|
136
|
+
* Absent or empty attr leaves e.info.constraint unchanged (C: constr[0] guard).
|
|
137
|
+
* @see lib/dotgen/rank.c:is_nonconstraint
|
|
138
|
+
* @see lib/common/utils.c:mapbool
|
|
139
|
+
*/
|
|
140
|
+
function initEdgeConstraint(e: Edge): void {
|
|
141
|
+
const s = e.attrs.get('constraint');
|
|
142
|
+
if (s !== undefined && s !== '') e.info.constraint = mapbool(s);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Applies the same-group penalty to xpenalty and weight.
|
|
147
|
+
* @see lib/dotgen/dotinit.c:dot_init_edge (tailgroup/headgroup block)
|
|
148
|
+
*/
|
|
149
|
+
function applyGroupPenalty(e: Edge): void {
|
|
150
|
+
if (!sameNonemptyGroup(e)) return;
|
|
151
|
+
e.info.xpenalty = CL_CROSS;
|
|
152
|
+
e.info.weight = (e.info.weight ?? 1) * 100;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Zeroes xpenalty and weight when the edge is a non-constraint edge.
|
|
157
|
+
* @see lib/dotgen/dotinit.c:dot_init_edge:73-76
|
|
158
|
+
*/
|
|
159
|
+
function applyNonconstraintZero(e: Edge): void {
|
|
160
|
+
if (!nonconstraintEdge(e)) return;
|
|
161
|
+
e.info.xpenalty = 0;
|
|
162
|
+
e.info.weight = 0;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Initialises per-edge layout data for the dot engine.
|
|
167
|
+
* Mirrors dot_init_edge: sets weight, count, xpenalty, minlen.
|
|
168
|
+
*
|
|
169
|
+
* @see lib/dotgen/dotinit.c:dot_init_edge
|
|
170
|
+
*/
|
|
171
|
+
export function dotInitEdge(e: Edge): void {
|
|
172
|
+
initEdgeConstraint(e);
|
|
173
|
+
// C: ED_weight(e) = late_int(e, E_weight, 1, 0) — honor an explicit weight
|
|
174
|
+
// attr (default 1, min 0). dotInitEdge is re-run on edges the flat-label
|
|
175
|
+
// machinery has stamped with a synthetic weight (e.g. 10000); preserve that
|
|
176
|
+
// when there is no attr, rather than resetting to the default. The group/
|
|
177
|
+
// nonconstraint adjustments below then apply on top, matching C's order.
|
|
178
|
+
// @see lib/dotgen/dotinit.c:65
|
|
179
|
+
e.info.weight = e.attrs.has('weight')
|
|
180
|
+
? lateInt(e.attrs.get('weight'), 1, 0)
|
|
181
|
+
: (e.info.weight ?? 1);
|
|
182
|
+
e.info.count = 1;
|
|
183
|
+
e.info.xpenalty = 1;
|
|
184
|
+
applyGroupPenalty(e);
|
|
185
|
+
applyNonconstraintZero(e);
|
|
186
|
+
// late_int semantics: default 1, minimum 0.
|
|
187
|
+
// @see lib/dotgen/dotinit.c:85 ED_minlen(e) = late_int(e, E_minlen, 1, 0)
|
|
188
|
+
e.info.minlen = lateInt(e.attrs.get('minlen'), 1, 0);
|
|
189
|
+
// samehead / sametail group ids for shared-port merging. C reads these via
|
|
190
|
+
// agxget(e, E_samehead/E_sametail) in dot_sameports and treats an empty
|
|
191
|
+
// string (id[0] == '\0') as "no group". Without populating these, the ported
|
|
192
|
+
// dotSameports (wired in index.ts) never fires and same-* edges route to the
|
|
193
|
+
// node center instead of a merged port. @see lib/dotgen/sameport.c:dot_sameports
|
|
194
|
+
const sh = e.attrs.get('samehead');
|
|
195
|
+
e.info.samehead = sh ? sh : undefined;
|
|
196
|
+
const st = e.attrs.get('sametail');
|
|
197
|
+
e.info.sametail = st ? st : undefined;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// ---------------------------------------------------------------------------
|
|
201
|
+
// dotInitSubg
|
|
202
|
+
// ---------------------------------------------------------------------------
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Recursively initialises subgraph-level attributes with defaults.
|
|
206
|
+
* Mirrors dot_init_subg: binds Agraphinfo_t and propagates params.
|
|
207
|
+
*
|
|
208
|
+
* nodesep defaults: 0.25 in × 72 = 18 pts; ranksep: 0.5 in × 72 = 36 pts.
|
|
209
|
+
*
|
|
210
|
+
* @see lib/dotgen/dotinit.c:dot_init_subg
|
|
211
|
+
*/
|
|
212
|
+
export function dotInitSubg(g: Graph): void {
|
|
213
|
+
if (g.info.nodesep === undefined) g.info.nodesep = 18;
|
|
214
|
+
if (g.info.ranksep === undefined) g.info.ranksep = 36;
|
|
215
|
+
const nc = g.info.n_cluster ?? 0;
|
|
216
|
+
const clust = g.info.clust;
|
|
217
|
+
for (let c = 1; c <= nc; c++) {
|
|
218
|
+
if (clust && clust[c - 1]) dotInitSubg(clust[c - 1]);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// ---------------------------------------------------------------------------
|
|
223
|
+
// dotInitNodeEdge
|
|
224
|
+
// ---------------------------------------------------------------------------
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Calls commonInitNode (shape-aware, label-driven sizing) then
|
|
228
|
+
* dotInitNode for every node, then dotInitEdge for every edge.
|
|
229
|
+
*
|
|
230
|
+
* @see lib/dotgen/dotinit.c:dot_init_node_edge
|
|
231
|
+
* @see lib/dotgen/dotinit.c:dot_init_node (common_init_node + gv_nodesize)
|
|
232
|
+
*/
|
|
233
|
+
export function dotInitNodeEdge(g: Graph): void {
|
|
234
|
+
for (const n of nodesInSeq(g)) {
|
|
235
|
+
commonInitNode(n, g);
|
|
236
|
+
dotInitNode(n);
|
|
237
|
+
}
|
|
238
|
+
const measurer = g.root.info.gvc?.textMeasurer;
|
|
239
|
+
for (const e of g.edges) {
|
|
240
|
+
dotInitEdge(e);
|
|
241
|
+
if (measurer) initEdgeLabels(e, g, measurer);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// ---------------------------------------------------------------------------
|
|
246
|
+
// removeFill
|
|
247
|
+
// ---------------------------------------------------------------------------
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Deletes the placeholder fill-nodes inserted by fillRanks (NEW_RANK mode)
|
|
251
|
+
* once positioning is done, so they never render. Looks up the `_new_rank`
|
|
252
|
+
* subgraph under the root graph; if absent (the common no-newrank case) this
|
|
253
|
+
* is a no-op. Operates on `g.root` throughout because fillRanks created the
|
|
254
|
+
* fill nodes and their ranks under the root.
|
|
255
|
+
*
|
|
256
|
+
* @see lib/dotgen/dotinit.c:removeFill
|
|
257
|
+
*/
|
|
258
|
+
export function removeFill(g: Graph): void {
|
|
259
|
+
const sg = agsubg(g.root, '_new_rank', false);
|
|
260
|
+
if (sg === null) return;
|
|
261
|
+
// Snapshot first: agdelnode mutates membership (including sg) during the
|
|
262
|
+
// loop. C's nxt = agnxtnode look-ahead tolerates deleting the current node;
|
|
263
|
+
// the snapshot is its faithful equivalent.
|
|
264
|
+
const fillNodes = nodesInSeq(sg);
|
|
265
|
+
for (const n of fillNodes) {
|
|
266
|
+
deleteFastNode(g.root, n);
|
|
267
|
+
removeFromRank(g.root, n);
|
|
268
|
+
// dot_cleanup_node has no equivalent in this port (GC reclaims the node).
|
|
269
|
+
agdelnode(g.root, n);
|
|
270
|
+
}
|
|
271
|
+
agdelsubg(g.root, sg);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// ---------------------------------------------------------------------------
|
|
275
|
+
// dotCleanup
|
|
276
|
+
// ---------------------------------------------------------------------------
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Clears all edge lists and linked-list pointers from nodes in the fast-graph,
|
|
280
|
+
* releasing layout state without destroying the underlying graph structure.
|
|
281
|
+
*
|
|
282
|
+
* Mirrors dot_cleanup: frees virtual node list then per-node edge lists.
|
|
283
|
+
*
|
|
284
|
+
* @see lib/dotgen/dotinit.c:dot_cleanup
|
|
285
|
+
*/
|
|
286
|
+
export function dotCleanup(g: Graph): void {
|
|
287
|
+
let n: Node | undefined = g.info.nlist;
|
|
288
|
+
while (n !== undefined) {
|
|
289
|
+
const next: Node | undefined = n.info.next;
|
|
290
|
+
n.info.in = undefined;
|
|
291
|
+
n.info.out = undefined;
|
|
292
|
+
n.info.flat_in = undefined;
|
|
293
|
+
n.info.flat_out = undefined;
|
|
294
|
+
n.info.other = undefined;
|
|
295
|
+
n.info.next = undefined;
|
|
296
|
+
n.info.prev = undefined;
|
|
297
|
+
n = next;
|
|
298
|
+
}
|
|
299
|
+
g.info.nlist = undefined;
|
|
300
|
+
}
|