@knowvah/dot-engine 2.11.0 → 2.12.1

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 (88) hide show
  1. package/dist/common/agerr.d.ts +12 -0
  2. package/dist/common/agerr.d.ts.map +1 -1
  3. package/dist/common/edge-in-box.d.ts +6 -20
  4. package/dist/common/edge-in-box.d.ts.map +1 -1
  5. package/dist/common/emit-bb.d.ts +36 -0
  6. package/dist/common/emit-bb.d.ts.map +1 -0
  7. package/dist/gvc/__fixtures__/subg-renders/subg-renders.d.ts +10 -0
  8. package/dist/gvc/__fixtures__/subg-renders/subg-renders.d.ts.map +1 -0
  9. package/dist/gvc/device.d.ts.map +1 -1
  10. package/dist/gvc/emit-xdot.d.ts +9 -0
  11. package/dist/gvc/emit-xdot.d.ts.map +1 -1
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +7357 -7187
  15. package/dist/index.js.map +4 -4
  16. package/dist/layout/dot/decomp.d.ts.map +1 -1
  17. package/dist/layout/dot/edge-route-chain.d.ts.map +1 -1
  18. package/dist/layout/dot/edge-route.d.ts +3 -8
  19. package/dist/layout/dot/edge-route.d.ts.map +1 -1
  20. package/dist/layout/dot/init.d.ts +25 -4
  21. package/dist/layout/dot/init.d.ts.map +1 -1
  22. package/dist/layout/dot/splines.d.ts +5 -3
  23. package/dist/layout/dot/splines.d.ts.map +1 -1
  24. package/dist/layout/neato/fdp-adjust.d.ts.map +1 -1
  25. package/dist/layout/neato/sgd.d.ts.map +1 -1
  26. package/dist/layout/sfdp/spring-electrical.d.ts.map +1 -1
  27. package/dist/render/dot/agwrite-linelength.d.ts +25 -0
  28. package/dist/render/dot/agwrite-linelength.d.ts.map +1 -0
  29. package/dist/render/dot/agwrite.d.ts +4 -7
  30. package/dist/render/dot/agwrite.d.ts.map +1 -1
  31. package/dist/render/dot/attrs.d.ts.map +1 -1
  32. package/dist/render/dot/write-back.d.ts +10 -0
  33. package/dist/render/dot/write-back.d.ts.map +1 -1
  34. package/dist/render/dot.d.ts +1 -2
  35. package/dist/render/dot.d.ts.map +1 -1
  36. package/dist/render/json-cluster-edge.d.ts +22 -0
  37. package/dist/render/json-cluster-edge.d.ts.map +1 -0
  38. package/dist/render/json.d.ts.map +1 -1
  39. package/dist/render/map.d.ts.map +1 -1
  40. package/dist/render/svg-graph.d.ts.map +1 -1
  41. package/dist/render.js +7360 -7196
  42. package/dist/render.js.map +4 -4
  43. package/dist/util/printf-round.d.ts.map +1 -1
  44. package/package.json +1 -1
  45. package/src/common/agerr.ts +49 -1
  46. package/src/common/edge-in-box.ts +9 -24
  47. package/src/common/emit-bb.ts +128 -0
  48. package/src/gvc/__fixtures__/rerender/nestedclust.dot.dot.nofree.1 +45 -0
  49. package/src/gvc/__fixtures__/rerender/nestedclust.dot.dot.nofree.2 +45 -0
  50. package/src/gvc/__fixtures__/rerender/nestedclust.dot.dot.nofree.3 +45 -0
  51. package/src/gvc/__fixtures__/rerender/nestedclust.dot.xdot.nofree.1 +74 -0
  52. package/src/gvc/__fixtures__/rerender/nestedclust.dot.xdot.nofree.2 +74 -0
  53. package/src/gvc/__fixtures__/rerender/nestedclust.dot.xdot.nofree.3 +76 -0
  54. package/src/gvc/__fixtures__/rerender/nestedclust.gv +4 -0
  55. package/src/gvc/__fixtures__/rerender/regen.sh +5 -0
  56. package/src/gvc/__fixtures__/subg-renders/subg-renders.ts +48 -0
  57. package/src/gvc/device.ts +26 -27
  58. package/src/gvc/emit-gates.ts +1 -1
  59. package/src/gvc/emit-xdot.ts +5 -6
  60. package/src/index.ts +4 -0
  61. package/src/layout/dot/decomp.ts +23 -2
  62. package/src/layout/dot/edge-route-chain.ts +79 -7
  63. package/src/layout/dot/edge-route.ts +8 -37
  64. package/src/layout/dot/init.ts +36 -11
  65. package/src/layout/dot/splines-flat.ts +2 -2
  66. package/src/layout/dot/splines-groups.ts +2 -2
  67. package/src/layout/dot/splines-route.ts +2 -2
  68. package/src/layout/dot/splines.ts +10 -10
  69. package/src/layout/fdp/index.ts +2 -2
  70. package/src/layout/neato/conjgrad.ts +2 -2
  71. package/src/layout/neato/fdp-adjust.ts +1 -16
  72. package/src/layout/neato/sgd.ts +3 -9
  73. package/src/layout/sfdp/spring-electrical.ts +5 -3
  74. package/src/render/dot/agwrite-linelength.ts +58 -0
  75. package/src/render/dot/agwrite.ts +13 -13
  76. package/src/render/dot/attrs.ts +27 -1
  77. package/src/render/dot/write-back.ts +21 -0
  78. package/src/render/dot/xdot-ops.ts +1 -1
  79. package/src/render/dot.ts +11 -17
  80. package/src/render/json-cluster-edge.ts +50 -0
  81. package/src/render/json.ts +16 -19
  82. package/src/render/map.ts +3 -7
  83. package/src/render/svg-graph.ts +22 -9
  84. package/src/render/svg.ts +3 -3
  85. package/src/util/printf-round.ts +16 -10
  86. package/dist/layout/dot/edge-order.d.ts +0 -27
  87. package/dist/layout/dot/edge-order.d.ts.map +0 -1
  88. package/src/layout/dot/edge-order.ts +0 -62
