Skip to content

Commit

Permalink
chore: Remove unused imports in block
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Mar 6, 2024
1 parent 1659ace commit 7fec51f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
8 changes: 4 additions & 4 deletions packages/mermaid/src/diagrams/block/blockDB.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { DiagramDB } from '../../diagram-api/types.js';
import type { BlockConfig, BlockType, Block, ClassDef } from './blockTypes.js';
import clone from 'lodash-es/clone.js';
import * as configApi from '../../config.js';
import { clear as commonClear } from '../common/commonDb.js';
import type { DiagramDB } from '../../diagram-api/types.js';
import { log } from '../../logger.js';
import clone from 'lodash-es/clone.js';
import { clear as commonClear } from '../common/commonDb.js';
import type { Block, ClassDef } from './blockTypes.js';

// Initialize the node database for simple lookups
let blockDatabase: Record<string, Block> = {};
Expand Down
18 changes: 8 additions & 10 deletions packages/mermaid/src/diagrams/block/blockRenderer.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import type { Diagram } from '../../Diagram.js';
import * as configApi from '../../config.js';
import { calculateBlockSizes, insertBlocks, insertEdges } from './renderHelpers.js';
import { layout } from './layout.js';
import type { MermaidConfig, BaseDiagramConfig } from '../../config.type.js';
import insertMarkers from '../../dagre-wrapper/markers.js';
import {
select as d3select,
scaleOrdinal as d3scaleOrdinal,
schemeTableau10 as d3schemeTableau10,
select as d3select,
} from 'd3';
import type { ContainerElement } from 'd3';
import type { Diagram } from '../../Diagram.js';
import * as configApi from '../../config.js';
import type { MermaidConfig } from '../../config.type.js';
import insertMarkers from '../../dagre-wrapper/markers.js';
import { log } from '../../logger.js';
import type { BlockDB } from './blockDB.js';
import type { Block } from './blockTypes.js';
import { configureSvgSize } from '../../setupGraphViewbox.js';
import type { BlockDB } from './blockDB.js';
import { layout } from './layout.js';
import { calculateBlockSizes, insertBlocks, insertEdges } from './renderHelpers.js';

/**
* Returns the all the styles from classDef statements in the graph definition.
Expand Down
13 changes: 4 additions & 9 deletions packages/mermaid/src/diagrams/block/renderHelpers.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import { getStylesFromArray } from '../../utils.js';
import { insertNode, positionNode } from '../../dagre-wrapper/nodes.js';
import { insertEdge, insertEdgeLabel, positionEdgeLabel } from '../../dagre-wrapper/edges.js';
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
import { getConfig } from '../../config.js';
import type { ContainerElement } from 'd3';
import type { Block } from './blockTypes.js';
import { insertEdge, insertEdgeLabel, positionEdgeLabel } from '../../dagre-wrapper/edges.js';
import { insertNode, positionNode } from '../../dagre-wrapper/nodes.js';
import { getStylesFromArray } from '../../utils.js';
import type { BlockDB } from './blockDB.js';

interface Node {
classes: string;
}
import type { Block } from './blockTypes.js';

function getNodeFromBlock(block: Block, db: BlockDB, positioned = false) {
const vertex = block;
Expand Down

0 comments on commit 7fec51f

Please sign in to comment.