ts-graphviz 0.16.0 → 1.0.0-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.
package/lib/index.d.ts CHANGED
@@ -1,3724 +1,2 @@
1
- /**
2
- * Package that defines the attribute type and attribute settings.
3
- *
4
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html}
5
- * @packageDocumentation
6
- */
7
- /**
8
- * Module defining attributes.
9
- */
10
- declare namespace attribute {
11
- /**
12
- * Factor damping force motions.
13
- * On each iteration, a nodes movement is limited to this factor of its potential motion.
14
- * By being less than 1.0, the system tends to ``cool'', thereby preventing cycling.
15
- *
16
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:Damping Node, Edge and Graph Attributes#Damping}
17
- * @graphvizType double
18
- * @graphvizDefault 0.99
19
- * @graphvizMinimum 0
20
- * @graphvizNotes neato only
21
- * @graphvizUsedBy G
22
- * @category Attribute
23
- */
24
- const Damping = 'Damping';
25
- /**
26
- * Spring constant used in virtual physical model.
27
- * It roughly corresponds to an ideal edge length (in inches), in that increasing K tends to increase the distance between nodes.
28
- * Note that the edge attribute {@link len} can be used to override this value for adjacent nodes.
29
- *
30
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:K Node, Edge and Graph Attributes#K}
31
- * @graphvizType double
32
- * @graphvizDefault 0.3
33
- * @graphvizMinimum 0
34
- * @graphvizNotes sfdp, fdp only
35
- * @graphvizUsedBy GC
36
- * @category Attribute
37
- */
38
- const K = 'K';
39
- /**
40
- * Hyperlinks incorporated into device-dependent output.
41
- * At present, used in ps2, cmap, i*map and svg formats.
42
- * For all these formats, URLs can be attached to nodes, edges and clusters.
43
- * URL attributes can also be attached to the root graph in ps2, cmap and i*map formats.
44
- * This serves as the base URL for relative URLs in the former, and as the default image map file in the latter.
45
- *
46
- * For svg, cmapx and imap output, the active area for a node is its visible image.
47
- * For example, an unfilled node with no drawn boundary will only be active on its label.
48
- * For other output, the active area is its bounding box.
49
- * The active area for a cluster is its bounding box.
50
- * For edges, the active areas are small circles where the edge contacts its head and tail nodes.
51
- * In addition, for svg, cmapx and imap, the active area includes a thin polygon approximating the edge.
52
- * The circles may overlap the related node, and the edge URL dominates.
53
- * If the edge has a label, this will also be active. Finally, if the edge has a head or tail label, this will also be active.
54
- *
55
- * Note that, for edges, the attributes {@link headURL}, {@link tailURL}, {@link labelURL} and {@link edgeURL} allow control of various parts of an edge.
56
- * Also note that, if active areas of two edges overlap, it is unspecified which area dominates.
57
- *
58
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:URL Node, Edge and Graph Attributes#URL}
59
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
60
- * @graphvizDefault <none>
61
- * @graphvizNotes svg, postscript, map only
62
- * @graphvizUsedBy ENGC
63
- * @category Attribute
64
- */
65
- const URL = 'URL';
66
- /**
67
- * A string in the {@link https://graphviz.gitlab.io/_pages/doc/info/output.html#d:xdot xdot format} specifying an arbitrary background.
68
- * During rendering, the canvas is first filled as described in the {@link bgcolor} attribute.
69
- * Then, if _background is defined, the graphics operations described in the string are performed on the canvas.
70
- *
71
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:_background Node, Edge and Graph Attributes#_background}
72
- * @graphvizType string
73
- * @graphvizDefault <none>
74
- * @graphvizUsedBy G
75
- * @category Attribute
76
- */
77
- const _background = '_background';
78
- /**
79
- * Indicates the preferred area for a node or empty cluster when laid out by patchwork.
80
- *
81
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:area Node, Edge and Graph Attributes#area}
82
- * @graphvizType double
83
- * @graphvizDefault 1
84
- * @graphvizMinimum >0
85
- * @graphvizNotes patchwork only
86
- * @graphvizUsedBy NC
87
- * @category Attribute
88
- */
89
- const area = 'area';
90
- /**
91
- * Style of arrowhead on the head node of an edge.
92
- * This will only appear if the {@link dir} attribute is "forward" or "both".
93
- *
94
- * See the {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#h:undir_note limitation}.
95
- *
96
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:arrowhead Node, Edge and Graph Attributes#arrowhead}
97
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:arrowType arrowType}
98
- * @graphvizDefault normal
99
- * @graphvizUsedBy E
100
- * @category Attribute
101
- */
102
- const arrowhead = 'arrowhead';
103
- /**
104
- * Multiplicative scale factor for arrowheads.
105
- *
106
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:arrowsize Node, Edge and Graph Attributes#arrowsize}
107
- * @graphvizType double
108
- * @graphvizDefault 1
109
- * @graphvizMinimum 0
110
- * @graphvizUsedBy E
111
- * @category Attribute
112
- */
113
- const arrowsize = 'arrowsize';
114
- /**
115
- * Style of arrowhead on the tail node of an edge.
116
- * This will only appear if the {@link dir} attribute is "back" or "both".
117
- *
118
- * See the {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#h:undir_note limitation}.
119
- *
120
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:arrowtail Node, Edge and Graph Attributes#arrowtail}
121
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:arrowType arrowType}
122
- * @graphvizDefault normal
123
- * @graphvizUsedBy E
124
- * @category Attribute
125
- */
126
- const arrowtail = 'arrowtail';
127
- /**
128
- * Bounding box of drawing in points.
129
- *
130
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:rect rect}
131
- * @graphvizNotes write only
132
- * @graphvizUsedBy G
133
- * @category Attribute
134
- */
135
- const bb = 'bb';
136
- /**
137
- * When attached to the root graph, this color is used as the background for entire canvas.
138
- * When a cluster attribute, it is used as the initial background for the cluster.
139
- * If a cluster has a filled {@link style}, the cluster's {@link fillcolor} will overlay the background color.
140
- *
141
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:bgcolor Node, Edge and Graph Attributes#bgcolor}
142
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:color color}/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:colorList colorList}
143
- * @graphvizDefault <none>
144
- * @graphvizUsedBy GC
145
- * @category Attribute
146
- */
147
- const bgcolor = 'bgcolor';
148
- /**
149
- * If true, the drawing is centered in the output canvas.
150
- *
151
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:center Node, Edge and Graph Attributes#center}
152
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
153
- * @graphvizDefault FALSE
154
- * @graphvizUsedBy G
155
- * @category Attribute
156
- */
157
- const center = 'center';
158
- /**
159
- * Specifies the character encoding used when interpreting string input as a text label.
160
- * The default value is "UTF-8". The other legal value is "iso-8859-1" or, equivalently, "Latin1".
161
- * The charset attribute is case-insensitive.
162
- * Note that if the character encoding used in the input does not match the charset value, the resulting output may be very strange.
163
- *
164
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:charset Node, Edge and Graph Attributes#charset}
165
- * @graphvizType string
166
- * @graphvizDefault "UTF-8"
167
- * @graphvizUsedBy G
168
- *
169
- * @category Attribute
170
- */
171
- const charset = 'charset';
172
- /**
173
- * Mode used for handling clusters.
174
- * If clusterrank is "local", a subgraph whose name begins with "cluster" is given special treatment.
175
- * The subgraph is laid out separately, and then integrated as a unit into its parent graph, with a bounding rectangle drawn about it.
176
- * If the cluster has a label parameter, this label is displayed within the rectangle.
177
- * Note also that there can be clusters within clusters.
178
- * At present, the modes "global" and "none" appear to be identical, both turning off the special cluster processing.
179
- *
180
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:clusterrank Node, Edge and Graph Attributes#clusterrank}
181
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:clusterMode clusterMode}
182
- * @graphvizDefault local
183
- * @graphvizNotes dot only
184
- * @graphvizUsedBy G
185
- * @category Attribute
186
- */
187
- const clusterrank = 'clusterrank';
188
- /**
189
- * Basic drawing color for graphics, not text.
190
- * For the latter, use the fontcolor attribute.
191
- *
192
- * For edges, the value can either be a single color or a colorList.
193
- * In the latter case, if colorList has no fractions, the edge is drawn using parallel splines or lines, one for each color in the list, in the order given.
194
- * The head arrow, if any, is drawn using the first color in the list, and the tail arrow, if any, the second color.
195
- * This supports the common case of drawing opposing edges, but using parallel splines instead of separately routed multiedges.
196
- * If any fraction is used, the colors are drawn in series, with each color being given roughly its specified fraction of the edge.
197
- * For example, the graph
198
- *
199
- * ```dot
200
- * digraph G {
201
- * a -> b [dir=both color="red:blue"]
202
- * c -> d [dir=none color="green:red;0.25:blue"]
203
- * }
204
- * ```
205
- *
206
- * yields
207
- *
208
- * ![colorlist](https://graphviz.gitlab.io/_pages/doc/info/colorlist.gif)
209
- *
210
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:color Node, Edge and Graph Attributes#color}
211
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:color color}/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:colorList colorList}
212
- * @graphvizDefault black
213
- * @graphvizUsedBy ENC
214
- * @category Attribute
215
- */
216
- const color = 'color';
217
- /**
218
- * This attribute specifies a color scheme namespace.
219
- * If defined, it specifies the context for interpreting color names.
220
- * In particular, if a color value has form "xxx" or "//xxx", then the color xxx will be evaluated according to the current color scheme.
221
- * If no color scheme is set, the standard X11 naming is used.
222
- * For example, if colorscheme=bugn9, then color=7 is interpreted as "/bugn9/7".
223
- *
224
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:colorscheme Node, Edge and Graph Attributes#colorscheme}
225
- * @graphvizType string
226
- * @graphvizDefault ""
227
- * @graphvizUsedBy ENCG
228
- * @category Attribute
229
- */
230
- const colorscheme = 'colorscheme';
231
- /**
232
- * Comments are inserted into output.
233
- * Device-dependent
234
- *
235
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:comment Node, Edge and Graph Attributes#comment}
236
- * @graphvizType string
237
- * @graphvizDefault ""
238
- * @graphvizUsedBy ENG
239
- * @category Attribute
240
- */
241
- const comment = 'comment';
242
- /**
243
- * If true, allow edges between clusters. (See {@link lhead} and {@link ltail} below.)
244
- *
245
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:compound Node, Edge and Graph Attributes#compound}
246
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
247
- * @graphvizDefault FALSE
248
- * @graphvizNotes dot only
249
- * @graphvizUsedBy G
250
- * @category Attribute
251
- */
252
- const compound = 'compound';
253
- /**
254
- * If true, use edge concentrators.
255
- * This merges multiedges into a single edge and causes partially parallel edges to share part of their paths.
256
- * The latter feature is not yet available outside of dot.
257
- *
258
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:concentrate Node, Edge and Graph Attributes#concentrate}
259
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
260
- * @graphvizDefault FALSE
261
- * @graphvizUsedBy G
262
- * @category Attribute
263
- */
264
- const concentrate = 'concentrate';
265
- /**
266
- * If false, the edge is not used in ranking the nodes.
267
- * For example, in the graph
268
- *
269
- * ```graphviz
270
- * digraph G {
271
- * a -> c;
272
- * a -> b;
273
- * b -> c [constraint=false];
274
- * }
275
- * ```
276
- *
277
- * the edge `b -> c` does not add a constraint during rank assignment, so the only constraints are that a be above b and c, yielding the graph:
278
- *
279
- * ![constraint](https://graphviz.gitlab.io/_pages/doc/info/constraint.gif)
280
- *
281
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:constraint Node, Edge and Graph Attributes#constraint}
282
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
283
- * @graphvizDefault TRUE
284
- * @graphvizNotes dot only
285
- * @graphvizUsedBy E
286
- * @category Attribute
287
- */
288
- const constraint = 'constraint';
289
- /**
290
- * If true, attach edge label to edge by a 2-segment polyline, underlining the label, then going to the closest point of spline.
291
- *
292
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:decorate Node, Edge and Graph Attributes#decorate}
293
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
294
- * @graphvizDefault FALSE
295
- * @graphvizUsedBy E
296
- * @category Attribute
297
- */
298
- const decorate = 'decorate';
299
- /**
300
- * This specifies the distance between nodes in separate connected components.
301
- * If set too small, connected components may overlap. Only applicable if {@link pack}=false.
302
- *
303
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:defaultdist Node, Edge and Graph Attributes#defaultdist}
304
- * @graphvizType double
305
- * @graphvizDefault 1+(avg. len)*sqrt(|V|)
306
- * @graphvizMinimum epsilon
307
- * @graphvizNotes neato only
308
- * @graphvizUsedBy G
309
- * @category Attribute
310
- */
311
- const defaultdist = 'defaultdist';
312
- /**
313
- * Set the number of dimensions used for the layout.
314
- * The maximum value allowed is 10.
315
- *
316
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:dim Node, Edge and Graph Attributes#dim}
317
- * @graphvizType int
318
- * @graphvizDefault 2
319
- * @graphvizMinimum 2
320
- * @graphvizNotes sfdp, fdp, neato only
321
- * @graphvizUsedBy G
322
- * @category Attribute
323
- */
324
- const dim = 'dim';
325
- /**
326
- * Set the number of dimensions used for rendering.
327
- * The maximum value allowed is 10.
328
- * If both dimen and dim are set, the latter specifies the dimension used for layout, and the former for rendering.
329
- * If only dimen is set, this is used for both layout and rendering dimensions.
330
- *
331
- * Note that, at present, all aspects of rendering are 2D.
332
- * This includes the shape and size of nodes, overlap removal, and edge routing.
333
- * Thus, for dimen > 2, the only valid information is the pos attribute of the nodes.
334
- * All other coordinates will be 2D and, at best, will reflect a projection of a higher-dimensional point onto the plane.
335
- *
336
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:dimen Node, Edge and Graph Attributes#dimen}
337
- * @graphvizType int
338
- * @graphvizDefault 2
339
- * @graphvizMinimum 2
340
- * @graphvizNotes sfdp, fdp, neato only
341
- * @graphvizUsedBy G
342
- * @category Attribute
343
- */
344
- const dimen = 'dimen';
345
- /**
346
- * Set edge type for drawing arrowheads.
347
- * This indicates which ends of the edge should be decorated with an arrowhead.
348
- * The actual style of the arrowhead can be specified using the {@link arrowhead} and {@link arrowtail} attributes.
349
- * See {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#h:undir_note limitation}.
350
- *
351
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:dir Node, Edge and Graph Attributes#dir}
352
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:dirType dirType}
353
- * @graphvizDefault "forward(directed) none(undirected)"
354
- * @graphvizUsedBy E
355
- * @category Attribute
356
- */
357
- const dir = 'dir';
358
- /**
359
- * Only valid when {@link mode}="ipsep".
360
- * If true, constraints are generated for each edge in the largest (heuristic) directed acyclic subgraph such that the edge must point downwards.
361
- * If "hier", generates level constraints similar to those used with {@link mode}="hier".
362
- * The main difference is that, in the latter case, only these constraints are involved, so a faster solver can be used.
363
- *
364
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:diredgeconstraints Node, Edge and Graph Attributes#diredgeconstraints}
365
- * @graphvizType string/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
366
- * @graphvizDefault FALSE
367
- * @graphvizNotes neato only
368
- * @graphvizUsedBy G
369
- * @category Attribute
370
- */
371
- const diredgeconstraints = 'diredgeconstraints';
372
- /**
373
- * Distortion factor for {@link shape}=polygon.
374
- * Positive values cause top part to be larger than bottom; negative values do the opposite.
375
- *
376
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:distortion Node, Edge and Graph Attributes#distortion}
377
- * @graphvizType double
378
- * @graphvizDefault -100
379
- * @graphvizUsedBy N
380
- * @category Attribute
381
- */
382
- const distortion = 'distortion';
383
- /**
384
- * This specifies the expected number of pixels per inch on a display device.
385
- * For bitmap output, this guarantees that text rendering will be done more accurately, both in size and in placement.
386
- * For SVG output, it is used to guarantee that the dimensions in the output correspond to the correct number of points or inches.
387
- *
388
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:dpi Node, Edge and Graph Attributes#dpi}
389
- * @graphvizType double
390
- * @graphvizDefault "96.0 0.0"
391
- * @graphvizNotes svg, bitmap output only
392
- * @graphvizUsedBy G
393
- * @category Attribute
394
- */
395
- const dpi = 'dpi';
396
- /**
397
- * If **edgeURL** is defined, this is the link used for the non-label parts of an edge.
398
- * This value overrides any {@link URL} defined for the edge.
399
- * Also, this value is used near the head or tail node unless overridden by a {@link headURL} or {@link tailURL} value, respectively.
400
- * See {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#h:undir_note limitation}.
401
- *
402
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:edgeURL Node, Edge and Graph Attributes#edgeURL}
403
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
404
- * @graphvizDefault ""
405
- * @graphvizNotes svg, map only
406
- * @graphvizUsedBy E
407
- * @category Attribute
408
- */
409
- const edgeURL = 'edgeURL';
410
- /**
411
- * Synonym for {@link edgeURL}.
412
- *
413
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:edgehref Node, Edge and Graph Attributes#edgehref}
414
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
415
- * @graphvizDefault ""
416
- * @graphvizNotes svg, map only
417
- * @graphvizUsedBy E
418
- * @category Attribute
419
- */
420
- const edgehref = 'edgehref';
421
- /**
422
- * If the edge has a {@link URL} or {@link edgeURL} attribute, this attribute determines which window of the browser is used for the URL attached to the non-label part of the edge.
423
- * Setting it to "_graphviz" will open a new window if it doesn't already exist, or reuse it if it does.
424
- * If undefined, the value of the {@link target} is used.
425
- *
426
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:edgetarget Node, Edge and Graph Attributes#edgetarget}
427
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
428
- * @graphvizDefault <none>
429
- * @graphvizNotes svg, map only
430
- * @graphvizUsedBy E
431
- * @category Attribute
432
- */
433
- const edgetarget = 'edgetarget';
434
- /**
435
- * Tooltip annotation attached to the non-label part of an edge.
436
- * This is used only if the edge has a {@link URL} or {@link edgeURL} attribute.
437
- *
438
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:edgetooltip Node, Edge and Graph Attributes#edgetooltip}
439
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
440
- * @graphvizDefault ""
441
- * @graphvizNotes svg, cmap only
442
- * @graphvizUsedBy E
443
- * @category Attribute
444
- */
445
- const edgetooltip = 'edgetooltip';
446
- /**
447
- * Terminating condition. If the length squared of all energy gradients are < **epsilon**, the algorithm stops.
448
- *
449
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:epsilon Node, Edge and Graph Attributes#epsilon}
450
- * @graphvizType double
451
- * @graphvizDefault .0001 * # nodes(mode == KK) .0001(mode == major)
452
- * @graphvizNotes neato only
453
- * @graphvizUsedBy G
454
- * @category Attribute
455
- */
456
- const epsilon = 'epsilon';
457
- /**
458
- * Margin used around polygons for purposes of spline edge routing.
459
- * The interpretation is the same as given for {@link sep}.
460
- * This should normally be strictly less than {@link sep}.
461
- *
462
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:esep Node, Edge and Graph Attributes#esep}
463
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:addDouble addDouble}/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:addPoint addPoint}
464
- * @graphvizDefault 3
465
- * @graphvizNotes not dot
466
- * @graphvizUsedBy G
467
- * @category Attribute
468
- */
469
- const esep = 'esep';
470
- /**
471
- * Color used to fill the background of a node or cluster assuming {@link style}=filled, or a filled arrowhead.
472
- * If fillcolor is not defined, {@link color} is used. (For clusters, if color is not defined, {@link bgcolor} is used.)
473
- * If this is not defined, the default is used, except for {@link shape}=point or when the output format is MIF, which use black by default.
474
- *
475
- * If the value is a {@link colorList}, a gradient fill is used.
476
- * By default, this is a linear fill; setting style=radial will cause a radial fill.
477
- * At present, only two colors are used. If the second color (after a colon) is missing, the default color is used for it.
478
- * See also the {@link gradientangle} attribute for setting the gradient angle.
479
- *
480
- * Note that a cluster inherits the root graph's attributes if defined.
481
- * Thus, if the root graph has defined a **fillcolor**, this will override a **color** or **bgcolor** attribute set for the cluster.
482
- *
483
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:fillcolor Node, Edge and Graph Attributes#fillcolor}
484
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:color color}/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:colorList colorList}
485
- * @graphvizDefault "lightgrey(nodes) black(clusters)"
486
- * @graphvizUsedBy NEC
487
- * @category Attribute
488
- */
489
- const fillcolor = 'fillcolor';
490
- /**
491
- * If `false`, the size of a node is determined by smallest width and height needed to contain its label and image,
492
- * if any, with a {@link margin} specified by the margin attribute.
493
- * The width and height must also be at least as large as the sizes specified by the {@link width} and {@link height} attributes,
494
- * which specify the minimum values for these parameters.
495
- *
496
- * If `true`, the node size is specified by the values of the {@link width} and {@link height} attributes only and is not expanded to contain the text label.
497
- * There will be a warning if the label (with margin) cannot fit within these limits.
498
- *
499
- * If the {@link fixedsize} attribute is set to shape, the {@link width} and {@link height} attributes also determine the size of the node shape,
500
- * but the label can be much larger. Both the label and shape sizes are used when avoiding node overlap,
501
- * but all edges to the node ignore the label and only contact the node shape. No warning is given if the label is too large.
502
- *
503
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:fixedsize Node, Edge and Graph Attributes#fixedsize}
504
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}/string
505
- * @graphvizDefault FALSE
506
- * @graphvizUsedBy N
507
- * @category Attribute
508
- */
509
- const fixedsize = 'fixedsize';
510
- /**
511
- * Color used for text.
512
- *
513
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:fontcolor Node, Edge and Graph Attributes#fontcolor}
514
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:color color}
515
- * @graphvizDefault black
516
- * @graphvizUsedBy ENGC
517
- * @category Attribute
518
- */
519
- const fontcolor = 'fontcolor';
520
- /**
521
- * Font used for text.
522
- * This very much depends on the output format and, for non-bitmap output such as PostScript or SVG,
523
- * the availability of the font when the graph is displayed or printed.
524
- * As such, it is best to rely on font faces that are generally available,
525
- * such as Times-Roman, Helvetica or Courier.
526
- *
527
- * How font names are resolved also depends on the underlying library that handles font name resolution.
528
- * If Graphviz was built using the fontconfig library, the latter library will be used to search for the font.
529
- * See the commands **fc-list**, **fc-match** and the other fontconfig commands for how names are resolved and which fonts are available.
530
- * Other systems may provide their own font package, such as Quartz for OS X.
531
- *
532
- * Note that various font attributes, such as weight and slant, can be built into the font name.
533
- * Unfortunately, the syntax varies depending on which font system is dominant. Thus, using fontname="times bold italic" will produce a bold, slanted Times font using Pango, the usual main font library.
534
- * Alternatively, fontname="times:italic" will produce a slanted Times font from fontconfig, while fontname="times-bold" will resolve to a bold Times using Quartz.
535
- * You will need to ascertain which package is used by your Graphviz system and refer to the relevant documentation.
536
- *
537
- * If Graphviz is not built with a high-level font library, fontname will be considered the name of a Type 1 or True Type font file.
538
- * If you specify fontname=schlbk, the tool will look for a file named schlbk.ttf or schlbk.pfa or schlbk.pfb in one of the directories specified by the {@link fontpath} attribute.
539
- * The lookup does support various aliases for the common fonts.
540
- *
541
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:fontname Node, Edge and Graph Attributes#fontname}
542
- * @graphvizType string
543
- * @graphvizDefault "Times-Roman"
544
- * @graphvizUsedBy ENGC
545
- * @category Attribute
546
- */
547
- const fontname = 'fontname';
548
- /**
549
- * Allows user control of how basic fontnames are represented in SVG output.
550
- * If fontnames is undefined or "svg", the output will try to use known SVG fontnames.
551
- * For example, the default font "Times-Roman" will be mapped to the basic SVG font "serif".
552
- * This can be overridden by setting fontnames to "ps" or "gd". In the former case, known PostScript font names such as "Times-Roman" will be used in the output.
553
- * In the latter case, the fontconfig font conventions are used. Thus, "Times-Roman" would be treated as "Nimbus Roman No9 L".
554
- * These last two options are useful with SVG viewers that support these richer fontname spaces.
555
- *
556
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:fontnames Node, Edge and Graph Attributes#fontnames}
557
- * @graphvizType string
558
- * @graphvizDefault ""
559
- * @graphvizNotes svg only
560
- * @graphvizUsedBy G
561
- * @category Attribute
562
- */
563
- const fontnames = 'fontnames';
564
- /**
565
- * Directory list used by libgd to search for bitmap fonts if Graphviz was not built with the fontconfig library.
566
- * If **fontpath** is not set, the environment variable DOTFONTPATH is checked.
567
- * If that is not set, GDFONTPATH is checked.
568
- * If not set, libgd uses its compiled-in font path.
569
- * Note that fontpath is an attribute of the root graph.
570
- *
571
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:fontpath Node, Edge and Graph Attributes#fontpath}
572
- * @graphvizType string
573
- * @graphvizDefault system-dependent
574
- * @graphvizUsedBy G
575
- * @category Attribute
576
- */
577
- const fontpath = 'fontpath';
578
- /**
579
- * Font size, {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#points in points}, used for text.
580
- *
581
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:fontsize Node, Edge and Graph Attributes#fontsize}
582
- * @graphvizType double
583
- * @graphvizDefault 14
584
- * @graphvizMinimum 1
585
- * @graphvizUsedBy ENGC
586
- * @category Attribute
587
- */
588
- const fontsize = 'fontsize';
589
- /**
590
- * If true, all {@link xlabel} attributes are placed,
591
- * even if there is some overlap with nodes or other labels.
592
- *
593
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:forcelabels Node, Edge and Graph Attributes#forcelabels}
594
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
595
- * @graphvizDefault TRUE
596
- * @graphvizUsedBy G
597
- * @category Attribute
598
- */
599
- const forcelabels = 'forcelabels';
600
- /**
601
- * If a gradient fill is being used, this determines the angle of the fill.
602
- * For linear fills, the colors transform along a line specified by the angle and the center of the object.
603
- * For radial fills, a value of zero causes the colors to transform radially from the center; for non-zero values,
604
- * the colors transform from a point near the object's periphery as specified by the value.
605
- *
606
- * If unset, the default angle is 0.
607
- *
608
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:gradientangle Node, Edge and Graph Attributes#gradientangle}
609
- * @graphvizType int
610
- * @graphvizDefault ""
611
- * @graphvizUsedBy NCG
612
- * @category Attribute
613
- */
614
- const gradientangle = 'gradientangle';
615
- /**
616
- * If the end points of an edge belong to the same group, i.e.,
617
- * have the same group attribute, parameters are set to avoid crossings and keep the edges straight.
618
- *
619
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:group Node, Edge and Graph Attributes#group}
620
- * @graphvizType string
621
- * @graphvizDefault ""
622
- * @graphvizNotes dot only
623
- * @graphvizUsedBy N
624
- * @category Attribute
625
- */
626
- const group = 'group';
627
- /**
628
- * If **headURL** is defined, it is output as part of the head label of the edge.
629
- * Also, this value is used near the head node, overriding any {@link URL} value.
630
- * See {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#h:undir_note limitation}.
631
- *
632
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:headURL Node, Edge and Graph Attributes#headURL}
633
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
634
- * @graphvizDefault ""
635
- * @graphvizNotes svg, map only
636
- * @graphvizUsedBy E
637
- * @category Attribute
638
- */
639
- const headURL = 'headURL';
640
- /**
641
- * Position of an edge's head label, {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#points in points}.
642
- * The position indicates the center of the label.
643
- *
644
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:head_lp Node, Edge and Graph Attributes#head_lp}
645
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:point point}
646
- * @graphvizNotes write only
647
- * @graphvizUsedBy E
648
- * @category Attribute
649
- */
650
- const head_lp = 'head_lp';
651
- /**
652
- * If true, the head of an edge is clipped to the boundary of the head node; otherwise,
653
- * the end of the edge goes to the center of the node, or the center of a port, if applicable.
654
- *
655
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:headclip Node, Edge and Graph Attributes#headclip}
656
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
657
- * @graphvizDefault TRUE
658
- * @graphvizUsedBy E
659
- * @category Attribute
660
- */
661
- const headclip = 'headclip';
662
- /**
663
- * Synonym for {@link headURL}.
664
- *
665
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:headhref Node, Edge and Graph Attributes#headhref}
666
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
667
- * @graphvizDefault ""
668
- * @graphvizNotes svg, map only
669
- * @graphvizUsedBy E
670
- * @category Attribute
671
- */
672
- const headhref = 'headhref';
673
- /**
674
- * Text label to be placed near head of edge.
675
- * See {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#h:undir_note limitation}.
676
- *
677
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:headlabel Node, Edge and Graph Attributes#headlabel}
678
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:lblString lblString}
679
- * @graphvizDefault center
680
- * @graphvizUsedBy E
681
- * @category Attribute
682
- */
683
- const headlabel = 'headlabel';
684
- /**
685
- * Indicates where on the head node to attach the head of the edge.
686
- * In the default case, the edge is aimed towards the center of the node, and then clipped at the node boundary.
687
- * See {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#h:undir_note limitation}.
688
- *
689
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:headport Node, Edge and Graph Attributes#headport}
690
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:portPos portPos}
691
- * @graphvizDefault <none>
692
- * @graphvizNotes svg, map only
693
- * @graphvizUsedBy E
694
- * @category Attribute
695
- */
696
- const headport = 'headport';
697
- /**
698
- * If the edge has a {@link headURL}, this attribute determines which window of the browser is used for the URL.
699
- * Setting it to "_graphviz" will open a new window if it doesn't already exist, or reuse it if it does.
700
- * If undefined, the value of the {@link target} is used.
701
- *
702
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:headtarget Node, Edge and Graph Attributes#headtarget}
703
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
704
- * @graphvizDefault ""
705
- * @graphvizNotes svg, cmap only
706
- * @graphvizUsedBy E
707
- * @category Attribute
708
- */
709
- const headtarget = 'headtarget';
710
- /**
711
- * Tooltip annotation attached to the head of an edge.
712
- * This is used only if the edge has a {@link headURL} attribute.
713
- *
714
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:headtooltip Node, Edge and Graph Attributes#headtooltip}
715
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
716
- * @graphvizDefault 0.5
717
- * @graphvizMinimum 0.02
718
- * @graphvizUsedBy N
719
- * @category Attribute
720
- */
721
- const headtooltip = 'headtooltip';
722
- /**
723
- * Height of node, in inches.
724
- * This is taken as the initial, minimum height of the node.
725
- * If {@link fixedsize} is true, this will be the final height of the node.
726
- * Otherwise, if the node label requires more height to fit, the node's **height** will be increased to contain the label.
727
- * Note also that, if the output format is dot, the value given to height will be the final value.
728
- *
729
- * If the node shape is regular, the width and height are made identical.
730
- * In this case, if either the width or the height is set explicitly, that value is used.
731
- * In this case, if both the width or the height are set explicitly, the maximum of the two values is used.
732
- * If neither is set explicitly, the minimum of the two default values is used.
733
- *
734
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:height Node, Edge and Graph Attributes#height}
735
- * @graphvizType double
736
- * @graphvizDefault ""
737
- * @graphvizNotes svg, postscript, map only
738
- * @graphvizUsedBy GCNE
739
- * @category Attribute
740
- */
741
- const height = 'height';
742
- /**
743
- * Synonym for {@link URL}.
744
- *
745
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:href Node, Edge and Graph Attributes#href}
746
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
747
- * @graphvizDefault ""
748
- * @graphvizNotes svg, postscript, map only
749
- * @graphvizUsedBy GCNE
750
- * @category Attribute
751
- */
752
- const href = 'href';
753
- /**
754
- * Allows the graph author to provide an id for graph objects which is to be included in the output.
755
- * Normal "\N", "\E", "\G" substitutions are applied.
756
- * If provided, it is the responsibility of the provider to keep its values sufficiently unique for its intended downstream use.
757
- * Note, in particular, that "\E" does not provide a unique id for multi-edges.
758
- * If no id attribute is provided, then a unique internal id is used.
759
- * However, this value is unpredictable by the graph writer.
760
- * An externally provided id is not used internally.
761
- *
762
- * If the graph provides an id attribute, this will be used as a prefix for internally generated attributes.
763
- * By making these distinct, the user can include multiple image maps in the same document.
764
- *
765
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:id Node, Edge and Graph Attributes#id}
766
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
767
- * @graphvizDefault ""
768
- * @graphvizUsedBy N
769
- * @category Attribute
770
- */
771
- const id = 'id';
772
- /**
773
- * Gives the name of a file containing an image to be displayed inside a node.
774
- * The image file must be in one of the recognized {@link https://graphviz.gitlab.io/_pages/doc/info/output.html#d:image_fmts formats},
775
- * typically JPEG, PNG, GIF, BMP, SVG or Postscript, and be able to be converted into the desired output format.
776
- *
777
- * The file must contain the image size information.
778
- * This is usually trivially true for the bitmap formats.
779
- * For PostScript, the file must contain a line starting with %%BoundingBox: followed by four integers specifying the lower left x and y coordinates and the upper right x and y coordinates of the bounding box for the image, the coordinates being in points.
780
- * An SVG image file must contain width and height attributes, typically as part of the svg element.
781
- * The values for these should have the form of a floating point number, followed by optional units, e.g.,
782
- * width="76pt". Recognized units are in, px, pc, pt, cm and mm for inches, pixels, picas, points, centimeters and millimeters, respectively.
783
- * The default unit is points.
784
- *
785
- * Unlike with the {@link shapefile} attribute, the image is treated as node content rather than the entire node. In particular, an image can be contained in a node of any shape, not just a rectangle.
786
- *
787
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:image Node, Edge and Graph Attributes#image}
788
- * @graphvizType string
789
- * @graphvizDefault ""
790
- * @graphvizUsedBy G
791
- * @category Attribute
792
- */
793
- const image = 'image';
794
- /**
795
- * Specifies a list of directories in which to look for image files as specified by the {@link image} attribute or using the IMG element in {@link https://graphviz.gitlab.io/_pages/doc/info/shapes.html#html HTML-like labels}.
796
- * The string should be a list of (absolute or relative) pathnames, each separated by a semicolon (for Windows) or a colon (all other OS).
797
- * The first directory in which a file of the given name is found will be used to load the image.
798
- * If imagepath is not set, relative pathnames for the image file will be interpreted with respect to the current working directory.
799
- *
800
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:imagepath Node, Edge and Graph Attributes#imagepath}
801
- * @graphvizType string
802
- * @graphvizDefault ""
803
- * @graphvizUsedBy G
804
- * @category Attribute
805
- */
806
- const imagepath = 'imagepath';
807
- /**
808
- * Attribute controlling how an image is positioned within its containing node.
809
- * This only has an effect when the image is smaller than the containing node.
810
- * The default is to be centered both horizontally and vertically.
811
- * Valid values:
812
- *
813
- * | | |
814
- * |----|-------------------------------|
815
- * | tl | Top Left |
816
- * | tc | Top Centered |
817
- * | tr | Top Right |
818
- * | ml | Middle Left |
819
- * | mc | Middle Centered (the default) |
820
- * | mr | Middle Right |
821
- * | bl | Bottom Left |
822
- * | bc | Bottom Centered |
823
- * | br | Bottom Right |
824
- *
825
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:imagepos Node, Edge and Graph Attributes#imagepos}
826
- * @graphvizType string
827
- * @graphvizDefault "mc"
828
- * @graphvizUsedBy N
829
- * @category Attribute
830
- */
831
- const imagepos = 'imagepos';
832
- /**
833
- * Attribute controlling how an image fills its containing node.
834
- * In general, the image is given its natural size, (cf. {@link dpi}), and the node size is made large enough to contain its image, its label, its margin, and its peripheries.
835
- * Its width and height will also be at least as large as its minimum {@link width} and {@link height}.
836
- * If, however, fixedsize=true, the width and height attributes specify the exact size of the node.
837
- *
838
- * During rendering, in the default case (imagescale=false), the image retains its natural size. If imagescale=true, the image is uniformly scaled (i.e., its aspect ratio is preserved) to fit inside the node. At least one dimension of the image will be as large as possible given the size of the node. When imagescale=width, the width of the image is scaled to fill the node width. The corresponding property holds when imagescale=height. When imagescale=both, both the height and the width are scaled separately to fill the node.
839
- *
840
- * In all cases, if a dimension of the image is larger than the corresponding dimension of the node,
841
- * that dimension of the image is scaled down to fit the node.
842
- * As with the case of expansion, if imagescale=true, width and height are scaled uniformly.
843
- *
844
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:imagescale Node, Edge and Graph Attributes#imagescale}
845
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}/string
846
- * @graphvizDefault FALSE
847
- * @graphvizUsedBy N
848
- * @category Attribute
849
- */
850
- const imagescale = 'imagescale';
851
- /**
852
- * For layout algorithms that support initial input positions (specified by the pos attribute),
853
- * this attribute can be used to appropriately scale the values.
854
- * By default, fdp and neato interpret the x and y values of pos as being in inches.
855
- * (**NOTE**: neato -n(2) treats the coordinates as being in points, being the unit used by the layout algorithms for the pos attribute.)
856
- * Thus, if the graph has pos attributes in points, one should set inputscale=72.
857
- * This can also be set on the command line using the {@link https://graphviz.gitlab.io/_pages/doc/info/command.html#minusK -s flag} flag.
858
- *
859
- * If not set, no scaling is done and the units on input are treated as inches.
860
- * A value of 0 is equivalent to inputscale=72.
861
- *
862
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:inputscale Node, Edge and Graph Attributes#inputscale}
863
- * @graphvizType double
864
- * @graphvizDefault <none>
865
- * @graphvizNotes fdp, neato only
866
- * @graphvizUsedBy G
867
- * @category Attribute
868
- */
869
- const inputscale = 'inputscale';
870
- /**
871
- * Text label attached to objects.
872
- * If a node's {@link shape} is record, then the label can have a {@link https://graphviz.gitlab.io/_pages/doc/info/shapes.html#record special format} which describes the record layout.
873
- *
874
- * Note that a node's default label is "\N", so the node's name or ID becomes its label.
875
- * Technically, a node's name can be an HTML string but this will not mean that the node's label will be interpreted as an {@link https://graphviz.gitlab.io/_pages/doc/info/shapes.html#html HTML-like} label.
876
- * This is because the node's actual label is an ordinary string, which will be replaced by the raw bytes stored in the node's name.
877
- * To get an HTML-like label, the label attribute value itself must be an HTML string.
878
- *
879
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:label Node, Edge and Graph Attributes#label}
880
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:lblString lblString}
881
- * @graphvizDefaultValu
882
- * "\N" (nodes)
883
- * "" (otherwise)
884
- * @graphvizUsedBy ENGC
885
- * @category Attribute
886
- */
887
- const label = 'label';
888
- /**
889
- * If **labelURL** is defined, this is the link used for the label of an edge.
890
- * This value overrides any {@link URL} defined for the edge.
891
- *
892
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:labelURL Node, Edge and Graph Attributes#labelURL}
893
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
894
- * @graphvizDefault ""
895
- * @graphvizNotes svg, map only
896
- * @graphvizUsedBy E
897
- * @category Attribute
898
- */
899
- const labelURL = 'labelURL';
900
- /**
901
- * The value indicates whether to treat a node whose name has the form |edgelabel|* as a special node representing an edge label.
902
- * The default (0) produces no effect.
903
- * If the attribute is set to 1, sfdp uses a penalty-based method to make that kind of node close to the center of its neighbor.
904
- * With a value of 2, sfdp uses a penalty-based method to make that kind of node close to the old center of its neighbor.
905
- * Finally, a value of 3 invokes a two-step process of overlap removal and straightening.
906
- *
907
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:label_scheme Node, Edge and Graph Attributes#label_scheme}
908
- * @graphvizType int
909
- * @graphvizDefault 0
910
- * @graphvizMinimum 0
911
- * @graphvizNotes sfdp only
912
- * @graphvizUsedBy G
913
- * @category Attribute
914
- */
915
- const label_scheme = 'label_scheme';
916
- /**
917
- * This, along with {@link labeldistance}, determine where the headlabel (taillabel) are placed with respect to the head (tail) in polar coordinates.
918
- * The origin in the coordinate system is the point where the edge touches the node.
919
- * The ray of 0 degrees goes from the origin back along the edge, parallel to the edge at the origin.
920
- *
921
- * The angle, in degrees, specifies the rotation from the 0 degree ray, with positive angles moving counterclockwise and negative angles moving clockwise.
922
- *
923
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:labelangle Node, Edge and Graph Attributes#labelangle}
924
- * @graphvizType double
925
- * @graphvizDefault -25
926
- * @graphvizMinimum -180
927
- * @graphvizUsedBy E
928
- * @category Attribute
929
- */
930
- const labelangle = 'labelangle';
931
- /**
932
- * Multiplicative scaling factor adjusting the distance that the headlabel(taillabel) is from the head(tail) node.
933
- * The default distance is 10 points.
934
- * See {@link labelangle} for more details.
935
- *
936
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:labeldistance Node, Edge and Graph Attributes#labeldistance}
937
- * @graphvizType double
938
- * @graphvizDefault 1
939
- * @graphvizMinimum 0
940
- * @graphvizUsedBy E
941
- * @category Attribute
942
- */
943
- const labeldistance = 'labeldistance';
944
- /**
945
- * If true, allows edge labels to be less constrained in position.
946
- * In particular, it may appear on top of other edges.
947
- *
948
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:labelfloat Node, Edge and Graph Attributes#labelfloat}
949
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
950
- * @graphvizDefault FALSE
951
- * @graphvizUsedBy E
952
- * @category Attribute
953
- */
954
- const labelfloat = 'labelfloat';
955
- /**
956
- * Color used for headlabel and taillabel.
957
- * If not set, defaults to edge's fontcolor.
958
- *
959
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:labelfontcolor Node, Edge and Graph Attributes#labelfontcolor}
960
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:color color}
961
- * @graphvizDefault black
962
- * @graphvizUsedBy E
963
- * @category Attribute
964
- */
965
- const labelfontcolor = 'labelfontcolor';
966
- /**
967
- * Font used for headlabel and taillabel.
968
- * If not set, defaults to edge's fontname.
969
- *
970
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:labelfontname Node, Edge and Graph Attributes#labelfontname}
971
- * @graphvizType string
972
- * @graphvizDefault "Times-Roman"
973
- * @graphvizUsedBy E
974
- * @category Attribute
975
- */
976
- const labelfontname = 'labelfontname';
977
- /**
978
- * Font size, {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#points in points}, used for headlabel and taillabel.
979
- * If not set, defaults to edge's fontsize.
980
- *
981
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:labelfontsize Node, Edge and Graph Attributes#labelfontsize}
982
- * @graphvizType double
983
- * @graphvizDefault 14
984
- * @graphvizMinimum 1
985
- * @graphvizUsedBy E
986
- * @category Attribute
987
- */
988
- const labelfontsize = 'labelfontsize';
989
- /**
990
- * Synonym for {@link labelURL}.
991
- *
992
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:labelhref Node, Edge and Graph Attributes#labelhref}
993
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
994
- * @graphvizDefault ""
995
- * @graphvizNotes svg, map only
996
- * @graphvizUsedBy E
997
- * @category Attribute
998
- */
999
- const labelhref = 'labelhref';
1000
- /**
1001
- * Justification for cluster labels.
1002
- * If "r", the label is right-justified within bounding rectangle; if "l", left-justified; else the label is centered.
1003
- * Note that a subgraph inherits attributes from its parent.
1004
- * Thus, if the root graph sets **labeljust** to "l", the subgraph inherits this value.
1005
- *
1006
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:labeljust Node, Edge and Graph Attributes#labeljust}
1007
- * @graphvizType string
1008
- * @graphvizDefault "c"
1009
- * @graphvizUsedBy GC
1010
- * @category Attribute
1011
- */
1012
- const labeljust = 'labeljust';
1013
- /**
1014
- * Vertical placement of labels for nodes, root graphs and clusters.
1015
- *
1016
- * For graphs and clusters, only "t" and "b" are allowed, corresponding to placement at the top and bottom, respectively.
1017
- * By default, root graph labels go on the bottom and cluster labels go on the top.
1018
- * Note that a subgraph inherits attributes from its parent.
1019
- * Thus, if the root graph sets {@link labelloc} to "b", the subgraph inherits this value.
1020
- *
1021
- * For nodes, this attribute is used only when the height of the node is larger than the height of its label.
1022
- * If labelloc is set to "t", "c", or "b", the label is aligned with the top, centered, or aligned with the bottom of the node, respectively.
1023
- * In the default case, the label is vertically centered.
1024
- *
1025
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:labelloc Node, Edge and Graph Attributes#labelloc}
1026
- * @graphvizType string
1027
- * @graphvizDefault
1028
- * "t"(clusters)
1029
- * "b"(root graphs)
1030
- * "c"(nodes)
1031
- * @graphvizUsedBy NGC
1032
- * @category Attribute
1033
- */
1034
- const labelloc = 'labelloc';
1035
- /**
1036
- * If the edge has a {@link URL} or {@link labelURL} attribute, this attribute determines which window of the browser is used for the URL attached to the label.
1037
- * Setting it to "_graphviz" will open a new window if it doesn't already exist, or reuse it if it does.
1038
- * If undefined, the value of the {@link target} is used.
1039
- *
1040
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:labeltarget Node, Edge and Graph Attributes#labeltarget}
1041
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
1042
- * @graphvizDefault <none>
1043
- * @graphvizNotes svg, map only
1044
- * @graphvizUsedBy E
1045
- * @category Attribute
1046
- */
1047
- const labeltarget = 'labeltarget';
1048
- /**
1049
- * Tooltip annotation attached to label of an edge.
1050
- * This is used only if the edge has a {@link URL} or {@link labelURL} attribute.
1051
- *
1052
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:labeltooltip Node, Edge and Graph Attributes#labeltooltip}
1053
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
1054
- * @graphvizDefault ""
1055
- * @graphvizNotes svg, cmap only
1056
- * @graphvizUsedBy E
1057
- * @category Attribute
1058
- */
1059
- const labeltooltip = 'labeltooltip';
1060
- /**
1061
- * If true, the graph is rendered in landscape mode.
1062
- * Synonymous with {@link rotate rotate=90} or {@link orientation orientation=landscape}.
1063
- *
1064
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:landscape Node, Edge and Graph Attributes#landscape}
1065
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
1066
- * @graphvizDefault FALSE
1067
- * @graphvizUsedBy G
1068
- * @category Attribute
1069
- */
1070
- const landscape = 'landscape';
1071
- /**
1072
- * Specifies layers in which the node, edge or cluster is present.
1073
- *
1074
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:layer Node, Edge and Graph Attributes#layer}
1075
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:layerRange layerRange}
1076
- * @graphvizDefault ""
1077
- * @graphvizUsedBy ENC
1078
- * @category Attribute
1079
- */
1080
- const layer = 'layer';
1081
- /**
1082
- * Specifies the separator characters used to split an attribute of type {@link layerRange} into a list of ranges.
1083
- *
1084
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:layerlistsep Node, Edge and Graph Attributes#layerlistsep}
1085
- * @graphvizType string
1086
- * @graphvizDefault ""
1087
- * @graphvizUsedBy G
1088
- * @category Attribute
1089
- */
1090
- const layerlistsep = 'layerlistsep';
1091
- /**
1092
- * Specifies a linearly ordered list of layer names attached to the graph The graph is then output in separate layers.
1093
- * Only those components belonging to the current output layer appear.
1094
- * For more information, see the page {@link https://graphviz.gitlab.io/faq/#FaqOverlays How to use drawing layers (overlays)}.
1095
- *
1096
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:layers Node, Edge and Graph Attributes#layers}
1097
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:layerList layerList}
1098
- * @graphvizDefault ""
1099
- * @graphvizUsedBy G
1100
- * @category Attribute
1101
- */
1102
- const layers = 'layers';
1103
- /**
1104
- * Selects a list of layers to be emitted.
1105
- *
1106
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:layerselect Node, Edge and Graph Attributes#layerselect}
1107
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:layerRange layerRange}
1108
- * @graphvizDefault ""
1109
- * @graphvizUsedBy G
1110
- * @category Attribute
1111
- */
1112
- const layerselect = 'layerselect';
1113
- /**
1114
- * Specifies the separator characters used to split the {@link layers} attribute into a list of layer names.
1115
- *
1116
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:layersep Node, Edge and Graph Attributes#layersep}
1117
- * @graphvizType string
1118
- * @graphvizDefault " :\t"
1119
- * @graphvizUsedBy G
1120
- * @category Attribute
1121
- */
1122
- const layersep = 'layersep';
1123
- /**
1124
- * Specifies the name of the layout algorithm to use, such as "dot" or "neato".
1125
- * Normally, graphs should be kept independent of a type of layout.
1126
- * In some cases, however, it can be convenient to embed the type of layout desired within the graph.
1127
- * For example, a graph containing position information from a layout might want to record what the associated layout algorithm was.
1128
- *
1129
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:layout Node, Edge and Graph Attributes#layout}
1130
- * @graphvizType string
1131
- * @graphvizDefault ""
1132
- * @graphvizUsedBy G
1133
- * @category Attribute
1134
- */
1135
- const layout = 'layout';
1136
- /**
1137
- * Preferred edge length, in inches.
1138
- *
1139
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:len Node, Edge and Graph Attributes#len}
1140
- * @graphvizType double
1141
- * @graphvizDefault
1142
- * 1.0(neato)
1143
- * 0.3(fdp)
1144
- * @graphvizNotes fdp, neato only
1145
- * @graphvizUsedBy E
1146
- * @category Attribute
1147
- */
1148
- const len = 'len';
1149
- /**
1150
- * Number of levels allowed in the multilevel scheme.
1151
- *
1152
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:levels Node, Edge and Graph Attributes#levels}
1153
- * @graphvizType int
1154
- * @graphvizDefault MAXINT
1155
- * @graphvizMinimum 0
1156
- * @graphvizNotes sfdp only
1157
- * @graphvizUsedBy G
1158
- * @category Attribute
1159
- */
1160
- const levels = 'levels';
1161
- /**
1162
- * Specifies strictness of level constraints in neato when {@link mode}="ipsep" or "hier".
1163
- * Larger positive values mean stricter constraints, which demand more separation between levels.
1164
- * On the other hand, negative values will relax the constraints by allowing some overlap between the levels.
1165
- *
1166
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:levelsgap Node, Edge and Graph Attributes#levelsgap}
1167
- * @graphvizType double
1168
- * @graphvizDefault 0
1169
- * @graphvizNotes neato only
1170
- * @graphvizUsedBy G
1171
- * @category Attribute
1172
- */
1173
- const levelsgap = 'levelsgap';
1174
- /**
1175
- * Logical head of an edge.
1176
- * When {@link compound} is true, if **lhead** is defined and is the name of a cluster containing the real head,
1177
- * the edge is clipped to the boundary of the cluster.
1178
- * See the {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#h:undir_note limitation}.
1179
- *
1180
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:lhead Node, Edge and Graph Attributes#lhead}
1181
- * @graphvizType string
1182
- * @graphvizDefault ""
1183
- * @graphvizNotes dot only
1184
- * @graphvizUsedBy E
1185
- * @category Attribute
1186
- */
1187
- const lhead = 'lhead';
1188
- /**
1189
- * Height of graph or cluster label, in inches.
1190
- *
1191
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:lheight Node, Edge and Graph Attributes#lheight}
1192
- * @graphvizType double
1193
- * @graphvizNotes write only
1194
- * @graphvizUsedBy GC
1195
- * @category Attribute
1196
- */
1197
- const lheight = 'lheight';
1198
- /**
1199
- * Label position, {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#points in points}.
1200
- * The position indicates the center of the label.
1201
- *
1202
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:lp Node, Edge and Graph Attributes#lp}
1203
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:point point}
1204
- * @graphvizNotes write only
1205
- * @graphvizUsedBy EGC
1206
- * @category Attribute
1207
- */
1208
- const lp = 'lp';
1209
- /**
1210
- * Logical tail of an edge.
1211
- * When {@link compound} is true, if **ltail** is defined and is the name of a cluster containing the real tail, the edge is clipped to the boundary of the cluster.
1212
- * See the {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#h:undir_note limitation}.
1213
- *
1214
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:ltail Node, Edge and Graph Attributes#ltail}
1215
- * @graphvizType string
1216
- * @graphvizDefault ""
1217
- * @graphvizNotes dot only
1218
- * @graphvizUsedBy E
1219
- * @category Attribute
1220
- */
1221
- const ltail = 'ltail';
1222
- /**
1223
- * Width of graph or cluster label, in inches.
1224
- *
1225
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:lwidth Node, Edge and Graph Attributes#lwidth}
1226
- * @graphvizType double
1227
- * @graphvizNotes write only
1228
- * @graphvizUsedBy GC
1229
- * @category Attribute
1230
- */
1231
- const lwidth = 'lwidth';
1232
- /**
1233
- * For graphs, this sets x and y margins of canvas, in inches.
1234
- * If the margin is a single double, both margins are set equal to the given value.
1235
- *
1236
- * Note that the margin is not part of the drawing but just empty space left around the drawing.
1237
- * It basically corresponds to a translation of drawing, as would be necessary to center a drawing on a page.
1238
- * Nothing is actually drawn in the margin.
1239
- * To actually extend the background of a drawing, see the {@link pad} attribute.
1240
- *
1241
- * For clusters, this specifies the space between the nodes in the cluster and the cluster bounding box.
1242
- * By default, this is 8 points.
1243
- *
1244
- * For nodes, this attribute specifies space left around the node's label.
1245
- * By default, the value is 0.11,0.055.
1246
- *
1247
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:margin Node, Edge and Graph Attributes#margin}
1248
- * @graphvizType double/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:point point}
1249
- * @graphvizDefault <device-dependent>
1250
- * @graphvizUsedBy NCG
1251
- * @category Attribute
1252
- */
1253
- const margin = 'margin';
1254
- /**
1255
- * Sets the number of iterations used.
1256
- *
1257
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:maxiter Node, Edge and Graph Attributes#maxiter}
1258
- * @graphvizType int
1259
- * @graphvizDefault
1260
- * 100 * # nodes(mode == KK)
1261
- * 200(mode == major)
1262
- * 600(fdp)
1263
- * @graphvizNotes fdp, neato only
1264
- * @graphvizUsedBy G
1265
- * @category Attribute
1266
- */
1267
- const maxiter = 'maxiter';
1268
- /**
1269
- * Multiplicative scale factor used to alter the MinQuit (default = 8) and MaxIter (default = 24) parameters used during crossing minimization.
1270
- * These correspond to the number of tries without improvement before quitting and the maximum number of iterations in each pass.
1271
- *
1272
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:mclimit Node, Edge and Graph Attributes#mclimit}
1273
- * @graphvizType double
1274
- * @graphvizDefault 1
1275
- * @graphvizNotes dot only
1276
- * @graphvizUsedBy G
1277
- * @category Attribute
1278
- */
1279
- const mclimit = 'mclimit';
1280
- /**
1281
- * Specifies the minimum separation between all nodes.
1282
- *
1283
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:mindist Node, Edge and Graph Attributes#mindist}
1284
- * @graphvizType double
1285
- * @graphvizDefault 1
1286
- * @graphvizMinimum 0
1287
- * @graphvizNotes circo only
1288
- * @graphvizUsedBy G
1289
- * @category Attribute
1290
- */
1291
- const mindist = 'mindist';
1292
- /**
1293
- * Minimum edge length (rank difference between head and tail).
1294
- *
1295
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:minlen Node, Edge and Graph Attributes#minlen}
1296
- * @graphvizType int
1297
- * @graphvizDefault 1
1298
- * @graphvizMinimum 0
1299
- * @graphvizNotes dot only
1300
- * @graphvizUsedBy E
1301
- * @category Attribute
1302
- */
1303
- const minlen = 'minlen';
1304
- /**
1305
- * Technique for optimizing the layout.
1306
- * For neato, if **mode** is "major", neato uses stress majorization.
1307
- * If **mode** is "KK", neato uses a version of the gradient descent method.
1308
- * The only advantage to the latter technique is that it is sometimes appreciably faster for small (number of nodes < 100) graphs.
1309
- * A significant disadvantage is that it may cycle.
1310
- *
1311
- * There are two experimental modes in neato, "hier", which adds a top-down directionality similar to the layout used in dot, and "ipsep",
1312
- * which allows the graph to specify minimum vertical and horizontal distances between nodes. (See the {@link sep} attribute.)
1313
- *
1314
- * For sfdp, the default **mode** is "spring", which corresponds to using a spring-electrical model.
1315
- * Setting **mode** to "maxent" causes a similar model to be run but one that also takes into account edge lengths specified by the "len" attribute.
1316
- *
1317
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:mode Node, Edge and Graph Attributes#mode}
1318
- * @graphvizType string
1319
- * @graphvizDefault major
1320
- * @graphvizNotes neato only
1321
- * @graphvizUsedBy G
1322
- * @category Attribute
1323
- */
1324
- const mode = 'mode';
1325
- /**
1326
- * This value specifies how the distance matrix is computed for the input graph.
1327
- * The distance matrix specifies the ideal distance between every pair of nodes.
1328
- * neato attemps to find a layout which best achieves these distances.
1329
- * By default, it uses the length of the shortest path, where the length of each edge is given by its {@link len} attribute.
1330
- * If **model** is "circuit", neato uses the circuit resistance model to compute the distances.
1331
- * This tends to emphasize clusters.
1332
- * If **model** is "subset", neato uses the subset model.
1333
- * This sets the edge length to be the number of nodes that are neighbors of exactly one of the end points, and then calculates the shortest paths.
1334
- * This helps to separate nodes with high degree.
1335
- *
1336
- * For more control of distances, one can use model=mds.
1337
- * In this case, the {@link len} of an edge is used as the ideal distance between its vertices.
1338
- * A shortest path calculation is only used for pairs of nodes not connected by an edge.
1339
- * Thus, by supplying a complete graph, the input can specify all of the relevant distances.
1340
- *
1341
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:model Node, Edge and Graph Attributes#model}
1342
- * @graphvizType string
1343
- * @graphvizDefault shortpath
1344
- * @graphvizNotes neato only
1345
- * @graphvizUsedBy G
1346
- * @category Attribute
1347
- */
1348
- const model = 'model';
1349
- /**
1350
- * If Graphviz is built with MOSEK defined, mode=ipsep and mosek=true, the Mosek software (<www.mosek.com>) is use to solve the ipsep constraints.
1351
- *
1352
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:mosek Node, Edge and Graph Attributes#mosek}
1353
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
1354
- * @graphvizDefault FALSE
1355
- * @graphvizNotes neato only
1356
- * @graphvizUsedBy G
1357
- * @category Attribute
1358
- */
1359
- const mosek = 'mosek';
1360
- /**
1361
- * The original ranking algorithm in dot is recursive on clusters.
1362
- * This can produce fewer ranks and a more compact layout, but sometimes at the cost of a head node being place on a higher rank than the tail node.
1363
- * It also assumes that a node is not constrained in separate, incompatible subgraphs.
1364
- * For example, a node cannot be in a cluster and also be constrained by rank=same with a node not in the cluster.
1365
- *
1366
- * If newrank=true, the ranking algorithm does a single global ranking, ignoring clusters.
1367
- * This allows nodes to be subject to multiple constraints.
1368
- * Rank constraints will usually take precedence over edge constraints.
1369
- *
1370
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:newrank Node, Edge and Graph Attributes#newrank}
1371
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
1372
- * @graphvizDefault FALSE
1373
- * @graphvizNotes dot only
1374
- * @graphvizUsedBy G
1375
- * @category Attribute
1376
- */
1377
- const newrank = 'newrank';
1378
- /**
1379
- * In dot, this specifies the minimum space between two adjacent nodes in the same rank, in inches.
1380
- *
1381
- * For other layouts, this affects the spacing between loops on a single node, or multiedges between a pair of nodes.
1382
- *
1383
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:nodesep Node, Edge and Graph Attributes#nodesep}
1384
- * @graphvizType double
1385
- * @graphvizDefault 0.25
1386
- * @graphvizMinimum 0.02
1387
- * @graphvizUsedBy G
1388
- * @category Attribute
1389
- */
1390
- const nodesep = 'nodesep';
1391
- /**
1392
- * By default, the justification of multi-line labels is done within the largest context that makes sense.
1393
- * Thus, in the label of a polygonal node, a left-justified line will align with the left side of the node (shifted by the prescribed {@link margin}).
1394
- * In record nodes, left-justified line will line up with the left side of the enclosing column of fields.
1395
- * If **nojustify** is "true", multi-line labels will be justified in the context of itself.
1396
- * For example, if the attribute is set, the first label line is long, and the second is shorter and left-justified, the second will align with the left-most character in the first line, regardless of how large the node might be.
1397
- *
1398
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:nojustify Node, Edge and Graph Attributes#nojustify}
1399
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
1400
- * @graphvizDefault FALSE
1401
- * @graphvizUsedBy GCNE
1402
- * @category Attribute
1403
- */
1404
- const nojustify = 'nojustify';
1405
- /**
1406
- * If set, normalize coordinates of final layout so that the first point is at the origin, and then rotate the layout so that the angle of the first edge is specified by the value of normalize in degrees.
1407
- * If normalize is not a number, it is evaluated as a bool, with true corresponding to 0 degrees.
1408
- * **NOTE**: Since the attribute is evaluated first as a number, 0 and 1 cannot be used for false and true.
1409
- *
1410
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:normalize Node, Edge and Graph Attributes#normalize}
1411
- * @graphvizType double/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
1412
- * @graphvizDefault FALSE
1413
- * @graphvizNotes not dot
1414
- * @graphvizUsedBy G
1415
- * @category Attribute
1416
- */
1417
- const normalize = 'normalize';
1418
- /**
1419
- * By default, the final layout is translated so that the lower-left corner of the bounding box is at the origin.
1420
- * This can be annoying if some nodes are pinned or if the user runs `neato -n`.
1421
- * To avoid this translation, set notranslate to true.
1422
- *
1423
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:notranslate Node, Edge and Graph Attributes#notranslate}
1424
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
1425
- * @graphvizDefault FALSE
1426
- * @graphvizNotes neato only
1427
- * @graphvizUsedBy G
1428
- * @category Attribute
1429
- */
1430
- const notranslate = 'notranslate';
1431
- /**
1432
- * Used to set number of iterations in network simplex applications.
1433
- * **nslimit** is used in computing node x coordinates, **nslimit1** for ranking nodes.
1434
- * If defined, # iterations = **nslimit(1)** * # nodes; otherwise, # iterations = MAXINT.
1435
- *
1436
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:nslimit Node, Edge and Graph Attributes#nslimit}
1437
- * @graphvizType double
1438
- * @graphvizNotes dot only
1439
- * @graphvizUsedBy G
1440
- * @category Attribute
1441
- */
1442
- const nslimit = 'nslimit';
1443
- /**
1444
- * Used to set number of iterations in network simplex applications.
1445
- * **nslimit** is used in computing node x coordinates, **nslimit1** for ranking nodes.
1446
- * If defined, # iterations = **nslimit(1)** * # nodes; otherwise, # iterations = MAXINT.
1447
- *
1448
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:nslimit1 Node, Edge and Graph Attributes#nslimit1}
1449
- * @graphvizType double
1450
- * @graphvizNotes dot only
1451
- * @graphvizUsedBy G
1452
- * @category Attribute
1453
- */
1454
- const nslimit1 = 'nslimit1';
1455
- /**
1456
- * Angle, in degrees, used to rotate polygon node shapes. For any number of polygon sides, 0 degrees rotation results in a flat base.
1457
- *
1458
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:ordering Node, Edge and Graph Attributes#ordering}
1459
- * @graphvizType string
1460
- * @graphvizDefault ""
1461
- * @graphvizNotes dot only
1462
- * @graphvizUsedBy GN
1463
- * @category Attribute
1464
- */
1465
- const ordering = 'ordering';
1466
- /**
1467
- * If "[lL]*", set graph orientation to landscape Used only if {@link rotate} is not defined.
1468
- *
1469
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:orientation Node, Edge and Graph Attributes#orientation}
1470
- * @graphvizType string
1471
- * @graphvizDefault ""
1472
- * @graphvizUsedBy G
1473
- * @category Attribute
1474
- */
1475
- const orientation = 'orientation';
1476
- /**
1477
- * Specify order in which nodes and edges are drawn.
1478
- *
1479
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:outputorder Node, Edge and Graph Attributes#outputorder}
1480
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:outputMode outputMode}
1481
- * @graphvizDefault breadthfirst
1482
- * @graphvizUsedBy G
1483
- * @category Attribute
1484
- */
1485
- const outputorder = 'outputorder';
1486
- /**
1487
- * Determines if and how node overlaps should be removed.
1488
- * Nodes are first enlarged using the {@link sep} attribute.
1489
- * If "true" , overlaps are retained.
1490
- * If the value is "scale", overlaps are removed by uniformly scaling in x and y.
1491
- * If the value converts to "false", and it is available, Prism, a proximity graph-based algorithm, is used to remove node overlaps.
1492
- * This can also be invoked explicitly with "overlap=prism".
1493
- * This technique starts with a small scaling up, controlled by the {@link overlap_scaling} attribute, which can remove a significant portion of the overlap.
1494
- * The prism option also accepts an optional non-negative integer suffix.
1495
- * This can be used to control the number of attempts made at overlap removal.
1496
- * By default, overlap="prism" is equivalent to overlap="prism1000".
1497
- * Setting overlap="prism0" causes only the scaling phase to be run.
1498
- *
1499
- * If Prism is not available, or the version of Graphviz is earlier than 2.28, "overlap=false" uses a Voronoi-based technique.
1500
- * This can always be invoked explicitly with "overlap=voronoi".
1501
- *
1502
- * If the value is "scalexy", x and y are separately scaled to remove overlaps.
1503
- *
1504
- * If the value is "compress", the layout will be scaled down as much as possible without introducing any overlaps, obviously assuming there are none to begin with.
1505
- *
1506
- * **N.B.**The remaining allowed values of overlap correspond to algorithms which, at present, can produce bad aspect ratios.
1507
- * In addition, we deprecate the use of the "ortho*" and "portho*".
1508
- *
1509
- * If the value is "vpsc", overlap removal is done as a quadratic optimization to minimize node displacement while removing node overlaps.
1510
- *
1511
- * If the value is "orthoxy" or "orthoyx", overlaps are moved by optimizing two constraint problems, one for the x axis and one for the y.
1512
- * The suffix indicates which axis is processed first. If the value is "ortho", the technique is similar to "orthoxy" except a heuristic is used to reduce the bias between the two passes.
1513
- * If the value is "ortho_yx", the technique is the same as "ortho", except the roles of x and y are reversed.
1514
- * The values "portho", "porthoxy", "porthoxy", and "portho_yx" are similar to the previous four, except only pseudo-orthogonal ordering is enforced.
1515
- *
1516
- * If the layout is done by neato with {@link mode}="ipsep", then one can use overlap=ipsep.
1517
- * In this case, the overlap removal constraints are incorporated into the layout algorithm itself.
1518
- * N.B. At present, this only supports one level of clustering.
1519
- *
1520
- * Except for fdp and sfdp, the layouts assume overlap="true" as the default.
1521
- * Fdp first uses a number of passes using a built-in, force-directed technique to try to remove overlaps.
1522
- * Thus, fdp accepts **overlap** with an integer prefix followed by a colon, specifying the number of tries.
1523
- * If there is no prefix, no initial tries will be performed.
1524
- * If there is nothing following a colon, none of the above methods will be attempted.
1525
- * By default, fdp uses overlap="9:prism".
1526
- * Note that overlap="true", overlap="0:true" and overlap="0:" all turn off all overlap removal.
1527
- *
1528
- * By default, sfdp uses `overlap="prism0"`.
1529
- *
1530
- * Except for the Voronoi and prism methods, all of these transforms preserve the orthogonal ordering of the original layout.
1531
- * That is, if the x coordinates of two nodes are originally the same, they will remain the same, and if the x coordinate of one node is originally less than the x coordinate of another, this relation will still hold in the transformed layout.
1532
- * The similar properties hold for the y coordinates.
1533
- * This is not quite true for the "porth*" cases.
1534
- * For these, orthogonal ordering is only preserved among nodes related by an edge.
1535
- *
1536
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:overlap Node, Edge and Graph Attributes#overlap}
1537
- * @graphvizType string/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
1538
- * @graphvizDefault TRUE
1539
- * @graphvizNotes not dot
1540
- * @graphvizUsedBy G
1541
- * @category Attribute
1542
- */
1543
- const overlap = 'overlap';
1544
- /**
1545
- * When overlap=prism, the layout is scaled by this factor, thereby removing a fair amount of node overlap,
1546
- * and making node overlap removal faster and better able to retain the graph's shape.
1547
- *
1548
- * If overlap_scaling is negative, the layout is scaled by -1*overlap_scaling times the average label size.
1549
- * If overlap_scaling is positive, the layout is scaled by overlap_scaling.
1550
- * If overlap_scaling is zero, no scaling is done.
1551
- *
1552
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:overlap_scaling Node, Edge and Graph Attributes#overlap_scaling}
1553
- * @graphvizType double
1554
- * @graphvizDefault -4
1555
- * @graphvizMinimum -1.00E+10
1556
- * @graphvizNotes prism only
1557
- * @graphvizUsedBy G
1558
- * @category Attribute
1559
- */
1560
- const overlap_scaling = 'overlap_scaling';
1561
- /**
1562
- * If true, the overlap removal algorithm will perform a compression pass to reduce the size of the layout.
1563
- *
1564
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:overlap_shrink Node, Edge and Graph Attributes#overlap_shrink}
1565
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
1566
- * @graphvizDefault TRUE
1567
- * @graphvizNotes prism only
1568
- * @graphvizUsedBy G
1569
- * @category Attribute
1570
- */
1571
- const overlap_shrink = 'overlap_shrink';
1572
- /**
1573
- * This is true if the value of pack is "true" (case-insensitive) or a non-negative integer.
1574
- * If true, each connected component of the graph is laid out separately, and then the graphs are packed together.
1575
- * If pack has an integral value, this is used as the size, in {@link points}, of a margin around each part; otherwise, a default margin of 8 is used.
1576
- * If pack is interpreted as false, the entire graph is laid out together.
1577
- * The granularity and method of packing is influenced by the {@link packmode} attribute.
1578
- *
1579
- * For layouts which always do packing, such a twopi, the **pack** attribute is just used to set the margin.
1580
- *
1581
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:pack Node, Edge and Graph Attributes#pack}
1582
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}/int
1583
- * @graphvizDefault FALSE
1584
- * @graphvizUsedBy G
1585
- * @category Attribute
1586
- */
1587
- const pack = 'pack';
1588
- /**
1589
- * This indicates how connected components should be packed (cf. {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:packMode packMode}).
1590
- * Note that defining {@link packmode} will automatically turn on packing as though one had set `pack=true`.
1591
- *
1592
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:packmode Node, Edge and Graph Attributes#packmode}
1593
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:packMode packMode}
1594
- * @graphvizDefault node
1595
- * @graphvizUsedBy G
1596
- * @category Attribute
1597
- */
1598
- const packmode = 'packmode';
1599
- /**
1600
- * The pad attribute specifies how much, in inches, to extend the drawing area around the minimal area needed to draw the graph.
1601
- * If the pad is a single double, both the x and y pad values are set equal to the given value.
1602
- * This area is part of the drawing and will be filled with the background color, if appropriate.
1603
- *
1604
- * Normally, a small pad is used for aesthetic reasons, especially when a background color is used,
1605
- * to avoid having nodes and edges abutting the boundary of the drawn region.
1606
- *
1607
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:pad Node, Edge and Graph Attributes#pad}
1608
- * @graphvizType double/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:point point}
1609
- * @graphvizDefault 0.0555 (4 points)
1610
- * @graphvizUsedBy G
1611
- * @category Attribute
1612
- */
1613
- const pad = 'pad';
1614
- /**
1615
- * Width and height of output pages, in inches.
1616
- * If only a single value is given, this is used for both the width and height.
1617
- *
1618
- * If this is set and is smaller than the size of the layout,
1619
- * a rectangular array of pages of the specified page size is overlaid on the layout,
1620
- * with origins aligned in the lower-left corner, thereby partitioning the layout into pages.
1621
- * The pages are then produced one at a time, in {@link pagedir} order.
1622
- *
1623
- * At present, this only works for PostScript output.
1624
- * For other types of output, one should use another tool to split the output into multiple output files.
1625
- * Or use the {@link viewport} to generate multiple files.
1626
- *
1627
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:page Node, Edge and Graph Attributes#page}
1628
- * @graphvizType double/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:point point}
1629
- * @graphvizUsedBy G
1630
- * @category Attribute
1631
- */
1632
- const page = 'page';
1633
- /**
1634
- * If the page attribute is set and applicable, this attribute specifies the order in which the pages are emitted. This is limited to one of the 8 row or column major orders.
1635
- *
1636
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:pagedir Node, Edge and Graph Attributes#pagedir}
1637
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:pagedir pagedir}
1638
- * @graphvizDefault BL
1639
- * @graphvizUsedBy G
1640
- * @category Attribute
1641
- */
1642
- const pagedir = 'pagedir';
1643
- /**
1644
- * Color used to draw the bounding box around a cluster.
1645
- * If **pencolor** is not defined, {@link color} is used.
1646
- * If this is not defined, {@link bgcolor} is used.
1647
- * If this is not defined, the default is used.
1648
- *
1649
- * Note that a cluster inherits the root graph's attributes if defined.
1650
- * Thus, if the root graph has defined a **pencolor**, this will override a **color** or **bgcolor** attribute set for the cluster.
1651
- *
1652
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:pagedir Node, Edge and Graph Attributes#pagedir}
1653
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:color color}
1654
- * @graphvizDefault black
1655
- * @graphvizUsedBy C
1656
- * @category Attribute
1657
- */
1658
- const pencolor = 'pencolor';
1659
- /**
1660
- * Specifies the width of the pen, in points, used to draw lines and curves, including the boundaries of edges and clusters.
1661
- * The value is inherited by subclusters.
1662
- * It has no effect on text.
1663
- *
1664
- * Previous to 31 January 2008, the effect of penwidth=W was achieved by including setlinewidth(W) as part of a {@link style} specification.
1665
- * If both are used, penwidth will be used.
1666
- *
1667
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:penwidth Node, Edge and Graph Attributes#penwidth}
1668
- * @graphvizType double
1669
- * @graphvizDefault 1
1670
- * @graphvizMinimum 0
1671
- * @graphvizUsedBy CNE
1672
- * @category Attribute
1673
- */
1674
- const penwidth = 'penwidth';
1675
- /**
1676
- * Set number of peripheries used in polygonal shapes and cluster boundaries.
1677
- * Note that {@link https://graphviz.gitlab.io/_pages/doc/info/shapes.html#epsf user-defined shapes} are treated as a form of box shape, so the default peripheries value is 1 and the user-defined shape will be drawn in a bounding rectangle.
1678
- * Setting peripheries=0 will turn this off.
1679
- * Also, 1 is the maximum peripheries value for clusters.
1680
- *
1681
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:peripheries Node, Edge and Graph Attributes#peripheries}
1682
- * @graphvizType int
1683
- * @graphvizDefault
1684
- * shape default(nodes)
1685
- * 1(clusters)
1686
- * @graphvizMinimum 0
1687
- * @graphvizUsedBy NC
1688
- * @category Attribute
1689
- */
1690
- const peripheries = 'peripheries';
1691
- /**
1692
- * If true and the node has a pos attribute on input, neato or fdp prevents the node from moving from the input position.
1693
- * This property can also be specified in the pos attribute itself (cf. the {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:point point} type).
1694
- *
1695
- * Note: Due to an artifact of the implementation, previous to 27 Feb 2014, final coordinates are translated to the origin.
1696
- * Thus, if you look at the output coordinates given in the (x)dot or plain format, pinned nodes will not have the same output coordinates as were given on input.
1697
- * If this is important, a simple workaround is to maintain the coordinates of a pinned node.
1698
- * The vector difference between the old and new coordinates will give the translation, which can then be subtracted from all of the appropriate coordinates.
1699
- *
1700
- * After 27 Feb 2014, this translation can be avoided in neato by setting the {@link notranslate} to TRUE.
1701
- * However, if the graph specifies {@link overlap node overlap removal} or a change in {@link ratio aspect ratio}, node coordinates may still change.
1702
- *
1703
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:pin Node, Edge and Graph Attributes#pin}
1704
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
1705
- * @graphvizDefault FALSE
1706
- * @graphvizNotes fdp, neato only
1707
- * @graphvizUsedBy N
1708
- * @category Attribute
1709
- */
1710
- const pin = 'pin';
1711
- /**
1712
- * Position of node, or spline control points.
1713
- * For nodes, the position indicates the center of the node.
1714
- * On output, the coordinates are in {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#points points}.
1715
- *
1716
- * In neato and fdp, pos can be used to set the initial position of a node.
1717
- * By default, the coordinates are assumed to be in inches.
1718
- * However, the {@link https://graphviz.gitlab.io/_pages/doc/info/command.html#d:s -s} command line flag can be used to specify different units.
1719
- * As the output coordinates are in points, feeding the output of a graph laid out by a Graphviz program into neato or fdp will almost always require the -s flag.
1720
- *
1721
- * When the {@link https://graphviz.gitlab.io/_pages/doc/info/command.html#d:n -n} command line flag is used with neato,
1722
- * it is assumed the positions have been set by one of the layout programs, and are therefore in points.
1723
- * Thus, neato -n can accept input correctly without requiring a -s flag and, in fact, ignores any such flag.
1724
- *
1725
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:pos Node, Edge and Graph Attributes#pos}
1726
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:point point}/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:smoothType splineType}
1727
- * @graphvizUsedBy EN
1728
- * @category Attribute
1729
- */
1730
- const pos = 'pos';
1731
- /**
1732
- * Quadtree scheme to use.
1733
- *
1734
- * A TRUE bool value corresponds to "normal"; a FALSE bool value corresponds to "none".
1735
- * As a slight exception to the normal interpretation of bool, a value of "2" corresponds to "fast".
1736
- *
1737
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:quadtree Node, Edge and Graph Attributes#quadtree}
1738
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:quadType quadType}/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
1739
- * @graphvizDefault normal
1740
- * @graphvizNotes sfdp only
1741
- * @graphvizUsedBy G
1742
- * @category Attribute
1743
- */
1744
- const quadtree = 'quadtree';
1745
- /**
1746
- * If **quantum** > 0.0, node label dimensions will be rounded to integral multiples of the quantum.
1747
- *
1748
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:quantum Node, Edge and Graph Attributes#quantum}
1749
- * @graphvizType double
1750
- * @graphvizDefault 0
1751
- * @graphvizMinimum 0
1752
- * @graphvizUsedBy G
1753
- * @category Attribute
1754
- */
1755
- const quantum = 'quantum';
1756
- /**
1757
- * Rank constraints on the nodes in a subgraph.
1758
- * If **rank**="same", all nodes are placed on the same rank.
1759
- * If **rank**="min", all nodes are placed on the minimum rank.
1760
- * If **rank**="source", all nodes are placed on the minimum rank, and the only nodes on the minimum rank belong to some subgraph whose rank attribute is "source" or "min".
1761
- * Analogous criteria hold for rank="max" and rank="sink".
1762
- * (Note: the minimum rank is topmost or leftmost, and the maximum rank is bottommost or rightmost.)
1763
- *
1764
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:rank Node, Edge and Graph Attributes#rank}
1765
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:rankType rankType}
1766
- * @graphvizNotes dot only
1767
- * @graphvizUsedBy S
1768
- * @category Attribute
1769
- */
1770
- const rank = 'rank';
1771
- /**
1772
- * Sets direction of graph layout.
1773
- * For example, if **rankdir**="LR", and barring cycles, an edge T -> H; will go from left to right.
1774
- * By default, graphs are laid out from top to bottom.
1775
- *
1776
- * This attribute also has a side-effect in determining how record nodes are interpreted.
1777
- * See {@link https://graphviz.gitlab.io/_pages/doc/info/shapes.html#record record shapes}.
1778
- *
1779
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:rankdir Node, Edge and Graph Attributes#rankdir}
1780
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:rankdir rankdir}
1781
- * @graphvizDefault TB
1782
- * @graphvizNotes dot only
1783
- * @graphvizUsedBy G
1784
- * @category Attribute
1785
- */
1786
- const rankdir = 'rankdir';
1787
- /**
1788
- * In dot, this gives the desired rank separation, in inches.
1789
- * This is the minimum vertical distance between the bottom of the nodes in one rank and the tops of nodes in the next.
1790
- * If the value contains "equally", the centers of all ranks are spaced equally apart.
1791
- * Note that both settings are possible, e.g., ranksep = "1.2 equally".
1792
- *
1793
- * In twopi, this attribute specifies the radial separation of concentric circles.
1794
- * For twopi, ranksep can also be a list of doubles.
1795
- * The first double specifies the radius of the inner circle; the second double specifies the increase in radius from the first circle to the second; etc.
1796
- * If there are more circles than numbers, the last number is used as the increment for the remainder.
1797
- *
1798
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:ranksep Node, Edge and Graph Attributes#ranksep}
1799
- * @graphvizType double/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:doubleList doubleList}
1800
- * @graphvizDefault
1801
- * 0.5(dot)
1802
- * 1.0(twopi)
1803
- * @graphvizMinimum 0.02
1804
- * @graphvizNotes twopi, dot only
1805
- * @graphvizUsedBy G
1806
- * @category Attribute
1807
- */
1808
- const ranksep = 'ranksep';
1809
- /**
1810
- * Sets the aspect ratio (drawing height/drawing width) for the drawing.
1811
- * Note that this is adjusted before the {@link size} attribute constraints are enforced.
1812
- * In addition, the calculations usually ignore the node sizes, so the final drawing size may only approximate what is desired.
1813
- *
1814
- * If **ratio** is numeric, it is taken as the desired aspect ratio.
1815
- * Then, if the actual aspect ratio is less than the desired ratio, the drawing height is scaled up to achieve the desired ratio;
1816
- * if the actual ratio is greater than that desired ratio, the drawing width is scaled up.
1817
- *
1818
- * If **ratio** = "fill" and the {@link size} attribute is set, node positions are scaled, separately in both x and y, so that the final drawing exactly fills the specified size.
1819
- * If both {@link size} values exceed the width and height of the drawing, then both coordinate values of each node are scaled up accordingly.
1820
- * However, if either size dimension is smaller than the corresponding dimension in the drawing, one dimension is scaled up so that the final drawing has the same aspect ratio as specified by {@link size}.
1821
- * Then, when rendered, the layout will be scaled down uniformly in both dimensions to fit the given {@link size}, which may cause nodes and text to shrink as well.
1822
- * This may not be what the user wants, but it avoids the hard problem of how to reposition the nodes in an acceptable fashion to reduce the drawing size.
1823
- *
1824
- * If **** = "compress" and the {@link size} attribute is set, dot attempts to compress the initial layout to fit in the given size.
1825
- * This achieves a tighter packing of nodes but reduces the balance and symmetry.
1826
- * This feature only works in dot.
1827
- *
1828
- * If **** = "expand", the {@link size} attribute is set, and both the width and the height of the graph are less than the value in {@link size},
1829
- * node positions are scaled uniformly until at least one dimension fits {@link size} exactly.
1830
- * Note that this is distinct from using {@link size} as the desired size, as here the drawing is expanded before edges are generated and all node and text sizes remain unchanged.
1831
- *
1832
- * If **** = "auto", the {@link page} attribute is set and the graph cannot be drawn on a single page, then {@link size} is set to an ``ideal'' value.
1833
- * In particular, the size in a given dimension will be the smallest integral multiple of the page size in that dimension which is at least half the current size.
1834
- * The two dimensions are then scaled independently to the new size.
1835
- * This feature only works in dot.
1836
- *
1837
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:ratio Node, Edge and Graph Attributes#ratio}
1838
- * @graphvizType double/string
1839
- * @graphvizUsedBy G
1840
- * @category Attribute
1841
- */
1842
- const ratio = 'ratio';
1843
- /**
1844
- * Rectangles for fields of records,
1845
- * {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#points in points}.
1846
- *
1847
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:rects Node, Edge and Graph Attributes#rects}
1848
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:rect rect}
1849
- * @graphvizNotes write only
1850
- * @graphvizUsedBy N
1851
- * @category Attribute
1852
- */
1853
- const rects = 'rects';
1854
- /**
1855
- * If true, force polygon to be regular, i.e.,
1856
- * the vertices of the polygon will lie on a circle whose center is the center of the node.
1857
- *
1858
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:regular Node, Edge and Graph Attributes#regular}
1859
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
1860
- * @graphvizDefault FALSE
1861
- * @graphvizUsedBy N
1862
- * @category Attribute
1863
- */
1864
- const regular = 'regular';
1865
- /**
1866
- * If true and there are multiple clusters, run crossing minimization a second time.
1867
- *
1868
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:remincross Node, Edge and Graph Attributes#remincross}
1869
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
1870
- * @graphvizDefault TRUE
1871
- * @graphvizNotes dot only
1872
- * @graphvizUsedBy G
1873
- * @category Attribute
1874
- */
1875
- const remincross = 'remincross';
1876
- /**
1877
- * The power of the repulsive force used in an extended Fruchterman-Reingold force directed model.
1878
- * Values larger than 1 tend to reduce the warping effect at the expense of less clustering.
1879
- *
1880
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:repulsiveforce Node, Edge and Graph Attributes#repulsiveforce}
1881
- * @graphvizType double
1882
- * @graphvizDefault 1
1883
- * @graphvizMinimum 0
1884
- * @graphvizNotes sfdp only
1885
- * @graphvizUsedBy G
1886
- * @category Attribute
1887
- */
1888
- const repulsiveforce = 'repulsiveforce';
1889
- /**
1890
- * This is a synonym for the {@link dpi} attribute.
1891
- *
1892
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:resolution Node, Edge and Graph Attributes#resolution}
1893
- * @graphvizType double
1894
- * @graphvizDefault
1895
- * 96.0
1896
- * 0.0"
1897
- * @graphvizNotes svg, bitmap output only
1898
- * @graphvizUsedBy G
1899
- * @category Attribute
1900
- */
1901
- const resolution = 'resolution';
1902
- /**
1903
- * This specifies nodes to be used as the center of the layout and the root of the generated spanning tree.
1904
- * As a graph attribute, this gives the name of the node.
1905
- * As a node attribute, it specifies that the node should be used as a central node.
1906
- * In twopi, this will actually be the central node.
1907
- * In circo, the block containing the node will be central in the drawing of its connected component.
1908
- * If not defined, twopi will pick a most central node, and circo will pick a random node.
1909
- *
1910
- * If the root attribute is defined as the empty string, twopi will reset it to name of the node picked as the root node.
1911
- *
1912
- * For twopi, it is possible to have multiple roots, presumably one for each component.
1913
- * If more than one node in a component is marked as the root, twopi will pick one.
1914
- *
1915
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:root Node, Edge and Graph Attributes#root}
1916
- * @graphvizType string/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
1917
- * @graphvizDefault
1918
- * <none>(graphs)
1919
- * false(nodes)
1920
- * @graphvizMinimum
1921
- * @graphvizNotes circo, twopi only
1922
- * @graphvizUsedBy GN
1923
- * @category Attribute
1924
- */
1925
- const root = 'root';
1926
- /**
1927
- * If 90, set drawing orientation to landscape.
1928
- *
1929
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:rotate Node, Edge and Graph Attributes#rotate}
1930
- * @graphvizType int
1931
- * @graphvizDefault 0
1932
- * @graphvizUsedBy G
1933
- * @category Attribute
1934
- */
1935
- const rotate = 'rotate';
1936
- /**
1937
- * Causes the final layout to be rotated counter-clockwise by the specified number of degrees.
1938
- *
1939
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:rotation Node, Edge and Graph Attributes#rotation}
1940
- * @graphvizType double
1941
- * @graphvizDefault 0
1942
- * @graphvizNotes sfdp only
1943
- * @graphvizUsedBy G
1944
- * @category Attribute
1945
- */
1946
- const rotation = 'rotation';
1947
- /**
1948
- * Edges with the same head and the same **samehead** value are aimed at the same point on the head.
1949
- * This has no effect on loops.
1950
- * Each node can have at most 5 unique samehead values.
1951
- * See {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#h:undir_note limitation}.
1952
- *
1953
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:samehead Node, Edge and Graph Attributes#samehead}
1954
- * @graphvizType string
1955
- * @graphvizDefault ""
1956
- * @graphvizNotes dot only
1957
- * @graphvizUsedBy E
1958
- * @category Attribute
1959
- */
1960
- const samehead = 'samehead';
1961
- /**
1962
- * Edges with the same tail and the same sametail value are aimed at the same point on the tail.
1963
- * This has no effect on loops.
1964
- * Each node can have at most 5 unique sametail values.
1965
- * See {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#h:undir_note limitation}.
1966
- *
1967
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:sametail Node, Edge and Graph Attributes#sametail}
1968
- * @graphvizType string
1969
- * @graphvizDefault ""
1970
- * @graphvizNotes dot only
1971
- * @graphvizUsedBy E
1972
- * @category Attribute
1973
- */
1974
- const sametail = 'sametail';
1975
- /**
1976
- * If the input graph defines the {@link vertices} attribute, and output is dot or xdot, this gives the number of points used for a node whose shape is a circle or ellipse.
1977
- * It plays the same role in neato, when adjusting the layout to avoid overlapping nodes, and in image maps.
1978
- *
1979
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:samplepoints Node, Edge and Graph Attributes#samplepoints}
1980
- * @graphvizType int
1981
- * @graphvizDefault
1982
- * 8(output)
1983
- * 20(overlap and image maps)
1984
- * @graphvizUsedBy N
1985
- * @category Attribute
1986
- */
1987
- const samplepoints = 'samplepoints';
1988
- /**
1989
- * If set, after the initial layout, the layout is scaled by the given factors.
1990
- * If only a single number is given, this is used for both factors.
1991
- *
1992
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:scale Node, Edge and Graph Attributes#scale}
1993
- * @graphvizType double/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:point point}
1994
- * @graphvizNotes not dot
1995
- * @graphvizUsedBy G
1996
- * @category Attribute
1997
- */
1998
- const scale = 'scale';
1999
- /**
2000
- * During network simplex, maximum number of edges with negative cut values to search when looking for one with minimum cut value.
2001
- *
2002
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:searchsize Node, Edge and Graph Attributes#searchsize}
2003
- * @graphvizType int
2004
- * @graphvizDefault 30
2005
- * @graphvizNotes dot only
2006
- * @graphvizUsedBy G
2007
- * @category Attribute
2008
- */
2009
- const searchsize = 'searchsize';
2010
- /**
2011
- * Specifies margin to leave around nodes when removing node overlap.
2012
- * This guarantees a minimal non-zero distance between nodes.
2013
- *
2014
- * If the attribute begins with a plus sign '+', an additive margin is specified.
2015
- * That is, "+w,h" causes the node's bounding box to be increased by w points on the left and right sides, and by h points on the top and bottom.
2016
- * Without a plus sign, the node is scaled by 1 + w in the x coordinate and 1 + h in the y coordinate.
2017
- *
2018
- * If only a single number is given, this is used for both dimensions.
2019
- *
2020
- * If unset but {@link esep} is defined, the sep values will be set to the esep values divided by 0.8. If esep is unset, the default value is used.
2021
- *
2022
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:sep Node, Edge and Graph Attributes#sep}
2023
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:addDouble addDouble}/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:addPoint addPoint}
2024
- * @graphvizDefault 4
2025
- * @graphvizNotes not dot
2026
- * @graphvizUsedBy G
2027
- * @category Attribute
2028
- */
2029
- const sep = 'sep';
2030
- /**
2031
- * Set the shape of a node.
2032
- *
2033
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:shape Node, Edge and Graph Attributes#shape}
2034
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:shape shape}
2035
- * @graphvizDefault ellipse
2036
- * @graphvizUsedBy N
2037
- * @category Attribute
2038
- */
2039
- const shape = 'shape';
2040
- /**
2041
- * (Deprecated) If defined, shapefile specifies a file containing user-supplied node content.
2042
- * The {@link shape} of the node is set to box.
2043
- * The image in the shapefile must be rectangular.
2044
- * The image formats supported as well as the precise semantics of how the file is used depends on the {@link https://graphviz.gitlab.io/_pages/doc/info/output.html output format}.
2045
- * For further details, see {@link https://graphviz.gitlab.io/_pages/doc/info/output.html#d:image_fmts Image Formats} and {@link https://graphviz.gitlab.io/faq/#ext_image External PostScript files}.
2046
- *
2047
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:shapefile Node, Edge and Graph Attributes#shapefile}
2048
- * @graphvizType string
2049
- * @graphvizDefault ""
2050
- * @graphvizUsedBy N
2051
- * @deprecated
2052
- * @category Attribute
2053
- */
2054
- const shapefile = 'shapefile';
2055
- /**
2056
- * Print guide boxes in PostScript at the beginning of routesplines if 1, or at the end if 2. (Debugging)
2057
- *
2058
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:showboxes Node, Edge and Graph Attributes#showboxes}
2059
- * @graphvizType int
2060
- * @graphvizDefault 0
2061
- * @graphvizMinimum 0
2062
- * @graphvizNotes dot only
2063
- * @graphvizUsedBy ENG
2064
- * @category Attribute
2065
- */
2066
- const showboxes = 'showboxes';
2067
- /**
2068
- * Number of sides if {@link shape}=polygon.
2069
- *
2070
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:sides Node, Edge and Graph Attributes#sides}
2071
- * @graphvizType int
2072
- * @graphvizDefault 4
2073
- * @graphvizMinimum 0
2074
- * @graphvizUsedBy N
2075
- * @category Attribute
2076
- */
2077
- const sides = 'sides';
2078
- /**
2079
- * Maximum width and height of drawing, in inches.
2080
- * If only a single number is given, this is used for both the width and the height.
2081
- *
2082
- * If defined and the drawing is larger than the given size, the drawing is uniformly scaled down so that it fits within the given size.
2083
- *
2084
- * If size ends in an exclamation point (!), then it is taken to be the desired size. In this case, if both dimensions of the drawing are less than size, the drawing is scaled up uniformly until at least one dimension equals its dimension in size.
2085
- *
2086
- * Note that there is some interaction between the **size** and {@link ratio} attributes.
2087
- *
2088
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:size Node, Edge and Graph Attributes#size}
2089
- * @graphvizType double/{@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:point point}
2090
- * @graphvizUsedBy G
2091
- * @category Attribute
2092
- */
2093
- const size = 'size';
2094
- /**
2095
- * Skew factor for {@link shape}=polygon. Positive values skew top of polygon to right; negative to left.
2096
- *
2097
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:skew Node, Edge and Graph Attributes#skew}
2098
- * @graphvizType double
2099
- * @graphvizDefault 0
2100
- * @graphvizMinimum -100
2101
- * @graphvizUsedBy N
2102
- * @category Attribute
2103
- */
2104
- const skew = 'skew';
2105
- /**
2106
- * Specifies a post-processing step used to smooth out an uneven distribution of nodes.
2107
- *
2108
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:smoothing Node, Edge and Graph Attributes#smoothing}
2109
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:smoothType smoothType}
2110
- * @graphvizDefault "none"
2111
- * @graphvizNotes sfdp only
2112
- * @graphvizUsedBy G
2113
- * @category Attribute
2114
- */
2115
- const smoothing = 'smoothing';
2116
- /**
2117
- * If {@link packmode} indicates an array packing, this attribute specifies an insertion order among the components,
2118
- * with smaller values inserted first.
2119
- *
2120
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:sortv Node, Edge and Graph Attributes#sortv}
2121
- * @graphvizType int
2122
- * @graphvizDefault 0
2123
- * @graphvizMinimum 0
2124
- * @graphvizUsedBy GCN
2125
- * @category Attribute
2126
- */
2127
- const sortv = 'sortv';
2128
- /**
2129
- * Controls how, and if, edges are represented.
2130
- * If true, edges are drawn as splines routed around nodes; if false, edges are drawn as line segments.
2131
- * If set to none or "", no edges are drawn at all.
2132
- *
2133
- * (1 March 2007) The values line and spline can be used as synonyms for false and true, respectively. In addition, the value polyline specifies that edges should be drawn as polylines.
2134
- *
2135
- * (28 Sep 2010) The value ortho specifies edges should be routed as polylines of axis-aligned segments. Currently, the routing does not handle ports or, in dot, edge labels.
2136
- *
2137
- * (25 Sep 2012) The value curved specifies edges should be drawn as curved arcs.
2138
- *
2139
- * | | |
2140
- * |------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
2141
- * | ![spline_none](https://graphviz.gitlab.io/_pages/doc/info/spline_none.png) | ![spline_line](https://graphviz.gitlab.io/_pages/doc/info/spline_line.png) |
2142
- * | `splines=none` | `splines=line` |
2143
- * | `splines=""` | `splines=false` |
2144
- * | ![spline_polyline](https://graphviz.gitlab.io/_pages/doc/info/spline_polyline.png) | ![spline_curved](https://graphviz.gitlab.io/_pages/doc/info/spline_curved.png) |
2145
- * | `splines=polyline` | `splines=curved` |
2146
- * | ![spline_ortho](https://graphviz.gitlab.io/_pages/doc/info/spline_ortho.png) | ![spline_spline](https://graphviz.gitlab.io/_pages/doc/info/spline_spline.png) |
2147
- * | `splines=ortho` | `splines=spline` |
2148
- * | | `splines=true` |
2149
- *
2150
- * By default, the attribute is unset. How this is interpreted depends on the layout. For dot,
2151
- * the default is to draw edges as splines. For all other layouts,
2152
- * the default is to draw edges as line segments.
2153
- * Note that for these latter layouts, if splines="true", this requires non-overlapping nodes (cf. {@link overlap}). If fdp is used for layout and splines="compound",
2154
- * then the edges are drawn to avoid clusters as well as nodes.
2155
- *
2156
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:splines Node, Edge and Graph Attributes#splines}
2157
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}/string
2158
- * @graphvizUsedBy G
2159
- * @category Attribute
2160
- */
2161
- const splines = 'splines';
2162
- /**
2163
- * Parameter used to determine the initial layout of nodes.
2164
- * If unset, the nodes are randomly placed in a unit square with the same seed is always used for the random number generator, so the initial placement is repeatable.
2165
- *
2166
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:start Node, Edge and Graph Attributes#start}
2167
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:startType startType}
2168
- * @graphvizDefault ""
2169
- * @graphvizNotes fdp, neato only
2170
- * @graphvizUsedBy G
2171
- * @category Attribute
2172
- */
2173
- const start = 'start';
2174
- /**
2175
- * Set style information for components of the graph.
2176
- * For cluster subgraphs, if style="filled", the cluster box's background is filled.
2177
- *
2178
- * If the default style attribute has been set for a component, an individual component can use style="" to revert to the normal default.
2179
- * For example, if the graph has
2180
- *
2181
- * ```
2182
- * edge [style="invis"]
2183
- * ```
2184
- *
2185
- * making all edges invisible, a specific edge can overrride this via:
2186
- *
2187
- * ```
2188
- * a -> b [style=""]
2189
- * ```
2190
- *
2191
- * Of course, the component can also explicitly set its style attribute to the desired value.
2192
- *
2193
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:style Node, Edge and Graph Attributes#style}
2194
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:style style}
2195
- * @graphvizDefault ""
2196
- * @graphvizUsedBy ENCG
2197
- * @category Attribute
2198
- */
2199
- const style = 'style';
2200
- /**
2201
- * A URL or pathname specifying an XML style sheet, used in SVG output.
2202
- *
2203
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:stylesheet Node, Edge and Graph Attributes#stylesheet}
2204
- * @graphvizType string
2205
- * @graphvizDefault ""
2206
- * @graphvizNotes svg only
2207
- * @graphvizUsedBy G
2208
- * @category Attribute
2209
- */
2210
- const stylesheet = 'stylesheet';
2211
- /**
2212
- * If **tailURL** is defined, it is output as part of the tail label of the edge.
2213
- * Also, this value is used near the tail node, overriding any {@link URL} value.
2214
- * See {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#h:undir_note limitation}.
2215
- *
2216
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:tailURL Node, Edge and Graph Attributes#tailURL}
2217
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
2218
- * @graphvizDefault ""
2219
- * @graphvizNotes svg, map only
2220
- * @graphvizUsedBy E
2221
- * @category Attribute
2222
- */
2223
- const tailURL = 'tailURL';
2224
- /**
2225
- * Position of an edge's tail label, {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#points in points}.
2226
- * The position indicates the center of the label.
2227
- *
2228
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:tail_lp Node, Edge and Graph Attributes#tail_lp}
2229
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:point point}
2230
- * @graphvizNotes write only
2231
- * @graphvizUsedBy E
2232
- * @category Attribute
2233
- */
2234
- const tail_lp = 'tail_lp';
2235
- /**
2236
- * If true, the tail of an edge is clipped to the boundary of the tail node; otherwise,
2237
- * the end of the edge goes to the center of the node, or the center of a port, if applicable.
2238
- *
2239
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:tailclip Node, Edge and Graph Attributes#tailclip}
2240
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
2241
- * @graphvizDefault TRUE
2242
- * @graphvizUsedBy E
2243
- * @category Attribute
2244
- */
2245
- const tailclip = 'tailclip';
2246
- /**
2247
- * Synonym for {@link tailURL}.
2248
- *
2249
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:tailhref Node, Edge and Graph Attributes#tailhref}
2250
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
2251
- * @graphvizDefault ""
2252
- * @graphvizNotes svg, map only
2253
- * @graphvizUsedBy E
2254
- * @category Attribute
2255
- */
2256
- const tailhref = 'tailhref';
2257
- /**
2258
- * Text label to be placed near tail of edge.
2259
- * See {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#h:undir_note limitation}.
2260
- *
2261
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:taillabel Node, Edge and Graph Attributes#taillabel}
2262
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:lblString lblString}
2263
- * @graphvizDefault ""
2264
- * @graphvizUsedBy E
2265
- * @category Attribute
2266
- */
2267
- const taillabel = 'taillabel';
2268
- /**
2269
- * Indicates where on the tail node to attach the tail of the edge.
2270
- * See {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#h:undir_note limitation}.
2271
- *
2272
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:tailport Node, Edge and Graph Attributes#tailport}
2273
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:portPos portPos}
2274
- * @graphvizDefault center
2275
- * @graphvizUsedBy E
2276
- * @category Attribute
2277
- */
2278
- const tailport = 'tailport';
2279
- /**
2280
- * If the edge has a {@link tailURL}, this attribute determines which window of the browser is used for the URL.
2281
- * Setting it to "_graphviz" will open a new window if it doesn't already exist, or reuse it if it does.
2282
- * If undefined, the value of the {@link target} is used.
2283
- *
2284
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:tailtarget Node, Edge and Graph Attributes#tailtarget}
2285
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
2286
- * @graphvizDefault <none>
2287
- * @graphvizNotes svg, map only
2288
- * @graphvizUsedBy E
2289
- * @category Attribute
2290
- */
2291
- const tailtarget = 'tailtarget';
2292
- /**
2293
- * Tooltip annotation attached to the tail of an edge.
2294
- * This is used only if the edge has a {@link tailURL} attribute.
2295
- *
2296
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:tailtooltip Node, Edge and Graph Attributes#tailtooltip}
2297
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
2298
- * @graphvizDefault ""
2299
- * @graphvizNotes svg, cmap only
2300
- * @graphvizUsedBy E
2301
- * @category Attribute
2302
- */
2303
- const tailtooltip = 'tailtooltip';
2304
- /**
2305
- * If the object has a URL, this attribute determines which window of the browser is used for the URL.
2306
- * See {@link http://www.w3.org/TR/html401/present/frames.html#adef-target W3C documentation}.
2307
- *
2308
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:target Node, Edge and Graph Attributes#target}
2309
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}/string
2310
- * @graphvizDefault <none>
2311
- * @graphvizNotes svg, map only
2312
- * @graphvizUsedBy ENGC
2313
- * @category Attribute
2314
- */
2315
- const target = 'target';
2316
- /**
2317
- * Tooltip annotation attached to the node or edge.
2318
- * If unset, Graphviz will use the object's {@link label} if defined.
2319
- * Note that if the label is a record specification or an HTML-like label, the resulting tooltip may be unhelpful.
2320
- * In this case, if tooltips will be generated, the user should set a tooltip attribute explicitly.
2321
- *
2322
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:tooltip Node, Edge and Graph Attributes#tooltip}
2323
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString escString}
2324
- * @graphvizDefault ""
2325
- * @graphvizNotes svg, cmap only
2326
- * @graphvizUsedBy NEC
2327
- * @category Attribute
2328
- */
2329
- const tooltip = 'tooltip';
2330
- /**
2331
- * If set explicitly to true or false, the value determines whether or not internal bitmap rendering relies on a truecolor color model or uses a color palette.
2332
- * If the attribute is unset, truecolor is not used unless there is a {@link shapefile} property for some node in the graph.
2333
- * The output model will use the input model when possible.
2334
- *
2335
- * Use of color palettes results in less memory usage during creation of the bitmaps and smaller output files.
2336
- *
2337
- * Usually, the only time it is necessary to specify the truecolor model is if the graph uses more than 256 colors.
2338
- * However, if one uses bgcolor=transparent with a color palette, font antialiasing can show up as a fuzzy white area around characters.
2339
- * Using **truecolor**=true avoids this problem.
2340
- *
2341
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:truecolor Node, Edge and Graph Attributes#truecolor}
2342
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:bool bool}
2343
- * @graphvizNotes bitmap output only
2344
- * @graphvizUsedBy G
2345
- * @category Attribute
2346
- */
2347
- const truecolor = 'truecolor';
2348
- /**
2349
- * If the input graph defines this attribute, the node is polygonal, and output is dot or xdot, this attribute provides the coordinates of the vertices of the node's polygon, in inches.
2350
- * If the node is an ellipse or circle, the {@link samplepoints} attribute affects the output.
2351
- *
2352
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:vertices Node, Edge and Graph Attributes#vertices}
2353
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:pointList pointList}
2354
- * @graphvizNotes write only
2355
- * @graphvizUsedBy N
2356
- * @category Attribute
2357
- */
2358
- const vertices = 'vertices';
2359
- /**
2360
- * Clipping window on final drawing.
2361
- * Note that this attribute supersedes any {@link size} attribute.
2362
- * The width and height of the viewport specify precisely the final size of the output.
2363
- *
2364
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:viewport Node, Edge and Graph Attributes#viewport}
2365
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:viewPort viewPort}
2366
- * @graphvizDefault ""
2367
- * @graphvizUsedBy G
2368
- * @category Attribute
2369
- */
2370
- const viewport = 'viewport';
2371
- /**
2372
- * Factor to scale up drawing to allow margin for expansion in Voronoi technique.
2373
- * dim' = (1+2*margin)*dim.
2374
- *
2375
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:voro_margin Node, Edge and Graph Attributes#voro_margin}
2376
- * @graphvizType double
2377
- * @graphvizDefault 0.05
2378
- * @graphvizMinimum 0
2379
- * @graphvizNotes not dot
2380
- * @graphvizUsedBy G
2381
- * @category Attribute
2382
- */
2383
- const voro_margin = 'voro_margin';
2384
- /**
2385
- * Weight of edge.
2386
- * In dot, the heavier the weight, the shorter, straighter and more vertical the edge is. **N.B.** Weights in dot must be integers.
2387
- * For twopi, a weight of 0 indicates the edge should not be used in constructing a spanning tree from the root.
2388
- * For other layouts, a larger weight encourages the layout to make the edge length closer to that specified by the len attribute.
2389
- *
2390
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:weight Node, Edge and Graph Attributes#weight}
2391
- * @graphvizType int/double
2392
- * @graphvizDefault 1
2393
- * @graphvizMinimum
2394
- * 0(dot,twopi)
2395
- * 1(neato,fdp)
2396
- * @graphvizUsedBy E
2397
- * @category Attribute
2398
- */
2399
- const weight = 'weight';
2400
- /**
2401
- * Width of node, in inches.
2402
- * This is taken as the initial, minimum width of the node.
2403
- * If {@link fixedsize} is true, this will be the final width of the node.
2404
- * Otherwise, if the node label requires more width to fit, the node's width will be increased to contain the label.
2405
- * Note also that, if the output format is dot, the value given to width will be the final value.
2406
- *
2407
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:width Node, Edge and Graph Attributes#width}
2408
- * @graphvizType double
2409
- * @graphvizDefault 0.75
2410
- * @graphvizMinimum 0.01
2411
- * @graphvizUsedBy N
2412
- * @category Attribute
2413
- */
2414
- const width = 'width';
2415
- /**
2416
- * For xdot output, if this attribute is set, this determines the version of xdot used in output.
2417
- * If not set, the attribute will be set to the xdot version used for output.
2418
- *
2419
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:xdotversion Node, Edge and Graph Attributes#xdotversion}
2420
- * @graphvizType string
2421
- * @graphvizNotes xdot only
2422
- * @graphvizUsedBy G
2423
- * @category Attribute
2424
- */
2425
- const xdotversion = 'xdotversion';
2426
- /**
2427
- * External label for a node or edge.
2428
- * For nodes, the label will be placed outside of the node but near it.
2429
- * For edges, the label will be placed near the center of the edge.
2430
- * This can be useful in dot to avoid the occasional problem when the use of edge labels distorts the layout.
2431
- * For other layouts, the xlabel attribute can be viewed as a synonym for the {@link label} attribute.
2432
- *
2433
- * These labels are added after all nodes and edges have been placed.
2434
- * The labels will be placed so that they do not overlap any node or label.
2435
- * This means it may not be possible to place all of them.
2436
- * To force placing all of them, use the {@link forcelabels} attribute.
2437
- *
2438
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:xlabel Node, Edge and Graph Attributes#xlabel}
2439
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:lblString lblString}
2440
- * @graphvizDefault ""
2441
- * @graphvizUsedBy EN
2442
- * @category Attribute
2443
- */
2444
- const xlabel = 'xlabel';
2445
- /**
2446
- * Position of an exterior label, {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#points in points}.
2447
- * The position indicates the center of the label.
2448
- *
2449
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:xlp Node, Edge and Graph Attributes#xlp}
2450
- * @graphvizType {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:point point}
2451
- * @graphvizNotes write only
2452
- * @graphvizUsedBy NE
2453
- * @category Attribute
2454
- */
2455
- const xlp = 'xlp';
2456
- /**
2457
- * Deprecated:Use {@link pos} attribute, along with {@link dimen} and/or {@link dim} to specify dimensions.
2458
- *
2459
- * Provides z coordinate value for 3D layouts and displays.
2460
- * If the graph has {@link dim} set to 3 (or more), neato will use a node's **z** value for the z coordinate of its initial position if its {@link pos} attribute is also defined.
2461
- *
2462
- * Even if no **z** values are specified in the input, it is necessary to declare a **z** attribute for nodes, e.g,
2463
- * using node[z=""] in order to get z values on output.
2464
- * Thus, setting dim=3 but not declaring **z** will cause neato -Tvrml to layout the graph in 3D but project the layout onto the xy-plane for the rendering.
2465
- * If the **z** attribute is declared, the final rendering will be in 3D.
2466
- *
2467
- *
2468
- * @see {@link https://graphviz.gitlab.io/_pages/doc/info/attrs.html#d:z Node, Edge and Graph Attributes#z}
2469
- * @graphvizType double
2470
- * @graphvizDefault 0
2471
- * @graphvizMinimum
2472
- * -MAXFLOAT
2473
- * -1000
2474
- * @graphvizUsedBy N
2475
- * @deprecated
2476
- * @category Attribute
2477
- */
2478
- const z = 'z';
2479
- /**
2480
- * Attribute types available for edges.
2481
- */
2482
- type Edge =
2483
- | typeof URL
2484
- | typeof arrowhead
2485
- | typeof arrowsize
2486
- | typeof arrowtail
2487
- | typeof color
2488
- | typeof colorscheme
2489
- | typeof comment
2490
- | typeof constraint
2491
- | typeof decorate
2492
- | typeof dir
2493
- | typeof edgeURL
2494
- | typeof edgehref
2495
- | typeof edgetarget
2496
- | typeof edgetooltip
2497
- | typeof fillcolor
2498
- | typeof fontcolor
2499
- | typeof fontname
2500
- | typeof fontsize
2501
- | typeof headURL
2502
- | typeof head_lp
2503
- | typeof headclip
2504
- | typeof headhref
2505
- | typeof headlabel
2506
- | typeof headport
2507
- | typeof headtarget
2508
- | typeof headtooltip
2509
- | typeof href
2510
- | typeof id
2511
- | typeof label
2512
- | typeof labelURL
2513
- | typeof labelangle
2514
- | typeof labeldistance
2515
- | typeof labelfloat
2516
- | typeof labelfontcolor
2517
- | typeof labelfontname
2518
- | typeof labelfontsize
2519
- | typeof labelhref
2520
- | typeof labeltarget
2521
- | typeof labeltooltip
2522
- | typeof layer
2523
- | typeof len
2524
- | typeof lhead
2525
- | typeof lp
2526
- | typeof ltail
2527
- | typeof minlen
2528
- | typeof nojustify
2529
- | typeof penwidth
2530
- | typeof pos
2531
- | typeof samehead
2532
- | typeof sametail
2533
- | typeof showboxes
2534
- | typeof style
2535
- | typeof tailURL
2536
- | typeof tail_lp
2537
- | typeof tailclip
2538
- | typeof tailhref
2539
- | typeof taillabel
2540
- | typeof tailport
2541
- | typeof tailtarget
2542
- | typeof tailtooltip
2543
- | typeof target
2544
- | typeof tooltip
2545
- | typeof weight
2546
- | typeof xlabel
2547
- | typeof xlp;
2548
- /**
2549
- * Attribute types available for nodes.
2550
- */
2551
- type Node =
2552
- | typeof URL
2553
- | typeof area
2554
- | typeof color
2555
- | typeof colorscheme
2556
- | typeof comment
2557
- | typeof distortion
2558
- | typeof fillcolor
2559
- | typeof fixedsize
2560
- | typeof fontcolor
2561
- | typeof fontname
2562
- | typeof fontsize
2563
- | typeof gradientangle
2564
- | typeof group
2565
- | typeof height
2566
- | typeof href
2567
- | typeof id
2568
- | typeof image
2569
- | typeof imagepos
2570
- | typeof imagescale
2571
- | typeof label
2572
- | typeof labelloc
2573
- | typeof layer
2574
- | typeof margin
2575
- | typeof nojustify
2576
- | typeof ordering
2577
- | typeof orientation
2578
- | typeof penwidth
2579
- | typeof peripheries
2580
- | typeof pin
2581
- | typeof pos
2582
- | typeof rects
2583
- | typeof regular
2584
- | typeof root
2585
- | typeof samplepoints
2586
- | typeof shape
2587
- | typeof shapefile
2588
- | typeof showboxes
2589
- | typeof sides
2590
- | typeof skew
2591
- | typeof sortv
2592
- | typeof style
2593
- | typeof target
2594
- | typeof tooltip
2595
- | typeof vertices
2596
- | typeof width
2597
- | typeof xlabel
2598
- | typeof xlp
2599
- | typeof z;
2600
- /**
2601
- * Attribute types available for root cluster.
2602
- */
2603
- type RootCluster =
2604
- | typeof Damping
2605
- | typeof K
2606
- | typeof URL
2607
- | typeof _background
2608
- | typeof bb
2609
- | typeof bgcolor
2610
- | typeof center
2611
- | typeof charset
2612
- | typeof clusterrank
2613
- | typeof colorscheme
2614
- | typeof comment
2615
- | typeof compound
2616
- | typeof concentrate
2617
- | typeof defaultdist
2618
- | typeof dim
2619
- | typeof dimen
2620
- | typeof diredgeconstraints
2621
- | typeof dpi
2622
- | typeof epsilon
2623
- | typeof esep
2624
- | typeof fontcolor
2625
- | typeof fontname
2626
- | typeof fontnames
2627
- | typeof fontpath
2628
- | typeof fontsize
2629
- | typeof forcelabels
2630
- | typeof gradientangle
2631
- | typeof href
2632
- | typeof id
2633
- | typeof imagepath
2634
- | typeof inputscale
2635
- | typeof label
2636
- | typeof label_scheme
2637
- | typeof labeljust
2638
- | typeof labelloc
2639
- | typeof landscape
2640
- | typeof layerlistsep
2641
- | typeof layers
2642
- | typeof layerselect
2643
- | typeof layersep
2644
- | typeof layout
2645
- | typeof levels
2646
- | typeof levelsgap
2647
- | typeof lheight
2648
- | typeof lp
2649
- | typeof lwidth
2650
- | typeof margin
2651
- | typeof maxiter
2652
- | typeof mclimit
2653
- | typeof mindist
2654
- | typeof mode
2655
- | typeof model
2656
- | typeof mosek
2657
- | typeof newrank
2658
- | typeof nodesep
2659
- | typeof nojustify
2660
- | typeof normalize
2661
- | typeof notranslate
2662
- | typeof nslimit
2663
- | typeof nslimit1
2664
- | typeof ordering
2665
- | typeof orientation
2666
- | typeof outputorder
2667
- | typeof overlap
2668
- | typeof overlap_scaling
2669
- | typeof overlap_shrink
2670
- | typeof pack
2671
- | typeof packmode
2672
- | typeof pad
2673
- | typeof page
2674
- | typeof pagedir
2675
- | typeof quadtree
2676
- | typeof quantum
2677
- | typeof rankdir
2678
- | typeof ranksep
2679
- | typeof ratio
2680
- | typeof remincross
2681
- | typeof repulsiveforce
2682
- | typeof resolution
2683
- | typeof root
2684
- | typeof rotate
2685
- | typeof rotation
2686
- | typeof scale
2687
- | typeof searchsize
2688
- | typeof sep
2689
- | typeof showboxes
2690
- | typeof size
2691
- | typeof smoothing
2692
- | typeof sortv
2693
- | typeof splines
2694
- | typeof start
2695
- | typeof style
2696
- | typeof stylesheet
2697
- | typeof target
2698
- | typeof truecolor
2699
- | typeof viewport
2700
- | typeof voro_margin
2701
- | typeof xdotversion;
2702
- /**
2703
- * Attribute types available for subgraph.
2704
- */
2705
- type Subgraph = typeof rank;
2706
- /**
2707
- * Attribute types available for cluster subgraph.
2708
- */
2709
- type ClusterSubgraph =
2710
- | typeof K
2711
- | typeof URL
2712
- | typeof area
2713
- | typeof bgcolor
2714
- | typeof color
2715
- | typeof colorscheme
2716
- | typeof fillcolor
2717
- | typeof fontcolor
2718
- | typeof fontname
2719
- | typeof fontsize
2720
- | typeof gradientangle
2721
- | typeof href
2722
- | typeof id
2723
- | typeof label
2724
- | typeof labeljust
2725
- | typeof labelloc
2726
- | typeof layer
2727
- | typeof lheight
2728
- | typeof lp
2729
- | typeof lwidth
2730
- | typeof margin
2731
- | typeof nojustify
2732
- | typeof pencolor
2733
- | typeof penwidth
2734
- | typeof peripheries
2735
- | typeof sortv
2736
- | typeof style
2737
- | typeof target
2738
- | typeof tooltip;
2739
- /**
2740
- * Attribute types.
2741
- */
2742
- type Attribute = Node | Edge | RootCluster | Subgraph | ClusterSubgraph;
2743
- }
2744
-
2745
- /**
2746
- * Directive indicating which direction the Edge should point.
2747
- */
2748
- declare type Compass = 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw' | 'c';
2749
- declare namespace Compass {
2750
- /** Upper part */
2751
- const n: Compass;
2752
- /** Upper left */
2753
- const ne: Compass;
2754
- /** Left part */
2755
- const e: Compass;
2756
- /** Lower left */
2757
- const se: Compass;
2758
- /** Lower part */
2759
- const s: Compass;
2760
- /** Lower right */
2761
- const sw: Compass;
2762
- /** Right part */
2763
- const w: Compass;
2764
- /** Upper right */
2765
- const nw: Compass;
2766
- /** Center */
2767
- const c: Compass;
2768
- /**
2769
- * Determine whether the character string satisfies the Compass condition.
2770
- */
2771
- function is(str: string): str is Compass;
2772
- }
2773
- /**
2774
- * Objects that can be Edge destinations satisfy this interface.
2775
- */
2776
- declare type NodeRef = INode | IForwardRefNode;
2777
- declare type NodeRefGroup = NodeRef[];
2778
- /**
2779
- * string or an object implementing IEdgeTarget.
2780
- */
2781
- declare type NodeRefLike = NodeRef | string;
2782
- declare type NodeRefGroupLike = NodeRefLike[];
2783
- declare type EdgeTarget = NodeRef | NodeRefGroup;
2784
- declare type EdgeTargetLike = NodeRefLike | NodeRefGroupLike;
2785
- declare type EdgeTargetTuple = [from: EdgeTarget, to: EdgeTarget, ...rest: EdgeTarget[]];
2786
- declare type EdgeTargetLikeTuple = [from: EdgeTargetLike, to: EdgeTargetLike, ...rest: EdgeTargetLike[]];
2787
- interface IHasComment {
2788
- /** Comments to include when outputting with toDot. */
2789
- comment?: string;
2790
- }
2791
- interface IHasAttributes<T extends string> {
2792
- readonly attributes: IAttributes<T>;
2793
- }
2794
- /**
2795
- * An AttributesValue is one of the following:
2796
- * - Any string of alphabetic ([a-zA-Z\200-\377]) characters, underscores ('_') or digits ([0-9]), not beginning with a digit;
2797
- * - a numeral [-]?(.[0-9]+ | [0-9]+(.[0-9]*)? );
2798
- * - any double-quoted string ("...") possibly containing escaped quotes (\")1;
2799
- * - an HTML Like string (<...>).
2800
- */
2801
- declare type AttributesValue = string | number | boolean;
2802
- declare type AttributesObject<T extends string> = {
2803
- [key in T]?: AttributesValue;
2804
- };
2805
- declare type AttributesEntities<T extends string> = readonly [T, AttributesValue][];
2806
- declare type EdgeAttributes = AttributesObject<attribute.Edge>;
2807
- declare type NodeAttributes = AttributesObject<attribute.Node>;
2808
- declare type RootClusterAttributes = AttributesObject<attribute.RootCluster>;
2809
- declare type ClusterSubgraphAttributes = AttributesObject<attribute.ClusterSubgraph | attribute.Subgraph>;
2810
- interface IAttributesBase<T extends string> {
2811
- readonly size: number;
2812
- readonly values: ReadonlyArray<[T, AttributesValue]>;
2813
- get(key: T): AttributesValue | undefined;
2814
- set(key: T, value: AttributesValue): void;
2815
- apply(attributes: AttributesObject<T> | AttributesEntities<T>): void;
2816
- delete(key: T): void;
2817
- clear(): void;
2818
- }
2819
- interface IAttributes<T extends string = string> extends IAttributesBase<T>, IHasComment {}
2820
- interface IPort {
2821
- port: string;
2822
- compass: Compass;
2823
- }
2824
- interface IForwardRefNode extends Partial<IPort> {
2825
- readonly id: string;
2826
- }
2827
- interface INode extends IHasComment, IHasAttributes<attribute.Node> {
2828
- readonly id: string;
2829
- port(port: string | Partial<IPort>): IForwardRefNode;
2830
- }
2831
- interface IEdge extends IHasComment, IHasAttributes<attribute.Edge> {
2832
- readonly targets: EdgeTargetTuple;
2833
- }
2834
- /**
2835
- * Cluster common attribute interface.
2836
- *
2837
- * @hidden
2838
- */
2839
- interface IClusterCommonAttributes {
2840
- /** Manage common attributes of graphs in a cluster. */
2841
- graph: IAttributes<attribute.Subgraph | attribute.ClusterSubgraph>;
2842
- /** Manage common attributes of edges in a cluster. */
2843
- edge: IAttributes<attribute.Edge>;
2844
- /** Manage common attributes of nodes in a cluster. */
2845
- node: IAttributes<attribute.Node>;
2846
- }
2847
- interface ICluster<T extends string = string> extends IHasComment, IAttributesBase<T> {
2848
- readonly id?: string;
2849
- readonly attributes: Readonly<IClusterCommonAttributes>;
2850
- readonly nodes: ReadonlyArray<INode>;
2851
- readonly edges: ReadonlyArray<IEdge>;
2852
- readonly subgraphs: ReadonlyArray<ISubgraph>;
2853
- /**
2854
- * Add a Node to the cluster.
2855
- */
2856
- addNode(node: INode): void;
2857
- /**
2858
- * Add Edge to the cluster.
2859
- */
2860
- addEdge(edge: IEdge): void;
2861
- /**
2862
- * Add a Subgraph to the cluster.
2863
- */
2864
- addSubgraph(subgraph: ISubgraph): void;
2865
- /**
2866
- * Check if the Node exists in the cluster.
2867
- */
2868
- existNode(nodeId: string): boolean;
2869
- /**
2870
- * Check if the Edge exists in the cluster.
2871
- */
2872
- existEdge(edge: IEdge): boolean;
2873
- /**
2874
- * Check if the Subgraph exists in the cluster.
2875
- */
2876
- existSubgraph(subgraph: ISubgraph): boolean;
2877
- /**
2878
- * Remove Node from the cluster.
2879
- */
2880
- removeNode(node: INode | string): void;
2881
- /**
2882
- * Remove Edge from the cluster.
2883
- */
2884
- removeEdge(edge: IEdge): void;
2885
- /**
2886
- * Remove Subgraph from the cluster.
2887
- */
2888
- removeSubgraph(subgraph: ISubgraph): void;
2889
- /**
2890
- * Create a Node in the cluster.
2891
- */
2892
- createNode(id: string, attributes?: NodeAttributes): INode;
2893
- /**
2894
- * Create a Subgraph and add it to the cluster.
2895
- */
2896
- createSubgraph(id?: string, attributes?: ClusterSubgraphAttributes): ISubgraph;
2897
- createSubgraph(attributes?: ClusterSubgraphAttributes): ISubgraph;
2898
- /**
2899
- * Get Subgraph in cluster by specifying id.
2900
- *
2901
- * If there is no Subgraph with the specified id in the cluster, return undefined.
2902
- */
2903
- getSubgraph(id: string): ISubgraph | undefined;
2904
- /**
2905
- * Get Node in cluster by specifying id.
2906
- *
2907
- * @description
2908
- * If there is no Node with the specified id in the cluster, return undefined.
2909
- */
2910
- getNode(id: string): INode | undefined;
2911
- /** Create Edge and add it to the cluster. */
2912
- createEdge(targets: EdgeTargetLikeTuple, attributes?: EdgeAttributes): IEdge;
2913
- /**
2914
- * Create a subgraph by specifying its id (or get it if it already exists).
2915
- *
2916
- * By specifying a callback function, the target subgraph can be received and manipulated as an argument.
2917
- *
2918
- * ```ts
2919
- * const G = digraph('G', (g) => {
2920
- * // Create a cluster with id as A.
2921
- * g.subgraph('A', (A) => {
2922
- * // Create a node with id as A1 in cluster A.
2923
- * A.node('A1');
2924
- * });
2925
- * });
2926
- *
2927
- * console.log(toDot(G));
2928
- * // digraph "G" {
2929
- * // subgraph "A" {
2930
- * // "A1";
2931
- * // }
2932
- * // }
2933
- * ```
2934
- *
2935
- * @param id Subgraph ID.
2936
- * @param callback Callbacks for manipulating created or retrieved subgraph.
2937
- */
2938
- subgraph(id: string, callback?: (subgraph: ISubgraph) => void): ISubgraph;
2939
- /**
2940
- * Create a subgraph (or get one if it already exists) and adapt the attributes.
2941
- *
2942
- * By specifying a callback function, the target subgraph can be received and manipulated as an argument.
2943
- *
2944
- * ```ts
2945
- * const G = digraph('G', (g) => {
2946
- * // Create a cluster with id as A and specifying its attributes.
2947
- * g.subgraph('A', { [attribute.color]: 'red', [attribute.label]: 'my label' }, (A) => {
2948
- * // Create a node with id as A1 in cluster A.
2949
- * A.node('A1');
2950
- * });
2951
- * });
2952
- *
2953
- * console.log(toDot(G));
2954
- * // digraph "G" {
2955
- * // subgraph "A" {
2956
- * // color = "red";
2957
- * // label = "my label";
2958
- * // "A1";
2959
- * // }
2960
- * // }
2961
- * ```
2962
- *
2963
- * @param id Subgraph ID.
2964
- * @param attributes Object of attributes to be adapted to the subgraph.
2965
- * @param callback Callbacks for manipulating created or retrieved subgraph.
2966
- */
2967
- subgraph(id: string, attributes: ClusterSubgraphAttributes, callback?: (subgraph: ISubgraph) => void): ISubgraph;
2968
- /**
2969
- * Create anonymous subgraphs and and adapt the attributes.
2970
- *
2971
- * By specifying a callback function, the target subgraph can be received and manipulated as an argument.
2972
- *
2973
- * ```ts
2974
- * const G = digraph('G', (g) => {
2975
- * // Create a anonymous cluster and specifying its attributes.
2976
- * g.subgraph({ [attribute.color]: 'red', [attribute.label]: 'my label' }, (A) => {
2977
- * // Create a node with id as A1 in anonymous cluster.
2978
- * A.node('A1');
2979
- * });
2980
- * });
2981
- *
2982
- * console.log(toDot(G));
2983
- * // digraph "G" {
2984
- * // subgraph {
2985
- * // color = "red";
2986
- * // label = "my label";
2987
- * // "A1";
2988
- * // }
2989
- * // }
2990
- * ```
2991
- *
2992
- * @param attributes Object of attributes to be adapted to the subgraph.
2993
- * @param callback Callbacks for manipulating created or retrieved subgraph.
2994
- */
2995
- subgraph(attributes: ClusterSubgraphAttributes, callback?: (subgraph: ISubgraph) => void): ISubgraph;
2996
- /**
2997
- * Create anonymous subgraphs and manipulate them with callback functions.
2998
- *
2999
- * By specifying a callback function, the target subgraph can be received and manipulated as an argument.
3000
- *
3001
- * @param callback Callbacks for manipulating created or retrieved subgraph.
3002
- */
3003
- subgraph(callback?: (subgraph: ISubgraph) => void): ISubgraph;
3004
- /**
3005
- * Create a node by specifying its id (or get it if it already exists).
3006
- *
3007
- * By specifying a callback function, the target node can be received and manipulated as an argument.
3008
- *
3009
- * ```ts
3010
- * const G = digraph('G', (g) => {
3011
- * // Create a node with id as A.
3012
- * g.node('A');
3013
- * });
3014
- *
3015
- * console.log(toDot(G));
3016
- * // digraph "G" {
3017
- * // "A";
3018
- * // }
3019
- * ```
3020
- *
3021
- * @param id Node ID.
3022
- * @param callback Callbacks for manipulating created or retrieved node.
3023
- */
3024
- node(id: string, callback?: (node: INode) => void): INode;
3025
- /**
3026
- * Create a node (or get one if it already exists) and adapt the attributes.
3027
- *
3028
- * By specifying a callback function, the target node can be received and manipulated as an argument.
3029
- *
3030
- * ```ts
3031
- * const G = digraph('G', (g) => {
3032
- * // Create a node by specifying its id and specifying its attributes.
3033
- * g.node('A', {
3034
- * [attribute.color]: 'red',
3035
- * [attribute.label]: 'my label',
3036
- * });
3037
- * });
3038
- *
3039
- * console.log(toDot(G));
3040
- * // digraph "G" {
3041
- * // "A" [
3042
- * // color = "red",
3043
- * // label = "my label",
3044
- * // ];
3045
- * // }
3046
- * ```
3047
- *
3048
- * @param id Node ID.
3049
- * @param attributes Object of attributes to be adapted to the node.
3050
- * @param callback Callbacks for manipulating created or retrieved node.
3051
- */
3052
- node(id: string, attributes: NodeAttributes, callback?: (node: INode) => void): INode;
3053
- /**
3054
- * Set a common attribute for the nodes in the cluster.
3055
- *
3056
- * ```ts
3057
- * const G = digraph('G', (g) => {
3058
- * // Set a common attribute for the nodes in the cluster.
3059
- * g.node({
3060
- * [attribute.color]: 'red',
3061
- * [attribute.label]: 'my label',
3062
- * });
3063
- * });
3064
- *
3065
- * console.log(toDot(G));
3066
- * // digraph "G" {
3067
- * // node [
3068
- * // color = "red",
3069
- * // label = "my label",
3070
- * // ];
3071
- * // }
3072
- * ```
3073
- *
3074
- * @param attributes Object of attributes to be adapted to the nodes.
3075
- */
3076
- node(attributes: NodeAttributes): void;
3077
- /**
3078
- * Create a edge.
3079
- *
3080
- * By specifying a callback function, the target edge can be received and manipulated as an argument.
3081
- *
3082
- * ```ts
3083
- * const G = digraph('G', (g) => {
3084
- * // Create a edge.
3085
- * g.edge(['a', 'b']);
3086
- * });
3087
- *
3088
- * console.log(toDot(G));
3089
- * // digraph "G" {
3090
- * // "a" -> "b";
3091
- * // }
3092
- * ```
3093
- * @param targets Nodes.
3094
- * @param callback Callbacks for manipulating created or retrieved edge.
3095
- */
3096
- edge(targets: EdgeTargetLikeTuple, callback?: (edge: IEdge) => void): IEdge;
3097
- /**
3098
- * Create a edge and adapt the attributes.
3099
- *
3100
- * By specifying a callback function, the target edge can be received and manipulated as an argument.
3101
- *
3102
- * ```ts
3103
- * const G = digraph('G', (g) => {
3104
- * // Create a edge and specifying its attributes.
3105
- * g.edge(['a', 'b'], {
3106
- * [attribute.color]: 'red',
3107
- * [attribute.label]: 'my label',
3108
- * });
3109
- * });
3110
- *
3111
- * console.log(toDot(G));
3112
- * // digraph "G" {
3113
- * // "a" -> "b" [
3114
- * // color = "red",
3115
- * // label = "my label",
3116
- * // ];
3117
- * // }
3118
- * ```
3119
- *
3120
- * @param id Node ID.
3121
- * @param attributes Object of attributes to be adapted to the edge.
3122
- * @param callback Callbacks for manipulating created or retrieved edge.
3123
- */
3124
- edge(targets: EdgeTargetLikeTuple, attributes: EdgeAttributes, callback?: (edge: IEdge) => void): IEdge;
3125
- /**
3126
- * Set a common attribute for the edges in the cluster.
3127
- *
3128
- *
3129
- * ```ts
3130
- * const G = digraph('G', (g) => {
3131
- * // Set a common attribute for the edges in the cluster.
3132
- * g.edge({
3133
- * [attribute.color]: 'red',
3134
- * [attribute.label]: 'my label',
3135
- * });
3136
- * });
3137
- *
3138
- * console.log(toDot(G));
3139
- * // digraph "G" {
3140
- * // edge [
3141
- * // color = "red",
3142
- * // label = "my label",
3143
- * // ];
3144
- * // }
3145
- * ```
3146
- * @param attributes Object of attributes to be adapted to the edges.
3147
- */
3148
- edge(attributes: EdgeAttributes): void;
3149
- /**
3150
- * Set a common attribute for the clusters in the cluster.
3151
- *
3152
- * ```ts
3153
- * const G = digraph('G', (g) => {
3154
- * g.graph({
3155
- * [attribute.color]: 'red',
3156
- * [attribute.label]: 'my label',
3157
- * });
3158
- * });
3159
- *
3160
- * console.log(toDot(G));
3161
- * // digraph "G" {
3162
- * // graph [
3163
- * // color = "red",
3164
- * // label = "my label",
3165
- * // ];
3166
- * // }
3167
- * ```
3168
- * @param attributes Object of attributes to be adapted to the clusters.
3169
- */
3170
- graph(attributes: ClusterSubgraphAttributes): void;
3171
- }
3172
- interface ISubgraph extends ICluster<attribute.Subgraph | attribute.ClusterSubgraph> {
3173
- isSubgraphCluster(): boolean;
3174
- }
3175
- interface IRootCluster extends ICluster<attribute.RootCluster> {
3176
- /**
3177
- * Strict mode.
3178
- *
3179
- * @description
3180
- * A graph may also be described as strict.
3181
- * This forbids the creation of multi-edges, i.e., there can be at most one edge with a given tail node and head node in the directed case.
3182
- * For undirected graphs, there can be at most one edge connected to the same two nodes.
3183
- * Subsequent edge statements using the same two nodes will identify the edge with the previously defined one and apply any attributes given in the edge statement.
3184
- */
3185
- strict: boolean;
3186
- }
3187
- declare type Dot = IRootCluster | ISubgraph | IEdge | INode | IAttributes | AttributesValue;
3188
-
3189
- /**
3190
- * Classes implemented in the 'ts-graphviz' library are designed to inherit from this class.
3191
- * @category Base
3192
- */
3193
- declare abstract class GraphvizObject {}
3194
- /**
3195
- * Classes implemented in the 'ts-graphviz' library that implement the `toDot` method are designed to inherit from this class.
3196
- * @category Base
3197
- */
3198
- declare abstract class DotObject extends GraphvizObject {}
3199
-
3200
- /**
3201
- * @hidden
3202
- */
3203
- declare abstract class AttributesBase<T extends string> extends DotObject implements IAttributesBase<T> {
3204
- /** @hidden */
3205
- protected attrs: Map<T, AttributesValue>;
3206
- constructor(attributes?: AttributesObject<T>);
3207
- get values(): ReadonlyArray<[T, AttributesValue]>;
3208
- /** The size of the attribute. */
3209
- get size(): number;
3210
- /** The size of the attribute. */
3211
- get(key: T): AttributesValue | undefined;
3212
- /** Set a value to the attribute. */
3213
- set(key: T, value: AttributesValue): void;
3214
- delete(key: T): void;
3215
- apply(attributes: AttributesObject<T> | AttributesEntities<T>): void;
3216
- clear(): void;
3217
- }
3218
- /**
3219
- * A set of attribute values for any object.
3220
- *
3221
- * @category Attributes
3222
- */
3223
- declare class Attributes<T extends string = string> extends AttributesBase<T> implements IAttributes<T> {
3224
- /** Comments to include when outputting with toDot. */
3225
- comment?: string;
3226
- }
3227
-
3228
- /**
3229
- * Base class for clusters.
3230
- * @hidden
3231
- */
3232
- declare abstract class Cluster<T extends string> extends AttributesBase<T> implements ICluster<T> {
3233
- /** Cluster ID */
3234
- readonly id?: string;
3235
- /** Comments to include when outputting with toDot. */
3236
- comment?: string;
3237
- /** Common attributes of objects in the cluster. */
3238
- abstract readonly attributes: Readonly<IClusterCommonAttributes>;
3239
- /**
3240
- * Nodes in the cluster.
3241
- * @hidden
3242
- */
3243
- get nodes(): ReadonlyArray<INode>;
3244
- /**
3245
- * Edges in the cluster.
3246
- * @hidden
3247
- */
3248
- get edges(): ReadonlyArray<IEdge>;
3249
- /**
3250
- * Subgraphs in the cluster.
3251
- * @hidden
3252
- */
3253
- get subgraphs(): ReadonlyArray<ISubgraph>;
3254
- private readonly objects;
3255
- /**
3256
- * Add a Node to the cluster.
3257
- */
3258
- addNode(node: INode): void;
3259
- /**
3260
- * Add Edge to the cluster.
3261
- */
3262
- addEdge(edge: IEdge): void;
3263
- /**
3264
- * Add a Subgraph to the cluster.
3265
- */
3266
- addSubgraph(subgraph: ISubgraph): void;
3267
- /**
3268
- * Check if the Node exists in the cluster.
3269
- */
3270
- existNode(nodeId: string): boolean;
3271
- /**
3272
- * Check if the Edge exists in the cluster.
3273
- */
3274
- existEdge(edge: IEdge): boolean;
3275
- /**
3276
- * Check if the Subgraph exists in the cluster.
3277
- */
3278
- existSubgraph(subgraph: ISubgraph): boolean;
3279
- /**
3280
- * Create a Subgraph and add it to the cluster.
3281
- */
3282
- createSubgraph(id?: string, attributes?: ClusterSubgraphAttributes): ISubgraph;
3283
- createSubgraph(attributes?: ClusterSubgraphAttributes): ISubgraph;
3284
- /**
3285
- * Remove Node from the cluster.
3286
- */
3287
- removeNode(node: INode | string): void;
3288
- /**
3289
- * Remove Edge from the cluster.
3290
- */
3291
- removeEdge(edge: IEdge): void;
3292
- /**
3293
- * Remove Subgraph from the cluster.
3294
- */
3295
- removeSubgraph(subgraph: ISubgraph): void;
3296
- /**
3297
- * Create a Node in the cluster.
3298
- */
3299
- createNode(id: string, attributes?: NodeAttributes): INode;
3300
- /**
3301
- * Get Subgraph in cluster by specifying id.
3302
- *
3303
- * If there is no Subgraph with the specified id in the cluster, return undefined.
3304
- */
3305
- getSubgraph(id: string): ISubgraph | undefined;
3306
- /**
3307
- * Get Node in cluster by specifying id.
3308
- *
3309
- * @description
3310
- * If there is no Node with the specified id in the cluster, return undefined.
3311
- */
3312
- getNode(id: string): INode | undefined;
3313
- /** Create Edge and add it to the cluster. */
3314
- createEdge(targets: EdgeTargetLikeTuple, attributes?: EdgeAttributes): IEdge;
3315
- /**
3316
- * Create a subgraph by specifying its id (or get it if it already exists).
3317
- *
3318
- * By specifying a callback function, the target subgraph can be received and manipulated as an argument.
3319
- *
3320
- * ```ts
3321
- * const G = digraph('G', (g) => {
3322
- * // Create a cluster with id as A.
3323
- * g.subgraph('A', (A) => {
3324
- * // Create a node with id as A1 in cluster A.
3325
- * A.node('A1');
3326
- * });
3327
- * });
3328
- *
3329
- * console.log(toDot(G));
3330
- * // digraph "G" {
3331
- * // subgraph "A" {
3332
- * // "A1";
3333
- * // }
3334
- * // }
3335
- * ```
3336
- *
3337
- * @param id Subgraph ID.
3338
- * @param callback Callbacks for manipulating created or retrieved subgraph.
3339
- */
3340
- subgraph(id: string, callback?: (subgraph: ISubgraph) => void): ISubgraph;
3341
- /**
3342
- * Create a subgraph (or get one if it already exists) and adapt the attributes.
3343
- *
3344
- * By specifying a callback function, the target subgraph can be received and manipulated as an argument.
3345
- *
3346
- * ```ts
3347
- * const G = digraph('G', (g) => {
3348
- * // Create a cluster with id as A and specifying its attributes.
3349
- * g.subgraph('A', { [attribute.color]: 'red', [attribute.label]: 'my label' }, (A) => {
3350
- * // Create a node with id as A1 in cluster A.
3351
- * A.node('A1');
3352
- * });
3353
- * });
3354
- *
3355
- * console.log(toDot(G));
3356
- * // digraph "G" {
3357
- * // subgraph "A" {
3358
- * // color = "red";
3359
- * // label = "my label";
3360
- * // "A1";
3361
- * // }
3362
- * // }
3363
- * ```
3364
- *
3365
- * @param id Subgraph ID.
3366
- * @param attributes Object of attributes to be adapted to the subgraph.
3367
- * @param callback Callbacks for manipulating created or retrieved subgraph.
3368
- */
3369
- subgraph(id: string, attributes: ClusterSubgraphAttributes, callback?: (subgraph: ISubgraph) => void): ISubgraph;
3370
- /**
3371
- * Create anonymous subgraphs and and adapt the attributes.
3372
- *
3373
- * By specifying a callback function, the target subgraph can be received and manipulated as an argument.
3374
- *
3375
- * ```ts
3376
- * const G = digraph('G', (g) => {
3377
- * // Create a anonymous cluster and specifying its attributes.
3378
- * g.subgraph({ [attribute.color]: 'red', [attribute.label]: 'my label' }, (A) => {
3379
- * // Create a node with id as A1 in anonymous cluster.
3380
- * A.node('A1');
3381
- * });
3382
- * });
3383
- *
3384
- * console.log(toDot(G));
3385
- * // digraph "G" {
3386
- * // subgraph {
3387
- * // color = "red";
3388
- * // label = "my label";
3389
- * // "A1";
3390
- * // }
3391
- * // }
3392
- * ```
3393
- *
3394
- * @param attributes Object of attributes to be adapted to the subgraph.
3395
- * @param callback Callbacks for manipulating created or retrieved subgraph.
3396
- */
3397
- subgraph(attributes: ClusterSubgraphAttributes, callback?: (subgraph: ISubgraph) => void): ISubgraph;
3398
- /**
3399
- * Create anonymous subgraphs and manipulate them with callback functions.
3400
- *
3401
- * By specifying a callback function, the target subgraph can be received and manipulated as an argument.
3402
- *
3403
- * @param callback Callbacks for manipulating created or retrieved subgraph.
3404
- */
3405
- subgraph(callback?: (subgraph: ISubgraph) => void): ISubgraph;
3406
- /**
3407
- * Create a node by specifying its id (or get it if it already exists).
3408
- *
3409
- * By specifying a callback function, the target node can be received and manipulated as an argument.
3410
- *
3411
- * ```ts
3412
- * const G = digraph('G', (g) => {
3413
- * // Create a node with id as A.
3414
- * g.node('A');
3415
- * });
3416
- *
3417
- * console.log(toDot(G));
3418
- * // digraph "G" {
3419
- * // "A";
3420
- * // }
3421
- * ```
3422
- *
3423
- * @param id Node ID.
3424
- * @param callback Callbacks for manipulating created or retrieved node.
3425
- */
3426
- node(id: string, callback?: (node: INode) => void): INode;
3427
- /**
3428
- * Create a node (or get one if it already exists) and adapt the attributes.
3429
- *
3430
- * By specifying a callback function, the target node can be received and manipulated as an argument.
3431
- *
3432
- * ```ts
3433
- * const G = digraph('G', (g) => {
3434
- * // Create a node by specifying its id and specifying its attributes.
3435
- * g.node('A', {
3436
- * [attribute.color]: 'red',
3437
- * [attribute.label]: 'my label',
3438
- * });
3439
- * });
3440
- *
3441
- * console.log(toDot(G));
3442
- * // digraph "G" {
3443
- * // "A" [
3444
- * // color = "red",
3445
- * // label = "my label",
3446
- * // ];
3447
- * // }
3448
- * ```
3449
- *
3450
- * @param id Node ID.
3451
- * @param attributes Object of attributes to be adapted to the node.
3452
- * @param callback Callbacks for manipulating created or retrieved node.
3453
- */
3454
- node(id: string, attributes: NodeAttributes, callback?: (node: INode) => void): INode;
3455
- /**
3456
- * Set a common attribute for the nodes in the cluster.
3457
- *
3458
- * ```ts
3459
- * const G = digraph('G', (g) => {
3460
- * // Set a common attribute for the nodes in the cluster.
3461
- * g.node({
3462
- * [attribute.color]: 'red',
3463
- * [attribute.label]: 'my label',
3464
- * });
3465
- * });
3466
- *
3467
- * console.log(toDot(G));
3468
- * // digraph "G" {
3469
- * // node [
3470
- * // color = "red",
3471
- * // label = "my label",
3472
- * // ];
3473
- * // }
3474
- * ```
3475
- *
3476
- * @param attributes Object of attributes to be adapted to the nodes.
3477
- */
3478
- node(attributes: NodeAttributes): void;
3479
- /**
3480
- * Create a edge.
3481
- *
3482
- * By specifying a callback function, the target edge can be received and manipulated as an argument.
3483
- *
3484
- * ```ts
3485
- * const G = digraph('G', (g) => {
3486
- * // Create a edge.
3487
- * g.edge(['a', 'b']);
3488
- * });
3489
- *
3490
- * console.log(toDot(G));
3491
- * // digraph "G" {
3492
- * // "a" -> "b";
3493
- * // }
3494
- * ```
3495
- * @param targets Nodes.
3496
- * @param callback Callbacks for manipulating created or retrieved edge.
3497
- */
3498
- edge(targets: EdgeTargetLikeTuple, callback?: (edge: IEdge) => void): IEdge;
3499
- /**
3500
- * Create a edge and adapt the attributes.
3501
- *
3502
- * By specifying a callback function, the target edge can be received and manipulated as an argument.
3503
- *
3504
- * ```ts
3505
- * const G = digraph('G', (g) => {
3506
- * // Create a edge and specifying its attributes.
3507
- * g.edge(['a', 'b'], {
3508
- * [attribute.color]: 'red',
3509
- * [attribute.label]: 'my label',
3510
- * });
3511
- * });
3512
- *
3513
- * console.log(toDot(G));
3514
- * // digraph "G" {
3515
- * // "a" -> "b" [
3516
- * // color = "red",
3517
- * // label = "my label",
3518
- * // ];
3519
- * // }
3520
- * ```
3521
- *
3522
- * @param id Node ID.
3523
- * @param attributes Object of attributes to be adapted to the edge.
3524
- * @param callback Callbacks for manipulating created or retrieved edge.
3525
- */
3526
- edge(targets: EdgeTargetLikeTuple, attributes: EdgeAttributes, callback?: (edge: IEdge) => void): IEdge;
3527
- /**
3528
- * Set a common attribute for the edges in the cluster.
3529
- *
3530
- *
3531
- * ```ts
3532
- * const G = digraph('G', (g) => {
3533
- * // Set a common attribute for the edges in the cluster.
3534
- * g.edge({
3535
- * [attribute.color]: 'red',
3536
- * [attribute.label]: 'my label',
3537
- * });
3538
- * });
3539
- *
3540
- * console.log(toDot(G));
3541
- * // digraph "G" {
3542
- * // edge [
3543
- * // color = "red",
3544
- * // label = "my label",
3545
- * // ];
3546
- * // }
3547
- * ```
3548
- * @param attributes Object of attributes to be adapted to the edges.
3549
- */
3550
- edge(attributes: EdgeAttributes): void;
3551
- /**
3552
- * Set a common attribute for the clusters in the cluster.
3553
- *
3554
- * ```ts
3555
- * const G = digraph('G', (g) => {
3556
- * g.graph({
3557
- * [attribute.color]: 'red',
3558
- * [attribute.label]: 'my label',
3559
- * });
3560
- * });
3561
- *
3562
- * console.log(toDot(G));
3563
- * // digraph "G" {
3564
- * // graph [
3565
- * // color = "red",
3566
- * // label = "my label",
3567
- * // ];
3568
- * // }
3569
- * ```
3570
- * @param attributes Object of attributes to be adapted to the clusters.
3571
- */
3572
- graph(attributes: ClusterSubgraphAttributes): void;
3573
- }
3574
- /**
3575
- * Subgraph object.
3576
- * @category Primary
3577
- */
3578
- declare class Subgraph extends Cluster<attribute.Subgraph | attribute.ClusterSubgraph> implements ISubgraph {
3579
- readonly id?: string;
3580
- attributes: {
3581
- graph: Attributes<attribute.ClusterSubgraph>;
3582
- edge: Attributes<attribute.Edge>;
3583
- node: Attributes<attribute.Node>;
3584
- };
3585
- constructor(id?: string, attributes?: ClusterSubgraphAttributes);
3586
- constructor(attributes?: ClusterSubgraphAttributes);
3587
- /** Determines whether the Subgraph is a SubgraphCluster. */
3588
- isSubgraphCluster(): boolean;
3589
- }
3590
-
3591
- /**
3592
- * Base class for RootCluster.
3593
- */
3594
- declare abstract class RootCluster extends Cluster<attribute.RootCluster> implements IRootCluster {
3595
- readonly id?: string;
3596
- /**
3597
- * Strict mode.
3598
- *
3599
- * @description
3600
- * A graph may also be described as strict.
3601
- * This forbids the creation of multi-edges, i.e., there can be at most one edge with a given tail node and head node in the directed case.
3602
- * For undirected graphs, there can be at most one edge connected to the same two nodes.
3603
- * Subsequent edge statements using the same two nodes will identify the edge with the previously defined one and apply any attributes given in the edge statement.
3604
- */
3605
- strict: boolean;
3606
- attributes: {
3607
- graph: Attributes<'rank' | attribute.ClusterSubgraph>;
3608
- edge: Attributes<attribute.Edge>;
3609
- node: Attributes<attribute.Node>;
3610
- };
3611
- constructor(id?: string, attributes?: RootClusterAttributes);
3612
- constructor(id?: string, strict?: boolean, attributes?: RootClusterAttributes);
3613
- constructor(strict?: boolean, attributes?: RootClusterAttributes);
3614
- constructor(attributes?: RootClusterAttributes);
3615
- }
3616
- /**
3617
- * Graph object.
3618
- *
3619
- * @description
3620
- * An object representing an omnidirectional graph.
3621
- * @category Primary
3622
- */
3623
- declare class Graph extends RootCluster {}
3624
- /**
3625
- * Digraph object.
3626
- *
3627
- * @description
3628
- * The object representing a directional graph.
3629
- * @category Primary
3630
- */
3631
- declare class Digraph extends RootCluster {}
3632
-
3633
- /**
3634
- * @category Primary
3635
- */
3636
- declare class Edge extends DotObject implements IEdge {
3637
- readonly targets: EdgeTargetTuple;
3638
- /** Comments to include when outputting with toDot. */
3639
- comment?: string;
3640
- readonly attributes: IAttributes<attribute.Edge>;
3641
- constructor(targets: EdgeTargetTuple, attributes?: EdgeAttributes);
3642
- }
3643
-
3644
- /**
3645
- * Node object.
3646
- * @category Primary
3647
- */
3648
- declare class Node extends DotObject implements INode {
3649
- readonly id: string;
3650
- /** Comments to include when outputting with toDot. */
3651
- comment?: string;
3652
- readonly attributes: IAttributes<attribute.Node>;
3653
- constructor(id: string, attributes?: NodeAttributes);
3654
- /** Returns ForwardRefNode with port and compass specified. */
3655
- port(port: string | Partial<IPort>): IForwardRefNode;
3656
- }
3657
-
3658
- interface CreateRootFunction<R extends RootCluster> {
3659
- (id?: string, attributes?: RootClusterAttributes, callback?: (g: R) => void): R;
3660
- (attributes?: RootClusterAttributes, callback?: (g: R) => void): R;
3661
- (id?: string, callback?: (g: R) => void): R;
3662
- (callback?: (g: R) => void): R;
3663
- }
3664
- /** API for creating directional graph objects. */
3665
- declare const digraph: CreateRootFunction<Digraph>;
3666
- /** API for creating omnidirectional graph objects. */
3667
- declare const graph: CreateRootFunction<Graph>;
3668
- /** Provides a strict mode API. */
3669
- declare const strict: {
3670
- /** API for creating directional graph objects in strict mode. */
3671
- digraph: CreateRootFunction<Digraph>;
3672
- /** API for creating omnidirectional graph objects in strict mode. */
3673
- graph: CreateRootFunction<Graph>;
3674
- };
3675
-
3676
- declare function toDot(object: Dot): string;
3677
-
3678
- export {
3679
- Attributes,
3680
- AttributesBase,
3681
- AttributesEntities,
3682
- AttributesObject,
3683
- AttributesValue,
3684
- Cluster,
3685
- ClusterSubgraphAttributes,
3686
- Compass,
3687
- Digraph,
3688
- Dot,
3689
- DotObject,
3690
- Edge,
3691
- EdgeAttributes,
3692
- EdgeTarget,
3693
- EdgeTargetLike,
3694
- EdgeTargetLikeTuple,
3695
- EdgeTargetTuple,
3696
- Graph,
3697
- GraphvizObject,
3698
- IAttributes,
3699
- IAttributesBase,
3700
- ICluster,
3701
- IClusterCommonAttributes,
3702
- IEdge,
3703
- IForwardRefNode,
3704
- IHasAttributes,
3705
- IHasComment,
3706
- INode,
3707
- IPort,
3708
- IRootCluster,
3709
- ISubgraph,
3710
- Node,
3711
- NodeAttributes,
3712
- NodeRef,
3713
- NodeRefGroup,
3714
- NodeRefGroupLike,
3715
- NodeRefLike,
3716
- RootCluster,
3717
- RootClusterAttributes,
3718
- Subgraph,
3719
- attribute,
3720
- digraph,
3721
- graph,
3722
- strict,
3723
- toDot,
3724
- };
1
+ export * from '#/lib/common';
2
+ export * from '#/lib/core';