@@ -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":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;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,GAAG,UAAU,GAAG,IAAI,CAIpE;AAOD;;;;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;AA8DD;;;;;;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,31 +1,17 @@
1
1
  /**
2
2
  * emit_edge's edge_in_box gate, shared by the device walk (edge comments) and
3
- * the SVG / xdot renderers (edge group and draw ops). Moved out of
4
- * render/svg.ts unchanged.
3
+ * the SVG / xdot renderers (edge group and draw ops).
5
4
  *
6
5
  * @see lib/common/emit.c:edge_in_box, lib/common/utils.c:overlap_label
7
6
  */
8
7
  import type { Box } from '../model/geom.js';
9
8
  import type { Edge } from '../model/edge.js';
10
9
  /**
11
- * Faithful-to-outcome `edge_in_box`: true when the edge has something to draw.
12
- * C's gvrender defers the `<g>` until a draw op, so an edge whose content falls
13
- * entirely outside the clip emits no group (emit.c:edge_in_box tests each piece
14
- * vs job->clip via boxf_overlap/overlap_label).
15
- *
16
- * The only piece that can legitimately fall OUTSIDE the clip on this corpus is a
17
- * degenerate labeled-flat label: it is spline-less, so map_edge leaves it at its
18
- * internal (un-normalized) x-frame position while the clip is the final frame.
19
- * The `overlapLabel` test on the main label reproduces C's draw-iff-overlap for
20
- * exactly that case — on-canvas (2368) → drawn; off-canvas (2368_1, negative
21
- * un-normalized x) → suppressed. A present spline always lies within the clip
22
- * (GD_bb contains it), and head/tail/xlabels are positioned at on-canvas
23
- * endpoints, so those keep their existing unconditional triggers — adding an
24
- * overlap test there only risks suppressing legitimately-drawn content (it
25
- * regressed neato/circo edges whose spl.bb is computed differently). The `set`
26
- * guard on the main label is kept: the port retains an unplaced (`pos=0,0`,
27
- * `set=false`) label on merged back-edges where C has none.
28
- * @see lib/common/emit.c:edge_in_box, lib/common/utils.c:overlap_label
10
+ * `edge_in_box`: whether any piece of the edge overlaps the page clip — the
11
+ * spline's box (`spl->bb`, which init_bb computes before every render; see
12
+ * emit-bb.ts), the label, or a placed xlabel. emit_edge draws nothing, not even
13
+ * the edge's group, when this fails. Head and tail labels are not tested.
14
+ * @see lib/common/emit.c:2686 edge_in_box, lib/common/utils.c:overlap_label
29
15
  */
30
16
  export declare function edgeHasDrawableContent(e: Edge, clip: Box): boolean;
31
17
  //# sourceMappingURL=edge-in-box.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"edge-in-box.d.ts","sourceRoot":"","sources":["../../src/common/edge-in-box.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAe7C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAMlE"}
