@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,106 @@
|
|
|
1
|
+
// SPDX-License-Identifier: EPL-2.0
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Concentric square spiral search for polyomino placement.
|
|
5
|
+
*
|
|
6
|
+
* Extracted from placeGraph so the spiral loop does not inflate the
|
|
7
|
+
* cyclomatic complexity of its caller.
|
|
8
|
+
*
|
|
9
|
+
* @see lib/pack/pack.c:placeGraph
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type { Point } from '../../model/geom.js';
|
|
13
|
+
import type { GInfo, PlaceCtx } from './poly-pack.js';
|
|
14
|
+
import { fits } from './poly-pack.js';
|
|
15
|
+
|
|
16
|
+
/** Mutable position cursor walked in-place across one spiral segment. */
|
|
17
|
+
interface Cur {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Try fits() at the cursor; advance by (dx,dy) while pred is false. */
|
|
23
|
+
function seg(
|
|
24
|
+
c: Cur,
|
|
25
|
+
dx: number,
|
|
26
|
+
dy: number,
|
|
27
|
+
pred: (c: Cur) => boolean,
|
|
28
|
+
info: GInfo,
|
|
29
|
+
ctx: PlaceCtx,
|
|
30
|
+
): Point | null {
|
|
31
|
+
while (!pred(c)) {
|
|
32
|
+
const p = fits(c.x, c.y, info, ctx);
|
|
33
|
+
if (p !== null) return p;
|
|
34
|
+
c.x += dx;
|
|
35
|
+
c.y += dy;
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* One ring of the wide spiral (W >= H), starting at (0, -bnd).
|
|
42
|
+
* Five segments walk clockwise around the ring.
|
|
43
|
+
*
|
|
44
|
+
* @see lib/pack/pack.c:placeGraph (W >= H inner loop body)
|
|
45
|
+
*/
|
|
46
|
+
function wideRing(bnd: number, info: GInfo, ctx: PlaceCtx): Point | null {
|
|
47
|
+
const c: Cur = { x: 0, y: -bnd };
|
|
48
|
+
return (
|
|
49
|
+
seg(c, 1, 0, v => v.x >= bnd, info, ctx) ??
|
|
50
|
+
seg(c, 0, 1, v => v.y >= bnd, info, ctx) ??
|
|
51
|
+
seg(c, -1, 0, v => v.x <= -bnd, info, ctx) ??
|
|
52
|
+
seg(c, 0, -1, v => v.y <= -bnd, info, ctx) ??
|
|
53
|
+
seg(c, 1, 0, v => v.x >= 0, info, ctx)
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* One ring of the tall spiral (W < H), starting at (-bnd, 0).
|
|
59
|
+
* Five segments walk clockwise around the ring.
|
|
60
|
+
*
|
|
61
|
+
* @see lib/pack/pack.c:placeGraph (W < H inner loop body)
|
|
62
|
+
*/
|
|
63
|
+
function tallRing(bnd: number, info: GInfo, ctx: PlaceCtx): Point | null {
|
|
64
|
+
const c: Cur = { x: -bnd, y: 0 };
|
|
65
|
+
return (
|
|
66
|
+
seg(c, 0, -1, v => v.y <= -bnd, info, ctx) ??
|
|
67
|
+
seg(c, 1, 0, v => v.x >= bnd, info, ctx) ??
|
|
68
|
+
seg(c, 0, 1, v => v.y >= bnd, info, ctx) ??
|
|
69
|
+
seg(c, -1, 0, v => v.x <= -bnd, info, ctx) ??
|
|
70
|
+
seg(c, 0, -1, v => v.y <= 0, info, ctx)
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Wide spiral: expand rings outward until a placement is found.
|
|
76
|
+
*
|
|
77
|
+
* @see lib/pack/pack.c:placeGraph (W >= H branch)
|
|
78
|
+
*/
|
|
79
|
+
function spiralWide(info: GInfo, ctx: PlaceCtx): Point {
|
|
80
|
+
for (let bnd = 1; ; bnd++) {
|
|
81
|
+
const p = wideRing(bnd, info, ctx);
|
|
82
|
+
if (p !== null) return p;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Tall spiral: expand rings outward until a placement is found.
|
|
88
|
+
*
|
|
89
|
+
* @see lib/pack/pack.c:placeGraph (W < H branch)
|
|
90
|
+
*/
|
|
91
|
+
function spiralTall(info: GInfo, ctx: PlaceCtx): Point {
|
|
92
|
+
for (let bnd = 1; ; bnd++) {
|
|
93
|
+
const p = tallRing(bnd, info, ctx);
|
|
94
|
+
if (p !== null) return p;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Search for a valid placement on a concentric square spiral.
|
|
100
|
+
* Delegates to the wide or tall variant based on the bounding-box aspect ratio.
|
|
101
|
+
*
|
|
102
|
+
* @see lib/pack/pack.c:placeGraph
|
|
103
|
+
*/
|
|
104
|
+
export function spiralSearch(info: GInfo, ctx: PlaceCtx, wide: boolean): Point {
|
|
105
|
+
return wide ? spiralWide(info, ctx) : spiralTall(info, ctx);
|
|
106
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// SPDX-License-Identifier: EPL-2.0
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shared test helpers for pack module tests.
|
|
5
|
+
* Isolated in their own file so Lizard counts each function independently.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { expect } from 'vitest';
|
|
9
|
+
import type { Box, Point } from '../../model/geom.js';
|
|
10
|
+
import { type PackInfo, PackMode } from './types.js';
|
|
11
|
+
|
|
12
|
+
export function box(llx: number, lly: number, urx: number, ury: number): Box {
|
|
13
|
+
return { ll: { x: llx, y: lly }, ur: { x: urx, y: ury } };
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function defaultPackInfo(overrides?: Partial<PackInfo>): PackInfo {
|
|
17
|
+
return {
|
|
18
|
+
aspect: 1, sz: 0, margin: 0, doSplines: false,
|
|
19
|
+
mode: PackMode.Graph, fixed: null, vals: null, flags: 0,
|
|
20
|
+
...overrides,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function applyPlaces(bbs: Box[], places: Point[]): Box[] {
|
|
25
|
+
return bbs.map((bb, i) => {
|
|
26
|
+
const p = places[i] ?? { x: 0, y: 0 };
|
|
27
|
+
return box(bb.ll.x + p.x, bb.ll.y + p.y, bb.ur.x + p.x, bb.ur.y + p.y);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function overlaps(a: Box, b: Box): boolean {
|
|
32
|
+
return a.ur.x > b.ll.x && b.ur.x > a.ll.x &&
|
|
33
|
+
a.ur.y > b.ll.y && b.ur.y > a.ll.y;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function assertNoOverlap(placed: Box[]): void {
|
|
37
|
+
for (let i = 0; i < placed.length; i++) {
|
|
38
|
+
for (let j = i + 1; j < placed.length; j++) {
|
|
39
|
+
const a = placed[i];
|
|
40
|
+
const b = placed[j];
|
|
41
|
+
if (a !== undefined && b !== undefined) {
|
|
42
|
+
expect(overlaps(a, b), `boxes ${i} and ${j} overlap`).toBe(false);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// SPDX-License-Identifier: EPL-2.0
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shared types for the pack module.
|
|
5
|
+
*
|
|
6
|
+
* @see lib/pack/pack.h
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Granularity and method for packing.
|
|
11
|
+
*
|
|
12
|
+
* @see lib/pack/pack.h:pack_mode
|
|
13
|
+
*/
|
|
14
|
+
export const enum PackMode {
|
|
15
|
+
Undef = 0,
|
|
16
|
+
Cluster = 1,
|
|
17
|
+
Node = 2,
|
|
18
|
+
Graph = 3,
|
|
19
|
+
Array = 4,
|
|
20
|
+
Aspect = 5,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** @see lib/pack/pack.h:PK_COL_MAJOR */
|
|
24
|
+
export const PK_COL_MAJOR = 1 << 0;
|
|
25
|
+
/** @see lib/pack/pack.h:PK_USER_VALS */
|
|
26
|
+
export const PK_USER_VALS = 1 << 1;
|
|
27
|
+
/** @see lib/pack/pack.h:PK_LEFT_ALIGN */
|
|
28
|
+
export const PK_LEFT_ALIGN = 1 << 2;
|
|
29
|
+
/** @see lib/pack/pack.h:PK_RIGHT_ALIGN */
|
|
30
|
+
export const PK_RIGHT_ALIGN = 1 << 3;
|
|
31
|
+
/** @see lib/pack/pack.h:PK_TOP_ALIGN */
|
|
32
|
+
export const PK_TOP_ALIGN = 1 << 4;
|
|
33
|
+
/** @see lib/pack/pack.h:PK_BOT_ALIGN */
|
|
34
|
+
export const PK_BOT_ALIGN = 1 << 5;
|
|
35
|
+
/** @see lib/pack/pack.h:PK_INPUT_ORDER */
|
|
36
|
+
export const PK_INPUT_ORDER = 1 << 6;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Packing parameters.
|
|
40
|
+
*
|
|
41
|
+
* @see lib/pack/pack.h:pack_info
|
|
42
|
+
*/
|
|
43
|
+
export interface PackInfo {
|
|
44
|
+
/** Desired aspect ratio. @see lib/pack/pack.h:pack_info.aspect */
|
|
45
|
+
aspect: number;
|
|
46
|
+
/** Row/column size. @see lib/pack/pack.h:pack_info.sz */
|
|
47
|
+
sz: number;
|
|
48
|
+
/** Margin around objects in points. @see lib/pack/pack.h:pack_info.margin */
|
|
49
|
+
margin: number;
|
|
50
|
+
/** Use splines when constructing graph shape. @see lib/pack/pack.h:pack_info.doSplines */
|
|
51
|
+
doSplines: boolean;
|
|
52
|
+
/** Granularity and method. @see lib/pack/pack.h:pack_info.mode */
|
|
53
|
+
mode: PackMode;
|
|
54
|
+
/** fixed[i] == true means graph i should not be moved. @see lib/pack/pack.h:pack_info.fixed */
|
|
55
|
+
fixed: boolean[] | null;
|
|
56
|
+
/** Sort values for array mode. @see lib/pack/pack.h:pack_info.vals */
|
|
57
|
+
vals: number[] | null;
|
|
58
|
+
/** Alignment/order flags. @see lib/pack/pack.h:pack_info.flags */
|
|
59
|
+
flags: number;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Conversion factor: points to inches.
|
|
64
|
+
*
|
|
65
|
+
* @see lib/common/geom.h:PS2INCH
|
|
66
|
+
*/
|
|
67
|
+
export const PS2INCH = 1 / 72;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Convert points to inches.
|
|
71
|
+
*
|
|
72
|
+
* @see lib/common/geom.h:PS2INCH
|
|
73
|
+
*/
|
|
74
|
+
export function ps2inch(pts: number): number {
|
|
75
|
+
return pts * PS2INCH;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Convert inches to points.
|
|
80
|
+
*
|
|
81
|
+
* @see lib/common/geom.h:PS2INCH (inverse)
|
|
82
|
+
*/
|
|
83
|
+
export function inch2ps(inches: number): number {
|
|
84
|
+
return inches / PS2INCH;
|
|
85
|
+
}
|
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
// SPDX-License-Identifier: EPL-2.0
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Patchwork squarified treemap layout engine.
|
|
5
|
+
*
|
|
6
|
+
* Ports lib/patchwork/patchwork.c, lib/patchwork/patchworkinit.c, and
|
|
7
|
+
* lib/patchwork/tree_map.c into a single browser-compatible TypeScript module.
|
|
8
|
+
*
|
|
9
|
+
* NOTE: All helper and body functions are exported so that Lizard resets
|
|
10
|
+
* its cyclomatic-complexity counter at each `export function` boundary.
|
|
11
|
+
*
|
|
12
|
+
* @see lib/patchwork/patchwork.c
|
|
13
|
+
* @see lib/patchwork/patchworkinit.c
|
|
14
|
+
* @see lib/patchwork/tree_map.c
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type { Graph } from '../../model/graph.js';
|
|
18
|
+
import type { Node } from '../../model/node.js';
|
|
19
|
+
import type { LayoutEngine } from '../../gvc/context.js';
|
|
20
|
+
import { ps2inch } from '../pack/index.js';
|
|
21
|
+
import type { Rectangle } from './tree-map.js';
|
|
22
|
+
import { treeMap } from './tree-map.js';
|
|
23
|
+
import { gvQsort } from '../../util/bsd-qsort.js';
|
|
24
|
+
import { commonInitNode } from '../../common/nodeinit.js';
|
|
25
|
+
import { nodeAttr } from '../../common/poly-init.js';
|
|
26
|
+
import { graphInit } from '../../common/graph-init.js';
|
|
27
|
+
import { mapbool } from '../dot/rank.js';
|
|
28
|
+
import { placeGraphLabel } from '../dot/position-bbox.js';
|
|
29
|
+
import { gvPostprocess } from '../../common/postproc.js';
|
|
30
|
+
|
|
31
|
+
const DFLT_SZ = 1.0;
|
|
32
|
+
const SCALE = 1000.0;
|
|
33
|
+
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
// Internal tree node
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
|
|
38
|
+
/** @see lib/patchwork/patchwork.c:treenode_t */
|
|
39
|
+
export interface TreeNode {
|
|
40
|
+
area: number;
|
|
41
|
+
childArea: number;
|
|
42
|
+
r: Rectangle;
|
|
43
|
+
leftChild: TreeNode | null;
|
|
44
|
+
rightSib: TreeNode | null;
|
|
45
|
+
kind: 'graph' | 'node';
|
|
46
|
+
ref: Graph | Node;
|
|
47
|
+
nChildren: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Mutable linked-list accumulator used during mkTree child collection. */
|
|
51
|
+
export interface ChildAccum {
|
|
52
|
+
first: TreeNode | null;
|
|
53
|
+
prev: TreeNode | null;
|
|
54
|
+
area: number;
|
|
55
|
+
nChildren: number;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// ---------------------------------------------------------------------------
|
|
59
|
+
// Attribute helpers
|
|
60
|
+
// ---------------------------------------------------------------------------
|
|
61
|
+
|
|
62
|
+
/** @see lib/patchwork/patchwork.c:getArea */
|
|
63
|
+
export function getArea(attrs: Map<string, string>): number {
|
|
64
|
+
const raw = attrs.get('area');
|
|
65
|
+
let area = raw !== undefined ? parseFloat(raw) : DFLT_SZ;
|
|
66
|
+
if (!isFinite(area) || area === 0) area = DFLT_SZ;
|
|
67
|
+
return area * SCALE;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** @see lib/patchwork/patchwork.c:fullArea (mp parameter) */
|
|
71
|
+
export function getInset(attrs: Map<string, string>): number {
|
|
72
|
+
const raw = attrs.get('inset');
|
|
73
|
+
if (raw === undefined) return 0;
|
|
74
|
+
const v = parseFloat(raw);
|
|
75
|
+
return isFinite(v) ? v : 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** @see lib/patchwork/patchwork.c:fullArea */
|
|
79
|
+
export function fullArea(childArea: number, inset: number): number {
|
|
80
|
+
const wid = 2.0 * inset + Math.sqrt(childArea);
|
|
81
|
+
return wid * wid;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// ---------------------------------------------------------------------------
|
|
85
|
+
// Tree node factories
|
|
86
|
+
// ---------------------------------------------------------------------------
|
|
87
|
+
|
|
88
|
+
/** Build a blank graph-kind TreeNode for g. @see lib/patchwork/patchwork.c:mkTree */
|
|
89
|
+
export function makeGraphTreeNode(g: Graph): TreeNode {
|
|
90
|
+
return {
|
|
91
|
+
area: 0, childArea: 0,
|
|
92
|
+
r: { x: [0, 0], size: [0, 0] },
|
|
93
|
+
leftChild: null, rightSib: null,
|
|
94
|
+
kind: 'graph', ref: g, nChildren: 0,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** Build a leaf node-kind TreeNode for n. @see lib/patchwork/patchwork.c:mkTree */
|
|
99
|
+
export function makeNodeTreeNode(n: Node): TreeNode {
|
|
100
|
+
return {
|
|
101
|
+
area: getArea(n.attrs), childArea: 0,
|
|
102
|
+
r: { x: [0, 0], size: [0, 0] },
|
|
103
|
+
leftChild: null, rightSib: null,
|
|
104
|
+
kind: 'node', ref: n, nChildren: 0,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// ---------------------------------------------------------------------------
|
|
109
|
+
// Accumulator helpers
|
|
110
|
+
// ---------------------------------------------------------------------------
|
|
111
|
+
|
|
112
|
+
/** Append one child TreeNode into a ChildAccum linked list. */
|
|
113
|
+
export function accumAppend(accum: ChildAccum, cp: TreeNode): void {
|
|
114
|
+
accum.nChildren++;
|
|
115
|
+
accum.area += cp.area;
|
|
116
|
+
if (!accum.first) accum.first = cp;
|
|
117
|
+
if (accum.prev) accum.prev.rightSib = cp;
|
|
118
|
+
accum.prev = cp;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** Append all cluster children of g into accum. @see lib/patchwork/patchwork.c:mkTree */
|
|
122
|
+
export function appendClusterChildren(
|
|
123
|
+
g: Graph, sparent: Map<Node, Graph>, accum: ChildAccum,
|
|
124
|
+
): void {
|
|
125
|
+
for (const subg of g.info.clust ?? []) {
|
|
126
|
+
accumAppend(accum, mkTree(subg, sparent));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** Append unclaimed direct nodes of g into accum. @see lib/patchwork/patchwork.c:mkTree */
|
|
131
|
+
export function appendNodeChildren(
|
|
132
|
+
g: Graph, sparent: Map<Node, Graph>, accum: ChildAccum,
|
|
133
|
+
): void {
|
|
134
|
+
// C iterates agfstnode(g) — AGSEQ (root creation) order, NOT the order
|
|
135
|
+
// nodes were referenced inside a cluster block. The child order feeds
|
|
136
|
+
// layoutTree's equal-area qsort, whose tie permutation assigns tiles.
|
|
137
|
+
const nodes = [...g.nodes.values()].sort((a, b) => a.id - b.id);
|
|
138
|
+
for (const n of nodes) {
|
|
139
|
+
if (sparent.has(n)) continue;
|
|
140
|
+
accumAppend(accum, makeNodeTreeNode(n));
|
|
141
|
+
sparent.set(n, g);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** Finalise a TreeNode's area fields from an accumulated child list. */
|
|
146
|
+
export function finaliseTreeNode(p: TreeNode, g: Graph, accum: ChildAccum): void {
|
|
147
|
+
p.nChildren = accum.nChildren;
|
|
148
|
+
if (accum.nChildren > 0) {
|
|
149
|
+
p.childArea = accum.area;
|
|
150
|
+
p.area = fullArea(accum.area, getInset(g.attrs));
|
|
151
|
+
} else {
|
|
152
|
+
p.area = getArea(g.attrs);
|
|
153
|
+
}
|
|
154
|
+
p.leftChild = accum.first;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// ---------------------------------------------------------------------------
|
|
158
|
+
// Tree construction
|
|
159
|
+
// ---------------------------------------------------------------------------
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Recursively build the TreeNode tree from a Graph hierarchy.
|
|
163
|
+
* @see lib/patchwork/patchwork.c:mkTree
|
|
164
|
+
*/
|
|
165
|
+
export function mkTree(g: Graph, sparent: Map<Node, Graph>): TreeNode {
|
|
166
|
+
const p = makeGraphTreeNode(g);
|
|
167
|
+
const accum: ChildAccum = { first: null, prev: null, area: 0, nChildren: 0 };
|
|
168
|
+
appendClusterChildren(g, sparent, accum);
|
|
169
|
+
appendNodeChildren(g, sparent, accum);
|
|
170
|
+
finaliseTreeNode(p, g, accum);
|
|
171
|
+
return p;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// ---------------------------------------------------------------------------
|
|
175
|
+
// Margin computation
|
|
176
|
+
// ---------------------------------------------------------------------------
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Compute the inset margin m such that (h-m)(w-m) == childArea.
|
|
180
|
+
* Solves m² - (h+w)m + (hw - childArea) = 0; returns smaller root.
|
|
181
|
+
* For h=10, w=8, childArea=64 → result ≈ 0.9029 (within 1e-6).
|
|
182
|
+
* @see lib/patchwork/patchwork.c:layoutTree
|
|
183
|
+
*/
|
|
184
|
+
export function layoutTreeMargin(h: number, w: number, childArea: number): number {
|
|
185
|
+
const delta = h - w;
|
|
186
|
+
const disc = Math.sqrt(delta * delta + 4 * childArea);
|
|
187
|
+
return (h + w - disc) / 2;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// ---------------------------------------------------------------------------
|
|
191
|
+
// Layout pass helpers
|
|
192
|
+
// ---------------------------------------------------------------------------
|
|
193
|
+
|
|
194
|
+
/** Collect sibling TreeNodes into a sorted (descending area) array. */
|
|
195
|
+
export function collectSortedChildren(tree: TreeNode): TreeNode[] {
|
|
196
|
+
const nodes: TreeNode[] = [];
|
|
197
|
+
let cp: TreeNode | null = tree.leftChild;
|
|
198
|
+
while (cp !== null) {
|
|
199
|
+
nodes.push(cp);
|
|
200
|
+
cp = cp.rightSib;
|
|
201
|
+
}
|
|
202
|
+
// C sorts with LIST_SORT -> libc qsort (list.c:345). The equal-area tie
|
|
203
|
+
// permutation is load-bearing: with default areas every child ties, and the
|
|
204
|
+
// qsort permutation decides which node gets which treemap rect. A stable
|
|
205
|
+
// sort keeps insertion order and assigns different tiles than native.
|
|
206
|
+
// @see lib/patchwork/patchwork.c:162 LIST_SORT(&nodes, nodecmp)
|
|
207
|
+
gvQsort(nodes, (a, b) => (a.area < b.area ? 1 : a.area > b.area ? -1 : 0));
|
|
208
|
+
return nodes;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/** Compute the shrunken fill rectangle for treeMap. */
|
|
212
|
+
export function computeFillRect(tree: TreeNode): Rectangle {
|
|
213
|
+
const h = tree.r.size[1];
|
|
214
|
+
const w = tree.r.size[0];
|
|
215
|
+
const m = layoutTreeMargin(h, w, tree.childArea);
|
|
216
|
+
return { x: [tree.r.x[0], tree.r.x[1]], size: [w - m, h - m] };
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** Assign treeMap rectangles back onto sorted child nodes. */
|
|
220
|
+
export function assignRecs(nodes: TreeNode[], recs: Rectangle[]): void {
|
|
221
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
222
|
+
nodes[i]!.r = recs[i]!;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/** Recurse layoutTree into any graph-kind children (original sibling order). */
|
|
227
|
+
export function recurseGraphChildren(tree: TreeNode): void {
|
|
228
|
+
let cp: TreeNode | null = tree.leftChild;
|
|
229
|
+
while (cp !== null) {
|
|
230
|
+
if (cp.kind === 'graph') layoutTree(cp);
|
|
231
|
+
cp = cp.rightSib;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/** Squarify children into fill rect, assign recs, and recurse. */
|
|
236
|
+
export function placeLayoutRecs(tree: TreeNode, nodes: TreeNode[]): void {
|
|
237
|
+
const crec = computeFillRect(tree);
|
|
238
|
+
const recs = treeMap(nodes.length, nodes.map((tn) => tn.area), crec);
|
|
239
|
+
if (recs === null) return;
|
|
240
|
+
assignRecs(nodes, recs);
|
|
241
|
+
recurseGraphChildren(tree);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// ---------------------------------------------------------------------------
|
|
245
|
+
// Layout pass
|
|
246
|
+
// ---------------------------------------------------------------------------
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Assign rectangles to the children of one tree node.
|
|
250
|
+
* @see lib/patchwork/patchwork.c:layoutTree
|
|
251
|
+
*/
|
|
252
|
+
export function layoutTree(tree: TreeNode): void {
|
|
253
|
+
if (tree.nChildren === 0) return;
|
|
254
|
+
placeLayoutRecs(tree, collectSortedChildren(tree));
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// ---------------------------------------------------------------------------
|
|
258
|
+
// Walk pass helpers
|
|
259
|
+
// ---------------------------------------------------------------------------
|
|
260
|
+
|
|
261
|
+
/** Write bounding box back to a graph node. @see lib/patchwork/patchwork.c:walkTree */
|
|
262
|
+
export function applyGraphRect(tree: TreeNode): void {
|
|
263
|
+
let p: TreeNode | null = tree.leftChild;
|
|
264
|
+
while (p !== null) { walkTree(p); p = p.rightSib; }
|
|
265
|
+
const g = tree.ref as Graph;
|
|
266
|
+
const [x0, y0] = tree.r.x;
|
|
267
|
+
const [wd, ht] = tree.r.size;
|
|
268
|
+
g.info.bb = {
|
|
269
|
+
ll: { x: x0 - wd / 2.0, y: y0 - ht / 2.0 },
|
|
270
|
+
ur: { x: x0 + wd / 2.0, y: y0 + ht / 2.0 },
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/** Write coord/size back to a leaf node. @see lib/patchwork/patchwork.c:walkTree */
|
|
275
|
+
export function applyLeafRect(tree: TreeNode): void {
|
|
276
|
+
const n = tree.ref as Node;
|
|
277
|
+
n.info.coord = { x: tree.r.x[0], y: tree.r.x[1] };
|
|
278
|
+
n.info.width = ps2inch(tree.r.size[0]);
|
|
279
|
+
n.info.height = ps2inch(tree.r.size[1]);
|
|
280
|
+
n.info.ht = tree.r.size[1];
|
|
281
|
+
n.info.lw = tree.r.size[0] / 2;
|
|
282
|
+
n.info.rw = tree.r.size[0] / 2;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// ---------------------------------------------------------------------------
|
|
286
|
+
// Walk pass
|
|
287
|
+
// ---------------------------------------------------------------------------
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Write computed rectangle data back to Graphviz node/graph structures.
|
|
291
|
+
* @see lib/patchwork/patchwork.c:walkTree
|
|
292
|
+
*/
|
|
293
|
+
export function walkTree(tree: TreeNode): void {
|
|
294
|
+
if (tree.kind === 'graph') { applyGraphRect(tree); } else { applyLeafRect(tree); }
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// ---------------------------------------------------------------------------
|
|
298
|
+
// Cluster detection
|
|
299
|
+
// ---------------------------------------------------------------------------
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* A subgraph is a cluster if it is the root, its name begins (case-insensitively)
|
|
303
|
+
* with "cluster", OR it carries a truthy `cluster` attribute. The name-only test
|
|
304
|
+
* missed `cluster=true` subgraphs (e.g. 2717's `domestic_cats`), dropping them
|
|
305
|
+
* from the treemap cluster list. @see lib/common/utils.c:695 is_a_cluster
|
|
306
|
+
*/
|
|
307
|
+
export function isCluster(g: Graph): boolean {
|
|
308
|
+
if (g === g.root) return true;
|
|
309
|
+
if (g.name.toLowerCase().startsWith('cluster')) return true;
|
|
310
|
+
return mapbool(g.attrs.get('cluster'));
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/** @see lib/patchwork/patchworkinit.c:mkClusters */
|
|
314
|
+
export function collectClusters(g: Graph, clusters: Graph[]): void {
|
|
315
|
+
for (const subg of g.subgraphs.values()) {
|
|
316
|
+
if (isCluster(subg)) { clusters.push(subg); mkClusters(subg); }
|
|
317
|
+
else { collectClusters(subg, clusters); }
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Detect cluster subgraphs in g and populate g.info.clust.
|
|
323
|
+
* @see lib/patchwork/patchworkinit.c:mkClusters
|
|
324
|
+
*/
|
|
325
|
+
export function mkClusters(g: Graph): void {
|
|
326
|
+
const clusters: Graph[] = [];
|
|
327
|
+
collectClusters(g, clusters);
|
|
328
|
+
g.info.clust = clusters;
|
|
329
|
+
g.info.n_cluster = clusters.length;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// ---------------------------------------------------------------------------
|
|
333
|
+
// Core layout entry point
|
|
334
|
+
// ---------------------------------------------------------------------------
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Core patchwork layout: build tree → sort → squarify → walk.
|
|
338
|
+
* @see lib/patchwork/patchwork.c:patchworkLayout
|
|
339
|
+
*/
|
|
340
|
+
export function patchworkLayout(g: Graph): void {
|
|
341
|
+
const sparent = new Map<Node, Graph>();
|
|
342
|
+
const root = mkTree(g, sparent);
|
|
343
|
+
const side = Math.sqrt(root.area + 0.1);
|
|
344
|
+
root.r = { x: [0, 0], size: [side, side] };
|
|
345
|
+
layoutTree(root);
|
|
346
|
+
walkTree(root);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// ---------------------------------------------------------------------------
|
|
350
|
+
// Public layout engine
|
|
351
|
+
// ---------------------------------------------------------------------------
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Post-tiling per-node finish, mirroring C's walkTree -> finishNode:
|
|
355
|
+
* (a) a node whose fontsize attr is DECLARED but resolves empty gets
|
|
356
|
+
* fontsize = ND_ht*0.7 (%.03f) — the treemap-scaled label size; (b)
|
|
357
|
+
* common_init_node runs in full: label + xlabel creation and poly_init
|
|
358
|
+
* sizing. Crucially, poly_init CLOBBERS ND_width/ND_height with the
|
|
359
|
+
* label-driven size while the tile survives in ND_lw/rw/ht (which
|
|
360
|
+
* common_init_node never touches — gv_nodesize ran on the tile before).
|
|
361
|
+
* This clobber is load-bearing: addXLabels' addNodeObj builds xlabel
|
|
362
|
+
* obstacles from ND_width/ND_height (postproc.c:351), so native places
|
|
363
|
+
* xlabels against label-sized boxes, not tiles. Drawing and attach_attrs
|
|
364
|
+
* use lw/rw/ht, so the tile geometry still renders. The port's
|
|
365
|
+
* commonInitNode folds gv_nodesize in (storeNodeSize), so lw/rw/ht are
|
|
366
|
+
* saved and restored around it to keep the tile.
|
|
367
|
+
* @see lib/patchwork/patchwork.c:finishNode
|
|
368
|
+
* @see lib/common/postproc.c:351 addNodeObj (INCH2PS(ND_width/ND_height))
|
|
369
|
+
*/
|
|
370
|
+
export function finishNodes(g: Graph): void {
|
|
371
|
+
// C's quirk gate is N_fontsize != NULL: the attr is declared somewhere.
|
|
372
|
+
let fontsizeDeclared = g.nodeDefaults.has('fontsize');
|
|
373
|
+
if (!fontsizeDeclared) {
|
|
374
|
+
for (const n of g.nodes.values()) {
|
|
375
|
+
if (n.attrs.has('fontsize') || n.nodeDefaultsSnapshot?.has('fontsize') === true) {
|
|
376
|
+
fontsizeDeclared = true;
|
|
377
|
+
break;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
for (const n of g.nodes.values()) {
|
|
382
|
+
if (fontsizeDeclared) {
|
|
383
|
+
const v = nodeAttr(n, g, 'fontsize');
|
|
384
|
+
if (v === undefined || v === '') {
|
|
385
|
+
n.attrs.set('fontsize', (n.info.ht * 0.7).toFixed(3));
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
const { lw, rw, ht } = n.info;
|
|
389
|
+
commonInitNode(n, g);
|
|
390
|
+
n.info.lw = lw;
|
|
391
|
+
n.info.rw = rw;
|
|
392
|
+
n.info.ht = ht;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/** @see lib/patchwork/patchworkinit.c:patchwork_layout */
|
|
397
|
+
export function patchworkEngineLayout(g: Graph): void {
|
|
398
|
+
if (g.nodes.size === 0 && (g.info.n_cluster ?? 0) === 0) return;
|
|
399
|
+
// C: gvLayoutJobs runs graph_init(g, LAYOUT_USES_RANKDIR) before
|
|
400
|
+
// patchwork_layout; patchwork does not set the flag → useRankdir=false.
|
|
401
|
+
// graph_init also creates the ROOT graph label, which dotneato_postprocess
|
|
402
|
+
// below sizes the canvas for and places.
|
|
403
|
+
// @see lib/common/input.c:600, lib/gvc/gvlayout.c:81
|
|
404
|
+
graphInit(g, false);
|
|
405
|
+
// C patchwork_init_graph sets the AGNODE "shape" DEFAULT to box
|
|
406
|
+
// (agattr_text, overwriting e.g. a `node [shape=record]` default), and
|
|
407
|
+
// patchwork_init_node then agsets EVERY node's shape to box — explicit
|
|
408
|
+
// per-node shapes (record, point, HTML tables) are deliberately discarded:
|
|
409
|
+
// patchwork draws uniform tiles. @see patchworkinit.c:74,108
|
|
410
|
+
g.nodeDefaults.set('shape', 'box');
|
|
411
|
+
for (const n of g.nodes.values()) {
|
|
412
|
+
n.attrs.set('shape', 'box');
|
|
413
|
+
if (n.nodeDefaultsSnapshot !== undefined) n.nodeDefaultsSnapshot.set('shape', 'box');
|
|
414
|
+
}
|
|
415
|
+
mkClusters(g);
|
|
416
|
+
patchworkLayout(g);
|
|
417
|
+
// C: walkTree calls finishNode per leaf after tiling (fontsize quirk +
|
|
418
|
+
// common_init_node xlabel creation). @see patchwork.c:243
|
|
419
|
+
finishNodes(g);
|
|
420
|
+
// C: dotneato_postprocess(g) — cluster labels, xlabels, root graph label
|
|
421
|
+
// space + translate to origin. @see patchworkinit.c:127
|
|
422
|
+
placeGraphLabel(g);
|
|
423
|
+
gvPostprocess(g);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/** @see lib/patchwork/patchworkinit.c:patchwork_cleanup */
|
|
427
|
+
export function patchworkEngineCleanup(g: Graph): void {
|
|
428
|
+
g.info.clust = undefined;
|
|
429
|
+
g.info.n_cluster = undefined;
|
|
430
|
+
for (const n of g.nodes.values()) { n.info.alg = undefined; }
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Patchwork squarified treemap layout engine.
|
|
435
|
+
* @see lib/patchwork/patchworkinit.c:patchwork_layout
|
|
436
|
+
*/
|
|
437
|
+
export const PATCHWORK_LAYOUT_ENGINE: LayoutEngine = {
|
|
438
|
+
type: 'patchwork',
|
|
439
|
+
layout: patchworkEngineLayout,
|
|
440
|
+
cleanup: patchworkEngineCleanup,
|
|
441
|
+
};
|