@knowvah/dot-engine 2.10.3 → 2.12.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.
Files changed (342) hide show
  1. package/dist/common/agerr.d.ts +12 -0
  2. package/dist/common/agerr.d.ts.map +1 -1
  3. package/dist/gvc/context.d.ts.map +1 -1
  4. package/dist/gvc/emit-xdot.d.ts.map +1 -1
  5. package/dist/gvc/layout-reset.d.ts +38 -1
  6. package/dist/gvc/layout-reset.d.ts.map +1 -1
  7. package/dist/index.d.ts +2 -0
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +1260 -387
  10. package/dist/index.js.map +4 -4
  11. package/dist/layout/circo/circular.d.ts.map +1 -1
  12. package/dist/layout/dot/edge-route-chain.d.ts.map +1 -1
  13. package/dist/layout/dot/edge-route-helpers.d.ts +6 -1
  14. package/dist/layout/dot/edge-route-helpers.d.ts.map +1 -1
  15. package/dist/layout/dot/edge-route-rank.d.ts +4 -1
  16. package/dist/layout/dot/edge-route-rank.d.ts.map +1 -1
  17. package/dist/layout/dot/index.d.ts.map +1 -1
  18. package/dist/layout/dot/init.d.ts.map +1 -1
  19. package/dist/layout/fdp/cluster-edges.d.ts +11 -0
  20. package/dist/layout/fdp/cluster-edges.d.ts.map +1 -1
  21. package/dist/layout/neato/closest.d.ts +20 -0
  22. package/dist/layout/neato/closest.d.ts.map +1 -0
  23. package/dist/layout/neato/constrained-majorization.d.ts +13 -0
  24. package/dist/layout/neato/constrained-majorization.d.ts.map +1 -1
  25. package/dist/layout/neato/embed-graph.d.ts +20 -0
  26. package/dist/layout/neato/embed-graph.d.ts.map +1 -0
  27. package/dist/layout/neato/fdp-adjust.d.ts.map +1 -1
  28. package/dist/layout/neato/index.d.ts.map +1 -1
  29. package/dist/layout/neato/init-dim.d.ts +54 -0
  30. package/dist/layout/neato/init-dim.d.ts.map +1 -0
  31. package/dist/layout/neato/init.d.ts +1 -11
  32. package/dist/layout/neato/init.d.ts.map +1 -1
  33. package/dist/layout/neato/kk.d.ts +4 -2
  34. package/dist/layout/neato/kk.d.ts.map +1 -1
  35. package/dist/layout/neato/matrix-ops-dense.d.ts +34 -0
  36. package/dist/layout/neato/matrix-ops-dense.d.ts.map +1 -0
  37. package/dist/layout/neato/pca.d.ts +14 -0
  38. package/dist/layout/neato/pca.d.ts.map +1 -0
  39. package/dist/layout/neato/sgd.d.ts +2 -3
  40. package/dist/layout/neato/sgd.d.ts.map +1 -1
  41. package/dist/layout/neato/start.d.ts +5 -5
  42. package/dist/layout/neato/start.d.ts.map +1 -1
  43. package/dist/layout/neato/stress-kernel.d.ts +10 -2
  44. package/dist/layout/neato/stress-kernel.d.ts.map +1 -1
  45. package/dist/layout/neato/stress-subspace.d.ts +39 -0
  46. package/dist/layout/neato/stress-subspace.d.ts.map +1 -0
  47. package/dist/layout/neato/vpsc-adjust.d.ts.map +1 -1
  48. package/dist/layout/pack/ccomps.d.ts +4 -2
  49. package/dist/layout/pack/ccomps.d.ts.map +1 -1
  50. package/dist/layout/sfdp/index.d.ts.map +1 -1
  51. package/dist/layout/sfdp/init.d.ts +6 -7
  52. package/dist/layout/sfdp/init.d.ts.map +1 -1
  53. package/dist/layout/twopi/circle.d.ts.map +1 -1
  54. package/dist/layout/twopi/index.d.ts.map +1 -1
  55. package/dist/render/dot/attrs.d.ts +7 -0
  56. package/dist/render/dot/attrs.d.ts.map +1 -1
  57. package/dist/render.js +1637 -770
  58. package/dist/render.js.map +4 -4
  59. package/package.json +4 -4
  60. package/src/common/agerr.ts +49 -1
  61. package/src/gvc/__fixtures__/rerender/abom-shift-pack.dot.plain.nofree.1 +20 -0
  62. package/src/gvc/__fixtures__/rerender/abom-shift-pack.dot.plain.nofree.2 +20 -0
  63. package/src/gvc/__fixtures__/rerender/abom-shift-pack.dot.plain.nofree.3 +20 -0
  64. package/src/gvc/__fixtures__/rerender/abom-shift-pack.gv +1 -0
  65. package/src/gvc/__fixtures__/rerender/abom-shift-parity.dot.plain.nofree.1 +22 -0
  66. package/src/gvc/__fixtures__/rerender/abom-shift-parity.dot.plain.nofree.2 +22 -0
  67. package/src/gvc/__fixtures__/rerender/abom-shift-parity.dot.plain.nofree.3 +22 -0
  68. package/src/gvc/__fixtures__/rerender/abom-shift-parity.gv +1 -0
  69. package/src/gvc/__fixtures__/rerender/abom-shift.dot.plain.nofree.1 +13 -0
  70. package/src/gvc/__fixtures__/rerender/abom-shift.dot.plain.nofree.2 +13 -0
  71. package/src/gvc/__fixtures__/rerender/abom-shift.dot.plain.nofree.3 +13 -0
  72. package/src/gvc/__fixtures__/rerender/abom-shift.gv +1 -0
  73. package/src/gvc/__fixtures__/rerender/cluster-edge-splines.fdp.plain.1 +10 -0
  74. package/src/gvc/__fixtures__/rerender/cluster-edge-splines.fdp.plain.2 +11 -0
  75. package/src/gvc/__fixtures__/rerender/cluster-edge-splines.gv +9 -0
  76. package/src/gvc/__fixtures__/rerender/cluster-edges.fdp.dot.1 +40 -0
  77. package/src/gvc/__fixtures__/rerender/cluster-edges.fdp.dot.2 +40 -0
  78. package/src/gvc/__fixtures__/rerender/cluster-edges.fdp.plain.noaddr.1 +15 -0
  79. package/src/gvc/__fixtures__/rerender/cluster-edges.fdp.plain.noaddr.2 +17 -0
  80. package/src/gvc/__fixtures__/rerender/cluster-edges.fdp.seq-dot-plain.1 +40 -0
  81. package/src/gvc/__fixtures__/rerender/cluster-edges.fdp.seq-dot-plain.2 +15 -0
  82. package/src/gvc/__fixtures__/rerender/cluster-edges.fdp.seq-dot-svg.1 +40 -0
  83. package/src/gvc/__fixtures__/rerender/cluster-edges.fdp.seq-dot-svg.2 +99 -0
  84. package/src/gvc/__fixtures__/rerender/cluster-edges.fdp.seq-json-json.1 +489 -0
  85. package/src/gvc/__fixtures__/rerender/cluster-edges.fdp.seq-json-json.2 +503 -0
  86. package/src/gvc/__fixtures__/rerender/cluster-edges.fdp.seq-nofree-dot-svg.1 +40 -0
  87. package/src/gvc/__fixtures__/rerender/cluster-edges.fdp.seq-nofree-dot-svg.2 +109 -0
  88. package/src/gvc/__fixtures__/rerender/cluster-edges.fdp.xdot.1 +69 -0
  89. package/src/gvc/__fixtures__/rerender/cluster-edges.fdp.xdot.2 +70 -0
  90. package/src/gvc/__fixtures__/rerender/cluster-edges.gv +15 -0
  91. package/src/gvc/__fixtures__/rerender/fdp-1581.fdp.dot.1 +104 -0
  92. package/src/gvc/__fixtures__/rerender/fdp-1581.fdp.dot.2 +104 -0
  93. package/src/gvc/__fixtures__/rerender/fdp-1581.gv +26 -0
  94. package/src/gvc/__fixtures__/rerender/flat-rev-stale.dot.plain.nofree.1 +34 -0
  95. package/src/gvc/__fixtures__/rerender/flat-rev-stale.dot.plain.nofree.2 +34 -0
  96. package/src/gvc/__fixtures__/rerender/flat-rev-stale.dot.plain.nofree.3 +34 -0
  97. package/src/gvc/__fixtures__/rerender/flat-rev-stale.gv +33 -0
  98. package/src/gvc/__fixtures__/rerender/multi-edge.dot.svg.nofree.1 +181 -0
  99. package/src/gvc/__fixtures__/rerender/multi-edge.dot.svg.nofree.2 +218 -0
  100. package/src/gvc/__fixtures__/rerender/multi-edge.dot.svg.nofree.3 +255 -0
  101. package/src/gvc/__fixtures__/rerender/regen.sh +25 -0
  102. package/src/gvc/context.ts +7 -2
  103. package/src/gvc/emit-xdot.ts +37 -7
  104. package/src/gvc/layout-reset.ts +59 -1
  105. package/src/index.ts +4 -0
  106. package/src/layout/circo/circular.ts +3 -1
  107. package/src/layout/dot/edge-route-chain.ts +79 -7
  108. package/src/layout/dot/edge-route-helpers.ts +8 -2
  109. package/src/layout/dot/edge-route-rank.ts +20 -2
  110. package/src/layout/dot/index.ts +17 -2
  111. package/src/layout/dot/init.ts +9 -17
  112. package/src/layout/dot/splines-flat.ts +12 -12
  113. package/src/layout/dot/splines.ts +2 -2
  114. package/src/layout/fdp/cluster-edges.ts +0 -0
  115. package/src/layout/fdp/index.ts +2 -2
  116. package/src/layout/neato/__fixtures__/dim/circuit-dim3.dot +33 -0
  117. package/src/layout/neato/__fixtures__/dim/circuit-dim3.gv +12 -0
  118. package/src/layout/neato/__fixtures__/dim/circuit-dim3.stderr +0 -0
  119. package/src/layout/neato/__fixtures__/dim/circuit-dim3.xdot +54 -0
  120. package/src/layout/neato/__fixtures__/dim/dim11-dimen11.dot +32 -0
  121. package/src/layout/neato/__fixtures__/dim/dim11-dimen11.gv +11 -0
  122. package/src/layout/neato/__fixtures__/dim/dim11-dimen11.stderr +0 -0
  123. package/src/layout/neato/__fixtures__/dim/dim11-dimen11.xdot +53 -0
  124. package/src/layout/neato/__fixtures__/dim/dim3-dimen3.dot +32 -0
  125. package/src/layout/neato/__fixtures__/dim/dim3-dimen3.gv +11 -0
  126. package/src/layout/neato/__fixtures__/dim/dim3-dimen3.stderr +0 -0
  127. package/src/layout/neato/__fixtures__/dim/dim3-dimen3.xdot +53 -0
  128. package/src/layout/neato/__fixtures__/dim/dim3.dot +31 -0
  129. package/src/layout/neato/__fixtures__/dim/dim3.gv +10 -0
  130. package/src/layout/neato/__fixtures__/dim/dim3.stderr +0 -0
  131. package/src/layout/neato/__fixtures__/dim/dim3.xdot +52 -0
  132. package/src/layout/neato/__fixtures__/dim/dim4-dimen4.dot +32 -0
  133. package/src/layout/neato/__fixtures__/dim/dim4-dimen4.gv +11 -0
  134. package/src/layout/neato/__fixtures__/dim/dim4-dimen4.stderr +0 -0
  135. package/src/layout/neato/__fixtures__/dim/dim4-dimen4.xdot +53 -0
  136. package/src/layout/neato/__fixtures__/dim/dimen3.dot +31 -0
  137. package/src/layout/neato/__fixtures__/dim/dimen3.gv +10 -0
  138. package/src/layout/neato/__fixtures__/dim/dimen3.stderr +0 -0
  139. package/src/layout/neato/__fixtures__/dim/dimen3.xdot +52 -0
  140. package/src/layout/neato/__fixtures__/dim/hier-big-dim3.dot +267 -0
  141. package/src/layout/neato/__fixtures__/dim/hier-big-dim3.gv +84 -0
  142. package/src/layout/neato/__fixtures__/dim/hier-big-dim3.stderr +0 -0
  143. package/src/layout/neato/__fixtures__/dim/hier-big-dim3.xdot +468 -0
  144. package/src/layout/neato/__fixtures__/dim/hier-big-dim4.dot +267 -0
  145. package/src/layout/neato/__fixtures__/dim/hier-big-dim4.gv +84 -0
  146. package/src/layout/neato/__fixtures__/dim/hier-big-dim4.stderr +0 -0
  147. package/src/layout/neato/__fixtures__/dim/hier-big-dim4.xdot +468 -0
  148. package/src/layout/neato/__fixtures__/dim/hier-big-subset-dim3.dot +268 -0
  149. package/src/layout/neato/__fixtures__/dim/hier-big-subset-dim3.gv +85 -0
  150. package/src/layout/neato/__fixtures__/dim/hier-big-subset-dim3.stderr +0 -0
  151. package/src/layout/neato/__fixtures__/dim/hier-big-subset-dim3.xdot +469 -0
  152. package/src/layout/neato/__fixtures__/dim/hier-big110-dim3.dot +484 -0
  153. package/src/layout/neato/__fixtures__/dim/hier-big110-dim3.gv +151 -0
  154. package/src/layout/neato/__fixtures__/dim/hier-big110-dim3.stderr +0 -0
  155. package/src/layout/neato/__fixtures__/dim/hier-big110-dim3.xdot +852 -0
  156. package/src/layout/neato/__fixtures__/dim/hier-circuit-dim3.dot +34 -0
  157. package/src/layout/neato/__fixtures__/dim/hier-circuit-dim3.gv +13 -0
  158. package/src/layout/neato/__fixtures__/dim/hier-circuit-dim3.stderr +0 -0
  159. package/src/layout/neato/__fixtures__/dim/hier-circuit-dim3.xdot +55 -0
  160. package/src/layout/neato/__fixtures__/dim/hier-dim3.dot +33 -0
  161. package/src/layout/neato/__fixtures__/dim/hier-dim3.gv +12 -0
  162. package/src/layout/neato/__fixtures__/dim/hier-dim3.stderr +0 -0
  163. package/src/layout/neato/__fixtures__/dim/hier-dim3.xdot +54 -0
  164. package/src/layout/neato/__fixtures__/dim/hier-dim4.dot +33 -0
  165. package/src/layout/neato/__fixtures__/dim/hier-dim4.gv +12 -0
  166. package/src/layout/neato/__fixtures__/dim/hier-dim4.stderr +0 -0
  167. package/src/layout/neato/__fixtures__/dim/hier-dim4.xdot +54 -0
  168. package/src/layout/neato/__fixtures__/dim/hier-dirnone-dim2.dot +32 -0
  169. package/src/layout/neato/__fixtures__/dim/hier-dirnone-dim2.gv +11 -0
  170. package/src/layout/neato/__fixtures__/dim/hier-dirnone-dim2.stderr +0 -0
  171. package/src/layout/neato/__fixtures__/dim/hier-dirnone-dim2.xdot +53 -0
  172. package/src/layout/neato/__fixtures__/dim/hier-dirnone-dim3.dot +34 -0
  173. package/src/layout/neato/__fixtures__/dim/hier-dirnone-dim3.gv +13 -0
  174. package/src/layout/neato/__fixtures__/dim/hier-dirnone-dim3.stderr +0 -0
  175. package/src/layout/neato/__fixtures__/dim/hier-dirnone-dim3.xdot +55 -0
  176. package/src/layout/neato/__fixtures__/dim/hier-len-dim3.dot +37 -0
  177. package/src/layout/neato/__fixtures__/dim/hier-len-dim3.gv +12 -0
  178. package/src/layout/neato/__fixtures__/dim/hier-len-dim3.stderr +0 -0
  179. package/src/layout/neato/__fixtures__/dim/hier-len-dim3.xdot +58 -0
  180. package/src/layout/neato/__fixtures__/dim/hier-noedge-big.dot +141 -0
  181. package/src/layout/neato/__fixtures__/dim/hier-noedge-big.gv +48 -0
  182. package/src/layout/neato/__fixtures__/dim/hier-noedge-big.stderr +1 -0
  183. package/src/layout/neato/__fixtures__/dim/hier-noedge-big.xdot +233 -0
  184. package/src/layout/neato/__fixtures__/dim/hier-noedge-dim2.dot +21 -0
  185. package/src/layout/neato/__fixtures__/dim/hier-noedge-dim2.gv +8 -0
  186. package/src/layout/neato/__fixtures__/dim/hier-noedge-dim2.stderr +1 -0
  187. package/src/layout/neato/__fixtures__/dim/hier-noedge-dim2.xdot +33 -0
  188. package/src/layout/neato/__fixtures__/dim/hier-noedge-dim3.dot +23 -0
  189. package/src/layout/neato/__fixtures__/dim/hier-noedge-dim3.gv +10 -0
  190. package/src/layout/neato/__fixtures__/dim/hier-noedge-dim3.stderr +1 -0
  191. package/src/layout/neato/__fixtures__/dim/hier-noedge-dim3.xdot +35 -0
  192. package/src/layout/neato/__fixtures__/dim/hier-noedge-dim4.dot +23 -0
  193. package/src/layout/neato/__fixtures__/dim/hier-noedge-dim4.gv +10 -0
  194. package/src/layout/neato/__fixtures__/dim/hier-noedge-dim4.stderr +1 -0
  195. package/src/layout/neato/__fixtures__/dim/hier-noedge-dim4.xdot +35 -0
  196. package/src/layout/neato/__fixtures__/dim/hier-nohier-dim2.dot +26 -0
  197. package/src/layout/neato/__fixtures__/dim/hier-nohier-dim2.gv +7 -0
  198. package/src/layout/neato/__fixtures__/dim/hier-nohier-dim2.stderr +0 -0
  199. package/src/layout/neato/__fixtures__/dim/hier-nohier-dim2.xdot +44 -0
  200. package/src/layout/neato/__fixtures__/dim/hier-nohier-dim3.dot +28 -0
  201. package/src/layout/neato/__fixtures__/dim/hier-nohier-dim3.gv +9 -0
  202. package/src/layout/neato/__fixtures__/dim/hier-nohier-dim3.stderr +0 -0
  203. package/src/layout/neato/__fixtures__/dim/hier-nohier-dim3.xdot +46 -0
  204. package/src/layout/neato/__fixtures__/dim/hier-pack-dim3.dot +48 -0
  205. package/src/layout/neato/__fixtures__/dim/hier-pack-dim3.gv +15 -0
  206. package/src/layout/neato/__fixtures__/dim/hier-pack-dim3.stderr +0 -0
  207. package/src/layout/neato/__fixtures__/dim/hier-pack-dim3.xdot +79 -0
  208. package/src/layout/neato/__fixtures__/dim/hier-ring-dim3.dot +56 -0
  209. package/src/layout/neato/__fixtures__/dim/hier-ring-dim3.gv +17 -0
  210. package/src/layout/neato/__fixtures__/dim/hier-ring-dim3.stderr +0 -0
  211. package/src/layout/neato/__fixtures__/dim/hier-ring-dim3.xdot +94 -0
  212. package/src/layout/neato/__fixtures__/dim/hier-star-dim3.dot +47 -0
  213. package/src/layout/neato/__fixtures__/dim/hier-star-dim3.gv +14 -0
  214. package/src/layout/neato/__fixtures__/dim/hier-star-dim3.stderr +0 -0
  215. package/src/layout/neato/__fixtures__/dim/hier-star-dim3.xdot +78 -0
  216. package/src/layout/neato/__fixtures__/dim/hier-stresswt1-dim3.dot +34 -0
  217. package/src/layout/neato/__fixtures__/dim/hier-stresswt1-dim3.gv +13 -0
  218. package/src/layout/neato/__fixtures__/dim/hier-stresswt1-dim3.stderr +0 -0
  219. package/src/layout/neato/__fixtures__/dim/hier-stresswt1-dim3.xdot +55 -0
  220. package/src/layout/neato/__fixtures__/dim/hier-stresswt1-dim4.dot +34 -0
  221. package/src/layout/neato/__fixtures__/dim/hier-stresswt1-dim4.gv +13 -0
  222. package/src/layout/neato/__fixtures__/dim/hier-stresswt1-dim4.stderr +0 -0
  223. package/src/layout/neato/__fixtures__/dim/hier-stresswt1-dim4.xdot +55 -0
  224. package/src/layout/neato/__fixtures__/dim/hier-subset-dim3.dot +34 -0
  225. package/src/layout/neato/__fixtures__/dim/hier-subset-dim3.gv +13 -0
  226. package/src/layout/neato/__fixtures__/dim/hier-subset-dim3.stderr +0 -0
  227. package/src/layout/neato/__fixtures__/dim/hier-subset-dim3.xdot +55 -0
  228. package/src/layout/neato/__fixtures__/dim/hier-two-dim3.dot +15 -0
  229. package/src/layout/neato/__fixtures__/dim/hier-two-dim3.gv +6 -0
  230. package/src/layout/neato/__fixtures__/dim/hier-two-dim3.stderr +0 -0
  231. package/src/layout/neato/__fixtures__/dim/hier-two-dim3.xdot +22 -0
  232. package/src/layout/neato/__fixtures__/dim/ipsep-dim3.dot +33 -0
  233. package/src/layout/neato/__fixtures__/dim/ipsep-dim3.gv +12 -0
  234. package/src/layout/neato/__fixtures__/dim/ipsep-dim3.stderr +0 -0
  235. package/src/layout/neato/__fixtures__/dim/ipsep-dim3.xdot +54 -0
  236. package/src/layout/neato/__fixtures__/dim/kk-dim3.dot +33 -0
  237. package/src/layout/neato/__fixtures__/dim/kk-dim3.gv +12 -0
  238. package/src/layout/neato/__fixtures__/dim/kk-dim3.stderr +0 -0
  239. package/src/layout/neato/__fixtures__/dim/kk-dim3.xdot +54 -0
  240. package/src/layout/neato/__fixtures__/dim/kk-dim4-dimen4.dot +33 -0
  241. package/src/layout/neato/__fixtures__/dim/kk-dim4-dimen4.gv +12 -0
  242. package/src/layout/neato/__fixtures__/dim/kk-dim4-dimen4.stderr +0 -0
  243. package/src/layout/neato/__fixtures__/dim/kk-dim4-dimen4.xdot +54 -0
  244. package/src/layout/neato/__fixtures__/dim/kk-pins-dim3.dot +39 -0
  245. package/src/layout/neato/__fixtures__/dim/kk-pins-dim3.gv +15 -0
  246. package/src/layout/neato/__fixtures__/dim/kk-pins-dim3.stderr +0 -0
  247. package/src/layout/neato/__fixtures__/dim/kk-pins-dim3.xdot +60 -0
  248. package/src/layout/neato/__fixtures__/dim/overlap-false-dim3.dot +33 -0
  249. package/src/layout/neato/__fixtures__/dim/overlap-false-dim3.gv +12 -0
  250. package/src/layout/neato/__fixtures__/dim/overlap-false-dim3.stderr +0 -0
  251. package/src/layout/neato/__fixtures__/dim/overlap-false-dim3.xdot +54 -0
  252. package/src/layout/neato/__fixtures__/dim/overlap-scale-dim3.dot +33 -0
  253. package/src/layout/neato/__fixtures__/dim/overlap-scale-dim3.gv +12 -0
  254. package/src/layout/neato/__fixtures__/dim/overlap-scale-dim3.stderr +0 -0
  255. package/src/layout/neato/__fixtures__/dim/overlap-scale-dim3.xdot +54 -0
  256. package/src/layout/neato/__fixtures__/dim/overlap-vpsc-dim3.dot +33 -0
  257. package/src/layout/neato/__fixtures__/dim/overlap-vpsc-dim3.gv +12 -0
  258. package/src/layout/neato/__fixtures__/dim/overlap-vpsc-dim3.stderr +0 -0
  259. package/src/layout/neato/__fixtures__/dim/overlap-vpsc-dim3.xdot +54 -0
  260. package/src/layout/neato/__fixtures__/dim/pack-dim3.dot +47 -0
  261. package/src/layout/neato/__fixtures__/dim/pack-dim3.gv +14 -0
  262. package/src/layout/neato/__fixtures__/dim/pack-dim3.stderr +0 -0
  263. package/src/layout/neato/__fixtures__/dim/pack-dim3.xdot +78 -0
  264. package/src/layout/neato/__fixtures__/dim/pins-dim3.dot +38 -0
  265. package/src/layout/neato/__fixtures__/dim/pins-dim3.gv +14 -0
  266. package/src/layout/neato/__fixtures__/dim/pins-dim3.stderr +0 -0
  267. package/src/layout/neato/__fixtures__/dim/pins-dim3.xdot +59 -0
  268. package/src/layout/neato/__fixtures__/dim/regen.sh +24 -0
  269. package/src/layout/neato/__fixtures__/dim/regular-dim3.dot +33 -0
  270. package/src/layout/neato/__fixtures__/dim/regular-dim3.gv +12 -0
  271. package/src/layout/neato/__fixtures__/dim/regular-dim3.stderr +0 -0
  272. package/src/layout/neato/__fixtures__/dim/regular-dim3.xdot +54 -0
  273. package/src/layout/neato/__fixtures__/dim/sgd-dim3.dot +33 -0
  274. package/src/layout/neato/__fixtures__/dim/sgd-dim3.gv +12 -0
  275. package/src/layout/neato/__fixtures__/dim/sgd-dim3.stderr +0 -0
  276. package/src/layout/neato/__fixtures__/dim/sgd-dim3.xdot +54 -0
  277. package/src/layout/neato/__fixtures__/dim/smart-units.json +16 -0
  278. package/src/layout/neato/__fixtures__/dim/subset-dim3.dot +33 -0
  279. package/src/layout/neato/__fixtures__/dim/subset-dim3.gv +12 -0
  280. package/src/layout/neato/__fixtures__/dim/subset-dim3.stderr +0 -0
  281. package/src/layout/neato/__fixtures__/dim/subset-dim3.xdot +54 -0
  282. package/src/layout/neato/closest.ts +206 -0
  283. package/src/layout/neato/constrained-majorization.ts +4 -23
  284. package/src/layout/neato/embed-graph.ts +81 -0
  285. package/src/layout/neato/fdp-adjust.ts +22 -8
  286. package/src/layout/neato/index.ts +26 -17
  287. package/src/layout/neato/init-dim.ts +165 -0
  288. package/src/layout/neato/init.ts +9 -35
  289. package/src/layout/neato/kk.ts +47 -41
  290. package/src/layout/neato/matrix-ops-dense.ts +232 -0
  291. package/src/layout/neato/pca.ts +60 -0
  292. package/src/layout/neato/sgd.ts +14 -13
  293. package/src/layout/neato/start.ts +8 -5
  294. package/src/layout/neato/stress-kernel.ts +65 -5
  295. package/src/layout/neato/stress-subspace.ts +371 -0
  296. package/src/layout/neato/vpsc-adjust.ts +3 -1
  297. package/src/layout/pack/__fixtures__/cc-reuse/circo.dot +23 -0
  298. package/src/layout/pack/__fixtures__/cc-reuse/circo.gv +1 -0
  299. package/src/layout/pack/__fixtures__/cc-reuse/circo.stderr +0 -0
  300. package/src/layout/pack/__fixtures__/cc-reuse/circo.xdot +38 -0
  301. package/src/layout/pack/__fixtures__/cc-reuse/neato.dot +23 -0
  302. package/src/layout/pack/__fixtures__/cc-reuse/neato.gv +1 -0
  303. package/src/layout/pack/__fixtures__/cc-reuse/neato.stderr +0 -0
  304. package/src/layout/pack/__fixtures__/cc-reuse/neato.xdot +38 -0
  305. package/src/layout/pack/__fixtures__/cc-reuse/osage.dot +23 -0
  306. package/src/layout/pack/__fixtures__/cc-reuse/osage.gv +1 -0
  307. package/src/layout/pack/__fixtures__/cc-reuse/osage.stderr +0 -0
  308. package/src/layout/pack/__fixtures__/cc-reuse/osage.xdot +38 -0
  309. package/src/layout/pack/__fixtures__/cc-reuse/regen.sh +24 -0
  310. package/src/layout/pack/__fixtures__/cc-reuse/sfdp.dot +21 -0
  311. package/src/layout/pack/__fixtures__/cc-reuse/sfdp.gv +1 -0
  312. package/src/layout/pack/__fixtures__/cc-reuse/sfdp.stderr +0 -0
  313. package/src/layout/pack/__fixtures__/cc-reuse/sfdp.xdot +36 -0
  314. package/src/layout/pack/__fixtures__/cc-reuse/twopi.dot +21 -0
  315. package/src/layout/pack/__fixtures__/cc-reuse/twopi.gv +1 -0
  316. package/src/layout/pack/__fixtures__/cc-reuse/twopi.stderr +1 -0
  317. package/src/layout/pack/__fixtures__/cc-reuse/twopi.xdot +36 -0
  318. package/src/layout/pack/ccomps.ts +34 -6
  319. package/src/layout/sfdp/__fixtures__/dim/dim3-dimen3.dot +32 -0
  320. package/src/layout/sfdp/__fixtures__/dim/dim3-dimen3.gv +11 -0
  321. package/src/layout/sfdp/__fixtures__/dim/dim3-dimen3.stderr +0 -0
  322. package/src/layout/sfdp/__fixtures__/dim/dim3-dimen3.xdot +53 -0
  323. package/src/layout/sfdp/__fixtures__/dim/dim3.dot +31 -0
  324. package/src/layout/sfdp/__fixtures__/dim/dim3.gv +10 -0
  325. package/src/layout/sfdp/__fixtures__/dim/dim3.stderr +0 -0
  326. package/src/layout/sfdp/__fixtures__/dim/dim3.xdot +52 -0
  327. package/src/layout/sfdp/__fixtures__/dim/dim4-dimen4.dot +32 -0
  328. package/src/layout/sfdp/__fixtures__/dim/dim4-dimen4.gv +11 -0
  329. package/src/layout/sfdp/__fixtures__/dim/dim4-dimen4.stderr +0 -0
  330. package/src/layout/sfdp/__fixtures__/dim/dim4-dimen4.xdot +53 -0
  331. package/src/layout/sfdp/__fixtures__/dim/overlap-prism-dim3.dot +33 -0
  332. package/src/layout/sfdp/__fixtures__/dim/overlap-prism-dim3.gv +12 -0
  333. package/src/layout/sfdp/__fixtures__/dim/overlap-prism-dim3.stderr +0 -0
  334. package/src/layout/sfdp/__fixtures__/dim/overlap-prism-dim3.xdot +54 -0
  335. package/src/layout/sfdp/__fixtures__/dim/regen.sh +24 -0
  336. package/src/layout/sfdp/index.ts +15 -10
  337. package/src/layout/sfdp/init.ts +26 -11
  338. package/src/layout/twopi/circle.ts +5 -1
  339. package/src/layout/twopi/index.ts +3 -0
  340. package/src/render/dot/agwrite.ts +2 -2
  341. package/src/render/dot/attrs.ts +16 -0
  342. package/src/render/dot/write-back.ts +2 -2
