@bpview/core
v0.1.0
Published
Yarlis Blueprint core: the Blueprint Diagram Model, native parsers, validation, layout, themes and deterministic SVG/PNG rendering.
Downloads
393
Maintainers
Readme
@bpview/core
The engine behind Yarlis Blueprint: the
Blueprint Diagram Model, the .ybp and .blueprint.yaml parsers, validation with
line-level diagnostics, layout, themes, deterministic SVG, and Markdown block rendering.
@bpview/core/node adds PNG (resvg, bundled Inter fonts) and isolated rendering with limits.
import { compile, renderSvg, transformMarkdown } from '@bpview/core'
import { renderIsolated, svgToPng } from '@bpview/core/node'
const { diagram, diagnostics, ok } = compile('flowchart\na: A\nb: B\na -> b\n', { file: 'x.ybp' })
if (ok && diagram) {
const svg = renderSvg(diagram, { theme: 'yarlis' })
const png = svgToPng(svg)
}The root entry has no Node dependencies and runs in browsers. JSON Schema of the model:
@bpview/core/schema.json. Docs: syntax,
model.
Apache-2.0. Bundles the Inter font (SIL Open Font License, fonts/OFL.txt).
