You've already forked wakapi-readme-stats
Bar graph added.
This commit is contained in:
27
node_modules/vega-voronoi/LICENSE
generated
vendored
Normal file
27
node_modules/vega-voronoi/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
Copyright (c) 2015-2018, University of Washington Interactive Data Lab
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
7
node_modules/vega-voronoi/README.md
generated
vendored
Normal file
7
node_modules/vega-voronoi/README.md
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
# vega-voronoi
|
||||
|
||||
Voronoi diagram transform for Vega dataflows.
|
||||
|
||||
This package provides the following Vega data transform:
|
||||
|
||||
- [**Voronoi**](https://vega.github.io/vega/docs/transforms/voronoi/) [<>](https://github.com/vega/vega/blob/master/packages/vega-voronoi/src/Voronoi.js "Source")
|
||||
68
node_modules/vega-voronoi/build/vega-voronoi.js
generated
vendored
Normal file
68
node_modules/vega-voronoi/build/vega-voronoi.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vega-dataflow'), require('vega-util'), require('d3-delaunay')) :
|
||||
typeof define === 'function' && define.amd ? define(['exports', 'vega-dataflow', 'vega-util', 'd3-delaunay'], factory) :
|
||||
(global = global || self, factory((global.vega = global.vega || {}, global.vega.transforms = {}), global.vega, global.vega, global.d3));
|
||||
}(this, (function (exports, vegaDataflow, vegaUtil, d3Delaunay) { 'use strict';
|
||||
|
||||
function Voronoi(params) {
|
||||
vegaDataflow.Transform.call(this, null, params);
|
||||
}
|
||||
|
||||
Voronoi.Definition = {
|
||||
'type': 'Voronoi',
|
||||
'metadata': {'modifies': true},
|
||||
'params': [
|
||||
{ 'name': 'x', 'type': 'field', 'required': true },
|
||||
{ 'name': 'y', 'type': 'field', 'required': true },
|
||||
{ 'name': 'size', 'type': 'number', 'array': true, 'length': 2 },
|
||||
{ 'name': 'extent', 'type': 'array', 'array': true, 'length': 2,
|
||||
'default': [[-1e5, -1e5], [1e5, 1e5]],
|
||||
'content': {'type': 'number', 'array': true, 'length': 2} },
|
||||
{ 'name': 'as', 'type': 'string', 'default': 'path' }
|
||||
]
|
||||
};
|
||||
|
||||
const prototype = vegaUtil.inherits(Voronoi, vegaDataflow.Transform);
|
||||
|
||||
const defaultExtent = [-1e5, -1e5, 1e5, 1e5];
|
||||
|
||||
prototype.transform = function(_, pulse) {
|
||||
const as = _.as || 'path',
|
||||
data = pulse.source;
|
||||
|
||||
// nothing to do if no data
|
||||
if (!data || !data.length) return pulse;
|
||||
|
||||
// configure and construct voronoi diagram
|
||||
let s = _.size;
|
||||
s = s ? [0, 0, s[0], s[1]]
|
||||
: (s = _.extent) ? [s[0][0], s[0][1], s[1][0], s[1][1]]
|
||||
: defaultExtent;
|
||||
|
||||
const voronoi = this.value = d3Delaunay.Delaunay.from(data, _.x, _.y).voronoi(s);
|
||||
|
||||
// map polygons to paths
|
||||
for (let i=0, n=data.length; i<n; ++i) {
|
||||
const polygon = voronoi.cellPolygon(i);
|
||||
data[i][as] = polygon ? toPathString(polygon) : null;
|
||||
}
|
||||
|
||||
return pulse.reflow(_.modified()).modifies(as);
|
||||
};
|
||||
|
||||
// suppress duplicated end point vertices
|
||||
function toPathString(p) {
|
||||
const x = p[0][0],
|
||||
y = p[0][1];
|
||||
|
||||
let n = p.length - 1;
|
||||
for (; p[n][0] === x && p[n][1] === y; --n);
|
||||
|
||||
return 'M' + p.slice(0, n + 1).join('L') + 'Z';
|
||||
}
|
||||
|
||||
exports.voronoi = Voronoi;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
1
node_modules/vega-voronoi/build/vega-voronoi.min.js
generated
vendored
Normal file
1
node_modules/vega-voronoi/build/vega-voronoi.min.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vega-dataflow"),require("vega-util"),require("d3-delaunay")):"function"==typeof define&&define.amd?define(["exports","vega-dataflow","vega-util","d3-delaunay"],t):t(((e=e||self).vega=e.vega||{},e.vega.transforms={}),e.vega,e.vega,e.d3)}(this,(function(e,t,n,a){"use strict";function r(e){t.Transform.call(this,null,e)}r.Definition={type:"Voronoi",metadata:{modifies:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"size",type:"number",array:!0,length:2},{name:"extent",type:"array",array:!0,length:2,default:[[-1e5,-1e5],[1e5,1e5]],content:{type:"number",array:!0,length:2}},{name:"as",type:"string",default:"path"}]};const o=n.inherits(r,t.Transform),i=[-1e5,-1e5,1e5,1e5];function l(e){const t=e[0][0],n=e[0][1];let a=e.length-1;for(;e[a][0]===t&&e[a][1]===n;--a);return"M"+e.slice(0,a+1).join("L")+"Z"}o.transform=function(e,t){const n=e.as||"path",r=t.source;if(!r||!r.length)return t;let o=e.size;o=o?[0,0,o[0],o[1]]:(o=e.extent)?[o[0][0],o[0][1],o[1][0],o[1][1]]:i;const f=this.value=a.Delaunay.from(r,e.x,e.y).voronoi(o);for(let e=0,t=r.length;e<t;++e){const t=f.cellPolygon(e);r[e][n]=t?l(t):null}return t.reflow(e.modified()).modifies(n)},e.voronoi=r,Object.defineProperty(e,"__esModule",{value:!0})}));
|
||||
1
node_modules/vega-voronoi/index.js
generated
vendored
Normal file
1
node_modules/vega-voronoi/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {default as voronoi} from './src/Voronoi';
|
||||
68
node_modules/vega-voronoi/package.json
generated
vendored
Normal file
68
node_modules/vega-voronoi/package.json
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"_from": "vega-voronoi@~4.1.2",
|
||||
"_id": "vega-voronoi@4.1.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-XXp2UChi4/6jkEqWkLFbjDBVLMizQICWDv4RUkfMeDNhWmhEY/3kPHCU6taqfTVkbxfA7aN20ivbakJzoywiAQ==",
|
||||
"_location": "/vega-voronoi",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "vega-voronoi@~4.1.2",
|
||||
"name": "vega-voronoi",
|
||||
"escapedName": "vega-voronoi",
|
||||
"rawSpec": "~4.1.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "~4.1.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/vega"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/vega-voronoi/-/vega-voronoi-4.1.2.tgz",
|
||||
"_shasum": "459b78f5191fb707e94d9afa7d8c1a68ad9aec7a",
|
||||
"_spec": "vega-voronoi@~4.1.2",
|
||||
"_where": "/home/prabhatdev/Documents/opensource/gitHubStats/waka-readme-stats/node_modules/vega",
|
||||
"author": {
|
||||
"name": "Jeffrey Heer",
|
||||
"url": "http://idl.cs.washington.edu"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/vega/vega/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"d3-delaunay": "^5.2.1",
|
||||
"vega-dataflow": "^5.5.1",
|
||||
"vega-util": "^1.13.2"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Voronoi diagram transform for Vega dataflows.",
|
||||
"devDependencies": {
|
||||
"vega-transforms": "*"
|
||||
},
|
||||
"gitHead": "35e31c5c6b54db9dc3a577b5adad8d15ec274d32",
|
||||
"homepage": "https://github.com/vega/vega#readme",
|
||||
"keywords": [
|
||||
"vega",
|
||||
"voronoi"
|
||||
],
|
||||
"license": "BSD-3-Clause",
|
||||
"main": "build/vega-voronoi.js",
|
||||
"module": "index",
|
||||
"name": "vega-voronoi",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/vega/vega.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn rollup",
|
||||
"postbuild": "terser build/vega-voronoi.js -c -m -o build/vega-voronoi.min.js",
|
||||
"postpublish": "git push && git push --tags",
|
||||
"prebuild": "rimraf build && mkdir build",
|
||||
"prepublishOnly": "yarn test && yarn build",
|
||||
"pretest": "yarn prebuild && yarn rollup",
|
||||
"rollup": "rollup -g d3-delaunay:d3,vega-dataflow:vega,vega-util:vega -f umd -n vega.transforms -o build/vega-voronoi.js -- index.js",
|
||||
"test": "tape 'test/**/*-test.js'"
|
||||
},
|
||||
"version": "4.1.2"
|
||||
}
|
||||
60
node_modules/vega-voronoi/src/Voronoi.js
generated
vendored
Normal file
60
node_modules/vega-voronoi/src/Voronoi.js
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
import {Transform} from 'vega-dataflow';
|
||||
import {inherits} from 'vega-util';
|
||||
import {Delaunay} from 'd3-delaunay';
|
||||
|
||||
export default function Voronoi(params) {
|
||||
Transform.call(this, null, params);
|
||||
}
|
||||
|
||||
Voronoi.Definition = {
|
||||
'type': 'Voronoi',
|
||||
'metadata': {'modifies': true},
|
||||
'params': [
|
||||
{ 'name': 'x', 'type': 'field', 'required': true },
|
||||
{ 'name': 'y', 'type': 'field', 'required': true },
|
||||
{ 'name': 'size', 'type': 'number', 'array': true, 'length': 2 },
|
||||
{ 'name': 'extent', 'type': 'array', 'array': true, 'length': 2,
|
||||
'default': [[-1e5, -1e5], [1e5, 1e5]],
|
||||
'content': {'type': 'number', 'array': true, 'length': 2} },
|
||||
{ 'name': 'as', 'type': 'string', 'default': 'path' }
|
||||
]
|
||||
};
|
||||
|
||||
const prototype = inherits(Voronoi, Transform);
|
||||
|
||||
const defaultExtent = [-1e5, -1e5, 1e5, 1e5];
|
||||
|
||||
prototype.transform = function(_, pulse) {
|
||||
const as = _.as || 'path',
|
||||
data = pulse.source;
|
||||
|
||||
// nothing to do if no data
|
||||
if (!data || !data.length) return pulse;
|
||||
|
||||
// configure and construct voronoi diagram
|
||||
let s = _.size;
|
||||
s = s ? [0, 0, s[0], s[1]]
|
||||
: (s = _.extent) ? [s[0][0], s[0][1], s[1][0], s[1][1]]
|
||||
: defaultExtent;
|
||||
|
||||
const voronoi = this.value = Delaunay.from(data, _.x, _.y).voronoi(s);
|
||||
|
||||
// map polygons to paths
|
||||
for (let i=0, n=data.length; i<n; ++i) {
|
||||
const polygon = voronoi.cellPolygon(i);
|
||||
data[i][as] = polygon ? toPathString(polygon) : null;
|
||||
}
|
||||
|
||||
return pulse.reflow(_.modified()).modifies(as);
|
||||
};
|
||||
|
||||
// suppress duplicated end point vertices
|
||||
function toPathString(p) {
|
||||
const x = p[0][0],
|
||||
y = p[0][1];
|
||||
|
||||
let n = p.length - 1;
|
||||
for (; p[n][0] === x && p[n][1] === y; --n);
|
||||
|
||||
return 'M' + p.slice(0, n + 1).join('L') + 'Z';
|
||||
}
|
||||
Reference in New Issue
Block a user