Comparing version 1.8.1 to 2.0.0-pre.1
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7
3201448
10
304
1
1