Socket
Socket
Sign inDemoInstall

vega-lite

Package Overview
Dependencies
86
Maintainers
4
Versions
467
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.9.0 to 5.9.1

28

build/package.json
{
"name": "vega-lite",
"author": "Dominik Moritz, Kanit \"Ham\" Wongsuphasawat, Arvind Satyanarayan, Jeffrey Heer",
"version": "5.9.0",
"version": "5.9.1",
"collaborators": [

@@ -82,18 +82,18 @@ "Kanit Wongsuphasawat (http://kanitw.yellowpigz.com)",

"devDependencies": {
"@babel/core": "^7.21.4",
"@babel/preset-env": "^7.21.4",
"@babel/preset-typescript": "^7.21.4",
"@babel/core": "^7.21.8",
"@babel/preset-env": "^7.21.5",
"@babel/preset-typescript": "^7.21.5",
"@release-it/conventional-changelog": "^5.1.1",
"@rollup/plugin-alias": "^5.0.0",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^24.1.0",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-terser": "^0.4.1",
"@types/chai": "^4.3.4",
"@types/chai": "^4.3.5",
"@types/d3": "^7.4.0",
"@types/jest": "^27.4.1",
"@types/pako": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.1",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
"ajv-formats": "^2.1.1",

@@ -109,4 +109,4 @@ "ajv": "^8.12.0",

"eslint-plugin-prettier": "^4.2.1",
"eslint": "^8.39.0",
"highlight.js": "^11.7.0",
"eslint": "^8.40.0",
"highlight.js": "^11.8.0",
"jest-dev-server": "^6.1.1",

@@ -118,8 +118,8 @@ "jest": "^27.5.1",

"puppeteer": "^15.0.0",
"release-it": "^15.10.1",
"release-it": "^15.10.3",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup": "^3.21.0",
"rollup": "^3.21.6",
"serve": "^14.2.0",
"terser": "^5.17.1",
"terser": "^5.17.3",
"ts-jest": "^29.1.0",

@@ -144,3 +144,3 @@ "ts-json-schema-generator": "^1.2.0",

"vega-util": "~1.17.2",
"yargs": "~17.7.1"
"yargs": "~17.7.2"
},

@@ -147,0 +147,0 @@ "peerDependencies": {

@@ -18,2 +18,4 @@ import { isArray, isNumber } from 'vega-util';

import { getOffsetScaleChannel } from '../../../channel';
import { getFirstDefined } from '../../../util';
import { isExprRef } from '../../../expr';
export function rectPosition(model, channel) {

@@ -52,3 +54,3 @@ const { config, encoding, markDef } = model;

}
function defaultSizeRef(sizeChannel, scaleName, scale, config, bandSize) {
function defaultSizeRef(sizeChannel, scaleName, scale, config, bandSize, hasFieldDef, mark) {
if (isRelativeBandSize(bandSize)) {

@@ -90,2 +92,15 @@ if (scale) {

}
if (!hasFieldDef) {
const { bandPaddingInner, barBandPaddingInner, rectBandPaddingInner } = config.scale;
const padding = getFirstDefined(bandPaddingInner, mark === 'bar' ? barBandPaddingInner : rectBandPaddingInner); // this part is like paddingInner in scale.ts
if (isSignalRef(padding)) {
return { signal: `(1 - (${padding.signal})) * ${sizeChannel}` };
}
else if (isNumber(padding)) {
return { signal: `${1 - padding} * ${sizeChannel}` };
}
else if (isExprRef(padding)) {
return { signal: `(1 - (${padding.expr})) * ${sizeChannel}` };
}
}
const defaultStep = getViewConfigDiscreteStep(config.view, sizeChannel);

@@ -126,3 +141,3 @@ return { value: defaultStep - 2 };

sizeMixins = sizeMixins || {
[vgSizeChannel]: defaultSizeRef(vgSizeChannel, offsetScaleName || scaleName, offsetScale || scale, config, bandSize)
[vgSizeChannel]: defaultSizeRef(vgSizeChannel, offsetScaleName || scaleName, offsetScale || scale, config, bandSize, !!fieldDef, markDef.type)
};

@@ -129,0 +144,0 @@ /*

@@ -63,3 +63,7 @@ import { isObject } from 'vega';

// Legend entries do not store values, so we need to walk the scenegraph to the symbol datum.
{ events, update: 'datum.value || item().items[0].items[0].datum.value', force: true },
{
events,
update: 'isDefined(datum.value) ? datum.value : item().items[0].items[0].datum.value',
force: true
},
{ events: stream.merge, update: `!event.item || !datum ? null : ${sgName}`, force: true }

@@ -66,0 +70,0 @@ ]

{
"name": "vega-lite",
"author": "Dominik Moritz, Kanit \"Ham\" Wongsuphasawat, Arvind Satyanarayan, Jeffrey Heer",
"version": "5.9.0",
"version": "5.9.1",
"collaborators": [

@@ -82,18 +82,18 @@ "Kanit Wongsuphasawat (http://kanitw.yellowpigz.com)",

"devDependencies": {
"@babel/core": "^7.21.4",
"@babel/preset-env": "^7.21.4",
"@babel/preset-typescript": "^7.21.4",
"@babel/core": "^7.21.8",
"@babel/preset-env": "^7.21.5",
"@babel/preset-typescript": "^7.21.5",
"@release-it/conventional-changelog": "^5.1.1",
"@rollup/plugin-alias": "^5.0.0",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^24.1.0",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-terser": "^0.4.1",
"@types/chai": "^4.3.4",
"@types/chai": "^4.3.5",
"@types/d3": "^7.4.0",
"@types/jest": "^27.4.1",
"@types/pako": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.1",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
"ajv-formats": "^2.1.1",

@@ -109,4 +109,4 @@ "ajv": "^8.12.0",

"eslint-plugin-prettier": "^4.2.1",
"eslint": "^8.39.0",
"highlight.js": "^11.7.0",
"eslint": "^8.40.0",
"highlight.js": "^11.8.0",
"jest-dev-server": "^6.1.1",

@@ -118,8 +118,8 @@ "jest": "^27.5.1",

"puppeteer": "^15.0.0",
"release-it": "^15.10.1",
"release-it": "^15.10.3",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup": "^3.21.0",
"rollup": "^3.21.6",
"serve": "^14.2.0",
"terser": "^5.17.1",
"terser": "^5.17.3",
"ts-jest": "^29.1.0",

@@ -144,3 +144,3 @@ "ts-json-schema-generator": "^1.2.0",

"vega-util": "~1.17.2",
"yargs": "~17.7.1"
"yargs": "~17.7.2"
},

@@ -147,0 +147,0 @@ "peerDependencies": {

@@ -31,2 +31,5 @@ import {SignalRef} from 'vega';

import {getOffsetScaleChannel} from '../../../channel';
import {getFirstDefined} from '../../../util';
import {Mark} from '../../../mark';
import {isExprRef} from '../../../expr';

@@ -79,3 +82,5 @@ export function rectPosition(model: UnitModel, channel: 'x' | 'y' | 'theta' | 'radius'): VgEncodeEntry {

config: Config,
bandSize: BandSize
bandSize: BandSize,
hasFieldDef: boolean,
mark: Mark
): VgValueRef {

@@ -115,2 +120,13 @@ if (isRelativeBandSize(bandSize)) {

}
if (!hasFieldDef) {
const {bandPaddingInner, barBandPaddingInner, rectBandPaddingInner} = config.scale;
const padding = getFirstDefined(bandPaddingInner, mark === 'bar' ? barBandPaddingInner : rectBandPaddingInner); // this part is like paddingInner in scale.ts
if (isSignalRef(padding)) {
return {signal: `(1 - (${padding.signal})) * ${sizeChannel}`};
} else if (isNumber(padding)) {
return {signal: `${1 - padding} * ${sizeChannel}`};
} else if (isExprRef(padding)) {
return {signal: `(1 - (${padding.expr})) * ${sizeChannel}`};
}
}
const defaultStep = getViewConfigDiscreteStep(config.view, sizeChannel);

@@ -161,3 +177,11 @@ return {value: defaultStep - 2};

sizeMixins = sizeMixins || {
[vgSizeChannel]: defaultSizeRef(vgSizeChannel, offsetScaleName || scaleName, offsetScale || scale, config, bandSize)
[vgSizeChannel]: defaultSizeRef(
vgSizeChannel,
offsetScaleName || scaleName,
offsetScale || scale,
config,
bandSize,
!!fieldDef,
markDef.type
)
};

@@ -164,0 +188,0 @@

@@ -75,3 +75,7 @@ import {isObject, MergedStream, NewSignal, Stream} from 'vega';

// Legend entries do not store values, so we need to walk the scenegraph to the symbol datum.
{events, update: 'datum.value || item().items[0].items[0].datum.value', force: true},
{
events,
update: 'isDefined(datum.value) ? datum.value : item().items[0].items[0].datum.value',
force: true
},
{events: stream.merge, update: `!event.item || !datum ? null : ${sgName}`, force: true}

@@ -78,0 +82,0 @@ ]

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc