ts-graphviz 0.15.1 → 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/LICENSE +1 -1
- package/README.ja.md +379 -0
- package/README.md +280 -174
- package/lib/ast/index.cjs +5543 -0
- package/lib/ast/index.d.ts +387 -0
- package/lib/ast/index.js +5527 -0
- package/lib/common/index.cjs +47 -0
- package/lib/common/index.d.ts +2092 -0
- package/lib/common/index.js +45 -0
- package/lib/core/index.cjs +446 -0
- package/lib/core/index.d.ts +3027 -0
- package/lib/core/index.js +444 -0
- package/lib/index.cjs +25 -0
- package/lib/index.d.ts +2 -3456
- package/lib/index.js +2 -16
- package/lib/utils/index.cjs +43 -0
- package/lib/utils/index.d.ts +22 -0
- package/lib/utils/index.js +37 -0
- package/media/state-machine.dot +10 -0
- package/media/state-machine.svg +1 -0
- package/media/ts-graphviz.dot +20 -0
- package/media/ts-graphviz.svg +1 -0
- package/package.json +58 -35
- package/tsconfig.build.json +8 -0
- package/lib/bundle.min.js +0 -16
- package/lib/index.mjs +0 -16
- package/scripts/build.ts +0 -42
|
@@ -0,0 +1,2092 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Directive indicating which direction the Edge should point.
|
|
3
|
+
*/
|
|
4
|
+
declare type Compass = 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw' | 'c' | '_';
|
|
5
|
+
/**
|
|
6
|
+
* A double with an optional prefix `'+'`.
|
|
7
|
+
*
|
|
8
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/addDouble/ addDouble}
|
|
9
|
+
*/
|
|
10
|
+
declare type AddDouble = `+${Double}`;
|
|
11
|
+
/**
|
|
12
|
+
* Double-precision floating point number.
|
|
13
|
+
*
|
|
14
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/double/ double}
|
|
15
|
+
*/
|
|
16
|
+
declare type Double = number;
|
|
17
|
+
/**
|
|
18
|
+
* Port Position
|
|
19
|
+
*
|
|
20
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/portPos/ portPos}
|
|
21
|
+
*/
|
|
22
|
+
declare type PortPos = `${string}:${Compass}` | Compass;
|
|
23
|
+
/**
|
|
24
|
+
* A colon-separated list of doubles: `"%f(:%f)*"` where each %f is a double.
|
|
25
|
+
*
|
|
26
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/doubleList/ doubleList}
|
|
27
|
+
*/
|
|
28
|
+
declare type DoubleList =
|
|
29
|
+
| Double
|
|
30
|
+
| `${Double}:${Double}`
|
|
31
|
+
| `${Double}:${Double}:${Double}`
|
|
32
|
+
| `${Double}:${Double}:${Double}:${Double}`
|
|
33
|
+
| `${Double}:${Double}:${Double}:${Double}:${Double}`
|
|
34
|
+
| `${Double}:${Double}:${Double}:${Double}:${Double}:${Double}`
|
|
35
|
+
| `${Double}:${Double}:${Double}:${Double}:${Double}:${Double}:${Double}`
|
|
36
|
+
| `${Double}:${Double}:${Double}:${Double}:${Double}:${Double}:${Double}:${Double}`
|
|
37
|
+
| `${Double}:${Double}:${Double}:${Double}:${Double}:${Double}:${Double}:${Double}:${Double}`;
|
|
38
|
+
/**
|
|
39
|
+
* Integer number.
|
|
40
|
+
*
|
|
41
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/int/ int}
|
|
42
|
+
*/
|
|
43
|
+
declare type Int = number;
|
|
44
|
+
/**
|
|
45
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/shape/ shape}
|
|
46
|
+
*/
|
|
47
|
+
declare type Shape = string;
|
|
48
|
+
/**
|
|
49
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/smoothType/ smoothType}
|
|
50
|
+
*/
|
|
51
|
+
declare type SmoothType = 'none' | 'avg_dist' | 'graph_dist' | 'power_dist' | 'rng' | 'spring' | 'triangle';
|
|
52
|
+
/**
|
|
53
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/splineType/ splineType}
|
|
54
|
+
*/
|
|
55
|
+
declare type SplineType = SplineType.spline | string;
|
|
56
|
+
declare namespace SplineType {
|
|
57
|
+
type prefix = endp | startp | `${endp}${startp}` | '';
|
|
58
|
+
type spline = `${prefix}point ${triple}`;
|
|
59
|
+
type triple = `${Point} ${Point} ${Point}`;
|
|
60
|
+
type endp = `e,${Double},${Double} `;
|
|
61
|
+
type startp = `s,${Double},${Double} `;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/startType/ startType}
|
|
65
|
+
*/
|
|
66
|
+
declare type StartType = `${StartType.style}${StartType.seed}`;
|
|
67
|
+
declare namespace StartType {
|
|
68
|
+
type style = 'regular' | 'self' | 'random';
|
|
69
|
+
type seed = number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/style/ style}
|
|
73
|
+
*/
|
|
74
|
+
declare type Style =
|
|
75
|
+
| Style.styleItem
|
|
76
|
+
| `${Style.styleItem},${Style.styleItem}`
|
|
77
|
+
| `${Style.styleItem},${Style.styleItem},${Style.styleItem}`
|
|
78
|
+
| `${Style.styleItem},${Style.styleItem},${Style.styleItem},${Style.styleItem}`;
|
|
79
|
+
declare namespace Style {
|
|
80
|
+
type styleItem =
|
|
81
|
+
| 'dashed'
|
|
82
|
+
| 'dotted'
|
|
83
|
+
| 'solid'
|
|
84
|
+
| 'invis'
|
|
85
|
+
| 'bold'
|
|
86
|
+
| 'tapered'
|
|
87
|
+
| 'filled'
|
|
88
|
+
| 'striped'
|
|
89
|
+
| 'wedged'
|
|
90
|
+
| 'diagonals'
|
|
91
|
+
| 'rounded'
|
|
92
|
+
| 'filled'
|
|
93
|
+
| 'striped'
|
|
94
|
+
| 'rounded'
|
|
95
|
+
| 'radial';
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/viewPort/ viewPort}
|
|
99
|
+
*/
|
|
100
|
+
declare type ViewPort = `${Double},${Double},${Double},${Double},${Double}` | `${Double},${Double},${Double},${string}`;
|
|
101
|
+
/**
|
|
102
|
+
* list of strings separated by characters from the layersep attribute (by default, colons, tabs or spaces),
|
|
103
|
+
* defining layer names and implicitly numbered 1,2,…
|
|
104
|
+
*
|
|
105
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/layerList/ layerList}
|
|
106
|
+
*/
|
|
107
|
+
declare type LayerList = string;
|
|
108
|
+
/**
|
|
109
|
+
* specifies a list of layers defined by the layers attribute.
|
|
110
|
+
*
|
|
111
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/layerRange/ layerRange}
|
|
112
|
+
*/
|
|
113
|
+
declare type LayerRange = string;
|
|
114
|
+
/**
|
|
115
|
+
* String with Escape Sequences
|
|
116
|
+
*
|
|
117
|
+
* A string allowing escape sequences which are replaced according to the context.
|
|
118
|
+
*
|
|
119
|
+
* For node attributes, the substring `"\N"` is replaced by the name of the node,
|
|
120
|
+
* and the substring `"\G"` by the name of the graph.
|
|
121
|
+
*
|
|
122
|
+
* For graph or cluster attributes, the substring `"\G"` is replaced by the name of the graph or cluster.
|
|
123
|
+
*
|
|
124
|
+
* For edge attributes, the substring `"\E"` is replaced by the name of the edge, the substring `"\G"` is replaced by the name of the graph or cluster,
|
|
125
|
+
* and the substrings `"\T"` and `"\H"` by the names of the tail and head nodes,
|
|
126
|
+
* respectively.
|
|
127
|
+
*
|
|
128
|
+
* The name of an edge is the string formed from the name of the tail node,
|
|
129
|
+
* the appropriate edge operator (`"--"` or `"->"`) and the name of the head node.
|
|
130
|
+
*
|
|
131
|
+
* In all cases, the substring `"\L"` is replaced by the object's label attribute.
|
|
132
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/escString/ escString}
|
|
133
|
+
*/
|
|
134
|
+
declare type EscString = string;
|
|
135
|
+
/**
|
|
136
|
+
* @see {@link https://graphviz.org/doc/info/shapes.html#html HTML-Like Labels}
|
|
137
|
+
*/
|
|
138
|
+
declare type HTMLLikeLabel = `<${string}>`;
|
|
139
|
+
/**
|
|
140
|
+
* An escString or an HTML label.
|
|
141
|
+
*
|
|
142
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/lblString/ lblString}
|
|
143
|
+
*/
|
|
144
|
+
declare type LblString = HTMLLikeLabel | EscString;
|
|
145
|
+
/**
|
|
146
|
+
* `"%f,%f('!')?"` representing the point (x,y).
|
|
147
|
+
*
|
|
148
|
+
* The optional `'!'` indicates the node position should not change (input-only).
|
|
149
|
+
*
|
|
150
|
+
* If dim=3, point may also have the format `"%f,%f,%f('!')?"` to represent the point (x,y,z).
|
|
151
|
+
*/
|
|
152
|
+
declare type Point = Point.position | `${Point.position}!`;
|
|
153
|
+
declare namespace Point {
|
|
154
|
+
type position =
|
|
155
|
+
| `%${Double},%${Double}`
|
|
156
|
+
| `%${Double},%${Double},%${Double}`
|
|
157
|
+
| `%${Double},%${Double},%${Double},%${Double},%${Double}`
|
|
158
|
+
| `%${Double},%${Double},%${Double},%${Double},%${Double},%${Double}`
|
|
159
|
+
| `%${Double},%${Double},%${Double},%${Double},%${Double},%${Double},%${Double}`
|
|
160
|
+
| `%${Double},%${Double},%${Double},%${Double},%${Double},%${Double},%${Double},%${Double}`
|
|
161
|
+
| `%${Double},%${Double},%${Double},%${Double},%${Double},%${Double},%${Double},%${Double},%${Double}`
|
|
162
|
+
| `%${Double},%${Double},%${Double},%${Double},%${Double},%${Double},%${Double},%${Double},%${Double},%${number}`;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* A point with an optional prefix `'+'`.
|
|
166
|
+
*
|
|
167
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/addPoint/ addPoint}
|
|
168
|
+
*/
|
|
169
|
+
declare type AddPoint = `+${Point}`;
|
|
170
|
+
/**
|
|
171
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/pointList/ pointList}
|
|
172
|
+
*/
|
|
173
|
+
declare type PointList =
|
|
174
|
+
| Point
|
|
175
|
+
| `${Point} ${Point}`
|
|
176
|
+
| `${Point} ${Point} ${Point}`
|
|
177
|
+
| `${Point} ${Point} ${Point} ${Point}`;
|
|
178
|
+
/**
|
|
179
|
+
* These specify the order in which nodes and edges are drawn in concrete output.
|
|
180
|
+
*
|
|
181
|
+
* - The default `"breadthfirst"` is the simplest, but when the graph layout does not avoid edge-node overlap, this mode will sometimes have edges drawn over nodes and sometimes on top of nodes.
|
|
182
|
+
* - If the mode `"nodesfirst"` is chosen, all nodes are drawn first, followed by the edges. This guarantees an edge-node overlap will not be mistaken for an edge ending at a node.
|
|
183
|
+
* - On the other hand, usually for aesthetic reasons, it may be desirable that all edges appear beneath nodes, even if the resulting drawing is ambiguous. This can be achieved by choosing `"edgesfirst"`.
|
|
184
|
+
*
|
|
185
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/outputMode/ outputMode}
|
|
186
|
+
*/
|
|
187
|
+
declare type OutputMode = 'breadthfirst' | 'nodesfirst' | 'edgesfirst';
|
|
188
|
+
/**
|
|
189
|
+
* @see {@link https://graphviz.org/docs/attr-types/packMode/ packMode}
|
|
190
|
+
*/
|
|
191
|
+
declare type PackMode = 'node' | 'clust' | 'graph' | `array${string}`;
|
|
192
|
+
/**
|
|
193
|
+
* Using `"fast"` gives about a 2-4 times overall speedup compared with `"normal"`,
|
|
194
|
+
* though layout quality can suffer a little.
|
|
195
|
+
*
|
|
196
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/quadType/ quadType}
|
|
197
|
+
*/
|
|
198
|
+
declare type QuadType = 'normal' | 'fast' | 'none';
|
|
199
|
+
/**
|
|
200
|
+
* Rank Direction
|
|
201
|
+
*
|
|
202
|
+
* Corresponding to directed graphs drawn from top to bottom,
|
|
203
|
+
* from left to right, from bottom to top, and from right to left, respectively.
|
|
204
|
+
*
|
|
205
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/rankdir/ rankdir}
|
|
206
|
+
*/
|
|
207
|
+
declare type Rankdir = 'TB' | 'LR' | 'BT' | 'RL';
|
|
208
|
+
/**
|
|
209
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/rankType/ rankType}
|
|
210
|
+
*/
|
|
211
|
+
declare type RankType = 'same' | 'min' | 'source' | 'max' | 'sink';
|
|
212
|
+
/**
|
|
213
|
+
* `"%f,%f,%f,%f"`
|
|
214
|
+
*
|
|
215
|
+
* The rectangle `llx,lly,urx,ury` gives the coordinates, in points,
|
|
216
|
+
* of the lower-left corner `(llx,lly)` and the upper-right corner `(urx,ury)`.
|
|
217
|
+
*
|
|
218
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/rect/ rect}
|
|
219
|
+
*/
|
|
220
|
+
declare type Rect = `${Double},${Double},${Double},${Double}`;
|
|
221
|
+
/**
|
|
222
|
+
* The examples above show a set of commonly used arrow shapes.
|
|
223
|
+
*
|
|
224
|
+
* There is a grammar of arrow shapes which can be used to describe a collection of 3,111,696 arrow
|
|
225
|
+
* combinations of the 42 variations of the primitive set of 11 arrows.
|
|
226
|
+
*
|
|
227
|
+
* @see {@link https://graphviz.org/docs/attr-types/arrowType/ arrowType}
|
|
228
|
+
*/
|
|
229
|
+
declare type ArrowType = ArrowType.aname | `${ArrowType.aname}${ArrowType.aname}`;
|
|
230
|
+
declare namespace ArrowType {
|
|
231
|
+
type shape = 'box' | 'crow' | 'curve' | 'icurve' | 'diamond' | 'dot' | 'inv' | 'none' | 'normal' | 'tee' | 'vee';
|
|
232
|
+
type side = 'l' | 'r';
|
|
233
|
+
type modifiers = side | 'o' | `o${side}`;
|
|
234
|
+
type aname = shape | `${modifiers}${shape}`;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/clusterMode/ clusterMode}
|
|
238
|
+
*/
|
|
239
|
+
declare type ClusterMode = 'local' | 'global' | 'none';
|
|
240
|
+
/**
|
|
241
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/color/ color}
|
|
242
|
+
*/
|
|
243
|
+
declare type Color = Color.RGB_RGBA | Color.HSV | Color.ColorName | number;
|
|
244
|
+
declare namespace Color {
|
|
245
|
+
/**
|
|
246
|
+
* `"#%2x%2x%2x"` Red-Green-Blue (RGB)
|
|
247
|
+
*
|
|
248
|
+
* `"#%2x%2x%2x%2x"` Red-Green-Blue-Alpha (RGBA)
|
|
249
|
+
* @note A type that is too complicated to express in TypeScript.
|
|
250
|
+
*/
|
|
251
|
+
type RGB_RGBA = `#${string}`;
|
|
252
|
+
/**
|
|
253
|
+
* Hue-Saturation-Value (HSV) 0.0 <= H,S,V <= 1.0
|
|
254
|
+
*/
|
|
255
|
+
type HSV = `${number}+${number}+${number}`;
|
|
256
|
+
/**
|
|
257
|
+
* Color names are resolved in the context of a color scheme.
|
|
258
|
+
*
|
|
259
|
+
* Graphviz currently supports the X11 scheme, the SVG scheme, and the Brewer schemes, with X11 being the default.
|
|
260
|
+
* @see {@link https://graphviz.org/doc/info/colors.html Color Names}
|
|
261
|
+
*/
|
|
262
|
+
type ColorName =
|
|
263
|
+
| 'aliceblue'
|
|
264
|
+
| 'antiquewhite'
|
|
265
|
+
| 'antiquewhite1'
|
|
266
|
+
| 'antiquewhite2'
|
|
267
|
+
| 'antiquewhite3'
|
|
268
|
+
| 'antiquewhite4'
|
|
269
|
+
| 'aqua'
|
|
270
|
+
| 'aquamarine'
|
|
271
|
+
| 'aquamarine1'
|
|
272
|
+
| 'aquamarine2'
|
|
273
|
+
| 'aquamarine3'
|
|
274
|
+
| 'aquamarine4'
|
|
275
|
+
| 'azure'
|
|
276
|
+
| 'azure1'
|
|
277
|
+
| 'azure2'
|
|
278
|
+
| 'azure3'
|
|
279
|
+
| 'azure4'
|
|
280
|
+
| 'beige'
|
|
281
|
+
| 'bisque'
|
|
282
|
+
| 'bisque1'
|
|
283
|
+
| 'bisque2'
|
|
284
|
+
| 'bisque3'
|
|
285
|
+
| 'bisque4'
|
|
286
|
+
| 'black'
|
|
287
|
+
| 'blanchedalmond'
|
|
288
|
+
| 'blue'
|
|
289
|
+
| 'blue1'
|
|
290
|
+
| 'blue2'
|
|
291
|
+
| 'blue3'
|
|
292
|
+
| 'blue4'
|
|
293
|
+
| 'blueviolet'
|
|
294
|
+
| 'brown'
|
|
295
|
+
| 'brown1'
|
|
296
|
+
| 'brown2'
|
|
297
|
+
| 'brown3'
|
|
298
|
+
| 'brown4'
|
|
299
|
+
| 'burlywood'
|
|
300
|
+
| 'burlywood1'
|
|
301
|
+
| 'burlywood2'
|
|
302
|
+
| 'burlywood3'
|
|
303
|
+
| 'burlywood4'
|
|
304
|
+
| 'cadetblue'
|
|
305
|
+
| 'cadetblue1'
|
|
306
|
+
| 'cadetblue2'
|
|
307
|
+
| 'cadetblue3'
|
|
308
|
+
| 'cadetblue4'
|
|
309
|
+
| 'chartreuse'
|
|
310
|
+
| 'chartreuse1'
|
|
311
|
+
| 'chartreuse2'
|
|
312
|
+
| 'chartreuse3'
|
|
313
|
+
| 'chartreuse4'
|
|
314
|
+
| 'chocolate'
|
|
315
|
+
| 'chocolate1'
|
|
316
|
+
| 'chocolate2'
|
|
317
|
+
| 'chocolate3'
|
|
318
|
+
| 'chocolate4'
|
|
319
|
+
| 'coral'
|
|
320
|
+
| 'coral1'
|
|
321
|
+
| 'coral2'
|
|
322
|
+
| 'coral3'
|
|
323
|
+
| 'coral4'
|
|
324
|
+
| 'cornflowerblue'
|
|
325
|
+
| 'cornsilk'
|
|
326
|
+
| 'cornsilk1'
|
|
327
|
+
| 'cornsilk2'
|
|
328
|
+
| 'cornsilk3'
|
|
329
|
+
| 'cornsilk4'
|
|
330
|
+
| 'crimson'
|
|
331
|
+
| 'cyan'
|
|
332
|
+
| 'cyan1'
|
|
333
|
+
| 'cyan2'
|
|
334
|
+
| 'cyan3'
|
|
335
|
+
| 'cyan4'
|
|
336
|
+
| 'darkblue'
|
|
337
|
+
| 'darkcyan'
|
|
338
|
+
| 'darkgoldenrod'
|
|
339
|
+
| 'darkgoldenrod1'
|
|
340
|
+
| 'darkgoldenrod2'
|
|
341
|
+
| 'darkgoldenrod3'
|
|
342
|
+
| 'darkgoldenrod4'
|
|
343
|
+
| 'darkgray'
|
|
344
|
+
| 'darkgreen'
|
|
345
|
+
| 'darkgrey'
|
|
346
|
+
| 'darkkhaki'
|
|
347
|
+
| 'darkmagenta'
|
|
348
|
+
| 'darkolivegreen'
|
|
349
|
+
| 'darkolivegreen1'
|
|
350
|
+
| 'darkolivegreen2'
|
|
351
|
+
| 'darkolivegreen3'
|
|
352
|
+
| 'darkolivegreen4'
|
|
353
|
+
| 'darkorange'
|
|
354
|
+
| 'darkorange1'
|
|
355
|
+
| 'darkorange2'
|
|
356
|
+
| 'darkorange3'
|
|
357
|
+
| 'darkorange4'
|
|
358
|
+
| 'darkorchid'
|
|
359
|
+
| 'darkorchid1'
|
|
360
|
+
| 'darkorchid2'
|
|
361
|
+
| 'darkorchid3'
|
|
362
|
+
| 'darkorchid4'
|
|
363
|
+
| 'darkred'
|
|
364
|
+
| 'darksalmon'
|
|
365
|
+
| 'darkseagreen'
|
|
366
|
+
| 'darkseagreen1'
|
|
367
|
+
| 'darkseagreen2'
|
|
368
|
+
| 'darkseagreen3'
|
|
369
|
+
| 'darkseagreen4'
|
|
370
|
+
| 'darkslateblue'
|
|
371
|
+
| 'darkslategray'
|
|
372
|
+
| 'darkslategray1'
|
|
373
|
+
| 'darkslategray2'
|
|
374
|
+
| 'darkslategray3'
|
|
375
|
+
| 'darkslategray4'
|
|
376
|
+
| 'darkslategrey'
|
|
377
|
+
| 'darkturquoise'
|
|
378
|
+
| 'darkviolet'
|
|
379
|
+
| 'deeppink'
|
|
380
|
+
| 'deeppink1'
|
|
381
|
+
| 'deeppink2'
|
|
382
|
+
| 'deeppink3'
|
|
383
|
+
| 'deeppink4'
|
|
384
|
+
| 'deepskyblue'
|
|
385
|
+
| 'deepskyblue1'
|
|
386
|
+
| 'deepskyblue2'
|
|
387
|
+
| 'deepskyblue3'
|
|
388
|
+
| 'deepskyblue4'
|
|
389
|
+
| 'dimgray'
|
|
390
|
+
| 'dimgrey'
|
|
391
|
+
| 'dodgerblue'
|
|
392
|
+
| 'dodgerblue1'
|
|
393
|
+
| 'dodgerblue2'
|
|
394
|
+
| 'dodgerblue3'
|
|
395
|
+
| 'dodgerblue4'
|
|
396
|
+
| 'firebrick'
|
|
397
|
+
| 'firebrick1'
|
|
398
|
+
| 'firebrick2'
|
|
399
|
+
| 'firebrick3'
|
|
400
|
+
| 'firebrick4'
|
|
401
|
+
| 'floralwhite'
|
|
402
|
+
| 'forestgreen'
|
|
403
|
+
| 'fuchsia'
|
|
404
|
+
| 'gainsboro'
|
|
405
|
+
| 'ghostwhite'
|
|
406
|
+
| 'gold'
|
|
407
|
+
| 'gold1'
|
|
408
|
+
| 'gold2'
|
|
409
|
+
| 'gold3'
|
|
410
|
+
| 'gold4'
|
|
411
|
+
| 'goldenrod'
|
|
412
|
+
| 'goldenrod1'
|
|
413
|
+
| 'goldenrod2'
|
|
414
|
+
| 'goldenrod3'
|
|
415
|
+
| 'goldenrod4'
|
|
416
|
+
| 'gray'
|
|
417
|
+
| 'gray0'
|
|
418
|
+
| 'gray1'
|
|
419
|
+
| 'gray10'
|
|
420
|
+
| 'gray100'
|
|
421
|
+
| 'gray11'
|
|
422
|
+
| 'gray12'
|
|
423
|
+
| 'gray13'
|
|
424
|
+
| 'gray14'
|
|
425
|
+
| 'gray15'
|
|
426
|
+
| 'gray16'
|
|
427
|
+
| 'gray17'
|
|
428
|
+
| 'gray18'
|
|
429
|
+
| 'gray19'
|
|
430
|
+
| 'gray2'
|
|
431
|
+
| 'gray20'
|
|
432
|
+
| 'gray21'
|
|
433
|
+
| 'gray22'
|
|
434
|
+
| 'gray23'
|
|
435
|
+
| 'gray24'
|
|
436
|
+
| 'gray25'
|
|
437
|
+
| 'gray26'
|
|
438
|
+
| 'gray27'
|
|
439
|
+
| 'gray28'
|
|
440
|
+
| 'gray29'
|
|
441
|
+
| 'gray3'
|
|
442
|
+
| 'gray30'
|
|
443
|
+
| 'gray31'
|
|
444
|
+
| 'gray32'
|
|
445
|
+
| 'gray33'
|
|
446
|
+
| 'gray34'
|
|
447
|
+
| 'gray35'
|
|
448
|
+
| 'gray36'
|
|
449
|
+
| 'gray37'
|
|
450
|
+
| 'gray38'
|
|
451
|
+
| 'gray39'
|
|
452
|
+
| 'gray4'
|
|
453
|
+
| 'gray40'
|
|
454
|
+
| 'gray41'
|
|
455
|
+
| 'gray42'
|
|
456
|
+
| 'gray43'
|
|
457
|
+
| 'gray44'
|
|
458
|
+
| 'gray45'
|
|
459
|
+
| 'gray46'
|
|
460
|
+
| 'gray47'
|
|
461
|
+
| 'gray48'
|
|
462
|
+
| 'gray49'
|
|
463
|
+
| 'gray5'
|
|
464
|
+
| 'gray50'
|
|
465
|
+
| 'gray51'
|
|
466
|
+
| 'gray52'
|
|
467
|
+
| 'gray53'
|
|
468
|
+
| 'gray54'
|
|
469
|
+
| 'gray55'
|
|
470
|
+
| 'gray56'
|
|
471
|
+
| 'gray57'
|
|
472
|
+
| 'gray58'
|
|
473
|
+
| 'gray59'
|
|
474
|
+
| 'gray6'
|
|
475
|
+
| 'gray60'
|
|
476
|
+
| 'gray61'
|
|
477
|
+
| 'gray62'
|
|
478
|
+
| 'gray63'
|
|
479
|
+
| 'gray64'
|
|
480
|
+
| 'gray65'
|
|
481
|
+
| 'gray66'
|
|
482
|
+
| 'gray67'
|
|
483
|
+
| 'gray68'
|
|
484
|
+
| 'gray69'
|
|
485
|
+
| 'gray7'
|
|
486
|
+
| 'gray70'
|
|
487
|
+
| 'gray71'
|
|
488
|
+
| 'gray72'
|
|
489
|
+
| 'gray73'
|
|
490
|
+
| 'gray74'
|
|
491
|
+
| 'gray75'
|
|
492
|
+
| 'gray76'
|
|
493
|
+
| 'gray77'
|
|
494
|
+
| 'gray78'
|
|
495
|
+
| 'gray79'
|
|
496
|
+
| 'gray8'
|
|
497
|
+
| 'gray80'
|
|
498
|
+
| 'gray81'
|
|
499
|
+
| 'gray82'
|
|
500
|
+
| 'gray83'
|
|
501
|
+
| 'gray84'
|
|
502
|
+
| 'gray85'
|
|
503
|
+
| 'gray86'
|
|
504
|
+
| 'gray87'
|
|
505
|
+
| 'gray88'
|
|
506
|
+
| 'gray89'
|
|
507
|
+
| 'gray9'
|
|
508
|
+
| 'gray90'
|
|
509
|
+
| 'gray91'
|
|
510
|
+
| 'gray92'
|
|
511
|
+
| 'gray93'
|
|
512
|
+
| 'gray94'
|
|
513
|
+
| 'gray95'
|
|
514
|
+
| 'gray96'
|
|
515
|
+
| 'gray97'
|
|
516
|
+
| 'gray98'
|
|
517
|
+
| 'gray99'
|
|
518
|
+
| 'green'
|
|
519
|
+
| 'green1'
|
|
520
|
+
| 'green2'
|
|
521
|
+
| 'green3'
|
|
522
|
+
| 'green4'
|
|
523
|
+
| 'greenyellow'
|
|
524
|
+
| 'grey'
|
|
525
|
+
| 'grey0'
|
|
526
|
+
| 'grey1'
|
|
527
|
+
| 'grey10'
|
|
528
|
+
| 'grey100'
|
|
529
|
+
| 'grey11'
|
|
530
|
+
| 'grey12'
|
|
531
|
+
| 'grey13'
|
|
532
|
+
| 'grey14'
|
|
533
|
+
| 'grey15'
|
|
534
|
+
| 'grey16'
|
|
535
|
+
| 'grey17'
|
|
536
|
+
| 'grey18'
|
|
537
|
+
| 'grey19'
|
|
538
|
+
| 'grey2'
|
|
539
|
+
| 'grey20'
|
|
540
|
+
| 'grey21'
|
|
541
|
+
| 'grey22'
|
|
542
|
+
| 'grey23'
|
|
543
|
+
| 'grey24'
|
|
544
|
+
| 'grey25'
|
|
545
|
+
| 'grey26'
|
|
546
|
+
| 'grey27'
|
|
547
|
+
| 'grey28'
|
|
548
|
+
| 'grey29'
|
|
549
|
+
| 'grey3'
|
|
550
|
+
| 'grey30'
|
|
551
|
+
| 'grey31'
|
|
552
|
+
| 'grey32'
|
|
553
|
+
| 'grey33'
|
|
554
|
+
| 'grey34'
|
|
555
|
+
| 'grey35'
|
|
556
|
+
| 'grey36'
|
|
557
|
+
| 'grey37'
|
|
558
|
+
| 'grey38'
|
|
559
|
+
| 'grey39'
|
|
560
|
+
| 'grey4'
|
|
561
|
+
| 'grey40'
|
|
562
|
+
| 'grey41'
|
|
563
|
+
| 'grey42'
|
|
564
|
+
| 'grey43'
|
|
565
|
+
| 'grey44'
|
|
566
|
+
| 'grey45'
|
|
567
|
+
| 'grey46'
|
|
568
|
+
| 'grey47'
|
|
569
|
+
| 'grey48'
|
|
570
|
+
| 'grey49'
|
|
571
|
+
| 'grey5'
|
|
572
|
+
| 'grey50'
|
|
573
|
+
| 'grey51'
|
|
574
|
+
| 'grey52'
|
|
575
|
+
| 'grey53'
|
|
576
|
+
| 'grey54'
|
|
577
|
+
| 'grey55'
|
|
578
|
+
| 'grey56'
|
|
579
|
+
| 'grey57'
|
|
580
|
+
| 'grey58'
|
|
581
|
+
| 'grey59'
|
|
582
|
+
| 'grey6'
|
|
583
|
+
| 'grey60'
|
|
584
|
+
| 'grey61'
|
|
585
|
+
| 'grey62'
|
|
586
|
+
| 'grey63'
|
|
587
|
+
| 'grey64'
|
|
588
|
+
| 'grey65'
|
|
589
|
+
| 'grey66'
|
|
590
|
+
| 'grey67'
|
|
591
|
+
| 'grey68'
|
|
592
|
+
| 'grey69'
|
|
593
|
+
| 'grey7'
|
|
594
|
+
| 'grey70'
|
|
595
|
+
| 'grey71'
|
|
596
|
+
| 'grey72'
|
|
597
|
+
| 'grey73'
|
|
598
|
+
| 'grey74'
|
|
599
|
+
| 'grey75'
|
|
600
|
+
| 'grey76'
|
|
601
|
+
| 'grey77'
|
|
602
|
+
| 'grey78'
|
|
603
|
+
| 'grey79'
|
|
604
|
+
| 'grey8'
|
|
605
|
+
| 'grey80'
|
|
606
|
+
| 'grey81'
|
|
607
|
+
| 'grey82'
|
|
608
|
+
| 'grey83'
|
|
609
|
+
| 'grey84'
|
|
610
|
+
| 'grey85'
|
|
611
|
+
| 'grey86'
|
|
612
|
+
| 'grey87'
|
|
613
|
+
| 'grey88'
|
|
614
|
+
| 'grey89'
|
|
615
|
+
| 'grey9'
|
|
616
|
+
| 'grey90'
|
|
617
|
+
| 'grey91'
|
|
618
|
+
| 'grey92'
|
|
619
|
+
| 'grey93'
|
|
620
|
+
| 'grey94'
|
|
621
|
+
| 'grey95'
|
|
622
|
+
| 'grey96'
|
|
623
|
+
| 'grey97'
|
|
624
|
+
| 'grey98'
|
|
625
|
+
| 'grey99'
|
|
626
|
+
| 'honeydew'
|
|
627
|
+
| 'honeydew1'
|
|
628
|
+
| 'honeydew2'
|
|
629
|
+
| 'honeydew3'
|
|
630
|
+
| 'honeydew4'
|
|
631
|
+
| 'hotpink'
|
|
632
|
+
| 'hotpink1'
|
|
633
|
+
| 'hotpink2'
|
|
634
|
+
| 'hotpink3'
|
|
635
|
+
| 'hotpink4'
|
|
636
|
+
| 'indianred'
|
|
637
|
+
| 'indianred1'
|
|
638
|
+
| 'indianred2'
|
|
639
|
+
| 'indianred3'
|
|
640
|
+
| 'indianred4'
|
|
641
|
+
| 'indigo'
|
|
642
|
+
| 'invis'
|
|
643
|
+
| 'ivory'
|
|
644
|
+
| 'ivory1'
|
|
645
|
+
| 'ivory2'
|
|
646
|
+
| 'ivory3'
|
|
647
|
+
| 'ivory4'
|
|
648
|
+
| 'khaki'
|
|
649
|
+
| 'khaki1'
|
|
650
|
+
| 'khaki2'
|
|
651
|
+
| 'khaki3'
|
|
652
|
+
| 'khaki4'
|
|
653
|
+
| 'lavender'
|
|
654
|
+
| 'lavenderblush'
|
|
655
|
+
| 'lavenderblush1'
|
|
656
|
+
| 'lavenderblush2'
|
|
657
|
+
| 'lavenderblush3'
|
|
658
|
+
| 'lavenderblush4'
|
|
659
|
+
| 'lawngreen'
|
|
660
|
+
| 'lemonchiffon'
|
|
661
|
+
| 'lemonchiffon1'
|
|
662
|
+
| 'lemonchiffon2'
|
|
663
|
+
| 'lemonchiffon3'
|
|
664
|
+
| 'lemonchiffon4'
|
|
665
|
+
| 'lightblue'
|
|
666
|
+
| 'lightblue1'
|
|
667
|
+
| 'lightblue2'
|
|
668
|
+
| 'lightblue3'
|
|
669
|
+
| 'lightblue4'
|
|
670
|
+
| 'lightcoral'
|
|
671
|
+
| 'lightcyan'
|
|
672
|
+
| 'lightcyan1'
|
|
673
|
+
| 'lightcyan2'
|
|
674
|
+
| 'lightcyan3'
|
|
675
|
+
| 'lightcyan4'
|
|
676
|
+
| 'lightgoldenrod'
|
|
677
|
+
| 'lightgoldenrod1'
|
|
678
|
+
| 'lightgoldenrod2'
|
|
679
|
+
| 'lightgoldenrod3'
|
|
680
|
+
| 'lightgoldenrod4'
|
|
681
|
+
| 'lightgoldenrodyellow'
|
|
682
|
+
| 'lightgray'
|
|
683
|
+
| 'lightgreen'
|
|
684
|
+
| 'lightgrey'
|
|
685
|
+
| 'lightpink'
|
|
686
|
+
| 'lightpink1'
|
|
687
|
+
| 'lightpink2'
|
|
688
|
+
| 'lightpink3'
|
|
689
|
+
| 'lightpink4'
|
|
690
|
+
| 'lightsalmon'
|
|
691
|
+
| 'lightsalmon1'
|
|
692
|
+
| 'lightsalmon2'
|
|
693
|
+
| 'lightsalmon3'
|
|
694
|
+
| 'lightsalmon4'
|
|
695
|
+
| 'lightseagreen'
|
|
696
|
+
| 'lightskyblue'
|
|
697
|
+
| 'lightskyblue1'
|
|
698
|
+
| 'lightskyblue2'
|
|
699
|
+
| 'lightskyblue3'
|
|
700
|
+
| 'lightskyblue4'
|
|
701
|
+
| 'lightslateblue'
|
|
702
|
+
| 'lightslategray'
|
|
703
|
+
| 'lightslategrey'
|
|
704
|
+
| 'lightsteelblue'
|
|
705
|
+
| 'lightsteelblue1'
|
|
706
|
+
| 'lightsteelblue2'
|
|
707
|
+
| 'lightsteelblue3'
|
|
708
|
+
| 'lightsteelblue4'
|
|
709
|
+
| 'lightyellow'
|
|
710
|
+
| 'lightyellow1'
|
|
711
|
+
| 'lightyellow2'
|
|
712
|
+
| 'lightyellow3'
|
|
713
|
+
| 'lightyellow4'
|
|
714
|
+
| 'lime'
|
|
715
|
+
| 'limegreen'
|
|
716
|
+
| 'linen'
|
|
717
|
+
| 'magenta'
|
|
718
|
+
| 'magenta1'
|
|
719
|
+
| 'magenta2'
|
|
720
|
+
| 'magenta3'
|
|
721
|
+
| 'magenta4'
|
|
722
|
+
| 'maroon'
|
|
723
|
+
| 'maroon1'
|
|
724
|
+
| 'maroon2'
|
|
725
|
+
| 'maroon3'
|
|
726
|
+
| 'maroon4'
|
|
727
|
+
| 'mediumaquamarine'
|
|
728
|
+
| 'mediumblue'
|
|
729
|
+
| 'mediumorchid'
|
|
730
|
+
| 'mediumorchid1'
|
|
731
|
+
| 'mediumorchid2'
|
|
732
|
+
| 'mediumorchid3'
|
|
733
|
+
| 'mediumorchid4'
|
|
734
|
+
| 'mediumpurple'
|
|
735
|
+
| 'mediumpurple1'
|
|
736
|
+
| 'mediumpurple2'
|
|
737
|
+
| 'mediumpurple3'
|
|
738
|
+
| 'mediumpurple4'
|
|
739
|
+
| 'mediumseagreen'
|
|
740
|
+
| 'mediumslateblue'
|
|
741
|
+
| 'mediumspringgreen'
|
|
742
|
+
| 'mediumturquoise'
|
|
743
|
+
| 'mediumvioletred'
|
|
744
|
+
| 'midnightblue'
|
|
745
|
+
| 'mintcream'
|
|
746
|
+
| 'mistyrose'
|
|
747
|
+
| 'mistyrose1'
|
|
748
|
+
| 'mistyrose2'
|
|
749
|
+
| 'mistyrose3'
|
|
750
|
+
| 'mistyrose4'
|
|
751
|
+
| 'moccasin'
|
|
752
|
+
| 'navajowhite'
|
|
753
|
+
| 'navajowhite1'
|
|
754
|
+
| 'navajowhite2'
|
|
755
|
+
| 'navajowhite3'
|
|
756
|
+
| 'navajowhite4'
|
|
757
|
+
| 'navy'
|
|
758
|
+
| 'navyblue'
|
|
759
|
+
| 'none'
|
|
760
|
+
| 'oldlace'
|
|
761
|
+
| 'olive'
|
|
762
|
+
| 'olivedrab'
|
|
763
|
+
| 'olivedrab1'
|
|
764
|
+
| 'olivedrab2'
|
|
765
|
+
| 'olivedrab3'
|
|
766
|
+
| 'olivedrab4'
|
|
767
|
+
| 'orange'
|
|
768
|
+
| 'orange1'
|
|
769
|
+
| 'orange2'
|
|
770
|
+
| 'orange3'
|
|
771
|
+
| 'orange4'
|
|
772
|
+
| 'orangered'
|
|
773
|
+
| 'orangered1'
|
|
774
|
+
| 'orangered2'
|
|
775
|
+
| 'orangered3'
|
|
776
|
+
| 'orangered4'
|
|
777
|
+
| 'orchid'
|
|
778
|
+
| 'orchid1'
|
|
779
|
+
| 'orchid2'
|
|
780
|
+
| 'orchid3'
|
|
781
|
+
| 'orchid4'
|
|
782
|
+
| 'palegoldenrod'
|
|
783
|
+
| 'palegreen'
|
|
784
|
+
| 'palegreen1'
|
|
785
|
+
| 'palegreen2'
|
|
786
|
+
| 'palegreen3'
|
|
787
|
+
| 'palegreen4'
|
|
788
|
+
| 'paleturquoise'
|
|
789
|
+
| 'paleturquoise1'
|
|
790
|
+
| 'paleturquoise2'
|
|
791
|
+
| 'paleturquoise3'
|
|
792
|
+
| 'paleturquoise4'
|
|
793
|
+
| 'palevioletred'
|
|
794
|
+
| 'palevioletred1'
|
|
795
|
+
| 'palevioletred2'
|
|
796
|
+
| 'palevioletred3'
|
|
797
|
+
| 'palevioletred4'
|
|
798
|
+
| 'papayawhip'
|
|
799
|
+
| 'peachpuff'
|
|
800
|
+
| 'peachpuff1'
|
|
801
|
+
| 'peachpuff2'
|
|
802
|
+
| 'peachpuff3'
|
|
803
|
+
| 'peachpuff4'
|
|
804
|
+
| 'peru'
|
|
805
|
+
| 'pink'
|
|
806
|
+
| 'pink1'
|
|
807
|
+
| 'pink2'
|
|
808
|
+
| 'pink3'
|
|
809
|
+
| 'pink4'
|
|
810
|
+
| 'plum'
|
|
811
|
+
| 'plum1'
|
|
812
|
+
| 'plum2'
|
|
813
|
+
| 'plum3'
|
|
814
|
+
| 'plum4'
|
|
815
|
+
| 'powderblue'
|
|
816
|
+
| 'purple'
|
|
817
|
+
| 'purple1'
|
|
818
|
+
| 'purple2'
|
|
819
|
+
| 'purple3'
|
|
820
|
+
| 'purple4'
|
|
821
|
+
| 'rebeccapurple'
|
|
822
|
+
| 'red'
|
|
823
|
+
| 'red1'
|
|
824
|
+
| 'red2'
|
|
825
|
+
| 'red3'
|
|
826
|
+
| 'red4'
|
|
827
|
+
| 'rosybrown'
|
|
828
|
+
| 'rosybrown1'
|
|
829
|
+
| 'rosybrown2'
|
|
830
|
+
| 'rosybrown3'
|
|
831
|
+
| 'rosybrown4'
|
|
832
|
+
| 'royalblue'
|
|
833
|
+
| 'royalblue1'
|
|
834
|
+
| 'royalblue2'
|
|
835
|
+
| 'royalblue3'
|
|
836
|
+
| 'royalblue4'
|
|
837
|
+
| 'saddlebrown'
|
|
838
|
+
| 'salmon'
|
|
839
|
+
| 'salmon1'
|
|
840
|
+
| 'salmon2'
|
|
841
|
+
| 'salmon3'
|
|
842
|
+
| 'salmon4'
|
|
843
|
+
| 'sandybrown'
|
|
844
|
+
| 'seagreen'
|
|
845
|
+
| 'seagreen1'
|
|
846
|
+
| 'seagreen2'
|
|
847
|
+
| 'seagreen3'
|
|
848
|
+
| 'seagreen4'
|
|
849
|
+
| 'seashell'
|
|
850
|
+
| 'seashell1'
|
|
851
|
+
| 'seashell2'
|
|
852
|
+
| 'seashell3'
|
|
853
|
+
| 'seashell4'
|
|
854
|
+
| 'sienna'
|
|
855
|
+
| 'sienna1'
|
|
856
|
+
| 'sienna2'
|
|
857
|
+
| 'sienna3'
|
|
858
|
+
| 'sienna4'
|
|
859
|
+
| 'silver'
|
|
860
|
+
| 'skyblue'
|
|
861
|
+
| 'skyblue1'
|
|
862
|
+
| 'skyblue2'
|
|
863
|
+
| 'skyblue3'
|
|
864
|
+
| 'skyblue4'
|
|
865
|
+
| 'slateblue'
|
|
866
|
+
| 'slateblue1'
|
|
867
|
+
| 'slateblue2'
|
|
868
|
+
| 'slateblue3'
|
|
869
|
+
| 'slateblue4'
|
|
870
|
+
| 'slategray'
|
|
871
|
+
| 'slategray1'
|
|
872
|
+
| 'slategray2'
|
|
873
|
+
| 'slategray3'
|
|
874
|
+
| 'slategray4'
|
|
875
|
+
| 'slategrey'
|
|
876
|
+
| 'snow'
|
|
877
|
+
| 'snow1'
|
|
878
|
+
| 'snow2'
|
|
879
|
+
| 'snow3'
|
|
880
|
+
| 'snow4'
|
|
881
|
+
| 'springgreen'
|
|
882
|
+
| 'springgreen1'
|
|
883
|
+
| 'springgreen2'
|
|
884
|
+
| 'springgreen3'
|
|
885
|
+
| 'springgreen4'
|
|
886
|
+
| 'steelblue'
|
|
887
|
+
| 'steelblue1'
|
|
888
|
+
| 'steelblue2'
|
|
889
|
+
| 'steelblue3'
|
|
890
|
+
| 'steelblue4'
|
|
891
|
+
| 'tan'
|
|
892
|
+
| 'tan1'
|
|
893
|
+
| 'tan2'
|
|
894
|
+
| 'tan3'
|
|
895
|
+
| 'tan4'
|
|
896
|
+
| 'teal'
|
|
897
|
+
| 'thistle'
|
|
898
|
+
| 'thistle1'
|
|
899
|
+
| 'thistle2'
|
|
900
|
+
| 'thistle3'
|
|
901
|
+
| 'thistle4'
|
|
902
|
+
| 'tomato'
|
|
903
|
+
| 'tomato1'
|
|
904
|
+
| 'tomato2'
|
|
905
|
+
| 'tomato3'
|
|
906
|
+
| 'tomato4'
|
|
907
|
+
| 'transparent'
|
|
908
|
+
| 'turquoise'
|
|
909
|
+
| 'turquoise1'
|
|
910
|
+
| 'turquoise2'
|
|
911
|
+
| 'turquoise3'
|
|
912
|
+
| 'turquoise4'
|
|
913
|
+
| 'violet'
|
|
914
|
+
| 'violetred'
|
|
915
|
+
| 'violetred1'
|
|
916
|
+
| 'violetred2'
|
|
917
|
+
| 'violetred3'
|
|
918
|
+
| 'violetred4'
|
|
919
|
+
| 'webgray'
|
|
920
|
+
| 'webgreen'
|
|
921
|
+
| 'webgrey'
|
|
922
|
+
| 'webmaroon'
|
|
923
|
+
| 'webpurple'
|
|
924
|
+
| 'wheat'
|
|
925
|
+
| 'wheat1'
|
|
926
|
+
| 'wheat2'
|
|
927
|
+
| 'wheat3'
|
|
928
|
+
| 'wheat4'
|
|
929
|
+
| 'white'
|
|
930
|
+
| 'whitesmoke'
|
|
931
|
+
| 'x11gray'
|
|
932
|
+
| 'x11green'
|
|
933
|
+
| 'x11grey'
|
|
934
|
+
| 'x11maroon'
|
|
935
|
+
| 'x11purple'
|
|
936
|
+
| 'yellow'
|
|
937
|
+
| 'yellow1'
|
|
938
|
+
| 'yellow2'
|
|
939
|
+
| 'yellow3'
|
|
940
|
+
| 'yellow4'
|
|
941
|
+
| 'yellowgreen'
|
|
942
|
+
| 'aliceblue'
|
|
943
|
+
| 'antiquewhite'
|
|
944
|
+
| 'aqua'
|
|
945
|
+
| 'aquamarine'
|
|
946
|
+
| 'azure'
|
|
947
|
+
| 'beige'
|
|
948
|
+
| 'bisque'
|
|
949
|
+
| 'black'
|
|
950
|
+
| 'blanchedalmond'
|
|
951
|
+
| 'blue'
|
|
952
|
+
| 'blueviolet'
|
|
953
|
+
| 'brown'
|
|
954
|
+
| 'burlywood'
|
|
955
|
+
| 'cadetblue'
|
|
956
|
+
| 'chartreuse'
|
|
957
|
+
| 'chocolate'
|
|
958
|
+
| 'coral'
|
|
959
|
+
| 'cornflowerblue'
|
|
960
|
+
| 'cornsilk'
|
|
961
|
+
| 'crimson'
|
|
962
|
+
| 'cyan'
|
|
963
|
+
| 'darkblue'
|
|
964
|
+
| 'darkcyan'
|
|
965
|
+
| 'darkgoldenrod'
|
|
966
|
+
| 'darkgray'
|
|
967
|
+
| 'darkgreen'
|
|
968
|
+
| 'darkgrey'
|
|
969
|
+
| 'darkkhaki'
|
|
970
|
+
| 'darkmagenta'
|
|
971
|
+
| 'darkolivegreen'
|
|
972
|
+
| 'darkorange'
|
|
973
|
+
| 'darkorchid'
|
|
974
|
+
| 'darkred'
|
|
975
|
+
| 'darksalmon'
|
|
976
|
+
| 'darkseagreen'
|
|
977
|
+
| 'darkslateblue'
|
|
978
|
+
| 'darkslategray'
|
|
979
|
+
| 'darkslategrey'
|
|
980
|
+
| 'darkturquoise'
|
|
981
|
+
| 'darkviolet'
|
|
982
|
+
| 'deeppink'
|
|
983
|
+
| 'deepskyblue'
|
|
984
|
+
| 'dimgray'
|
|
985
|
+
| 'dimgrey'
|
|
986
|
+
| 'dodgerblue'
|
|
987
|
+
| 'firebrick'
|
|
988
|
+
| 'floralwhite'
|
|
989
|
+
| 'forestgreen'
|
|
990
|
+
| 'fuchsia'
|
|
991
|
+
| 'gainsboro'
|
|
992
|
+
| 'ghostwhite'
|
|
993
|
+
| 'gold'
|
|
994
|
+
| 'goldenrod'
|
|
995
|
+
| 'gray'
|
|
996
|
+
| 'grey'
|
|
997
|
+
| 'green'
|
|
998
|
+
| 'greenyellow'
|
|
999
|
+
| 'honeydew'
|
|
1000
|
+
| 'hotpink'
|
|
1001
|
+
| 'indianred'
|
|
1002
|
+
| 'indigo'
|
|
1003
|
+
| 'ivory'
|
|
1004
|
+
| 'khaki'
|
|
1005
|
+
| 'lavender'
|
|
1006
|
+
| 'lavenderblush'
|
|
1007
|
+
| 'lawngreen'
|
|
1008
|
+
| 'lemonchiffon'
|
|
1009
|
+
| 'lightblue'
|
|
1010
|
+
| 'lightcoral'
|
|
1011
|
+
| 'lightcyan'
|
|
1012
|
+
| 'lightgoldenrodyellow'
|
|
1013
|
+
| 'lightgray'
|
|
1014
|
+
| 'lightgreen'
|
|
1015
|
+
| 'lightgrey'
|
|
1016
|
+
| 'lightpink'
|
|
1017
|
+
| 'lightsalmon'
|
|
1018
|
+
| 'lightseagreen'
|
|
1019
|
+
| 'lightskyblue'
|
|
1020
|
+
| 'lightslategray'
|
|
1021
|
+
| 'lightslategrey'
|
|
1022
|
+
| 'lightsteelblue'
|
|
1023
|
+
| 'lightyellow'
|
|
1024
|
+
| 'lime'
|
|
1025
|
+
| 'limegreen'
|
|
1026
|
+
| 'linen'
|
|
1027
|
+
| 'magenta'
|
|
1028
|
+
| 'maroon'
|
|
1029
|
+
| 'mediumaquamarine'
|
|
1030
|
+
| 'mediumblue'
|
|
1031
|
+
| 'mediumorchid'
|
|
1032
|
+
| 'mediumpurple'
|
|
1033
|
+
| 'mediumseagreen'
|
|
1034
|
+
| 'mediumslateblue'
|
|
1035
|
+
| 'mediumspringgreen'
|
|
1036
|
+
| 'mediumturquoise'
|
|
1037
|
+
| 'mediumvioletred'
|
|
1038
|
+
| 'midnightblue'
|
|
1039
|
+
| 'mintcream'
|
|
1040
|
+
| 'mistyrose'
|
|
1041
|
+
| 'moccasin'
|
|
1042
|
+
| 'navajowhite'
|
|
1043
|
+
| 'navy'
|
|
1044
|
+
| 'oldlace'
|
|
1045
|
+
| 'olive'
|
|
1046
|
+
| 'olivedrab'
|
|
1047
|
+
| 'orange'
|
|
1048
|
+
| 'orangered'
|
|
1049
|
+
| 'orchid'
|
|
1050
|
+
| 'palegoldenrod'
|
|
1051
|
+
| 'palegreen'
|
|
1052
|
+
| 'paleturquoise'
|
|
1053
|
+
| 'palevioletred'
|
|
1054
|
+
| 'papayawhip'
|
|
1055
|
+
| 'peachpuff'
|
|
1056
|
+
| 'peru'
|
|
1057
|
+
| 'pink'
|
|
1058
|
+
| 'plum'
|
|
1059
|
+
| 'powderblue'
|
|
1060
|
+
| 'purple'
|
|
1061
|
+
| 'red'
|
|
1062
|
+
| 'rosybrown'
|
|
1063
|
+
| 'royalblue'
|
|
1064
|
+
| 'saddlebrown'
|
|
1065
|
+
| 'salmon'
|
|
1066
|
+
| 'sandybrown'
|
|
1067
|
+
| 'seagreen'
|
|
1068
|
+
| 'seashell'
|
|
1069
|
+
| 'sienna'
|
|
1070
|
+
| 'silver'
|
|
1071
|
+
| 'skyblue'
|
|
1072
|
+
| 'slateblue'
|
|
1073
|
+
| 'slategray'
|
|
1074
|
+
| 'slategrey'
|
|
1075
|
+
| 'snow'
|
|
1076
|
+
| 'springgreen'
|
|
1077
|
+
| 'steelblue'
|
|
1078
|
+
| 'tan'
|
|
1079
|
+
| 'teal'
|
|
1080
|
+
| 'thistle'
|
|
1081
|
+
| 'tomato'
|
|
1082
|
+
| 'turquoise'
|
|
1083
|
+
| 'violet'
|
|
1084
|
+
| 'wheat'
|
|
1085
|
+
| 'white'
|
|
1086
|
+
| 'whitesmoke'
|
|
1087
|
+
| 'yellow'
|
|
1088
|
+
| 'yellowgreen';
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* A colon-separated list of weighted color values: WC(:WC)* where each WC has the form C(;F)? with C a color value and the optional F a floating-point number, 0 ≤ F ≤ 1.
|
|
1092
|
+
*
|
|
1093
|
+
* The sum of the floating-point numbers in a colorList must sum to at most 1.
|
|
1094
|
+
*
|
|
1095
|
+
* @note A type that is too complicated to express in TypeScript.
|
|
1096
|
+
*
|
|
1097
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/colorList/}
|
|
1098
|
+
*/
|
|
1099
|
+
declare type ColorList = string;
|
|
1100
|
+
/**
|
|
1101
|
+
* Direction Type
|
|
1102
|
+
*
|
|
1103
|
+
* @see {@link https://graphviz.gitlab.io/docs/attr-types/dirType/ dirType}
|
|
1104
|
+
*/
|
|
1105
|
+
declare type DirType = 'forward' | 'back' | 'both' | 'none';
|
|
1106
|
+
/**
|
|
1107
|
+
* Page Direction
|
|
1108
|
+
*
|
|
1109
|
+
* @see {@link https://graphviz.org/docs/attr-types/pagedir/ pagedir}
|
|
1110
|
+
*/
|
|
1111
|
+
declare type Pagedir = `${Pagedir.TB}${Pagedir.RL}`;
|
|
1112
|
+
declare namespace Pagedir {
|
|
1113
|
+
type TB = 'T' | 'B';
|
|
1114
|
+
type RL = 'R' | 'L';
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
/**
|
|
1118
|
+
* Attribute types available for edges.
|
|
1119
|
+
*/
|
|
1120
|
+
declare type EdgeAttributeKey =
|
|
1121
|
+
| 'URL'
|
|
1122
|
+
| 'arrowhead'
|
|
1123
|
+
| 'arrowsize'
|
|
1124
|
+
| 'arrowtail'
|
|
1125
|
+
| 'color'
|
|
1126
|
+
| 'colorscheme'
|
|
1127
|
+
| 'comment'
|
|
1128
|
+
| 'constraint'
|
|
1129
|
+
| 'decorate'
|
|
1130
|
+
| 'dir'
|
|
1131
|
+
| 'edgeURL'
|
|
1132
|
+
| 'edgehref'
|
|
1133
|
+
| 'edgetarget'
|
|
1134
|
+
| 'edgetooltip'
|
|
1135
|
+
| 'fillcolor'
|
|
1136
|
+
| 'fontcolor'
|
|
1137
|
+
| 'fontname'
|
|
1138
|
+
| 'fontsize'
|
|
1139
|
+
| 'headURL'
|
|
1140
|
+
| 'head_lp'
|
|
1141
|
+
| 'headclip'
|
|
1142
|
+
| 'headhref'
|
|
1143
|
+
| 'headlabel'
|
|
1144
|
+
| 'headport'
|
|
1145
|
+
| 'headtarget'
|
|
1146
|
+
| 'headtooltip'
|
|
1147
|
+
| 'href'
|
|
1148
|
+
| 'id'
|
|
1149
|
+
| 'label'
|
|
1150
|
+
| 'labelURL'
|
|
1151
|
+
| 'labelangle'
|
|
1152
|
+
| 'labeldistance'
|
|
1153
|
+
| 'labelfloat'
|
|
1154
|
+
| 'labelfontcolor'
|
|
1155
|
+
| 'labelfontname'
|
|
1156
|
+
| 'labelfontsize'
|
|
1157
|
+
| 'labelhref'
|
|
1158
|
+
| 'labeltarget'
|
|
1159
|
+
| 'labeltooltip'
|
|
1160
|
+
| 'layer'
|
|
1161
|
+
| 'len'
|
|
1162
|
+
| 'lhead'
|
|
1163
|
+
| 'lp'
|
|
1164
|
+
| 'ltail'
|
|
1165
|
+
| 'minlen'
|
|
1166
|
+
| 'nojustify'
|
|
1167
|
+
| 'penwidth'
|
|
1168
|
+
| 'pos'
|
|
1169
|
+
| 'samehead'
|
|
1170
|
+
| 'sametail'
|
|
1171
|
+
| 'showboxes'
|
|
1172
|
+
| 'style'
|
|
1173
|
+
| 'tailURL'
|
|
1174
|
+
| 'tail_lp'
|
|
1175
|
+
| 'tailclip'
|
|
1176
|
+
| 'tailhref'
|
|
1177
|
+
| 'taillabel'
|
|
1178
|
+
| 'tailport'
|
|
1179
|
+
| 'tailtarget'
|
|
1180
|
+
| 'tailtooltip'
|
|
1181
|
+
| 'target'
|
|
1182
|
+
| 'tooltip'
|
|
1183
|
+
| 'weight'
|
|
1184
|
+
| 'xlabel'
|
|
1185
|
+
| 'xlp'
|
|
1186
|
+
| '_class';
|
|
1187
|
+
/**
|
|
1188
|
+
* Attribute types available for nodes.
|
|
1189
|
+
*/
|
|
1190
|
+
declare type NodeAttributeKey =
|
|
1191
|
+
| 'URL'
|
|
1192
|
+
| 'area'
|
|
1193
|
+
| 'color'
|
|
1194
|
+
| 'colorscheme'
|
|
1195
|
+
| 'comment'
|
|
1196
|
+
| 'distortion'
|
|
1197
|
+
| 'fillcolor'
|
|
1198
|
+
| 'fixedsize'
|
|
1199
|
+
| 'fontcolor'
|
|
1200
|
+
| 'fontname'
|
|
1201
|
+
| 'fontsize'
|
|
1202
|
+
| 'gradientangle'
|
|
1203
|
+
| 'group'
|
|
1204
|
+
| 'height'
|
|
1205
|
+
| 'href'
|
|
1206
|
+
| 'id'
|
|
1207
|
+
| 'image'
|
|
1208
|
+
| 'imagepos'
|
|
1209
|
+
| 'imagescale'
|
|
1210
|
+
| 'label'
|
|
1211
|
+
| 'labelloc'
|
|
1212
|
+
| 'layer'
|
|
1213
|
+
| 'margin'
|
|
1214
|
+
| 'nojustify'
|
|
1215
|
+
| 'ordering'
|
|
1216
|
+
| 'orientation'
|
|
1217
|
+
| 'penwidth'
|
|
1218
|
+
| 'peripheries'
|
|
1219
|
+
| 'pin'
|
|
1220
|
+
| 'pos'
|
|
1221
|
+
| 'rects'
|
|
1222
|
+
| 'regular'
|
|
1223
|
+
| 'root'
|
|
1224
|
+
| 'samplepoints'
|
|
1225
|
+
| 'shape'
|
|
1226
|
+
| 'shapefile'
|
|
1227
|
+
| 'showboxes'
|
|
1228
|
+
| 'sides'
|
|
1229
|
+
| 'skew'
|
|
1230
|
+
| 'sortv'
|
|
1231
|
+
| 'style'
|
|
1232
|
+
| 'target'
|
|
1233
|
+
| 'tooltip'
|
|
1234
|
+
| 'vertices'
|
|
1235
|
+
| 'width'
|
|
1236
|
+
| 'xlabel'
|
|
1237
|
+
| 'xlp'
|
|
1238
|
+
| 'z'
|
|
1239
|
+
| '_class';
|
|
1240
|
+
/**
|
|
1241
|
+
* Attribute types available for graph.
|
|
1242
|
+
*/
|
|
1243
|
+
declare type GraphAttributeKey =
|
|
1244
|
+
| 'Damping'
|
|
1245
|
+
| 'K'
|
|
1246
|
+
| 'URL'
|
|
1247
|
+
| '_background'
|
|
1248
|
+
| 'bb'
|
|
1249
|
+
| 'bgcolor'
|
|
1250
|
+
| 'center'
|
|
1251
|
+
| 'charset'
|
|
1252
|
+
| 'clusterrank'
|
|
1253
|
+
| 'colorscheme'
|
|
1254
|
+
| 'comment'
|
|
1255
|
+
| 'compound'
|
|
1256
|
+
| 'concentrate'
|
|
1257
|
+
| 'defaultdist'
|
|
1258
|
+
| 'dim'
|
|
1259
|
+
| 'dimen'
|
|
1260
|
+
| 'diredgeconstraints'
|
|
1261
|
+
| 'dpi'
|
|
1262
|
+
| 'epsilon'
|
|
1263
|
+
| 'esep'
|
|
1264
|
+
| 'fontcolor'
|
|
1265
|
+
| 'fontname'
|
|
1266
|
+
| 'fontnames'
|
|
1267
|
+
| 'fontpath'
|
|
1268
|
+
| 'fontsize'
|
|
1269
|
+
| 'forcelabels'
|
|
1270
|
+
| 'gradientangle'
|
|
1271
|
+
| 'href'
|
|
1272
|
+
| 'id'
|
|
1273
|
+
| 'imagepath'
|
|
1274
|
+
| 'inputscale'
|
|
1275
|
+
| 'label'
|
|
1276
|
+
| 'label_scheme'
|
|
1277
|
+
| 'labeljust'
|
|
1278
|
+
| 'labelloc'
|
|
1279
|
+
| 'landscape'
|
|
1280
|
+
| 'layerlistsep'
|
|
1281
|
+
| 'layers'
|
|
1282
|
+
| 'layerselect'
|
|
1283
|
+
| 'layersep'
|
|
1284
|
+
| 'layout'
|
|
1285
|
+
| 'levels'
|
|
1286
|
+
| 'levelsgap'
|
|
1287
|
+
| 'lheight'
|
|
1288
|
+
| 'lp'
|
|
1289
|
+
| 'lwidth'
|
|
1290
|
+
| 'margin'
|
|
1291
|
+
| 'maxiter'
|
|
1292
|
+
| 'mclimit'
|
|
1293
|
+
| 'mindist'
|
|
1294
|
+
| 'mode'
|
|
1295
|
+
| 'model'
|
|
1296
|
+
| 'mosek'
|
|
1297
|
+
| 'newrank'
|
|
1298
|
+
| 'nodesep'
|
|
1299
|
+
| 'nojustify'
|
|
1300
|
+
| 'normalize'
|
|
1301
|
+
| 'notranslate'
|
|
1302
|
+
| 'nslimit'
|
|
1303
|
+
| 'nslimit1'
|
|
1304
|
+
| 'ordering'
|
|
1305
|
+
| 'orientation'
|
|
1306
|
+
| 'outputorder'
|
|
1307
|
+
| 'overlap'
|
|
1308
|
+
| 'overlap_scaling'
|
|
1309
|
+
| 'overlap_shrink'
|
|
1310
|
+
| 'pack'
|
|
1311
|
+
| 'packmode'
|
|
1312
|
+
| 'pad'
|
|
1313
|
+
| 'page'
|
|
1314
|
+
| 'pagedir'
|
|
1315
|
+
| 'quadtree'
|
|
1316
|
+
| 'quantum'
|
|
1317
|
+
| 'rankdir'
|
|
1318
|
+
| 'ranksep'
|
|
1319
|
+
| 'ratio'
|
|
1320
|
+
| 'remincross'
|
|
1321
|
+
| 'repulsiveforce'
|
|
1322
|
+
| 'resolution'
|
|
1323
|
+
| 'root'
|
|
1324
|
+
| 'rotate'
|
|
1325
|
+
| 'rotation'
|
|
1326
|
+
| 'scale'
|
|
1327
|
+
| 'searchsize'
|
|
1328
|
+
| 'sep'
|
|
1329
|
+
| 'showboxes'
|
|
1330
|
+
| 'size'
|
|
1331
|
+
| 'smoothing'
|
|
1332
|
+
| 'sortv'
|
|
1333
|
+
| 'splines'
|
|
1334
|
+
| 'start'
|
|
1335
|
+
| 'style'
|
|
1336
|
+
| 'stylesheet'
|
|
1337
|
+
| 'target'
|
|
1338
|
+
| 'truecolor'
|
|
1339
|
+
| 'viewport'
|
|
1340
|
+
| 'voro_margin'
|
|
1341
|
+
| 'xdotversion'
|
|
1342
|
+
| '_class';
|
|
1343
|
+
/**
|
|
1344
|
+
* Attribute types available for subgraph.
|
|
1345
|
+
*/
|
|
1346
|
+
declare type SubgraphAttributeKey = 'rank';
|
|
1347
|
+
/**
|
|
1348
|
+
* Attribute types available for cluster subgraph.
|
|
1349
|
+
*/
|
|
1350
|
+
declare type ClusterSubgraphAttributeKey =
|
|
1351
|
+
| 'K'
|
|
1352
|
+
| 'URL'
|
|
1353
|
+
| 'area'
|
|
1354
|
+
| 'bgcolor'
|
|
1355
|
+
| 'color'
|
|
1356
|
+
| 'colorscheme'
|
|
1357
|
+
| 'fillcolor'
|
|
1358
|
+
| 'fontcolor'
|
|
1359
|
+
| 'fontname'
|
|
1360
|
+
| 'fontsize'
|
|
1361
|
+
| 'gradientangle'
|
|
1362
|
+
| 'href'
|
|
1363
|
+
| 'id'
|
|
1364
|
+
| 'label'
|
|
1365
|
+
| 'labeljust'
|
|
1366
|
+
| 'labelloc'
|
|
1367
|
+
| 'layer'
|
|
1368
|
+
| 'lheight'
|
|
1369
|
+
| 'lp'
|
|
1370
|
+
| 'lwidth'
|
|
1371
|
+
| 'margin'
|
|
1372
|
+
| 'nojustify'
|
|
1373
|
+
| 'pencolor'
|
|
1374
|
+
| 'penwidth'
|
|
1375
|
+
| 'peripheries'
|
|
1376
|
+
| 'sortv'
|
|
1377
|
+
| 'style'
|
|
1378
|
+
| 'target'
|
|
1379
|
+
| 'tooltip'
|
|
1380
|
+
| '_class';
|
|
1381
|
+
/**
|
|
1382
|
+
* Attribute types.
|
|
1383
|
+
*/
|
|
1384
|
+
declare type AttributeKey =
|
|
1385
|
+
| NodeAttributeKey
|
|
1386
|
+
| EdgeAttributeKey
|
|
1387
|
+
| GraphAttributeKey
|
|
1388
|
+
| SubgraphAttributeKey
|
|
1389
|
+
| ClusterSubgraphAttributeKey;
|
|
1390
|
+
|
|
1391
|
+
interface KeyValueMapping {
|
|
1392
|
+
_background: string;
|
|
1393
|
+
area: Double;
|
|
1394
|
+
arrowhead: ArrowType;
|
|
1395
|
+
arrowsize: Double;
|
|
1396
|
+
arrowtail: ArrowType;
|
|
1397
|
+
bb: Rect;
|
|
1398
|
+
bgcolor: Color | ColorList;
|
|
1399
|
+
center: boolean;
|
|
1400
|
+
charset: string;
|
|
1401
|
+
_class: string;
|
|
1402
|
+
clusterrank: ClusterMode;
|
|
1403
|
+
color: Color | ColorList;
|
|
1404
|
+
colorscheme: string;
|
|
1405
|
+
comment: string;
|
|
1406
|
+
compound: boolean;
|
|
1407
|
+
concentrate: boolean;
|
|
1408
|
+
constraint: boolean;
|
|
1409
|
+
Damping: Double;
|
|
1410
|
+
decorate: boolean;
|
|
1411
|
+
defaultdist: Double;
|
|
1412
|
+
dim: Int;
|
|
1413
|
+
dimen: Int;
|
|
1414
|
+
dir: DirType;
|
|
1415
|
+
diredgeconstraints: string | boolean;
|
|
1416
|
+
distortion: Double;
|
|
1417
|
+
dpi: Double;
|
|
1418
|
+
edgehref: EscString;
|
|
1419
|
+
edgetarget: EscString;
|
|
1420
|
+
edgetooltip: EscString;
|
|
1421
|
+
edgeURL: EscString;
|
|
1422
|
+
epsilon: Double;
|
|
1423
|
+
esep: AddDouble | AddPoint;
|
|
1424
|
+
fillcolor: Color | ColorList;
|
|
1425
|
+
fixedsize: boolean | string;
|
|
1426
|
+
fontcolor: Color;
|
|
1427
|
+
fontname: string;
|
|
1428
|
+
fontnames: string;
|
|
1429
|
+
fontpath: string;
|
|
1430
|
+
fontsize: Double;
|
|
1431
|
+
forcelabels: boolean;
|
|
1432
|
+
gradientangle: Int;
|
|
1433
|
+
group: string;
|
|
1434
|
+
head_lp: Point;
|
|
1435
|
+
headclip: boolean;
|
|
1436
|
+
headhref: EscString;
|
|
1437
|
+
headlabel: LblString;
|
|
1438
|
+
headport: PortPos;
|
|
1439
|
+
headtarget: EscString;
|
|
1440
|
+
headtooltip: EscString;
|
|
1441
|
+
headURL: EscString;
|
|
1442
|
+
height: Double;
|
|
1443
|
+
href: EscString;
|
|
1444
|
+
id: EscString;
|
|
1445
|
+
image: string;
|
|
1446
|
+
imagepath: string;
|
|
1447
|
+
imagepos: string;
|
|
1448
|
+
imagescale: string | boolean;
|
|
1449
|
+
inputscale: Double;
|
|
1450
|
+
K: Double;
|
|
1451
|
+
label: LblString;
|
|
1452
|
+
label_scheme: Int;
|
|
1453
|
+
labelangle: Double;
|
|
1454
|
+
labeldistance: Double;
|
|
1455
|
+
labelfloat: boolean;
|
|
1456
|
+
labelfontcolor: Color;
|
|
1457
|
+
labelfontname: string;
|
|
1458
|
+
labelfontsize: Double;
|
|
1459
|
+
labelhref: EscString;
|
|
1460
|
+
labeljust: string;
|
|
1461
|
+
labelloc: string;
|
|
1462
|
+
labeltarget: EscString;
|
|
1463
|
+
labeltooltip: EscString;
|
|
1464
|
+
labelURL: EscString;
|
|
1465
|
+
landscape: boolean;
|
|
1466
|
+
layer: LayerRange;
|
|
1467
|
+
layerlistsep: string;
|
|
1468
|
+
layers: LayerList;
|
|
1469
|
+
layerselect: LayerRange;
|
|
1470
|
+
layersep: string;
|
|
1471
|
+
layout: string;
|
|
1472
|
+
len: Double;
|
|
1473
|
+
levels: Int;
|
|
1474
|
+
levelsgap: Double;
|
|
1475
|
+
lhead: string;
|
|
1476
|
+
lheight: Double;
|
|
1477
|
+
lp: Point;
|
|
1478
|
+
ltail: string;
|
|
1479
|
+
lwidth: Double;
|
|
1480
|
+
margin: Double | Point;
|
|
1481
|
+
maxiter: Int;
|
|
1482
|
+
mclimit: Double;
|
|
1483
|
+
mindist: Double;
|
|
1484
|
+
minlen: Int;
|
|
1485
|
+
mode: string;
|
|
1486
|
+
model: string;
|
|
1487
|
+
mosek: boolean;
|
|
1488
|
+
newrank: boolean;
|
|
1489
|
+
nodesep: Double;
|
|
1490
|
+
nojustify: boolean;
|
|
1491
|
+
normalize: Double | boolean;
|
|
1492
|
+
notranslate: boolean;
|
|
1493
|
+
nslimit: Double;
|
|
1494
|
+
nslimit1: Double;
|
|
1495
|
+
ordering: string;
|
|
1496
|
+
orientation: string | Double;
|
|
1497
|
+
outputorder: OutputMode;
|
|
1498
|
+
overlap: string | boolean;
|
|
1499
|
+
overlap_scaling: Double;
|
|
1500
|
+
overlap_shrink: boolean;
|
|
1501
|
+
pack: boolean | Int;
|
|
1502
|
+
packmode: PackMode;
|
|
1503
|
+
pad: Double | Point;
|
|
1504
|
+
page: Double | Point;
|
|
1505
|
+
pagedir: Pagedir;
|
|
1506
|
+
pencolor: Color;
|
|
1507
|
+
penwidth: Double;
|
|
1508
|
+
peripheries: Int;
|
|
1509
|
+
pin: boolean;
|
|
1510
|
+
pos: Point | SplineType;
|
|
1511
|
+
quadtree: QuadType | boolean;
|
|
1512
|
+
quantum: Double;
|
|
1513
|
+
rank: RankType;
|
|
1514
|
+
rankdir: Rankdir;
|
|
1515
|
+
ranksep: Double | DoubleList;
|
|
1516
|
+
ratio: Double | string;
|
|
1517
|
+
rects: Rect;
|
|
1518
|
+
regular: boolean;
|
|
1519
|
+
remincross: boolean;
|
|
1520
|
+
repulsiveforce: Double;
|
|
1521
|
+
resolution: Double;
|
|
1522
|
+
root: string | boolean;
|
|
1523
|
+
rotate: Int;
|
|
1524
|
+
rotation: Double;
|
|
1525
|
+
samehead: string;
|
|
1526
|
+
sametail: string;
|
|
1527
|
+
samplepoints: Int;
|
|
1528
|
+
scale: Double | Point;
|
|
1529
|
+
searchsize: Int;
|
|
1530
|
+
sep: AddDouble | AddPoint;
|
|
1531
|
+
shape: Shape;
|
|
1532
|
+
shapefile: string;
|
|
1533
|
+
showboxes: Int;
|
|
1534
|
+
sides: Int;
|
|
1535
|
+
size: Double | Point;
|
|
1536
|
+
skew: Double;
|
|
1537
|
+
smoothing: SmoothType;
|
|
1538
|
+
sortv: Int;
|
|
1539
|
+
splines: boolean | string;
|
|
1540
|
+
start: StartType;
|
|
1541
|
+
style: Style;
|
|
1542
|
+
stylesheet: string;
|
|
1543
|
+
tail_lp: string;
|
|
1544
|
+
tailclip: Point;
|
|
1545
|
+
tailhref: EscString;
|
|
1546
|
+
taillabel: LblString;
|
|
1547
|
+
tailport: PortPos;
|
|
1548
|
+
tailtarget: EscString;
|
|
1549
|
+
tailtooltip: EscString;
|
|
1550
|
+
tailURL: EscString;
|
|
1551
|
+
target: EscString | string;
|
|
1552
|
+
tooltip: EscString;
|
|
1553
|
+
truecolor: boolean;
|
|
1554
|
+
URL: EscString;
|
|
1555
|
+
vertices: PointList;
|
|
1556
|
+
viewport: ViewPort;
|
|
1557
|
+
voro_margin: Double;
|
|
1558
|
+
weight: Int | Double;
|
|
1559
|
+
width: Double;
|
|
1560
|
+
xdotversion: string;
|
|
1561
|
+
xlabel: LblString;
|
|
1562
|
+
xlp: Point;
|
|
1563
|
+
z: Double;
|
|
1564
|
+
}
|
|
1565
|
+
declare type Attribute<T extends AttributeKey> = KeyValueMapping[T];
|
|
1566
|
+
|
|
1567
|
+
declare type ASTType =
|
|
1568
|
+
| 'Literal'
|
|
1569
|
+
| 'Dot'
|
|
1570
|
+
| 'Graph'
|
|
1571
|
+
| 'Attribute'
|
|
1572
|
+
| 'Comment'
|
|
1573
|
+
| 'AttributeList'
|
|
1574
|
+
| 'NodeRef'
|
|
1575
|
+
| 'NodeRefGroup'
|
|
1576
|
+
| 'Edge'
|
|
1577
|
+
| 'Node'
|
|
1578
|
+
| 'Subgraph';
|
|
1579
|
+
/**
|
|
1580
|
+
* Objects that can be Edge destinations satisfy this interface.
|
|
1581
|
+
*/
|
|
1582
|
+
declare type NodeRef = NodeModel | ForwardRefNode;
|
|
1583
|
+
declare type NodeRefGroup = NodeRef[];
|
|
1584
|
+
/**
|
|
1585
|
+
* string or an object implementing IEdgeTarget.
|
|
1586
|
+
*/
|
|
1587
|
+
declare type NodeRefLike = NodeRef | string;
|
|
1588
|
+
declare type NodeRefGroupLike = NodeRefLike[];
|
|
1589
|
+
declare type EdgeTarget = NodeRef | NodeRefGroup;
|
|
1590
|
+
declare type EdgeTargetLike = NodeRefLike | NodeRefGroupLike;
|
|
1591
|
+
declare type EdgeTargetTuple = [from: EdgeTarget, to: EdgeTarget, ...rest: EdgeTarget[]];
|
|
1592
|
+
declare type EdgeTargetLikeTuple = [from: EdgeTargetLike, to: EdgeTargetLike, ...rest: EdgeTargetLike[]];
|
|
1593
|
+
declare type AttributesObject<T extends AttributeKey> = {
|
|
1594
|
+
[K in T]?: Attribute<K>;
|
|
1595
|
+
};
|
|
1596
|
+
declare type AttributeValue = Attribute<AttributeKey>;
|
|
1597
|
+
declare type AttributesEntities<T extends AttributeKey> = readonly [T, Attribute<T>][];
|
|
1598
|
+
declare type EdgeAttributesObject = AttributesObject<EdgeAttributeKey>;
|
|
1599
|
+
declare type NodeAttributesObject = AttributesObject<NodeAttributeKey>;
|
|
1600
|
+
declare type GraphAttributesObject = AttributesObject<GraphAttributeKey>;
|
|
1601
|
+
declare type SubgraphAttributesObject = AttributesObject<ClusterSubgraphAttributeKey | SubgraphAttributeKey>;
|
|
1602
|
+
declare type DotObjectType = 'AttributeList' | 'Node' | 'Edge' | 'Subgraph' | 'Graph';
|
|
1603
|
+
interface DotObjectModel<T extends DotObjectType = DotObjectType> {
|
|
1604
|
+
$$type: T;
|
|
1605
|
+
}
|
|
1606
|
+
interface HasComment {
|
|
1607
|
+
/** Comments to include when outputting with toDot. */
|
|
1608
|
+
comment?: string;
|
|
1609
|
+
}
|
|
1610
|
+
interface HasAttributes<T extends AttributeKey> {
|
|
1611
|
+
readonly attributes: AttributesGroup<T>;
|
|
1612
|
+
}
|
|
1613
|
+
interface ForwardRefNode extends Partial<Port> {
|
|
1614
|
+
readonly id: string;
|
|
1615
|
+
}
|
|
1616
|
+
interface Attributes<T extends AttributeKey> {
|
|
1617
|
+
readonly size: number;
|
|
1618
|
+
readonly values: ReadonlyArray<[T, Attribute<T>]>;
|
|
1619
|
+
get(key: T): Attribute<T> | undefined;
|
|
1620
|
+
set(key: T, value: Attribute<T>): void;
|
|
1621
|
+
apply(attributes: AttributesObject<T> | AttributesEntities<T>): void;
|
|
1622
|
+
delete(key: T): void;
|
|
1623
|
+
clear(): void;
|
|
1624
|
+
}
|
|
1625
|
+
interface AttributesGroup<T extends AttributeKey> extends Attributes<T>, HasComment {}
|
|
1626
|
+
declare type AttributeListKind = 'Graph' | 'Edge' | 'Node';
|
|
1627
|
+
interface AttributeListModel<K extends AttributeListKind = AttributeListKind, T extends AttributeKey = AttributeKey>
|
|
1628
|
+
extends Attributes<T>,
|
|
1629
|
+
HasComment,
|
|
1630
|
+
DotObjectModel<'AttributeList'> {
|
|
1631
|
+
$$kind: K;
|
|
1632
|
+
}
|
|
1633
|
+
interface Port {
|
|
1634
|
+
port: string;
|
|
1635
|
+
compass: Compass;
|
|
1636
|
+
}
|
|
1637
|
+
interface NodeModel extends HasComment, HasAttributes<NodeAttributeKey>, DotObjectModel<'Node'> {
|
|
1638
|
+
readonly id: string;
|
|
1639
|
+
port(port: string | Partial<Port>): ForwardRefNode;
|
|
1640
|
+
}
|
|
1641
|
+
interface EdgeModel extends HasComment, HasAttributes<EdgeAttributeKey>, DotObjectModel<'Edge'> {
|
|
1642
|
+
readonly targets: EdgeTargetTuple;
|
|
1643
|
+
}
|
|
1644
|
+
/**
|
|
1645
|
+
* Cluster common attribute interface.
|
|
1646
|
+
*
|
|
1647
|
+
* @hidden
|
|
1648
|
+
*/
|
|
1649
|
+
interface GraphCommonAttributes {
|
|
1650
|
+
/** Manage common attributes of graphs in a cluster. */
|
|
1651
|
+
graph: AttributeListModel<'Graph', SubgraphAttributeKey | ClusterSubgraphAttributeKey>;
|
|
1652
|
+
/** Manage common attributes of edges in a cluster. */
|
|
1653
|
+
edge: AttributeListModel<'Edge', EdgeAttributeKey>;
|
|
1654
|
+
/** Manage common attributes of nodes in a cluster. */
|
|
1655
|
+
node: AttributeListModel<'Node', NodeAttributeKey>;
|
|
1656
|
+
}
|
|
1657
|
+
interface GraphBaseModel<T extends AttributeKey = AttributeKey> extends HasComment, Attributes<T> {
|
|
1658
|
+
readonly id?: string;
|
|
1659
|
+
readonly attributes: Readonly<GraphCommonAttributes>;
|
|
1660
|
+
readonly nodes: ReadonlyArray<NodeModel>;
|
|
1661
|
+
readonly edges: ReadonlyArray<EdgeModel>;
|
|
1662
|
+
readonly subgraphs: ReadonlyArray<SubgraphModel>;
|
|
1663
|
+
/**
|
|
1664
|
+
* Add a Node to the graph.
|
|
1665
|
+
*/
|
|
1666
|
+
addNode(node: NodeModel): void;
|
|
1667
|
+
/**
|
|
1668
|
+
* Add Edge to the graph.
|
|
1669
|
+
*/
|
|
1670
|
+
addEdge(edge: EdgeModel): void;
|
|
1671
|
+
/**
|
|
1672
|
+
* Add a Subgraph to the graph.
|
|
1673
|
+
*/
|
|
1674
|
+
addSubgraph(subgraph: SubgraphModel): void;
|
|
1675
|
+
/**
|
|
1676
|
+
* Check if the Node exists in the graph.
|
|
1677
|
+
*/
|
|
1678
|
+
existNode(nodeId: string): boolean;
|
|
1679
|
+
/**
|
|
1680
|
+
* Check if the Edge exists in the graph.
|
|
1681
|
+
*/
|
|
1682
|
+
existEdge(edge: EdgeModel): boolean;
|
|
1683
|
+
/**
|
|
1684
|
+
* Check if the Subgraph exists in the graph.
|
|
1685
|
+
*/
|
|
1686
|
+
existSubgraph(subgraph: SubgraphModel): boolean;
|
|
1687
|
+
/**
|
|
1688
|
+
* Remove Node from the graph.
|
|
1689
|
+
*/
|
|
1690
|
+
removeNode(node: NodeModel | string): void;
|
|
1691
|
+
/**
|
|
1692
|
+
* Remove Edge from the graph.
|
|
1693
|
+
*/
|
|
1694
|
+
removeEdge(edge: EdgeModel): void;
|
|
1695
|
+
/**
|
|
1696
|
+
* Remove Subgraph from the graph.
|
|
1697
|
+
*/
|
|
1698
|
+
removeSubgraph(subgraph: SubgraphModel): void;
|
|
1699
|
+
/**
|
|
1700
|
+
* Create a Node in the graph.
|
|
1701
|
+
*/
|
|
1702
|
+
createNode(id: string, attributes?: NodeAttributesObject): NodeModel;
|
|
1703
|
+
/**
|
|
1704
|
+
* Create a Subgraph and add it to the graph.
|
|
1705
|
+
*/
|
|
1706
|
+
createSubgraph(id?: string, attributes?: SubgraphAttributesObject): SubgraphModel;
|
|
1707
|
+
createSubgraph(attributes?: SubgraphAttributesObject): SubgraphModel;
|
|
1708
|
+
/**
|
|
1709
|
+
* Get Subgraph in cluster by specifying id.
|
|
1710
|
+
*
|
|
1711
|
+
* If there is no Subgraph with the specified id in the graph, return undefined.
|
|
1712
|
+
*/
|
|
1713
|
+
getSubgraph(id: string): SubgraphModel | undefined;
|
|
1714
|
+
/**
|
|
1715
|
+
* Get Node in cluster by specifying id.
|
|
1716
|
+
*
|
|
1717
|
+
* @description
|
|
1718
|
+
* If there is no Node with the specified id in the graph, return undefined.
|
|
1719
|
+
*/
|
|
1720
|
+
getNode(id: string): NodeModel | undefined;
|
|
1721
|
+
/** Create Edge and add it to the graph. */
|
|
1722
|
+
createEdge(targets: EdgeTargetLikeTuple, attributes?: EdgeAttributesObject): EdgeModel;
|
|
1723
|
+
/**
|
|
1724
|
+
* Create a subgraph by specifying its id (or get it if it already exists).
|
|
1725
|
+
*
|
|
1726
|
+
* By specifying a callback function, the target subgraph can be received and manipulated as an argument.
|
|
1727
|
+
*
|
|
1728
|
+
* ```ts
|
|
1729
|
+
* const G = digraph('G', (g) => {
|
|
1730
|
+
* // Create a cluster with id as A.
|
|
1731
|
+
* g.subgraph('A', (A) => {
|
|
1732
|
+
* // Create a node with id as A1 in cluster A.
|
|
1733
|
+
* A.node('A1');
|
|
1734
|
+
* });
|
|
1735
|
+
* });
|
|
1736
|
+
*
|
|
1737
|
+
* console.log(toDot(G));
|
|
1738
|
+
* // digraph "G" {
|
|
1739
|
+
* // subgraph "A" {
|
|
1740
|
+
* // "A1";
|
|
1741
|
+
* // }
|
|
1742
|
+
* // }
|
|
1743
|
+
* ```
|
|
1744
|
+
*
|
|
1745
|
+
* @param id Subgraph ID.
|
|
1746
|
+
* @param callback Callbacks for manipulating created or retrieved subgraph.
|
|
1747
|
+
*/
|
|
1748
|
+
subgraph(id: string, callback?: (subgraph: SubgraphModel) => void): SubgraphModel;
|
|
1749
|
+
/**
|
|
1750
|
+
* Create a subgraph (or get one if it already exists) and adapt the attributes.
|
|
1751
|
+
*
|
|
1752
|
+
* By specifying a callback function, the target subgraph can be received and manipulated as an argument.
|
|
1753
|
+
*
|
|
1754
|
+
* ```ts
|
|
1755
|
+
* const G = digraph('G', (g) => {
|
|
1756
|
+
* // Create a cluster with id as A and specifying its attributes.
|
|
1757
|
+
* g.subgraph('A', { [attribute.color]: 'red', [attribute.label]: 'my label' }, (A) => {
|
|
1758
|
+
* // Create a node with id as A1 in cluster A.
|
|
1759
|
+
* A.node('A1');
|
|
1760
|
+
* });
|
|
1761
|
+
* });
|
|
1762
|
+
*
|
|
1763
|
+
* console.log(toDot(G));
|
|
1764
|
+
* // digraph "G" {
|
|
1765
|
+
* // subgraph "A" {
|
|
1766
|
+
* // color = "red";
|
|
1767
|
+
* // label = "my label";
|
|
1768
|
+
* // "A1";
|
|
1769
|
+
* // }
|
|
1770
|
+
* // }
|
|
1771
|
+
* ```
|
|
1772
|
+
*
|
|
1773
|
+
* @param id Subgraph ID.
|
|
1774
|
+
* @param attributes Object of attributes to be adapted to the subgraph.
|
|
1775
|
+
* @param callback Callbacks for manipulating created or retrieved subgraph.
|
|
1776
|
+
*/
|
|
1777
|
+
subgraph(
|
|
1778
|
+
id: string,
|
|
1779
|
+
attributes: SubgraphAttributesObject,
|
|
1780
|
+
callback?: (subgraph: SubgraphModel) => void,
|
|
1781
|
+
): SubgraphModel;
|
|
1782
|
+
/**
|
|
1783
|
+
* Create anonymous subgraphs and and adapt the attributes.
|
|
1784
|
+
*
|
|
1785
|
+
* By specifying a callback function, the target subgraph can be received and manipulated as an argument.
|
|
1786
|
+
*
|
|
1787
|
+
* ```ts
|
|
1788
|
+
* const G = digraph('G', (g) => {
|
|
1789
|
+
* // Create a anonymous cluster and specifying its attributes.
|
|
1790
|
+
* g.subgraph({ [attribute.color]: 'red', [attribute.label]: 'my label' }, (A) => {
|
|
1791
|
+
* // Create a node with id as A1 in anonymous cluster.
|
|
1792
|
+
* A.node('A1');
|
|
1793
|
+
* });
|
|
1794
|
+
* });
|
|
1795
|
+
*
|
|
1796
|
+
* console.log(toDot(G));
|
|
1797
|
+
* // digraph "G" {
|
|
1798
|
+
* // subgraph {
|
|
1799
|
+
* // color = "red";
|
|
1800
|
+
* // label = "my label";
|
|
1801
|
+
* // "A1";
|
|
1802
|
+
* // }
|
|
1803
|
+
* // }
|
|
1804
|
+
* ```
|
|
1805
|
+
*
|
|
1806
|
+
* @param attributes Object of attributes to be adapted to the subgraph.
|
|
1807
|
+
* @param callback Callbacks for manipulating created or retrieved subgraph.
|
|
1808
|
+
*/
|
|
1809
|
+
subgraph(attributes: SubgraphAttributesObject, callback?: (subgraph: SubgraphModel) => void): SubgraphModel;
|
|
1810
|
+
/**
|
|
1811
|
+
* Create anonymous subgraphs and manipulate them with callback functions.
|
|
1812
|
+
*
|
|
1813
|
+
* By specifying a callback function, the target subgraph can be received and manipulated as an argument.
|
|
1814
|
+
*
|
|
1815
|
+
* @param callback Callbacks for manipulating created or retrieved subgraph.
|
|
1816
|
+
*/
|
|
1817
|
+
subgraph(callback?: (subgraph: SubgraphModel) => void): SubgraphModel;
|
|
1818
|
+
/**
|
|
1819
|
+
* Create a node by specifying its id (or get it if it already exists).
|
|
1820
|
+
*
|
|
1821
|
+
* By specifying a callback function, the target node can be received and manipulated as an argument.
|
|
1822
|
+
*
|
|
1823
|
+
* ```ts
|
|
1824
|
+
* const G = digraph('G', (g) => {
|
|
1825
|
+
* // Create a node with id as A.
|
|
1826
|
+
* g.node('A');
|
|
1827
|
+
* });
|
|
1828
|
+
*
|
|
1829
|
+
* console.log(toDot(G));
|
|
1830
|
+
* // digraph "G" {
|
|
1831
|
+
* // "A";
|
|
1832
|
+
* // }
|
|
1833
|
+
* ```
|
|
1834
|
+
*
|
|
1835
|
+
* @param id Node ID.
|
|
1836
|
+
* @param callback Callbacks for manipulating created or retrieved node.
|
|
1837
|
+
*/
|
|
1838
|
+
node(id: string, callback?: (node: NodeModel) => void): NodeModel;
|
|
1839
|
+
/**
|
|
1840
|
+
* Create a node (or get one if it already exists) and adapt the attributes.
|
|
1841
|
+
*
|
|
1842
|
+
* By specifying a callback function, the target node can be received and manipulated as an argument.
|
|
1843
|
+
*
|
|
1844
|
+
* ```ts
|
|
1845
|
+
* const G = digraph('G', (g) => {
|
|
1846
|
+
* // Create a node by specifying its id and specifying its attributes.
|
|
1847
|
+
* g.node('A', {
|
|
1848
|
+
* [attribute.color]: 'red',
|
|
1849
|
+
* [attribute.label]: 'my label',
|
|
1850
|
+
* });
|
|
1851
|
+
* });
|
|
1852
|
+
*
|
|
1853
|
+
* console.log(toDot(G));
|
|
1854
|
+
* // digraph "G" {
|
|
1855
|
+
* // "A" [
|
|
1856
|
+
* // color = "red",
|
|
1857
|
+
* // label = "my label",
|
|
1858
|
+
* // ];
|
|
1859
|
+
* // }
|
|
1860
|
+
* ```
|
|
1861
|
+
*
|
|
1862
|
+
* @param id Node ID.
|
|
1863
|
+
* @param attributes Object of attributes to be adapted to the node.
|
|
1864
|
+
* @param callback Callbacks for manipulating created or retrieved node.
|
|
1865
|
+
*/
|
|
1866
|
+
node(id: string, attributes: NodeAttributesObject, callback?: (node: NodeModel) => void): NodeModel;
|
|
1867
|
+
/**
|
|
1868
|
+
* Set a common attribute for the nodes in the graph.
|
|
1869
|
+
*
|
|
1870
|
+
* ```ts
|
|
1871
|
+
* const G = digraph('G', (g) => {
|
|
1872
|
+
* // Set a common attribute for the nodes in the graph.
|
|
1873
|
+
* g.node({
|
|
1874
|
+
* [attribute.color]: 'red',
|
|
1875
|
+
* [attribute.label]: 'my label',
|
|
1876
|
+
* });
|
|
1877
|
+
* });
|
|
1878
|
+
*
|
|
1879
|
+
* console.log(toDot(G));
|
|
1880
|
+
* // digraph "G" {
|
|
1881
|
+
* // node [
|
|
1882
|
+
* // color = "red",
|
|
1883
|
+
* // label = "my label",
|
|
1884
|
+
* // ];
|
|
1885
|
+
* // }
|
|
1886
|
+
* ```
|
|
1887
|
+
*
|
|
1888
|
+
* @param attributes Object of attributes to be adapted to the nodes.
|
|
1889
|
+
*/
|
|
1890
|
+
node(attributes: NodeAttributesObject): void;
|
|
1891
|
+
/**
|
|
1892
|
+
* Create a edge.
|
|
1893
|
+
*
|
|
1894
|
+
* By specifying a callback function, the target edge can be received and manipulated as an argument.
|
|
1895
|
+
*
|
|
1896
|
+
* ```ts
|
|
1897
|
+
* const G = digraph('G', (g) => {
|
|
1898
|
+
* // Create a edge.
|
|
1899
|
+
* g.edge(['a', 'b']);
|
|
1900
|
+
* });
|
|
1901
|
+
*
|
|
1902
|
+
* console.log(toDot(G));
|
|
1903
|
+
* // digraph "G" {
|
|
1904
|
+
* // "a" -> "b";
|
|
1905
|
+
* // }
|
|
1906
|
+
* ```
|
|
1907
|
+
* @param targets Nodes.
|
|
1908
|
+
* @param callback Callbacks for manipulating created or retrieved edge.
|
|
1909
|
+
*/
|
|
1910
|
+
edge(targets: EdgeTargetLikeTuple, callback?: (edge: EdgeModel) => void): EdgeModel;
|
|
1911
|
+
/**
|
|
1912
|
+
* Create a edge and adapt the attributes.
|
|
1913
|
+
*
|
|
1914
|
+
* By specifying a callback function, the target edge can be received and manipulated as an argument.
|
|
1915
|
+
*
|
|
1916
|
+
* ```ts
|
|
1917
|
+
* const G = digraph('G', (g) => {
|
|
1918
|
+
* // Create a edge and specifying its attributes.
|
|
1919
|
+
* g.edge(['a', 'b'], {
|
|
1920
|
+
* [attribute.color]: 'red',
|
|
1921
|
+
* [attribute.label]: 'my label',
|
|
1922
|
+
* });
|
|
1923
|
+
* });
|
|
1924
|
+
*
|
|
1925
|
+
* console.log(toDot(G));
|
|
1926
|
+
* // digraph "G" {
|
|
1927
|
+
* // "a" -> "b" [
|
|
1928
|
+
* // color = "red",
|
|
1929
|
+
* // label = "my label",
|
|
1930
|
+
* // ];
|
|
1931
|
+
* // }
|
|
1932
|
+
* ```
|
|
1933
|
+
*
|
|
1934
|
+
* @param attributes Object of attributes to be adapted to the edge.
|
|
1935
|
+
* @param callback Callbacks for manipulating created or retrieved edge.
|
|
1936
|
+
*/
|
|
1937
|
+
edge(targets: EdgeTargetLikeTuple, attributes: EdgeAttributesObject, callback?: (edge: EdgeModel) => void): EdgeModel;
|
|
1938
|
+
/**
|
|
1939
|
+
* Set a common attribute for the edges in the graph.
|
|
1940
|
+
*
|
|
1941
|
+
*
|
|
1942
|
+
* ```ts
|
|
1943
|
+
* const G = digraph('G', (g) => {
|
|
1944
|
+
* // Set a common attribute for the edges in the graph.
|
|
1945
|
+
* g.edge({
|
|
1946
|
+
* [attribute.color]: 'red',
|
|
1947
|
+
* [attribute.label]: 'my label',
|
|
1948
|
+
* });
|
|
1949
|
+
* });
|
|
1950
|
+
*
|
|
1951
|
+
* console.log(toDot(G));
|
|
1952
|
+
* // digraph "G" {
|
|
1953
|
+
* // edge [
|
|
1954
|
+
* // color = "red",
|
|
1955
|
+
* // label = "my label",
|
|
1956
|
+
* // ];
|
|
1957
|
+
* // }
|
|
1958
|
+
* ```
|
|
1959
|
+
* @param attributes Object of attributes to be adapted to the edges.
|
|
1960
|
+
*/
|
|
1961
|
+
edge(attributes: EdgeAttributesObject): void;
|
|
1962
|
+
/**
|
|
1963
|
+
* Set a common attribute for the graph in the graph.
|
|
1964
|
+
*
|
|
1965
|
+
* ```ts
|
|
1966
|
+
* const G = digraph('G', (g) => {
|
|
1967
|
+
* g.graph({
|
|
1968
|
+
* [attribute.color]: 'red',
|
|
1969
|
+
* [attribute.label]: 'my label',
|
|
1970
|
+
* });
|
|
1971
|
+
* });
|
|
1972
|
+
*
|
|
1973
|
+
* console.log(toDot(G));
|
|
1974
|
+
* // digraph "G" {
|
|
1975
|
+
* // graph [
|
|
1976
|
+
* // color = "red",
|
|
1977
|
+
* // label = "my label",
|
|
1978
|
+
* // ];
|
|
1979
|
+
* // }
|
|
1980
|
+
* ```
|
|
1981
|
+
* @param attributes Object of attributes to be adapted to the graph.
|
|
1982
|
+
*/
|
|
1983
|
+
graph(attributes: SubgraphAttributesObject): void;
|
|
1984
|
+
}
|
|
1985
|
+
interface SubgraphModel
|
|
1986
|
+
extends GraphBaseModel<SubgraphAttributeKey | ClusterSubgraphAttributeKey>,
|
|
1987
|
+
DotObjectModel<'Subgraph'> {
|
|
1988
|
+
isSubgraphCluster(): boolean;
|
|
1989
|
+
}
|
|
1990
|
+
interface RootGraphModel extends GraphBaseModel<GraphAttributeKey>, DotObjectModel<'Graph'> {
|
|
1991
|
+
directed: boolean;
|
|
1992
|
+
/**
|
|
1993
|
+
* Strict mode.
|
|
1994
|
+
*
|
|
1995
|
+
* @description
|
|
1996
|
+
* A graph may also be described as strict.
|
|
1997
|
+
* 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.
|
|
1998
|
+
* For undirected graphs, there can be at most one edge connected to the same two nodes.
|
|
1999
|
+
* 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.
|
|
2000
|
+
*/
|
|
2001
|
+
strict: boolean;
|
|
2002
|
+
}
|
|
2003
|
+
declare function isForwardRefNode(object: unknown): object is ForwardRefNode;
|
|
2004
|
+
declare function isNodeModel(object: unknown): object is NodeModel;
|
|
2005
|
+
declare function isNodeRef(node: unknown): node is NodeRef;
|
|
2006
|
+
declare function isNodeRefLike(node: unknown): node is NodeRefLike;
|
|
2007
|
+
declare function isNodeRefGroupLike(target: NodeRefLike | NodeRefGroupLike): target is NodeRefGroupLike;
|
|
2008
|
+
declare function isCompass(c: string): c is Compass;
|
|
2009
|
+
declare function toNodeRef(target: NodeRefLike): NodeRef;
|
|
2010
|
+
declare function toNodeRefGroup(targets: NodeRefGroupLike): NodeRefGroup;
|
|
2011
|
+
|
|
2012
|
+
export {
|
|
2013
|
+
ASTType,
|
|
2014
|
+
AddDouble,
|
|
2015
|
+
AddPoint,
|
|
2016
|
+
ArrowType,
|
|
2017
|
+
Attribute,
|
|
2018
|
+
AttributeKey,
|
|
2019
|
+
AttributeListKind,
|
|
2020
|
+
AttributeListModel,
|
|
2021
|
+
AttributeValue,
|
|
2022
|
+
Attributes,
|
|
2023
|
+
AttributesEntities,
|
|
2024
|
+
AttributesGroup,
|
|
2025
|
+
AttributesObject,
|
|
2026
|
+
ClusterMode,
|
|
2027
|
+
ClusterSubgraphAttributeKey,
|
|
2028
|
+
Color,
|
|
2029
|
+
ColorList,
|
|
2030
|
+
Compass,
|
|
2031
|
+
DirType,
|
|
2032
|
+
DotObjectModel,
|
|
2033
|
+
DotObjectType,
|
|
2034
|
+
Double,
|
|
2035
|
+
DoubleList,
|
|
2036
|
+
EdgeAttributeKey,
|
|
2037
|
+
EdgeAttributesObject,
|
|
2038
|
+
EdgeModel,
|
|
2039
|
+
EdgeTarget,
|
|
2040
|
+
EdgeTargetLike,
|
|
2041
|
+
EdgeTargetLikeTuple,
|
|
2042
|
+
EdgeTargetTuple,
|
|
2043
|
+
EscString,
|
|
2044
|
+
ForwardRefNode,
|
|
2045
|
+
GraphAttributeKey,
|
|
2046
|
+
GraphAttributesObject,
|
|
2047
|
+
GraphBaseModel,
|
|
2048
|
+
GraphCommonAttributes,
|
|
2049
|
+
HTMLLikeLabel,
|
|
2050
|
+
HasAttributes,
|
|
2051
|
+
HasComment,
|
|
2052
|
+
Int,
|
|
2053
|
+
LayerList,
|
|
2054
|
+
LayerRange,
|
|
2055
|
+
LblString,
|
|
2056
|
+
NodeAttributeKey,
|
|
2057
|
+
NodeAttributesObject,
|
|
2058
|
+
NodeModel,
|
|
2059
|
+
NodeRef,
|
|
2060
|
+
NodeRefGroup,
|
|
2061
|
+
NodeRefGroupLike,
|
|
2062
|
+
NodeRefLike,
|
|
2063
|
+
OutputMode,
|
|
2064
|
+
PackMode,
|
|
2065
|
+
Pagedir,
|
|
2066
|
+
Point,
|
|
2067
|
+
PointList,
|
|
2068
|
+
Port,
|
|
2069
|
+
PortPos,
|
|
2070
|
+
QuadType,
|
|
2071
|
+
RankType,
|
|
2072
|
+
Rankdir,
|
|
2073
|
+
Rect,
|
|
2074
|
+
RootGraphModel,
|
|
2075
|
+
Shape,
|
|
2076
|
+
SmoothType,
|
|
2077
|
+
SplineType,
|
|
2078
|
+
StartType,
|
|
2079
|
+
Style,
|
|
2080
|
+
SubgraphAttributeKey,
|
|
2081
|
+
SubgraphAttributesObject,
|
|
2082
|
+
SubgraphModel,
|
|
2083
|
+
ViewPort,
|
|
2084
|
+
isCompass,
|
|
2085
|
+
isForwardRefNode,
|
|
2086
|
+
isNodeModel,
|
|
2087
|
+
isNodeRef,
|
|
2088
|
+
isNodeRefGroupLike,
|
|
2089
|
+
isNodeRefLike,
|
|
2090
|
+
toNodeRef,
|
|
2091
|
+
toNodeRefGroup,
|
|
2092
|
+
};
|