diff --git a/packages/mermaid/src/diagram-api/types.ts b/packages/mermaid/src/diagram-api/types.ts index 265af6587..5f7c9b2c5 100644 --- a/packages/mermaid/src/diagram-api/types.ts +++ b/packages/mermaid/src/diagram-api/types.ts @@ -1,5 +1,5 @@ import { Diagram } from '../Diagram.js'; -import { MermaidConfig } from '../config.type.js'; +import type { BaseDiagramConfig, MermaidConfig } from '../config.type.js'; import type * as d3 from 'd3'; export interface InjectUtils { @@ -16,11 +16,21 @@ export interface InjectUtils { * Generic Diagram DB that may apply to any diagram type. */ export interface DiagramDB { + // config + reset?: () => void; + setConfig?: (config: BaseDiagramConfig) => void; + getConfig?: () => Required; + + // db clear?: () => void; setDiagramTitle?: (title: string) => void; - setDisplayMode?: (title: string) => void; + getDiagramTitle?: () => string; + setAccTitle?: (title: string) => void; getAccTitle?: () => string; + setAccDescription?: (describetion: string) => void; getAccDescription?: () => string; + + setDisplayMode?: (title: string) => void; bindFunctions?: (element: Element) => void; } diff --git a/packages/mermaid/src/diagrams/pie/pieTypes.ts b/packages/mermaid/src/diagrams/pie/pieTypes.ts index 8e8826be3..cc90a4d58 100644 --- a/packages/mermaid/src/diagrams/pie/pieTypes.ts +++ b/packages/mermaid/src/diagrams/pie/pieTypes.ts @@ -48,9 +48,9 @@ export interface D3Sections { export interface PieDb extends DiagramDB { // config + reset: () => void; setConfig: (config: PieDiagramConfig) => void; getConfig: () => Required; - reset: () => void; // common db parseDirective: ParseDirectiveDefinition;