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.9.0 to 0.10.0

2

index.d.ts

@@ -1,3 +0,3 @@

// TypeScript Version: 2.7
// TypeScript Version: 3.4
export * from './types';
{
"name": "vega-typings",
"version": "0.9.0",
"version": "0.10.0",
"description": "Typings for Vega.",

@@ -23,3 +23,3 @@ "types": "types",

},
"gitHead": "9badf6d2d1490057f4010e3796189ca366878101"
"gitHead": "016e41e94f617acc1fe6d5eb3242b2646b5780c6"
}

@@ -96,4 +96,7 @@ import { DataType, EncodeEntryName, Format, SignalValue, Spec } from '../spec';

export type TypeInference = DataType | 'integer';
export function inferType(values: any[], field?: string): TypeInference;
export function inferTypes(values: any[], fields: string[]): { [field: string]: TypeInference };
export function inferType(values: readonly any[], field?: string): TypeInference;
export function inferTypes(
values: readonly any[],
fields: readonly string[],
): { [field: string]: TypeInference };

@@ -100,0 +103,0 @@ export type EventListenerHandler = (event: ScenegraphEvent, item?: Item) => void;

@@ -8,4 +8,4 @@ import { Scene, SceneItem } from './scene';

constructor(loader: Loader);
initialize(el: HTMLElement, width: number, height: number, origin: number[]): this;
resize(width: number, height: number, origin: number[]): this;
initialize(el: HTMLElement, width: number, height: number, origin: readonly number[]): this;
resize(width: number, height: number, origin: readonly number[]): this;
}

@@ -12,0 +12,0 @@

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

} from '.';
import { Text } from './encode';
import { LayoutAlign } from './layout';

