Upgrade beautiful-mermaid from @theletterf fork to lukilabs v1.1.3#2771
Closed
theletterf wants to merge 2 commits intomainfrom
Closed
Upgrade beautiful-mermaid from @theletterf fork to lukilabs v1.1.3#2771theletterf wants to merge 2 commits intomainfrom
theletterf wants to merge 2 commits intomainfrom
Conversation
Replaces the scoped fork `@theletterf/[email protected]` with the upstream `[email protected]` published by lukilabs/Craft Docs. Key changes: - Switch package name and update to v1.0.1 - Replace `copy:mermaid` (cp of pre-built bundle) with `build:mermaid` using esbuild, since v1.0.0+ ships TypeScript source only (no dist/) - Add [email protected] as a dev dependency for the bundle step - Update `window.__mermaid` call from deprecated `renderMermaid` to `renderMermaidSVGAsync`, and extend the type declaration with the new layout options (nodeSpacing, layerSpacing, componentSpacing, thoroughness) Notable size change: the bundle grows from ~134 KB to ~1.5 MB because v1.0.0 replaced dagre with elkjs (elk.bundled.js, ~1.6 MB uncompressed). The file is lazy-loaded and only downloaded by users viewing pages with Mermaid diagrams. Co-authored-by: Claude <[email protected]> Co-authored-by: Cursor <[email protected]>
- Bumps beautiful-mermaid from 1.0.1 to 1.1.3. - Replaces the Painless Operators complex flowchart with a multi-tenant Azure architecture diagram showcasing nested subgraphs, per-subgraph direction overrides, and the hidden spacer node pattern. Co-authored-by: Claude <[email protected]> Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@theletterf/[email protected]with the upstream[email protected]published by lukilabs (Craft Docs).dist/folder), thecopy:mermaidstep is replaced by abuild:mermaidstep using esbuild, which bundlessrc/browser.tsinto an IIFE browser global.[email protected]as a dev dependency.window.__mermaidcall from the deprecatedrenderMermaidalias torenderMermaidSVGAsync, and extends the type declaration with the new layout options (nodeSpacing,layerSpacing,componentSpacing,thoroughness,padding).docs/syntax/diagrams.mdwith a multi-tenant Azure architecture diagram showcasing nested subgraphs, per-subgraph direction overrides, and the hidden spacer node pattern.The embedded
mermaid.min.jsgrows from ~134 KB → ~1.5 MB (uncompressed, embedded asEmbeddedResourcein the binary). The increase is entirely due to v1.0.0 replacingdagrewithelkjs(elk.bundled.js, ~1.6 MB). This is a deliberate upstream trade-off for better layout quality and synchronous rendering.The file is lazy-loaded — only fetched by users who visit pages that contain Mermaid diagrams.
Test plan
npm run build:mermaidinsrc/Elastic.Documentation.Site/and confirm_static/mermaid.min.jsis produced.dotnet buildto confirm the asset embeds cleanly.