@@ -2,6 +2,18 @@
2
2
  export type AgerrLevel = 'error' | 'warning' | 'prev';
3
3
  /** The console channel a line goes to. */
4
4
  export type AgerrChannel = 'warn' | 'error';
5
+ /**
6
+ * C's `agusererrf`: called with each piece of a message as `out` writes it.
7
+ * The return value is ignored, as C ignores it.
8
+ * @see lib/cgraph/cgraph.h:agusererrf
9
+ */
10
+ export type AgUserErrF = (message: string) => number | void;
11
+ /**
12
+ * Set the function that receives engine messages in place of the console;
13
+ * null restores the console. Returns the previous function.
14
+ * @see lib/cgraph/agerror.c:agseterrf
15
+ */
16
+ export declare function agseterrf(newf: AgUserErrF | null): AgUserErrF | null;
5
17
  /**
6
18
  * `default_usererrf`: every character that `gv_iscntrl(c) && !gv_isspace(c)`
7
19
  * (0x00-0x1F except `\t\n\v\f\r`, and 0x7F) is written as `\ooo`.
@@ -1 +1 @@
1
- {"version":3,"file":"agerr.d.ts","sourceRoot":"","sources":["../../src/common/agerr.ts"],"names":[],"mappings":"AAmBA,iEAAiE;AACjE,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEtD,0CAA0C;AAC1C,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AA6B5C;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CASrD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAGrE;AA2CD;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,CAElF;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,CAEzF;AAED,yCAAyC;AACzC,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,EAAE,UAAU,YAAY,KAAG,IAAoC,CAAC;AAEpG;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,EAAE,UAAU,YAAY,KAAG,IACjC,CAAC;AAEjC;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,CAExE"}
1
+ {"version":3,"file":"agerr.d.ts","sourceRoot":"","sources":["../../src/common/agerr.ts"],"names":[],"mappings":"AAuBA,iEAAiE;AACjE,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEtD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AO,KAAK,EAAY,SAAS,EAAE,MAAM,UAAU,CAAC;AAiKpD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,CAejF"}
1
+ {"version":3,"file":"emit-xdot.d.ts","sourceRoot":"","sources":["../../src/gvc/emit-xdot.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAItE,OAAO,KAAK,EAAY,SAAS,EAAE,MAAM,UAAU,CAAC;AAsLpD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,CAejF"}
@@ -9,18 +9,55 @@ import type { Graph } from '../model/graph.js';
9
9
  * @see lib/gvc/gvlayout.c:gvFreeLayout (GD_cleanup(g) = NULL)
10
10
  */
