From 95e01b4935ba10cfbfcb25a18e16408019984491 Mon Sep 17 00:00:00 2001 From: Yokozuna59 Date: Sun, 18 Jun 2023 01:45:21 +0300 Subject: [PATCH] move `PieDiagramConfig` into pieTypes --- packages/mermaid/src/config.type.ts | 5 +---- packages/mermaid/src/diagrams/pie/pieDb.ts | 3 +-- packages/mermaid/src/diagrams/pie/pieTypes.ts | 6 +++++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/mermaid/src/config.type.ts b/packages/mermaid/src/config.type.ts index 140c200fb..720b90538 100644 --- a/packages/mermaid/src/config.type.ts +++ b/packages/mermaid/src/config.type.ts @@ -1,6 +1,7 @@ // TODO: This was auto generated from defaultConfig. Needs to be verified. import DOMPurify from 'dompurify'; +import { PieDiagramConfig } from './diagrams/pie/pieTypes.js'; export interface MermaidConfig { theme?: string; @@ -223,10 +224,6 @@ export interface MindmapDiagramConfig extends BaseDiagramConfig { maxNodeWidth: number; } -export interface PieDiagramConfig extends BaseDiagramConfig { - textPosition?: number; -} - export interface QuadrantChartConfig extends BaseDiagramConfig { chartWidth: number; chartHeight: number; diff --git a/packages/mermaid/src/diagrams/pie/pieDb.ts b/packages/mermaid/src/diagrams/pie/pieDb.ts index f8cc664ec..027356b21 100644 --- a/packages/mermaid/src/diagrams/pie/pieDb.ts +++ b/packages/mermaid/src/diagrams/pie/pieDb.ts @@ -12,8 +12,7 @@ import { clear as commonClear, } from '../../commonDb.js'; import type { ParseDirectiveDefinition } from '../../diagram-api/types.js'; -import type { PieFields, PieDb, Sections } from './pieTypes.js'; -import type { PieDiagramConfig } from '../../config.type.js'; +import type { PieFields, PieDb, Sections, PieDiagramConfig } from './pieTypes.js'; export const DEFAULT_PIE_CONFIG: PieDiagramConfig = { useMaxWidth: true, diff --git a/packages/mermaid/src/diagrams/pie/pieTypes.ts b/packages/mermaid/src/diagrams/pie/pieTypes.ts index 695a3f491..29a21ee24 100644 --- a/packages/mermaid/src/diagrams/pie/pieTypes.ts +++ b/packages/mermaid/src/diagrams/pie/pieTypes.ts @@ -1,6 +1,10 @@ -import type { PieDiagramConfig } from '../../config.type.js'; +import type { BaseDiagramConfig } from '../../config.type.js'; import type { DiagramDB, ParseDirectiveDefinition } from '../../diagram-api/types.js'; +export interface PieDiagramConfig extends BaseDiagramConfig { + textPosition?: number; +} + export interface PieFields { sections: Sections; showData: boolean;