Skip to content

Commit

Permalink
Release 3.1.1 e93fa43.
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Mar 6, 2018
1 parent e93fa43 commit 70c3cfd
Show file tree
Hide file tree
Showing 8 changed files with 1,559 additions and 0 deletions.
45 changes: 45 additions & 0 deletions build/embed.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import * as vegaImport from 'vega-lib';
import * as VegaLite from 'vega-lite';
import { Config as VgConfig, Loader, Spec as VgSpec, View } from 'vega-lib';
import { Config as VlConfig } from 'vega-lite/build/src/config';
import { TopLevelExtendedSpec as VlSpec } from 'vega-lite/build/src/spec';
export declare const vega: typeof vegaImport;
export declare const vl: typeof VegaLite;
export declare type Mode = 'vega' | 'vega-lite';
export interface EmbedOptions {
actions?: boolean | {
export?: boolean;
source?: boolean;
editor?: boolean;
};
mode?: Mode;
logLevel?: number;
loader?: Loader;
renderer?: 'canvas' | 'svg';
onBeforeParse?: (spec: VisualizationSpec) => VisualizationSpec;
width?: number;
height?: number;
padding?: number | {
left?: number;
right?: number;
top?: number;
bottom?: number;
};
config?: string | VlConfig | VgConfig;
sourceHeader?: string;
sourceFooter?: string;
editorUrl?: string;
}
export declare type VisualizationSpec = VlSpec | VgSpec;
/**
* 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: string | VisualizationSpec, opt: EmbedOptions): Promise<{} | {
view: View;
spec: VisualizationSpec;
}>;
163 changes: 163 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;
Loading

0 comments on commit 70c3cfd

Please sign in to comment.