Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vega-typings

Package Overview
Dependencies
Maintainers
4
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-typings - npm Package Compare versions

Comparing version 0.7.1 to 0.8.0

types/spec/color.d.ts

2

package.json
{
"name": "vega-typings",
"version": "0.7.1",
"version": "0.8.0",
"description": "Typings for Vega.",

@@ -5,0 +5,0 @@ "types": "types",

@@ -47,3 +47,3 @@ import { OnTrigger, Transforms, SignalRef } from '.';

export type SourceData = {
source: string;
source: string | string[];
} & BaseData;

@@ -50,0 +50,0 @@

import { SignalRef } from '.';
import { AnchorValue } from './values';
import { TitleAnchor } from './title';
import { Color } from './color';

@@ -82,29 +83,103 @@ export type Field = string | SignalRef | DatumFieldRef | GroupFieldRef | ParentFieldRef;

}
export interface BaseGradient {
/**
* The type of gradient.
*/
gradient: 'linear' | 'radial';
}
export interface GradientStop {
/**
* The offset fraction for the color stop, indicating its position within the gradient.
*/
offset: number;
color: string;
/**
* The color value at this point in the gradient.
*/
color: Color;
}
export interface GradientLinear {
export interface LinearGradient extends BaseGradient {
/**
* The type of gradient. Use `"linear"` for a linear gradient.
*/
gradient: 'linear';
/**
* An array of gradient stops defining the gradient color sequence.
*/
stops: GradientStop[];
id?: string;
/**
* The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
*
* __Default value:__ `0`
*/
x1?: number;
/**
* The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
*
* __Default value:__ `0`
*/
y1?: number;
/**
* The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
*
* __Default value:__ `1`
*/
x2?: number;
/**
* The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
*
* __Default value:__ `0`
*/
y2?: number;
}
export interface GradientRadial {
export interface RadialGradient extends BaseGradient {
/**
* The type of gradient. Use `"radial"` for a radial gradient.
*/
gradient: 'radial';
/**
* An array of gradient stops defining the gradient color sequence.
*/
stops: GradientStop[];
id?: string;
/**
* The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle for the gradient.
*
* __Default value:__ `0.5`
*/
x1?: number;
/**
* The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle for the gradient.
*
* __Default value:__ `0.5`
*/
y1?: number;
/**
* The radius length, in normalized [0, 1] coordinates, of the inner circle for the gradient.
*
* __Default value:__ `0`
*/
r1?: number;
/**
* The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle for the gradient.
*
* __Default value:__ `0.5`
*/
x2?: number;
/**
* The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle for the gradient.
*
* __Default value:__ `0.5`
*/
y2?: number;
/**
* The radius length, in normalized [0, 1] coordinates, of the outer circle for the gradient.
*
* __Default value:__ `0.5`
*/
r2?: number;
}
export type ColorValueRef =
| ScaledValueRef<string>
| { value: GradientLinear | GradientRadial }
| ScaledValueRef<Color>
| { value: LinearGradient | RadialGradient }
| {

@@ -111,0 +186,0 @@ gradient: Field;

@@ -25,2 +25,3 @@ import { AutoSize } from './autosize';

export * from './config';
export * from './color';
export * from './data';

@@ -27,0 +28,0 @@ export * from './encode';

@@ -243,3 +243,3 @@ import {

/**
* Maximum allowed pixel width of axis titles.
* Maximum allowed pixel width of legend titles.
*

@@ -388,5 +388,3 @@ * __Default value:__ `180`.

/**
* Default shape type (such as "circle") for legend symbols.
* Can be one of ``"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`.
* In addition to a set of built-in shapes, custom shapes can be defined using [SVG path strings](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths).
* The symbol shape. One of the plotting shapes `circle` (default), `square`, `cross`, `diamond`, `triangle-up`, `triangle-down`, `triangle-right`, or `triangle-left`, the line symbol `stroke`, or one of the centered directional shapes `arrow`, `wedge`, or `triangle`. Alternatively, a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) can be provided. For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.
*

@@ -440,3 +438,3 @@ * __Default value:__ `"circle"`.

/**
* Maximum allowed pixel width of axis tick labels.
* Maximum allowed pixel width of legend tick labels.
*

@@ -443,0 +441,0 @@ * __Default value:__ `160`.

@@ -18,2 +18,3 @@ import { Vector2, SignalRef, Signal, Vector3 } from '.';

| 'mercator'
| 'naturalEarth1'
| 'orthographic'

@@ -20,0 +21,0 @@ | 'stereographic'

@@ -22,2 +22,3 @@ import {

import { TitleAnchor } from './title';
import { Color } from './color';

@@ -32,3 +33,3 @@ export type NumberValue = number | NumericValueRef;

export type ColorValue = null | string | ColorValueRef;
export type ColorValue = null | Color | ColorValueRef;

@@ -35,0 +36,0 @@ export type AlignValue = Align | AlignValueRef;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc