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

vega-runtime

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-runtime - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

2

build/vega-runtime.js

@@ -222,3 +222,3 @@ (function (global, factory) {

params = parseParameters(spec.params, ctx);
ctx.dataflow.connect(op, op.parameters(params));
ctx.dataflow.connect(op, op.parameters(params, spec.react));
}

@@ -225,0 +225,0 @@ }

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vega-dataflow"),require("vega-util")):"function"==typeof define&&define.amd?define(["exports","vega-dataflow","vega-util"],t):t(e.vega={},e.vega,e.vega)}(this,function(e,a,i){"use strict";function u(e,t,n){";"!==t[t.length-1]&&(t="return("+t+");");var r=Function.apply(null,e.concat(t));return n&&n.functions?r.bind(n.functions):r}function f(e,t){return u(["event"],e,t)}function c(e,t,n){var r,a;for(r in n=n||{},e)a=e[r],n[r]=i.isArray(a)?a.map(function(e){return o(e,t,n)}):o(a,t,n);return n}function o(e,t,n){if(!e||!i.isObject(e))return e;for(var r,a=0,o=s.length;a<o;++a)if(r=s[a],e.hasOwnProperty(r.key))return r.parse(e,t,n);return e}var s=[{key:"$ref",parse:function(e,t){return t.get(e.$ref)||i.error("Operator not defined: "+e.$ref)}},{key:"$key",parse:function(e,t){var n="k:"+e.$key+"_"+!!e.$flat;return t.fn[n]||(t.fn[n]=i.key(e.$key,e.$flat))}},{key:"$expr",parse:function(e,t,n){e.$params&&c(e.$params,t,n);var r="e:"+e.$expr+"_"+e.$name;return t.fn[r]||(t.fn[r]=i.accessor((a=e.$expr,o=t,u(["datum","_"],a,o)),e.$fields,e.$name));var a,o}},{key:"$field",parse:function(e,t){if(!e.$field)return null;var n="f:"+e.$field+"_"+e.$name;return t.fn[n]||(t.fn[n]=i.field(e.$field,e.$name))}},{key:"$encode",parse:function(e,t){var n,r,a=e.$encode,o={};for(n in a)r=a[n],o[n]=i.accessor(u(["item","_"],r.$expr,t),r.$fields),o[n].output=r.$output;return o}},{key:"$compare",parse:function(e,t){var n="c:"+e.$compare+"_"+e.$order,r=i.array(e.$compare).map(function(e){return e&&e.$tupleid?a.tupleid:e});return t.fn[n]||(t.fn[n]=i.compare(r,e.$order))}},{key:"$context",parse:function(e,t){return t}},{key:"$subflow",parse:function(e,s){var i=e.$subflow;return function(e,t,n){var r=l(i,s.fork()),a=r.get(i.operators[0].id),o=r.signals.parent;return o&&o.set(n),a}}},{key:"$tupleid",parse:function(){return a.tupleid}}];function d(e){return(e+"").toLowerCase()}function n(e,t){"operator"!==d(e.type)&&e.type?t.transform(e,e.type):t.operator(e,e.update?u(["_"],e.update,t):null)}function r(e,t){var n=i.isObject(n=e.source)?n.$ref:n,r=t.get(n),a=null,o=e.update,s=void 0;r||i.error("Source not defined: "+e.source),a=e.target&&e.target.$expr?f(e.target.$expr,t):t.get(e.target),o&&o.$expr&&(o.$params&&(s=c(o.$params,t)),o=u(["_","event"],o.$expr,t)),t.update(e,r,a,o,s)}function l(e,s){var t=e.operators||[];return e.background&&(s.background=e.background),e.eventConfig&&(s.eventConfig=e.eventConfig),t.forEach(function(e){n(e,s)}),t.forEach(function(e){var t,n,r,a;n=s,(t=e).params&&((r=n.get(t.id))||i.error("Invalid operator id: "+t.id),a=c(t.params,n),n.dataflow.connect(r,r.parameters(a)))}),(e.streams||[]).forEach(function(e){var t,n,r,a,o;n=s,a=null!=(t=e).filter?f(t.filter,n):void 0,o=null!=t.stream?n.get(t.stream):void 0,t.source?o=n.events(t.source,t.type,a):t.merge&&(o=(r=t.merge.map(n.get.bind(n)))[0].merge.apply(r[0],r.slice(1))),t.between&&(r=t.between.map(n.get.bind(n)),o=o.between(r[0],r[1])),t.filter&&(o=o.filter(a)),null!=t.throttle&&(o=o.throttle(+t.throttle)),null!=t.debounce&&(o=o.debounce(+t.debounce)),null==o&&i.error("Invalid stream definition: "+JSON.stringify(t)),t.consume&&o.consume(!0),n.stream(t,o)}),(e.updates||[]).forEach(function(e){r(e,s)}),s.resolve()}var p={skip:!0};function h(e,t,n){this.dataflow=e,this.transforms=t,this.events=e.events.bind(e),this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},n&&(this.functions=Object.create(n),this.functions.context=this)}function t(e){this.dataflow=e.dataflow,this.transforms=e.transforms,this.functions=e.functions,this.events=e.events,this.signals=Object.create(e.signals),this.scales=Object.create(e.scales),this.nodes=Object.create(e.nodes),this.data=Object.create(e.data),this.fn=Object.create(e.fn),e.functions&&(this.functions=Object.create(e.functions),this.functions.context=this)}h.prototype=t.prototype={fork:function(){var e=new t(this);return(this.subcontext||(this.subcontext=[])).push(e),e},get:function(e){return this.nodes[e]},set:function(e,t){return this.nodes[e]=t},add:function(e,t){var n,r=this,a=r.dataflow;if(r.set(e.id,t),"collect"===d(e.type)&&(n=e.value)&&(n.$ingest?a.ingest(t,n.$ingest,n.$format):n.$load?r.get(n.$load.$ref).target=t:n.$request?a.request(t,n.$request,n.$format):a.pulse(t,a.changeset().insert(n))),e.root&&(r.root=t),e.parent){var o=r.get(e.parent.$ref);o?(a.connect(o,[t]),t.targets().add(o)):(r.unresolved=r.unresolved||[]).push(function(){o=r.get(e.parent.$ref),a.connect(o,[t]),t.targets().add(o)})}if(e.signal&&(r.signals[e.signal]=t),e.scale&&(r.scales[e.scale]=t),e.data)for(var s in e.data)n=r.data[s]||(r.data[s]={}),e.data[s].forEach(function(e){n[e]=t})},resolve:function(){return(this.unresolved||[]).forEach(function(e){e()}),delete this.unresolved,this},operator:function(e,t,n){this.add(e,this.dataflow.add(e.value,t,n,e.react))},transform:function(e,t,n){this.add(e,this.dataflow.add(this.transforms[d(t)],n))},stream:function(e,t){this.set(e.id,t)},update:function(e,t,n,r,a){this.dataflow.on(t,n,r,a,e.options)},getState:function(n){var r=this,e={};if(n.signals){var a=e.signals={};Object.keys(r.signals).forEach(function(e){var t=r.signals[e];n.signals(e,t)&&(a[e]=t.value)})}if(n.data){var o=e.data={};Object.keys(r.data).forEach(function(e){var t=r.data[e];n.data(e,t)&&(o[e]=t.input.value)})}return r.subcontext&&!1!==n.recurse&&(e.subcontext=r.subcontext.map(function(e){return e.getState(n)})),e},setState:function(e){var r=this,t=r.dataflow,n=e.data,a=e.signals;Object.keys(a||{}).forEach(function(e){t.update(r.signals[e],a[e],p)}),Object.keys(n||{}).forEach(function(e){t.pulse(r.data[e].input,t.changeset().remove(i.truthy).insert(n[e]))}),(e.subcontext||[]).forEach(function(e,t){var n=r.subcontext[t];n&&n.setState(e)})}},e.parse=l,e.context=function(e,t,n){return new h(e,t,n)},e.expression=u,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vega-dataflow"),require("vega-util")):"function"==typeof define&&define.amd?define(["exports","vega-dataflow","vega-util"],t):t(e.vega={},e.vega,e.vega)}(this,function(e,a,i){"use strict";function u(e,t,n){";"!==t[t.length-1]&&(t="return("+t+");");var r=Function.apply(null,e.concat(t));return n&&n.functions?r.bind(n.functions):r}function c(e,t){return u(["event"],e,t)}function f(e,t,n){var r,a;for(r in n=n||{},e)a=e[r],n[r]=i.isArray(a)?a.map(function(e){return o(e,t,n)}):o(a,t,n);return n}function o(e,t,n){if(!e||!i.isObject(e))return e;for(var r,a=0,o=s.length;a<o;++a)if(r=s[a],e.hasOwnProperty(r.key))return r.parse(e,t,n);return e}var s=[{key:"$ref",parse:function(e,t){return t.get(e.$ref)||i.error("Operator not defined: "+e.$ref)}},{key:"$key",parse:function(e,t){var n="k:"+e.$key+"_"+!!e.$flat;return t.fn[n]||(t.fn[n]=i.key(e.$key,e.$flat))}},{key:"$expr",parse:function(e,t,n){e.$params&&f(e.$params,t,n);var r="e:"+e.$expr+"_"+e.$name;return t.fn[r]||(t.fn[r]=i.accessor((a=e.$expr,o=t,u(["datum","_"],a,o)),e.$fields,e.$name));var a,o}},{key:"$field",parse:function(e,t){if(!e.$field)return null;var n="f:"+e.$field+"_"+e.$name;return t.fn[n]||(t.fn[n]=i.field(e.$field,e.$name))}},{key:"$encode",parse:function(e,t){var n,r,a=e.$encode,o={};for(n in a)r=a[n],o[n]=i.accessor(u(["item","_"],r.$expr,t),r.$fields),o[n].output=r.$output;return o}},{key:"$compare",parse:function(e,t){var n="c:"+e.$compare+"_"+e.$order,r=i.array(e.$compare).map(function(e){return e&&e.$tupleid?a.tupleid:e});return t.fn[n]||(t.fn[n]=i.compare(r,e.$order))}},{key:"$context",parse:function(e,t){return t}},{key:"$subflow",parse:function(e,s){var i=e.$subflow;return function(e,t,n){var r=l(i,s.fork()),a=r.get(i.operators[0].id),o=r.signals.parent;return o&&o.set(n),a}}},{key:"$tupleid",parse:function(){return a.tupleid}}];function d(e){return(e+"").toLowerCase()}function n(e,t){"operator"!==d(e.type)&&e.type?t.transform(e,e.type):t.operator(e,e.update?u(["_"],e.update,t):null)}function r(e,t){var n=i.isObject(n=e.source)?n.$ref:n,r=t.get(n),a=null,o=e.update,s=void 0;r||i.error("Source not defined: "+e.source),a=e.target&&e.target.$expr?c(e.target.$expr,t):t.get(e.target),o&&o.$expr&&(o.$params&&(s=f(o.$params,t)),o=u(["_","event"],o.$expr,t)),t.update(e,r,a,o,s)}function l(e,s){var t=e.operators||[];return e.background&&(s.background=e.background),e.eventConfig&&(s.eventConfig=e.eventConfig),t.forEach(function(e){n(e,s)}),t.forEach(function(e){var t,n,r,a;n=s,(t=e).params&&((r=n.get(t.id))||i.error("Invalid operator id: "+t.id),a=f(t.params,n),n.dataflow.connect(r,r.parameters(a,t.react)))}),(e.streams||[]).forEach(function(e){var t,n,r,a,o;n=s,a=null!=(t=e).filter?c(t.filter,n):void 0,o=null!=t.stream?n.get(t.stream):void 0,t.source?o=n.events(t.source,t.type,a):t.merge&&(o=(r=t.merge.map(n.get.bind(n)))[0].merge.apply(r[0],r.slice(1))),t.between&&(r=t.between.map(n.get.bind(n)),o=o.between(r[0],r[1])),t.filter&&(o=o.filter(a)),null!=t.throttle&&(o=o.throttle(+t.throttle)),null!=t.debounce&&(o=o.debounce(+t.debounce)),null==o&&i.error("Invalid stream definition: "+JSON.stringify(t)),t.consume&&o.consume(!0),n.stream(t,o)}),(e.updates||[]).forEach(function(e){r(e,s)}),s.resolve()}var p={skip:!0};function h(e,t,n){this.dataflow=e,this.transforms=t,this.events=e.events.bind(e),this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},n&&(this.functions=Object.create(n),this.functions.context=this)}function t(e){this.dataflow=e.dataflow,this.transforms=e.transforms,this.functions=e.functions,this.events=e.events,this.signals=Object.create(e.signals),this.scales=Object.create(e.scales),this.nodes=Object.create(e.nodes),this.data=Object.create(e.data),this.fn=Object.create(e.fn),e.functions&&(this.functions=Object.create(e.functions),this.functions.context=this)}h.prototype=t.prototype={fork:function(){var e=new t(this);return(this.subcontext||(this.subcontext=[])).push(e),e},get:function(e){return this.nodes[e]},set:function(e,t){return this.nodes[e]=t},add:function(e,t){var n,r=this,a=r.dataflow;if(r.set(e.id,t),"collect"===d(e.type)&&(n=e.value)&&(n.$ingest?a.ingest(t,n.$ingest,n.$format):n.$load?r.get(n.$load.$ref).target=t:n.$request?a.request(t,n.$request,n.$format):a.pulse(t,a.changeset().insert(n))),e.root&&(r.root=t),e.parent){var o=r.get(e.parent.$ref);o?(a.connect(o,[t]),t.targets().add(o)):(r.unresolved=r.unresolved||[]).push(function(){o=r.get(e.parent.$ref),a.connect(o,[t]),t.targets().add(o)})}if(e.signal&&(r.signals[e.signal]=t),e.scale&&(r.scales[e.scale]=t),e.data)for(var s in e.data)n=r.data[s]||(r.data[s]={}),e.data[s].forEach(function(e){n[e]=t})},resolve:function(){return(this.unresolved||[]).forEach(function(e){e()}),delete this.unresolved,this},operator:function(e,t,n){this.add(e,this.dataflow.add(e.value,t,n,e.react))},transform:function(e,t,n){this.add(e,this.dataflow.add(this.transforms[d(t)],n))},stream:function(e,t){this.set(e.id,t)},update:function(e,t,n,r,a){this.dataflow.on(t,n,r,a,e.options)},getState:function(n){var r=this,e={};if(n.signals){var a=e.signals={};Object.keys(r.signals).forEach(function(e){var t=r.signals[e];n.signals(e,t)&&(a[e]=t.value)})}if(n.data){var o=e.data={};Object.keys(r.data).forEach(function(e){var t=r.data[e];n.data(e,t)&&(o[e]=t.input.value)})}return r.subcontext&&!1!==n.recurse&&(e.subcontext=r.subcontext.map(function(e){return e.getState(n)})),e},setState:function(e){var r=this,t=r.dataflow,n=e.data,a=e.signals;Object.keys(a||{}).forEach(function(e){t.update(r.signals[e],a[e],p)}),Object.keys(n||{}).forEach(function(e){t.pulse(r.data[e].input,t.changeset().remove(i.truthy).insert(n[e]))}),(e.subcontext||[]).forEach(function(e,t){var n=r.subcontext[t];n&&n.setState(e)})}},e.parse=l,e.context=function(e,t,n){return new h(e,t,n)},e.expression=u,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "vega-runtime",
"version": "3.1.0",
"version": "3.1.1",
"description": "Runtime support for Vega dataflows.",

@@ -36,8 +36,8 @@ "keywords": [

"eslint": "5",
"rollup": "0.62.0",
"rollup": "0.66.6",
"tape": "4",
"uglify-js": "3",
"vega-encode": "^3.1.3",
"vega-encode": "^3.2.0",
"vega-transforms": "^2.2.0"
}
}

@@ -28,4 +28,4 @@ import {operatorExpression} from './expression';

params = parseParameters(spec.params, ctx);
ctx.dataflow.connect(op, op.parameters(params));
ctx.dataflow.connect(op, op.parameters(params, spec.react));
}
}
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