ds-markdown 0.2.4-beta.1 → 0.2.4-beta.2

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.
Files changed (159) hide show
  1. package/es/AutoScroll/index.d.ts +7 -0
  2. package/es/AutoScroll/index.d.ts.map +1 -0
  3. package/es/AutoScroll/index.js +7 -0
  4. package/es/AutoScroll/index.js.map +1 -0
  5. package/es/Markdown/index.d.ts +5 -0
  6. package/es/Markdown/index.d.ts.map +1 -0
  7. package/es/Markdown/index.js +78 -0
  8. package/es/Markdown/index.js.map +1 -0
  9. package/es/MarkdownCMD/index.d.ts +13 -0
  10. package/es/MarkdownCMD/index.d.ts.map +1 -0
  11. package/es/MarkdownCMD/index.js +122 -0
  12. package/es/MarkdownCMD/index.js.map +1 -0
  13. package/es/components/CodeComponent/BlockWrap/index.css +64 -0
  14. package/es/components/CodeComponent/BlockWrap/index.d.ts +10 -0
  15. package/es/components/CodeComponent/BlockWrap/index.d.ts.map +1 -0
  16. package/es/components/CodeComponent/BlockWrap/index.js +20 -0
  17. package/es/components/CodeComponent/BlockWrap/index.js.map +1 -0
  18. package/es/components/CodeComponent/CodeBlockActions/index.d.ts +8 -0
  19. package/es/components/CodeComponent/CodeBlockActions/index.d.ts.map +1 -0
  20. package/es/components/CodeComponent/CodeBlockActions/index.js +8 -0
  21. package/es/components/CodeComponent/CodeBlockActions/index.js.map +1 -0
  22. package/es/components/CodeComponent/CodeBlockWrap/index.d.ts +8 -0
  23. package/es/components/CodeComponent/CodeBlockWrap/index.d.ts.map +1 -0
  24. package/es/components/CodeComponent/CodeBlockWrap/index.js +8 -0
  25. package/es/components/CodeComponent/CodeBlockWrap/index.js.map +1 -0
  26. package/es/components/CodeComponent/HighlightCode/index.d.ts +8 -0
  27. package/es/components/CodeComponent/HighlightCode/index.d.ts.map +1 -0
  28. package/es/components/CodeComponent/HighlightCode/index.js +7 -0
  29. package/es/components/CodeComponent/HighlightCode/index.js.map +1 -0
  30. package/es/components/CodeComponent/index.css +551 -0
  31. package/es/components/CodeComponent/index.d.ts +8 -0
  32. package/es/components/CodeComponent/index.d.ts.map +1 -0
  33. package/es/components/CodeComponent/index.js +11 -0
  34. package/es/components/CodeComponent/index.js.map +1 -0
  35. package/es/components/CopyButton/index.d.ts +9 -0
  36. package/es/components/CopyButton/index.d.ts.map +1 -0
  37. package/es/components/CopyButton/index.js +24 -0
  38. package/es/components/CopyButton/index.js.map +1 -0
  39. package/es/components/DownloadButton/index.d.ts +10 -0
  40. package/es/components/DownloadButton/index.d.ts.map +1 -0
  41. package/es/components/DownloadButton/index.js +61 -0
  42. package/es/components/DownloadButton/index.js.map +1 -0
  43. package/es/components/Icon/index.d.ts +12 -0
  44. package/es/components/Icon/index.d.ts.map +1 -0
  45. package/es/components/Icon/index.js +12 -0
  46. package/es/components/Icon/index.js.map +1 -0
  47. package/es/components/TableComponent/index.css +24 -0
  48. package/es/components/TableComponent/index.d.ts +8 -0
  49. package/es/components/TableComponent/index.d.ts.map +1 -0
  50. package/es/components/TableComponent/index.js +7 -0
  51. package/es/components/TableComponent/index.js.map +1 -0
  52. package/es/components/ui/Button/index.d.ts +12 -0
  53. package/es/components/ui/Button/index.d.ts.map +1 -0
  54. package/es/components/ui/Button/index.js +17 -0
  55. package/es/components/ui/Button/index.js.map +1 -0
  56. package/es/components/ui/IconButton/index.d.ts +9 -0
  57. package/es/components/ui/IconButton/index.d.ts.map +1 -0
  58. package/es/components/ui/IconButton/index.js +7 -0
  59. package/es/components/ui/IconButton/index.js.map +1 -0
  60. package/es/components/ui/Segmented/index.css +35 -0
  61. package/es/components/ui/Segmented/index.d.ts +14 -0
  62. package/es/components/ui/Segmented/index.d.ts.map +1 -0
  63. package/es/components/ui/Segmented/index.js +10 -0
  64. package/es/components/ui/Segmented/index.js.map +1 -0
  65. package/es/components/ui/SuccessButton/index.d.ts +11 -0
  66. package/es/components/ui/SuccessButton/index.d.ts.map +1 -0
  67. package/es/components/ui/SuccessButton/index.js +46 -0
  68. package/es/components/ui/SuccessButton/index.js.map +1 -0
  69. package/es/constant.d.ts +6 -0
  70. package/es/constant.d.ts.map +1 -0
  71. package/es/constant.js +7 -0
  72. package/es/constant.js.map +1 -0
  73. package/es/context/ConfigProvider/index.d.ts +40 -0
  74. package/es/context/ConfigProvider/index.d.ts.map +1 -0
  75. package/es/context/ConfigProvider/index.js +32 -0
  76. package/es/context/ConfigProvider/index.js.map +1 -0
  77. package/es/context/MarkdownProvider.d.ts +9 -0
  78. package/es/context/MarkdownProvider.d.ts.map +1 -0
  79. package/es/context/MarkdownProvider.js +10 -0
  80. package/es/context/MarkdownProvider.js.map +1 -0
  81. package/es/context/MarkdownThemeProvider.d.ts +21 -0
  82. package/es/context/MarkdownThemeProvider.d.ts.map +1 -0
  83. package/es/context/MarkdownThemeProvider.js +31 -0
  84. package/es/context/MarkdownThemeProvider.js.map +1 -0
  85. package/es/defined/index.d.ts +75 -0
  86. package/es/defined/index.d.ts.map +1 -0
  87. package/es/defined/index.js +3 -0
  88. package/es/defined/index.js.map +1 -0
  89. package/{dist/cjs/index.d.ts → es/defined/mermaid.type.d.ts} +6 -234
  90. package/es/defined/mermaid.type.d.ts.map +1 -0
  91. package/es/defined/mermaid.type.js +2 -0
  92. package/es/defined/mermaid.type.js.map +1 -0
  93. package/es/defined.css +481 -0
  94. package/{dist/cjs → es}/i18n/en/index.d.ts +4 -5
  95. package/es/i18n/en/index.d.ts.map +1 -0
  96. package/{dist/esm → es}/i18n/en/index.js +4 -4
  97. package/es/i18n/en/index.js.map +1 -0
  98. package/es/i18n/index.d.ts +7 -0
  99. package/es/i18n/index.d.ts.map +1 -0
  100. package/es/i18n/index.js +7 -0
  101. package/es/i18n/index.js.map +1 -0
  102. package/{dist/esm/i18n/en → es/i18n/zh}/index.d.ts +5 -6
  103. package/es/i18n/zh/index.d.ts.map +1 -0
  104. package/{dist/esm → es}/i18n/zh/index.js +4 -4
  105. package/es/i18n/zh/index.js.map +1 -0
  106. package/es/index.css +330 -0
  107. package/es/index.d.ts +23 -0
  108. package/es/index.d.ts.map +1 -0
  109. package/es/index.js +21 -0
  110. package/es/index.js.map +1 -0
  111. package/es/plugins/index.d.ts +6 -0
  112. package/es/plugins/index.d.ts.map +1 -0
  113. package/{dist/esm → es}/plugins/index.js +3 -11
  114. package/es/plugins/index.js.map +1 -0
  115. package/es/utils/Tokenizer.d.ts +48 -0
  116. package/es/utils/Tokenizer.d.ts.map +1 -0
  117. package/es/utils/Tokenizer.js +191 -0
  118. package/es/utils/Tokenizer.js.map +1 -0
  119. package/es/utils/compiler.d.ts +5 -0
  120. package/es/utils/compiler.d.ts.map +1 -0
  121. package/es/utils/compiler.js +62 -0
  122. package/es/utils/compiler.js.map +1 -0
  123. package/es/utils/grapheme.d.ts +2 -0
  124. package/es/utils/grapheme.d.ts.map +1 -0
  125. package/es/utils/grapheme.js +4 -0
  126. package/es/utils/grapheme.js.map +1 -0
  127. package/es/utils/methods/deepClone.d.ts +2 -0
  128. package/es/utils/methods/deepClone.d.ts.map +1 -0
  129. package/es/utils/methods/deepClone.js +4 -0
  130. package/es/utils/methods/deepClone.js.map +1 -0
  131. package/es/utils/remarkMathBracket.d.ts +21 -0
  132. package/es/utils/remarkMathBracket.d.ts.map +1 -0
  133. package/es/utils/remarkMathBracket.js +49 -0
  134. package/es/utils/remarkMathBracket.js.map +1 -0
  135. package/es/utils/rule.d.ts +26 -0
  136. package/es/utils/rule.d.ts.map +1 -0
  137. package/es/utils/rule.js +69 -0
  138. package/es/utils/rule.js.map +1 -0
  139. package/package.json +2 -2
  140. package/dist/cjs/i18n/en/index.js +0 -30
  141. package/dist/cjs/i18n/en/index.js.map +0 -1
  142. package/dist/cjs/i18n/zh/index.d.ts +0 -26
  143. package/dist/cjs/i18n/zh/index.js +0 -30
  144. package/dist/cjs/i18n/zh/index.js.map +0 -1
  145. package/dist/cjs/index.js +0 -1106
  146. package/dist/cjs/index.js.map +0 -1
  147. package/dist/cjs/plugins/index.d.ts +0 -20
  148. package/dist/cjs/plugins/index.js +0 -30
  149. package/dist/cjs/plugins/index.js.map +0 -1
  150. package/dist/esm/i18n/en/index.js.map +0 -1
  151. package/dist/esm/i18n/zh/index.d.ts +0 -26
  152. package/dist/esm/i18n/zh/index.js.map +0 -1
  153. package/dist/esm/index.d.ts +0 -1747
  154. package/dist/esm/index.js +0 -1084
  155. package/dist/esm/index.js.map +0 -1
  156. package/dist/esm/plugins/index.d.ts +0 -20
  157. package/dist/esm/plugins/index.js.map +0 -1
  158. /package/{dist → es}/katex.css +0 -0
  159. /package/{dist → es}/style.css +0 -0
