@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,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Box assembly helpers for edge spline routing.
|
|
3
|
+
*
|
|
4
|
+
* Constructs the path boxes (tail, rank, head) that define the corridor
|
|
5
|
+
* through which a spline is routed.
|
|
6
|
+
*
|
|
7
|
+
* @see lib/common/splines.c:beginpath
|
|
8
|
+
* @see lib/common/splines.c:endpath
|
|
9
|
+
* @see lib/dotgen/dotsplines.c:rank_box
|
|
10
|
+
* @see lib/dotgen/dotsplines.c:maximal_bbox
|
|
11
|
+
*/
|
|
12
|
+
import type { Box } from '../../model/geom.js';
|
|
13
|
+
import type { NodeBox } from './edge-route-geom.js';
|
|
14
|
+
/**
|
|
15
|
+
* Assemble the tail-side box (beginpath, REGULAREDGE, no port).
|
|
16
|
+
*
|
|
17
|
+
* C sets boxes[0].UR.y = start.p.y. In TS SVG coords C's UR.y maps to
|
|
18
|
+
* our ll.y. The tail box spans ll.y=startPy (center) to ur.y (bottom).
|
|
19
|
+
*
|
|
20
|
+
* @see lib/common/splines.c:beginpath
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Tail box: nb with ur.y overridden to startPy (= beginpath UR.y = center.y).
|
|
24
|
+
* C: endp->boxes[0] = nb; endp->boxes[0].UR.y = P->start.p.y
|
|
25
|
+
* @see lib/common/splines.c:beginpath REGULAREDGE case
|
|
26
|
+
*/
|
|
27
|
+
export declare function makeTailBox(nb: Box, startPy: number): Box;
|
|
28
|
+
/**
|
|
29
|
+
* Assemble the head-side box (endpath, REGULAREDGE, no port).
|
|
30
|
+
*
|
|
31
|
+
* C sets boxes[0].LL.y = end.p.y. In TS SVG coords C's LL.y maps to
|
|
32
|
+
* our ur.y. The head box spans ll.y (top) to ur.y=endPy (center).
|
|
33
|
+
*
|
|
34
|
+
* @see lib/common/splines.c:endpath
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* Head box: nb with ll.y overridden to endPy (= endpath LL.y = center.y).
|
|
38
|
+
* C: endp->boxes[0] = nb; endp->boxes[0].LL.y = P->end.p.y
|
|
39
|
+
* @see lib/common/splines.c:endpath REGULAREDGE case
|
|
40
|
+
*/
|
|
41
|
+
export declare function makeHeadBox(nb: Box, endPy: number): Box;
|
|
42
|
+
/** Parameters for makeRankBox — avoids a 6-parameter signature. */
|
|
43
|
+
export interface RankBoxParams {
|
|
44
|
+
llx: number;
|
|
45
|
+
urx: number;
|
|
46
|
+
tailCy: number;
|
|
47
|
+
tailHt1: number;
|
|
48
|
+
headCy: number;
|
|
49
|
+
headHt2: number;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Inter-rank space box between two adjacent ranks.
|
|
53
|
+
*
|
|
54
|
+
* In TS SVG coords: ll.y = tailCy+tailHt1 (bottom of tail node),
|
|
55
|
+
* ur.y = headCy-headHt2 (top of head node).
|
|
56
|
+
*
|
|
57
|
+
* @see lib/dotgen/dotsplines.c:rank_box
|
|
58
|
+
*/
|
|
59
|
+
/**
|
|
60
|
+
* Inter-rank space box: from head node top (ll.y) to tail node bottom (ur.y).
|
|
61
|
+
* C: ll.y = headCy + headHt2 (= B.top = 90+18=108)
|
|
62
|
+
* ur.y = tailCy - tailHt1 (= A.bottom = 162-18=144)
|
|
63
|
+
* @see lib/dotgen/dotsplines.c:rank_box
|
|
64
|
+
*/
|
|
65
|
+
export declare function makeRankBox(p: RankBoxParams): Box;
|
|
66
|
+
/**
|
|
67
|
+
* Node bounding box for maximal_bbox (simple node, no neighbors).
|
|
68
|
+
*
|
|
69
|
+
* ll = { x: cx-lw-FUDGE, y: cy-ht1 } (top-left in SVG)
|
|
70
|
+
* ur = { x: cx+rw+FUDGE, y: cy+ht2 } (bottom-right in SVG)
|
|
71
|
+
*
|
|
72
|
+
* @see lib/dotgen/dotsplines.c:maximal_bbox
|
|
73
|
+
*/
|
|
74
|
+
export declare function makeMaximalBbox(box: NodeBox, ht1: number, ht2: number): Box;
|
|
75
|
+
//# sourceMappingURL=edge-route-boxes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-route-boxes.d.ts","sourceRoot":"","sources":["../../../src/layout/dot/edge-route-boxes.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAKpD;;;;;;;GAOG;AACH;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,GAAG,CAEzD;AAED;;;;;;;GAOG;AACH;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,CAEvD;AAED,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,aAAa,GAAG,GAAG,CAKjD;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,GAAG,CAK3E"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-rank edge routing via virtual-node chains.
|
|
3
|
+
*
|
|
4
|
+
* Both back-edges (tail.rank > head.rank) and forward edges spanning
|
|
5
|
+
* more than one rank (head.rank > tail.rank + 1) are routed by
|
|
6
|
+
* walking the virtual-node chain that class2/makeChain created and
|
|
7
|
+
* building a corridor-box path through every intermediate rank.
|
|
8
|
+
*
|
|
9
|
+
* @see lib/dotgen/dotsplines.c:make_regular_edge (hackflag path)
|
|
10
|
+
*/
|
|
11
|
+
import type { Graph } from '../../model/graph.js';
|
|
12
|
+
import type { Edge as GraphEdge } from '../../model/edge.js';
|
|
13
|
+
import type { Point } from '../../model/geom.js';
|
|
14
|
+
import type { NodeBox } from './edge-route-geom.js';
|
|
15
|
+
/**
|
|
16
|
+
* Route a forward edge spanning ≥2 ranks via its virtual-node chain through the
|
|
17
|
+
* faithful pipeline (REGULAREDGE side boxes steer the port, routeSplines over
|
|
18
|
+
* the chain; adjustregularpath inter-rank widening finally fires). Returns
|
|
19
|
+
* control points in graphviz-internal y-up, or null when the edge is not a
|
|
20
|
+
* multi-rank chain.
|
|
21
|
+
* @see lib/dotgen/dotsplines.c:make_regular_edge (hackflag forward path)
|
|
22
|
+
*/
|
|
23
|
+
export declare function routeMultiRankEdgeFaithful(g: Graph, e: GraphEdge): Point[] | null;
|
|
24
|
+
/**
|
|
25
|
+
* Route ONE collected entry's merge-bounded run — C's model where every
|
|
26
|
+
* fast-graph entry of a concentrate-merged chain (lead-in from the real node,
|
|
27
|
+
* trunk continuation out of a merge node, or a secondary's branch) is its own
|
|
28
|
+
* cnt=1 group (the group loop's MAINGRAPH break) and make_regular_edge walks
|
|
29
|
+
* from the entry to the first NORMAL or splineMerge node; clip_and_install
|
|
30
|
+
* then APPENDS the clipped bezier on the entry's original edge. The entry's
|
|
31
|
+
* own ports drive begin/endpath (the last segment carries the run's head
|
|
32
|
+
* port), and the install passes the ENTRY (its to_orig chain resolves the
|
|
33
|
+
* orig) with the walk's final head node, exactly as C.
|
|
34
|
+
*
|
|
35
|
+
* Returns the resolved original edge when the entry was a partial run
|
|
36
|
+
* (consumed — even if routing declined, so the caller never re-routes the
|
|
37
|
+
* whole chain), or null when the entry is a plain full chain.
|
|
38
|
+
* @see lib/dotgen/dotsplines.c:dot_splines_ (group loop), make_regular_edge
|
|
39
|
+
*/
|
|
40
|
+
export declare function routeEntryRun(g: Graph, entry: GraphEdge): GraphEdge | null;
|
|
41
|
+
/**
|
|
42
|
+
* Forward view of any edge (C `makefwdedge`): tail/head swapped when the edge
|
|
43
|
+
* runs high→low rank (a back edge), fresh portless ends. `beginPath`/`endPath`
|
|
44
|
+
* read `e.tail`/`e.head`, so the chain must be driven by an edge that runs
|
|
45
|
+
* low→high rank. Sets `to_orig`/`edge_type=VIRTUAL` so `clipAndInstall`→
|
|
46
|
+
* `newSpline` installs the spline on the ORIGINAL edge (its `to_orig` loop) and
|
|
47
|
+
* the post-routing `swapSpline` pass reverses it back to tail→head. Shares
|
|
48
|
+
* `attrs`/`root`/`to_virt` with `e`. Consumed by T3 for parallel back-members.
|
|
49
|
+
* @see lib/dotgen/dotsplines.c:makefwdedge
|
|
50
|
+
* @see lib/common/splines.c:clip_and_install (to_orig install loop)
|
|
51
|
+
*/
|
|
52
|
+
export declare function makeFwdEdge(e: GraphEdge): GraphEdge;
|
|
53
|
+
/**
|
|
54
|
+
* Route a multi-rank back-edge via its virtual node chain, mirroring C exactly:
|
|
55
|
+
* make_regular_edge routes the makefwdedge (forward) view, clip_and_install
|
|
56
|
+
* clips THAT forward spline, and the spline is reversed afterward (swapSpline).
|
|
57
|
+
*
|
|
58
|
+
* Clipping the forward (un-reversed) spline is load-bearing: bezier_clip bisects
|
|
59
|
+
* each node end from the same direction C does. The previous reverse-then-clip
|
|
60
|
+
* path clipped the head node as a tail (bisecting the degenerate spline from the
|
|
61
|
+
* opposite parameter end), landing the 0.5-tolerance crossing ~0.26-0.33 off
|
|
62
|
+
* (1644, dfa family). clipAndInstall resolves the spline onto `e` via the
|
|
63
|
+
* fwdEdge's to_orig and gates arrows by ED_dir, so this also drops the bespoke
|
|
64
|
+
* reverse/arrow code. @see lib/dotgen/dotsplines.c:make_regular_edge (hackflag)
|
|
65
|
+
*/
|
|
66
|
+
export declare function routeBackEdge(e: GraphEdge, _tailBox: NodeBox, _headBox: NodeBox, g: Graph): void;
|
|
67
|
+
//# sourceMappingURL=edge-route-chain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-route-chain.d.ts","sourceRoot":"","sources":["../../../src/layout/dot/edge-route-chain.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,KAAK,EAAO,MAAM,qBAAqB,CAAC;AAGtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAqNpD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,IAAI,CAwBjF;AAuBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI,CAO1E;AA8CD;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,SAAS,GAAG,SAAS,CAoBnD;AAGD;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,CAiBhG"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bezier subdivision and node-boundary clipping for edge spline routing.
|
|
3
|
+
*
|
|
4
|
+
* @see lib/common/utils.c:Bezier
|
|
5
|
+
* @see lib/common/splines.c:bezier_clip
|
|
6
|
+
* @see lib/common/splines.c:shape_clip0
|
|
7
|
+
*/
|
|
8
|
+
import type { Point } from '../../model/geom.js';
|
|
9
|
+
/**
|
|
10
|
+
* De Casteljau subdivision of a cubic Bezier at parameter t.
|
|
11
|
+
* Returns [left4, right4, midpoint].
|
|
12
|
+
* @see lib/common/utils.c:Bezier
|
|
13
|
+
*/
|
|
14
|
+
export declare function bezierSubdivide(sp: Point[], t: number): [Point[], Point[], Point];
|
|
15
|
+
/**
|
|
16
|
+
* Clip Bezier to node boundary using binary search.
|
|
17
|
+
*
|
|
18
|
+
* sp is in global coords. insideFn receives node-local coords (center
|
|
19
|
+
* subtracted). leftInside=true: sp[0] is inside node (tail clip).
|
|
20
|
+
* leftInside=false: sp[3] is inside node (head clip).
|
|
21
|
+
*
|
|
22
|
+
* @see lib/common/splines.c:bezier_clip
|
|
23
|
+
* @see lib/common/splines.c:shape_clip0
|
|
24
|
+
*/
|
|
25
|
+
export declare function bezierClipNode(sp: Point[], cx: number, cy: number, insideFn: (lx: number, ly: number) => boolean, leftInside: boolean): Point[];
|
|
26
|
+
/**
|
|
27
|
+
* Clip the path endpoint to the arrowhead BASE (not node boundary).
|
|
28
|
+
*
|
|
29
|
+
* Ports lib/common/arrows.c:arrowEndClip.
|
|
30
|
+
* The path ends at arrowhead-BASE (arrowTip + elen toward tail), not at the
|
|
31
|
+
* node boundary. The arrowTip (spl.ep) is the node-boundary clip result.
|
|
32
|
+
*
|
|
33
|
+
* Steps (matching C arrowEndClip):
|
|
34
|
+
* 1. Reverse the last Bezier segment: sp[0]=arrowTip, sp[1..3]=reversed path
|
|
35
|
+
* 2. inside = DIST(p, arrowTip) <= elen (arrowhead sphere)
|
|
36
|
+
* 3. bezierClip with left_inside=true (sp[0]=arrowTip is "inside" the sphere)
|
|
37
|
+
* 4. Un-reverse the clipped right subdivision → path ends at arrowhead BASE
|
|
38
|
+
*
|
|
39
|
+
* @see lib/common/arrows.c:arrowEndClip
|
|
40
|
+
*/
|
|
41
|
+
export declare function arrowEndClip(path4: Point[], arrowTip: Point, elen: number): Point[];
|
|
42
|
+
/**
|
|
43
|
+
* Per-type spline clip length for an arrow string: the sum of the parsed
|
|
44
|
+
* compound arrow's component lengths (`arrow_length`). Replaces the normal-only
|
|
45
|
+
* `normalArrowLen` so non-normal arrows clip by their true length (ADR-4); the
|
|
46
|
+
* caller still gates on the edge flag (no clip when the end has no arrow).
|
|
47
|
+
* @see lib/common/arrows.c:arrow_length (:253)
|
|
48
|
+
*/
|
|
49
|
+
export declare function arrowClipLength(arrowName: string, arrowsize: number, penwidth: number): number;
|
|
50
|
+
/**
|
|
51
|
+
* Default node pen width. @see lib/common/const.h:DEFAULT_NODEPENWIDTH
|
|
52
|
+
*/
|
|
53
|
+
export declare const DEFAULT_NODEPENWIDTH = 1;
|
|
54
|
+
/**
|
|
55
|
+
* Returns a box-shape inside function for use with bezierClipNode.
|
|
56
|
+
*
|
|
57
|
+
* Matches C's poly_inside bounding-box test which uses the OUTLINE boundary
|
|
58
|
+
* (node + penwidth/2) rather than the geometric boundary:
|
|
59
|
+
* box_URx = (lw + rw + penwidth) / 2
|
|
60
|
+
* box_URy = (ht + penwidth) / 2
|
|
61
|
+
*
|
|
62
|
+
* @see lib/common/shapes.c:poly_inside (box_URx/box_URy computation)
|
|
63
|
+
*/
|
|
64
|
+
export declare function makeBoxInsideFn(halfW: number, halfH: number, penwidth?: number): (lx: number, ly: number) => boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Returns an ellipse-shape inside function for use with bezierClipNode.
|
|
67
|
+
*
|
|
68
|
+
* Matches C's poly_inside ellipse branch (sides <= 2):
|
|
69
|
+
* hypot(P.x/box_URx, P.y/box_URy) < 1 (strict less-than, matching C)
|
|
70
|
+
* where box_URx = lw + penwidth/2 and box_URy = ht/2 + penwidth/2.
|
|
71
|
+
*
|
|
72
|
+
* C uses strict < 1 (not <=) — the one-bit difference matters during
|
|
73
|
+
* binary search: a point exactly on the boundary is classified as outside
|
|
74
|
+
* in C, which determines when the search terminates.
|
|
75
|
+
*
|
|
76
|
+
* @see lib/common/shapes.c:poly_inside (sides <= 2 branch)
|
|
77
|
+
*/
|
|
78
|
+
export declare function makeEllipseInsideFn(rx: number, ry: number, penwidth?: number): (lx: number, ly: number) => boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Clip path START to the tail arrowhead base (symmetric to arrowEndClip).
|
|
81
|
+
*
|
|
82
|
+
* path4[0] = tail node boundary (inside arrowhead sphere); after clip,
|
|
83
|
+
* path4[0] = arrowhead base (elen from tailTip).
|
|
84
|
+
*
|
|
85
|
+
* @see lib/common/arrows.c:arrowEndClip
|
|
86
|
+
*/
|
|
87
|
+
export declare function tailArrowEndClip(path4: Point[], tailTip: Point, elen: number): Point[];
|
|
88
|
+
//# sourceMappingURL=edge-route-clip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-route-clip.d.ts","sourceRoot":"","sources":["../../../src/layout/dot/edge-route-clip.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAiCjD;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,EAAE,EAAE,KAAK,EAAE,EACX,CAAC,EAAE,MAAM,GACR,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,CAK3B;AA2DD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,KAAK,EAAE,EACX,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,EAC7C,UAAU,EAAE,OAAO,GAClB,KAAK,EAAE,CAMT;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,KAAK,EAAE,EACd,QAAQ,EAAE,KAAK,EACf,IAAI,EAAE,MAAM,GACX,KAAK,EAAE,CAcT;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG9F;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,IAAM,CAAC;AAExC;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,QAAQ,SAAuB,GAC9B,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAKrC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,QAAQ,SAAuB,GAC9B,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAKrC;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,KAAK,EAAE,EACd,OAAO,EAAE,KAAK,EACd,IAAI,EAAE,MAAM,GACX,KAAK,EAAE,CAIT"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Faithful adjacent-rank regular-edge routing for dot.
|
|
3
|
+
*
|
|
4
|
+
* Assembles the `beginPath → completeRegularPath → routeSplines` box-channel
|
|
5
|
+
* pipeline that C's `make_regular_edge` uses. This is the sequence the
|
|
6
|
+
* simplified active fitter (`buildRankCorridor`/`computeSpline`) bypasses;
|
|
7
|
+
* the simplified fitter truncates the non-monotonic loop corridor a steering
|
|
8
|
+
* port needs (tail exits the TOP face while the head is below). routeSplines
|
|
9
|
+
* routes that corridor completely.
|
|
10
|
+
*
|
|
11
|
+
* SR2 scope: regular **adjacent-rank** edges only. Returns the spline control
|
|
12
|
+
* points in graphviz-internal y-up coordinates (the frame dot's router runs
|
|
13
|
+
* in; SVG y-negation is a later render pass). `clipAndInstall` + arrows +
|
|
14
|
+
* `routeOneEdge` wiring is SR3 — this module does not install anything.
|
|
15
|
+
*
|
|
16
|
+
* Deviations from C, journaled in decision-journal.md (SR2):
|
|
17
|
+
* - Cluster bounds (`cl_bound`) in maximal_bbox are not ported; no batch-2/3
|
|
18
|
+
* test graph has clusters. The neighbor branch uses node extents only.
|
|
19
|
+
*
|
|
20
|
+
* @see lib/dotgen/dotsplines.c:make_regular_edge
|
|
21
|
+
* @see lib/dotgen/dotsplines.c:completeregularpath
|
|
22
|
+
* @see lib/dotgen/dotsplines.c:adjustregularpath
|
|
23
|
+
* @see lib/dotgen/dotsplines.c:makeregularend
|
|
24
|
+
* @see lib/dotgen/dotsplines.c:maximal_bbox
|
|
25
|
+
* @see lib/dotgen/dotsplines.c:rank_box
|
|
26
|
+
*/
|
|
27
|
+
import type { Graph } from '../../model/graph.js';
|
|
28
|
+
import type { Node } from '../../model/node.js';
|
|
29
|
+
import type { Edge } from '../../model/edge.js';
|
|
30
|
+
import type { Box, Point } from '../../model/geom.js';
|
|
31
|
+
import type { Path, PathendT } from '../../common/types.js';
|
|
32
|
+
/**
|
|
33
|
+
* Per-call routing bounds, mirroring the fields of spline_info_t that
|
|
34
|
+
* maximal_bbox / rank_box read.
|
|
35
|
+
* @see lib/dotgen/dotsplines.c:spline_info_t
|
|
36
|
+
*/
|
|
37
|
+
export interface SplineBounds {
|
|
38
|
+
leftBound: number;
|
|
39
|
+
rightBound: number;
|
|
40
|
+
splinesep: number;
|
|
41
|
+
}
|
|
42
|
+
/** Bundled context for the maximal_bbox helpers (keeps params <= 5). */
|
|
43
|
+
export interface BboxCtx {
|
|
44
|
+
g: Graph;
|
|
45
|
+
sp: SplineBounds;
|
|
46
|
+
}
|
|
47
|
+
/** Bundled arguments for completeRegularPath (keeps params <= 5). */
|
|
48
|
+
export interface RegularPathParts {
|
|
49
|
+
P: Path;
|
|
50
|
+
first: Edge;
|
|
51
|
+
last: Edge;
|
|
52
|
+
tend: PathendT;
|
|
53
|
+
hend: PathendT;
|
|
54
|
+
boxes: Box[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Build the initial bounding box for begin/endpath at node vn.
|
|
58
|
+
* @see lib/dotgen/dotsplines.c:maximal_bbox
|
|
59
|
+
*/
|
|
60
|
+
export declare function maximalBbox(ctx: BboxCtx, vn: Node, ie: Edge | undefined, oe: Edge | undefined): Box;
|
|
61
|
+
/**
|
|
62
|
+
* Override the endpoint box's y-extent from the last begin/endpath box, then
|
|
63
|
+
* append a makeregularend box if it is non-degenerate.
|
|
64
|
+
* @see lib/dotgen/dotsplines.c:make_regular_edge (b.UR.y/LL.y + makeregularend)
|
|
65
|
+
*/
|
|
66
|
+
export declare function appendRegularEnd(nb: Box, endp: PathendT, side: number, y: number): void;
|
|
67
|
+
/**
|
|
68
|
+
* Inter-rank space box spanning the full routing width between rank r (tail)
|
|
69
|
+
* and rank r+1 (head).
|
|
70
|
+
* @see lib/dotgen/dotsplines.c:rank_box
|
|
71
|
+
*/
|
|
72
|
+
export declare function rankBox(ctx: BboxCtx, r: number): Box;
|
|
73
|
+
/**
|
|
74
|
+
* Concatenate tail boxes, inter-rank boxes (forward), and head boxes
|
|
75
|
+
* (reversed) into P, then widen. Returns false if a bounding edge is unrouted.
|
|
76
|
+
* @see lib/dotgen/dotsplines.c:completeregularpath
|
|
77
|
+
*/
|
|
78
|
+
export declare function completeRegularPath(parts: RegularPathParts): boolean;
|
|
79
|
+
/** A fresh path endpoint seeded with its node bounding box. */
|
|
80
|
+
export declare function freshEndp(nb: Box): PathendT;
|
|
81
|
+
/**
|
|
82
|
+
* Route a regular adjacent-rank edge through the faithful box-channel
|
|
83
|
+
* pipeline. Returns spline control points in graphviz-internal (y-up)
|
|
84
|
+
* coordinates; null when the edge is not an adjacent-rank regular edge or
|
|
85
|
+
* the path cannot be assembled (decline — the caller may fall back); or
|
|
86
|
+
* 'lost' when the full corridor was attempted and routesplines itself
|
|
87
|
+
* failed — C installs no spline and the edge is LOST (map_edge warns, emit
|
|
88
|
+
* skips), never straight-line synthesized. Does NOT clip or install.
|
|
89
|
+
*
|
|
90
|
+
* @see lib/dotgen/dotsplines.c:make_regular_edge (adjacent-rank, no virtual chain)
|
|
91
|
+
* @see lib/common/routespl.c:routesplines (failure -> NULL, edge lost)
|
|
92
|
+
*/
|
|
93
|
+
export declare function routeRegularEdgeFaithful(g: Graph, e: Edge): Point[] | null | 'lost';
|
|
94
|
+
//# sourceMappingURL=edge-route-faithful.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-route-faithful.d.ts","sourceRoot":"","sources":["../../../src/layout/dot/edge-route-faithful.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAuB5D;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wEAAwE;AACxE,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,KAAK,CAAC;IACT,EAAE,EAAE,YAAY,CAAC;CAClB;AAED,qEAAqE;AACrE,MAAM,WAAW,gBAAgB;IAC/B,CAAC,EAAE,IAAI,CAAC;IACR,KAAK,EAAE,IAAI,CAAC;IACZ,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,GAAG,EAAE,CAAC;CACd;AAsGD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,GAAG,SAAS,EAAE,EAAE,EAAE,IAAI,GAAG,SAAS,GAAG,GAAG,CAanG;AAgBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAKvF;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,GAAG,GAAG,CAQpD;AAyFD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAUpE;AAMD,+DAA+D;AAC/D,wBAAgB,SAAS,CAAC,EAAE,EAAE,GAAG,GAAG,QAAQ,CAE3C;AAOD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,GAAG,KAAK,EAAE,GAAG,IAAI,GAAG,MAAM,CA8BnF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Geometric helpers for edge spline routing: vector math and node-box
|
|
3
|
+
* ray clipping.
|
|
4
|
+
*
|
|
5
|
+
* @see lib/common/splines.c:clip_and_install (box-clipping logic)
|
|
6
|
+
*/
|
|
7
|
+
import type { Point } from '../../model/geom.js';
|
|
8
|
+
/** Normalize a 2-D vector; returns {0,0} if near-zero length. */
|
|
9
|
+
export declare function normalizeVec(v: Point): Point;
|
|
10
|
+
/** Reverse a vector. */
|
|
11
|
+
export declare function negateVec(v: Point): Point;
|
|
12
|
+
/** Offset a point by dir * scale. */
|
|
13
|
+
export declare function offsetPoint(p: Point, dir: Point, scale: number): Point;
|
|
14
|
+
/** Min positive t along x-axis for the given boundary half-width. */
|
|
15
|
+
export declare function xClipT(dirX: number, halfW: number): number;
|
|
16
|
+
/** Min positive t along y-axis for the given boundary half-height. */
|
|
17
|
+
export declare function yClipT(dirY: number, halfH: number): number;
|
|
18
|
+
/**
|
|
19
|
+
* Node box dimensions bundled for clipping.
|
|
20
|
+
* @see lib/common/types.h:Agnodeinfo_t (ND_lw, ND_rw, ND_ht)
|
|
21
|
+
*/
|
|
22
|
+
export interface NodeBox {
|
|
23
|
+
center: Point;
|
|
24
|
+
lw: number;
|
|
25
|
+
rw: number;
|
|
26
|
+
ht: number;
|
|
27
|
+
/** True when the node shape is elliptical (sides === 1 in C poly_inside). */
|
|
28
|
+
isEllipse?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Node pen width. C's poly_inside clips to the outline periphery (the
|
|
31
|
+
* boundary grown by penwidth/2), so a thick-bordered node clips the edge
|
|
32
|
+
* spline / arrow slightly further out. Defaults to DEFAULT_NODEPENWIDTH.
|
|
33
|
+
* @see lib/common/shapes.c:poly_inside (outline / penwidth)
|
|
34
|
+
*/
|
|
35
|
+
penwidth?: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Clip a ray from box.center in direction `dir` to the node boundary.
|
|
39
|
+
* For ellipse nodes uses the ellipse formula; for box nodes uses the box formula.
|
|
40
|
+
* @see lib/common/shapes.c:poly_inside
|
|
41
|
+
*/
|
|
42
|
+
export declare function clipToNodeBox(box: NodeBox, dir: Point): Point;
|
|
43
|
+
//# sourceMappingURL=edge-route-geom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-route-geom.d.ts","sourceRoot":"","sources":["../../../src/layout/dot/edge-route-geom.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAMjD,iEAAiE;AACjE,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK,CAI5C;AAED,wBAAwB;AACxB,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK,CAAiC;AAE3E,qCAAqC;AACrC,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,CAEtE;AAMD,qEAAqE;AACrE,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAI1D;AAED,sEAAsE;AACtE,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAI1D;AAED;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,KAAK,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,6EAA6E;IAC7E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,GAAG,KAAK,CAgB7D"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helpers for edge spline routing: node-box construction,
|
|
3
|
+
* penwidth reading, spline record installation, and straight-edge routing.
|
|
4
|
+
*
|
|
5
|
+
* Extracted to allow edge-route-chain.ts to import these without
|
|
6
|
+
* creating a circular dependency through the top-level edge-route.ts.
|
|
7
|
+
*
|
|
8
|
+
* @see lib/dotgen/dotsplines.c
|
|
9
|
+
* @see lib/common/splines.c:clip_and_install
|
|
10
|
+
*/
|
|
11
|
+
import type { Graph } from '../../model/graph.js';
|
|
12
|
+
import type { Node } from '../../model/node.js';
|
|
13
|
+
import type { Edge as GraphEdge } from '../../model/edge.js';
|
|
14
|
+
import type { Point, Bezier, Spline } from '../../model/geom.js';
|
|
15
|
+
import type { NodeBox } from './edge-route-geom.js';
|
|
16
|
+
import type { RankEdgeInfo, EdgeSplineResult, PortRoute } from './edge-route-routing.js';
|
|
17
|
+
/**
|
|
18
|
+
* Default `dir` for an edge given the graph's directedness. C uses
|
|
19
|
+
* `agisdirected(g) ? "forward" : "none"` — an undirected graph draws no
|
|
20
|
+
* arrowheads. Without this, undirected edges wrongly get a head arrow and an
|
|
21
|
+
* arrow-clipped (short) spline.
|
|
22
|
+
*
|
|
23
|
+
* @see lib/common/arrows.c:arrow_flags (late_string E_dir default)
|
|
24
|
+
*/
|
|
25
|
+
export declare function defaultEdgeDir(g: Graph): string;
|
|
26
|
+
/** Returns a NodeBox with defaulted lw/rw/ht for a node. */
|
|
27
|
+
export declare function nodeBoxOf(n: Node, g: Graph): NodeBox;
|
|
28
|
+
/**
|
|
29
|
+
* Effective pen width for arrowhead geometry. Must mirror the stroke resolver
|
|
30
|
+
* so the arrow's penwidth-dependent miter (delta_tip/delta_base in
|
|
31
|
+
* arrow_type_normal0) matches the drawn line width: penwidth attr →
|
|
32
|
+
* setlinewidth(N) style → bold(2.0) → 1.0. The prior version only recognised
|
|
33
|
+
* `style === "bold"`, so `style="setlinewidth(3)"` fell through to 1.0 and the
|
|
34
|
+
* arrow was drawn ~penwidth off along the edge (graphs-style a->e).
|
|
35
|
+
* @see resolvePenWidth (style-resolve.ts) / lib/common/arrows.c:257
|
|
36
|
+
*/
|
|
37
|
+
export declare function edgeRenderPenwidth(e: GraphEdge): number;
|
|
38
|
+
/** Penwidth for arrow-length (elen) computation (attribute only). */
|
|
39
|
+
export declare function edgePenwidthAttr(e: GraphEdge): number;
|
|
40
|
+
/** Build a Bezier record for a single cubic segment. */
|
|
41
|
+
export declare function makeBezierRecord(bezierPts: Point[], arrowTip: Point): Bezier;
|
|
42
|
+
/** Build a zero-bb Spline wrapping a single Bezier record. */
|
|
43
|
+
export declare function makeSplineRecord(bz: Bezier): Spline;
|
|
44
|
+
/** Create and install a Spline on the edge. @see lib/common/splines.c:clip_and_install */
|
|
45
|
+
export declare function installEdgeSpline(e: GraphEdge, bezierPts: Point[], arrowTip: Point): void;
|
|
46
|
+
/** Route via pathplan, falling back to linear if the result is degenerate. */
|
|
47
|
+
export declare function routeBezier(from: Point, to: Point): Point[];
|
|
48
|
+
/** Compute Bezier for a straight edge, with optional rank-corridor geometry. */
|
|
49
|
+
export declare function straightEdgeSplineWithRank(tailBox: NodeBox, headBox: NodeBox, rankInfo: RankEdgeInfo | undefined, penwidth?: number, port?: PortRoute): EdgeSplineResult;
|
|
50
|
+
//# sourceMappingURL=edge-route-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-route-helpers.d.ts","sourceRoot":"","sources":["../../../src/layout/dot/edge-route-helpers.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAOjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzF;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAE/C;AAyBD,4DAA4D;AAC5D,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,GAAG,OAAO,CAepD;AAMD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,SAAS,GAAG,MAAM,CAEvD;AAED,qEAAqE;AACrE,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,SAAS,GAAG,MAAM,CAGrD;AAOD,wDAAwD;AACxD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,CAM5E;AAED,8DAA8D;AAC9D,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,GAAG,IAAI,CAYzF;AAaD,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,GAAG,KAAK,EAAE,CAM3D;AAED,gFAAgF;AAChF,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,YAAY,GAAG,SAAS,EAClC,QAAQ,SAAM,EACd,IAAI,CAAC,EAAE,SAAS,GACf,gBAAgB,CAIlB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Polygon construction and spline routing from path boxes.
|
|
3
|
+
*
|
|
4
|
+
* Ports the box-to-polygon conversion and spline fitting sections of
|
|
5
|
+
* routesplines_ in the C source.
|
|
6
|
+
*
|
|
7
|
+
* @see lib/common/routespl.c:routesplines_
|
|
8
|
+
*/
|
|
9
|
+
import type { Point, Box } from '../../model/geom.js';
|
|
10
|
+
import type { Edge as BarrierEdge } from '../../pathplan/types.js';
|
|
11
|
+
/**
|
|
12
|
+
* Forward pass: right-side polygon vertices from box[0] to box[N-1].
|
|
13
|
+
* @see lib/common/routespl.c:routesplines_ (forward loop)
|
|
14
|
+
*/
|
|
15
|
+
export declare function addForwardPolyPts(boxes: Box[], pts: Point[]): void;
|
|
16
|
+
/**
|
|
17
|
+
* Reverse pass: left-side polygon vertices from box[N-1] to box[0].
|
|
18
|
+
* @see lib/common/routespl.c:routesplines_ (reverse loop)
|
|
19
|
+
*/
|
|
20
|
+
export declare function addReversePolyPts(boxes: Box[], pts: Point[]): void;
|
|
21
|
+
/**
|
|
22
|
+
* Convert path boxes to polygon vertices.
|
|
23
|
+
*
|
|
24
|
+
* Boxes are in tail→head path order. In TS SVG coords (y-down), ll.y
|
|
25
|
+
* increases from tail to head — this is the C post-flip state, so the
|
|
26
|
+
* forward+reverse pass logic ports directly.
|
|
27
|
+
*
|
|
28
|
+
* @see lib/common/routespl.c:routesplines_
|
|
29
|
+
*/
|
|
30
|
+
export declare function boxesToPolygon(boxes: Box[]): Point[];
|
|
31
|
+
/** Build polygon barrier edges (consecutive pairs, closed). */
|
|
32
|
+
export declare function polyEdgesFromPts(polygon: Point[]): BarrierEdge[];
|
|
33
|
+
/** Straight-line cubic Bezier with control points at 1/3 and 2/3. */
|
|
34
|
+
export declare function linearBezier(p0: Point, p3: Point): Point[];
|
|
35
|
+
/**
|
|
36
|
+
* Fit spline via routeSpline.
|
|
37
|
+
* Degenerate Beziers (P0=P1) are valid — C's Proutespline produces them
|
|
38
|
+
* for straight paths with zero endpoint slopes, and bezier_clip still
|
|
39
|
+
* gives correct clipping behavior.
|
|
40
|
+
* @see lib/pathplan/route.c:reallyroutespline (splinefits section)
|
|
41
|
+
*/
|
|
42
|
+
export declare function tryRouteSpline(barriers: BarrierEdge[], wpts: Point[]): Point[] | null;
|
|
43
|
+
/**
|
|
44
|
+
* Build polygon from boxes, find shortest path, fit Bezier with barriers.
|
|
45
|
+
* @see lib/common/routespl.c:routesplines_
|
|
46
|
+
*/
|
|
47
|
+
export declare function computeSpline(boxes: Box[], startPt: Point, endPt: Point): Point[];
|
|
48
|
+
//# sourceMappingURL=edge-route-poly.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-route-poly.d.ts","sourceRoot":"","sources":["../../../src/layout/dot/edge-route-poly.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,KAAK,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAoCnE;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI,CAKlE;AAuCD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI,CAKlE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,CAMpD;AAOD,+DAA+D;AAC/D,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,CAGhE;AAED,qEAAqE;AACrE,wBAAgB,YAAY,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,GAAG,KAAK,EAAE,CAO1D;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAKrF;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,GAAG,KAAK,EAAE,CAOjF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rank geometry extraction for edge routing.
|
|
3
|
+
*
|
|
4
|
+
* Computes the RankEdgeInfo needed by routeWithRank by reading the
|
|
5
|
+
* graph's rank table and deriving left/right bounds from node extents.
|
|
6
|
+
*
|
|
7
|
+
* @see lib/dotgen/dotsplines.c:make_regular_edge (rank geometry access)
|
|
8
|
+
* @see lib/dotgen/dotsplines.c:sd.LeftBound / sd.RightBound
|
|
9
|
+
*/
|
|
10
|
+
import type { Graph } from '../../model/graph.js';
|
|
11
|
+
import type { Node } from '../../model/node.js';
|
|
12
|
+
import type { RankEdgeInfo } from './edge-route-routing.js';
|
|
13
|
+
/** Minimum x extent across all nodes minus MINW. @see lib/dotgen/dotsplines.c:sd.LeftBound */
|
|
14
|
+
export declare function computeLeftBound(g: Graph): number;
|
|
15
|
+
/** Maximum x extent across all nodes plus MINW. @see lib/dotgen/dotsplines.c:sd.RightBound */
|
|
16
|
+
export declare function computeRightBound(g: Graph): number;
|
|
17
|
+
/** Default a rank half-height to node half-height when the rank value is unset. */
|
|
18
|
+
export declare function rankHt(rankVal: number, nodeHt: number): number;
|
|
19
|
+
/** The two fields of spline_info_t that this port derives from live rank/node
|
|
20
|
+
* state. @see lib/dotgen/dotsplines.c:spline_info_t (LeftBound/RightBound) */
|
|
21
|
+
export interface SplineBoundsSnapshot {
|
|
22
|
+
leftBound: number;
|
|
23
|
+
rightBound: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Return this pass's frozen {leftBound, rightBound}, computing it on first
|
|
27
|
+
* access after a `resetSplineBounds` (or the very first access ever, for a
|
|
28
|
+
* graph never routed before). C's `dot_splines_` computes `spline_info_t sd`
|
|
29
|
+
* ONCE per call and threads it by pointer/value through every routing
|
|
30
|
+
* helper for that pass; the port previously called computeLeftBound/
|
|
31
|
+
* computeRightBound fresh on every routed edge, so edges routed later in the
|
|
32
|
+
* same pass saw a corridor narrowed by recoverSlack/resizeVn mutations to
|
|
33
|
+
* vnode coord.x/lw/rw from EARLIER edges in the pass (measured on 2646:
|
|
34
|
+
* 6002 of the pass's bound reads drifted 26pt narrower per side; the very
|
|
35
|
+
* first, pre-mutation computeLeftBound call is byte-identical to C's
|
|
36
|
+
* one-time value, so the formula is faithful and only the call timing
|
|
37
|
+
* drifted). NOTE: 2646's residual 3-edge divergence (Δ42.09 worst) proved
|
|
38
|
+
* to be a separate mechanism — those edges route before/independent of the
|
|
39
|
+
* drift — but the frozen snapshot is the faithful C semantics regardless.
|
|
40
|
+
* @see lib/dotgen/dotsplines.c:dot_splines_ (sd computed once, threaded through)
|
|
41
|
+
*/
|
|
42
|
+
export declare function getSplineBounds(g: Graph): SplineBoundsSnapshot;
|
|
43
|
+
/**
|
|
44
|
+
* Force the next `getSplineBounds(g)` call to recompute a fresh snapshot.
|
|
45
|
+
* Called once at the top of each `dotSplines_` pass (main graph or aux
|
|
46
|
+
* graph), exactly where C zero-initializes then computes `spline_info_t sd`
|
|
47
|
+
* fresh for that call. @see lib/dotgen/dotsplines.c:dot_splines_ (`spline_info_t
|
|
48
|
+
* sd = {0};` followed by the one-time LeftBound/RightBound loop)
|
|
49
|
+
*/
|
|
50
|
+
export declare function resetSplineBounds(g: Graph): void;
|
|
51
|
+
/**
|
|
52
|
+
* Extract RankEdgeInfo from the graph's rank table for an edge.
|
|
53
|
+
* Returns undefined if rank geometry is not available.
|
|
54
|
+
* @see lib/dotgen/dotsplines.c:make_regular_edge (rank geometry access)
|
|
55
|
+
*/
|
|
56
|
+
export declare function rankEdgeInfoOf(g: Graph, tailNode: Node, headNode: Node): RankEdgeInfo | undefined;
|
|
57
|
+
//# sourceMappingURL=edge-route-rank.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-route-rank.d.ts","sourceRoot":"","sources":["../../../src/layout/dot/edge-route-rank.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAK5D,8FAA8F;AAC9F,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAYjD;AAED,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAalD;AAED,mFAAmF;AACnF,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAE9D;AAQD;+EAC+E;AAC/E,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAOD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,GAAG,oBAAoB,CAO9D;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,CAAC,EAAE,KAAK,EACR,QAAQ,EAAE,IAAI,EACd,QAAQ,EAAE,IAAI,GACb,YAAY,GAAG,SAAS,CAgB1B"}
|