11
11
  export declare function layoutWasFreed(g: Graph): boolean;
12
+ /**
13
+ * attach_attrs ends by undoing the cluster edges, so -Tdot, -Txdot and -Tjson
14
+ * leave the graph with its original nodes, and -Tplain and -Tsvg leave the
15
+ * proxies as ordinary ones. The port's writers read the proxies as they print
16
+ * (`src/render/dot/agwrite.ts`), so the undo waits for the next layout, as the
17
+ * records do. Nothing sees the difference: a second attach_attrs on one layout
18
+ * crashes C. Only attach_attrs replaces `bb` with its comma-separated form
19
+ * (rec_attach_bb); `gvLayout`'s, which `writeLayoutBb` wrote, has spaces.
20
+ *
21
+ * @see lib/common/output.c:403 (if (HAS_CLUST_EDGE(g)) undoClusterEdges(g))
22
+ * @see lib/common/output.c:229 rec_attach_bb
23
+ */
24
+ export declare function undoRenderedClusterEdges(g: Graph): void;
12
25
  /**
13
26
  * Replaces every layout record reachable from `g`: what the engine cleanup and
14
27
  * graph_cleanup delete in C. `g.nodes` and `g.edges` hold every member of the
15
28
  * graph, including those declared in a subgraph (as agfstnode/agfstout do), and
16
29
  * the virtual nodes and edges of a layout are reachable only through the
17
30
  * records this drops. The parser and the builder stamp nothing on a record, and
18
- * `layout` sets `gvc` after this runs, so there is nothing to carry over.
31
+ * `layout` sets `gvc` after this runs. The one thing to carry over is the
32
+ * cluster-edge count, which C keeps in a record of its own (CL_EDGE_TAG) that no
33
+ * free deletes: a later layout still sees HAS_CLUST_EDGE and takes line segments.
19
34
  *
20
35
  * @see lib/common/utils.c:1522 (gv_cleanup_edge: agdelrec Agedgeinfo_t)
21
36
  * @see lib/common/utils.c:gv_cleanup_node (agdelrec Agnodeinfo_t)
22
37
  * @see lib/dotgen/dotinit.c:114 (dot_cleanup_node: agdelrec Agnodeinfo_t)
23
38
  * @see lib/common/input.c:graph_cleanup
39
+ * @see lib/common/utils.c:960 (agbindrec(g, CL_EDGE_TAG, ...))
40
+ * @see lib/fdpgen/layout.c:1049 (HAS_CLUST_EDGE)
24
41
  */
