From 2ef6760cbcc771d9c9af595845610f65488c648d Mon Sep 17 00:00:00 2001 From: Ashish Jain Date: Fri, 24 Jan 2025 12:18:49 +0100 Subject: [PATCH] Increase size limit of diagrams --- docs/config/setup/modules/mermaid.md | 21 +++++++++++++++++++++ packages/mermaid/src/mermaidAPI.ts | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/config/setup/modules/mermaid.md b/docs/config/setup/modules/mermaid.md index 2e35de817..78cb90f69 100644 --- a/docs/config/setup/modules/mermaid.md +++ b/docs/config/setup/modules/mermaid.md @@ -91,6 +91,27 @@ ## Functions +### calcIntersect + +▸ **calcIntersect**(`nodeId`, `point`): `Point` | `Promise`<`Point`> + +#### Parameters + +| Name | Type | +| :------- | :------- | +| `nodeId` | `string` | +| `point` | `Point` | + +#### Returns + +`Point` | `Promise`<`Point`> + +#### Defined in + +[packages/mermaid/src/rendering-util/layout-algorithms/fixed/index.js:172](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/layout-algorithms/fixed/index.js#L172) + +--- + ### calcIntersections ▸ **calcIntersections**(`startNodeId`, `endNodeId`, `startNodeSize`, `endNodeSize`): `IntersectionPoint`\[] diff --git a/packages/mermaid/src/mermaidAPI.ts b/packages/mermaid/src/mermaidAPI.ts index 4560397c5..fd78547b3 100644 --- a/packages/mermaid/src/mermaidAPI.ts +++ b/packages/mermaid/src/mermaidAPI.ts @@ -27,7 +27,7 @@ import type { D3Element, ParseOptions, ParseResult, RenderResult } from './types import { decodeEntities } from './utils.js'; import { toBase64 } from './utils/base64.js'; -const MAX_TEXTLENGTH = 50_000; +const MAX_TEXTLENGTH = 100_000; const MAX_TEXTLENGTH_EXCEEDED_MSG = 'graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa';