Skip to content

Commit

Permalink
Release 3.0.0 c89f57f.
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Jan 26, 2018
1 parent c89f57f commit 54f0445
Show file tree
Hide file tree
Showing 8 changed files with 1,540 additions and 0 deletions.
48 changes: 48 additions & 0 deletions build/embed.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import * as VegaLite from 'vega-lite';
export declare const vega: any;
export declare const vl: typeof VegaLite;
export declare type Mode = 'vega' | 'vega-lite';
export interface Loader {
load: (uri: string, options?: any) => Promise<string>;
sanitize: (uri: string, options: any) => Promise<{
href: string;
}>;
http: (uri: string, options: any) => Promise<string>;
file: (filename: string) => Promise<string>;
}
export interface EmbedOptions {
actions?: boolean | {
export?: boolean;
source?: boolean;
editor?: boolean;
};
mode?: Mode;
logLevel?: number;
loader?: Loader;
renderer?: 'canvas' | 'svg';
onBeforeParse?: (spec: any) => void;
width?: number;
height?: number;
padding?: number | {
left?: number;
right?: number;
top?: number;
bottom?: number;
};
config?: string | any;
sourceHeader?: string;
sourceFooter?: string;
editorUrl?: string;
}
/**
* Embed a Vega visualization component in a web page. This function returns a promise.
*
* @param el DOM element in which to place component (DOM node or CSS selector).
* @param spec String : A URL string from which to load the Vega specification.
* Object : The Vega/Vega-Lite specification as a parsed JSON object.
* @param opt A JavaScript object containing options for embedding.
*/
export default function embed(el: HTMLBaseElement | string, spec: any, opt: EmbedOptions): Promise<{
view: any;
spec: any;
}>;
161 changes: 161 additions & 0 deletions build/embed.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions build/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import embed from './embed';
declare const embedModule: typeof embed & {
default?: typeof embed;
vega?;
vl?;
};
export = embedModule;
11 changes: 11 additions & 0 deletions build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions build/post.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Open editor url in a new window, and pass a message.
*/
export declare function post(window: Window, url: string, data: any): void;
31 changes: 31 additions & 0 deletions build/post.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 54f0445

Please sign in to comment.