@plotdb/chart 2.1.21 → 2.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/utils/tint.js +7 -3
- package/utils/tint.min.js +1 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"author":"zbryikt","name":"@plotdb/chart","license":"MIT","description":"plotdb charts","style":"index.min.css","browser":"index.min.js","main":"index.min.js","version":"2.1.
|
|
1
|
+
{"author":"zbryikt","name":"@plotdb/chart","license":"MIT","description":"plotdb charts","style":"index.min.css","browser":"index.min.js","main":"index.min.js","version":"2.1.22","homepage":"https://github.com/plotdb/chart","repository":{"type":"git","url":"https://github.com/plotdb/chart"},"engines":{"node":">=10.14.1","npm":">=6.4.1"},"scripts":{"start":"npx server -r web -o true"},"devDependencies":{"@loadingio/bootstrap.ext":"^0.0.9","@loadingio/ldquery":"^3.0.4","@loadingio/loading.css":"^3.1.0","@loadingio/vscroll":"^0.0.8","@plotdb/layout":"^0.0.12","@plotdb/pdmap-world":"^0.0.5","@plotdb/semver":"^0.0.3","@plotdb/sheet":"^0.2.0","@xlfont/choose":"^0.0.13","@xlfont/load":"^2.1.0","@zbryikt/template":"^2.3.38","bootstrap":"^4.6.1","bootstrap.native":"^3.0.15","fedep":"^1.1.7","ldbutton":"^2.0.1","ldfile":"^2.0.0","ldiconfont":"^0.2.3","ldloader":"^3.0.1","ldview":"^1.2.1","livescript":"^1.6.0","pdmaptw":"2.1.0","uglify-js":"^3.13.1","uglifycss":"^0.0.29","zmgr":"^2.2.3"},"frontendDependencies":{"root":"web/static/assets/lib","modules":["bootstrap","bootstrap.native","@loadingio/bootstrap.ext","@loadingio/ldquery","@loadingio/loading.css","@loadingio/ldcolorpicker","@loadingio/debounce.js","@loadingio/vscroll","@plotdb/pdmap-world","@plotdb/block","@plotdb/csscope","@plotdb/rescope","@plotdb/layout","@plotdb/sheet","@plotdb/konfig","@plotdb/semver","@xlfont/choose","@xlfont/load","@zbryikt/voronoijs","d3","d3-array","d3-axis","d3-brush","d3-color","d3-dispatch","d3-drag","d3-ease","d3-force","d3-force-boundary","d3-format","d3-hierarchy","d3-interpolate","d3-path","d3-quadtree","d3-random","d3-scale-chromatic","d3-selection","d3-shape","d3-timer","d3-transition","choosefont.js","pdmaptw","proxise","ldiconfont","ldloader","ldbutton","ldcover","ldcolor","ldfile","ldslider","wrap-svg-text","ldpalettepicker","zmgr","ldview"]},"dependencies":{"@loadingio/debounce.js":"^1.0.1","@loadingio/ldcolorpicker":"^3.0.0","@plotdb/block":"^4.7.1","@plotdb/csscope":"^4.0.6","@plotdb/konfig":"^4.7.2","@plotdb/rescope":"^4.1.6","@zbryikt/voronoijs":"^1.0.0","choosefont.js":"^0.0.1","d3":"^4.13.0","d3-array":"^3.1.1","d3-axis":"^3.0.0","d3-brush":"^3.0.0","d3-color":"^3.1.0","d3-dispatch":"^3.0.1","d3-drag":"^3.0.0","d3-ease":"^3.0.1","d3-force":"^3.0.0","d3-force-boundary":"^0.0.2","d3-format":"^3.1.0","d3-hierarchy":"^3.1.1","d3-interpolate":"^3.0.1","d3-path":"^3.0.1","d3-quadtree":"^3.0.1","d3-random":"^3.0.1","d3-scale-chromatic":"^3.0.0","d3-selection":"^3.0.0","d3-shape":"^3.1.0","d3-timer":"^3.0.1","d3-transition":"^3.0.1","ldcolor":"^1.0.0","ldcover":"^3.2.1","ldpalettepicker":"^4.0.1","ldslider":"^3.1.1","proxise":"^1.0.1","wrap-svg-text":"^0.0.7"}}
|
package/utils/tint.js
CHANGED
|
@@ -14,10 +14,14 @@
|
|
|
14
14
|
};
|
|
15
15
|
tint['default'] = ['#e15c64', '#f7b26a', '#f3ed9d', '#a4bd81', '#a0d7d2', '#8db1da', '#daaedb'];
|
|
16
16
|
tint.prototype = import$(Object.create(Object.prototype), {
|
|
17
|
-
set: function(pal
|
|
18
|
-
var ref$, this$ = this;
|
|
17
|
+
set: function(pal){
|
|
18
|
+
var key, reset, ref$, this$ = this;
|
|
19
19
|
pal == null && (pal = []);
|
|
20
|
-
|
|
20
|
+
key = pal.key || pal.name;
|
|
21
|
+
if (!(typeof reset != 'undefined' && reset !== null)) {
|
|
22
|
+
reset = key != null && this.key !== key ? true : false;
|
|
23
|
+
}
|
|
24
|
+
this.key = key;
|
|
21
25
|
this.colors = Array.isArray(pal) && pal.length
|
|
22
26
|
? pal
|
|
23
27
|
: pal.colors && Array.isArray(pal.colors)
|
package/utils/tint.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){var r;(r=function(t){return this.isUnique=null==(t=null==t?{}:t).unique||t.unique,this.map={},this.nmap=[],this.wm=new WeakMap,this.count=0,this._ext=t.extent||[0,1],this.set(t.palette)||t.colors,this.mode(t.mode),this}).default=["#e15c64","#f7b26a","#f3ed9d","#a4bd81","#a0d7d2","#8db1da","#daaedb"],r.prototype=function(t,n){var s,
|
|
1
|
+
!function(){var r;(r=function(t){return this.isUnique=null==(t=null==t?{}:t).unique||t.unique,this.map={},this.nmap=[],this.wm=new WeakMap,this.count=0,this._ext=t.extent||[0,1],this.set(t.palette)||t.colors,this.mode(t.mode),this}).default=["#e15c64","#f7b26a","#f3ed9d","#a4bd81","#a0d7d2","#8db1da","#daaedb"],r.prototype=function(t,n){var s,i={}.hasOwnProperty;for(s in n)i.call(n,s)&&(t[s]=n[s]);return t}(Object.create(Object.prototype),{set:function(t){var n,s=this,i=(t=null==t?[]:t).key||t.name;return null==n&&(n=null!=i&&this.key!==i),this.key=i,this.colors=Array.isArray(t)&&t.length?t:t.colors&&Array.isArray(t.colors)?t.colors:r.default,this.nmap=t.maps||[],this.tags=this.colors.map(function(t){return t.tag||[]}),this.colors=this.colors.map(function(t){return t.value||t}),1===this.colors.length&&this.colors.push(ldcolor.complement(this.colors[0])),this.colors=this.colors.map(function(t){return ldcolor.hsl(t)}),this.len=2<(t=this.colors.length)?t:2,n?this.reset():this.nmap.map(function(t,n){return(Array.isArray(t)?t:[t]).map(function(t){return s.get(t,0,n)})}),this.tags.map(function(t,n){return t.map(function(t){return s.get(t,0,n)})})},unique:function(t){return null!=t?this.isUnique=!!t:this.isUnique},reset:function(){var s=this;return this.map={},this.wm=new WeakMap,this.count=0,(this.nmap||[]).map(function(t,n){return(Array.isArray(t)?t:[t]).map(function(t){return s.get(t,0,n)})})},mode:function(t){return 0===arguments.length?this._m:this._m=t},extent:function(t){return 0===arguments.length?this._ext:(this._ext=t.map(function(t){return null!=t?t:0}),this._ext.sort(function(t,n){return t-n}))},get:function(t,n,s){switch(null==n&&(n=0),this._m){case 1:return this._vd(t,n);case 2:return this._vc(t,n);case 3:return this._vs(t,n);default:return this._d(t,n,s)}},_v:function(t,n){return 0<n?t=ldcolor.lighter(t,n):n<0&&(t=ldcolor.darker(t,-n)),ldcolor.web(t)},_d:function(t,n,s){var i,r,e,o,h,l,u,c;if(null==n&&(n=0),null!=s?(this.count<s&&(this.count=s+1),i=s%this.len,"object"==typeof t?this.wm.set(t,i):this.map[t]=i):("object"==typeof t?null==(i=this.wm.get(t))&&this.wm.set(t,i=this.count++):null==(i=this.map[t])&&(this.map[t]=i=this.count++),this.isUnique||(i%=this.len)),i>=this.len){for(c=i%(this.len-1),r=Math.floor(i/(this.len-1)),o=(e=[0,1])[0],h=e[1];0<r;)o=(e=[2*o,2*h])[0],h=e[1],r%2&&(o+=1),r>>=1;r=o/h,e=[this.colors[c],this.colors[1+c]],l=e[0],u=e[1],c={h:(e=["h","s","l"].map(function(t){return r*(u[t]-l[t])+l[t]}))[0],s:e[1],l:e[2]}}else c=this.colors[i];return this._v(c,n)},_vs:function(t,n){for(var s,i,r,e=this._ext||[0,1],o=-1,h=0,l=e.length-1;h<l;++h)if(!(t>=e[(s=h)+1])){o=s;break}return-1===o&&(o=e.length),this._v(this.colors[(i=0<o?o:0)<(r=this.colors.length-1)?i:r],n)},_vd:function(t,n){var s,i=this._ext||[0,1],i=(t=0<(s=(t-i[0])/(i[1]-i[0]||1))?s:0)<1?t:1;return this._v(this.colors[Math.floor((t=i*(this.len||1))<(s=this.len-1)?t:s)],n)},_vc:function(t,n){var s,i,r,e=this._ext||[0,1],t=((o=0<(h=(t-e[0])/(e[1]-e[0]||1))?h:0)<1?o:1)*(0<(o=this.len-1)?o:0),o=t==this.len-1?[0<(o=this.len-2)?o:0,0<(o=this.len-1)?o:0]:[Math.floor(t),Math.floor(t)+1],e=o[0],h=o[1];return o=[this.colors[e],this.colors[h]],s=o[0],i=o[1],r=t-e,t=(o=["h","s","l"].map(function(t){return r*(i[t]-s[t])+s[t]}))[0],e=o[1],o=o[2],this._v({h:t,s:e,l:o},n)},text:function(t,n){return null==n&&(n={}),t=ldcolor.hcl(this.get(t)),ldcolor.web(50<t.l?n.textDark||"#000":n.textLight||"#fff")}}),r.mode={ordinal:0,discrete:1,continuous:2,ranges:3},"undefined"!=typeof chart&&null!==chart&&((chart.utils||(chart.utils={})).tint=r)}.call(this);
|