-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Expand file tree
/
Copy pathconfig.type.ts
More file actions
2140 lines (2138 loc) · 57.5 KB
/
Copy pathconfig.type.ts
File metadata and controls
2140 lines (2138 loc) · 57.5 KB
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.
*/
/**
* 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';
/**
* Configuration options to pass to the `dompurify` library.
*/
export type DOMPurifyConfiguration = import('dompurify').Config;
/**
* The style of labels in the sankey diagram.
*
*
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "SankeyLabelStyle".
*/
export type SankeyLabelStyle = 'legacy' | 'outlined';
/**
* 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?:
| 'default'
| 'base'
| 'dark'
| 'forest'
| 'neutral'
| 'neo'
| 'neo-dark'
| 'redux'
| 'redux-dark'
| 'redux-color'
| 'redux-dark-color'
| 'null';
themeVariables?: any;
themeCSS?: string;
/**
* Defines which main look to use for the diagram.
*
*/
look?: 'classic' | 'handDrawn' | 'neo';
/**
* Defines the seed to be used when using handDrawn look. This is important for the automated tests as they will always find differences without the seed. The default value is 0 which gives a random seed.
*
*/
handDrawnSeed?: number;
/**
* Defines which layout algorithm to use for rendering the diagram.
*
*/
layout?: string;
/**
* The maximum allowed size of the users text diagram
*/
maxTextSize?: number;
/**
* Defines the maximum number of edges that can be drawn in a graph.
*
*/
maxEdges?: number;
elk?: {
/**
* Elk specific option that allows edges to share path where it convenient. It can make for pretty diagrams but can also make it harder to read the diagram.
*
*/
mergeEdges?: boolean;
/**
* Elk specific option affecting how nodes are placed.
*
*/
nodePlacementStrategy?: 'SIMPLE' | 'NETWORK_SIMPLEX' | 'LINEAR_SEGMENTS' | 'BRANDES_KOEPF';
/**
* Elk specific option affecting Brandes-Koepf node placement alignment.
* NONE picks the alignment with the smallest height.
*
*/
nodePlacementAlignment?: 'NONE' | 'LEFTUP' | 'LEFTDOWN' | 'RIGHTUP' | 'RIGHTDOWN' | 'BALANCED';
/**
* This strategy decides how to find cycles in the graph and deciding which edges need adjustment to break loops.
*
*/
cycleBreakingStrategy?:
| 'GREEDY'
| 'DEPTH_FIRST'
| 'INTERACTIVE'
| 'MODEL_ORDER'
| 'GREEDY_MODEL_ORDER';
/**
* The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES.
*
*/
forceNodeModelOrder?: boolean;
/**
* Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting.
*
*/
considerModelOrder?: 'NONE' | 'NODES_AND_EDGES' | 'PREFER_EDGES' | 'PREFER_NODES';
/**
* Elk specific option that keeps the entry node of a recursive flow at the top of the layout.
*
* When a flow loops back on itself (a back-edge to an earlier node), ELK's degree-based cycle-breaking has no notion of an "entry point" and may rank the first-declared node in the middle, scrambling the reading order. When enabled, the entry node of each cyclic component is pinned to the first layer so the diagram still reads from its entry. Acyclic flows always have a natural source, so this has no effect on them.
*
* Only applies when the cyclic flow has no node without incoming edges: if the loop is fed from outside (e.g. a start node pointing into it), that component already has a natural source and nothing is pinned. Detection is also scoped per container, so cycles that cross a subgraph boundary are not detected.
*
*/
keepEntryNodeOnTop?: boolean;
};
darkMode?: boolean;
/**
* Flag for setting whether or not a html tag should be used for rendering labels on nodes and edges.
* **Note:** Diagram-specific `htmlLabels` settings (e.g., `flowchart.htmlLabels`) are deprecated.
* Use this root-level `htmlLabels` setting instead. The root-level `htmlLabels` takes precedence
* over any diagram-specific settings.
*
*/
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?: 'trace' | 0 | 'debug' | 1 | 'info' | 2 | 'warn' | 3 | 'error' | 4 | 'fatal' | 5;
/**
* Level of trust for parsed diagram
*/
securityLevel?: 'strict' | 'loose' | 'antiscript' | 'sandbox';
/**
* 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 `mermaid.initialize`.
* This prevents malicious graph directives from overriding a site's default security.
*
*/
secure?: string[];
/**
* This option specifies if Mermaid can expect the dependent to include KaTeX stylesheets for browsers
* without their own MathML implementation. If this option is disabled and MathML is not supported, the math
* equations are replaced with a warning. If this option is enabled and MathML is not supported, Mermaid will
* fall back to legacy rendering for KaTeX.
*
*/
legacyMathML?: boolean;
/**
* This option forces Mermaid to rely on KaTeX's own stylesheet for rendering MathML. Due to differences between OS
* fonts and browser's MathML implementation, this option is recommended if consistent rendering is important.
* If set to true, ignores legacyMathML.
*
*/
forceLegacyMathML?: boolean;
/**
* 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;
swimlane?: SwimlaneDiagramConfig;
sequence?: SequenceDiagramConfig;
gantt?: GanttDiagramConfig;
journey?: JourneyDiagramConfig;
timeline?: TimelineDiagramConfig;
class?: ClassDiagramConfig;
state?: StateDiagramConfig;
er?: ErDiagramConfig;
pie?: PieDiagramConfig;
quadrantChart?: QuadrantChartConfig;
xyChart?: XYChartConfig;
requirement?: RequirementDiagramConfig;
architecture?: ArchitectureDiagramConfig;
mindmap?: MindmapDiagramConfig;
ishikawa?: IshikawaDiagramConfig;
kanban?: KanbanDiagramConfig;
gitGraph?: GitGraphDiagramConfig;
c4?: C4DiagramConfig;
sankey?: SankeyDiagramConfig;
packet?: PacketDiagramConfig;
block?: BlockDiagramConfig;
eventmodeling?: EventModelingDiagramConfig;
treeView?: TreeViewDiagramConfig;
radar?: RadarDiagramConfig;
venn?: VennDiagramConfig;
'wardley-beta'?: WardleyDiagramConfig;
cynefin?: CynefinDiagramConfig;
railroad?: RailroadDiagramConfig;
dompurifyConfig?: DOMPurifyConfiguration;
wrap?: boolean;
fontSize?: number;
markdownAutoWrap?: boolean;
/**
* Suppresses inserting 'Syntax error' diagram in the DOM.
* This is useful when you want to control how to handle syntax errors in your application.
*
*/
suppressErrorRendering?: boolean;
}
/**
* The object containing configurations specific for flowcharts
*
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "FlowchartDiagramConfig".
*/
export interface FlowchartDiagramConfig extends BaseDiagramConfig {
/**
* Margin top for the text over the diagram
*/
titleTopMargin?: number;
/**
* Defines a top/bottom margin for subgraph titles
*
*/
subGraphTitleMargin?: {
top?: number;
bottom?: number;
};
arrowMarkerAbsolute?: boolean;
/**
* The amount of padding around the diagram as a whole so that embedded
* diagrams have margins, expressed in pixels.
*
*/
diagramPadding?: number;
/**
* @deprecated
* **DEPRECATED: Use global `htmlLabels` instead.**
*
* Flag for setting whether or not a html tag should be used for rendering labels on nodes and edges.
* This property is deprecated.
* Please use the global `htmlLabels` configuration instead.
*
*/
htmlLabels?: boolean | null;
/**
* Defines the spacing between nodes on the same level
*
* Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs,
* and the vertical spacing for LR as well as RL graphs.
*
*/
nodeSpacing?: number;
/**
* Defines the spacing between nodes on different levels
*
* Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs,
* and the vertical spacing for LR as well as RL graphs.
*
*/
rankSpacing?: number;
/**
* Defines how mermaid renders curves for flowcharts.
*
*/
curve?:
| 'basis'
| 'bumpX'
| 'bumpY'
| 'cardinal'
| 'catmullRom'
| 'linear'
| 'monotoneX'
| 'monotoneY'
| 'natural'
| 'step'
| 'stepAfter'
| 'stepBefore'
| 'rounded';
/**
* Represents the padding between the labels and the shape
*
* **Only used in new experimental rendering.**
*
*/
padding?: number;
/**
* Decides which rendering engine that is to be used for the rendering.
*
*/
defaultRenderer?: 'dagre-d3' | 'dagre-wrapper' | 'elk';
/**
* Width of nodes where text is wrapped.
*
* When using markdown strings the text is wrapped automatically, this
* value sets the max width of a text before it continues on a new line.
*
*/
wrappingWidth?: number;
/**
* If true, subgraphs without explicit direction will inherit the global graph direction
* (e.g., LR, TB, RL, BT). Defaults to false to preserve legacy layout behavior.
*
*/
inheritDir?: boolean;
}
/**
* 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 the swimlanes diagram type.
*
* Swimlanes reuses the flowchart renderer and flowchart config for shared
* options (curve, htmlLabels, spacing, …); this block holds the knobs that
* only affect the swimlanes layout pipeline.
*
*
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "SwimlaneDiagramConfig".
*/
export interface SwimlaneDiagramConfig extends BaseDiagramConfig {
/**
* Renders edge crossings as small arcs ("hops") or visible gaps so that
* overlapping edges are easier to read. Set to `false` to disable. Edges
* rendered as curves are skipped to avoid corrupting the geometry.
*
*/
lineHops?: boolean | ('arc' | 'gap');
/**
* Ignores edges that cross swimlane boundaries during swimlane layer
* assignment. This can improve rank quality for diagrams with many
* cross-lane links.
*
*/
ignoreCrossLaneEdges?: boolean;
/**
* Enables a crossing-aware rank optimization pass for swimlane layouts.
*
*/
optimizeRanksByCrossings?: boolean;
/**
* Automatically reorders top-level swimlanes with a deterministic
* weighted-linear-arrangement heuristic. Disabled by default because
* source swimlane order can carry semantic meaning.
*
*/
automaticLaneOrdering?: boolean;
}
/**
* The object containing configurations specific for sequence diagrams
*
* This interface was referenced by `MermaidConfig`'s JSON-Schema
* via the `definition` "SequenceDiagramConfig".
*/
export interface SequenceDiagramConfig extends BaseDiagramConfig {
arrowMarkerAbsolute?: boolean;
hideUnusedParticipants?: boolean;
/**
* Width of the activation rect
*/
activationWidth?: number;
/**
* Margin to the right and left of the sequence diagram
*/
diagramMarginX?: number;
/**
* Margin to the over and under the sequence diagram
*/
diagramMarginY?: number;
/**
* Margin between actors
*/
actorMargin?: 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?: 'left' | 'center' | 'right';
/**
* Mirror actors under diagram
*
*/
mirrorActors?: boolean;
/**
* forces actor popup menus to always be visible (to support E2E testing).
*
*/
forceMenus?: boolean;
/**
* 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;
/**
* This will show the node numbers
*/
showSequenceNumbers?: boolean;
/**
* This sets the font size of the actor's description
*/
actorFontSize?: string | number;
/**
* This sets the font family of the actor's description
*/
actorFontFamily?: string;
/**
* This sets the font weight of the actor's description
*/
actorFontWeight?: string | number;
/**
* This sets the font size of actor-attached notes
*/
noteFontSize?: string | number;
/**
* This sets the font family of actor-attached notes
*/
noteFontFamily?: string;
/**
* This sets the font weight of actor-attached notes
*/
noteFontWeight?: string | number;
/**
* This sets the text alignment of actor-attached notes
*/
noteAlign?: 'left' | 'center' | 'right';
/**
* This sets the font size of actor messages
*/
messageFontSize?: string | number;
/**
* This sets the font family of actor messages
*/
messageFontFamily?: string;
/**
* This sets the font weight of actor messages
*/
messageFontWeight?: 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;
/**
* This sets the width of the loop-box (loop, alt, opt, par)
*/
labelBoxWidth?: number;
/**
* This sets the height of the loop-box (loop, alt, opt, par)
*/
labelBoxHeight?: number;
messageFont?: FontCalculator;
noteFont?: FontCalculator;
actorFont?: FontCalculator;
}
/**
* 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
*/
barHeight?: number;
/**
* The margin between the different activities in the gantt diagram
*/
barGap?: number;
/**
* Margin between title and gantt diagram and between axis and gantt diagram.
*
*/
topPadding?: number;
/**
* The space allocated for the section name to the right of the activities
*
*/
rightPadding?: number;
/**
* The space allocated for the section name to the left of the activities
*
*/
leftPadding?: number;
/**
* Vertical starting position of the grid lines
*/
gridLineStartPadding?: number;
/**
* Font size
*/
fontSize?: number;
/**
* Font size for sections
*/
sectionFontSize?: string | number;
/**
* The number of alternating section styles
*/
numberSectionStyles?: number;
/**
* Date/time format of the axis
*
* This might need adjustment to match your locale and preferences.
*
*/
axisFormat?: string;
/**
* axis ticks
*
* Pattern is:
*
* ```javascript
* /^([1-9][0-9]*)(millisecond|second|minute|hour|day|week|month)$/
* ```
*
*/
tickInterval?: string;
/**
* When this flag is set, date labels will be added to the top of the chart
*
*/
topAxis?: boolean;
/**
* Controls the display mode.
*
*/
displayMode?: '' | 'compact';
/**
* On which day a week-based interval should start
*
*/
weekday?: 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
}
/**
* 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;
/**
* Maximum width of actor labels
*/
maxLabelWidth?: 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?: '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[];
/**
* Color of the title text in Journey Diagrams
*/
titleColor?: string;
/**
* Font family to be used for the title text in Journey Diagrams
*/
titleFontFamily?: string;
/**
* Font size to be used for the title text in Journey Diagrams
*/
titleFontSize?: 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?: '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;
}
/**
* 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?: '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;
hideEmptyMembersBox?: boolean;
/**
* When true (default), nested namespaces render as hierarchical clusters,
* with each segment of a dotted name (e.g. `A.B.C`) becoming its own nested
* box. When false, namespaces render in compact mode: only explicitly
* declared namespaces are emitted and their full qualified name is used as
* a single flat label.
*
*/
hierarchicalNamespaces?: boolean;
}
/**
* 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;
nodeSpacing?: number;
rankSpacing?: 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?: 'dagre-d3' | 'dagre-wrapper' | 'elk';
}
/**
* 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?: '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;
nodeSpacing?: number;
rankSpacing?: 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;
}
/**
* 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;
/**
* Donut hole ratio. Valid value are from 0 to 0.9. Default to 0.
*
*/
donutHole?: number;
/**
* Legend's position relative to the chart. Default to right.
*
*/
legendPosition?: 'top' | 'bottom' | 'left' | 'right' | 'center';
/**
* Highlight specific slice with matching label. Set to 'hover' to highlight hovered slice.
*
*/
highlightSlice?: string;
}
/**
* 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;