vega-typings
Advanced tools
Comparing version 0.18.2 to 0.19.0
{ | ||
"name": "vega-typings", | ||
"version": "0.18.2", | ||
"version": "0.19.0", | ||
"description": "Typings for Vega.", | ||
@@ -21,5 +21,5 @@ "types": "types", | ||
"dependencies": { | ||
"vega-util": "^1.15.1" | ||
"vega-util": "^1.15.2" | ||
}, | ||
"gitHead": "8d6793f4ca7eaaf2d22186764e9ce2dae687cf52" | ||
"gitHead": "4affcbedb9d14815dbb6d3b250ed231b54fc95c0" | ||
} |
@@ -76,7 +76,14 @@ import { | ||
// View Configuration | ||
initialize(container?: Element | string, bindContainer?: Element | string): this; | ||
finalize(): this; | ||
loader(loader: Loader): this; | ||
loader(): Loader; | ||
logLevel(level: number): this; | ||
logLevel(): number; | ||
logger(logger: LoggerInterface): this; | ||
@@ -88,18 +95,5 @@ logger(): LoggerInterface; | ||
loader(loader: Loader): this; | ||
loader(): Loader; | ||
tooltip(handler: TooltipHandler): this; | ||
locale(locale: LocaleFormatters): this; | ||
locale(): LocaleFormatters; | ||
hover(hoverSet?: EncodeEntryName, leaveSet?: EncodeEntryName): this; | ||
run(encode?: string): this; | ||
runAfter(callback: (view: this) => void, enqueue?: boolean, priority?: number): this; | ||
runAsync(): Promise<View>; | ||
insert(name: string, tuples: any): this; | ||
remove(name: string, tuples: any): this; | ||
change(name: string, changeset: Changeset): this; | ||
changeset(): any; | ||
data(name: string): any[]; | ||
data(name: string, tuples: any): this; | ||
@@ -109,2 +103,5 @@ description(s: string): this; | ||
background(s: Color): this; | ||
background(): Color; | ||
width(w: number): this; | ||
@@ -115,4 +112,2 @@ width(): number; | ||
origin(): [number, number]; | ||
padding(p: Padding): this; | ||
@@ -123,20 +118,23 @@ padding(): Padding; | ||
toImageURL(type: string, scaleFactor?: number): Promise<string>; | ||
toSVG(scaleFactor?: number): Promise<string>; | ||
toCanvas(scaleFactor?: number, options?: ToCanvasOptions): Promise<HTMLCanvasElement>; | ||
// Dataflow and Rendering | ||
signal(name: string, value: SignalValue): this; | ||
signal(name: string): SignalValue; | ||
runAsync(): Promise<View>; | ||
run(encode?: string): this; | ||
runAfter(callback: (view: this) => void, enqueue?: boolean, priority?: number): this; | ||
dirty(item: any): void; | ||
container(): HTMLElement | null; | ||
scenegraph(): Scene; | ||
addEventListener(type: string, handler: EventListenerHandler): this; | ||
removeEventListener(type: string, handler: EventListenerHandler): this; | ||
addSignalListener(name: string, handler: SignalListenerHandler): this; | ||
removeSignalListener(name: string, handler: SignalListenerHandler): this; | ||
addDataListener(name: string, handler: DataListenerHandler): this; | ||
removeDataListener(name: string, handler: DataListenerHandler): this; | ||
addResizeListener(handler: ResizeHandler): this; | ||
removeResizeListener(handler: ResizeHandler): this; | ||
tooltip(handler: TooltipHandler): this; | ||
origin(): [number, number]; | ||
// Signals | ||
signal(name: string, value: SignalValue): this; | ||
signal(name: string): SignalValue; | ||
getState(options?: { | ||
@@ -148,2 +146,45 @@ signals?: (name?: string, operator?: any) => boolean; | ||
setState(state: { signals?: any; data?: any }): this; | ||
addSignalListener(name: string, handler: SignalListenerHandler): this; | ||
removeSignalListener(name: string, handler: SignalListenerHandler): this; | ||
// Event Handling | ||
events(source: any, type: any, filter?: (_: any) => boolean): any; | ||
addEventListener(type: string, handler: EventListenerHandler): this; | ||
removeEventListener(type: string, handler: EventListenerHandler): this; | ||
addResizeListener(handler: ResizeHandler): this; | ||
removeResizeListener(handler: ResizeHandler): this; | ||
globalCursor(flag: boolean): any; | ||
preventDefault(flag: boolean): void; | ||
// Image Export | ||
toCanvas(scaleFactor?: number, options?: ToCanvasOptions): Promise<HTMLCanvasElement>; | ||
toSVG(scaleFactor?: number): Promise<string>; | ||
toImageURL(type: string, scaleFactor?: number): Promise<string>; | ||
// Data and Scales | ||
scale(name: string): any; | ||
data(name: string): any[]; | ||
data(name: string, tuples: any): this; | ||
addDataListener(name: string, handler: DataListenerHandler): this; | ||
removeDataListener(name: string, handler: DataListenerHandler): this; | ||
change(name: string, changeset: Changeset): this; | ||
insert(name: string, tuples: any): this; | ||
remove(name: string, tuples: any): this; | ||
// Undocumented (https://github.com/vega/vega/issues/2844, https://github.com/vega/vega/issues/2845) | ||
locale(locale: LocaleFormatters): this; | ||
locale(): LocaleFormatters; | ||
changeset(): Changeset; | ||
} | ||
@@ -150,0 +191,0 @@ |
@@ -17,2 +17,3 @@ import { | ||
import { Color } from './color'; | ||
import { URI } from './data'; | ||
import { | ||
@@ -129,5 +130,17 @@ Blend, | ||
*/ | ||
aspect?: boolean; | ||
aspect?: boolean | SignalRef; | ||
/** | ||
* The URL of the image file for image marks. | ||
* | ||
* @format uri | ||
*/ | ||
url?: URI | SignalRef; | ||
/** | ||
* A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization. | ||
*/ | ||
smooth?: boolean | SignalRef; | ||
/** | ||
* Default fill color. | ||
@@ -416,6 +429,4 @@ * | ||
* A URL to load upon mouse click. If defined, the mark acts as a hyperlink. | ||
* | ||
* @format uri | ||
*/ | ||
href?: string | SignalRef; | ||
href?: URI | SignalRef; | ||
@@ -422,0 +433,0 @@ /** |
@@ -57,3 +57,3 @@ import { OnTrigger, Transforms, SignalRef } from '.'; | ||
export type UrlData = { | ||
url: string | SignalRef; | ||
url: URI | SignalRef; | ||
format?: Format | SignalRef; | ||
@@ -65,1 +65,6 @@ async?: boolean | SignalRef; | ||
export type Datum = any; | ||
/** | ||
* @format uri-reference | ||
*/ | ||
export type URI = string; |
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
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
134763
4519
Updatedvega-util@^1.15.2