25
42
  export declare function resetLayoutRecords(g: Graph): void;
43
+ /**
44
+ * Runs the reset of every graph in `g`'s tree whose layout was freed. C frees a
45
+ * graph's records when that graph is freed, whichever graph is laid out next: a
46
+ * subgraph after its root, or a root after its subgraph.
47
+ *
48
+ * @see lib/gvc/gvlayout.c:61-64 (gvLayoutJobs binds the root's record too)
49
+ * @see lib/gvc/gvlayout.c:gvFreeLayout
50
+ */
51
+ export declare function resetFreedLayouts(g: Graph): void;
52
+ /**
53
+ * C has one GD_dotroot, on the root, and dot_init_subg points it at the graph
54
+ * being laid out. The port reads each graph's own slot (`dotRoot`, and
55
+ * pack-components.ts for the same reason), so a subgraph points itself and all
56
+ * under it. A root layout clears what an earlier one left, which reads as the
57
+ * root again; on a first layout there is nothing to clear.
58
+ *
59
+ * @see lib/dotgen/dotinit.c:36 (GD_dotroot(agroot(g)) = droot)
60
+ * @see lib/dotgen/dotinit.c:520 dot_root
61
+ */
62
+ export declare function bindDotRoot(g: Graph): void;
26
63
  //# sourceMappingURL=layout-reset.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout-reset.d.ts","sourceRoot":"","sources":["../../src/gvc/layout-reset.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG/C;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,CAEhD;AAYD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAIjD"}