1
+ {"version":3,"file":"edge-in-box.d.ts","sourceRoot":"","sources":["../../src/common/edge-in-box.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAe7C;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAKlE"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The bounding boxes gvRenderJobs computes before every render: each node's
3
+ * `ND_bb` and each out-edge's `spl->bb`, which `edge_in_box` tests against the
4
+ * page clip. The node half is not stored: `nodeInBox` derives `ND_bb` from the
5
+ * same fields at the test, and nothing between here and that test moves a node.
6
+ *
7
+ * @see lib/common/emit.c:4076 bezier_bb, :4101 init_splines_bb, :4157 init_bb
8
+ * @see lib/common/arrows.c:1107 arrow_bb
9
+ */
10
+ import type { Bezier, Box, Point, Spline } from '../model/geom.js';
11
+ import type { Graph } from '../model/graph.js';
12
+ /**
13
+ * The box of an arrowhead of length `ARROW_LENGTH * arrowsize` at `p`, aimed
14
+ * along `u - p`: the four corners of the rotated head's bounding square.
15
+ * @see lib/common/arrows.c:1107 arrow_bb
16
+ */
17
+ export declare function arrowBb(p: Point, u0: Point, arrowsize: number): Box;
18
+ /**
19
+ * A bezier's box: its first point, then per segment the midpoint of the two
20
+ * control points and the segment's end point.
21
+ * @see lib/common/emit.c:4076 bezier_bb
22
+ */
23
+ export declare function bezierBb(bz: Bezier): Box;
24
+ /**
25
+ * `spl->bb`: the union of every bezier's box and, for each flagged end, the
26
+ * box of a unit-size arrowhead there.
27
+ * @see lib/common/emit.c:4101 init_splines_bb
28
+ */
29
+ export declare function initSplinesBb(spl: Spline): void;
30
+ /**
31
+ * Before each render: `spl->bb` of every out-edge of every node of `g`, the
32
+ * graph being rendered (a subgraph render leaves other edges' boxes alone).
33
+ * @see lib/common/emit.c:4127 init_bb_edge, :4136 init_bb_node, :4157 init_bb
34
+ */
35
+ export declare function initBb(g: Graph): void;
36
+ //# sourceMappingURL=emit-bb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emit-bb.d.ts","sourceRoot":"","sources":["../../src/common/emit-bb.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAmB/C;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,GAAG,GAAG,CAsBnE;AAkBD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,GAAG,CAWxC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAY/C;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAQrC"}
@@ -0,0 +1,10 @@
1
+ import type { EngineName } from '../../context.js';
2
+ export type SubgMode = 'root' | 'nofree';
3
+ export type SubgFmt = 'xdot' | 'svg';
4
+ /** Native's renders of one case, in order (harness/T7b/noaddr). */
5
+ export declare function nativeSubgRenders(engine: EngineName, sub: string, mode: SubgMode, fmt: SubgFmt): string[];
6
+ /** The port's renders of one case, in the harness's order. */
7
+ export declare function portSubgRenders(engine: EngineName, sub: string, mode: SubgMode, fmt: SubgFmt): string[];
8
+ /** svg's generator banner and `<svg>` tag layout differ from native's on every render; drop them. */
9
+ export declare function svgBody(svg: string): string;
10
+ //# sourceMappingURL=subg-renders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subg-renders.d.ts","sourceRoot":"","sources":["../../../../src/gvc/__fixtures__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js';
1
2
  import type { Graph } from '../model/graph.js';
2
3
  import { type RendererPlugin } from './context.js';
3
4
  import type { RenderJob } from './job.js';
5
+ /**
6
+ * job->clip for this device, computed in C's order, rounding included. svg's
7
+ * pad is `job.pad` (default 4); the xdot device's default is 0, so with no
8
+ * `pad` its clip is the bb.
9
+ * @see plugin/core/gvrender_core_dot.c:739 render_features_dot
10
+ * @see lib/common/emit.c:1558
11
+ */
12
+ export declare function deviceClip(g: Graph, renderer: RendererPlugin, job: RenderJob): Box;
4
13
  /**
5
14
  * Replays the graph's draw ops, inside emit_background. A text op is skipped:
6
15
  * only xdotBB builds its span, so C dereferences a null span here and a `_draw_`
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"emit-xdot.d.ts","sourceRoot":"","sources":["../../src/gvc/emit-xdot.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,GAAG,EAAS,MAAM,kBAAkB,CAAC;AACnD,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;AAWpD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,GAAG,GAAG,CAKlF;AA8JD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,CAejF"}
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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