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

@superset-ui/color

Package Overview
Dependencies
Maintainers
3
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@superset-ui/color - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

2

esm/SequentialScheme.js

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

import"core-js/modules/web.dom.iterable";import"core-js/modules/es6.array.iterator";function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}import{scaleLinear}from"d3-scale";import ColorScheme from"./ColorScheme";function range(a){return Array(a).keys().concat()}var SequentialScheme=/*#__PURE__*/function(a){function b(b){var c=a.call(this,b)||this;var d=b.isDiverging;return c.isDiverging=void 0!==d&&d,c}_inheritsLoose(b,a);var c=b.prototype;return c.createLinearScale=function e(a){void 0===a&&(a=[0,1]);// Create matching domain
function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}import{scaleLinear}from"d3-scale";import ColorScheme from"./ColorScheme";function range(a){for(var b=[],c=0;c<a;c+=1)b.push(c);return b}var SequentialScheme=/*#__PURE__*/function(a){function b(b){var c=a.call(this,b)||this;var d=b.isDiverging;return c.isDiverging=void 0!==d&&d,c}_inheritsLoose(b,a);var c=b.prototype;return c.createLinearScale=function e(a){void 0===a&&(a=[0,1]);// Create matching domain
// because D3 continuous scale uses piecewise mapping
// between domain and range.
var b=scaleLinear().range(a),c=this.colors.length-1,d=range(this.colors.length).map(function(a){return b(a/c)});return scaleLinear().domain(d).range(this.colors).clamp(!0)},c.getColors=function d(a){if(void 0===a&&(a=this.colors.length),a===this.colors.length)return this.colors;var b=this.createLinearScale(),c=a-1;return range(a).map(function(a){return b(a/c)})},b}(ColorScheme);export{SequentialScheme as default};

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

"use strict";exports.__esModule=!0,exports.default=void 0,require("core-js/modules/web.dom.iterable"),require("core-js/modules/es6.array.iterator");var _d3Scale=require("d3-scale"),_ColorScheme2=_interopRequireDefault(require("./ColorScheme"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}function range(a){return Array(a).keys().concat()}var SequentialScheme=/*#__PURE__*/function(a){function b(b){var c=a.call(this,b)||this;var d=b.isDiverging;return c.isDiverging=void 0!==d&&d,c}_inheritsLoose(b,a);var c=b.prototype;return c.createLinearScale=function e(a){void 0===a&&(a=[0,1]);// Create matching domain
"use strict";exports.__esModule=!0,exports.default=void 0;var _d3Scale=require("d3-scale"),_ColorScheme2=_interopRequireDefault(require("./ColorScheme"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _inheritsLoose(a,b){a.prototype=Object.create(b.prototype),a.prototype.constructor=a,a.__proto__=b}function range(a){for(var b=[],c=0;c<a;c+=1)b.push(c);return b}var SequentialScheme=/*#__PURE__*/function(a){function b(b){var c=a.call(this,b)||this;var d=b.isDiverging;return c.isDiverging=void 0!==d&&d,c}_inheritsLoose(b,a);var c=b.prototype;return c.createLinearScale=function e(a){void 0===a&&(a=[0,1]);// Create matching domain
// because D3 continuous scale uses piecewise mapping
// between domain and range.
var b=(0,_d3Scale.scaleLinear)().range(a),c=this.colors.length-1,d=range(this.colors.length).map(function(a){return b(a/c)});return(0,_d3Scale.scaleLinear)().domain(d).range(this.colors).clamp(!0)},c.getColors=function d(a){if(void 0===a&&(a=this.colors.length),a===this.colors.length)return this.colors;var b=this.createLinearScale(),c=a-1;return range(a).map(function(a){return b(a/c)})},b}(_ColorScheme2.default);exports.default=SequentialScheme;
{
"name": "@superset-ui/color",
"version": "0.4.0",
"version": "0.5.0",
"description": "Superset UI color",

@@ -29,6 +29,6 @@ "sideEffects": false,

"dependencies": {
"@superset-ui/core": "^0.4.0",
"@superset-ui/core": "^0.5.0",
"d3-scale": "^2.1.2"
},
"gitHead": "b191e7a815860107d7146e38549db2370ce0d1dc"
"gitHead": "31eec0f496b66098ad887bd64fc13f3882bcdc71"
}
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