@@ -63,3 +64,3 @@ import {

*/
title?: StringValue;
title?: Text | SignalRef;

@@ -247,2 +248,7 @@ /**

/**
* Line height in pixels for multi-line title text.
*/
titleLineHeight?: N;
/**
* Opacity of the axis title.

@@ -249,0 +255,0 @@ */

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

import { BaseLegend, LegendOrient } from './legend';
import { BaseProjection } from './projection';
import { InitSignal, NewSignal, SignalRef } from './signal';

@@ -51,2 +52,3 @@ import { BaseTitle, TitleAnchor } from './title';

title?: TitleConfig;
projection?: ProjectionConfig;
range?: {

@@ -254,2 +256,12 @@ category?: RangeScheme | string[];

/**
* A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
*/
lineBreak?: string;
/**
* The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
*/
lineHeight?: number;
/**
* Polar coordinate angle, in radians, of the text label from the origin determined by the `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark `startAngle` and `endAngle` properties: angles are measured in radians, with `0` indicating "north".

@@ -472,1 +484,3 @@ */

export type TitleConfig = BaseTitle;
export type ProjectionConfig = BaseProjection;

@@ -60,2 +60,3 @@ import { SignalRef } from '.';

export type TextBaselineValueRef = ScaledValueRef<TextBaseline>;
export type TextValueRef = ScaledValueRef<Text>;
export type BooleanValueRef = ScaledValueRef<boolean>;

@@ -311,2 +312,3 @@ export type ArrayValueRef = ScaledValueRef<any[]>;

}
export type Text = string | string[];
export type TextBaseline = 'alphabetic' | Baseline;

@@ -332,5 +334,5 @@ export type TextDirection = 'ltr' | 'rtl';

export interface TextEncodeEntry extends EncodeEntry, AlignProperty, ThetaProperty {
text?: ProductionRule<StringValueRef>;
text?: ProductionRule<TextValueRef>;
angle?: ProductionRule<NumericValueRef>;
baseline?: ProductionRule<ScaledValueRef<TextBaseline>>;
baseline?: ProductionRule<TextBaselineValueRef>;
dir?: ProductionRule<ScaledValueRef<TextDirection>>;

@@ -342,5 +344,7 @@ dx?: ProductionRule<NumericValueRef>;

fontSize?: ProductionRule<NumericValueRef>;
fontWeight?: ProductionRule<ScaledValueRef<FontWeight>>;
fontStyle?: ProductionRule<ScaledValueRef<FontStyle>>;
fontWeight?: ProductionRule<FontWeightValueRef>;
fontStyle?: ProductionRule<FontStyleValueRef>;
limit?: ProductionRule<NumericValueRef>;
lineBreak?: ProductionRule<StringValueRef>;
lineHeight?: ProductionRule<NumericValueRef>;
radius?: ProductionRule<NumericValueRef>;

@@ -347,0 +351,0 @@ }

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

import { FormatType, LabelOverlap, TickCount } from './axis';
import { Text } from './encode';
import { LayoutAlign } from './layout';

@@ -90,10 +91,5 @@ import {

*/
title?: string | SignalRef;
title?: Text | SignalRef;
/**
* The desired number of tick values for quantitative legends.
*/
tickCount?: TickCount;
/**
* The minimum desired step between tick values for quantitative legends, in terms of scale domain values. For example, a value of `1` indicates that ticks should not be less than 1 unit apart. If `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to enforce the minimum step value.

@@ -123,6 +119,6 @@ */

export interface LegendEncode {
title?: GuideEncodeEntry<GroupEncodeEntry>;
title?: GuideEncodeEntry<TextEncodeEntry>;
labels?: GuideEncodeEntry<TextEncodeEntry>;
legend?: GuideEncodeEntry<GroupEncodeEntry>;
entries?: GuideEncodeEntry<TextEncodeEntry>;
entries?: GuideEncodeEntry<GroupEncodeEntry>;
symbols?: GuideEncodeEntry<SymbolEncodeEntry>;

@@ -159,2 +155,12 @@ gradient?: GuideEncodeEntry<RectEncodeEntry>;

/**
* The maximum number of allowed entries for a symbol legend. Additional entries will be dropped.
*/
symbolLimit?: N;
/**
* The desired number of tick values for quantitative legends.
*/
tickCount?: TickCount;
// ---------- Legend Group ----------

@@ -255,2 +261,7 @@ /**

/**
* Line height in pixels for multi-line title text.
*/
titleLineHeight?: N;
/**
* Opacity of the legend title.

@@ -257,0 +268,0 @@ */

@@ -23,8 +23,4 @@ import { Vector2, SignalRef, Signal, Vector3 } from '.';

| 'transverseMercator';
export interface Projection {
export interface BaseProjection {
/*
* The name of the projection.
*/
name: string;
/*
* The type of the projection.

@@ -85,1 +81,7 @@ */

}
export interface Projection extends BaseProjection {
/*
* The name of the projection.
*/
name: string;
}

@@ -1,2 +0,3 @@

import { Encodable, SignalRef, TextEncodeEntry } from '.';
import { GroupEncodeEntry, GuideEncodeEntry, SignalRef, TextEncodeEntry } from '.';
import { Encode, Text } from './encode';
import {

@@ -17,15 +18,20 @@ AlignValue,

export interface Title extends Encodable<TextEncodeEntry>, BaseTitle {
export interface Title extends BaseTitle {
/**
* The title text.
*/
text: string | SignalRef;
text: Text | SignalRef;
/**
* A mark name property to apply to the title text mark.
* The subtitle text.
*/
subtitle?: Text | SignalRef;
/**
* A mark name property to apply to the title text mark. (**Deprecated.**)
*/
name?: string;
/**
* A boolean flag indicating if the title element should respond to input events such as mouse hover.
* A boolean flag indicating if the title element should respond to input events such as mouse hover. (**Deprecated.**)
*/

@@ -35,3 +41,3 @@ interactive?: boolean;

/**
* A mark style property to apply to the title text mark. If not specified, a default style of `"group-title"` is applied.
* A mark style property to apply to the title text mark. If not specified, a default style of `"group-title"` is applied. (**Deprecated**)
*/

@@ -49,4 +55,24 @@ style?: string | string[];

zindex?: number;
/**
* Mark definitions for custom title encoding.
*/
encode?: TitleEncode | Encode<TextEncodeEntry>; // second entry is **deprecated**
}
export interface TitleEncode {
/**
* Custom encoding for the title container group.
*/
group?: GuideEncodeEntry<GroupEncodeEntry>;
/**
* Custom encoding for the title text.
*/
title?: GuideEncodeEntry<TextEncodeEntry>;
/**
* Custom encoding for the subtitle text.
*/
subtitle?: GuideEncodeEntry<TextEncodeEntry>;
}
export interface BaseTitle<

@@ -65,3 +91,3 @@ N = NumberValue,

/**
* The anchor position for placing the title. One of `"start"`, `"middle"`, or `"end"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.
* The anchor position for placing the title and subtitle text. One of `"start"`, `"middle"`, or `"end"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.
*/

@@ -76,10 +102,13 @@ anchor?: AN;

/**
* The orthogonal offset in pixels by which to displace the title from its position along the edge of the chart.
* The orthogonal offset in pixels by which to displace the title group from its position along the edge of the chart.
*/
offset?: N;
/**
* Horizontal text alignment for title text. One of `"left"`, `"center"`, or `"right"`.
*/
align?: A;
/**
* Angle in degrees of title text.
* Angle in degrees of title and subtitle text.
*/

@@ -89,3 +118,3 @@ angle?: N;

/**
* Vertical text baseline for title text. One of `"top"`, `"middle"`, `"bottom"`, or `"alphabetic"`.
* Vertical text baseline for title and subtitle text. One of `"top"`, `"middle"`, `"bottom"`, or `"alphabetic"`.
*/

@@ -95,15 +124,15 @@ baseline?: TB;

/**
* Text color for title text.
* Delta offset for title and subtitle text x-coordinate.
*/
color?: C;
dx?: N;
/**
* Delta offset for title text x-coordinate.
* Delta offset for title and subtitle text y-coordinate.
*/
dx?: N;
dy?: N;
/**
* Delta offset for title text y-coordinate.
* Text color for title text.
*/
dy?: N;
color?: C;

@@ -118,4 +147,2 @@ /**

*
* __Default value:__ `10`.
*
* @minimum 0

@@ -137,3 +164,8 @@ */

/**
* The maximum allowed length in pixels of legend labels.
* Line height in pixels for multi-line title text.
*/
lineHeight?: N;
/**
* The maximum allowed length in pixels of title and subtitle text.
*

@@ -148,2 +180,40 @@ * @minimum 0

orient?: O;
/**
* Text color for subtitle text.
*/
subtitleColor?: C;
/**
* Font name for subtitle text.
*/
subtitleFont?: S;
/**
* Font size in pixels for subtitle text.
*
* @minimum 0
*/
subtitleFontSize?: N;
/**
* Font style for subtitle text.
*/
subtitleFontStyle?: FS;
/**
* Font weight for subtitle text.
* This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).
*/
subtitleFontWeight?: FW;
/**
* Line height in pixels for multi-line subtitle text.
*/
subtitleLineHeight?: N;
/**
* The padding in pixels between title and subtitle text.
*/
subtitlePadding?: N;
}

@@ -12,2 +12,3 @@ import { SignalRef, Compare, Vector2, ExprRef, FontWeight, FontStyle, Vector7 } from '.';

| _TODO_<'density'>
| DotBinTransform
| ExtentTransform

@@ -36,2 +37,3 @@ | FilterTransform

| _TODO_<'project'>
| QuantileTransform
| RegressionTransform

@@ -172,6 +174,16 @@ | _TODO_<'resolvefilter'>

export interface DotBinTransform {
type: 'dotbin';
field: string | TransformField;
groupby?: (string | TransformField)[] | SignalRef;
step?: number | SignalRef;
smooth?: boolean | SignalRef;
as?: string | SignalRef;
signal?: string;
}
export interface ExtentTransform {
type: 'extent';
field: string | TransformField;
signal: string;
signal?: string;
}

@@ -239,3 +251,3 @@

type: 'identifier';
as: string;
as: string | SignalRef;
}

@@ -297,2 +309,11 @@

export interface QuantileTransform {
type: 'quantile';
field: string | TransformField;
groupby?: (string | TransformField)[] | SignalRef;
step?: number | SignalRef;
probs?: number[] | SignalRef;
as?: (string | SignalRef)[] | SignalRef;
}
export interface RegressionTransform {

@@ -320,3 +341,3 @@ type: 'regression';

sort?: Compare;
offset?: StackOffset;
offset?: StackOffset | SignalRef;
as?: Vector2<string | SignalRef> | SignalRef;

@@ -323,0 +344,0 @@ }

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