diff --git a/packages/mermaid/scripts/create-types-from-json-schema.mts b/packages/mermaid/scripts/create-types-from-json-schema.mts index b028fe818..a300ef00f 100644 --- a/packages/mermaid/scripts/create-types-from-json-schema.mts +++ b/packages/mermaid/scripts/create-types-from-json-schema.mts @@ -233,6 +233,23 @@ async function generateTypescript(mermaidConfigSchema: JSONSchemaType. - * - */ - nodeAlignment?: 'left' | 'right' | 'center' | 'justify'; + nodeAlignment?: SankeyNodeAlignment; useMaxWidth?: boolean; /** * Toggle to display or hide values along with title. diff --git a/packages/mermaid/src/schemas/config.schema.yaml b/packages/mermaid/src/schemas/config.schema.yaml index 6f2effb79..afed99723 100644 --- a/packages/mermaid/src/schemas/config.schema.yaml +++ b/packages/mermaid/src/schemas/config.schema.yaml @@ -21,8 +21,9 @@ # - Use `meta:enum` to document enum values (from jsonschema2md) # - Use `tsType` to override the TypeScript type (from json-schema-to-typescript) # - If adding a new object to `MermaidConfig` (e.g. a new diagram type), -# you may need to add it to `.build/jsonSchema.ts` and `src/docs.mts` -# to get the docs/default values to generate properly. +# you may need to add it to `.build/jsonSchema.ts`, `src/docs.mts` +# and `scripts/create-types-from-json-schema.mjs` +# to get the default values/docs/types to generate properly. $id: https://mermaid-js.github.io/schemas/config.schema.json $schema: https://json-schema.org/draft/2019-09/schema title: Mermaid Config @@ -1981,10 +1982,12 @@ $defs: # JSON Schema definition (maybe we should move these to a separate file) $ref: '#/$defs/SankeyNodeAlignment' default: justify useMaxWidth: + type: boolean default: false showValues: description: | Toggle to display or hide values along with title. + type: boolean default: true prefix: description: |