@zombie-mermaid/svg-renderer 5.11.2 → 5.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.cjs +34 -25
- package/dist/index.js +58 -49
- package/dist/shared/index.d.ts +32 -0
- package/package.json +3 -3
package/dist/shared/index.d.ts
CHANGED
|
@@ -22,8 +22,10 @@ import { PositionedErDiagram } from '@zombie-mermaid/mermaid-parser';
|
|
|
22
22
|
import { PositionedGraph } from '@zombie-mermaid/core';
|
|
23
23
|
import { PositionedNode } from '@zombie-mermaid/core';
|
|
24
24
|
import { PositionedPieChart } from '@zombie-mermaid/mermaid-parser';
|
|
25
|
+
import { PositionedQuadrantChart } from '@zombie-mermaid/mermaid-parser';
|
|
25
26
|
import { PositionedSequenceDiagram } from '@zombie-mermaid/mermaid-parser';
|
|
26
27
|
import { PositionedXYChart } from '@zombie-mermaid/mermaid-parser';
|
|
28
|
+
import { QuadrantChart } from '@zombie-mermaid/mermaid-parser';
|
|
27
29
|
import { RenderOptions } from '@zombie-mermaid/core';
|
|
28
30
|
import { SequenceDiagram } from '@zombie-mermaid/mermaid-parser';
|
|
29
31
|
import { SequenceRenderOptions } from '@zombie-mermaid/core';
|
|
@@ -409,6 +411,8 @@ export declare function layoutGraphSync(graph: MermaidGraph, options?: Flowchart
|
|
|
409
411
|
/** Lay out a parsed pie chart. Options are accepted for registry parity; none apply. */
|
|
410
412
|
export declare function layoutPieChart(chart: PieChart, _options?: unknown): PositionedPieChart;
|
|
411
413
|
|
|
414
|
+
export declare function layoutQuadrantChart(chart: QuadrantChart): PositionedQuadrantChart;
|
|
415
|
+
|
|
412
416
|
/**
|
|
413
417
|
* Lay out a parsed sequence diagram.
|
|
414
418
|
* Returns a fully positioned diagram ready for SVG rendering.
|
|
@@ -483,6 +487,24 @@ export declare function pieColorValue(index: number, accent: string | undefined,
|
|
|
483
487
|
*/
|
|
484
488
|
export declare function pointsToPath(points: Point[], curve?: CurveStyle): string;
|
|
485
489
|
|
|
490
|
+
/** Mermaid's default `quadrantChart` config. */
|
|
491
|
+
export declare const QUADRANT: {
|
|
492
|
+
readonly width: 500;
|
|
493
|
+
readonly height: 500;
|
|
494
|
+
readonly titlePadding: 10;
|
|
495
|
+
readonly titleFontSize: 20;
|
|
496
|
+
readonly quadrantPadding: 5;
|
|
497
|
+
readonly axisLabelPadding: 5;
|
|
498
|
+
readonly axisLabelFontSize: 16;
|
|
499
|
+
readonly quadrantLabelFontSize: 16;
|
|
500
|
+
readonly quadrantTextTopPadding: 5;
|
|
501
|
+
readonly pointTextPadding: 5;
|
|
502
|
+
readonly pointLabelFontSize: 12;
|
|
503
|
+
readonly pointRadius: 5;
|
|
504
|
+
readonly internalBorderWidth: 1;
|
|
505
|
+
readonly externalBorderWidth: 2;
|
|
506
|
+
};
|
|
507
|
+
|
|
486
508
|
/**
|
|
487
509
|
* Register the `elkjs` constructor used for flowchart, state, class, ER and
|
|
488
510
|
* architecture layout. Call once before rendering, in browsers and bundlers:
|
|
@@ -605,6 +627,16 @@ export declare const renderMermaidSync: typeof renderMermaidSVG;
|
|
|
605
627
|
*/
|
|
606
628
|
export declare function renderPieSvg(chart: PositionedPieChart, colors: DiagramColors, font?: string, transparent?: boolean, embedSource?: string, title?: string, decorative?: boolean, emit?: SvgEmitOptions): string;
|
|
607
629
|
|
|
630
|
+
/**
|
|
631
|
+
* Render a positioned quadrant chart as an SVG string.
|
|
632
|
+
*
|
|
633
|
+
* The accessible name is `title` (from `options.title`, or the chart's own
|
|
634
|
+
* `accTitle` via the front door), as for every type but C4: the visible
|
|
635
|
+
* `title` is not used. It is dropped when `decorative` is set — see svgOpenTag() in
|
|
636
|
+
* packages/core/src/theme.ts.
|
|
637
|
+
*/
|
|
638
|
+
export declare function renderQuadrantSvg(chart: PositionedQuadrantChart, colors: DiagramColors, font?: string, transparent?: boolean, embedSource?: string, title?: string, decorative?: boolean, emit?: SvgEmitOptions): string;
|
|
639
|
+
|
|
608
640
|
/**
|
|
609
641
|
* Render a positioned sequence diagram as an SVG string.
|
|
610
642
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zombie-mermaid/svg-renderer",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.13.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "SVG rendering primitives and the ELK-backed layout engine behind zombie-mermaid's SVG output (maintained continuation of beautiful-mermaid).",
|
|
6
6
|
"keywords": [
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"entities": "^7.0.1",
|
|
53
|
-
"@zombie-mermaid/core": "5.
|
|
54
|
-
"@zombie-mermaid/mermaid-parser": "5.
|
|
53
|
+
"@zombie-mermaid/core": "5.13.0",
|
|
54
|
+
"@zombie-mermaid/mermaid-parser": "5.13.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"elkjs": "^0.11.0 || ^0.12.0"
|