mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-24 08:24:14 +02:00
chore: Remove redundant flowDiagram-v2
This commit is contained in:
@@ -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 };
|
||||
};
|
||||
|
||||
|
||||
@@ -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');
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user