1
+ {"version":3,"file":"layout-reset.d.ts","sourceRoot":"","sources":["../../src/gvc/layout-reset.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG/C;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,CAEhD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAEvD;AAcD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAIjD;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAMhD;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAO1C"}
package/dist/index.d.ts CHANGED
@@ -54,6 +54,8 @@ export { parse } from './parser/index.js';
54
54
  export { ParseError } from './parser/index.js';
55
55
  export { DotEngineError, InternalError, RenderError, isGvError } from './errors.js';
56
56
  export type { GvError, UsageErrorCode, GvErrorType, GvErrorCode, GvExpectation, RenderResult, } from './errors.js';
57
+ export { agseterrf } from './common/agerr.js';
58
+ export type { AgUserErrF } from './common/agerr.js';
57
59
  export { setImageSizer } from './gvc/usershape.js';
58
60
  export type { ImageSizer } from './common/htmltable-types.js';
59
61
  export { setImageResolver } from './gvc/image-resolver.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAW,YAAY,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAoCnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,MAAM,CAgBvE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,YAAY,CAShF;AAED,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACpF,YAAY,EACV,OAAO,EACP,cAAc,EACd,WAAW,EACX,WAAW,EACX,aAAa,EACb,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAM7D,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EACL,kBAAkB,EAAE,oBAAoB,EAAE,eAAe,GAC1D,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CA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