
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@nowline/renderer
Advanced tools
SVG renderer for the Nowline roadmap DSL.
@nowline/renderer takes a positioned model from @nowline/layout
and emits a deterministic SVG string. It is palette-dumb (every color comes
from the positioned model), browser-safe (no fs, path, process, or
Buffer), and has no runtime dependencies beyond @nowline/layout.
Other output formats live in dedicated packages. PNG, PDF, HTML, Mermaid, XLSX, and MS Project XML are produced by
@nowline/export-png,@nowline/export-pdf,@nowline/export-html,@nowline/export-mermaid,@nowline/export-xlsx, and@nowline/export-msprojrespectively. Each one takes the renderer's SVG (or the AST) as input and adds only the runtime dependency it needs — keeping the renderer browser-safe and the per-format install footprint small. Seespecs/handoffs/m2c.md§ 1 for the rationale.
pnpm add @nowline/renderer @nowline/layout @nowline/core
import { layoutRoadmap } from '@nowline/layout';
import { renderSvg } from '@nowline/renderer';
const model = layoutRoadmap(file, resolved, { theme: 'light' });
const svg = await renderSvg(model, {
// optional; used when a roadmap declares a logo path
assetResolver: async (ref) => {
const bytes = await fetchLogoBytes(ref); // your IO
return { bytes, mime: 'image/svg+xml' };
},
noLinks: false, // strip link icons when true
strict: false, // promote asset warnings to errors
warn: (message) => console.warn(message),
});
svg; // string: <svg ...>...</svg>
The returned string is UTF-8 text ready to write to a file, send over HTTP, or inline into HTML.
Given identical (model, options) inputs, renderSvg() returns a byte-identical
string every call. Guarantees:
Math.random, no timestamps).Date.now() or environment-dependent formatting.This makes SVG snapshot tests meaningful: a diff is always a real change, never noise.
sanitizeSvg() → id-namespaced → embedded as <g>..png/.jpg/.jpeg/.webp): base64-encoded and embedded
as <image href="data:image/<type>;base64,...">. No re-encoding.warn(), placeholder rendered. strict: true promotes to an exception.All IO goes through the injected AssetResolver. The renderer never touches
the filesystem.
sanitizeSvg(input: string): string is an in-house allow-list walker designed
to neutralize hostile SVG payloads embedded as roadmap logos. It:
<script>, <foreignObject>, and unknown element types.on* attributes).href / xlink:href; allows fragment-only references.data: URLs inside nested references.nl-logo-* prefix to prevent collisions.The sanitizer is unit-tested against a corpus of malicious and benign SVGs. Zero runtime dependencies.
Rendered SVGs include an inline Nowline attribution mark linking to
https://nowline.io. Per project policy, stripping the mark requires a
commercial license.
FAQs
Nowline renderer — draws a laid-out roadmap as an SVG image.
The npm package @nowline/renderer receives a total of 99 weekly downloads. As such, @nowline/renderer popularity was classified as not popular.
We found that @nowline/renderer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.