Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs-site/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
13 changes: 13 additions & 0 deletions docs-site/.vitepress/theme/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,19 @@
font-size: 15px !important;
}

/* mermaid renders label text through a markdown parser that wraps lines in
<p> elements. The browser's default <p> 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,
Expand Down
4 changes: 3 additions & 1 deletion docs-site/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ features:
---

<div class="fork-banner">
<strong>Looking for <code>vercel/pkg</code>?</strong> This is <a href="https://github.com/yao-pkg/pkg"><code>yao-pkg/pkg</code></a> — the actively maintained fork. The original <code>vercel/pkg</code> is archived. <code>@yao-pkg/pkg</code> 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).

</div>

<div class="landing-badges">
Expand Down
Loading