vega-typings
Advanced tools
Comparing version 0.20.0 to 0.21.0
{ | ||
"name": "vega-typings", | ||
"version": "0.20.0", | ||
"version": "0.21.0", | ||
"description": "Typings for Vega.", | ||
@@ -23,3 +23,3 @@ "types": "types", | ||
}, | ||
"gitHead": "f262105e75449760b0f35fda70e6b576a31d68a4" | ||
"gitHead": "fa2028c00b859c4485cac836c5a314fd37b7f109" | ||
} |
export type Element = string; | ||
export interface BaseBinding { | ||
type?: string; | ||
export interface BindBase { | ||
/** | ||
* An optional CSS selector string indicating the parent element to which | ||
* the input element should be added. By default, all input elements are | ||
* added within the parent container of the Vega view. | ||
*/ | ||
element?: Element; | ||
/** | ||
* If defined, delays event handling until the specified milliseconds have | ||
* elapsed since the last event was fired. | ||
*/ | ||
debounce?: number; | ||
/** | ||
* By default, the signal name is used to label input elements. | ||
* This `name` property can be used instead to specify a custom | ||
* label for the bound signal. | ||
*/ | ||
name?: string; | ||
} | ||
export interface InputBinding extends BaseBinding { | ||
export interface BindInput extends BindBase { | ||
/** | ||
* The type of input element to use. | ||
* The valid values are `"checkbox"`, `"radio"`, `"range"`, `"select"`, | ||
* and any other legal [HTML form input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). | ||
*/ | ||
input?: string; | ||
/** | ||
* Text that appears in the form control when it has no value set. | ||
*/ | ||
placeholder?: string; | ||
/** | ||
* A hint for form autofill. | ||
* See the [HTML autocomplete attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for additional information. | ||
*/ | ||
autocomplete?: string; | ||
} | ||
export interface BindCheckbox extends BaseBinding { | ||
export interface BindCheckbox extends BindBase { | ||
input: 'checkbox'; | ||
} | ||
export interface BindRadioSelect extends BaseBinding { | ||
export interface BindRadioSelect extends BindBase { | ||
input: 'radio' | 'select'; | ||
/** | ||
* An array of options to select from. | ||
*/ | ||
options: any[]; | ||
/** | ||
* An array of label strings to represent the `options` values. If | ||
* unspecified, the `options` value will be coerced to a string and | ||
* used as the label. | ||
*/ | ||
labels?: string[]; | ||
} | ||
export interface BindRange extends BaseBinding { | ||
export interface BindRange extends BindBase { | ||
input: 'range'; | ||
/** | ||
* Sets the minimum slider value. Defaults to the smaller of the signal value and `0`. | ||
*/ | ||
min?: number; | ||
/** | ||
* Sets the maximum slider value. Defaults to the larger of the signal value and `100`. | ||
*/ | ||
max?: number; | ||
/** | ||
* Sets the minimum slider increment. If undefined, the step size will be | ||
* automatically determined based on the `min` and `max` values. | ||
*/ | ||
step?: number; | ||
} | ||
export interface DirectBinding { | ||
export interface BindDirect { | ||
/** | ||
* An input element that exposes a _value_ property and supports the | ||
* [EventTarget](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) | ||
* interface, or a CSS selector string to such an element. When the element | ||
* updates and dispatches an event, the _value_ property will be used as the | ||
* new, bound signal value. When the signal updates independent of the | ||
* element, the _value_ property will be set to the signal value and a new | ||
* event will be dispatched on the element. | ||
*/ | ||
element: Element | EventTarget; | ||
/** | ||
* The event (default `"input"`) to listen for to track changes on the | ||
* external element. | ||
*/ | ||
event?: string; | ||
/** | ||
* If defined, delays event handling until the specified milliseconds have | ||
* elapsed since the last event was fired. | ||
*/ | ||
debounce?: number; | ||
} | ||
export type Binding = BindCheckbox | BindRadioSelect | BindRange | InputBinding | DirectBinding; | ||
export type Binding = BindCheckbox | BindRadioSelect | BindRange | BindInput | BindDirect; |
@@ -86,2 +86,3 @@ import { SignalRef, Vector2, Vector3 } from '.'; | ||
fit?: Fit | Fit[] | SignalRef; | ||
/* | ||
@@ -91,3 +92,4 @@ * Used in conjunction with fit, provides the pixel area to which the projection should be automatically fit. | ||
extent?: Vector2<Vector2<number | SignalRef>> | SignalRef; | ||
/* | ||
/** | ||
* Used in conjunction with fit, provides the width and height in pixels of the area to which the projection should be automatically fit. | ||
@@ -98,14 +100,72 @@ */ | ||
// TODO: use a union tagged by the projection type to determine which of the following is applicable | ||
/* The following properties are all supported for specific types of projections. Consult the d3-geo-projection library for more information: https://github.com/d3/d3-geo-projection */ | ||
// The following properties are all supported for specific types of projections. Consult the d3-geo-projection library for more information: https://github.com/d3/d3-geo-projection. | ||
/** | ||
* The coefficient parameter for the `hammer` projection. | ||
* | ||
* __Default value:__ `2` | ||
*/ | ||
coefficient?: number | SignalRef; | ||
/** | ||
* For the `satellite` projection, the distance from the center of the | ||
* sphere to the point of view, as a proportion of the sphere’s radius. | ||
* The recommended maximum clip angle for a given `distance` is | ||
* acos(1 / distance) converted to degrees. If tilt is also | ||
* applied, then more conservative clipping may be necessary. | ||
* | ||
* __Default value:__ `2.0` | ||
*/ | ||
distance?: number | SignalRef; | ||
/** | ||
* The fraction parameter for the `bottomley` projection. | ||
* | ||
* __Default value:__ `0.5`, corresponding to a sin(ψ) where ψ = π/6. | ||
*/ | ||
fraction?: number | SignalRef; | ||
/** | ||
* The number of lobes in projections that support multi-lobe views: | ||
* `berghaus`, `gingery`, or `healpix`. | ||
* The default value varies based on the projection type. | ||
*/ | ||
lobes?: number | SignalRef; | ||
/** | ||
* The parallel parameter for projections that support it: | ||
* `armadillo`, `bonne`, `craig`, `cylindricalEqualArea`, | ||
* `cylindricalStereographic`, `hammerRetroazimuthal`, `loximuthal`, | ||
* or `rectangularPolyconic`. | ||
* The default value varies based on the projection type. | ||
*/ | ||
parallel?: number | SignalRef; | ||
/** | ||
* The radius parameter for the `airy` or `gingery` projection. | ||
* The default value varies based on the projection type. | ||
*/ | ||
radius?: number | SignalRef; | ||
/** | ||
* The ratio parameter for the `hill`, `hufnagel`, or `wagner` projections. | ||
* The default value varies based on the projection type. | ||
*/ | ||
ratio?: number | SignalRef; | ||
/** | ||
* The spacing parameter for the `lagrange` projection. | ||
* | ||
* __Default value:__ `0.5` | ||
*/ | ||
spacing?: number | SignalRef; | ||
/** | ||
* The tilt angle (in degrees) for the `satellite` projection. | ||
* | ||
* __Default value:__ `0`. | ||
*/ | ||
tilt?: number | SignalRef; | ||
/* | ||
/** | ||
* Sets whether or not the x-dimension is reflected (negated) in the output. | ||
@@ -115,3 +175,3 @@ */ | ||
/* | ||
/** | ||
* Sets whether or not the y-dimension is reflected (negated) in the output. | ||
@@ -118,0 +178,0 @@ */ |
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
139237
4639