From 61166156a91e13ff0c8741a0c3f0879621eda59f Mon Sep 17 00:00:00 2001 From: robertsLando Date: Wed, 15 Apr 2026 14:21:40 +0200 Subject: [PATCH] fix(docs): repair migration link and mermaid label clipping - index.md: markdown link inside the fork-banner
was rendered as literal text because raw HTML blocks don't parse inline markdown without blank-line separation. Convert the block to use markdown content with surrounding blank lines so [migration guide] resolves. - custom.css: zero the default

margin inside mermaid nodeLabel / edgeLabel / cluster-label / label. Mermaid wraps label text in

via its markdown parser; the browser's default

margin inflated the rendered label height beyond the foreignObject size mermaid had pre-measured, clipping the last line below the node rect. - config.ts: set themeVariables.fontSize to 15px and add flowchart padding so mermaid's layout math matches the 15px rendered text. --- docs-site/.vitepress/config.ts | 10 ++++++++++ docs-site/.vitepress/theme/custom.css | 13 +++++++++++++ docs-site/index.md | 4 +++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/docs-site/.vitepress/config.ts b/docs-site/.vitepress/config.ts index 63d35bd7..8187ea8a 100644 --- a/docs-site/.vitepress/config.ts +++ b/docs-site/.vitepress/config.ts @@ -146,6 +146,16 @@ export default withMermaid({ mermaid: { // theme intentionally unset — vitepress-plugin-mermaid auto-switches // between 'default' (light) and 'dark' based on VitePress appearance + themeVariables: { + // keep in sync with the font-size override in custom.css so mermaid's + // node-size measurements match the rendered text and labels don't clip + fontSize: '15px', + }, + flowchart: { + htmlLabels: true, + useMaxWidth: true, + padding: 12, + }, }, mermaidPlugin: { class: 'mermaid-diagram', diff --git a/docs-site/.vitepress/theme/custom.css b/docs-site/.vitepress/theme/custom.css index 9df91170..f0b4acbd 100644 --- a/docs-site/.vitepress/theme/custom.css +++ b/docs-site/.vitepress/theme/custom.css @@ -97,6 +97,19 @@ font-size: 15px !important; } +/* mermaid renders label text through a markdown parser that wraps lines in +

elements. The browser's default

margin inflates the rendered + label height beyond the foreignObject size mermaid measured, so the last + line gets clipped below the node rect. Zero the margin so rendered and + measured heights match. */ +.mermaid-diagram svg .nodeLabel p, +.mermaid-diagram svg .edgeLabel p, +.mermaid-diagram svg .cluster-label p, +.mermaid-diagram svg .label p { + margin: 0 !important; + line-height: 1.5 !important; +} + /* dark mode: force readable label colors — mermaid's dark theme sometimes leaves inherited fills that blend into the background */ .dark .mermaid-diagram svg .nodeLabel, diff --git a/docs-site/index.md b/docs-site/index.md index ce685e44..6e13dad9 100644 --- a/docs-site/index.md +++ b/docs-site/index.md @@ -43,7 +43,9 @@ features: ---

-Looking for vercel/pkg? This is yao-pkg/pkg — the actively maintained fork. The original vercel/pkg is archived. @yao-pkg/pkg is a drop-in replacement — rename the dep and keep shipping. See the [migration guide](/guide/migration). + +**Looking for `vercel/pkg`?** This is [`yao-pkg/pkg`](https://github.com/yao-pkg/pkg) — the actively maintained fork. The original `vercel/pkg` is archived. `@yao-pkg/pkg` is a drop-in replacement — rename the dep and keep shipping. See the [migration guide](/guide/migration). +