Updated folder name

This commit is contained in:
shubham-mermaid
2025-06-10 13:16:42 +05:30
parent 13f8549f81
commit 99c8224dfa
12 changed files with 43 additions and 45 deletions

View File

@@ -568,7 +568,7 @@ User --> Role
look: 'classic ', look: 'classic ',
// 'elk.nodePlacement.strategy': 'NETWORK_SIMPLEX', // 'elk.nodePlacement.strategy': 'NETWORK_SIMPLEX',
// layout: 'dagre', // layout: 'dagre',
layout: 'ipsecCola', layout: 'ipsepCola',
// layout: 'elk', // layout: 'elk',
// layout: 'sugiyama', // layout: 'sugiyama',
// htmlLabels: false, // htmlLabels: false,

View File

@@ -1,8 +1,8 @@
import type { LayoutData } from '../../types.js'; import type { LayoutData } from '../../types.ts';
import type { D3Selection } from '../../../types.js'; import type { D3Selection } from '../../../types.ts';
import { insertCluster } from '../../rendering-elements/clusters.js'; import { insertCluster } from '../../rendering-elements/clusters.js';
import { insertEdge } from '../../rendering-elements/edges.js'; import { insertEdge } from '../../rendering-elements/edges.js';
import { positionNode } from '../../rendering-elements/nodes.js'; import { positionNode } from '../../rendering-elements/nodes.ts';
export async function adjustLayout( export async function adjustLayout(
data4Layout: LayoutData, data4Layout: LayoutData,

View File

@@ -1,5 +1,5 @@
import type { Point } from '../../../types.js'; import type { Point } from '../../../types.ts';
import type { Edge, LayoutData, Node } from '../../types.js'; import type { Edge, LayoutData, Node } from '../../types.ts';
interface ColaOptions { interface ColaOptions {
iterations?: number; iterations?: number;

View File

@@ -1,11 +1,11 @@
import { FlowDB } from '../../../diagrams/flowchart/flowDb.js'; import { FlowDB } from '../../../diagrams/flowchart/flowDb.ts';
import flow from '../../../diagrams/flowchart/parser/flowParser.js'; import flow from '../../../diagrams/flowchart/parser/flowParser.ts';
import type { D3Selection } from '../../../types.js'; import type { D3Selection } from '../../../types.ts';
import { createGraphWithElements } from '../../createGraph.js'; import { createGraphWithElements } from '../../createGraph.ts';
import type { Node } from '../../types.js'; import type { Node } from '../../types.ts';
import { assignInitialPositions } from './assignInitialPositions.js'; import { assignInitialPositions } from './assignInitialPositions.ts';
import { layerAssignment } from './layerAssignment.js'; import { layerAssignment } from './layerAssignment.ts';
import { assignNodeOrder } from './nodeOrdering.js'; import { assignNodeOrder } from './nodeOrdering.ts';
import * as d3 from 'd3'; import * as d3 from 'd3';
describe('assignInitialPositioning', () => { describe('assignInitialPositioning', () => {

View File

@@ -1,4 +1,4 @@
import type { LayoutData, Node } from '../../types.js'; import type { LayoutData, Node } from '../../types.ts';
/** /**
* Assigns initial x and y positions to each node * Assigns initial x and y positions to each node

View File

@@ -1,17 +1,17 @@
import insertMarkers from '../../rendering-elements/markers.js'; import insertMarkers from '../../rendering-elements/markers.js';
import { clear as clearGraphlib } from '../dagre/mermaid-graphlib.js'; import { clear as clearGraphlib } from '../dagre/mermaid-graphlib.js';
import { clear as clearNodes } from '../../rendering-elements/nodes.js'; import { clear as clearNodes } from '../../rendering-elements/nodes.ts';
import { clear as clearClusters } from '../../rendering-elements/clusters.js'; import { clear as clearClusters } from '../../rendering-elements/clusters.js';
import { clear as clearEdges } from '../../rendering-elements/edges.js'; import { clear as clearEdges } from '../../rendering-elements/edges.js';
import type { LayoutData, Node } from '../../types.js'; import type { LayoutData, Node } from '../../types.ts';
import { adjustLayout } from './adjustLayout.js'; import { adjustLayout } from './adjustLayout.ts';
import { layerAssignment } from './layerAssignment.js'; import { layerAssignment } from './layerAssignment.ts';
import { assignNodeOrder } from './nodeOrdering.js'; import { assignNodeOrder } from './nodeOrdering.ts';
import { assignInitialPositions } from './assignInitialPositions.js'; import { assignInitialPositions } from './assignInitialPositions.ts';
import { applyCola } from './applyCola.js'; import { applyCola } from './applyCola.ts';
import { createGraphWithElements } from '../../createGraph.js'; import { createGraphWithElements } from '../../createGraph.ts';
import type { D3Selection } from '../../../types.js'; import type { D3Selection } from '../../../types.ts';
import type { SVG } from '../../../mermaid.js'; import type { SVG } from '../../../mermaid.ts';
export async function render(data4Layout: LayoutData, svg: SVG): Promise<void> { export async function render(data4Layout: LayoutData, svg: SVG): Promise<void> {
const element = svg.select('g') as unknown as D3Selection<SVGElement>; const element = svg.select('g') as unknown as D3Selection<SVGElement>;

View File

@@ -1,10 +1,10 @@
import * as d3 from 'd3'; import * as d3 from 'd3';
import { FlowDB } from '../../../diagrams/flowchart/flowDb.js'; import { FlowDB } from '../../../diagrams/flowchart/flowDb.ts';
import flow from '../../../diagrams/flowchart/parser/flowParser.js'; import flow from '../../../diagrams/flowchart/parser/flowParser.ts';
import { createGraphWithElements } from '../../createGraph.js'; import { createGraphWithElements } from '../../createGraph.ts';
import { layerAssignment } from './layerAssignment.js'; import { layerAssignment } from './layerAssignment.ts';
import type { D3Selection } from '../../../types.js'; import type { D3Selection } from '../../../types.ts';
import type { Node } from '../../types.js'; import type { Node } from '../../types.ts';
describe('layerAssignment', () => { describe('layerAssignment', () => {
beforeEach(function () { beforeEach(function () {

View File

@@ -1,4 +1,4 @@
import type { Edge, LayoutData } from '../../types.js'; import type { Edge, LayoutData } from '../../types.ts';
export function layerAssignment(data4Layout: LayoutData): void { export function layerAssignment(data4Layout: LayoutData): void {
const removedEdges: Edge[] = []; const removedEdges: Edge[] = [];

View File

@@ -1,10 +1,10 @@
import { FlowDB } from '../../../diagrams/flowchart/flowDb.js'; import { FlowDB } from '../../../diagrams/flowchart/flowDb.ts';
import flow from '../../../diagrams/flowchart/parser/flowParser.js'; import flow from '../../../diagrams/flowchart/parser/flowParser.ts';
import type { D3Selection } from '../../../types.js'; import type { D3Selection } from '../../../types.ts';
import { createGraphWithElements } from '../../createGraph.js'; import { createGraphWithElements } from '../../createGraph.ts';
import type { Node } from '../../types.js'; import type { Node } from '../../types.ts';
import { layerAssignment } from './layerAssignment.js'; import { layerAssignment } from './layerAssignment.ts';
import { assignNodeOrder } from './nodeOrdering.js'; import { assignNodeOrder } from './nodeOrdering.ts';
import * as d3 from 'd3'; import * as d3 from 'd3';
describe('nodeOrdering', () => { describe('nodeOrdering', () => {

View File

@@ -1,4 +1,4 @@
import type { Edge, LayoutData, Node } from '../../types.js'; import type { Edge, LayoutData, Node } from '../../types.ts';
type LayerMap = Record<number, Node[]>; type LayerMap = Record<number, Node[]>;

View File

@@ -40,8 +40,8 @@ const registerDefaultLayoutLoaders = () => {
loader: async () => await import('./layout-algorithms/dagre/index.js'), loader: async () => await import('./layout-algorithms/dagre/index.js'),
}, },
{ {
name: 'ipsecCola', name: 'ipsepCola',
loader: async () => await import('./layout-algorithms/ipsecCola/index.ts'), loader: async () => await import('./layout-algorithms/ipsepCola/index.ts'),
}, },
]); ]);
}; };

View File

@@ -3,9 +3,7 @@
"compilerOptions": { "compilerOptions": {
"rootDir": "./src", "rootDir": "./src",
"outDir": "./dist", "outDir": "./dist",
"types": ["vitest/importMeta", "vitest/globals"], "types": ["vitest/importMeta", "vitest/globals"]
"allowImportingTsExtensions": true,
"noEmit": true
}, },
"include": [ "include": [
"./src/**/*.ts", "./src/**/*.ts",