Socket
Socket
Sign inDemoInstall

viz.js

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

viz.js - npm Package Compare versions

Comparing version 1.8.1 to 2.0.0-pre.1

viz-lite.module

69

index.d.ts

@@ -1,39 +0,46 @@

declare function Viz(src: string, opts?: Viz.Options): string;
declare function Viz(src: string, opts: Viz.ImageFormatOptions): HTMLImageElement;
export as namespace Viz;
declare namespace Viz {
export = Viz;
function svgXmlToPngImageElement(svgXml: string, scale?: number): HTMLImageElement
function svgXmlToPngImageElement(svgXml: string, scale: number | undefined, callback: ImageCallback<HTMLImageElement>): void
function svgXmlToPngBase64(svgXml: string, scale: number | undefined, callback: ImageCallback<string>): void
declare class Viz {
constructor(options?: { worker?: string, render?: (src: string, options: object) => Promise<any> });
renderString(src: string, options?: Viz.Options): Promise<string>;
renderSVGElement(src: string, options?: Viz.Options): Promise<SVGSVGElement>;
interface BaseOptions {
engine?: string;
scale?: number;
images?: Image[];
files?: File[];
totalMemory?: number;
}
interface Options extends BaseOptions {
format?: "svg" | "xdot" | "plain" | "ps" | "json";
}
renderImageElement(src: string, options?: Viz.ImageOptions): Promise<HTMLImageElement>;
interface ImageFormatOptions extends BaseOptions {
format: "png-image-element";
}
renderJSONObject(src: string, options?: Viz.Options): Promise<object>;
}
interface Image {
href: string;
height: string | number;
width: string | number;
}
declare namespace Viz {
interface File {
path: string;
data: string;
}
type ImageCallback<D> = (error: Error | null, data: D | null) => void;
export interface Options {
engine?: string;
format?: string;
yInvert?: boolean;
images?: Image[];
files?: File[];
}
export interface ImageOptions extends Options {
scale?: number;
mimeType?: string;
quality?: number;
}
export interface Image {
href: string;
height: string | number;
width: string | number;
}
export interface File {
path: string;
data: string;
}
}
{
"name": "viz.js",
"version": "1.8.1",
"version": "2.0.0-pre.1",
"description": "A hack to put Graphviz on the web.",

@@ -16,3 +16,4 @@ "main": "viz.js",

"viz.js",
"viz-lite.js",
"viz.module",
"viz-lite.module",
"index.d.ts"

@@ -32,2 +33,9 @@ ],

"devDependencies": {
"babel-cli": "^6.26.0",
"babel-plugin-add-header-comment": "^1.0.3",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-transform-es2015-destructuring": "^6.23.0",
"babel-plugin-transform-es2015-modules-umd": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.1",
"minimist": "^1.2.0",

@@ -34,0 +42,0 @@ "selenium-webdriver": "^2.45.1",

@@ -21,3 +21,3 @@ # Viz.js

A smaller version of Viz.js is available on the [releases page](https://github.com/mdaines/viz.js/releases) and the Bower package. `viz-lite.js` omits Expat and the NEATO layout plugin.
Viz.js releases include a smaller version called `viz-lite.js`. This omits Expat and the NEATO layout plugin.

@@ -24,0 +24,0 @@ ## Usage

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc