@hpcc-js/wasm-graphviz 1.22.1 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +176 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/package.json +3 -3
- package/src/graphviz.ts +696 -1
- package/src/index.ts +1 -1
- package/src/types.ts +607 -0
- package/types/graphviz.d.ts +443 -0
- package/types/graphvizlib.d.ts +63 -0
- package/types/types.d.ts +299 -0
package/types/types.d.ts
ADDED
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
export type Shape = "box" | "polygon" | "ellipse" | "oval" | "circle" | "point" | "egg" | "triangle" | "plaintext" | "plain" | "diamond" | "trapezium" | "parallelogram" | "house" | "pentagon" | "hexagon" | "septagon" | "octagon" | "doublecircle" | "doubleoctagon" | "tripleoctagon" | "invtriangle" | "invtrapezium" | "invhouse" | "Mdiamond" | "Msquare" | "Mcircle" | "rect" | "rectangle" | "square" | "star" | "none" | "underline" | "cylinder" | "note" | "tab" | "folder" | "box3d" | "component" | "promoter" | "cds" | "terminator" | "utr" | "primersite" | "restrictionsite" | "fivepoverhang" | "threepoverhang" | "noverhang" | "assembly" | "signature" | "insulator" | "ribosite" | "rnastab" | "proteasesite" | "proteinstab" | "rpromoter" | "rarrow" | "larrow" | "lpromoter" | "record" | "Mrecord";
|
|
2
|
+
export type ArrowType = "normal" | "inv" | "dot" | "invdot" | "odot" | "invodot" | "none" | "tee" | "empty" | "invempty" | "diamond" | "odiamond" | "ediamond" | "crow" | "box" | "obox" | "open" | "halfopen" | "vee";
|
|
3
|
+
export type DirType = "forward" | "back" | "both" | "none";
|
|
4
|
+
export type EdgeStyle = "solid" | "dashed" | "dotted" | "bold" | "invis" | "tapered";
|
|
5
|
+
export type NodeStyle = "solid" | "dashed" | "dotted" | "bold" | "invis" | "filled" | "striped" | "wedged" | "diagonals" | "rounded" | "radial";
|
|
6
|
+
export type ClusterStyle = "solid" | "dashed" | "dotted" | "bold" | "invis" | "filled" | "striped" | "rounded" | "radial";
|
|
7
|
+
/** Cluster ranking mode (https://graphviz.org/docs/attr-types/clusterMode/) */
|
|
8
|
+
export type ClusterMode = "local" | "global" | "none";
|
|
9
|
+
/** Output draw order (https://graphviz.org/docs/attr-types/outputMode/) */
|
|
10
|
+
export type OutputMode = "breadthfirst" | "nodesfirst" | "edgesfirst";
|
|
11
|
+
/** Graph layout direction (https://graphviz.org/docs/attr-types/rankdir/) */
|
|
12
|
+
export type RankDir = "TB" | "LR" | "BT" | "RL";
|
|
13
|
+
/** Subgraph rank constraint (https://graphviz.org/docs/attr-types/rankType/) */
|
|
14
|
+
export type RankType = "same" | "min" | "source" | "max" | "sink";
|
|
15
|
+
/** Page output order (https://graphviz.org/docs/attr-types/pagedir/) */
|
|
16
|
+
export type PageDir = "BL" | "BR" | "TL" | "TR" | "RB" | "RT" | "LB" | "LT";
|
|
17
|
+
/** Component packing granularity (https://graphviz.org/docs/attr-types/packMode/) */
|
|
18
|
+
export type PackMode = "node" | "cluster" | "graph";
|
|
19
|
+
/** Smoothing method for sfdp (https://graphviz.org/docs/attr-types/smoothType/) */
|
|
20
|
+
export type SmoothType = "none" | "avg_dist" | "graph_dist" | "power_dist" | "rng" | "spring" | "triangle";
|
|
21
|
+
/** Quadtree scheme for sfdp (https://graphviz.org/docs/attr-types/quadType/) */
|
|
22
|
+
export type QuadType = "normal" | "fast" | "none";
|
|
23
|
+
/** Compass point for port positions (https://graphviz.org/docs/attr-types/portPos/) */
|
|
24
|
+
export type CompassPoint = "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw" | "c" | "_";
|
|
25
|
+
/** Vertical placement of labels for nodes, root graphs and clusters (https://graphviz.org/docs/attr-types/labelloc/) */
|
|
26
|
+
export type LabelLoc = "t" | "c" | "b";
|
|
27
|
+
export interface NodeAttrs {
|
|
28
|
+
area?: number;
|
|
29
|
+
class?: string;
|
|
30
|
+
color?: string;
|
|
31
|
+
colorscheme?: string;
|
|
32
|
+
comment?: string;
|
|
33
|
+
distortion?: number;
|
|
34
|
+
fillcolor?: string;
|
|
35
|
+
fixedsize?: boolean | string;
|
|
36
|
+
fontcolor?: string;
|
|
37
|
+
fontname?: string;
|
|
38
|
+
fontsize?: number;
|
|
39
|
+
gradientangle?: number;
|
|
40
|
+
group?: string;
|
|
41
|
+
height?: number;
|
|
42
|
+
href?: string;
|
|
43
|
+
image?: string;
|
|
44
|
+
imagepos?: string;
|
|
45
|
+
imagescale?: boolean | string;
|
|
46
|
+
label?: string;
|
|
47
|
+
labelloc?: LabelLoc;
|
|
48
|
+
layer?: string;
|
|
49
|
+
margin?: number | string;
|
|
50
|
+
nojustify?: boolean;
|
|
51
|
+
ordering?: string;
|
|
52
|
+
orientation?: number;
|
|
53
|
+
penwidth?: number;
|
|
54
|
+
peripheries?: number;
|
|
55
|
+
pin?: boolean;
|
|
56
|
+
pos?: string;
|
|
57
|
+
rects?: string;
|
|
58
|
+
regular?: boolean;
|
|
59
|
+
root?: string | boolean;
|
|
60
|
+
samplepoints?: number;
|
|
61
|
+
shape?: Shape;
|
|
62
|
+
shapefile?: string;
|
|
63
|
+
showboxes?: number;
|
|
64
|
+
sides?: number;
|
|
65
|
+
skew?: number;
|
|
66
|
+
sortv?: number;
|
|
67
|
+
style?: string;
|
|
68
|
+
target?: string;
|
|
69
|
+
tooltip?: string;
|
|
70
|
+
URL?: string;
|
|
71
|
+
vertices?: string;
|
|
72
|
+
width?: number;
|
|
73
|
+
xlabel?: string;
|
|
74
|
+
xlp?: string;
|
|
75
|
+
z?: number;
|
|
76
|
+
}
|
|
77
|
+
export interface EdgeAttrs {
|
|
78
|
+
arrowhead?: ArrowType;
|
|
79
|
+
arrowsize?: number;
|
|
80
|
+
arrowtail?: ArrowType;
|
|
81
|
+
class?: string;
|
|
82
|
+
color?: string;
|
|
83
|
+
colorscheme?: string;
|
|
84
|
+
comment?: string;
|
|
85
|
+
constraint?: boolean;
|
|
86
|
+
decorate?: boolean;
|
|
87
|
+
dir?: DirType;
|
|
88
|
+
edgehref?: string;
|
|
89
|
+
edgetarget?: string;
|
|
90
|
+
edgetooltip?: string;
|
|
91
|
+
edgeURL?: string;
|
|
92
|
+
fillcolor?: string;
|
|
93
|
+
fontcolor?: string;
|
|
94
|
+
fontname?: string;
|
|
95
|
+
fontsize?: number;
|
|
96
|
+
head_lp?: string;
|
|
97
|
+
headclip?: boolean;
|
|
98
|
+
headhref?: string;
|
|
99
|
+
headlabel?: string;
|
|
100
|
+
headport?: string;
|
|
101
|
+
headtarget?: string;
|
|
102
|
+
headtooltip?: string;
|
|
103
|
+
headURL?: string;
|
|
104
|
+
href?: string;
|
|
105
|
+
label?: string;
|
|
106
|
+
labelangle?: number;
|
|
107
|
+
labeldistance?: number;
|
|
108
|
+
labelfloat?: boolean;
|
|
109
|
+
labelfontcolor?: string;
|
|
110
|
+
labelfontname?: string;
|
|
111
|
+
labelfontsize?: number;
|
|
112
|
+
labelhref?: string;
|
|
113
|
+
labeltarget?: string;
|
|
114
|
+
labeltooltip?: string;
|
|
115
|
+
labelURL?: string;
|
|
116
|
+
layer?: string;
|
|
117
|
+
len?: number;
|
|
118
|
+
lhead?: string;
|
|
119
|
+
lp?: string;
|
|
120
|
+
ltail?: string;
|
|
121
|
+
minlen?: number;
|
|
122
|
+
nojustify?: boolean;
|
|
123
|
+
penwidth?: number;
|
|
124
|
+
pos?: string;
|
|
125
|
+
radius?: number;
|
|
126
|
+
samehead?: string;
|
|
127
|
+
sametail?: string;
|
|
128
|
+
showboxes?: number;
|
|
129
|
+
style?: EdgeStyle | string;
|
|
130
|
+
tail_lp?: string;
|
|
131
|
+
tailclip?: boolean;
|
|
132
|
+
tailhref?: string;
|
|
133
|
+
taillabel?: string;
|
|
134
|
+
tailport?: string;
|
|
135
|
+
tailtarget?: string;
|
|
136
|
+
tailtooltip?: string;
|
|
137
|
+
tailURL?: string;
|
|
138
|
+
target?: string;
|
|
139
|
+
tooltip?: string;
|
|
140
|
+
URL?: string;
|
|
141
|
+
weight?: number;
|
|
142
|
+
xlabel?: string;
|
|
143
|
+
xlp?: string;
|
|
144
|
+
}
|
|
145
|
+
export interface ClusterAttrs {
|
|
146
|
+
area?: number;
|
|
147
|
+
bb?: string;
|
|
148
|
+
bgcolor?: string;
|
|
149
|
+
class?: string;
|
|
150
|
+
cluster?: boolean;
|
|
151
|
+
color?: string;
|
|
152
|
+
colorscheme?: string;
|
|
153
|
+
fillcolor?: string;
|
|
154
|
+
fontcolor?: string;
|
|
155
|
+
fontname?: string;
|
|
156
|
+
fontsize?: number;
|
|
157
|
+
gradientangle?: number;
|
|
158
|
+
href?: string;
|
|
159
|
+
K?: number;
|
|
160
|
+
label?: string;
|
|
161
|
+
labeljust?: string;
|
|
162
|
+
labelloc?: LabelLoc;
|
|
163
|
+
layer?: string;
|
|
164
|
+
lheight?: number;
|
|
165
|
+
lp?: string;
|
|
166
|
+
lwidth?: number;
|
|
167
|
+
margin?: number | string;
|
|
168
|
+
nojustify?: boolean;
|
|
169
|
+
pencolor?: string;
|
|
170
|
+
penwidth?: number;
|
|
171
|
+
peripheries?: number;
|
|
172
|
+
rank?: RankType;
|
|
173
|
+
sortv?: number;
|
|
174
|
+
style?: string;
|
|
175
|
+
target?: string;
|
|
176
|
+
tooltip?: string;
|
|
177
|
+
URL?: string;
|
|
178
|
+
}
|
|
179
|
+
export interface GraphAttrs {
|
|
180
|
+
_background?: string;
|
|
181
|
+
bb?: string;
|
|
182
|
+
beautify?: boolean;
|
|
183
|
+
bgcolor?: string;
|
|
184
|
+
center?: boolean;
|
|
185
|
+
charset?: string;
|
|
186
|
+
class?: string;
|
|
187
|
+
clusterrank?: ClusterMode;
|
|
188
|
+
colorscheme?: string;
|
|
189
|
+
comment?: string;
|
|
190
|
+
compound?: boolean;
|
|
191
|
+
concentrate?: boolean;
|
|
192
|
+
Damping?: number;
|
|
193
|
+
defaultdist?: number;
|
|
194
|
+
dim?: number;
|
|
195
|
+
dimen?: number;
|
|
196
|
+
diredgeconstraints?: string | boolean;
|
|
197
|
+
dpi?: number;
|
|
198
|
+
epsilon?: number;
|
|
199
|
+
esep?: string;
|
|
200
|
+
fontcolor?: string;
|
|
201
|
+
fontname?: string;
|
|
202
|
+
fontnames?: string;
|
|
203
|
+
fontpath?: string;
|
|
204
|
+
fontsize?: number;
|
|
205
|
+
forcelabels?: boolean;
|
|
206
|
+
gradientangle?: number;
|
|
207
|
+
href?: string;
|
|
208
|
+
id?: string;
|
|
209
|
+
imagepath?: string;
|
|
210
|
+
inputscale?: number;
|
|
211
|
+
K?: number;
|
|
212
|
+
label?: string;
|
|
213
|
+
label_scheme?: number;
|
|
214
|
+
labeljust?: string;
|
|
215
|
+
labelloc?: LabelLoc;
|
|
216
|
+
landscape?: boolean;
|
|
217
|
+
layerlistsep?: string;
|
|
218
|
+
layers?: string;
|
|
219
|
+
layerselect?: string;
|
|
220
|
+
layersep?: string;
|
|
221
|
+
layout?: string;
|
|
222
|
+
levels?: number;
|
|
223
|
+
levelsgap?: number;
|
|
224
|
+
lheight?: number;
|
|
225
|
+
linelength?: number;
|
|
226
|
+
lp?: string;
|
|
227
|
+
lwidth?: number;
|
|
228
|
+
margin?: number | string;
|
|
229
|
+
maxiter?: number;
|
|
230
|
+
mclimit?: number;
|
|
231
|
+
mindist?: number;
|
|
232
|
+
mode?: string;
|
|
233
|
+
model?: string;
|
|
234
|
+
newrank?: boolean;
|
|
235
|
+
nodesep?: number;
|
|
236
|
+
nojustify?: boolean;
|
|
237
|
+
normalize?: number | boolean;
|
|
238
|
+
notranslate?: boolean;
|
|
239
|
+
nslimit?: number;
|
|
240
|
+
nslimit1?: number;
|
|
241
|
+
oneblock?: boolean;
|
|
242
|
+
ordering?: string;
|
|
243
|
+
orientation?: string;
|
|
244
|
+
outputorder?: OutputMode;
|
|
245
|
+
overlap?: string | boolean;
|
|
246
|
+
overlap_scaling?: number;
|
|
247
|
+
overlap_shrink?: boolean;
|
|
248
|
+
pack?: boolean | number;
|
|
249
|
+
packmode?: string;
|
|
250
|
+
pad?: number | string;
|
|
251
|
+
page?: number | string;
|
|
252
|
+
pagedir?: PageDir;
|
|
253
|
+
quantum?: number;
|
|
254
|
+
rankdir?: RankDir;
|
|
255
|
+
ranksep?: number | string;
|
|
256
|
+
ratio?: number | string;
|
|
257
|
+
remincross?: boolean;
|
|
258
|
+
repulsiveforce?: number;
|
|
259
|
+
resolution?: number;
|
|
260
|
+
root?: string | boolean;
|
|
261
|
+
rotate?: number;
|
|
262
|
+
rotation?: number;
|
|
263
|
+
scale?: number | string;
|
|
264
|
+
searchsize?: number;
|
|
265
|
+
sep?: string;
|
|
266
|
+
showboxes?: number;
|
|
267
|
+
size?: number | string;
|
|
268
|
+
smoothing?: SmoothType;
|
|
269
|
+
sortv?: number;
|
|
270
|
+
splines?: boolean | string;
|
|
271
|
+
start?: string;
|
|
272
|
+
style?: string;
|
|
273
|
+
stylesheet?: string;
|
|
274
|
+
target?: string;
|
|
275
|
+
TBbalance?: string;
|
|
276
|
+
tooltip?: string;
|
|
277
|
+
truecolor?: boolean;
|
|
278
|
+
URL?: string;
|
|
279
|
+
viewport?: string;
|
|
280
|
+
voro_margin?: number;
|
|
281
|
+
xdotversion?: string;
|
|
282
|
+
}
|
|
283
|
+
type NodeWriteOnly = "rects" | "vertices" | "xlp";
|
|
284
|
+
type EdgeWriteOnly = "head_lp" | "tail_lp" | "lp" | "xlp";
|
|
285
|
+
type ClusterWriteOnly = "bb" | "lheight" | "lp" | "lwidth";
|
|
286
|
+
type GraphExcluded = "type" | "strict" | "nodeDefaults" | "edgeDefaults" | "graphDefaults" | "bb" | "lheight" | "lp" | "lwidth";
|
|
287
|
+
export type NodeDotAttr = Exclude<keyof NodeAttrs, NodeWriteOnly>;
|
|
288
|
+
export type EdgeDotAttr = Exclude<keyof EdgeAttrs, EdgeWriteOnly>;
|
|
289
|
+
export type ClusterDotAttr = Exclude<keyof ClusterAttrs, ClusterWriteOnly>;
|
|
290
|
+
export type GraphDotAttr = Exclude<keyof GraphAttrs, GraphExcluded>;
|
|
291
|
+
/** Node DOT attributes (excludes inherited base keys and write-only: rects, vertices, xlp) */
|
|
292
|
+
export declare const NODE_DOT_ATTRS: readonly NodeDotAttr[];
|
|
293
|
+
/** Edge DOT attributes (excludes inherited base keys and write-only: head_lp, tail_lp, lp, xlp) */
|
|
294
|
+
export declare const EDGE_DOT_ATTRS: readonly EdgeDotAttr[];
|
|
295
|
+
/** Cluster DOT attributes (excludes inherited base keys and write-only: bb, lheight, lp, lwidth) */
|
|
296
|
+
export declare const CLUSTER_DOT_ATTRS: readonly ClusterDotAttr[];
|
|
297
|
+
/** Graph DOT attributes (excludes write-only: bb, lheight, lp, lwidth; and non-DOT: type) */
|
|
298
|
+
export declare const GRAPH_DOT_ATTRS: readonly GraphDotAttr[];
|
|
299
|
+
export {};
|