forked from mermaid-js/mermaid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.type.ts
1331 lines (1329 loc) · 34.8 KB
/
config.type.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* Configuration options to pass to the `dompurify` library.
*/
export type DOMPurifyConfiguration = import('dompurify').Config;
/**
* JavaScript function that returns a `FontConfig`.
*
* By default, these return the appropriate `*FontSize`, `*FontFamily`, `*FontWeight`
* values.
*
* For example, the font calculator called `boundaryFont` might be defined as:
*
* ```javascript
* boundaryFont: function () {
* return {
* fontFamily: this.boundaryFontFamily,
* fontSize: this.boundaryFontSize,
* fontWeight: this.boundaryFontWeight,
* };
* }
* ```
*
*
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "FontCalculator".
*/
export type FontCalculator = () => Partial<FontConfig>;
/**
* Picks the color of the sankey diagram links, using the colors of the source and/or target of the links.
*
*
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "SankeyLinkColor".
*/
export type SankeyLinkColor = 'source' | 'target' | 'gradient';
/**
* Controls the alignment of the Sankey diagrams.
*
* See <https://github.com/d3/d3-sankey#alignments>.
*
*
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "SankeyNodeAlignment".
*/
export type SankeyNodeAlignment = 'left' | 'right' | 'center' | 'justify';
/**
* The font size to use
*/
export type CSSFontSize = string | number;
export interface MermaidConfig {
/**
* Theme, the CSS style sheet.
* You may also use `themeCSS` to override this value.
*
*/
theme?: string | 'default' | 'forest' | 'dark' | 'neutral' | 'null';
themeVariables?: any;
themeCSS?: string;
/**
* The maximum allowed size of the users text diagram
*/
maxTextSize?: number;
darkMode?: boolean;
htmlLabels?: boolean;
/**
* Specifies the font to be used in the rendered diagrams.
* Can be any possible CSS `font-family`.
* See https://developer.mozilla.org/en-US/docs/Web/CSS/font-family
*
*/
fontFamily?: string;
altFontFamily?: string;
/**
* This option decides the amount of logging to be used by mermaid.
*
*/
logLevel?:
| number
| string
| 0
| 2
| 1
| 'trace'
| 'debug'
| 'info'
| 'warn'
| 'error'
| 'fatal'
| 3
| 4
| 5
| undefined;
/**
* Level of trust for parsed diagram
*/
securityLevel?: string | 'strict' | 'loose' | 'antiscript' | 'sandbox' | undefined;
/**
* Dictates whether mermaid starts on Page load
*/
startOnLoad?: boolean;
/**
* Controls whether or arrow markers in html code are absolute paths or anchors.
* This matters if you are using base tag settings.
*
*/
arrowMarkerAbsolute?: boolean;
/**
* This option controls which `currentConfig` keys are considered secure and
* can only be changed via call to `mermaidAPI.initialize`.
* Calls to `mermaidAPI.reinitialize` cannot make changes to the secure keys
* in the current `currentConfig`.
*
* This prevents malicious graph directives from overriding a site's default security.
*
*/
secure?: string[];
/**
* This option controls if the generated ids of nodes in the SVG are
* generated randomly or based on a seed.
* If set to `false`, the IDs are generated based on the current date and
* thus are not deterministic. This is the default behavior.
*
* This matters if your files are checked into source control e.g. git and
* should not change unless content is changed.
*
*/
deterministicIds?: boolean;
/**
* This option is the optional seed for deterministic ids.
* If set to `undefined` but deterministicIds is `true`, a simple number iterator is used.
* You can set this attribute to base the seed on a static string.
*
*/
deterministicIDSeed?: string;
flowchart?: FlowchartDiagramConfig;
sequence?: SequenceDiagramConfig;
gantt?: GanttDiagramConfig;
journey?: JourneyDiagramConfig;
timeline?: TimelineDiagramConfig;
class?: ClassDiagramConfig;
state?: StateDiagramConfig;
er?: ErDiagramConfig;
pie?: PieDiagramConfig;
quadrantChart?: QuadrantChartConfig;
requirement?: RequirementDiagramConfig;
mindmap?: MindmapDiagramConfig;
gitGraph?: GitGraphDiagramConfig;
c4?: C4DiagramConfig;
sankey?: SankeyDiagramConfig;
dompurifyConfig?: DOMPurifyConfiguration;
wrap?: boolean;
fontSize?: number;
}
/**
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "BaseDiagramConfig".
*/
export interface BaseDiagramConfig {
useWidth?: number;
/**
* When this flag is set to `true`, the height and width is set to 100%
* and is then scaled with the available space.
* If set to `false`, the absolute space required is used.
*
*/
useMaxWidth?: boolean;
}
/**
* The object containing configurations specific for c4 diagrams
*
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "C4DiagramConfig".
*/
export interface C4DiagramConfig extends BaseDiagramConfig {
/**
* Margin to the right and left of the c4 diagram, must be a positive value.
*
*/
diagramMarginX?: number;
/**
* Margin to the over and under the c4 diagram, must be a positive value.
*
*/
diagramMarginY?: number;
/**
* Margin between shapes
*/
c4ShapeMargin?: number;
/**
* Padding between shapes
*/
c4ShapePadding?: number;
/**
* Width of person boxes
*/
width?: number;
/**
* Height of person boxes
*/
height?: number;
/**
* Margin around boxes
*/
boxMargin?: number;
/**
* How many shapes to place in each row.
*/
c4ShapeInRow?: number;
nextLinePaddingX?: number;
/**
* How many boundaries to place in each row.
*/
c4BoundaryInRow?: number;
/**
* This sets the font size of Person shape for the diagram
*/
personFontSize?: string | number;
/**
* This sets the font weight of Person shape for the diagram
*/
personFontFamily?: string;
/**
* This sets the font weight of Person shape for the diagram
*/
personFontWeight?: string | number;
/**
* This sets the font size of External Person shape for the diagram
*/
external_personFontSize?: string | number;
/**
* This sets the font family of External Person shape for the diagram
*/
external_personFontFamily?: string;
/**
* This sets the font weight of External Person shape for the diagram
*/
external_personFontWeight?: string | number;
/**
* This sets the font size of System shape for the diagram
*/
systemFontSize?: string | number;
/**
* This sets the font family of System shape for the diagram
*/
systemFontFamily?: string;
/**
* This sets the font weight of System shape for the diagram
*/
systemFontWeight?: string | number;
/**
* This sets the font size of External System shape for the diagram
*/
external_systemFontSize?: string | number;
/**
* This sets the font family of External System shape for the diagram
*/
external_systemFontFamily?: string;
/**
* This sets the font weight of External System shape for the diagram
*/
external_systemFontWeight?: string | number;
/**
* This sets the font size of System DB shape for the diagram
*/
system_dbFontSize?: string | number;
/**
* This sets the font family of System DB shape for the diagram
*/
system_dbFontFamily?: string;
/**
* This sets the font weight of System DB shape for the diagram
*/
system_dbFontWeight?: string | number;
/**
* This sets the font size of External System DB shape for the diagram
*/
external_system_dbFontSize?: string | number;
/**
* This sets the font family of External System DB shape for the diagram
*/
external_system_dbFontFamily?: string;
/**
* This sets the font weight of External System DB shape for the diagram
*/
external_system_dbFontWeight?: string | number;
/**
* This sets the font size of System Queue shape for the diagram
*/
system_queueFontSize?: string | number;
/**
* This sets the font family of System Queue shape for the diagram
*/
system_queueFontFamily?: string;
/**
* This sets the font weight of System Queue shape for the diagram
*/
system_queueFontWeight?: string | number;
/**
* This sets the font size of External System Queue shape for the diagram
*/
external_system_queueFontSize?: string | number;
/**
* This sets the font family of External System Queue shape for the diagram
*/
external_system_queueFontFamily?: string;
/**
* This sets the font weight of External System Queue shape for the diagram
*/
external_system_queueFontWeight?: string | number;
/**
* This sets the font size of Boundary shape for the diagram
*/
boundaryFontSize?: string | number;
/**
* This sets the font family of Boundary shape for the diagram
*/
boundaryFontFamily?: string;
/**
* This sets the font weight of Boundary shape for the diagram
*/
boundaryFontWeight?: string | number;
/**
* This sets the font size of Message shape for the diagram
*/
messageFontSize?: string | number;
/**
* This sets the font family of Message shape for the diagram
*/
messageFontFamily?: string;
/**
* This sets the font weight of Message shape for the diagram
*/
messageFontWeight?: string | number;
/**
* This sets the font size of Container shape for the diagram
*/
containerFontSize?: string | number;
/**
* This sets the font family of Container shape for the diagram
*/
containerFontFamily?: string;
/**
* This sets the font weight of Container shape for the diagram
*/
containerFontWeight?: string | number;
/**
* This sets the font size of External Container shape for the diagram
*/
external_containerFontSize?: string | number;
/**
* This sets the font family of External Container shape for the diagram
*/
external_containerFontFamily?: string;
/**
* This sets the font weight of External Container shape for the diagram
*/
external_containerFontWeight?: string | number;
/**
* This sets the font size of Container DB shape for the diagram
*/
container_dbFontSize?: string | number;
/**
* This sets the font family of Container DB shape for the diagram
*/
container_dbFontFamily?: string;
/**
* This sets the font weight of Container DB shape for the diagram
*/
container_dbFontWeight?: string | number;
/**
* This sets the font size of External Container DB shape for the diagram
*/
external_container_dbFontSize?: string | number;
/**
* This sets the font family of External Container DB shape for the diagram
*/
external_container_dbFontFamily?: string;
/**
* This sets the font weight of External Container DB shape for the diagram
*/
external_container_dbFontWeight?: string | number;
/**
* This sets the font size of Container Queue shape for the diagram
*/
container_queueFontSize?: string | number;
/**
* This sets the font family of Container Queue shape for the diagram
*/
container_queueFontFamily?: string;
/**
* This sets the font weight of Container Queue shape for the diagram
*/
container_queueFontWeight?: string | number;
/**
* This sets the font size of External Container Queue shape for the diagram
*/
external_container_queueFontSize?: string | number;
/**
* This sets the font family of External Container Queue shape for the diagram
*/
external_container_queueFontFamily?: string;
/**
* This sets the font weight of External Container Queue shape for the diagram
*/
external_container_queueFontWeight?: string | number;
/**
* This sets the font size of Component shape for the diagram
*/
componentFontSize?: string | number;
/**
* This sets the font family of Component shape for the diagram
*/
componentFontFamily?: string;
/**
* This sets the font weight of Component shape for the diagram
*/
componentFontWeight?: string | number;
/**
* This sets the font size of External Component shape for the diagram
*/
external_componentFontSize?: string | number;
/**
* This sets the font family of External Component shape for the diagram
*/
external_componentFontFamily?: string;
/**
* This sets the font weight of External Component shape for the diagram
*/
external_componentFontWeight?: string | number;
/**
* This sets the font size of Component DB shape for the diagram
*/
component_dbFontSize?: string | number;
/**
* This sets the font family of Component DB shape for the diagram
*/
component_dbFontFamily?: string;
/**
* This sets the font weight of Component DB shape for the diagram
*/
component_dbFontWeight?: string | number;
/**
* This sets the font size of External Component DB shape for the diagram
*/
external_component_dbFontSize?: string | number;
/**
* This sets the font family of External Component DB shape for the diagram
*/
external_component_dbFontFamily?: string;
/**
* This sets the font weight of External Component DB shape for the diagram
*/
external_component_dbFontWeight?: string | number;
/**
* This sets the font size of Component Queue shape for the diagram
*/
component_queueFontSize?: string | number;
/**
* This sets the font family of Component Queue shape for the diagram
*/
component_queueFontFamily?: string;
/**
* This sets the font weight of Component Queue shape for the diagram
*/
component_queueFontWeight?: string | number;
/**
* This sets the font size of External Component Queue shape for the diagram
*/
external_component_queueFontSize?: string | number;
/**
* This sets the font family of External Component Queue shape for the diagram
*/
external_component_queueFontFamily?: string;
/**
* This sets the font weight of External Component Queue shape for the diagram
*/
external_component_queueFontWeight?: string | number;
/**
* This sets the auto-wrap state for the diagram
*/
wrap?: boolean;
/**
* This sets the auto-wrap padding for the diagram (sides only)
*/
wrapPadding?: number;
person_bg_color?: string;
person_border_color?: string;
external_person_bg_color?: string;
external_person_border_color?: string;
system_bg_color?: string;
system_border_color?: string;
system_db_bg_color?: string;
system_db_border_color?: string;
system_queue_bg_color?: string;
system_queue_border_color?: string;
external_system_bg_color?: string;
external_system_border_color?: string;
external_system_db_bg_color?: string;
external_system_db_border_color?: string;
external_system_queue_bg_color?: string;
external_system_queue_border_color?: string;
container_bg_color?: string;
container_border_color?: string;
container_db_bg_color?: string;
container_db_border_color?: string;
container_queue_bg_color?: string;
container_queue_border_color?: string;
external_container_bg_color?: string;
external_container_border_color?: string;
external_container_db_bg_color?: string;
external_container_db_border_color?: string;
external_container_queue_bg_color?: string;
external_container_queue_border_color?: string;
component_bg_color?: string;
component_border_color?: string;
component_db_bg_color?: string;
component_db_border_color?: string;
component_queue_bg_color?: string;
component_queue_border_color?: string;
external_component_bg_color?: string;
external_component_border_color?: string;
external_component_db_bg_color?: string;
external_component_db_border_color?: string;
external_component_queue_bg_color?: string;
external_component_queue_border_color?: string;
personFont?: FontCalculator;
external_personFont?: FontCalculator;
systemFont?: FontCalculator;
external_systemFont?: FontCalculator;
system_dbFont?: FontCalculator;
external_system_dbFont?: FontCalculator;
system_queueFont?: FontCalculator;
external_system_queueFont?: FontCalculator;
containerFont?: FontCalculator;
external_containerFont?: FontCalculator;
container_dbFont?: FontCalculator;
external_container_dbFont?: FontCalculator;
container_queueFont?: FontCalculator;
external_container_queueFont?: FontCalculator;
componentFont?: FontCalculator;
external_componentFont?: FontCalculator;
component_dbFont?: FontCalculator;
external_component_dbFont?: FontCalculator;
component_queueFont?: FontCalculator;
external_component_queueFont?: FontCalculator;
boundaryFont?: FontCalculator;
messageFont?: FontCalculator;
}
/**
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "GitGraphDiagramConfig".
*/
export interface GitGraphDiagramConfig extends BaseDiagramConfig {
/**
* Margin top for the text over the diagram
*/
titleTopMargin?: number;
diagramPadding?: number;
nodeLabel?: NodeLabel;
mainBranchName?: string;
mainBranchOrder?: number;
showCommitLabel?: boolean;
showBranches?: boolean;
rotateCommitLabel?: boolean;
/**
* Controls whether or arrow markers in html code are absolute paths or anchors.
* This matters if you are using base tag settings.
*
*/
arrowMarkerAbsolute?: boolean;
}
/**
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "NodeLabel".
*/
export interface NodeLabel {
width?: number;
height?: number;
x?: number;
y?: number;
}
/**
* The object containing configurations specific for req diagrams
*
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "RequirementDiagramConfig".
*/
export interface RequirementDiagramConfig extends BaseDiagramConfig {
rect_fill?: string;
text_color?: string;
rect_border_size?: string;
rect_border_color?: string;
rect_min_width?: number;
rect_min_height?: number;
fontSize?: number;
rect_padding?: number;
line_height?: number;
}
/**
* The object containing configurations specific for mindmap diagrams
*
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "MindmapDiagramConfig".
*/
export interface MindmapDiagramConfig extends BaseDiagramConfig {
padding?: number;
maxNodeWidth?: number;
}
/**
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "PieDiagramConfig".
*/
export interface PieDiagramConfig extends BaseDiagramConfig {
/**
* Axial position of slice's label from zero at the center to 1 at the outside edges.
*
*/
textPosition?: number;
}
/**
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "QuadrantChartConfig".
*/
export interface QuadrantChartConfig extends BaseDiagramConfig {
/**
* Width of the chart
*/
chartWidth?: number;
/**
* Height of the chart
*/
chartHeight?: number;
/**
* Chart title top and bottom padding
*/
titleFontSize?: number;
/**
* Padding around the quadrant square
*/
titlePadding?: number;
/**
* quadrant title padding from top if the quadrant is rendered on top
*/
quadrantPadding?: number;
/**
* Padding around x-axis labels
*/
xAxisLabelPadding?: number;
/**
* Padding around y-axis labels
*/
yAxisLabelPadding?: number;
/**
* x-axis label font size
*/
xAxisLabelFontSize?: number;
/**
* y-axis label font size
*/
yAxisLabelFontSize?: number;
/**
* quadrant title font size
*/
quadrantLabelFontSize?: number;
/**
* quadrant title padding from top if the quadrant is rendered on top
*/
quadrantTextTopPadding?: number;
/**
* padding between point and point label
*/
pointTextPadding?: number;
/**
* point title font size
*/
pointLabelFontSize?: number;
/**
* radius of the point to be drawn
*/
pointRadius?: number;
/**
* position of x-axis labels
*/
xAxisPosition?: 'top' | 'bottom';
/**
* position of y-axis labels
*/
yAxisPosition?: 'left' | 'right';
/**
* stroke width of edges of the box that are inside the quadrant
*/
quadrantInternalBorderStrokeWidth?: number;
/**
* stroke width of edges of the box that are outside the quadrant
*/
quadrantExternalBorderStrokeWidth?: number;
}
/**
* The object containing configurations specific for entity relationship diagrams
*
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "ErDiagramConfig".
*/
export interface ErDiagramConfig extends BaseDiagramConfig {
/**
* Margin top for the text over the diagram
*/
titleTopMargin?: number;
/**
* The amount of padding around the diagram as a whole so that embedded
* diagrams have margins, expressed in pixels.
*
*/
diagramPadding?: number;
/**
* Directional bias for layout of entities
*/
layoutDirection?: string | 'TB' | 'BT' | 'LR' | 'RL';
/**
* The minimum width of an entity box. Expressed in pixels.
*/
minEntityWidth?: number;
/**
* The minimum height of an entity box. Expressed in pixels.
*/
minEntityHeight?: number;
/**
* The minimum internal padding between text in an entity box and the enclosing box borders.
* Expressed in pixels.
*
*/
entityPadding?: number;
/**
* Stroke color of box edges and lines.
*/
stroke?: string;
/**
* Fill color of entity boxes
*/
fill?: string;
/**
* Font size (expressed as an integer representing a number of pixels)
*/
fontSize?: number;
}
/**
* The object containing configurations specific for entity relationship diagrams
*
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "StateDiagramConfig".
*/
export interface StateDiagramConfig extends BaseDiagramConfig {
/**
* Margin top for the text over the diagram
*/
titleTopMargin?: number;
arrowMarkerAbsolute?: boolean;
dividerMargin?: number;
sizeUnit?: number;
padding?: number;
textHeight?: number;
titleShift?: number;
noteMargin?: number;
forkWidth?: number;
forkHeight?: number;
miniPadding?: number;
/**
* Font size factor, this is used to guess the width of the edges labels
* before rendering by dagre layout.
* This might need updating if/when switching font
*
*/
fontSizeFactor?: number;
fontSize?: number;
labelHeight?: number;
edgeLengthFactor?: string;
compositTitleSize?: number;
radius?: number;
/**
* Decides which rendering engine that is to be used for the rendering.
*
*/
defaultRenderer?: string | 'dagre-d3' | 'dagre-wrapper' | 'elk';
}
/**
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "ClassDiagramConfig".
*/
export interface ClassDiagramConfig extends BaseDiagramConfig {
/**
* Margin top for the text over the diagram
*/
titleTopMargin?: number;
/**
* Controls whether or arrow markers in html code are absolute paths or anchors.
* This matters if you are using base tag settings.
*
*/
arrowMarkerAbsolute?: boolean;
dividerMargin?: number;
padding?: number;
textHeight?: number;
/**
* Decides which rendering engine that is to be used for the rendering.
*
*/
defaultRenderer?: string | 'dagre-d3' | 'dagre-wrapper' | 'elk';
nodeSpacing?: number;
rankSpacing?: number;
/**
* The amount of padding around the diagram as a whole so that embedded
* diagrams have margins, expressed in pixels.
*
*/
diagramPadding?: number;
htmlLabels?: boolean;
}
/**
* The object containing configurations specific for journey diagrams
*
*
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "JourneyDiagramConfig".
*/
export interface JourneyDiagramConfig extends BaseDiagramConfig {
/**
* Margin to the right and left of the c4 diagram, must be a positive value.
*
*/
diagramMarginX?: number;
/**
* Margin to the over and under the c4 diagram, must be a positive value.
*
*/
diagramMarginY?: number;
/**
* Margin between actors
*/
leftMargin?: number;
/**
* Width of actor boxes
*/
width?: number;
/**
* Height of actor boxes
*/
height?: number;
/**
* Margin around loop boxes
*/
boxMargin?: number;
/**
* Margin around the text in loop/alt/opt boxes
*/
boxTextMargin?: number;
/**
* Margin around notes
*/
noteMargin?: number;
/**
* Space between messages.
*/
messageMargin?: number;
/**
* Multiline message alignment
*/
messageAlign?: string | 'left' | 'center' | 'right';
/**
* Prolongs the edge of the diagram downwards.
*
* Depending on css styling this might need adjustment.
*
*/
bottomMarginAdj?: number;
/**
* Curved Arrows become Right Angles
*
* This will display arrows that start and begin at the same node as
* right angles, rather than as curves.
*
*/
rightAngles?: boolean;
taskFontSize?: string | number;
taskFontFamily?: string;
taskMargin?: number;
/**
* Width of activation box
*/
activationWidth?: number;
/**
* text placement as: tspan | fo | old only text as before
*
*/
textPlacement?: string;
actorColours?: string[];
sectionFills?: string[];
sectionColours?: string[];
}
/**
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "TimelineDiagramConfig".
*/
export interface TimelineDiagramConfig extends BaseDiagramConfig {
/**
* Margin to the right and left of the c4 diagram, must be a positive value.
*
*/
diagramMarginX?: number;
/**
* Margin to the over and under the c4 diagram, must be a positive value.
*
*/
diagramMarginY?: number;
/**
* Margin between actors
*/
leftMargin?: number;
/**
* Width of actor boxes
*/
width?: number;
/**
* Height of actor boxes
*/
height?: number;
padding?: number;
/**
* Margin around loop boxes
*/
boxMargin?: number;
/**
* Margin around the text in loop/alt/opt boxes
*/
boxTextMargin?: number;
/**
* Margin around notes
*/
noteMargin?: number;
/**
* Space between messages.
*/
messageMargin?: number;
/**
* Multiline message alignment
*/
messageAlign?: string | 'left' | 'center' | 'right';
/**
* Prolongs the edge of the diagram downwards.
*
* Depending on css styling this might need adjustment.
*
*/
bottomMarginAdj?: number;
/**
* Curved Arrows become Right Angles
*
* This will display arrows that start and begin at the same node as
* right angles, rather than as curves.
*
*/
rightAngles?: boolean;
taskFontSize?: string | number;
taskFontFamily?: string;
taskMargin?: number;
/**
* Width of activation box
*/
activationWidth?: number;
/**
* text placement as: tspan | fo | old only text as before
*
*/
textPlacement?: string;
actorColours?: string[];
sectionFills?: string[];
sectionColours?: string[];
disableMulticolor?: boolean;
}
/**
* The object containing configurations specific for gantt diagrams
*
*
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "GanttDiagramConfig".
*/
export interface GanttDiagramConfig extends BaseDiagramConfig {
/**
* Margin top for the text over the diagram
*/
titleTopMargin?: number;
/**
* The height of the bars in the graph