chore: Remove redundant flowDiagram-v2

This commit is contained in:
Sidharth Vinod
2024-08-21 13:28:11 +05:30
parent 69b3a9d3a2
commit 754fa24104
2 changed files with 6 additions and 26 deletions

View File

@@ -1,5 +1,8 @@
import type { DiagramDetector, DiagramLoader } from '../../diagram-api/types.js';
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
import type {
DiagramDetector,
DiagramLoader,
ExternalDiagramDefinition,
} from '../../diagram-api/types.js';
const id = 'flowchart-v2';
@@ -19,7 +22,7 @@ const detector: DiagramDetector = (txt, config) => {
};
const loader: DiagramLoader = async () => {
const { diagram } = await import('./flowDiagram-v2.js');
const { diagram } = await import('./flowDiagram.js');
return { id, diagram };
};

View File

@@ -1,23 +0,0 @@
// @ts-ignore: JISON doesn't support types
import flowParser from './parser/flow.jison';
import flowDb from './flowDb.js';
import renderer from './flowRenderer-v3-unified.js';
import flowStyles from './styles.js';
import type { MermaidConfig } from '../../config.type.js';
import { setConfig } from '../../diagram-api/diagramAPI.js';
export const diagram = {
parser: flowParser,
db: flowDb,
renderer,
styles: flowStyles,
init: (cnf: MermaidConfig) => {
if (!cnf.flowchart) {
cnf.flowchart = {};
}
cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
setConfig({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } });
flowDb.clear();
flowDb.setGen('gen-2');
},
};