@zombie-mermaid/mermaid-parser 4.0.0 → 4.1.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/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +680 -248
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/flowchart-parser.ts +1324 -0
- package/src/index.ts +4 -2
package/dist/index.d.cts
CHANGED
|
@@ -5,6 +5,7 @@ import { NodeShape } from '@zombie-mermaid/core';
|
|
|
5
5
|
import { Point } from '@zombie-mermaid/core';
|
|
6
6
|
import { Statement } from '@zombie-mermaid/core';
|
|
7
7
|
import { StyleDirectives } from '@zombie-mermaid/core';
|
|
8
|
+
import { toDirection } from '@zombie-mermaid/core';
|
|
8
9
|
|
|
9
10
|
/** Narrow rectangle on a lifeline showing active processing */
|
|
10
11
|
export declare interface Activation {
|
|
@@ -655,6 +656,13 @@ export declare function parseExpandedMeta(body: string): ExpandedNodeMeta;
|
|
|
655
656
|
*/
|
|
656
657
|
export declare function parseGenericTypes(input: string): string;
|
|
657
658
|
|
|
659
|
+
/**
|
|
660
|
+
* Parse Mermaid text into a logical graph structure.
|
|
661
|
+
* Auto-detects diagram type (flowchart or state diagram).
|
|
662
|
+
* Throws on invalid/unsupported input.
|
|
663
|
+
*/
|
|
664
|
+
export declare function parseMermaid(text: string): MermaidGraph;
|
|
665
|
+
|
|
658
666
|
/**
|
|
659
667
|
* Parse a Mermaid sequence diagram.
|
|
660
668
|
* Expects the first line to be "sequenceDiagram".
|
|
@@ -1071,6 +1079,8 @@ export declare interface SequenceDiagram {
|
|
|
1071
1079
|
*/
|
|
1072
1080
|
export declare function toBlockType(value: string): Block['type'];
|
|
1073
1081
|
|
|
1082
|
+
export { toDirection }
|
|
1083
|
+
|
|
1074
1084
|
/** Greedy word wrap; a word longer than `width` stays on its own line. */
|
|
1075
1085
|
export declare function wrapC4Text(text: string, width: number): string[];
|
|
1076
1086
|
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { NodeShape } from '@zombie-mermaid/core';
|
|
|
5
5
|
import { Point } from '@zombie-mermaid/core';
|
|
6
6
|
import { Statement } from '@zombie-mermaid/core';
|
|
7
7
|
import { StyleDirectives } from '@zombie-mermaid/core';
|
|
8
|
+
import { toDirection } from '@zombie-mermaid/core';
|
|
8
9
|
|
|
9
10
|
/** Narrow rectangle on a lifeline showing active processing */
|
|
10
11
|
export declare interface Activation {
|
|
@@ -655,6 +656,13 @@ export declare function parseExpandedMeta(body: string): ExpandedNodeMeta;
|
|
|
655
656
|
*/
|
|
656
657
|
export declare function parseGenericTypes(input: string): string;
|
|
657
658
|
|
|
659
|
+
/**
|
|
660
|
+
* Parse Mermaid text into a logical graph structure.
|
|
661
|
+
* Auto-detects diagram type (flowchart or state diagram).
|
|
662
|
+
* Throws on invalid/unsupported input.
|
|
663
|
+
*/
|
|
664
|
+
export declare function parseMermaid(text: string): MermaidGraph;
|
|
665
|
+
|
|
658
666
|
/**
|
|
659
667
|
* Parse a Mermaid sequence diagram.
|
|
660
668
|
* Expects the first line to be "sequenceDiagram".
|
|
@@ -1071,6 +1079,8 @@ export declare interface SequenceDiagram {
|
|
|
1071
1079
|
*/
|
|
1072
1080
|
export declare function toBlockType(value: string): Block['type'];
|
|
1073
1081
|
|
|
1082
|
+
export { toDirection }
|
|
1083
|
+
|
|
1074
1084
|
/** Greedy word wrap; a word longer than `width` stays on its own line. */
|
|
1075
1085
|
export declare function wrapC4Text(text: string, width: number): string[];
|
|
1076
1086
|
|