MCPcopy Index your code
hub / github.com/mdaines/viz-js

github.com/mdaines/viz-js @release-viz-3.28.0 sqlite

repository ↗ · DeepWiki ↗ · release release-viz-3.28.0 ↗
105 symbols 259 edges 51 files 0 documented · 0%
README

Viz.js

This is a collection of packages for working with Graphviz in JavaScript. The main package, viz, is a WebAssembly build of Graphviz with a simple JavaScript wrapper.

With Viz.js, you can easily render a graph diagram as an SVG element to display it in a webpage:

import * as Viz from "@viz-js/viz";

Viz.instance().then(viz => {
  document.body.appendChild(viz.renderSVGElement("digraph { a -> b }"))
});

Other packages:

  • lang-dot — CodeMirror language support for the Graphviz DOT language.

Install

API

API Reference

Extension points exported contracts — how you extend this code

RenderOptions (Interface)
(no doc)
packages/viz/types/index.d.ts
SVGRenderOptions (Interface)
(no doc)
packages/viz/types/index.d.ts
SuccessResult (Interface)
(no doc)
packages/viz/types/index.d.ts
FailureResult (Interface)
(no doc)
packages/viz/types/index.d.ts
MultipleSuccessResult (Interface)
(no doc)
packages/viz/types/index.d.ts

Core symbols most depended-on inside this repo

render
called by 81
packages/viz/src/viz.js
renderSVGElement
called by 19
packages/viz/src/viz.js
renderString
called by 16
packages/viz/src/viz.js
instance
called by 12
packages/viz/src/index.js
renderFormats
called by 12
packages/viz/src/viz.js
dotStringify
called by 11
packages/viz/test/manual/utils.js
quote
called by 7
packages/viz/test/manual/utils.js
makeObject
called by 7
packages/viz/test/manual/instance-reuse.js

Shape

Function 68
Method 14
Interface 13
Class 10

Languages

TypeScript100%

Modules by API surface

packages/viz/types/index.d.ts15 symbols
packages/viz/src/wrapper.js12 symbols
website/src/reloadable-promise-worker.js11 symbols
packages/viz/src/viz.js11 symbols
website/src/components/App.jsx7 symbols
website/src/components/ImageZoom.jsx6 symbols
website/src/links.js4 symbols
website/src/components/Resize.jsx4 symbols
scripts/collect-release-info.js4 symbols
packages/viz/test/manual/utils.js4 symbols
packages/viz/test/manual/instance-reuse.js4 symbols
website/src/components/Editor.jsx3 symbols

Dependencies from manifests, versioned

@babel/core7.29.0 · 1×
@babel/preset-env7.29.0 · 1×
@codemirror/lint6.9.5 · 1×
@codemirror/state6.5.4 · 1×
@lezer/common1.5.1 · 1×
@lezer/generator1.8.0 · 1×
@lezer/highlight1.2.3 · 1×
@lezer/lr1.4.8 · 1×
@lezer/xml1.0.6 · 1×
@rollup/plugin-babel6.1.0 · 1×
@rollup/plugin-node-resolve15.3.1 · 1×

For agents

$ claude mcp add viz-js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact