Comparing version 0.0.192 to 0.0.193-alpha.0
@@ -12,3 +12,2 @@ import { scaleBand } from 'd3-scale'; | ||
var scale = scaleBand(); | ||
scale.type = 'band'; | ||
if (range) scale.range(range); | ||
@@ -20,5 +19,9 @@ if (rangeRound) scale.rangeRound(rangeRound); | ||
if (paddingOuter) scale.paddingOuter(paddingOuter); | ||
if (align) scale.align(align); | ||
if (tickFormat) scale.tickFormat = tickFormat; | ||
if (align) scale.align(align); // @TODO should likely get rid of these. | ||
// @ts-ignore | ||
if (tickFormat) scale.tickFormat = tickFormat; // @ts-ignore | ||
scale.type = 'band'; | ||
return scale; | ||
}); |
import { scaleLinear } from 'd3-scale'; | ||
export default (function (_ref) { | ||
export default function linearScale(_ref) { | ||
var range = _ref.range, | ||
@@ -11,3 +11,2 @@ rangeRound = _ref.rangeRound, | ||
var scale = scaleLinear(); | ||
scale.type = 'linear'; | ||
if (range) scale.range(range); | ||
@@ -17,4 +16,6 @@ if (rangeRound) scale.rangeRound(rangeRound); | ||
if (nice) scale.nice(); | ||
if (clamp) scale.clamp(true); | ||
if (clamp) scale.clamp(true); // @ts-ignore | ||
scale.type = 'linear'; | ||
return scale; | ||
}); | ||
} |
import { scaleLog } from 'd3-scale'; | ||
export default (function (_ref) { | ||
export default function logScale(_ref) { | ||
var range = _ref.range, | ||
@@ -12,3 +12,2 @@ rangeRound = _ref.rangeRound, | ||
var scale = scaleLog(); | ||
scale.type = 'log'; | ||
if (range) scale.range(range); | ||
@@ -19,4 +18,6 @@ if (rangeRound) scale.rangeRound(rangeRound); | ||
if (clamp) scale.clamp(true); | ||
if (base) scale.base(base); | ||
if (base) scale.base(base); // @ts-ignore | ||
scale.type = 'log'; | ||
return scale; | ||
}); | ||
} |
import { scaleOrdinal } from 'd3-scale'; | ||
export default (function (_ref) { | ||
export default function ordinalScale(_ref) { | ||
var range = _ref.range, | ||
@@ -7,7 +7,8 @@ domain = _ref.domain, | ||
var scale = scaleOrdinal(); | ||
scale.type = 'ordinal'; | ||
if (range) scale.range(range); | ||
if (domain) scale.domain(domain); | ||
if (unknown) scale.unknown(unknown); | ||
if (unknown) scale.unknown(unknown); // @ts-ignore | ||
scale.type = 'ordinal'; | ||
return scale; | ||
}); | ||
} |
import { scalePoint } from 'd3-scale'; | ||
export default (function (_ref) { | ||
export default function pointScale(_ref) { | ||
var range = _ref.range, | ||
@@ -7,14 +7,12 @@ rangeRound = _ref.rangeRound, | ||
padding = _ref.padding, | ||
align = _ref.align, | ||
_ref$nice = _ref.nice, | ||
nice = _ref$nice === void 0 ? false : _ref$nice; | ||
align = _ref.align; | ||
var scale = scalePoint(); | ||
scale.type = 'point'; | ||
if (range) scale.range(range); | ||
if (rangeRound) scale.rangeRound(rangeRound); | ||
if (domain) scale.domain(domain); | ||
if (nice) scale.nice(); | ||
if (padding) scale.padding(padding); | ||
if (align) scale.align(align); | ||
if (align) scale.align(align); // @ts-ignore | ||
scale.type = 'point'; | ||
return scale; | ||
}); | ||
} |
import { scalePow } from 'd3-scale'; | ||
export default (function (_ref) { | ||
export default function powerScale(_ref) { | ||
var range = _ref.range, | ||
@@ -12,3 +12,2 @@ rangeRound = _ref.rangeRound, | ||
var scale = scalePow(); | ||
scale.type = 'power'; | ||
if (range) scale.range(range); | ||
@@ -19,4 +18,6 @@ if (rangeRound) scale.rangeRound(rangeRound); | ||
if (clamp) scale.clamp(true); | ||
if (exponent) scale.exponent(exponent); | ||
if (exponent) scale.exponent(exponent); // @ts-ignore | ||
scale.type = 'power'; | ||
return scale; | ||
}); | ||
} |
import { scaleQuantile } from 'd3-scale'; | ||
export default (function (_ref) { | ||
export default function quantileScale(_ref) { | ||
var range = _ref.range, | ||
domain = _ref.domain; | ||
var scale = scaleQuantile(); | ||
if (range) scale.range(range); | ||
if (domain) scale.domain(domain); // @ts-ignore | ||
scale.type = 'quantile'; | ||
if (range) scale.range(range); | ||
if (domain) scale.domain(domain); | ||
return scale; | ||
}); | ||
} |
import { scaleQuantize } from 'd3-scale'; | ||
export default (function (_ref) { | ||
export default function quantizeScale(_ref) { | ||
var range = _ref.range, | ||
@@ -10,3 +10,2 @@ domain = _ref.domain, | ||
var scale = scaleQuantize(); | ||
scale.type = 'quantize'; | ||
if (range) scale.range(range); | ||
@@ -16,4 +15,6 @@ if (domain) scale.domain(domain); | ||
if (ticks) scale.ticks(ticks); | ||
if (tickFormat) scale.tickFormat(tickFormat); | ||
if (tickFormat) scale.tickFormat.apply(scale, tickFormat); // @ts-ignore | ||
scale.type = 'quantize'; | ||
return scale; | ||
}); | ||
} |
@@ -0,3 +1,4 @@ | ||
// @ts-ignore no type defs for symlog | ||
import { scaleSymlog } from 'd3-scale'; | ||
export default (function (_ref) { | ||
export default function symLogScale(_ref) { | ||
var range = _ref.range, | ||
@@ -7,7 +8,8 @@ domain = _ref.domain, | ||
var scale = scaleSymlog(); | ||
scale.type = 'symlog'; | ||
if (range) scale.range(range); | ||
if (domain) scale.domain(domain); | ||
if (constant) scale.constant(constant); | ||
if (constant) scale.constant(constant); // @ts-ignore | ||
scale.type = 'symlog'; | ||
return scale; | ||
}); | ||
} |
import { scaleThreshold } from 'd3-scale'; | ||
export default (function (_ref) { | ||
export default function thresholdScale(_ref) { | ||
var range = _ref.range, | ||
domain = _ref.domain; | ||
var scale = scaleThreshold(); | ||
if (range) scale.range(range); | ||
if (domain) scale.domain(domain); // @ts-ignore | ||
scale.type = 'threshold'; | ||
if (range) scale.range(range); | ||
if (domain) scale.domain(domain); | ||
return scale; | ||
}); | ||
} |
import { scaleTime } from 'd3-scale'; | ||
export default (function (_ref) { | ||
export default function timeScale(_ref) { | ||
var range = _ref.range, | ||
@@ -11,3 +11,2 @@ rangeRound = _ref.rangeRound, | ||
var scale = scaleTime(); | ||
scale.type = 'time'; | ||
if (range) scale.range(range); | ||
@@ -17,4 +16,6 @@ if (rangeRound) scale.rangeRound(rangeRound); | ||
if (nice) scale.nice(); | ||
if (clamp) scale.clamp(true); | ||
if (clamp) scale.clamp(true); // @ts-ignore | ||
scale.type = 'time'; | ||
return scale; | ||
}); | ||
} |
import { scaleUtc } from 'd3-scale'; | ||
export default (function (_ref) { | ||
export default function timeScale(_ref) { | ||
var range = _ref.range, | ||
@@ -11,3 +11,2 @@ rangeRound = _ref.rangeRound, | ||
var scale = scaleUtc(); | ||
scale.type = 'utc'; | ||
if (range) scale.range(range); | ||
@@ -17,4 +16,6 @@ if (rangeRound) scale.rangeRound(rangeRound); | ||
if (nice) scale.nice(); | ||
if (clamp) scale.clamp(true); | ||
if (clamp) scale.clamp(true); // @ts-ignore | ||
scale.type = 'utc'; | ||
return scale; | ||
}); | ||
} |
@@ -18,3 +18,2 @@ "use strict"; | ||
var scale = (0, _d3Scale.scaleBand)(); | ||
scale.type = 'band'; | ||
if (range) scale.range(range); | ||
@@ -26,4 +25,8 @@ if (rangeRound) scale.rangeRound(rangeRound); | ||
if (paddingOuter) scale.paddingOuter(paddingOuter); | ||
if (align) scale.align(align); | ||
if (tickFormat) scale.tickFormat = tickFormat; | ||
if (align) scale.align(align); // @TODO should likely get rid of these. | ||
// @ts-ignore | ||
if (tickFormat) scale.tickFormat = tickFormat; // @ts-ignore | ||
scale.type = 'band'; | ||
return scale; | ||
@@ -30,0 +33,0 @@ }; |
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = void 0; | ||
exports.default = linearScale; | ||
var _d3Scale = require("d3-scale"); | ||
var _default = function _default(_ref) { | ||
function linearScale(_ref) { | ||
var range = _ref.range, | ||
@@ -17,3 +17,2 @@ rangeRound = _ref.rangeRound, | ||
var scale = (0, _d3Scale.scaleLinear)(); | ||
scale.type = 'linear'; | ||
if (range) scale.range(range); | ||
@@ -23,6 +22,6 @@ if (rangeRound) scale.rangeRound(rangeRound); | ||
if (nice) scale.nice(); | ||
if (clamp) scale.clamp(true); | ||
if (clamp) scale.clamp(true); // @ts-ignore | ||
scale.type = 'linear'; | ||
return scale; | ||
}; | ||
exports.default = _default; | ||
} |
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = void 0; | ||
exports.default = logScale; | ||
var _d3Scale = require("d3-scale"); | ||
var _default = function _default(_ref) { | ||
function logScale(_ref) { | ||
var range = _ref.range, | ||
@@ -18,3 +18,2 @@ rangeRound = _ref.rangeRound, | ||
var scale = (0, _d3Scale.scaleLog)(); | ||
scale.type = 'log'; | ||
if (range) scale.range(range); | ||
@@ -25,6 +24,6 @@ if (rangeRound) scale.rangeRound(rangeRound); | ||
if (clamp) scale.clamp(true); | ||
if (base) scale.base(base); | ||
if (base) scale.base(base); // @ts-ignore | ||
scale.type = 'log'; | ||
return scale; | ||
}; | ||
exports.default = _default; | ||
} |
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = void 0; | ||
exports.default = ordinalScale; | ||
var _d3Scale = require("d3-scale"); | ||
var _default = function _default(_ref) { | ||
function ordinalScale(_ref) { | ||
var range = _ref.range, | ||
@@ -13,9 +13,8 @@ domain = _ref.domain, | ||
var scale = (0, _d3Scale.scaleOrdinal)(); | ||
scale.type = 'ordinal'; | ||
if (range) scale.range(range); | ||
if (domain) scale.domain(domain); | ||
if (unknown) scale.unknown(unknown); | ||
if (unknown) scale.unknown(unknown); // @ts-ignore | ||
scale.type = 'ordinal'; | ||
return scale; | ||
}; | ||
exports.default = _default; | ||
} |
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = void 0; | ||
exports.default = pointScale; | ||
var _d3Scale = require("d3-scale"); | ||
var _default = function _default(_ref) { | ||
function pointScale(_ref) { | ||
var range = _ref.range, | ||
@@ -13,16 +13,12 @@ rangeRound = _ref.rangeRound, | ||
padding = _ref.padding, | ||
align = _ref.align, | ||
_ref$nice = _ref.nice, | ||
nice = _ref$nice === void 0 ? false : _ref$nice; | ||
align = _ref.align; | ||
var scale = (0, _d3Scale.scalePoint)(); | ||
scale.type = 'point'; | ||
if (range) scale.range(range); | ||
if (rangeRound) scale.rangeRound(rangeRound); | ||
if (domain) scale.domain(domain); | ||
if (nice) scale.nice(); | ||
if (padding) scale.padding(padding); | ||
if (align) scale.align(align); | ||
if (align) scale.align(align); // @ts-ignore | ||
scale.type = 'point'; | ||
return scale; | ||
}; | ||
exports.default = _default; | ||
} |
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = void 0; | ||
exports.default = powerScale; | ||
var _d3Scale = require("d3-scale"); | ||
var _default = function _default(_ref) { | ||
function powerScale(_ref) { | ||
var range = _ref.range, | ||
@@ -18,3 +18,2 @@ rangeRound = _ref.rangeRound, | ||
var scale = (0, _d3Scale.scalePow)(); | ||
scale.type = 'power'; | ||
if (range) scale.range(range); | ||
@@ -25,6 +24,6 @@ if (rangeRound) scale.rangeRound(rangeRound); | ||
if (clamp) scale.clamp(true); | ||
if (exponent) scale.exponent(exponent); | ||
if (exponent) scale.exponent(exponent); // @ts-ignore | ||
scale.type = 'power'; | ||
return scale; | ||
}; | ||
exports.default = _default; | ||
} |
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = void 0; | ||
exports.default = quantileScale; | ||
var _d3Scale = require("d3-scale"); | ||
var _default = function _default(_ref) { | ||
function quantileScale(_ref) { | ||
var range = _ref.range, | ||
domain = _ref.domain; | ||
var scale = (0, _d3Scale.scaleQuantile)(); | ||
if (range) scale.range(range); | ||
if (domain) scale.domain(domain); // @ts-ignore | ||
scale.type = 'quantile'; | ||
if (range) scale.range(range); | ||
if (domain) scale.domain(domain); | ||
return scale; | ||
}; | ||
exports.default = _default; | ||
} |
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = void 0; | ||
exports.default = quantizeScale; | ||
var _d3Scale = require("d3-scale"); | ||
var _default = function _default(_ref) { | ||
function quantizeScale(_ref) { | ||
var range = _ref.range, | ||
@@ -16,3 +16,2 @@ domain = _ref.domain, | ||
var scale = (0, _d3Scale.scaleQuantize)(); | ||
scale.type = 'quantize'; | ||
if (range) scale.range(range); | ||
@@ -22,6 +21,6 @@ if (domain) scale.domain(domain); | ||
if (ticks) scale.ticks(ticks); | ||
if (tickFormat) scale.tickFormat(tickFormat); | ||
if (tickFormat) scale.tickFormat.apply(scale, tickFormat); // @ts-ignore | ||
scale.type = 'quantize'; | ||
return scale; | ||
}; | ||
exports.default = _default; | ||
} |
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = void 0; | ||
exports.default = symLogScale; | ||
var _d3Scale = require("d3-scale"); | ||
var _default = function _default(_ref) { | ||
// @ts-ignore no type defs for symlog | ||
function symLogScale(_ref) { | ||
var range = _ref.range, | ||
@@ -13,9 +14,8 @@ domain = _ref.domain, | ||
var scale = (0, _d3Scale.scaleSymlog)(); | ||
scale.type = 'symlog'; | ||
if (range) scale.range(range); | ||
if (domain) scale.domain(domain); | ||
if (constant) scale.constant(constant); | ||
if (constant) scale.constant(constant); // @ts-ignore | ||
scale.type = 'symlog'; | ||
return scale; | ||
}; | ||
exports.default = _default; | ||
} |
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = void 0; | ||
exports.default = thresholdScale; | ||
var _d3Scale = require("d3-scale"); | ||
var _default = function _default(_ref) { | ||
function thresholdScale(_ref) { | ||
var range = _ref.range, | ||
domain = _ref.domain; | ||
var scale = (0, _d3Scale.scaleThreshold)(); | ||
if (range) scale.range(range); | ||
if (domain) scale.domain(domain); // @ts-ignore | ||
scale.type = 'threshold'; | ||
if (range) scale.range(range); | ||
if (domain) scale.domain(domain); | ||
return scale; | ||
}; | ||
exports.default = _default; | ||
} |
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = void 0; | ||
exports.default = timeScale; | ||
var _d3Scale = require("d3-scale"); | ||
var _default = function _default(_ref) { | ||
function timeScale(_ref) { | ||
var range = _ref.range, | ||
@@ -17,3 +17,2 @@ rangeRound = _ref.rangeRound, | ||
var scale = (0, _d3Scale.scaleTime)(); | ||
scale.type = 'time'; | ||
if (range) scale.range(range); | ||
@@ -23,6 +22,6 @@ if (rangeRound) scale.rangeRound(rangeRound); | ||
if (nice) scale.nice(); | ||
if (clamp) scale.clamp(true); | ||
if (clamp) scale.clamp(true); // @ts-ignore | ||
scale.type = 'time'; | ||
return scale; | ||
}; | ||
exports.default = _default; | ||
} |
"use strict"; | ||
exports.__esModule = true; | ||
exports.default = void 0; | ||
exports.default = timeScale; | ||
var _d3Scale = require("d3-scale"); | ||
var _default = function _default(_ref) { | ||
function timeScale(_ref) { | ||
var range = _ref.range, | ||
@@ -17,3 +17,2 @@ rangeRound = _ref.rangeRound, | ||
var scale = (0, _d3Scale.scaleUtc)(); | ||
scale.type = 'utc'; | ||
if (range) scale.range(range); | ||
@@ -23,6 +22,6 @@ if (rangeRound) scale.rangeRound(rangeRound); | ||
if (nice) scale.nice(); | ||
if (clamp) scale.clamp(true); | ||
if (clamp) scale.clamp(true); // @ts-ignore | ||
scale.type = 'utc'; | ||
return scale; | ||
}; | ||
exports.default = _default; | ||
} |
{ | ||
"name": "@vx/scale", | ||
"version": "0.0.192", | ||
"version": "0.0.193-alpha.0", | ||
"description": "vx scale", | ||
@@ -8,2 +8,3 @@ "sideEffects": false, | ||
"module": "esm/index.js", | ||
"types": "lib/index.d.ts", | ||
"files": [ | ||
@@ -31,2 +32,3 @@ "lib", | ||
"dependencies": { | ||
"@types/d3-scale": "^2.1.1", | ||
"d3-scale": "^2.2.2" | ||
@@ -37,3 +39,3 @@ }, | ||
}, | ||
"gitHead": "101db6e89d7e8a4966dfafba5a782297110f7844" | ||
"gitHead": "8fb99e77e64fa9c319c0addc2a3fbf61e64885cc" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
40928
59
642
2
+ Added@types/d3-scale@^2.1.1
+ Added@types/d3-scale@2.2.10(transitive)
+ Added@types/d3-time@1.1.4(transitive)