@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
package/LICENSE
ADDED
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
Eclipse Public License - v 2.0
|
|
2
|
+
|
|
3
|
+
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
|
|
4
|
+
PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
|
|
5
|
+
OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
|
6
|
+
|
|
7
|
+
1. DEFINITIONS
|
|
8
|
+
|
|
9
|
+
"Contribution" means:
|
|
10
|
+
|
|
11
|
+
a) in the case of the initial Contributor, the initial content
|
|
12
|
+
Distributed under this Agreement, and
|
|
13
|
+
|
|
14
|
+
b) in the case of each subsequent Contributor:
|
|
15
|
+
i) changes to the Program, and
|
|
16
|
+
ii) additions to the Program;
|
|
17
|
+
where such changes and/or additions to the Program originate from
|
|
18
|
+
and are Distributed by that particular Contributor. A Contribution
|
|
19
|
+
"originates" from a Contributor if it was added to the Program by
|
|
20
|
+
such Contributor itself or anyone acting on such Contributor's behalf.
|
|
21
|
+
Contributions do not include changes or additions to the Program that
|
|
22
|
+
are not Modified Works.
|
|
23
|
+
|
|
24
|
+
"Contributor" means any person or entity that Distributes the Program.
|
|
25
|
+
|
|
26
|
+
"Licensed Patents" mean patent claims licensable by a Contributor which
|
|
27
|
+
are necessarily infringed by the use or sale of its Contribution alone
|
|
28
|
+
or when combined with the Program.
|
|
29
|
+
|
|
30
|
+
"Program" means the Contributions Distributed in accordance with this
|
|
31
|
+
Agreement.
|
|
32
|
+
|
|
33
|
+
"Recipient" means anyone who receives the Program under this Agreement
|
|
34
|
+
or any Secondary License (as applicable), including Contributors.
|
|
35
|
+
|
|
36
|
+
"Derivative Works" shall mean any work, whether in Source Code or other
|
|
37
|
+
form, that is based on (or derived from) the Program and for which the
|
|
38
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
39
|
+
represent, as a whole, an original work of authorship.
|
|
40
|
+
|
|
41
|
+
"Modified Works" shall mean any work in Source Code or other form that
|
|
42
|
+
results from an addition to, deletion from, or modification of the
|
|
43
|
+
contents of the Program, including, for purposes of clarity any new file
|
|
44
|
+
in Source Code form that contains any contents of the Program. Modified
|
|
45
|
+
Works shall not include works that contain only declarations,
|
|
46
|
+
interfaces, types, classes, structures, or files of the Program solely
|
|
47
|
+
in each case in order to link to, bind by name, or subclass the Program
|
|
48
|
+
or Modified Works thereof.
|
|
49
|
+
|
|
50
|
+
"Distribute" means the acts of a) distributing or b) making available
|
|
51
|
+
in any manner that enables the transfer of a copy.
|
|
52
|
+
|
|
53
|
+
"Source Code" means the form of a Program preferred for making
|
|
54
|
+
modifications, including but not limited to software source code,
|
|
55
|
+
documentation source, and configuration files.
|
|
56
|
+
|
|
57
|
+
"Secondary License" means either the GNU General Public License,
|
|
58
|
+
Version 2.0, or any later versions of that license, including any
|
|
59
|
+
exceptions or additional permissions as identified by the initial
|
|
60
|
+
Contributor.
|
|
61
|
+
|
|
62
|
+
2. GRANT OF RIGHTS
|
|
63
|
+
|
|
64
|
+
a) Subject to the terms of this Agreement, each Contributor hereby
|
|
65
|
+
grants Recipient a non-exclusive, worldwide, royalty-free copyright
|
|
66
|
+
license to reproduce, prepare Derivative Works of, publicly display,
|
|
67
|
+
publicly perform, Distribute and sublicense the Contribution of such
|
|
68
|
+
Contributor, if any, and such Derivative Works.
|
|
69
|
+
|
|
70
|
+
b) Subject to the terms of this Agreement, each Contributor hereby
|
|
71
|
+
grants Recipient a non-exclusive, worldwide, royalty-free patent
|
|
72
|
+
license under Licensed Patents to make, use, sell, offer to sell,
|
|
73
|
+
import and otherwise transfer the Contribution of such Contributor,
|
|
74
|
+
if any, in Source Code or other form. This patent license shall
|
|
75
|
+
apply to the combination of the Contribution and the Program if, at
|
|
76
|
+
the time the Contribution is added by the Contributor, such addition
|
|
77
|
+
of the Contribution causes such combination to be covered by the
|
|
78
|
+
Licensed Patents. The patent license shall not apply to any other
|
|
79
|
+
combinations which include the Contribution. No hardware per se is
|
|
80
|
+
licensed hereunder.
|
|
81
|
+
|
|
82
|
+
c) Recipient understands that although each Contributor grants the
|
|
83
|
+
licenses to its Contributions set forth herein, no assurances are
|
|
84
|
+
provided by any Contributor that the Program does not infringe the
|
|
85
|
+
patent or other intellectual property rights of any other entity.
|
|
86
|
+
Each Contributor disclaims any liability to Recipient for claims
|
|
87
|
+
brought by any other entity based on infringement of intellectual
|
|
88
|
+
property rights or otherwise. As a condition to exercising the
|
|
89
|
+
rights and licenses granted hereunder, each Recipient hereby
|
|
90
|
+
assumes sole responsibility to secure any other intellectual
|
|
91
|
+
property rights needed, if any. For example, if a third party
|
|
92
|
+
patent license is required to allow Recipient to Distribute the
|
|
93
|
+
Program, it is Recipient's responsibility to acquire that license
|
|
94
|
+
before distributing the Program.
|
|
95
|
+
|
|
96
|
+
d) Each Contributor represents that to its knowledge it has
|
|
97
|
+
sufficient copyright rights in its Contribution, if any, to grant
|
|
98
|
+
the copyright license set forth in this Agreement.
|
|
99
|
+
|
|
100
|
+
e) Notwithstanding the terms of any Secondary License, no
|
|
101
|
+
Contributor makes additional grants to any Recipient (other than
|
|
102
|
+
those set forth in this Agreement) as a result of such Recipient's
|
|
103
|
+
receipt of the Program under the terms of a Secondary License
|
|
104
|
+
(if permitted under the terms of Section 3).
|
|
105
|
+
|
|
106
|
+
3. REQUIREMENTS
|
|
107
|
+
|
|
108
|
+
3.1 If a Contributor Distributes the Program in any form, then:
|
|
109
|
+
|
|
110
|
+
a) the Program must also be made available as Source Code, in
|
|
111
|
+
accordance with section 3.2, and the Contributor must accompany
|
|
112
|
+
the Program with a statement that the Source Code for the Program
|
|
113
|
+
is available under this Agreement, and informs Recipients how to
|
|
114
|
+
obtain it in a reasonable manner on or through a medium customarily
|
|
115
|
+
used for software exchange; and
|
|
116
|
+
|
|
117
|
+
b) the Contributor may Distribute the Program under a license
|
|
118
|
+
different than this Agreement, provided that such license:
|
|
119
|
+
i) effectively disclaims on behalf of all other Contributors all
|
|
120
|
+
warranties and conditions, express and implied, including
|
|
121
|
+
warranties or conditions of title and non-infringement, and
|
|
122
|
+
implied warranties or conditions of merchantability and fitness
|
|
123
|
+
for a particular purpose;
|
|
124
|
+
|
|
125
|
+
ii) effectively excludes on behalf of all other Contributors all
|
|
126
|
+
liability for damages, including direct, indirect, special,
|
|
127
|
+
incidental and consequential damages, such as lost profits;
|
|
128
|
+
|
|
129
|
+
iii) does not attempt to limit or alter the recipients' rights
|
|
130
|
+
in the Source Code under section 3.2; and
|
|
131
|
+
|
|
132
|
+
iv) requires any subsequent distribution of the Program by any
|
|
133
|
+
party to be under a license that satisfies the requirements
|
|
134
|
+
of this section 3.
|
|
135
|
+
|
|
136
|
+
3.2 When the Program is Distributed as Source Code:
|
|
137
|
+
|
|
138
|
+
a) it must be made available under this Agreement, or if the
|
|
139
|
+
Program (i) is combined with other material in a separate file or
|
|
140
|
+
files made available under a Secondary License, and (ii) the initial
|
|
141
|
+
Contributor attached to the Source Code the notice described in
|
|
142
|
+
Exhibit A of this Agreement, then the Program may be made available
|
|
143
|
+
under the terms of such Secondary Licenses, and
|
|
144
|
+
|
|
145
|
+
b) a copy of this Agreement must be included with each copy of
|
|
146
|
+
the Program.
|
|
147
|
+
|
|
148
|
+
3.3 Contributors may not remove or alter any copyright, patent,
|
|
149
|
+
trademark, attribution notices, disclaimers of warranty, or limitations
|
|
150
|
+
of liability ("notices") contained within the Program from any copy of
|
|
151
|
+
the Program which they Distribute, provided that Contributors may add
|
|
152
|
+
their own appropriate notices.
|
|
153
|
+
|
|
154
|
+
4. COMMERCIAL DISTRIBUTION
|
|
155
|
+
|
|
156
|
+
Commercial distributors of software may accept certain responsibilities
|
|
157
|
+
with respect to end users, business partners and the like. While this
|
|
158
|
+
license is intended to facilitate the commercial use of the Program,
|
|
159
|
+
the Contributor who includes the Program in a commercial product
|
|
160
|
+
offering should do so in a manner which does not create potential
|
|
161
|
+
liability for other Contributors. Therefore, if a Contributor includes
|
|
162
|
+
the Program in a commercial product offering, such Contributor
|
|
163
|
+
("Commercial Contributor") hereby agrees to defend and indemnify every
|
|
164
|
+
other Contributor ("Indemnified Contributor") against any losses,
|
|
165
|
+
damages and costs (collectively "Losses") arising from claims, lawsuits
|
|
166
|
+
and other legal actions brought by a third party against the Indemnified
|
|
167
|
+
Contributor to the extent caused by the acts or omissions of such
|
|
168
|
+
Commercial Contributor in connection with its distribution of the Program
|
|
169
|
+
in a commercial product offering. The obligations in this section do not
|
|
170
|
+
apply to any claims or Losses relating to any actual or alleged
|
|
171
|
+
intellectual property infringement. In order to qualify, an Indemnified
|
|
172
|
+
Contributor must: a) promptly notify the Commercial Contributor in
|
|
173
|
+
writing of such claim, and b) allow the Commercial Contributor to control,
|
|
174
|
+
and cooperate with the Commercial Contributor in, the defense and any
|
|
175
|
+
related settlement negotiations. The Indemnified Contributor may
|
|
176
|
+
participate in any such claim at its own expense.
|
|
177
|
+
|
|
178
|
+
For example, a Contributor might include the Program in a commercial
|
|
179
|
+
product offering, Product X. That Contributor is then a Commercial
|
|
180
|
+
Contributor. If that Commercial Contributor then makes performance
|
|
181
|
+
claims, or offers warranties related to Product X, those performance
|
|
182
|
+
claims and warranties are such Commercial Contributor's responsibility
|
|
183
|
+
alone. Under this section, the Commercial Contributor would have to
|
|
184
|
+
defend claims against the other Contributors related to those performance
|
|
185
|
+
claims and warranties, and if a court requires any other Contributor to
|
|
186
|
+
pay any damages as a result, the Commercial Contributor must pay
|
|
187
|
+
those damages.
|
|
188
|
+
|
|
189
|
+
5. NO WARRANTY
|
|
190
|
+
|
|
191
|
+
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
|
|
192
|
+
PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS"
|
|
193
|
+
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
|
|
194
|
+
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
|
|
195
|
+
TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
|
196
|
+
PURPOSE. Each Recipient is solely responsible for determining the
|
|
197
|
+
appropriateness of using and distributing the Program and assumes all
|
|
198
|
+
risks associated with its exercise of rights under this Agreement,
|
|
199
|
+
including but not limited to the risks and costs of program errors,
|
|
200
|
+
compliance with applicable laws, damage to or loss of data, programs
|
|
201
|
+
or equipment, and unavailability or interruption of operations.
|
|
202
|
+
|
|
203
|
+
6. DISCLAIMER OF LIABILITY
|
|
204
|
+
|
|
205
|
+
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
|
|
206
|
+
PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
|
|
207
|
+
SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
208
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
|
|
209
|
+
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
210
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
211
|
+
ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
|
|
212
|
+
EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
|
|
213
|
+
POSSIBILITY OF SUCH DAMAGES.
|
|
214
|
+
|
|
215
|
+
7. GENERAL
|
|
216
|
+
|
|
217
|
+
If any provision of this Agreement is invalid or unenforceable under
|
|
218
|
+
applicable law, it shall not affect the validity or enforceability of
|
|
219
|
+
the remainder of the terms of this Agreement, and without further
|
|
220
|
+
action by the parties hereto, such provision shall be reformed to the
|
|
221
|
+
minimum extent necessary to make such provision valid and enforceable.
|
|
222
|
+
|
|
223
|
+
If Recipient institutes patent litigation against any entity
|
|
224
|
+
(including a cross-claim or counterclaim in a lawsuit) alleging that the
|
|
225
|
+
Program itself (excluding combinations of the Program with other software
|
|
226
|
+
or hardware) infringes such Recipient's patent(s), then such Recipient's
|
|
227
|
+
rights granted under Section 2(b) shall terminate as of the date such
|
|
228
|
+
litigation is filed.
|
|
229
|
+
|
|
230
|
+
All Recipient's rights under this Agreement shall terminate if it
|
|
231
|
+
fails to comply with any of the material terms or conditions of this
|
|
232
|
+
Agreement and does not cure such failure in a reasonable period of
|
|
233
|
+
time after becoming aware of such noncompliance. If all Recipient's
|
|
234
|
+
rights under this Agreement terminate, Recipient agrees to cease use
|
|
235
|
+
and distribution of the Program as soon as reasonably practicable.
|
|
236
|
+
However, Recipient's obligations under this Agreement and any licenses
|
|
237
|
+
granted by Recipient relating to the Program shall continue and survive.
|
|
238
|
+
|
|
239
|
+
Everyone is permitted to copy and distribute copies of this Agreement,
|
|
240
|
+
but in order to avoid inconsistency the Agreement is copyrighted and
|
|
241
|
+
may only be modified in the following manner. The Agreement Steward
|
|
242
|
+
reserves the right to publish new versions (including revisions) of
|
|
243
|
+
this Agreement from time to time. No one other than the Agreement
|
|
244
|
+
Steward has the right to modify this Agreement. The Eclipse Foundation
|
|
245
|
+
is the initial Agreement Steward. The Eclipse Foundation may assign the
|
|
246
|
+
responsibility to serve as the Agreement Steward to a suitable separate
|
|
247
|
+
entity. Each new version of the Agreement will be given a distinguishing
|
|
248
|
+
version number. The Program (including Contributions) may always be
|
|
249
|
+
Distributed subject to the version of the Agreement under which it was
|
|
250
|
+
received. In addition, after a new version of the Agreement is published,
|
|
251
|
+
Contributor may elect to Distribute the Program (including its
|
|
252
|
+
Contributions) under the new version.
|
|
253
|
+
|
|
254
|
+
Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
|
|
255
|
+
receives no rights or licenses to the intellectual property of any
|
|
256
|
+
Contributor under this Agreement, whether expressly, by implication,
|
|
257
|
+
estoppel or otherwise. All rights in the Program not expressly granted
|
|
258
|
+
under this Agreement are reserved. Nothing in this Agreement is intended
|
|
259
|
+
to be enforceable by any entity that is not a Contributor or Recipient.
|
|
260
|
+
No third-party beneficiary rights are created under this Agreement.
|
|
261
|
+
|
|
262
|
+
Exhibit A - Form of Secondary Licenses Notice
|
|
263
|
+
|
|
264
|
+
"This Source Code may also be made available under the following
|
|
265
|
+
Secondary Licenses when the conditions for such availability set forth
|
|
266
|
+
in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
|
|
267
|
+
version(s), and exceptions or additional permissions here}."
|
|
268
|
+
|
|
269
|
+
Simply including a copy of this Agreement, including this Exhibit A
|
|
270
|
+
is not sufficient to license the Source Code under Secondary Licenses.
|
|
271
|
+
|
|
272
|
+
If it is not possible or desirable to put the notice in a particular
|
|
273
|
+
file, then You may include the notice in a location (such as a LICENSE
|
|
274
|
+
file in a relevant directory) where a recipient would be likely to
|
|
275
|
+
look for such a notice.
|
|
276
|
+
|
|
277
|
+
You may add additional accurate notices of copyright ownership.
|
package/README.md
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: EPL-2.0 -->
|
|
2
|
+
|
|
3
|
+
# @knowvah/dot-engine
|
|
4
|
+
|
|
5
|
+
A faithful TypeScript port of [Graphviz](https://gitlab.com/graphviz/graphviz) — the
|
|
6
|
+
graph-visualization toolkit originally written in C at AT&T Research and Lucent
|
|
7
|
+
Bell Labs. It parses the DOT language, runs Graphviz's layout engines, and emits
|
|
8
|
+
SVG.
|
|
9
|
+
|
|
10
|
+
The defining property: **pure TypeScript — no C.** No compiled Graphviz binary, no WASM build of it, no native dependencies.
|
|
11
|
+
It runs in a browser or in Node with zero external dependencies at runtime. The
|
|
12
|
+
goal is the closest achievable fidelity to the C implementation, which is treated
|
|
13
|
+
as the canonical specification (see [`CLAUDE.md`](./CLAUDE.md)). In practice the
|
|
14
|
+
`dot` engine is **conformant** with the C binary on the golden corpus: numeric
|
|
15
|
+
coordinates agree to a tight deterministic tolerance (±0.01) and non-numeric
|
|
16
|
+
content is exactly equal. This is the measured "match" bar, not a claim of
|
|
17
|
+
literal byte-for-byte SVG output — see [Conformance](./docs/conformance.md) for
|
|
18
|
+
the exact definition and the comparison code, and
|
|
19
|
+
[known divergences](./docs/known-divergences.md) for the documented exceptions.
|
|
20
|
+
|
|
21
|
+
> **Status: `0.1.x` — in active development, published to npm.** The port is
|
|
22
|
+
> mature enough to lay out and render real graphs across all engines; the C
|
|
23
|
+
> feature surface is not 100% covered. The `dot` engine is the primary
|
|
24
|
+
> fidelity target. See [Status & coverage](#status--coverage) below.
|
|
25
|
+
|
|
26
|
+
## Why this exists
|
|
27
|
+
|
|
28
|
+
Existing ways to render DOT in a JS environment shell out to a Graphviz
|
|
29
|
+
binary, a rendering server, or a WASM build — none of which run everywhere a
|
|
30
|
+
browser does, and all of which add deployment friction. @knowvah/dot-engine removes
|
|
31
|
+
that dependency entirely: the layout engine *is* TypeScript.
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm i @knowvah/dot-engine
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Ships as ESM bundles with TypeScript declarations, zero runtime dependencies.
|
|
40
|
+
Entry points: `@knowvah/dot-engine` (core), `@knowvah/dot-engine/api` (graph-building API),
|
|
41
|
+
`@knowvah/dot-engine/render` (renderers).
|
|
42
|
+
|
|
43
|
+
To build from source instead: clone, `npm install`, `npm run build`
|
|
44
|
+
(esbuild bundles + `.d.ts` declarations into `dist/`).
|
|
45
|
+
|
|
46
|
+
## Quick start
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import { renderSvg } from '@knowvah/dot-engine';
|
|
50
|
+
|
|
51
|
+
const dot = `
|
|
52
|
+
digraph {
|
|
53
|
+
a -> b;
|
|
54
|
+
b -> c;
|
|
55
|
+
a -> c;
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
const svg = renderSvg(dot, 'dot');
|
|
60
|
+
console.log(svg); // <svg ...>...</svg>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`renderSvg(dotSource, engine)` parses the DOT source, runs the named layout
|
|
64
|
+
engine, renders to SVG, and returns the SVG string. On failure it throws a
|
|
65
|
+
structured error — see [Error handling](#error-handling).
|
|
66
|
+
|
|
67
|
+
## Error handling
|
|
68
|
+
|
|
69
|
+
`renderSvg` throws on any failure; for a result-style alternative that never
|
|
70
|
+
throws, use `tryRenderSvg`:
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
import { tryRenderSvg } from '@knowvah/dot-engine';
|
|
74
|
+
|
|
75
|
+
const result = tryRenderSvg('digraph { a ->', 'dot');
|
|
76
|
+
if (result.svg) {
|
|
77
|
+
// success
|
|
78
|
+
} else {
|
|
79
|
+
const err = result.errors[0];
|
|
80
|
+
console.error(err.code, err.friendlyMessage, err.location);
|
|
81
|
+
// 'SYNTAX_UNEXPECTED_EOF' · 'The DOT source ended unexpectedly …' · { line, column, offset }
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
A `RenderResult` is `{ svg }` **or** `{ errors }` (never both); `errors` holds at
|
|
86
|
+
most the first failure. Each entry is a plain, JSON-serializable `GvError`:
|
|
87
|
+
|
|
88
|
+
| Field | Meaning |
|
|
89
|
+
|-------|---------|
|
|
90
|
+
| `type` | `'syntax'` · `'semantic'` · `'render'` |
|
|
91
|
+
| `code` | Stable machine key (an i18n key) — branch on this |
|
|
92
|
+
| `message` | Concise technical text |
|
|
93
|
+
| `friendlyMessage` | Approachable, non-localized English for end users |
|
|
94
|
+
| `location?` | `{ line, column, offset? }` — the real error position |
|
|
95
|
+
| `expected?` | Parser expectation list, for syntax errors only |
|
|
96
|
+
|
|
97
|
+
The `code` values are a closed union: `SYNTAX_ERROR`, `SYNTAX_UNEXPECTED_EOF`,
|
|
98
|
+
`EDGE_OP_DIRECTED_IN_UNDIRECTED`, `EDGE_OP_UNDIRECTED_IN_DIRECTED`,
|
|
99
|
+
`HTML_PARSE_ERROR`, `RENDER_ERROR`, `GENERIC_ERROR`.
|
|
100
|
+
|
|
101
|
+
The throwing `renderSvg` raises the same structured values as real `Error`
|
|
102
|
+
subclasses — `ParseError` (syntax) and `RenderError` (render) — each carrying
|
|
103
|
+
`code`, `type`, `friendlyMessage`, and (for `ParseError`) `location`/`expected`.
|
|
104
|
+
Branch on `.code`/`.type` rather than `instanceof` per subclass.
|
|
105
|
+
|
|
106
|
+
## Layout engines
|
|
107
|
+
|
|
108
|
+
All eight Graphviz layout engines are registered. Pass the name as the second
|
|
109
|
+
argument to `renderSvg`:
|
|
110
|
+
|
|
111
|
+
| Engine | Layout style |
|
|
112
|
+
|--------------|-----------------------------------------------|
|
|
113
|
+
| `dot` | Hierarchical / layered directed graphs |
|
|
114
|
+
| `neato` | Spring-model (Kamada–Kawai) |
|
|
115
|
+
| `fdp` | Force-directed |
|
|
116
|
+
| `sfdp` | Multiscale force-directed (large graphs) |
|
|
117
|
+
| `circo` | Circular |
|
|
118
|
+
| `twopi` | Radial |
|
|
119
|
+
| `osage` | Clustered |
|
|
120
|
+
| `patchwork` | Squarified treemap |
|
|
121
|
+
|
|
122
|
+
`dot` receives the most fidelity attention because the primary consumer is
|
|
123
|
+
DOT-centric. Per-engine coverage against the C source is tracked in the
|
|
124
|
+
[port catalog](./plans/port-catalog/README.md).
|
|
125
|
+
|
|
126
|
+
## Browser usage
|
|
127
|
+
|
|
128
|
+
The library uses no Node-only APIs and is safe to bundle for the browser. One
|
|
129
|
+
caller-supplied hook may be required:
|
|
130
|
+
|
|
131
|
+
- **Image sizing.** When a graph references external images (e.g.
|
|
132
|
+
`node [image="foo.png"]`), Graphviz needs each image's intrinsic dimensions.
|
|
133
|
+
Because the library cannot read the filesystem, provide a sizer via
|
|
134
|
+
`setImageSizer`:
|
|
135
|
+
|
|
136
|
+
```ts
|
|
137
|
+
import { setImageSizer } from '@knowvah/dot-engine';
|
|
138
|
+
|
|
139
|
+
setImageSizer((src) => ({ w: 64, h: 64 })); // return null if unknown
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Text measurement
|
|
143
|
+
|
|
144
|
+
Layout needs to know how wide each label is. By default this uses a **built-in,
|
|
145
|
+
deterministic metric model** — no font files, identical output on every platform.
|
|
146
|
+
In the **browser** the library automatically measures with the page's own canvas
|
|
147
|
+
(the same font the browser renders the SVG with).
|
|
148
|
+
|
|
149
|
+
For **host-faithful** Node measurement (real kerning/shaping, matching the local
|
|
150
|
+
fonts the SVG will be rendered with), install the optional `canvas` peer and wire
|
|
151
|
+
it once via `setTextMeasurer`:
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
import { setTextMeasurer, CanvasTextMeasurer } from '@knowvah/dot-engine';
|
|
155
|
+
import { createCanvas } from 'canvas'; // optional peer: `npm i canvas`
|
|
156
|
+
|
|
157
|
+
setTextMeasurer(new CanvasTextMeasurer(createCanvas(0, 0).getContext('2d')));
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Trade-off: the built-in model is reproducible across machines; the host-faithful
|
|
161
|
+
path matches the rendering font but is platform-dependent (as native graphviz is).
|
|
162
|
+
See the Text measurement guide for the full contract.
|
|
163
|
+
|
|
164
|
+
## Security
|
|
165
|
+
|
|
166
|
+
**Treat rendered output as attacker-controlled markup whenever the DOT source is
|
|
167
|
+
untrusted.** The SVG and image-map strings this library produces embed graph
|
|
168
|
+
attribute values (labels, `id`, `class`, `href`/`URL`, `image`, `stylesheet`,
|
|
169
|
+
tooltips) directly. All such values are XML-escaped exactly as native Graphviz
|
|
170
|
+
does, so they cannot break out of an element or attribute — but, **matching
|
|
171
|
+
upstream Graphviz, the library does not filter URL schemes or validate resource
|
|
172
|
+
origins.** A DOT source you did not author can therefore contain:
|
|
173
|
+
|
|
174
|
+
- `href="javascript:…"` / `URL="javascript:…"` on a node or edge (executes on
|
|
175
|
+
click),
|
|
176
|
+
- `image="…"` (usershape) or an image-map `href` pointing at an arbitrary
|
|
177
|
+
external origin,
|
|
178
|
+
- a `stylesheet="…"` referencing an external CSS origin.
|
|
179
|
+
|
|
180
|
+
This is deliberate — scheme/origin policy belongs to the page embedding the
|
|
181
|
+
output, not to the layout library. If you render untrusted DOT and embed the
|
|
182
|
+
result inline (`innerHTML`, `dangerouslySetInnerHTML`, an inline `<svg>`), apply
|
|
183
|
+
a **Content-Security-Policy** on the host page as the control point:
|
|
184
|
+
|
|
185
|
+
- `script-src` (without `'unsafe-inline'`) — neutralizes `javascript:` hrefs and
|
|
186
|
+
any inline event handlers,
|
|
187
|
+
- `img-src` — constrains `<image>` / usershape origins,
|
|
188
|
+
- `style-src` — constrains the `stylesheet` processing instruction.
|
|
189
|
+
|
|
190
|
+
If you cannot set a CSP, sanitize the returned markup (e.g. DOMPurify with an
|
|
191
|
+
SVG profile) before inserting it, or render from trusted DOT only.
|
|
192
|
+
|
|
193
|
+
## Public API
|
|
194
|
+
|
|
195
|
+
```ts
|
|
196
|
+
// Primary entry point. Throws a structured GvError (ParseError / RenderError).
|
|
197
|
+
function renderSvg(dotSource: string, engine: string): string;
|
|
198
|
+
|
|
199
|
+
// Result-style entry point: returns { svg } or { errors: [GvError] }, never throws.
|
|
200
|
+
function tryRenderSvg(dotSource: string, engine: string): RenderResult;
|
|
201
|
+
|
|
202
|
+
// Structured error contract (see "Error handling").
|
|
203
|
+
interface GvError { type; code; message; friendlyMessage; location?; expected?; }
|
|
204
|
+
interface RenderResult { svg?: string; errors?: GvError[]; }
|
|
205
|
+
type GvErrorType = 'syntax' | 'semantic' | 'render';
|
|
206
|
+
type GvErrorCode = 'SYNTAX_ERROR' | 'SYNTAX_UNEXPECTED_EOF' | /* …7 total */ 'GENERIC_ERROR';
|
|
207
|
+
class ParseError extends Error implements GvError { /* type:'syntax' */ }
|
|
208
|
+
class RenderError extends Error implements GvError { /* type:'render' */ }
|
|
209
|
+
|
|
210
|
+
// Parse DOT into the in-memory graph model (without laying it out).
|
|
211
|
+
function parse(dotSource: string): Graph;
|
|
212
|
+
|
|
213
|
+
// Supply intrinsic dimensions for external image references (browser/Node).
|
|
214
|
+
function setImageSizer(sizer: ImageSizer | null): void;
|
|
215
|
+
type ImageSizer = (src: string) => { w: number; h: number } | null;
|
|
216
|
+
|
|
217
|
+
// Multi-format render + structured xdot draw-ops (from `@knowvah/dot-engine/render`,
|
|
218
|
+
// also re-exported from the root package).
|
|
219
|
+
function render(g: Graph, format: OutputFormat, opts?: { engine?: string }): string;
|
|
220
|
+
function getDrawOps(g: Graph, opts?: { engine?: string }): XdotOp[];
|
|
221
|
+
|
|
222
|
+
// Programmatic graph construction and computed-geometry readback (from
|
|
223
|
+
// `@knowvah/dot-engine/api`, also re-exported from the root package) — build a graph
|
|
224
|
+
// without writing DOT source, or read back node/edge/bbox coordinates after
|
|
225
|
+
// layout.
|
|
226
|
+
function createGraph(opts?: CreateGraphOptions): GvGraphBuilder;
|
|
227
|
+
function addEdge(g: Graph, tail: Node, head: Node, name?: string): Edge;
|
|
228
|
+
function getLayout(g: Graph, opts?: { yAxis?: 'up' | 'down' }): LayoutSnapshot;
|
|
229
|
+
|
|
230
|
+
// Lower-level orchestration, for callers that need engine/render control.
|
|
231
|
+
class GvcContext { /* register engines/renderers, layout, render */ }
|
|
232
|
+
function renderWithContext(ctx: GvcContext, graph: Graph, format: string): string;
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Most callers only need `renderSvg` (or `tryRenderSvg` for result-style error
|
|
236
|
+
handling). `parse`, `GvcContext`, and `renderWithContext` are exposed for
|
|
237
|
+
advanced use — e.g. inspecting the parsed model, or driving layout and
|
|
238
|
+
rendering as separate steps. `createGraph`/`addEdge`, `getLayout`, `render`,
|
|
239
|
+
and `getDrawOps` are the graph-building, geometry-readback, multi-format
|
|
240
|
+
render, and structured-draw-op surfaces respectively — see the
|
|
241
|
+
[API guide](https://knowvah.github.io/dot-engine/guide/api) for full
|
|
242
|
+
walkthroughs of each.
|
|
243
|
+
|
|
244
|
+
## Development
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
npm test # run the test suite (vitest)
|
|
248
|
+
npm run coverage # run with coverage (v8)
|
|
249
|
+
npm run typecheck # tsc --noEmit, strict mode, zero errors required
|
|
250
|
+
npm run build # bundle to dist/index.js
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
The test suite verifies port fidelity by comparing generated SVG against output
|
|
254
|
+
from the canonical C Graphviz. New behavior is pinned to the C source — see
|
|
255
|
+
[`CLAUDE.md`](./CLAUDE.md) for the porting rules and the
|
|
256
|
+
[port catalog](./plans/port-catalog/README.md) for status.
|
|
257
|
+
|
|
258
|
+
## Status & coverage
|
|
259
|
+
|
|
260
|
+
- **What works:** parsing, all eight layout engines, SVG output, and the
|
|
261
|
+
intermediate `json` / `xdot` / `dot` / imagemap text formats.
|
|
262
|
+
- **Conformance bar:** a render is **conformant** when it matches the C oracle
|
|
263
|
+
within a ±0.01 deterministic tolerance (`dot`, `circo`, `twopi`, `osage`,
|
|
264
|
+
`patchwork`) or is characterized at a looser ±0.5 tolerance for the
|
|
265
|
+
iterative force-directed engines (`neato`, `fdp`, `sfdp`) — never literal
|
|
266
|
+
byte equality. Full definition: [Conformance](./docs/conformance.md).
|
|
267
|
+
- **Current parity** (fresh corpus sweeps, dated 2026-07-11 — see
|
|
268
|
+
[`test/corpus/PARITY.md`](./test/corpus/PARITY.md) and the
|
|
269
|
+
[docs-site parity pages](https://knowvah.github.io/dot-engine/engines) for
|
|
270
|
+
live counts): `dot` SVG 762/788 conformant (+14 structural-match, 0
|
|
271
|
+
unaccepted tracked gaps — every remaining non-conformant graph is a
|
|
272
|
+
documented, accepted divergence); `dot` xdot 754/759; `circo` xdot 745/762;
|
|
273
|
+
`twopi` xdot 740/762; `osage` xdot 744/759; `patchwork` xdot 757/762
|
|
274
|
+
(all deterministic, ±0.01). `neato`/`fdp`/`sfdp` are characterized at ±0.5
|
|
275
|
+
rather than gated at the deterministic bar, per the tolerance split above.
|
|
276
|
+
- **What's tracked:** every C algorithm and its port status is inventoried in
|
|
277
|
+
the [port catalog](./plans/port-catalog/README.md). Items marked `[ ]` there
|
|
278
|
+
are real gaps, not footnotes.
|
|
279
|
+
- **Known behavioral divergences from C** (differences investigated,
|
|
280
|
+
root-caused, and deliberately not chased) are listed in
|
|
281
|
+
[`docs/known-divergences.md`](./docs/known-divergences.md).
|
|
282
|
+
|
|
283
|
+
## Known limitations
|
|
284
|
+
|
|
285
|
+
- **Feature coverage is incomplete.** The C source defines completeness; gaps
|
|
286
|
+
are tracked in the port catalog rather than hidden.
|
|
287
|
+
|
|
288
|
+
## License
|
|
289
|
+
|
|
290
|
+
[Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-2.0/) (EPL-2.0),
|
|
291
|
+
matching [upstream Graphviz](https://gitlab.com/graphviz/graphviz). Every source file carries an
|
|
292
|
+
`SPDX-License-Identifier: EPL-2.0` header.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Programmatic graph builder — constructs a Graph model without emitting DOT.
|
|
3
|
+
*
|
|
4
|
+
* Exposes lightweight typed handles (GvNode, GvEdge) that wrap internal
|
|
5
|
+
* model references without leaking the mutable model classes (ADR-1, ADR-6,
|
|
6
|
+
* ADR-8).
|
|
7
|
+
*
|
|
8
|
+
* @see lib/cgraph/graph.c:agopen
|
|
9
|
+
* @see lib/cgraph/node.c:agnode
|
|
10
|
+
* @see lib/cgraph/subg.c:agsubg
|
|
11
|
+
*/
|
|
12
|
+
import { Graph } from '../model/graph.js';
|
|
13
|
+
/** Options for createGraph. */
|
|
14
|
+
export interface CreateGraphOptions {
|
|
15
|
+
directed?: boolean;
|
|
16
|
+
strict?: boolean;
|
|
17
|
+
name?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Opaque handle for a graph node.
|
|
21
|
+
* @see lib/cgraph/cgraph.h:Agnode_s
|
|
22
|
+
*/
|
|
23
|
+
export interface GvNode {
|
|
24
|
+
readonly name: string;
|
|
25
|
+
setAttr(k: string, v: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Set an attribute to an HTML-string value (e.g. `label` to an HTML-table
|
|
28
|
+
* label). Equivalent to `label=<...>` in DOT text: the value is tagged as
|
|
29
|
+
* HTML so the layout engine measures it as markup, not as literal text.
|
|
30
|
+
* @see lib/cgraph/refstr.c:aghtmlstr
|
|
31
|
+
*/
|
|
32
|
+
setHtmlAttr(k: string, v: string): void;
|
|
33
|
+
getAttr(k: string): string | undefined;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Opaque handle for a graph edge.
|
|
37
|
+
* @see lib/cgraph/cgraph.h:Agedge_s
|
|
38
|
+
*/
|
|
39
|
+
export interface GvEdge {
|
|
40
|
+
readonly tail: string;
|
|
41
|
+
readonly head: string;
|
|
42
|
+
setAttr(k: string, v: string): void;
|
|
43
|
+
/**
|
|
44
|
+
* Set an attribute to an HTML-string value (e.g. an HTML-table edge label).
|
|
45
|
+
* @see GvNode.setHtmlAttr
|
|
46
|
+
*/
|
|
47
|
+
setHtmlAttr(k: string, v: string): void;
|
|
48
|
+
getAttr(k: string): string | undefined;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Builder returned by createGraph. Provides idiomatic programmatic
|
|
52
|
+
* construction of a graph model.
|
|
53
|
+
*/
|
|
54
|
+
export interface GvGraphBuilder {
|
|
55
|
+
addNode(name: string, attrs?: Record<string, string>): GvNode;
|
|
56
|
+
addEdge(tail: GvNode | string, head: GvNode | string, attrs?: Record<string, string>): GvEdge;
|
|
57
|
+
addSubgraph(name: string, attrs?: Record<string, string>): GvGraphBuilder;
|
|
58
|
+
setAttr(k: string, v: string): void;
|
|
59
|
+
/**
|
|
60
|
+
* Set an attribute on this (sub)graph to an HTML-string value — the
|
|
61
|
+
* supported way to give a cluster an HTML-table `label` (the header-size
|
|
62
|
+
* reservation the jar drives) without hand-writing the internal marker.
|
|
63
|
+
* @see GvNode.setHtmlAttr
|
|
64
|
+
*/
|
|
65
|
+
setHtmlAttr(k: string, v: string): void;
|
|
66
|
+
getAttr(k: string): string | undefined;
|
|
67
|
+
readonly graph: Graph;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Create a new programmatic graph builder.
|
|
71
|
+
*
|
|
72
|
+
* The builder's `.graph` is a fresh Graph ready for handoff to layout/render.
|
|
73
|
+
* Defaults: directed=true, strict=false, name=''.
|
|
74
|
+
*
|
|
75
|
+
* @see lib/cgraph/graph.c:agopen
|
|
76
|
+
*/
|
|
77
|
+
export declare function createGraph(opts?: CreateGraphOptions): GvGraphBuilder;
|
|
78
|
+
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/api/builder.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,EAAkB,MAAM,mBAAmB,CAAC;AAU1D,+BAA+B;AAC/B,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;;;;;OAKG;IACH,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;;;OAGG;IACH,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;IAC9D,OAAO,CACL,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7B,MAAM,CAAC;IACV,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,cAAc,CAAC;IAC1E,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;;;;;OAKG;IACH,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;CACvB;AAmLD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,CAAC,EAAE,kBAAkB,GAAG,cAAc,CAGrE"}
|