@@ -1,1747 +0,0 @@
1
- import * as React$1 from 'react';
2
- import React__default from 'react';
3
- import { Pluggable } from 'unified';
4
- import { KatexOptions } from 'katex';
5
- import * as react_markdown_typer_es_defined from 'react-markdown-typer/es/defined';
6
- import { MarkdownTyperBaseProps, MarkdownBaseRef } from 'react-markdown-typer/es/defined';
7
- import { MarkdownTyperCMDProps } from 'react-markdown-typer';
8
- export { ITypedChar } from 'react-markdown-typer';
9
-
10
- declare namespace Mermaid {
11
- /**
12
- * The font size to use
13
- */
14
- type CSSFontSize = string | number;
15
- /**
16
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
17
- * via the `definition` "NodeLabel".
18
- */
19
- interface NodeLabel {
20
- width?: number;
21
- height?: number;
22
- x?: number;
23
- y?: number;
24
- }
25
- interface MermaidConfig {
26
- /**
27
- * Theme, the CSS style sheet.
28
- * You may also use `themeCSS` to override this value.
29
- *
30
- */
31
- theme?: string | 'default' | 'forest' | 'dark' | 'neutral' | 'null';
32
- themeVariables?: any;
33
- themeCSS?: string;
34
- /**
35
- * The maximum allowed size of the users text diagram
36
- */
37
- maxTextSize?: number;
38
- /**
39
- * Defines the maximum number of edges that can be drawn in a graph.
40
- *
41
- */
42
- maxEdges?: number;
43
- darkMode?: boolean;
44
- htmlLabels?: boolean;
45
- /**
46
- * Specifies the font to be used in the rendered diagrams.
47
- * Can be any possible CSS `font-family`.
48
- * See https://developer.mozilla.org/en-US/docs/Web/CSS/font-family
49
- *
50
- */
51
- fontFamily?: string;
52
- altFontFamily?: string;
53
- /**
54
- * This option decides the amount of logging to be used by mermaid.
55
- *
56
- */
57
- logLevel?: number | string | 0 | 2 | 1 | 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal' | 3 | 4 | 5 | undefined;
58
- /**
59
- * Level of trust for parsed diagram
60
- */
61
- securityLevel?: string | 'strict' | 'loose' | 'antiscript' | 'sandbox' | undefined;
62
- /**
63
- * Dictates whether mermaid starts on Page load
64
- */
65
- startOnLoad?: boolean;
66
- /**
67
- * Controls whether or arrow markers in html code are absolute paths or anchors.
68
- * This matters if you are using base tag settings.
69
- *
70
- */
71
- arrowMarkerAbsolute?: boolean;
72
- /**
73
- * This option controls which `currentConfig` keys are considered secure and
74
- * can only be changed via call to `mermaidAPI.initialize`.
75
- * Calls to `mermaidAPI.reinitialize` cannot make changes to the secure keys
76
- * in the current `currentConfig`.
77
- *
78
- * This prevents malicious graph directives from overriding a site's default security.
79
- *
80
- */
81
- secure?: string[];
82
- /**
83
- * This option specifies if Mermaid can expect the dependent to include KaTeX stylesheets for browsers
84
- * without their own MathML implementation. If this option is disabled and MathML is not supported, the math
85
- * equations are replaced with a warning. If this option is enabled and MathML is not supported, Mermaid will
86
- * fall back to legacy rendering for KaTeX.
87
- *
88
- */
89
- legacyMathML?: boolean;
90
- /**
91
- * This option controls if the generated ids of nodes in the SVG are
92
- * generated randomly or based on a seed.
93
- * If set to `false`, the IDs are generated based on the current date and
94
- * thus are not deterministic. This is the default behavior.
95
- *
96
- * This matters if your files are checked into source control e.g. git and
97
- * should not change unless content is changed.
98
- *
99
- */
100
- deterministicIds?: boolean;
101
- /**
102
- * This option is the optional seed for deterministic ids.
103
- * If set to `undefined` but deterministicIds is `true`, a simple number iterator is used.
104
- * You can set this attribute to base the seed on a static string.
105
- *
106
- */
107
- deterministicIDSeed?: string;
108
- flowchart?: FlowchartDiagramConfig;
109
- sequence?: SequenceDiagramConfig;
110
- gantt?: GanttDiagramConfig;
111
- journey?: JourneyDiagramConfig;
112
- timeline?: TimelineDiagramConfig;
113
- class?: ClassDiagramConfig;
114
- state?: StateDiagramConfig;
115
- er?: ErDiagramConfig;
116
- pie?: PieDiagramConfig;
117
- quadrantChart?: QuadrantChartConfig;
118
- xyChart?: XYChartConfig;
119
- requirement?: RequirementDiagramConfig;
120
- mindmap?: MindmapDiagramConfig;
121
- gitGraph?: GitGraphDiagramConfig;
122
- c4?: C4DiagramConfig;
123
- sankey?: SankeyDiagramConfig;
124
- block?: BlockDiagramConfig;
125
- dompurifyConfig?: DOMPurifyConfiguration;
126
- wrap?: boolean;
127
- fontSize?: number;
128
- }
129
- /**
130
- * Configuration options to pass to the `dompurify` library.
131
- */
132
- type DOMPurifyConfiguration = any;
133
- /**
134
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
135
- * via the `definition` "BaseDiagramConfig".
136
- */
137
- interface BaseDiagramConfig {
138
- useWidth?: number;
139
- /**
140
- * When this flag is set to `true`, the height and width is set to 100%
141
- * and is then scaled with the available space.
142
- * If set to `false`, the absolute space required is used.
143
- *
144
- */
145
- useMaxWidth?: boolean;
146
- }
147
- /**
148
- * The object containing configurations specific for block diagrams.
149
- *
150
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
151
- * via the `definition` "BlockDiagramConfig".
152
- */
153
- interface BlockDiagramConfig extends BaseDiagramConfig {
154
- padding?: number;
155
- }
156
- /**
157
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
158
- * via the `definition` "GitGraphDiagramConfig".
159
- */
160
- interface GitGraphDiagramConfig extends BaseDiagramConfig {
161
- /**
162
- * Margin top for the text over the diagram
163
- */
164
- titleTopMargin?: number;
165
- diagramPadding?: number;
166
- nodeLabel?: NodeLabel;
167
- mainBranchName?: string;
168
- mainBranchOrder?: number;
169
- showCommitLabel?: boolean;
170
- showBranches?: boolean;
171
- rotateCommitLabel?: boolean;
172
- parallelCommits?: boolean;
173
- /**
174
- * Controls whether or arrow markers in html code are absolute paths or anchors.
175
- * This matters if you are using base tag settings.
176
- *
177
- */
178
- arrowMarkerAbsolute?: boolean;
179
- }
180
- /**
181
- * The object containing configurations specific for req diagrams
182
- *
183
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
184
- * via the `definition` "RequirementDiagramConfig".
185
- */
186
- interface RequirementDiagramConfig extends BaseDiagramConfig {
187
- rect_fill?: string;
188
- text_color?: string;
189
- rect_border_size?: string;
190
- rect_border_color?: string;
191
- rect_min_width?: number;
192
- rect_min_height?: number;
193
- fontSize?: number;
194
- rect_padding?: number;
195
- line_height?: number;
196
- }
197
- /**
198
- * The object containing configurations specific for mindmap diagrams
199
- *
200
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
201
- * via the `definition` "MindmapDiagramConfig".
202
- */
203
- interface MindmapDiagramConfig extends BaseDiagramConfig {
204
- padding?: number;
205
- maxNodeWidth?: number;
206
- }
207
- /**
208
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
209
- * via the `definition` "PieDiagramConfig".
210
- */
211
- interface PieDiagramConfig extends BaseDiagramConfig {
212
- /**
213
- * Axial position of slice's label from zero at the center to 1 at the outside edges.
214
- *
215
- */
216
- textPosition?: number;
217
- }
218
- /**
219
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
220
- * via the `definition` "QuadrantChartConfig".
221
- */
222
- interface QuadrantChartConfig extends BaseDiagramConfig {
223
- /**
224
- * Width of the chart
225
- */
226
- chartWidth?: number;
227
- /**
228
- * Height of the chart
229
- */
230
- chartHeight?: number;
231
- /**
232
- * Chart title top and bottom padding
233
- */
234
- titleFontSize?: number;
235
- /**
236
- * Padding around the quadrant square
237
- */
238
- titlePadding?: number;
239
- /**
240
- * quadrant title padding from top if the quadrant is rendered on top
241
- */
242
- quadrantPadding?: number;
243
- /**
244
- * Padding around x-axis labels
245
- */
246
- xAxisLabelPadding?: number;
247
- /**
248
- * Padding around y-axis labels
249
- */
250
- yAxisLabelPadding?: number;
251
- /**
252
- * x-axis label font size
253
- */
254
- xAxisLabelFontSize?: number;
255
- /**
256
- * y-axis label font size
257
- */
258
- yAxisLabelFontSize?: number;
259
- /**
260
- * quadrant title font size
261
- */
262
- quadrantLabelFontSize?: number;
263
- /**
264
- * quadrant title padding from top if the quadrant is rendered on top
265
- */
266
- quadrantTextTopPadding?: number;
267
- /**
268
- * padding between point and point label
269
- */
270
- pointTextPadding?: number;
271
- /**
272
- * point title font size
273
- */
274
- pointLabelFontSize?: number;
275
- /**
276
- * radius of the point to be drawn
277
- */
278
- pointRadius?: number;
279
- /**
280
- * position of x-axis labels
281
- */
282
- xAxisPosition?: 'top' | 'bottom';
283
- /**
284
- * position of y-axis labels
285
- */
286
- yAxisPosition?: 'left' | 'right';
287
- /**
288
- * stroke width of edges of the box that are inside the quadrant
289
- */
290
- quadrantInternalBorderStrokeWidth?: number;
291
- /**
292
- * stroke width of edges of the box that are outside the quadrant
293
- */
294
- quadrantExternalBorderStrokeWidth?: number;
295
- }
296
- /**
297
- * This object contains configuration for XYChart axis config
298
- *
299
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
300
- * via the `definition` "XYChartAxisConfig".
301
- */
302
- interface XYChartAxisConfig {
303
- /**
304
- * Should show the axis labels (tick text)
305
- */
306
- showLabel?: boolean;
307
- /**
308
- * font size of the axis labels (tick text)
309
- */
310
- labelFontSize?: number;
311
- /**
312
- * top and bottom space from axis label (tick text)
313
- */
314
- labelPadding?: number;
315
- /**
316
- * Should show the axis title
317
- */
318
- showTitle?: boolean;
319
- /**
320
- * font size of the axis title
321
- */
322
- titleFontSize?: number;
323
- /**
324
- * top and bottom space from axis title
325
- */
326
- titlePadding?: number;
327
- /**
328
- * Should show the axis tick lines
329
- */
330
- showTick?: boolean;
331
- /**
332
- * length of the axis tick lines
333
- */
334
- tickLength?: number;
335
- /**
336
- * width of the axis tick lines
337
- */
338
- tickWidth?: number;
339
- /**
340
- * Show line across the axis
341
- */
342
- showAxisLine?: boolean;
343
- /**
344
- * Width of the axis line
345
- */
346
- axisLineWidth?: number;
347
- }
348
- /**
349
- * This object contains configuration specific to XYCharts
350
- *
351
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
352
- * via the `definition` "XYChartConfig".
353
- */
354
- interface XYChartConfig extends BaseDiagramConfig {
355
- /**
356
- * width of the chart
357
- */
358
- width?: number;
359
- /**
360
- * height of the chart
361
- */
362
- height?: number;
363
- /**
364
- * Font size of the chart title
365
- */
366
- titleFontSize?: number;
367
- /**
368
- * Top and bottom space from the chart title
369
- */
370
- titlePadding?: number;
371
- /**
372
- * Should show the chart title
373
- */
374
- showTitle?: boolean;
375
- xAxis?: XYChartAxisConfig1;
376
- yAxis?: XYChartAxisConfig2;
377
- /**
378
- * How to plot will be drawn horizontal or vertical
379
- */
380
- chartOrientation?: 'vertical' | 'horizontal';
381
- /**
382
- * Minimum percent of space plots of the chart will take
383
- */
384
- plotReservedSpacePercent?: number;
385
- }
386
- /**
387
- * This object contains configuration for XYChart axis config
388
- */
389
- interface XYChartAxisConfig1 {
390
- /**
391
- * Should show the axis labels (tick text)
392
- */
393
- showLabel?: boolean;
394
- /**
395
- * font size of the axis labels (tick text)
396
- */
397
- labelFontSize?: number;
398
- /**
399
- * top and bottom space from axis label (tick text)
400
- */
401
- labelPadding?: number;
402
- /**
403
- * Should show the axis title
404
- */
405
- showTitle?: boolean;
406
- /**
407
- * font size of the axis title
408
- */
409
- titleFontSize?: number;
410
- /**
411
- * top and bottom space from axis title
412
- */
413
- titlePadding?: number;
414
- /**
415
- * Should show the axis tick lines
416
- */
417
- showTick?: boolean;
418
- /**
419
- * length of the axis tick lines
420
- */
421
- tickLength?: number;
422
- /**
423
- * width of the axis tick lines
424
- */
425
- tickWidth?: number;
426
- /**
427
- * Show line across the axis
428
- */
429
- showAxisLine?: boolean;
430
- /**
431
- * Width of the axis line
432
- */
433
- axisLineWidth?: number;
434
- }
435
- /**
436
- * This object contains configuration for XYChart axis config
437
- */
438
- interface XYChartAxisConfig2 {
439
- /**
440
- * Should show the axis labels (tick text)
441
- */
442
- showLabel?: boolean;
443
- /**
444
- * font size of the axis labels (tick text)
445
- */
446
- labelFontSize?: number;
447
- /**
448
- * top and bottom space from axis label (tick text)
449
- */
450
- labelPadding?: number;
451
- /**
452
- * Should show the axis title
453
- */
454
- showTitle?: boolean;
455
- /**
456
- * font size of the axis title
457
- */
458
- titleFontSize?: number;
459
- /**
460
- * top and bottom space from axis title
461
- */
462
- titlePadding?: number;
463
- /**
464
- * Should show the axis tick lines
465
- */
466
- showTick?: boolean;
467
- /**
468
- * length of the axis tick lines
469
- */
470
- tickLength?: number;
471
- /**
472
- * width of the axis tick lines
473
- */
474
- tickWidth?: number;
475
- /**
476
- * Show line across the axis
477
- */
478
- showAxisLine?: boolean;
479
- /**
480
- * Width of the axis line
481
- */
482
- axisLineWidth?: number;
483
- }
484
- /**
485
- * The object containing configurations specific for entity relationship diagrams
486
- *
487
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
488
- * via the `definition` "ErDiagramConfig".
489
- */
490
- interface ErDiagramConfig extends BaseDiagramConfig {
491
- /**
492
- * Margin top for the text over the diagram
493
- */
494
- titleTopMargin?: number;
495
- /**
496
- * The amount of padding around the diagram as a whole so that embedded
497
- * diagrams have margins, expressed in pixels.
498
- *
499
- */
500
- diagramPadding?: number;
501
- /**
502
- * Directional bias for layout of entities
503
- */
504
- layoutDirection?: string | 'TB' | 'BT' | 'LR' | 'RL';
505
- /**
506
- * The minimum width of an entity box. Expressed in pixels.
507
- */
508
- minEntityWidth?: number;
509
- /**
510
- * The minimum height of an entity box. Expressed in pixels.
511
- */
512
- minEntityHeight?: number;
513
- /**
514
- * The minimum internal padding between text in an entity box and the enclosing box borders.
515
- * Expressed in pixels.
516
- *
517
- */
518
- entityPadding?: number;
519
- /**
520
- * Stroke color of box edges and lines.
521
- */
522
- stroke?: string;
523
- /**
524
- * Fill color of entity boxes
525
- */
526
- fill?: string;
527
- /**
528
- * Font size (expressed as an integer representing a number of pixels)
529
- */
530
- fontSize?: number;
531
- }
532
- /**
533
- * The object containing configurations specific for entity relationship diagrams
534
- *
535
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
536
- * via the `definition` "StateDiagramConfig".
537
- */
538
- interface StateDiagramConfig extends BaseDiagramConfig {
539
- /**
540
- * Margin top for the text over the diagram
541
- */
542
- titleTopMargin?: number;
543
- arrowMarkerAbsolute?: boolean;
544
- dividerMargin?: number;
545
- sizeUnit?: number;
546
- padding?: number;
547
- textHeight?: number;
548
- titleShift?: number;
549
- noteMargin?: number;
550
- forkWidth?: number;
551
- forkHeight?: number;
552
- miniPadding?: number;
553
- /**
554
- * Font size factor, this is used to guess the width of the edges labels
555
- * before rendering by dagre layout.
556
- * This might need updating if/when switching font
557
- *
558
- */
559
- fontSizeFactor?: number;
560
- fontSize?: number;
561
- labelHeight?: number;
562
- edgeLengthFactor?: string;
563
- compositTitleSize?: number;
564
- radius?: number;
565
- /**
566
- * Decides which rendering engine that is to be used for the rendering.
567
- *
568
- */
569
- defaultRenderer?: string | 'dagre-d3' | 'dagre-wrapper' | 'elk';
570
- }
571
- /**
572
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
573
- * via the `definition` "ClassDiagramConfig".
574
- */
575
- interface ClassDiagramConfig extends BaseDiagramConfig {
576
- /**
577
- * Margin top for the text over the diagram
578
- */
579
- titleTopMargin?: number;
580
- /**
581
- * Controls whether or arrow markers in html code are absolute paths or anchors.
582
- * This matters if you are using base tag settings.
583
- *
584
- */
585
- arrowMarkerAbsolute?: boolean;
586
- dividerMargin?: number;
587
- padding?: number;
588
- textHeight?: number;
589
- /**
590
- * Decides which rendering engine that is to be used for the rendering.
591
- *
592
- */
593
- defaultRenderer?: string | 'dagre-d3' | 'dagre-wrapper' | 'elk';
594
- nodeSpacing?: number;
595
- rankSpacing?: number;
596
- /**
597
- * The amount of padding around the diagram as a whole so that embedded
598
- * diagrams have margins, expressed in pixels.
599
- *
600
- */
601
- diagramPadding?: number;
602
- htmlLabels?: boolean;
603
- }
604
- /**
605
- * The object containing configurations specific for journey diagrams
606
- *
607
- *
608
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
609
- * via the `definition` "JourneyDiagramConfig".
610
- */
611
- interface JourneyDiagramConfig extends BaseDiagramConfig {
612
- /**
613
- * Margin to the right and left of the c4 diagram, must be a positive value.
614
- *
615
- */
616
- diagramMarginX?: number;
617
- /**
618
- * Margin to the over and under the c4 diagram, must be a positive value.
619
- *
620
- */
621
- diagramMarginY?: number;
622
- /**
623
- * Margin between actors
624
- */
625
- leftMargin?: number;
626
- /**
627
- * Width of actor boxes
628
- */
629
- width?: number;
630
- /**
631
- * Height of actor boxes
632
- */
633
- height?: number;
634
- /**
635
- * Margin around loop boxes
636
- */
637
- boxMargin?: number;
638
- /**
639
- * Margin around the text in loop/alt/opt boxes
640
- */
641
- boxTextMargin?: number;
642
- /**
643
- * Margin around notes
644
- */
645
- noteMargin?: number;
646
- /**
647
- * Space between messages.
648
- */
649
- messageMargin?: number;
650
- /**
651
- * Multiline message alignment
652
- */
653
- messageAlign?: string | 'left' | 'center' | 'right';
654
- /**
655
- * Prolongs the edge of the diagram downwards.
656
- *
657
- * Depending on css styling this might need adjustment.
658
- *
659
- */
660
- bottomMarginAdj?: number;
661
- /**
662
- * Curved Arrows become Right Angles
663
- *
664
- * This will display arrows that start and begin at the same node as
665
- * right angles, rather than as curves.
666
- *
667
- */
668
- rightAngles?: boolean;
669
- taskFontSize?: string | number;
670
- taskFontFamily?: string;
671
- taskMargin?: number;
672
- /**
673
- * Width of activation box
674
- */
675
- activationWidth?: number;
676
- /**
677
- * text placement as: tspan | fo | old only text as before
678
- *
679
- */
680
- textPlacement?: string;
681
- actorColours?: string[];
682
- sectionFills?: string[];
683
- sectionColours?: string[];
684
- }
685
- /**
686
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
687
- * via the `definition` "TimelineDiagramConfig".
688
- */
689
- interface TimelineDiagramConfig extends BaseDiagramConfig {
690
- /**
691
- * Margin to the right and left of the c4 diagram, must be a positive value.
692
- *
693
- */
694
- diagramMarginX?: number;
695
- /**
696
- * Margin to the over and under the c4 diagram, must be a positive value.
697
- *
698
- */
699
- diagramMarginY?: number;
700
- /**
701
- * Margin between actors
702
- */
703
- leftMargin?: number;
704
- /**
705
- * Width of actor boxes
706
- */
707
- width?: number;
708
- /**
709
- * Height of actor boxes
710
- */
711
- height?: number;
712
- padding?: number;
713
- /**
714
- * Margin around loop boxes
715
- */
716
- boxMargin?: number;
717
- /**
718
- * Margin around the text in loop/alt/opt boxes
719
- */
720
- boxTextMargin?: number;
721
- /**
722
- * Margin around notes
723
- */
724
- noteMargin?: number;
725
- /**
726
- * Space between messages.
727
- */
728
- messageMargin?: number;
729
- /**
730
- * Multiline message alignment
731
- */
732
- messageAlign?: string | 'left' | 'center' | 'right';
733
- /**
734
- * Prolongs the edge of the diagram downwards.
735
- *
736
- * Depending on css styling this might need adjustment.
737
- *
738
- */
739
- bottomMarginAdj?: number;
740
- /**
741
- * Curved Arrows become Right Angles
742
- *
743
- * This will display arrows that start and begin at the same node as
744
- * right angles, rather than as curves.
745
- *
746
- */
747
- rightAngles?: boolean;
748
- taskFontSize?: string | number;
749
- taskFontFamily?: string;
750
- taskMargin?: number;
751
- /**
752
- * Width of activation box
753
- */
754
- activationWidth?: number;
755
- /**
756
- * text placement as: tspan | fo | old only text as before
757
- *
758
- */
759
- textPlacement?: string;
760
- actorColours?: string[];
761
- sectionFills?: string[];
762
- sectionColours?: string[];
763
- disableMulticolor?: boolean;
764
- }
765
- /**
766
- * The object containing configurations specific for gantt diagrams
767
- *
768
- *
769
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
770
- * via the `definition` "GanttDiagramConfig".
771
- */
772
- interface GanttDiagramConfig extends BaseDiagramConfig {
773
- /**
774
- * Margin top for the text over the diagram
775
- */
776
- titleTopMargin?: number;
777
- /**
778
- * The height of the bars in the graph
779
- */
780
- barHeight?: number;
781
- /**
782
- * The margin between the different activities in the gantt diagram
783
- */
784
- barGap?: number;
785
- /**
786
- * Margin between title and gantt diagram and between axis and gantt diagram.
787
- *
788
- */
789
- topPadding?: number;
790
- /**
791
- * The space allocated for the section name to the right of the activities
792
- *
793
- */
794
- rightPadding?: number;
795
- /**
796
- * The space allocated for the section name to the left of the activities
797
- *
798
- */
799
- leftPadding?: number;
800
- /**
801
- * Vertical starting position of the grid lines
802
- */
803
- gridLineStartPadding?: number;
804
- /**
805
- * Font size
806
- */
807
- fontSize?: number;
808
- /**
809
- * Font size for sections
810
- */
811
- sectionFontSize?: string | number;
812
- /**
813
- * The number of alternating section styles
814
- */
815
- numberSectionStyles?: number;
816
- /**
817
- * Date/time format of the axis
818
- *
819
- * This might need adjustment to match your locale and preferences.
820
- *
821
- */
822
- axisFormat?: string;
823
- /**
824
- * axis ticks
825
- *
826
- * Pattern is:
827
- *
828
- * ```javascript
829
- * /^([1-9][0-9]*)(millisecond|second|minute|hour|day|week|month)$/
830
- * ```
831
- *
832
- */
833
- tickInterval?: string;
834
- /**
835
- * When this flag is set, date labels will be added to the top of the chart
836
- *
837
- */
838
- topAxis?: boolean;
839
- /**
840
- * Controls the display mode.
841
- *
842
- */
843
- displayMode?: string | 'compact';
844
- /**
845
- * On which day a week-based interval should start
846
- *
847
- */
848
- weekday?: 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
849
- }
850
- /**
851
- * The object containing configurations specific for sequence diagrams
852
- *
853
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
854
- * via the `definition` "SequenceDiagramConfig".
855
- */
856
- interface SequenceDiagramConfig extends BaseDiagramConfig {
857
- arrowMarkerAbsolute?: boolean;
858
- hideUnusedParticipants?: boolean;
859
- /**
860
- * Width of the activation rect
861
- */
862
- activationWidth?: number;
863
- /**
864
- * Margin to the right and left of the sequence diagram
865
- */
866
- diagramMarginX?: number;
867
- /**
868
- * Margin to the over and under the sequence diagram
869
- */
870
- diagramMarginY?: number;
871
- /**
872
- * Margin between actors
873
- */
874
- actorMargin?: number;
875
- /**
876
- * Width of actor boxes
877
- */
878
- width?: number;
879
- /**
880
- * Height of actor boxes
881
- */
882
- height?: number;
883
- /**
884
- * Margin around loop boxes
885
- */
886
- boxMargin?: number;
887
- /**
888
- * Margin around the text in loop/alt/opt boxes
889
- */
890
- boxTextMargin?: number;
891
- /**
892
- * Margin around notes
893
- */
894
- noteMargin?: number;
895
- /**
896
- * Space between messages.
897
- */
898
- messageMargin?: number;
899
- /**
900
- * Multiline message alignment
901
- */
902
- messageAlign?: string | 'left' | 'center' | 'right';
903
- /**
904
- * Mirror actors under diagram
905
- *
906
- */
907
- mirrorActors?: boolean;
908
- /**
909
- * forces actor popup menus to always be visible (to support E2E testing).
910
- *
911
- */
912
- forceMenus?: boolean;
913
- /**
914
- * Prolongs the edge of the diagram downwards.
915
- *
916
- * Depending on css styling this might need adjustment.
917
- *
918
- */
919
- bottomMarginAdj?: number;
920
- /**
921
- * Curved Arrows become Right Angles
922
- *
923
- * This will display arrows that start and begin at the same node as
924
- * right angles, rather than as curves.
925
- *
926
- */
927
- rightAngles?: boolean;
928
- /**
929
- * This will show the node numbers
930
- */
931
- showSequenceNumbers?: boolean;
932
- /**
933
- * This sets the font size of the actor's description
934
- */
935
- actorFontSize?: string | number;
936
- /**
937
- * This sets the font family of the actor's description
938
- */
939
- actorFontFamily?: string;
940
- /**
941
- * This sets the font weight of the actor's description
942
- */
943
- actorFontWeight?: string | number;
944
- /**
945
- * This sets the font size of actor-attached notes
946
- */
947
- noteFontSize?: string | number;
948
- /**
949
- * This sets the font family of actor-attached notes
950
- */
951
- noteFontFamily?: string;
952
- /**
953
- * This sets the font weight of actor-attached notes
954
- */
955
- noteFontWeight?: string | number;
956
- /**
957
- * This sets the text alignment of actor-attached notes
958
- */
959
- noteAlign?: string | 'left' | 'center' | 'right';
960
- /**
961
- * This sets the font size of actor messages
962
- */
963
- messageFontSize?: string | number;
964
- /**
965
- * This sets the font family of actor messages
966
- */
967
- messageFontFamily?: string;
968
- /**
969
- * This sets the font weight of actor messages
970
- */
971
- messageFontWeight?: string | number;
972
- /**
973
- * This sets the auto-wrap state for the diagram
974
- */
975
- wrap?: boolean;
976
- /**
977
- * This sets the auto-wrap padding for the diagram (sides only)
978
- */
979
- wrapPadding?: number;
980
- /**
981
- * This sets the width of the loop-box (loop, alt, opt, par)
982
- */
983
- labelBoxWidth?: number;
984
- /**
985
- * This sets the height of the loop-box (loop, alt, opt, par)
986
- */
987
- labelBoxHeight?: number;
988
- messageFont?: FontCalculator;
989
- noteFont?: FontCalculator;
990
- actorFont?: FontCalculator;
991
- }
992
- /**
993
- * The object containing configurations specific for flowcharts
994
- *
995
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
996
- * via the `definition` "FlowchartDiagramConfig".
997
- */
998
- interface FlowchartDiagramConfig extends BaseDiagramConfig {
999
- /**
1000
- * Margin top for the text over the diagram
1001
- */
1002
- titleTopMargin?: number;
1003
- /**
1004
- * Defines a top/bottom margin for subgraph titles
1005
- *
1006
- */
1007
- subGraphTitleMargin?: {
1008
- top?: number;
1009
- bottom?: number;
1010
- };
1011
- arrowMarkerAbsolute?: boolean;
1012
- /**
1013
- * The amount of padding around the diagram as a whole so that embedded
1014
- * diagrams have margins, expressed in pixels.
1015
- *
1016
- */
1017
- diagramPadding?: number;
1018
- /**
1019
- * Flag for setting whether or not a html tag should be used for rendering labels on the edges.
1020
- *
1021
- */
1022
- htmlLabels?: boolean;
1023
- /**
1024
- * Defines the spacing between nodes on the same level
1025
- *
1026
- * Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs,
1027
- * and the vertical spacing for LR as well as RL graphs.
1028
- *
1029
- */
1030
- nodeSpacing?: number;
1031
- /**
1032
- * Defines the spacing between nodes on different levels
1033
- *
1034
- * Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs,
1035
- * and the vertical spacing for LR as well as RL graphs.
1036
- *
1037
- */
1038
- rankSpacing?: number;
1039
- /**
1040
- * Defines how mermaid renders curves for flowcharts.
1041
- *
1042
- */
1043
- curve?: string | 'basis' | 'linear' | 'cardinal';
1044
- /**
1045
- * Represents the padding between the labels and the shape
1046
- *
1047
- * **Only used in new experimental rendering.**
1048
- *
1049
- */
1050
- padding?: number;
1051
- /**
1052
- * Decides which rendering engine that is to be used for the rendering.
1053
- *
1054
- */
1055
- defaultRenderer?: string | 'dagre-d3' | 'dagre-wrapper' | 'elk';
1056
- /**
1057
- * Width of nodes where text is wrapped.
1058
- *
1059
- * When using markdown strings the text ius wrapped automatically, this
1060
- * value sets the max width of a text before it continues on a new line.
1061
- *
1062
- */
1063
- wrappingWidth?: number;
1064
- }
1065
- /**
1066
- * The object containing configurations specific for sankey diagrams.
1067
- *
1068
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
1069
- * via the `definition` "SankeyDiagramConfig".
1070
- */
1071
- interface SankeyDiagramConfig extends BaseDiagramConfig {
1072
- width?: number;
1073
- height?: number;
1074
- /**
1075
- * The color of the links in the sankey diagram.
1076
- *
1077
- */
1078
- linkColor?: SankeyLinkColor | string;
1079
- /**
1080
- * Controls the alignment of the Sankey diagrams.
1081
- *
1082
- * See <https://github.com/d3/d3-sankey#alignments>.
1083
- *
1084
- */
1085
- nodeAlignment?: 'left' | 'right' | 'center' | 'justify';
1086
- useMaxWidth?: boolean;
1087
- /**
1088
- * Toggle to display or hide values along with title.
1089
- *
1090
- */
1091
- showValues?: boolean;
1092
- /**
1093
- * The prefix to use for values
1094
- *
1095
- */
1096
- prefix?: string;
1097
- /**
1098
- * The suffix to use for values
1099
- *
1100
- */
1101
- suffix?: string;
1102
- }
1103
- /**
1104
- * The object containing configurations specific for c4 diagrams
1105
- *
1106
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
1107
- * via the `definition` "C4DiagramConfig".
1108
- */
1109
- interface C4DiagramConfig extends BaseDiagramConfig {
1110
- /**
1111
- * Margin to the right and left of the c4 diagram, must be a positive value.
1112
- *
1113
- */
1114
- diagramMarginX?: number;
1115
- /**
1116
- * Margin to the over and under the c4 diagram, must be a positive value.
1117
- *
1118
- */
1119
- diagramMarginY?: number;
1120
- /**
1121
- * Margin between shapes
1122
- */
1123
- c4ShapeMargin?: number;
1124
- /**
1125
- * Padding between shapes
1126
- */
1127
- c4ShapePadding?: number;
1128
- /**
1129
- * Width of person boxes
1130
- */
1131
- width?: number;
1132
- /**
1133
- * Height of person boxes
1134
- */
1135
- height?: number;
1136
- /**
1137
- * Margin around boxes
1138
- */
1139
- boxMargin?: number;
1140
- /**
1141
- * How many shapes to place in each row.
1142
- */
1143
- c4ShapeInRow?: number;
1144
- nextLinePaddingX?: number;
1145
- /**
1146
- * How many boundaries to place in each row.
1147
- */
1148
- c4BoundaryInRow?: number;
1149
- /**
1150
- * This sets the font size of Person shape for the diagram
1151
- */
1152
- personFontSize?: string | number;
1153
- /**
1154
- * This sets the font weight of Person shape for the diagram
1155
- */
1156
- personFontFamily?: string;
1157
- /**
1158
- * This sets the font weight of Person shape for the diagram
1159
- */
1160
- personFontWeight?: string | number;
1161
- /**
1162
- * This sets the font size of External Person shape for the diagram
1163
- */
1164
- external_personFontSize?: string | number;
1165
- /**
1166
- * This sets the font family of External Person shape for the diagram
1167
- */
1168
- external_personFontFamily?: string;
1169
- /**
1170
- * This sets the font weight of External Person shape for the diagram
1171
- */
1172
- external_personFontWeight?: string | number;
1173
- /**
1174
- * This sets the font size of System shape for the diagram
1175
- */
1176
- systemFontSize?: string | number;
1177
- /**
1178
- * This sets the font family of System shape for the diagram
1179
- */
1180
- systemFontFamily?: string;
1181
- /**
1182
- * This sets the font weight of System shape for the diagram
1183
- */
1184
- systemFontWeight?: string | number;
1185
- /**
1186
- * This sets the font size of External System shape for the diagram
1187
- */
1188
- external_systemFontSize?: string | number;
1189
- /**
1190
- * This sets the font family of External System shape for the diagram
1191
- */
1192
- external_systemFontFamily?: string;
1193
- /**
1194
- * This sets the font weight of External System shape for the diagram
1195
- */
1196
- external_systemFontWeight?: string | number;
1197
- /**
1198
- * This sets the font size of System DB shape for the diagram
1199
- */
1200
- system_dbFontSize?: string | number;
1201
- /**
1202
- * This sets the font family of System DB shape for the diagram
1203
- */
1204
- system_dbFontFamily?: string;
1205
- /**
1206
- * This sets the font weight of System DB shape for the diagram
1207
- */
1208
- system_dbFontWeight?: string | number;
1209
- /**
1210
- * This sets the font size of External System DB shape for the diagram
1211
- */
1212
- external_system_dbFontSize?: string | number;
1213
- /**
1214
- * This sets the font family of External System DB shape for the diagram
1215
- */
1216
- external_system_dbFontFamily?: string;
1217
- /**
1218
- * This sets the font weight of External System DB shape for the diagram
1219
- */
1220
- external_system_dbFontWeight?: string | number;
1221
- /**
1222
- * This sets the font size of System Queue shape for the diagram
1223
- */
1224
- system_queueFontSize?: string | number;
1225
- /**
1226
- * This sets the font family of System Queue shape for the diagram
1227
- */
1228
- system_queueFontFamily?: string;
1229
- /**
1230
- * This sets the font weight of System Queue shape for the diagram
1231
- */
1232
- system_queueFontWeight?: string | number;
1233
- /**
1234
- * This sets the font size of External System Queue shape for the diagram
1235
- */
1236
- external_system_queueFontSize?: string | number;
1237
- /**
1238
- * This sets the font family of External System Queue shape for the diagram
1239
- */
1240
- external_system_queueFontFamily?: string;
1241
- /**
1242
- * This sets the font weight of External System Queue shape for the diagram
1243
- */
1244
- external_system_queueFontWeight?: string | number;
1245
- /**
1246
- * This sets the font size of Boundary shape for the diagram
1247
- */
1248
- boundaryFontSize?: string | number;
1249
- /**
1250
- * This sets the font family of Boundary shape for the diagram
1251
- */
1252
- boundaryFontFamily?: string;
1253
- /**
1254
- * This sets the font weight of Boundary shape for the diagram
1255
- */
1256
- boundaryFontWeight?: string | number;
1257
- /**
1258
- * This sets the font size of Message shape for the diagram
1259
- */
1260
- messageFontSize?: string | number;
1261
- /**
1262
- * This sets the font family of Message shape for the diagram
1263
- */
1264
- messageFontFamily?: string;
1265
- /**
1266
- * This sets the font weight of Message shape for the diagram
1267
- */
1268
- messageFontWeight?: string | number;
1269
- /**
1270
- * This sets the font size of Container shape for the diagram
1271
- */
1272
- containerFontSize?: string | number;
1273
- /**
1274
- * This sets the font family of Container shape for the diagram
1275
- */
1276
- containerFontFamily?: string;
1277
- /**
1278
- * This sets the font weight of Container shape for the diagram
1279
- */
1280
- containerFontWeight?: string | number;
1281
- /**
1282
- * This sets the font size of External Container shape for the diagram
1283
- */
1284
- external_containerFontSize?: string | number;
1285
- /**
1286
- * This sets the font family of External Container shape for the diagram
1287
- */
1288
- external_containerFontFamily?: string;
1289
- /**
1290
- * This sets the font weight of External Container shape for the diagram
1291
- */
1292
- external_containerFontWeight?: string | number;
1293
- /**
1294
- * This sets the font size of Container DB shape for the diagram
1295
- */
1296
- container_dbFontSize?: string | number;
1297
- /**
1298
- * This sets the font family of Container DB shape for the diagram
1299
- */
1300
- container_dbFontFamily?: string;
1301
- /**
1302
- * This sets the font weight of Container DB shape for the diagram
1303
- */
1304
- container_dbFontWeight?: string | number;
1305
- /**
1306
- * This sets the font size of External Container DB shape for the diagram
1307
- */
1308
- external_container_dbFontSize?: string | number;
1309
- /**
1310
- * This sets the font family of External Container DB shape for the diagram
1311
- */
1312
- external_container_dbFontFamily?: string;
1313
- /**
1314
- * This sets the font weight of External Container DB shape for the diagram
1315
- */
1316
- external_container_dbFontWeight?: string | number;
1317
- /**
1318
- * This sets the font size of Container Queue shape for the diagram
1319
- */
1320
- container_queueFontSize?: string | number;
1321
- /**
1322
- * This sets the font family of Container Queue shape for the diagram
1323
- */
1324
- container_queueFontFamily?: string;
1325
- /**
1326
- * This sets the font weight of Container Queue shape for the diagram
1327
- */
1328
- container_queueFontWeight?: string | number;
1329
- /**
1330
- * This sets the font size of External Container Queue shape for the diagram
1331
- */
1332
- external_container_queueFontSize?: string | number;
1333
- /**
1334
- * This sets the font family of External Container Queue shape for the diagram
1335
- */
1336
- external_container_queueFontFamily?: string;
1337
- /**
1338
- * This sets the font weight of External Container Queue shape for the diagram
1339
- */
1340
- external_container_queueFontWeight?: string | number;
1341
- /**
1342
- * This sets the font size of Component shape for the diagram
1343
- */
1344
- componentFontSize?: string | number;
1345
- /**
1346
- * This sets the font family of Component shape for the diagram
1347
- */
1348
- componentFontFamily?: string;
1349
- /**
1350
- * This sets the font weight of Component shape for the diagram
1351
- */
1352
- componentFontWeight?: string | number;
1353
- /**
1354
- * This sets the font size of External Component shape for the diagram
1355
- */
1356
- external_componentFontSize?: string | number;
1357
- /**
1358
- * This sets the font family of External Component shape for the diagram
1359
- */
1360
- external_componentFontFamily?: string;
1361
- /**
1362
- * This sets the font weight of External Component shape for the diagram
1363
- */
1364
- external_componentFontWeight?: string | number;
1365
- /**
1366
- * This sets the font size of Component DB shape for the diagram
1367
- */
1368
- component_dbFontSize?: string | number;
1369
- /**
1370
- * This sets the font family of Component DB shape for the diagram
1371
- */
1372
- component_dbFontFamily?: string;
1373
- /**
1374
- * This sets the font weight of Component DB shape for the diagram
1375
- */
1376
- component_dbFontWeight?: string | number;
1377
- /**
1378
- * This sets the font size of External Component DB shape for the diagram
1379
- */
1380
- external_component_dbFontSize?: string | number;
1381
- /**
1382
- * This sets the font family of External Component DB shape for the diagram
1383
- */
1384
- external_component_dbFontFamily?: string;
1385
- /**
1386
- * This sets the font weight of External Component DB shape for the diagram
1387
- */
1388
- external_component_dbFontWeight?: string | number;
1389
- /**
1390
- * This sets the font size of Component Queue shape for the diagram
1391
- */
1392
- component_queueFontSize?: string | number;
1393
- /**
1394
- * This sets the font family of Component Queue shape for the diagram
1395
- */
1396
- component_queueFontFamily?: string;
1397
- /**
1398
- * This sets the font weight of Component Queue shape for the diagram
1399
- */
1400
- component_queueFontWeight?: string | number;
1401
- /**
1402
- * This sets the font size of External Component Queue shape for the diagram
1403
- */
1404
- external_component_queueFontSize?: string | number;
1405
- /**
1406
- * This sets the font family of External Component Queue shape for the diagram
1407
- */
1408
- external_component_queueFontFamily?: string;
1409
- /**
1410
- * This sets the font weight of External Component Queue shape for the diagram
1411
- */
1412
- external_component_queueFontWeight?: string | number;
1413
- /**
1414
- * This sets the auto-wrap state for the diagram
1415
- */
1416
- wrap?: boolean;
1417
- /**
1418
- * This sets the auto-wrap padding for the diagram (sides only)
1419
- */
1420
- wrapPadding?: number;
1421
- person_bg_color?: string;
1422
- person_border_color?: string;
1423
- external_person_bg_color?: string;
1424
- external_person_border_color?: string;
1425
- system_bg_color?: string;
1426
- system_border_color?: string;
1427
- system_db_bg_color?: string;
1428
- system_db_border_color?: string;
1429
- system_queue_bg_color?: string;
1430
- system_queue_border_color?: string;
1431
- external_system_bg_color?: string;
1432
- external_system_border_color?: string;
1433
- external_system_db_bg_color?: string;
1434
- external_system_db_border_color?: string;
1435
- external_system_queue_bg_color?: string;
1436
- external_system_queue_border_color?: string;
1437
- container_bg_color?: string;
1438
- container_border_color?: string;
1439
- container_db_bg_color?: string;
1440
- container_db_border_color?: string;
1441
- container_queue_bg_color?: string;
1442
- container_queue_border_color?: string;
1443
- external_container_bg_color?: string;
1444
- external_container_border_color?: string;
1445
- external_container_db_bg_color?: string;
1446
- external_container_db_border_color?: string;
1447
- external_container_queue_bg_color?: string;
1448
- external_container_queue_border_color?: string;
1449
- component_bg_color?: string;
1450
- component_border_color?: string;
1451
- component_db_bg_color?: string;
1452
- component_db_border_color?: string;
1453
- component_queue_bg_color?: string;
1454
- component_queue_border_color?: string;
1455
- external_component_bg_color?: string;
1456
- external_component_border_color?: string;
1457
- external_component_db_bg_color?: string;
1458
- external_component_db_border_color?: string;
1459
- external_component_queue_bg_color?: string;
1460
- external_component_queue_border_color?: string;
1461
- personFont?: FontCalculator;
1462
- external_personFont?: FontCalculator;
1463
- systemFont?: FontCalculator;
1464
- external_systemFont?: FontCalculator;
1465
- system_dbFont?: FontCalculator;
1466
- external_system_dbFont?: FontCalculator;
1467
- system_queueFont?: FontCalculator;
1468
- external_system_queueFont?: FontCalculator;
1469
- containerFont?: FontCalculator;
1470
- external_containerFont?: FontCalculator;
1471
- container_dbFont?: FontCalculator;
1472
- external_container_dbFont?: FontCalculator;
1473
- container_queueFont?: FontCalculator;
1474
- external_container_queueFont?: FontCalculator;
1475
- componentFont?: FontCalculator;
1476
- external_componentFont?: FontCalculator;
1477
- component_dbFont?: FontCalculator;
1478
- external_component_dbFont?: FontCalculator;
1479
- component_queueFont?: FontCalculator;
1480
- external_component_queueFont?: FontCalculator;
1481
- boundaryFont?: FontCalculator;
1482
- messageFont?: FontCalculator;
1483
- }
1484
- /**
1485
- * JavaScript function that returns a `FontConfig`.
1486
- *
1487
- * By default, these return the appropriate `*FontSize`, `*FontFamily`, `*FontWeight`
1488
- * values.
1489
- *
1490
- * For example, the font calculator called `boundaryFont` might be defined as:
1491
- *
1492
- * ```javascript
1493
- * boundaryFont: function () {
1494
- * return {
1495
- * fontFamily: this.boundaryFontFamily,
1496
- * fontSize: this.boundaryFontSize,
1497
- * fontWeight: this.boundaryFontWeight,
1498
- * };
1499
- * }
1500
- * ```
1501
- *
1502
- *
1503
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
1504
- * via the `definition` "FontCalculator".
1505
- */
1506
- type FontCalculator = () => Partial<FontConfig>;
1507
- /**
1508
- * This interface was referenced by `MermaidConfig`'s JSON-Schema
1509
- * via the `definition` "FontConfig".
1510
- */
1511
- interface FontConfig {
1512
- fontSize?: CSSFontSize;
1513
- /**
1514
- * The CSS [`font-family`](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) to use.
1515
- */
1516
- fontFamily?: string;
1517
- /**
1518
- * The font weight to use.
1519
- */
1520
- fontWeight?: string | number;
1521
- }
1522
- }
1523
-
1524
- /**
1525
- * 回答类型,思考和回答
1526
- */
1527
- type AnswerType = 'answer' | 'thinking';
1528
- type Theme = 'light' | 'dark';
1529
- interface IMarkdownThemeProps {
1530
- /** 主题 */
1531
- theme?: Theme;
1532
- /** 数学公式配置 */
1533
- math?: IMarkdownMath;
1534
- /** 代码块配置 */
1535
- codeBlock?: IMarkdownCode;
1536
- /** 插件配置 */
1537
- plugins?: IMarkdownPlugin[];
1538
- /** 回答类型 */
1539
- answerType?: 'thinking' | 'answer';
1540
- }
1541
- interface IMarkdownThemeStateProps extends IMarkdownThemeProps {
1542
- theme: Theme;
1543
- answerType: AnswerType;
1544
- }
1545
- interface IMarkdownCode {
1546
- /** 是否显示头部操作按钮
1547
- * 如果为true,则显示头部操作按钮
1548
- * 如果为React.ReactNode,则显示自定义头部操作按钮
1549
- */
1550
- headerActions?: boolean | React.ReactNode;
1551
- }
1552
- interface MarkdownProps extends MarkdownTyperBaseProps, IMarkdownThemeProps {
1553
- children: string | undefined;
1554
- }
1555
- /** MarkdownCMD 组件不需要 children */
1556
- interface MarkdownCMDProps extends MarkdownTyperBaseProps, IMarkdownThemeProps {
1557
- children?: undefined;
1558
- isInnerRender?: boolean;
1559
- }
1560
- interface IMarkdownPlugin {
1561
- remarkPlugin?: Pluggable;
1562
- rehypePlugin?: Pluggable;
1563
- type: 'buildIn' | 'custom';
1564
- id?: any;
1565
- components?: Record<string, React.ComponentType<unknown>>;
1566
- }
1567
- interface IMarkdownMath {
1568
- /** 是括号还是$作为分隔符, 默认是$ */
1569
- splitSymbol: 'bracket' | 'dollar';
1570
- /** 数学公式替换函数 */
1571
- replaceMathBracket?: (value: string) => string;
1572
- }
1573
- /** Markdown 组件的ref 类型 */
1574
- type MarkdownRef = MarkdownBaseRef;
1575
- /** MarkdownCMD 组件的 ref 类型 */
1576
- interface MarkdownCMDRef extends MarkdownBaseRef {
1577
- push: (content: string, answerType?: AnswerType) => void;
1578
- clear: () => void;
1579
- triggerWholeEnd: () => void;
1580
- }
1581
- interface IMarkdownMermaidConfig extends Mermaid.MermaidConfig {
1582
- /** 是否显示头部操作按钮
1583
- * 如果为true,则显示头部操作按钮
1584
- * 如果为React.ReactNode,则显示自定义头部操作按钮
1585
- */
1586
- headerActions?: boolean | React.ReactNode | ((data: {
1587
- graphSvg: SVGElement;
1588
- }) => React.ReactNode);
1589
- }
1590
- interface IMarkdownKatexConfig extends KatexOptions {
1591
- }
1592
-
1593
- interface IMarkdownCustom {
1594
- answerType?: AnswerType;
1595
- theme?: Theme;
1596
- codeBlock?: IMarkdownCode;
1597
- plugins?: IMarkdownPlugin[];
1598
- math?: IMarkdownMath;
1599
- isInnerRender?: boolean;
1600
- }
1601
- declare const MarkdownCMD: React$1.ForwardRefExoticComponent<MarkdownTyperCMDProps & IMarkdownCustom & React$1.RefAttributes<MarkdownCMDRef>>;
1602
-
1603
- declare const _default: React__default.MemoExoticComponent<React__default.ForwardRefExoticComponent<MarkdownProps & React__default.RefAttributes<react_markdown_typer_es_defined.MarkdownBaseRef>>>;
1604
-
1605
- interface ButtonProps$1 {
1606
- className?: string;
1607
- children?: React__default.ReactNode;
1608
- icon?: React__default.ReactNode;
1609
- onClick?: () => void;
1610
- style?: React__default.CSSProperties;
1611
- disabled?: boolean;
1612
- }
1613
- declare const Button: React__default.FC<ButtonProps$1>;
1614
-
1615
- interface IconButtonProps extends ButtonProps$1 {
1616
- icon: React__default.ReactNode;
1617
- className?: string;
1618
- }
1619
- declare const IconButton: React__default.FC<IconButtonProps>;
1620
-
1621
- interface SegmentedItem {
1622
- label: string;
1623
- value: string;
1624
- }
1625
- interface SegmentedProps {
1626
- Segmented: SegmentedItem[];
1627
- value?: string;
1628
- onChange?: (value: string) => void;
1629
- }
1630
- declare const Segmented: React__default.FC<SegmentedProps>;
1631
-
1632
- type ButtonProps = React__default.ComponentProps<typeof Button>;
1633
- interface SuccessButtonProps extends Omit<ButtonProps, 'onClick'> {
1634
- children: React__default.ReactNode;
1635
- onClick: () => Promise<boolean>;
1636
- executeText?: string;
1637
- }
1638
- declare const SuccessButton: React__default.FC<SuccessButtonProps>;
1639
-
1640
- interface CopyButtonProps {
1641
- codeContent?: string;
1642
- style?: React__default.CSSProperties;
1643
- className?: string;
1644
- }
1645
- declare const CopyButton: React__default.FC<CopyButtonProps>;
1646
-
1647
- interface DownloadButtonProps {
1648
- codeContent?: string;
1649
- language: string;
1650
- style?: React__default.CSSProperties;
1651
- className?: string;
1652
- }
1653
- declare const DownloadButton: React__default.FC<DownloadButtonProps>;
1654
-
1655
- interface CodeBlockActionsProps {
1656
- codeContent?: string;
1657
- language: string;
1658
- }
1659
- declare const CodeBlockActions: React__default.FC<CodeBlockActionsProps>;
1660
-
1661
- interface CodeBlockWrapProps {
1662
- children: React__default.ReactNode;
1663
- title: React__default.ReactNode;
1664
- }
1665
- declare const CodeBlockWrap: React__default.FC<CodeBlockWrapProps>;
1666
-
1667
- interface HighlightCodeProps {
1668
- code: string;
1669
- language: string;
1670
- }
1671
- declare const HighlightCode: React__default.FC<HighlightCodeProps>;
1672
-
1673
- declare const CheckMarkIcon: React__default.FC<{
1674
- size: number;
1675
- }>;
1676
- declare const CopyIcon: React__default.FC<{
1677
- size: number;
1678
- }>;
1679
- declare const DownloadIcon: React__default.FC<{
1680
- size: number;
1681
- }>;
1682
-
1683
- declare const zhCN: {
1684
- codeBlock: {
1685
- copy: string;
1686
- copied: string;
1687
- download: string;
1688
- downloaded: string;
1689
- };
1690
- mermaid: {
1691
- diagram: string;
1692
- code: string;
1693
- zoomOut: string;
1694
- zoomIn: string;
1695
- download: string;
1696
- fullScreen: string;
1697
- exitFullScreen: string;
1698
- downloadImage: string;
1699
- downloadedImage: string;
1700
- copyImage: string;
1701
- copiedImage: string;
1702
- fitInView: string;
1703
- };
1704
- };
1705
- type ZhCN = typeof zhCN;
1706
-
1707
- type Locale = ZhCN;
1708
- interface ConfigProviderProps {
1709
- locale?: Locale;
1710
- mermaidConfig?: IMarkdownMermaidConfig;
1711
- katexConfig?: IMarkdownKatexConfig;
1712
- children: React__default.ReactNode;
1713
- }
1714
- interface ConfigContextType {
1715
- locale: Locale;
1716
- mermaidConfig?: IMarkdownMermaidConfig;
1717
- katexConfig?: IMarkdownKatexConfig;
1718
- }
1719
- declare const ConfigProvider: React__default.FC<ConfigProviderProps>;
1720
- declare const useConfig: () => ConfigContextType;
1721
- declare const useLocale: () => {
1722
- codeBlock: {
1723
- copy: string;
1724
- copied: string;
1725
- download: string;
1726
- downloaded: string;
1727
- };
1728
- mermaid: {
1729
- diagram: string;
1730
- code: string;
1731
- zoomOut: string;
1732
- zoomIn: string;
1733
- download: string;
1734
- fullScreen: string;
1735
- exitFullScreen: string;
1736
- downloadImage: string;
1737
- downloadedImage: string;
1738
- copyImage: string;
1739
- copiedImage: string;
1740
- fitInView: string;
1741
- };
1742
- };
1743
-
1744
- declare const useThemeState: () => IMarkdownThemeStateProps;
1745
-
1746
- export { Button, CheckMarkIcon, CodeBlockActions, CodeBlockWrap, ConfigProvider, CopyButton, CopyIcon, DownloadButton, DownloadIcon, HighlightCode, IconButton, _default as Markdown, MarkdownCMD, Segmented, SuccessButton, _default as default, useConfig, useLocale, useThemeState };
1747
- export type { ConfigContextType, ConfigProviderProps, IMarkdownMath, IMarkdownMermaidConfig, IMarkdownPlugin, Locale, MarkdownCMDProps, MarkdownCMDRef, MarkdownProps, MarkdownRef };