Socket
Socket
Sign inDemoInstall

@visx/shape

Package Overview
Dependencies
Maintainers
4
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@visx/shape - npm Package Compare versions

Comparing version 3.0.0-alpha.0 to 3.0.0

3

esm/index.js

@@ -33,5 +33,6 @@ export { default as Arc } from './shapes/Arc';

export { default as Circle } from './shapes/Circle';
export { default as SplitLinePath } from './shapes/SplitLinePath'; // Export factory functions
export { default as SplitLinePath } from './shapes/SplitLinePath';
// Export factory functions
export * from './types/D3ShapeConfig';
export * from './util/D3ShapeFactories';

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "data", "innerRadius", "outerRadius", "cornerRadius", "startAngle", "endAngle", "padAngle", "padRadius", "children", "innerRef"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -10,14 +9,13 @@ import cx from 'classnames';

var className = _ref.className,
data = _ref.data,
innerRadius = _ref.innerRadius,
outerRadius = _ref.outerRadius,
cornerRadius = _ref.cornerRadius,
startAngle = _ref.startAngle,
endAngle = _ref.endAngle,
padAngle = _ref.padAngle,
padRadius = _ref.padRadius,
children = _ref.children,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "data", "innerRadius", "outerRadius", "cornerRadius", "startAngle", "endAngle", "padAngle", "padRadius", "children", "innerRef"]);
data = _ref.data,
innerRadius = _ref.innerRadius,
outerRadius = _ref.outerRadius,
cornerRadius = _ref.cornerRadius,
startAngle = _ref.startAngle,
endAngle = _ref.endAngle,
padAngle = _ref.padAngle,
padRadius = _ref.padRadius,
children = _ref.children,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var path = arc({

@@ -31,8 +29,6 @@ innerRadius: innerRadius,

padRadius: padRadius
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children({
path: path
}));
if (!data && (startAngle == null || endAngle == null || innerRadius == null || outerRadius == null)) {

@@ -42,3 +38,2 @@ console.warn('[@visx/shape/Arc]: expected data because one of startAngle, endAngle, innerRadius, outerRadius is undefined. Bailing.');

}
return /*#__PURE__*/React.createElement("path", _extends({

@@ -45,0 +40,0 @@ ref: innerRef,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["children", "x", "x0", "x1", "y", "y0", "y1", "data", "defined", "className", "curve", "innerRef"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -10,19 +9,18 @@ import cx from 'classnames';

var children = _ref.children,
x = _ref.x,
x0 = _ref.x0,
x1 = _ref.x1,
y = _ref.y,
y0 = _ref.y0,
y1 = _ref.y1,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$defined = _ref.defined,
defined = _ref$defined === void 0 ? function () {
return true;
} : _ref$defined,
className = _ref.className,
curve = _ref.curve,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, ["children", "x", "x0", "x1", "y", "y0", "y1", "data", "defined", "className", "curve", "innerRef"]);
x = _ref.x,
x0 = _ref.x0,
x1 = _ref.x1,
y = _ref.y,
y0 = _ref.y0,
y1 = _ref.y1,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$defined = _ref.defined,
defined = _ref$defined === void 0 ? function () {
return true;
} : _ref$defined,
className = _ref.className,
curve = _ref.curve,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var path = area({

@@ -37,4 +35,3 @@ x: x,

curve: curve
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children({

@@ -41,0 +38,0 @@ path: path

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["x", "x0", "x1", "y", "y1", "y0", "yScale", "data", "defined", "className", "curve", "innerRef", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -11,20 +10,19 @@ import cx from 'classnames';

var x = _ref.x,
x0 = _ref.x0,
x1 = _ref.x1,
y = _ref.y,
y1 = _ref.y1,
y0 = _ref.y0,
yScale = _ref.yScale,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$defined = _ref.defined,
defined = _ref$defined === void 0 ? function () {
return true;
} : _ref$defined,
className = _ref.className,
curve = _ref.curve,
innerRef = _ref.innerRef,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["x", "x0", "x1", "y", "y1", "y0", "yScale", "data", "defined", "className", "curve", "innerRef", "children"]);
x0 = _ref.x0,
x1 = _ref.x1,
y = _ref.y,
y1 = _ref.y1,
y0 = _ref.y0,
yScale = _ref.yScale,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$defined = _ref.defined,
defined = _ref$defined === void 0 ? function () {
return true;
} : _ref$defined,
className = _ref.className,
curve = _ref.curve,
innerRef = _ref.innerRef,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var path = area({

@@ -37,3 +35,2 @@ x: x,

});
if (y0 == null) {

@@ -48,6 +45,4 @@ /**

}
if (y && !y1) setNumOrAccessor(path.y1, y);
if (y1 && !y) setNumOrAccessor(path.y1, y1); // eslint-disable-next-line react/jsx-no-useless-fragment
if (y1 && !y) setNumOrAccessor(path.y1, y1);
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children({

@@ -54,0 +49,0 @@ path: path

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "top", "left", "keys", "data", "curve", "defined", "x", "x0", "x1", "y0", "y1", "value", "order", "offset", "color", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -10,20 +9,19 @@ import cx from 'classnames';

var className = _ref.className,
top = _ref.top,
left = _ref.left,
keys = _ref.keys,
data = _ref.data,
curve = _ref.curve,
defined = _ref.defined,
x = _ref.x,
x0 = _ref.x0,
x1 = _ref.x1,
y0 = _ref.y0,
y1 = _ref.y1,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
color = _ref.color,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "top", "left", "keys", "data", "curve", "defined", "x", "x0", "x1", "y0", "y1", "value", "order", "offset", "color", "children"]);
top = _ref.top,
left = _ref.left,
keys = _ref.keys,
data = _ref.data,
curve = _ref.curve,
defined = _ref.defined,
x = _ref.x,
x0 = _ref.x0,
x1 = _ref.x1,
y0 = _ref.y0,
y1 = _ref.y1,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
color = _ref.color,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/React.createElement(Stack, _extends({

@@ -48,3 +46,3 @@ className: className,

var stacks = _ref2.stacks,
path = _ref2.path;
path = _ref2.path;
return stacks.map(function (series, i) {

@@ -51,0 +49,0 @@ return /*#__PURE__*/React.createElement("path", _extends({

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "innerRef"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -9,5 +8,4 @@ import cx from 'classnames';

var className = _ref.className,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "innerRef"]);
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/React.createElement("rect", _extends({

@@ -14,0 +12,0 @@ ref: innerRef,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["data", "className", "top", "left", "x0", "x0Scale", "x1Scale", "yScale", "color", "keys", "height", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -10,3 +9,2 @@ import cx from 'classnames';

import getBandwidth from '../util/getBandwidth';
/**

@@ -52,15 +50,14 @@ * Generates bar groups as an array of objects and renders `<rect />`s for each datum grouped by `key`. A general setup might look like this:

var data = _ref.data,
className = _ref.className,
top = _ref.top,
left = _ref.left,
x0 = _ref.x0,
x0Scale = _ref.x0Scale,
x1Scale = _ref.x1Scale,
yScale = _ref.yScale,
color = _ref.color,
keys = _ref.keys,
height = _ref.height,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["data", "className", "top", "left", "x0", "x0Scale", "x1Scale", "yScale", "color", "keys", "height", "children"]);
className = _ref.className,
top = _ref.top,
left = _ref.left,
x0 = _ref.x0,
x0Scale = _ref.x0Scale,
x1Scale = _ref.x1Scale,
yScale = _ref.yScale,
color = _ref.color,
keys = _ref.keys,
height = _ref.height,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var barWidth = getBandwidth(x1Scale);

@@ -85,4 +82,3 @@ var barGroups = data.map(function (group, i) {

};
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children(barGroups));

@@ -89,0 +85,0 @@ return /*#__PURE__*/React.createElement(Group, {

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["data", "className", "top", "left", "x", "y0", "y0Scale", "y1Scale", "xScale", "color", "keys", "width", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -12,22 +11,18 @@ import cx from 'classnames';

var data = _ref.data,
className = _ref.className,
top = _ref.top,
left = _ref.left,
_ref$x = _ref.x,
x = _ref$x === void 0 ? function () {
return (
/** val */
0
);
} : _ref$x,
y0 = _ref.y0,
y0Scale = _ref.y0Scale,
y1Scale = _ref.y1Scale,
xScale = _ref.xScale,
color = _ref.color,
keys = _ref.keys,
width = _ref.width,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["data", "className", "top", "left", "x", "y0", "y0Scale", "y1Scale", "xScale", "color", "keys", "width", "children"]);
className = _ref.className,
top = _ref.top,
left = _ref.left,
_ref$x = _ref.x,
x = _ref$x === void 0 ? function /** val */ () {
return 0;
} : _ref$x,
y0 = _ref.y0,
y0Scale = _ref.y0Scale,
y1Scale = _ref.y1Scale,
xScale = _ref.xScale,
color = _ref.color,
keys = _ref.keys,
width = _ref.width,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var barHeight = getBandwidth(y1Scale);

@@ -52,4 +47,3 @@ var barGroups = data.map(function (group, i) {

};
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children(barGroups));

@@ -56,0 +50,0 @@ return /*#__PURE__*/React.createElement(Group, {

@@ -1,43 +0,80 @@

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["children", "className", "innerRef", "x", "y", "width", "height", "radius", "all", "top", "bottom", "left", "right", "topLeft", "topRight", "bottomLeft", "bottomRight"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';
import cx from 'classnames';
export default function BarRounded(_ref) {
var className = _ref.className,
innerRef = _ref.innerRef,
x = _ref.x,
y = _ref.y,
width = _ref.width,
height = _ref.height,
radius = _ref.radius,
_ref$all = _ref.all,
all = _ref$all === void 0 ? false : _ref$all,
_ref$top = _ref.top,
top = _ref$top === void 0 ? false : _ref$top,
_ref$bottom = _ref.bottom,
bottom = _ref$bottom === void 0 ? false : _ref$bottom,
_ref$left = _ref.left,
left = _ref$left === void 0 ? false : _ref$left,
_ref$right = _ref.right,
right = _ref$right === void 0 ? false : _ref$right,
_ref$topLeft = _ref.topLeft,
topLeft = _ref$topLeft === void 0 ? false : _ref$topLeft,
_ref$topRight = _ref.topRight,
topRight = _ref$topRight === void 0 ? false : _ref$topRight,
_ref$bottomLeft = _ref.bottomLeft,
bottomLeft = _ref$bottomLeft === void 0 ? false : _ref$bottomLeft,
_ref$bottomRight = _ref.bottomRight,
bottomRight = _ref$bottomRight === void 0 ? false : _ref$bottomRight,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "innerRef", "x", "y", "width", "height", "radius", "all", "top", "bottom", "left", "right", "topLeft", "topRight", "bottomLeft", "bottomRight"]);
/** Hook that returns a BarRounded path. */
export function useBarRoundedPath(_ref) {
var all = _ref.all,
bottom = _ref.bottom,
bottomLeft = _ref.bottomLeft,
bottomRight = _ref.bottomRight,
height = _ref.height,
left = _ref.left,
radius = _ref.radius,
right = _ref.right,
top = _ref.top,
topLeft = _ref.topLeft,
topRight = _ref.topRight,
width = _ref.width,
x = _ref.x,
y = _ref.y;
topRight = all || top || right || topRight;
bottomRight = all || bottom || right || bottomRight;
bottomLeft = all || bottom || left || bottomLeft;
topLeft = all || top || left || topLeft; // clamp radius to center of shortest side of the rect
topLeft = all || top || left || topLeft;
radius = Math.min(radius, Math.min(width, height) / 2);
// clamp radius to center of shortest side of the rect
radius = Math.max(1, Math.min(radius, Math.min(width, height) / 2));
var diameter = 2 * radius;
var path = ("M" + (x + radius) + "," + y + " h" + (width - diameter) + "\n " + (topRight ? "a" + radius + "," + radius + " 0 0 1 " + radius + "," + radius : "h" + radius + "v" + radius) + "\n v" + (height - diameter) + "\n " + (bottomRight ? "a" + radius + "," + radius + " 0 0 1 " + -radius + "," + radius : "v" + radius + "h" + -radius) + "\n h" + (diameter - width) + "\n " + (bottomLeft ? "a" + radius + "," + radius + " 0 0 1 " + -radius + "," + -radius : "h" + -radius + "v" + -radius) + "\n v" + (diameter - height) + "\n " + (topLeft ? "a" + radius + "," + radius + " 0 0 1 " + radius + "," + -radius : "v" + -radius + "h" + radius) + "\nz").split('\n').join('');
return path;
}
export default function BarRounded(_ref2) {
var children = _ref2.children,
className = _ref2.className,
innerRef = _ref2.innerRef,
x = _ref2.x,
y = _ref2.y,
width = _ref2.width,
height = _ref2.height,
radius = _ref2.radius,
_ref2$all = _ref2.all,
all = _ref2$all === void 0 ? false : _ref2$all,
_ref2$top = _ref2.top,
top = _ref2$top === void 0 ? false : _ref2$top,
_ref2$bottom = _ref2.bottom,
bottom = _ref2$bottom === void 0 ? false : _ref2$bottom,
_ref2$left = _ref2.left,
left = _ref2$left === void 0 ? false : _ref2$left,
_ref2$right = _ref2.right,
right = _ref2$right === void 0 ? false : _ref2$right,
_ref2$topLeft = _ref2.topLeft,
topLeft = _ref2$topLeft === void 0 ? false : _ref2$topLeft,
_ref2$topRight = _ref2.topRight,
topRight = _ref2$topRight === void 0 ? false : _ref2$topRight,
_ref2$bottomLeft = _ref2.bottomLeft,
bottomLeft = _ref2$bottomLeft === void 0 ? false : _ref2$bottomLeft,
_ref2$bottomRight = _ref2.bottomRight,
bottomRight = _ref2$bottomRight === void 0 ? false : _ref2$bottomRight,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var path = useBarRoundedPath({
x: x,
y: y,
width: width,
height: height,
radius: radius,
all: all,
top: top,
bottom: bottom,
left: left,
right: right,
topLeft: topLeft,
topRight: topRight,
bottomLeft: bottomLeft,
bottomRight: bottomRight
});
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children({
path: path
}));
return /*#__PURE__*/React.createElement("path", _extends({

@@ -44,0 +81,0 @@ ref: innerRef,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["data", "className", "top", "left", "x", "y0", "y1", "xScale", "yScale", "color", "keys", "value", "order", "offset", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -17,20 +16,19 @@ import cx from 'classnames';

var data = _ref.data,
className = _ref.className,
top = _ref.top,
left = _ref.left,
x = _ref.x,
_ref$y = _ref.y0,
y0 = _ref$y === void 0 ? getFirstItem : _ref$y,
_ref$y2 = _ref.y1,
y1 = _ref$y2 === void 0 ? getSecondItem : _ref$y2,
xScale = _ref.xScale,
yScale = _ref.yScale,
color = _ref.color,
keys = _ref.keys,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["data", "className", "top", "left", "x", "y0", "y1", "xScale", "yScale", "color", "keys", "value", "order", "offset", "children"]);
className = _ref.className,
top = _ref.top,
left = _ref.left,
x = _ref.x,
_ref$y = _ref.y0,
y0 = _ref$y === void 0 ? getFirstItem : _ref$y,
_ref$y2 = _ref.y1,
y1 = _ref$y2 === void 0 ? getSecondItem : _ref$y2,
xScale = _ref.xScale,
yScale = _ref.yScale,
color = _ref.color,
keys = _ref.keys,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var stack = d3stack();

@@ -64,4 +62,3 @@ if (keys) stack.keys(keys);

};
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children(barStacks));

@@ -68,0 +65,0 @@ return /*#__PURE__*/React.createElement(Group, {

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["data", "className", "top", "left", "y", "x0", "x1", "xScale", "yScale", "color", "keys", "value", "order", "offset", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -17,20 +16,19 @@ import cx from 'classnames';

var data = _ref.data,
className = _ref.className,
top = _ref.top,
left = _ref.left,
y = _ref.y,
_ref$x = _ref.x0,
x0 = _ref$x === void 0 ? getFirstItem : _ref$x,
_ref$x2 = _ref.x1,
x1 = _ref$x2 === void 0 ? getSecondItem : _ref$x2,
xScale = _ref.xScale,
yScale = _ref.yScale,
color = _ref.color,
keys = _ref.keys,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["data", "className", "top", "left", "y", "x0", "x1", "xScale", "yScale", "color", "keys", "value", "order", "offset", "children"]);
className = _ref.className,
top = _ref.top,
left = _ref.left,
y = _ref.y,
_ref$x = _ref.x0,
x0 = _ref$x === void 0 ? getFirstItem : _ref$x,
_ref$x2 = _ref.x1,
x1 = _ref$x2 === void 0 ? getSecondItem : _ref$x2,
xScale = _ref.xScale,
yScale = _ref.yScale,
color = _ref.color,
keys = _ref.keys,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var stack = d3stack();

@@ -64,4 +62,3 @@ if (keys) stack.keys(keys);

};
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children(barStacks));

@@ -68,0 +65,0 @@ return /*#__PURE__*/React.createElement(Group, {

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "innerRef"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -9,5 +8,4 @@ import cx from 'classnames';

var className = _ref.className,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "innerRef"]);
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/React.createElement("circle", _extends({

@@ -14,0 +12,0 @@ ref: innerRef,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["from", "to", "fill", "className", "innerRef"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -9,17 +8,16 @@ import cx from 'classnames';

var _ref$from = _ref.from,
from = _ref$from === void 0 ? {
x: 0,
y: 0
} : _ref$from,
_ref$to = _ref.to,
to = _ref$to === void 0 ? {
x: 1,
y: 1
} : _ref$to,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill,
className = _ref.className,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, ["from", "to", "fill", "className", "innerRef"]);
from = _ref$from === void 0 ? {
x: 0,
y: 0
} : _ref$from,
_ref$to = _ref.to,
to = _ref$to === void 0 ? {
x: 1,
y: 1
} : _ref$to,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill,
className = _ref.className,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var isRectilinear = from.x === to.x || from.y === to.y;

@@ -26,0 +24,0 @@ return /*#__PURE__*/React.createElement("line", _extends({

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["children", "data", "x", "y", "fill", "className", "curve", "innerRef", "defined"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -10,17 +9,16 @@ import cx from 'classnames';

var children = _ref.children,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
x = _ref.x,
y = _ref.y,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill,
className = _ref.className,
curve = _ref.curve,
innerRef = _ref.innerRef,
_ref$defined = _ref.defined,
defined = _ref$defined === void 0 ? function () {
return true;
} : _ref$defined,
restProps = _objectWithoutPropertiesLoose(_ref, ["children", "data", "x", "y", "fill", "className", "curve", "innerRef", "defined"]);
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
x = _ref.x,
y = _ref.y,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill,
className = _ref.className,
curve = _ref.curve,
innerRef = _ref.innerRef,
_ref$defined = _ref.defined,
defined = _ref$defined === void 0 ? function () {
return true;
} : _ref$defined,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var path = line({

@@ -31,4 +29,3 @@ x: x,

curve: curve
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children({

@@ -41,3 +38,4 @@ path: path

d: path(data) || '',
fill: fill // without this a datum surrounded by nulls will not be visible
fill: fill
// without this a datum surrounded by nulls will not be visible
// https://github.com/d3/d3-shape#line_defined

@@ -44,0 +42,0 @@ ,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "angle", "radius", "defined", "curve", "data", "innerRef", "children", "fill"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -10,14 +9,13 @@ import cx from 'classnames';

var className = _ref.className,
angle = _ref.angle,
radius = _ref.radius,
defined = _ref.defined,
curve = _ref.curve,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
innerRef = _ref.innerRef,
children = _ref.children,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "angle", "radius", "defined", "curve", "data", "innerRef", "children", "fill"]);
angle = _ref.angle,
radius = _ref.radius,
defined = _ref.defined,
curve = _ref.curve,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
innerRef = _ref.innerRef,
children = _ref.children,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var path = radialLine({

@@ -28,4 +26,3 @@ angle: angle,

curve: curve
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children({

@@ -32,0 +29,0 @@ path: path

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "children", "data", "innerRef", "path", "percent", "x", "y", "source", "target"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -11,6 +10,6 @@ import cx from 'classnames';

var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
return function (link) {

@@ -35,18 +34,17 @@ var sourceData = source(link);

var className = _ref2.className,
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.2 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "children", "data", "innerRef", "path", "percent", "x", "y", "source", "target"]);
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.2 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathHorizontalCurve({

@@ -53,0 +51,0 @@ source: source,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "children", "data", "innerRef", "path", "percent", "x", "y", "source", "target"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -11,6 +10,6 @@ import cx from 'classnames';

var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
return function (link) {

@@ -43,18 +42,17 @@ var sourceData = source(link);

var className = _ref2.className,
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.2 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "children", "data", "innerRef", "path", "percent", "x", "y", "source", "target"]);
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.2 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathRadialCurve({

@@ -61,0 +59,0 @@ source: source,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "children", "data", "innerRef", "path", "percent", "x", "y", "source", "target"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -11,6 +10,6 @@ import cx from 'classnames';

var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
return function (link) {

@@ -35,18 +34,17 @@ var sourceData = source(link);

var className = _ref2.className,
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.2 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "children", "data", "innerRef", "path", "percent", "x", "y", "source", "target"]);
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.2 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathVerticalCurve({

@@ -53,0 +51,0 @@ source: source,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "children", "data", "innerRef", "path", "x", "y", "source", "target"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -11,5 +10,5 @@ import cx from 'classnames';

var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y;
target = _ref.target,
x = _ref.x,
y = _ref.y;
return function (data) {

@@ -26,16 +25,15 @@ var link = linkHorizontal();

var className = _ref2.className,
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "children", "data", "innerRef", "path", "x", "y", "source", "target"]);
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathHorizontalDiagonal({

@@ -42,0 +40,0 @@ source: source,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "children", "data", "innerRef", "path", "angle", "radius", "source", "target"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -11,5 +10,5 @@ import cx from 'classnames';

var source = _ref.source,
target = _ref.target,
angle = _ref.angle,
radius = _ref.radius;
target = _ref.target,
angle = _ref.angle,
radius = _ref.radius;
return function (data) {

@@ -26,16 +25,15 @@ var link = linkRadial();

var className = _ref2.className,
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$angle = _ref2.angle,
angle = _ref2$angle === void 0 ? getX : _ref2$angle,
_ref2$radius = _ref2.radius,
radius = _ref2$radius === void 0 ? getY : _ref2$radius,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "children", "data", "innerRef", "path", "angle", "radius", "source", "target"]);
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$angle = _ref2.angle,
angle = _ref2$angle === void 0 ? getX : _ref2$angle,
_ref2$radius = _ref2.radius,
radius = _ref2$radius === void 0 ? getY : _ref2$radius,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathRadialDiagonal({

@@ -42,0 +40,0 @@ source: source,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "children", "data", "innerRef", "path", "x", "y", "source", "target"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -11,5 +10,5 @@ import cx from 'classnames';

var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y;
target = _ref.target,
x = _ref.x,
y = _ref.y;
return function (data) {

@@ -26,16 +25,15 @@ var link = linkVertical();

var className = _ref2.className,
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "children", "data", "innerRef", "path", "x", "y", "source", "target"]);
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathVerticalDiagonal({

@@ -42,0 +40,0 @@ source: source,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "children", "innerRef", "data", "path", "x", "y", "source", "target"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -11,5 +10,5 @@ import cx from 'classnames';

var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y;
target = _ref.target,
x = _ref.x,
y = _ref.y;
return function (data) {

@@ -30,16 +29,15 @@ var sourceData = source(data);

var className = _ref2.className,
children = _ref2.children,
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "children", "innerRef", "data", "path", "x", "y", "source", "target"]);
children = _ref2.children,
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathHorizontalLine({

@@ -46,0 +44,0 @@ source: source,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "innerRef", "data", "path", "x", "y", "source", "target", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -11,5 +10,5 @@ import cx from 'classnames';

var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y;
target = _ref.target,
x = _ref.x,
y = _ref.y;
return function (data) {

@@ -34,16 +33,15 @@ var sourceData = source(data);

var className = _ref2.className,
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "innerRef", "data", "path", "x", "y", "source", "target", "children"]);
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathRadialLine({

@@ -50,0 +48,0 @@ source: source,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "innerRef", "data", "path", "x", "y", "source", "target", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -11,5 +10,5 @@ import cx from 'classnames';

var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y;
target = _ref.target,
x = _ref.x,
y = _ref.y;
return function (data) {

@@ -30,16 +29,15 @@ var sourceData = source(data);

var className = _ref2.className,
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "innerRef", "data", "path", "x", "y", "source", "target", "children"]);
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathVerticalLine({

@@ -46,0 +44,0 @@ source: source,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "innerRef", "data", "path", "percent", "x", "y", "source", "target", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -11,6 +10,6 @@ import cx from 'classnames';

var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
return function (link) {

@@ -33,18 +32,17 @@ var sourceData = source(link);

var className = _ref2.className,
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.5 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "innerRef", "data", "path", "percent", "x", "y", "source", "target", "children"]);
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.5 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathHorizontalStep({

@@ -51,0 +49,0 @@ source: source,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "innerRef", "data", "path", "x", "y", "source", "target", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -10,5 +9,5 @@ import cx from 'classnames';

var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y;
target = _ref.target,
x = _ref.x,
y = _ref.y;
return function (link) {

@@ -35,16 +34,15 @@ var sourceData = source(link);

var className = _ref2.className,
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "innerRef", "data", "path", "x", "y", "source", "target", "children"]);
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathRadialStep({

@@ -51,0 +49,0 @@ source: source,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "innerRef", "data", "path", "percent", "x", "y", "source", "target", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -11,6 +10,6 @@ import cx from 'classnames';

var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
return function (link) {

@@ -33,18 +32,17 @@ var sourceData = source(link);

var className = _ref2.className,
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.5 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "innerRef", "data", "path", "percent", "x", "y", "source", "target", "children"]);
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.5 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathVerticalStep({

@@ -51,0 +49,0 @@ source: source,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "top", "left", "data", "centroid", "innerRadius", "outerRadius", "cornerRadius", "startAngle", "endAngle", "padAngle", "padRadius", "pieSort", "pieSortValues", "pieValue", "children", "fill"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -11,23 +10,22 @@ import cx from 'classnames';

var className = _ref.className,
top = _ref.top,
left = _ref.left,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
centroid = _ref.centroid,
_ref$innerRadius = _ref.innerRadius,
innerRadius = _ref$innerRadius === void 0 ? 0 : _ref$innerRadius,
outerRadius = _ref.outerRadius,
cornerRadius = _ref.cornerRadius,
startAngle = _ref.startAngle,
endAngle = _ref.endAngle,
padAngle = _ref.padAngle,
padRadius = _ref.padRadius,
pieSort = _ref.pieSort,
pieSortValues = _ref.pieSortValues,
pieValue = _ref.pieValue,
children = _ref.children,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? '' : _ref$fill,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "top", "left", "data", "centroid", "innerRadius", "outerRadius", "cornerRadius", "startAngle", "endAngle", "padAngle", "padRadius", "pieSort", "pieSortValues", "pieValue", "children", "fill"]);
top = _ref.top,
left = _ref.left,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
centroid = _ref.centroid,
_ref$innerRadius = _ref.innerRadius,
innerRadius = _ref$innerRadius === void 0 ? 0 : _ref$innerRadius,
outerRadius = _ref.outerRadius,
cornerRadius = _ref.cornerRadius,
startAngle = _ref.startAngle,
endAngle = _ref.endAngle,
padAngle = _ref.padAngle,
padRadius = _ref.padRadius,
pieSort = _ref.pieSort,
pieSortValues = _ref.pieSortValues,
pieValue = _ref.pieValue,
children = _ref.children,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? '' : _ref$fill,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var path = arcPath({

@@ -47,4 +45,3 @@ innerRadius: innerRadius,

});
var arcs = pie(data); // eslint-disable-next-line react/jsx-no-useless-fragment
var arcs = pie(data);
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children({

@@ -51,0 +48,0 @@ arcs: arcs,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["sides", "size", "center", "rotate", "className", "children", "innerRef", "points"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -14,10 +13,10 @@ import cx from 'classnames';

var _ref$sides = _ref.sides,
sides = _ref$sides === void 0 ? 4 : _ref$sides,
_ref$size = _ref.size,
size = _ref$size === void 0 ? 25 : _ref$size,
_ref$center = _ref.center,
center = _ref$center === void 0 ? DEFAULT_CENTER : _ref$center,
_ref$rotate = _ref.rotate,
rotate = _ref$rotate === void 0 ? 0 : _ref$rotate,
side = _ref.side;
sides = _ref$sides === void 0 ? 4 : _ref$sides,
_ref$size = _ref.size,
size = _ref$size === void 0 ? 25 : _ref$size,
_ref$center = _ref.center,
center = _ref$center === void 0 ? DEFAULT_CENTER : _ref$center,
_ref$rotate = _ref.rotate,
rotate = _ref$rotate === void 0 ? 0 : _ref$rotate,
side = _ref.side;
var degrees = 360 / sides * side - rotate;

@@ -32,5 +31,5 @@ var radians = degreesToRadians(degrees);

var sides = _ref2.sides,
size = _ref2.size,
center = _ref2.center,
rotate = _ref2.rotate;
size = _ref2.size,
center = _ref2.center,
rotate = _ref2.rotate;
return new Array(sides).fill(0).map(function (_, side) {

@@ -48,15 +47,14 @@ return getPoint({

var _ref3$sides = _ref3.sides,
sides = _ref3$sides === void 0 ? 4 : _ref3$sides,
_ref3$size = _ref3.size,
size = _ref3$size === void 0 ? 25 : _ref3$size,
_ref3$center = _ref3.center,
center = _ref3$center === void 0 ? DEFAULT_CENTER : _ref3$center,
_ref3$rotate = _ref3.rotate,
rotate = _ref3$rotate === void 0 ? 0 : _ref3$rotate,
className = _ref3.className,
children = _ref3.children,
innerRef = _ref3.innerRef,
points = _ref3.points,
restProps = _objectWithoutPropertiesLoose(_ref3, ["sides", "size", "center", "rotate", "className", "children", "innerRef", "points"]);
sides = _ref3$sides === void 0 ? 4 : _ref3$sides,
_ref3$size = _ref3.size,
size = _ref3$size === void 0 ? 25 : _ref3$size,
_ref3$center = _ref3.center,
center = _ref3$center === void 0 ? DEFAULT_CENTER : _ref3$center,
_ref3$rotate = _ref3.rotate,
rotate = _ref3$rotate === void 0 ? 0 : _ref3$rotate,
className = _ref3.className,
children = _ref3.children,
innerRef = _ref3.innerRef,
points = _ref3.points,
restProps = _objectWithoutPropertiesLoose(_ref3, _excluded);
var pointsToRender = points || getPoints({

@@ -69,6 +67,5 @@ sides: sides,

var x = _ref4.x,
y = _ref4.y;
y = _ref4.y;
return [x, y];
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children({

@@ -75,0 +72,0 @@ points: pointsToRender

import _pt from "prop-types";
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import React, { useMemo } from 'react';

@@ -9,22 +7,19 @@ import getSplitLineSegments from '../util/getSplitLineSegments';

import LinePath from './LinePath';
var getX = function getX(d) {
return d.x || 0;
};
var getY = function getY(d) {
return d.y || 0;
};
export default function SplitLinePath(_ref) {
var children = _ref.children,
className = _ref.className,
curve = _ref.curve,
defined = _ref.defined,
segmentation = _ref.segmentation,
sampleRate = _ref.sampleRate,
segments = _ref.segments,
x = _ref.x,
y = _ref.y,
styles = _ref.styles;
className = _ref.className,
curve = _ref.curve,
defined = _ref.defined,
segmentation = _ref.segmentation,
sampleRate = _ref.sampleRate,
segments = _ref.segments,
x = _ref.x,
y = _ref.y,
styles = _ref.styles;
// Convert data in all segments to points.

@@ -65,7 +60,9 @@ var pointsInSegments = useMemo(function () {

return /*#__PURE__*/React.createElement("g", null, splitLineSegments.map(function (segment, index) {
return children ? children({
return children ? /*#__PURE__*/React.createElement(React.Fragment, {
key: index
}, children({
index: index,
segment: segment,
styles: styles[index] || styles[index % styles.length]
}) : /*#__PURE__*/React.createElement(LinePath, _extends({
})) : /*#__PURE__*/React.createElement(LinePath, _extends({
key: index,

@@ -72,0 +69,0 @@ className: className,

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

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["className", "top", "left", "keys", "data", "curve", "defined", "x", "x0", "x1", "y0", "y1", "value", "order", "offset", "color", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -11,20 +10,19 @@ import cx from 'classnames';

var className = _ref.className,
top = _ref.top,
left = _ref.left,
keys = _ref.keys,
data = _ref.data,
curve = _ref.curve,
defined = _ref.defined,
x = _ref.x,
x0 = _ref.x0,
x1 = _ref.x1,
y0 = _ref.y0,
y1 = _ref.y1,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
color = _ref.color,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "top", "left", "keys", "data", "curve", "defined", "x", "x0", "x1", "y0", "y1", "value", "order", "offset", "color", "children"]);
top = _ref.top,
left = _ref.left,
keys = _ref.keys,
data = _ref.data,
curve = _ref.curve,
defined = _ref.defined,
x = _ref.x,
x0 = _ref.x0,
x1 = _ref.x1,
y0 = _ref.y0,
y1 = _ref.y1,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
color = _ref.color,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var stack = stackPath({

@@ -45,4 +43,3 @@ keys: keys,

});
var stacks = stack(data); // eslint-disable-next-line react/jsx-no-useless-fragment
var stacks = stack(data);
if (children) return /*#__PURE__*/React.createElement(React.Fragment, null, children({

@@ -49,0 +46,0 @@ stacks: stacks,

@@ -7,10 +7,9 @@ import { arc as d3Arc, area as d3Area, line as d3Line, pie as d3Pie, radialLine as d3RadialLine, stack as d3Stack } from 'd3-shape';

var _ref = _temp === void 0 ? {} : _temp,
innerRadius = _ref.innerRadius,
outerRadius = _ref.outerRadius,
cornerRadius = _ref.cornerRadius,
startAngle = _ref.startAngle,
endAngle = _ref.endAngle,
padAngle = _ref.padAngle,
padRadius = _ref.padRadius;
innerRadius = _ref.innerRadius,
outerRadius = _ref.outerRadius,
cornerRadius = _ref.cornerRadius,
startAngle = _ref.startAngle,
endAngle = _ref.endAngle,
padAngle = _ref.padAngle,
padRadius = _ref.padRadius;
var path = d3Arc();

@@ -28,11 +27,10 @@ if (innerRadius != null) setNumberOrNumberAccessor(path.innerRadius, innerRadius);

var _ref2 = _temp2 === void 0 ? {} : _temp2,
x = _ref2.x,
x0 = _ref2.x0,
x1 = _ref2.x1,
y = _ref2.y,
y0 = _ref2.y0,
y1 = _ref2.y1,
defined = _ref2.defined,
curve = _ref2.curve;
x = _ref2.x,
x0 = _ref2.x0,
x1 = _ref2.x1,
y = _ref2.y,
y0 = _ref2.y0,
y1 = _ref2.y1,
defined = _ref2.defined,
curve = _ref2.curve;
var path = d3Area();

@@ -51,7 +49,6 @@ if (x) setNumberOrNumberAccessor(path.x, x);

var _ref3 = _temp3 === void 0 ? {} : _temp3,
x = _ref3.x,
y = _ref3.y,
defined = _ref3.defined,
curve = _ref3.curve;
x = _ref3.x,
y = _ref3.y,
defined = _ref3.defined,
curve = _ref3.curve;
var path = d3Line();

@@ -66,11 +63,11 @@ if (x) setNumberOrNumberAccessor(path.x, x);

var _ref4 = _temp4 === void 0 ? {} : _temp4,
startAngle = _ref4.startAngle,
endAngle = _ref4.endAngle,
padAngle = _ref4.padAngle,
value = _ref4.value,
sort = _ref4.sort,
sortValues = _ref4.sortValues;
startAngle = _ref4.startAngle,
endAngle = _ref4.endAngle,
padAngle = _ref4.padAngle,
value = _ref4.value,
sort = _ref4.sort,
sortValues = _ref4.sortValues;
var path = d3Pie();
var path = d3Pie(); // ts can't distinguish between these method overloads
// ts can't distinguish between these method overloads
if (sort === null) path.sort(sort);else if (sort != null) path.sort(sort);

@@ -86,7 +83,6 @@ if (sortValues === null) path.sortValues(sortValues);else if (sortValues != null) path.sortValues(sortValues);

var _ref5 = _temp5 === void 0 ? {} : _temp5,
angle = _ref5.angle,
radius = _ref5.radius,
defined = _ref5.defined,
curve = _ref5.curve;
angle = _ref5.angle,
radius = _ref5.radius,
defined = _ref5.defined,
curve = _ref5.curve;
var path = d3RadialLine();

@@ -101,5 +97,5 @@ if (angle) setNumberOrNumberAccessor(path.angle, angle);

var keys = _ref6.keys,
value = _ref6.value,
order = _ref6.order,
offset = _ref6.offset;
value = _ref6.value,
order = _ref6.order,
offset = _ref6.offset;
var path = d3Stack();

@@ -106,0 +102,0 @@ if (keys) path.keys(keys);

@@ -5,3 +5,2 @@ export default function getBandwidth(scale) {

}
var range = scale.range();

@@ -8,0 +7,0 @@ var domain = scale.domain();

var SVG_NAMESPACE_URL = 'http://www.w3.org/2000/svg';
export default function getOrCreateMeasurementElement(elementId) {
var pathElement = document.getElementById(elementId); // create a single path element if not done already
var pathElement = document.getElementById(elementId);
// create a single path element if not done already
if (!pathElement) {
var svg = document.createElementNS(SVG_NAMESPACE_URL, 'svg'); // not visible
var svg = document.createElementNS(SVG_NAMESPACE_URL, 'svg');
// not visible
svg.setAttribute('aria-hidden', 'true');
svg.style.opacity = '0';
svg.style.width = '0';
svg.style.height = '0'; // off screen
svg.style.height = '0';
// off screen
svg.style.position = 'absolute';
svg.style.top = '-100%';
svg.style.left = '-100%'; // no mouse events
svg.style.left = '-100%';
// no mouse events
svg.style.pointerEvents = 'none';

@@ -22,4 +25,3 @@ pathElement = document.createElementNS(SVG_NAMESPACE_URL, 'path');

}
return pathElement;
}
import getOrCreateMeasurementElement from './getOrCreateMeasurementElement';
var MEASUREMENT_ELEMENT_ID = '__visx_splitpath_svg_path_measurement_id';
var TRUE = function TRUE() {
return true;
};
export default function getSplitLineSegments(_ref) {
var path = _ref.path,
pointsInSegments = _ref.pointsInSegments,
_ref$segmentation = _ref.segmentation,
segmentation = _ref$segmentation === void 0 ? 'x' : _ref$segmentation,
_ref$sampleRate = _ref.sampleRate,
sampleRate = _ref$sampleRate === void 0 ? 1 : _ref$sampleRate;
pointsInSegments = _ref.pointsInSegments,
_ref$segmentation = _ref.segmentation,
segmentation = _ref$segmentation === void 0 ? 'x' : _ref$segmentation,
_ref$sampleRate = _ref.sampleRate,
sampleRate = _ref$sampleRate === void 0 ? 1 : _ref$sampleRate;
try {

@@ -24,7 +21,5 @@ var pathElement = getOrCreateMeasurementElement(MEASUREMENT_ELEMENT_ID);

});
if (segmentation === 'x' || segmentation === 'y') {
var segmentStarts = pointsInSegments.map(function (points) {
var _points$find;
return (_points$find = points.find(function (p) {

@@ -47,12 +42,10 @@ return typeof p[segmentation] === 'number';

var currentSegment = 0;
for (var distance = 0; distance <= totalLength; distance += sampleRate) {
var sample = pathElement.getPointAtLength(distance);
var position = sample[segmentation]; // find the current segment to which this sample belongs
var position = sample[segmentation];
// find the current segment to which this sample belongs
while (currentSegment < numSegments - 1 && isBeyondSegmentStart[currentSegment + 1](position)) {
currentSegment += 1;
} // add sample to segment
}
// add sample to segment
lineSegments[currentSegment].push(sample);

@@ -69,30 +62,21 @@ }

var lengthBetweenPoints = totalLength / Math.max(1, numPoints - 1);
var _segmentStarts = numPointsInSegment.slice(0, numSegments - 1);
_segmentStarts.unshift(0);
for (var i = 2; i < numSegments; i += 1) {
_segmentStarts[i] += _segmentStarts[i - 1];
}
for (var _i = 0; _i < numSegments; _i += 1) {
_segmentStarts[_i] *= lengthBetweenPoints;
}
var _currentSegment = 0;
for (var _distance = 0; _distance <= totalLength; _distance += sampleRate) {
var _sample = pathElement.getPointAtLength(_distance); // find the current segment to which this sample belongs
var _sample = pathElement.getPointAtLength(_distance);
// find the current segment to which this sample belongs
while (_currentSegment < numSegments - 1 && _distance >= _segmentStarts[_currentSegment + 1]) {
_currentSegment += 1;
} // add sample to segment
}
// add sample to segment
lineSegments[_currentSegment].push(_sample);
}
}
return lineSegments;

@@ -99,0 +83,0 @@ } catch (e) {

@@ -57,174 +57,103 @@ "use strict";

};
exports.getPoint = exports.getPoints = exports.pathRadialStep = exports.pathVerticalStep = exports.pathHorizontalStep = exports.pathRadialLine = exports.pathVerticalLine = exports.pathHorizontalLine = exports.pathRadialCurve = exports.pathVerticalCurve = exports.pathHorizontalCurve = exports.pathRadialDiagonal = exports.pathVerticalDiagonal = exports.pathHorizontalDiagonal = exports.degreesToRadians = exports.STACK_ORDER_NAMES = exports.STACK_ORDERS = exports.STACK_OFFSET_NAMES = exports.STACK_OFFSETS = exports.SplitLinePath = exports.Circle = exports.Polygon = exports.LinkRadialStep = exports.LinkVerticalStep = exports.LinkHorizontalStep = exports.LinkRadialLine = exports.LinkVerticalLine = exports.LinkHorizontalLine = exports.LinkRadialCurve = exports.LinkVerticalCurve = exports.LinkHorizontalCurve = exports.LinkRadial = exports.LinkVertical = exports.LinkHorizontal = exports.stackOrder = exports.stackOffset = exports.Stack = exports.BarStackHorizontal = exports.BarStack = exports.BarGroupHorizontal = exports.BarGroup = exports.BarRounded = exports.Bar = exports.AreaStack = exports.AreaClosed = exports.Area = exports.LineRadial = exports.LinePath = exports.Line = exports.Pie = exports.Arc = void 0;
exports.stackOrder = exports.stackOffset = exports.pathVerticalStep = exports.pathVerticalLine = exports.pathVerticalDiagonal = exports.pathVerticalCurve = exports.pathRadialStep = exports.pathRadialLine = exports.pathRadialDiagonal = exports.pathRadialCurve = exports.pathHorizontalStep = exports.pathHorizontalLine = exports.pathHorizontalDiagonal = exports.pathHorizontalCurve = exports.getPoints = exports.getPoint = exports.degreesToRadians = exports.Stack = exports.SplitLinePath = exports.STACK_ORDER_NAMES = exports.STACK_ORDERS = exports.STACK_OFFSET_NAMES = exports.STACK_OFFSETS = exports.Polygon = exports.Pie = exports.LinkVerticalStep = exports.LinkVerticalLine = exports.LinkVerticalCurve = exports.LinkVertical = exports.LinkRadialStep = exports.LinkRadialLine = exports.LinkRadialCurve = exports.LinkRadial = exports.LinkHorizontalStep = exports.LinkHorizontalLine = exports.LinkHorizontalCurve = exports.LinkHorizontal = exports.LineRadial = exports.LinePath = exports.Line = exports.Circle = exports.BarStackHorizontal = exports.BarStack = exports.BarRounded = exports.BarGroupHorizontal = exports.BarGroup = exports.Bar = exports.AreaStack = exports.AreaClosed = exports.Area = exports.Arc = void 0;
var _Arc = _interopRequireDefault(require("./shapes/Arc"));
exports.Arc = _Arc.default;
var _Pie = _interopRequireDefault(require("./shapes/Pie"));
exports.Pie = _Pie.default;
var _Line = _interopRequireDefault(require("./shapes/Line"));
exports.Line = _Line.default;
var _LinePath = _interopRequireDefault(require("./shapes/LinePath"));
exports.LinePath = _LinePath.default;
var _LineRadial = _interopRequireDefault(require("./shapes/LineRadial"));
exports.LineRadial = _LineRadial.default;
var _Area = _interopRequireDefault(require("./shapes/Area"));
exports.Area = _Area.default;
var _AreaClosed = _interopRequireDefault(require("./shapes/AreaClosed"));
exports.AreaClosed = _AreaClosed.default;
var _AreaStack = _interopRequireDefault(require("./shapes/AreaStack"));
exports.AreaStack = _AreaStack.default;
var _Bar = _interopRequireDefault(require("./shapes/Bar"));
exports.Bar = _Bar.default;
var _BarRounded = _interopRequireDefault(require("./shapes/BarRounded"));
exports.BarRounded = _BarRounded.default;
var _BarGroup = _interopRequireDefault(require("./shapes/BarGroup"));
exports.BarGroup = _BarGroup.default;
var _BarGroupHorizontal = _interopRequireDefault(require("./shapes/BarGroupHorizontal"));
exports.BarGroupHorizontal = _BarGroupHorizontal.default;
var _BarStack = _interopRequireDefault(require("./shapes/BarStack"));
exports.BarStack = _BarStack.default;
var _BarStackHorizontal = _interopRequireDefault(require("./shapes/BarStackHorizontal"));
exports.BarStackHorizontal = _BarStackHorizontal.default;
var _Stack = _interopRequireDefault(require("./shapes/Stack"));
exports.Stack = _Stack.default;
var _stackOffset = _interopRequireWildcard(require("./util/stackOffset"));
exports.stackOffset = _stackOffset.default;
exports.STACK_OFFSETS = _stackOffset.STACK_OFFSETS;
exports.STACK_OFFSET_NAMES = _stackOffset.STACK_OFFSET_NAMES;
var _stackOrder = _interopRequireWildcard(require("./util/stackOrder"));
exports.stackOrder = _stackOrder.default;
exports.STACK_ORDERS = _stackOrder.STACK_ORDERS;
exports.STACK_ORDER_NAMES = _stackOrder.STACK_ORDER_NAMES;
var _trigonometry = require("./util/trigonometry");
exports.degreesToRadians = _trigonometry.degreesToRadians;
var _LinkHorizontal = _interopRequireWildcard(require("./shapes/link/diagonal/LinkHorizontal"));
exports.LinkHorizontal = _LinkHorizontal.default;
exports.pathHorizontalDiagonal = _LinkHorizontal.pathHorizontalDiagonal;
var _LinkVertical = _interopRequireWildcard(require("./shapes/link/diagonal/LinkVertical"));
exports.LinkVertical = _LinkVertical.default;
exports.pathVerticalDiagonal = _LinkVertical.pathVerticalDiagonal;
var _LinkRadial = _interopRequireWildcard(require("./shapes/link/diagonal/LinkRadial"));
exports.LinkRadial = _LinkRadial.default;
exports.pathRadialDiagonal = _LinkRadial.pathRadialDiagonal;
var _LinkHorizontalCurve = _interopRequireWildcard(require("./shapes/link/curve/LinkHorizontalCurve"));
exports.LinkHorizontalCurve = _LinkHorizontalCurve.default;
exports.pathHorizontalCurve = _LinkHorizontalCurve.pathHorizontalCurve;
var _LinkVerticalCurve = _interopRequireWildcard(require("./shapes/link/curve/LinkVerticalCurve"));
exports.LinkVerticalCurve = _LinkVerticalCurve.default;
exports.pathVerticalCurve = _LinkVerticalCurve.pathVerticalCurve;
var _LinkRadialCurve = _interopRequireWildcard(require("./shapes/link/curve/LinkRadialCurve"));
exports.LinkRadialCurve = _LinkRadialCurve.default;
exports.pathRadialCurve = _LinkRadialCurve.pathRadialCurve;
var _LinkHorizontalLine = _interopRequireWildcard(require("./shapes/link/line/LinkHorizontalLine"));
exports.LinkHorizontalLine = _LinkHorizontalLine.default;
exports.pathHorizontalLine = _LinkHorizontalLine.pathHorizontalLine;
var _LinkVerticalLine = _interopRequireWildcard(require("./shapes/link/line/LinkVerticalLine"));
exports.LinkVerticalLine = _LinkVerticalLine.default;
exports.pathVerticalLine = _LinkVerticalLine.pathVerticalLine;
var _LinkRadialLine = _interopRequireWildcard(require("./shapes/link/line/LinkRadialLine"));
exports.LinkRadialLine = _LinkRadialLine.default;
exports.pathRadialLine = _LinkRadialLine.pathRadialLine;
var _LinkHorizontalStep = _interopRequireWildcard(require("./shapes/link/step/LinkHorizontalStep"));
exports.LinkHorizontalStep = _LinkHorizontalStep.default;
exports.pathHorizontalStep = _LinkHorizontalStep.pathHorizontalStep;
var _LinkVerticalStep = _interopRequireWildcard(require("./shapes/link/step/LinkVerticalStep"));
exports.LinkVerticalStep = _LinkVerticalStep.default;
exports.pathVerticalStep = _LinkVerticalStep.pathVerticalStep;
var _LinkRadialStep = _interopRequireWildcard(require("./shapes/link/step/LinkRadialStep"));
exports.LinkRadialStep = _LinkRadialStep.default;
exports.pathRadialStep = _LinkRadialStep.pathRadialStep;
var _Polygon = _interopRequireWildcard(require("./shapes/Polygon"));
exports.Polygon = _Polygon.default;
exports.getPoints = _Polygon.getPoints;
exports.getPoint = _Polygon.getPoint;
var _Circle = _interopRequireDefault(require("./shapes/Circle"));
exports.Circle = _Circle.default;
var _SplitLinePath = _interopRequireDefault(require("./shapes/SplitLinePath"));
exports.SplitLinePath = _SplitLinePath.default;
var _D3ShapeConfig = require("./types/D3ShapeConfig");
Object.keys(_D3ShapeConfig).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _D3ShapeConfig[key]) return;
exports[key] = _D3ShapeConfig[key];
});
var _D3ShapeFactories = require("./util/D3ShapeFactories");
Object.keys(_D3ShapeFactories).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _D3ShapeFactories[key]) return;
exports[key] = _D3ShapeFactories[key];
});
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -5,29 +5,22 @@ "use strict";

exports.default = Arc;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _D3ShapeFactories = require("../util/D3ShapeFactories");
var _excluded = ["className", "data", "innerRadius", "outerRadius", "cornerRadius", "startAngle", "endAngle", "padAngle", "padRadius", "children", "innerRef"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function Arc(_ref) {
var className = _ref.className,
data = _ref.data,
innerRadius = _ref.innerRadius,
outerRadius = _ref.outerRadius,
cornerRadius = _ref.cornerRadius,
startAngle = _ref.startAngle,
endAngle = _ref.endAngle,
padAngle = _ref.padAngle,
padRadius = _ref.padRadius,
children = _ref.children,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "data", "innerRadius", "outerRadius", "cornerRadius", "startAngle", "endAngle", "padAngle", "padRadius", "children", "innerRef"]);
data = _ref.data,
innerRadius = _ref.innerRadius,
outerRadius = _ref.outerRadius,
cornerRadius = _ref.cornerRadius,
startAngle = _ref.startAngle,
endAngle = _ref.endAngle,
padAngle = _ref.padAngle,
padRadius = _ref.padRadius,
children = _ref.children,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var path = (0, _D3ShapeFactories.arc)({

@@ -41,8 +34,6 @@ innerRadius: innerRadius,

padRadius: padRadius
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children({
path: path
}));
if (!data && (startAngle == null || endAngle == null || innerRadius == null || outerRadius == null)) {

@@ -52,3 +43,2 @@ console.warn('[@visx/shape/Arc]: expected data because one of startAngle, endAngle, innerRadius, outerRadius is undefined. Bailing.');

}
return /*#__PURE__*/_react.default.createElement("path", _extends({

@@ -55,0 +45,0 @@ ref: innerRef,

@@ -5,34 +5,27 @@ "use strict";

exports.default = Area;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _D3ShapeFactories = require("../util/D3ShapeFactories");
var _excluded = ["children", "x", "x0", "x1", "y", "y0", "y1", "data", "defined", "className", "curve", "innerRef"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function Area(_ref) {
var children = _ref.children,
x = _ref.x,
x0 = _ref.x0,
x1 = _ref.x1,
y = _ref.y,
y0 = _ref.y0,
y1 = _ref.y1,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$defined = _ref.defined,
defined = _ref$defined === void 0 ? function () {
return true;
} : _ref$defined,
className = _ref.className,
curve = _ref.curve,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, ["children", "x", "x0", "x1", "y", "y0", "y1", "data", "defined", "className", "curve", "innerRef"]);
x = _ref.x,
x0 = _ref.x0,
x1 = _ref.x1,
y = _ref.y,
y0 = _ref.y0,
y1 = _ref.y1,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$defined = _ref.defined,
defined = _ref$defined === void 0 ? function () {
return true;
} : _ref$defined,
className = _ref.className,
curve = _ref.curve,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var path = (0, _D3ShapeFactories.area)({

@@ -47,4 +40,3 @@ x: x,

curve: curve
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children({

@@ -51,0 +43,0 @@ path: path

@@ -5,37 +5,29 @@ "use strict";

exports.default = AreaClosed;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _setNumberOrNumberAccessor = _interopRequireDefault(require("../util/setNumberOrNumberAccessor"));
var _D3ShapeFactories = require("../util/D3ShapeFactories");
var _excluded = ["x", "x0", "x1", "y", "y1", "y0", "yScale", "data", "defined", "className", "curve", "innerRef", "children"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function AreaClosed(_ref) {
var x = _ref.x,
x0 = _ref.x0,
x1 = _ref.x1,
y = _ref.y,
y1 = _ref.y1,
y0 = _ref.y0,
yScale = _ref.yScale,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$defined = _ref.defined,
defined = _ref$defined === void 0 ? function () {
return true;
} : _ref$defined,
className = _ref.className,
curve = _ref.curve,
innerRef = _ref.innerRef,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["x", "x0", "x1", "y", "y1", "y0", "yScale", "data", "defined", "className", "curve", "innerRef", "children"]);
x0 = _ref.x0,
x1 = _ref.x1,
y = _ref.y,
y1 = _ref.y1,
y0 = _ref.y0,
yScale = _ref.yScale,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
_ref$defined = _ref.defined,
defined = _ref$defined === void 0 ? function () {
return true;
} : _ref$defined,
className = _ref.className,
curve = _ref.curve,
innerRef = _ref.innerRef,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var path = (0, _D3ShapeFactories.area)({

@@ -48,3 +40,2 @@ x: x,

});
if (y0 == null) {

@@ -59,6 +50,4 @@ /**

}
if (y && !y1) (0, _setNumberOrNumberAccessor.default)(path.y1, y);
if (y1 && !y) (0, _setNumberOrNumberAccessor.default)(path.y1, y1); // eslint-disable-next-line react/jsx-no-useless-fragment
if (y1 && !y) (0, _setNumberOrNumberAccessor.default)(path.y1, y1);
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children({

@@ -65,0 +54,0 @@ path: path

@@ -5,35 +5,28 @@ "use strict";

exports.default = AreaStack;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _Stack = _interopRequireDefault(require("./Stack"));
var _excluded = ["className", "top", "left", "keys", "data", "curve", "defined", "x", "x0", "x1", "y0", "y1", "value", "order", "offset", "color", "children"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function AreaStack(_ref) {
var className = _ref.className,
top = _ref.top,
left = _ref.left,
keys = _ref.keys,
data = _ref.data,
curve = _ref.curve,
defined = _ref.defined,
x = _ref.x,
x0 = _ref.x0,
x1 = _ref.x1,
y0 = _ref.y0,
y1 = _ref.y1,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
color = _ref.color,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "top", "left", "keys", "data", "curve", "defined", "x", "x0", "x1", "y0", "y1", "value", "order", "offset", "color", "children"]);
top = _ref.top,
left = _ref.left,
keys = _ref.keys,
data = _ref.data,
curve = _ref.curve,
defined = _ref.defined,
x = _ref.x,
x0 = _ref.x0,
x1 = _ref.x1,
y0 = _ref.y0,
y1 = _ref.y1,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
color = _ref.color,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/_react.default.createElement(_Stack.default, _extends({

@@ -58,3 +51,3 @@ className: className,

var stacks = _ref2.stacks,
path = _ref2.path;
path = _ref2.path;
return stacks.map(function (series, i) {

@@ -61,0 +54,0 @@ return /*#__PURE__*/_react.default.createElement("path", _extends({

@@ -5,18 +5,12 @@ "use strict";

exports.default = Bar;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _excluded = ["className", "innerRef"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function Bar(_ref) {
var className = _ref.className,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "innerRef"]);
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/_react.default.createElement("rect", _extends({

@@ -23,0 +17,0 @@ ref: innerRef,

@@ -5,19 +5,11 @@ "use strict";

exports.default = BarGroup;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _group = require("@visx/group");
var _Bar = _interopRequireDefault(require("./Bar"));
var _getBandwidth = _interopRequireDefault(require("../util/getBandwidth"));
var _excluded = ["data", "className", "top", "left", "x0", "x0Scale", "x1Scale", "yScale", "color", "keys", "height", "children"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
/**

@@ -63,15 +55,14 @@ * Generates bar groups as an array of objects and renders `<rect />`s for each datum grouped by `key`. A general setup might look like this:

var data = _ref.data,
className = _ref.className,
top = _ref.top,
left = _ref.left,
x0 = _ref.x0,
x0Scale = _ref.x0Scale,
x1Scale = _ref.x1Scale,
yScale = _ref.yScale,
color = _ref.color,
keys = _ref.keys,
height = _ref.height,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["data", "className", "top", "left", "x0", "x0Scale", "x1Scale", "yScale", "color", "keys", "height", "children"]);
className = _ref.className,
top = _ref.top,
left = _ref.left,
x0 = _ref.x0,
x0Scale = _ref.x0Scale,
x1Scale = _ref.x1Scale,
yScale = _ref.yScale,
color = _ref.color,
keys = _ref.keys,
height = _ref.height,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var barWidth = (0, _getBandwidth.default)(x1Scale);

@@ -96,4 +87,3 @@ var barGroups = data.map(function (group, i) {

};
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children(barGroups));

@@ -100,0 +90,0 @@ return /*#__PURE__*/_react.default.createElement(_group.Group, {

@@ -5,41 +5,29 @@ "use strict";

exports.default = BarGroupHorizontal;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _group = require("@visx/group");
var _Bar = _interopRequireDefault(require("./Bar"));
var _getBandwidth = _interopRequireDefault(require("../util/getBandwidth"));
var _excluded = ["data", "className", "top", "left", "x", "y0", "y0Scale", "y1Scale", "xScale", "color", "keys", "width", "children"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function BarGroupHorizontal(_ref) {
var data = _ref.data,
className = _ref.className,
top = _ref.top,
left = _ref.left,
_ref$x = _ref.x,
x = _ref$x === void 0 ? function () {
return (
/** val */
0
);
} : _ref$x,
y0 = _ref.y0,
y0Scale = _ref.y0Scale,
y1Scale = _ref.y1Scale,
xScale = _ref.xScale,
color = _ref.color,
keys = _ref.keys,
width = _ref.width,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["data", "className", "top", "left", "x", "y0", "y0Scale", "y1Scale", "xScale", "color", "keys", "width", "children"]);
className = _ref.className,
top = _ref.top,
left = _ref.left,
_ref$x = _ref.x,
x = _ref$x === void 0 ? function /** val */ () {
return 0;
} : _ref$x,
y0 = _ref.y0,
y0Scale = _ref.y0Scale,
y1Scale = _ref.y1Scale,
xScale = _ref.xScale,
color = _ref.color,
keys = _ref.keys,
width = _ref.width,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var barHeight = (0, _getBandwidth.default)(y1Scale);

@@ -64,4 +52,3 @@ var barGroups = data.map(function (group, i) {

};
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children(barGroups));

@@ -68,0 +55,0 @@ return /*#__PURE__*/_react.default.createElement(_group.Group, {

@@ -36,4 +36,10 @@ import React from 'react';

bottomRight?: boolean;
/** Optional children override. */
children?: ({ path }: {
path: string;
}) => React.ReactNode;
};
export default function BarRounded({ className, innerRef, x, y, width, height, radius, all, top, bottom, left, right, topLeft, topRight, bottomLeft, bottomRight, ...restProps }: AddSVGProps<BarRoundedProps, SVGPathElement>): JSX.Element;
/** Hook that returns a BarRounded path. */
export declare function useBarRoundedPath({ all, bottom, bottomLeft, bottomRight, height, left, radius, right, top, topLeft, topRight, width, x, y, }: Pick<BarRoundedProps, 'all' | 'top' | 'bottom' | 'left' | 'right' | 'x' | 'y' | 'width' | 'height' | 'radius' | 'topLeft' | 'topRight' | 'bottomRight' | 'bottomLeft'>): string;
export default function BarRounded({ children, className, innerRef, x, y, width, height, radius, all, top, bottom, left, right, topLeft, topRight, bottomLeft, bottomRight, ...restProps }: AddSVGProps<BarRoundedProps, SVGPathElement>): JSX.Element;
//# sourceMappingURL=BarRounded.d.ts.map

@@ -5,49 +5,83 @@ "use strict";

exports.default = BarRounded;
exports.useBarRoundedPath = useBarRoundedPath;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _excluded = ["children", "className", "innerRef", "x", "y", "width", "height", "radius", "all", "top", "bottom", "left", "right", "topLeft", "topRight", "bottomLeft", "bottomRight"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function BarRounded(_ref) {
var className = _ref.className,
innerRef = _ref.innerRef,
x = _ref.x,
y = _ref.y,
width = _ref.width,
height = _ref.height,
radius = _ref.radius,
_ref$all = _ref.all,
all = _ref$all === void 0 ? false : _ref$all,
_ref$top = _ref.top,
top = _ref$top === void 0 ? false : _ref$top,
_ref$bottom = _ref.bottom,
bottom = _ref$bottom === void 0 ? false : _ref$bottom,
_ref$left = _ref.left,
left = _ref$left === void 0 ? false : _ref$left,
_ref$right = _ref.right,
right = _ref$right === void 0 ? false : _ref$right,
_ref$topLeft = _ref.topLeft,
topLeft = _ref$topLeft === void 0 ? false : _ref$topLeft,
_ref$topRight = _ref.topRight,
topRight = _ref$topRight === void 0 ? false : _ref$topRight,
_ref$bottomLeft = _ref.bottomLeft,
bottomLeft = _ref$bottomLeft === void 0 ? false : _ref$bottomLeft,
_ref$bottomRight = _ref.bottomRight,
bottomRight = _ref$bottomRight === void 0 ? false : _ref$bottomRight,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "innerRef", "x", "y", "width", "height", "radius", "all", "top", "bottom", "left", "right", "topLeft", "topRight", "bottomLeft", "bottomRight"]);
/** Hook that returns a BarRounded path. */
function useBarRoundedPath(_ref) {
var all = _ref.all,
bottom = _ref.bottom,
bottomLeft = _ref.bottomLeft,
bottomRight = _ref.bottomRight,
height = _ref.height,
left = _ref.left,
radius = _ref.radius,
right = _ref.right,
top = _ref.top,
topLeft = _ref.topLeft,
topRight = _ref.topRight,
width = _ref.width,
x = _ref.x,
y = _ref.y;
topRight = all || top || right || topRight;
bottomRight = all || bottom || right || bottomRight;
bottomLeft = all || bottom || left || bottomLeft;
topLeft = all || top || left || topLeft; // clamp radius to center of shortest side of the rect
topLeft = all || top || left || topLeft;
radius = Math.min(radius, Math.min(width, height) / 2);
// clamp radius to center of shortest side of the rect
radius = Math.max(1, Math.min(radius, Math.min(width, height) / 2));
var diameter = 2 * radius;
var path = ("M" + (x + radius) + "," + y + " h" + (width - diameter) + "\n " + (topRight ? "a" + radius + "," + radius + " 0 0 1 " + radius + "," + radius : "h" + radius + "v" + radius) + "\n v" + (height - diameter) + "\n " + (bottomRight ? "a" + radius + "," + radius + " 0 0 1 " + -radius + "," + radius : "v" + radius + "h" + -radius) + "\n h" + (diameter - width) + "\n " + (bottomLeft ? "a" + radius + "," + radius + " 0 0 1 " + -radius + "," + -radius : "h" + -radius + "v" + -radius) + "\n v" + (diameter - height) + "\n " + (topLeft ? "a" + radius + "," + radius + " 0 0 1 " + radius + "," + -radius : "v" + -radius + "h" + radius) + "\nz").split('\n').join('');
return path;
}
function BarRounded(_ref2) {
var children = _ref2.children,
className = _ref2.className,
innerRef = _ref2.innerRef,
x = _ref2.x,
y = _ref2.y,
width = _ref2.width,
height = _ref2.height,
radius = _ref2.radius,
_ref2$all = _ref2.all,
all = _ref2$all === void 0 ? false : _ref2$all,
_ref2$top = _ref2.top,
top = _ref2$top === void 0 ? false : _ref2$top,
_ref2$bottom = _ref2.bottom,
bottom = _ref2$bottom === void 0 ? false : _ref2$bottom,
_ref2$left = _ref2.left,
left = _ref2$left === void 0 ? false : _ref2$left,
_ref2$right = _ref2.right,
right = _ref2$right === void 0 ? false : _ref2$right,
_ref2$topLeft = _ref2.topLeft,
topLeft = _ref2$topLeft === void 0 ? false : _ref2$topLeft,
_ref2$topRight = _ref2.topRight,
topRight = _ref2$topRight === void 0 ? false : _ref2$topRight,
_ref2$bottomLeft = _ref2.bottomLeft,
bottomLeft = _ref2$bottomLeft === void 0 ? false : _ref2$bottomLeft,
_ref2$bottomRight = _ref2.bottomRight,
bottomRight = _ref2$bottomRight === void 0 ? false : _ref2$bottomRight,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var path = useBarRoundedPath({
x: x,
y: y,
width: width,
height: height,
radius: radius,
all: all,
top: top,
bottom: bottom,
left: left,
right: right,
topLeft: topLeft,
topRight: topRight,
bottomLeft: bottomLeft,
bottomRight: bottomRight
});
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children({
path: path
}));
return /*#__PURE__*/_react.default.createElement("path", _extends({

@@ -54,0 +88,0 @@ ref: innerRef,

@@ -5,49 +5,35 @@ "use strict";

exports.default = BarStack;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _d3Shape = require("d3-shape");
var _group = require("@visx/group");
var _accessors = require("../util/accessors");
var _getBandwidth = _interopRequireDefault(require("../util/getBandwidth"));
var _setNumberOrNumberAccessor = _interopRequireDefault(require("../util/setNumberOrNumberAccessor"));
var _stackOrder = _interopRequireDefault(require("../util/stackOrder"));
var _stackOffset = _interopRequireDefault(require("../util/stackOffset"));
var _Bar = _interopRequireDefault(require("./Bar"));
var _excluded = ["data", "className", "top", "left", "x", "y0", "y1", "xScale", "yScale", "color", "keys", "value", "order", "offset", "children"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function BarStack(_ref) {
var data = _ref.data,
className = _ref.className,
top = _ref.top,
left = _ref.left,
x = _ref.x,
_ref$y = _ref.y0,
y0 = _ref$y === void 0 ? _accessors.getFirstItem : _ref$y,
_ref$y2 = _ref.y1,
y1 = _ref$y2 === void 0 ? _accessors.getSecondItem : _ref$y2,
xScale = _ref.xScale,
yScale = _ref.yScale,
color = _ref.color,
keys = _ref.keys,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["data", "className", "top", "left", "x", "y0", "y1", "xScale", "yScale", "color", "keys", "value", "order", "offset", "children"]);
className = _ref.className,
top = _ref.top,
left = _ref.left,
x = _ref.x,
_ref$y = _ref.y0,
y0 = _ref$y === void 0 ? _accessors.getFirstItem : _ref$y,
_ref$y2 = _ref.y1,
y1 = _ref$y2 === void 0 ? _accessors.getSecondItem : _ref$y2,
xScale = _ref.xScale,
yScale = _ref.yScale,
color = _ref.color,
keys = _ref.keys,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var stack = (0, _d3Shape.stack)();

@@ -81,4 +67,3 @@ if (keys) stack.keys(keys);

};
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children(barStacks));

@@ -85,0 +70,0 @@ return /*#__PURE__*/_react.default.createElement(_group.Group, {

@@ -5,49 +5,35 @@ "use strict";

exports.default = BarStackHorizontal;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _d3Shape = require("d3-shape");
var _group = require("@visx/group");
var _accessors = require("../util/accessors");
var _getBandwidth = _interopRequireDefault(require("../util/getBandwidth"));
var _setNumberOrNumberAccessor = _interopRequireDefault(require("../util/setNumberOrNumberAccessor"));
var _stackOrder = _interopRequireDefault(require("../util/stackOrder"));
var _stackOffset = _interopRequireDefault(require("../util/stackOffset"));
var _Bar = _interopRequireDefault(require("./Bar"));
var _excluded = ["data", "className", "top", "left", "y", "x0", "x1", "xScale", "yScale", "color", "keys", "value", "order", "offset", "children"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function BarStackHorizontal(_ref) {
var data = _ref.data,
className = _ref.className,
top = _ref.top,
left = _ref.left,
y = _ref.y,
_ref$x = _ref.x0,
x0 = _ref$x === void 0 ? _accessors.getFirstItem : _ref$x,
_ref$x2 = _ref.x1,
x1 = _ref$x2 === void 0 ? _accessors.getSecondItem : _ref$x2,
xScale = _ref.xScale,
yScale = _ref.yScale,
color = _ref.color,
keys = _ref.keys,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["data", "className", "top", "left", "y", "x0", "x1", "xScale", "yScale", "color", "keys", "value", "order", "offset", "children"]);
className = _ref.className,
top = _ref.top,
left = _ref.left,
y = _ref.y,
_ref$x = _ref.x0,
x0 = _ref$x === void 0 ? _accessors.getFirstItem : _ref$x,
_ref$x2 = _ref.x1,
x1 = _ref$x2 === void 0 ? _accessors.getSecondItem : _ref$x2,
xScale = _ref.xScale,
yScale = _ref.yScale,
color = _ref.color,
keys = _ref.keys,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var stack = (0, _d3Shape.stack)();

@@ -81,4 +67,3 @@ if (keys) stack.keys(keys);

};
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children(barStacks));

@@ -85,0 +70,0 @@ return /*#__PURE__*/_react.default.createElement(_group.Group, {

@@ -5,18 +5,12 @@ "use strict";

exports.default = Circle;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _excluded = ["className", "innerRef"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function Circle(_ref) {
var className = _ref.className,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "innerRef"]);
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/_react.default.createElement("circle", _extends({

@@ -23,0 +17,0 @@ ref: innerRef,

@@ -5,30 +5,24 @@ "use strict";

exports.default = Line;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _excluded = ["from", "to", "fill", "className", "innerRef"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function Line(_ref) {
var _ref$from = _ref.from,
from = _ref$from === void 0 ? {
x: 0,
y: 0
} : _ref$from,
_ref$to = _ref.to,
to = _ref$to === void 0 ? {
x: 1,
y: 1
} : _ref$to,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill,
className = _ref.className,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, ["from", "to", "fill", "className", "innerRef"]);
from = _ref$from === void 0 ? {
x: 0,
y: 0
} : _ref$from,
_ref$to = _ref.to,
to = _ref$to === void 0 ? {
x: 1,
y: 1
} : _ref$to,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill,
className = _ref.className,
innerRef = _ref.innerRef,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var isRectilinear = from.x === to.x || from.y === to.y;

@@ -35,0 +29,0 @@ return /*#__PURE__*/_react.default.createElement("line", _extends({

@@ -5,32 +5,25 @@ "use strict";

exports.default = LinePath;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _D3ShapeFactories = require("../util/D3ShapeFactories");
var _excluded = ["children", "data", "x", "y", "fill", "className", "curve", "innerRef", "defined"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function LinePath(_ref) {
var children = _ref.children,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
x = _ref.x,
y = _ref.y,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill,
className = _ref.className,
curve = _ref.curve,
innerRef = _ref.innerRef,
_ref$defined = _ref.defined,
defined = _ref$defined === void 0 ? function () {
return true;
} : _ref$defined,
restProps = _objectWithoutPropertiesLoose(_ref, ["children", "data", "x", "y", "fill", "className", "curve", "innerRef", "defined"]);
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
x = _ref.x,
y = _ref.y,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill,
className = _ref.className,
curve = _ref.curve,
innerRef = _ref.innerRef,
_ref$defined = _ref.defined,
defined = _ref$defined === void 0 ? function () {
return true;
} : _ref$defined,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var path = (0, _D3ShapeFactories.line)({

@@ -41,4 +34,3 @@ x: x,

curve: curve
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children({

@@ -51,3 +43,4 @@ path: path

d: path(data) || '',
fill: fill // without this a datum surrounded by nulls will not be visible
fill: fill
// without this a datum surrounded by nulls will not be visible
// https://github.com/d3/d3-shape#line_defined

@@ -54,0 +47,0 @@ ,

@@ -5,29 +5,22 @@ "use strict";

exports.default = LineRadial;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _D3ShapeFactories = require("../util/D3ShapeFactories");
var _excluded = ["className", "angle", "radius", "defined", "curve", "data", "innerRef", "children", "fill"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function LineRadial(_ref) {
var className = _ref.className,
angle = _ref.angle,
radius = _ref.radius,
defined = _ref.defined,
curve = _ref.curve,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
innerRef = _ref.innerRef,
children = _ref.children,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "angle", "radius", "defined", "curve", "data", "innerRef", "children", "fill"]);
angle = _ref.angle,
radius = _ref.radius,
defined = _ref.defined,
curve = _ref.curve,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
innerRef = _ref.innerRef,
children = _ref.children,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var path = (0, _D3ShapeFactories.radialLine)({

@@ -38,4 +31,3 @@ angle: angle,

curve: curve
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children({

@@ -42,0 +34,0 @@ path: path

"use strict";
exports.__esModule = true;
exports.default = LinkHorizontalCurve;
exports.pathHorizontalCurve = pathHorizontalCurve;
exports.default = LinkHorizontalCurve;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _d3Path = require("d3-path");
var _accessors = require("../../../util/accessors");
var _excluded = ["className", "children", "data", "innerRef", "path", "percent", "x", "y", "source", "target"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function pathHorizontalCurve(_ref) {
var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
return function (link) {

@@ -44,21 +37,19 @@ var sourceData = source(link);

}
function LinkHorizontalCurve(_ref2) {
var className = _ref2.className,
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.2 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "children", "data", "innerRef", "path", "percent", "x", "y", "source", "target"]);
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.2 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathHorizontalCurve({

@@ -65,0 +56,0 @@ source: source,

"use strict";
exports.__esModule = true;
exports.default = LinkRadialCurve;
exports.pathRadialCurve = pathRadialCurve;
exports.default = LinkRadialCurve;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _d3Path = require("d3-path");
var _accessors = require("../../../util/accessors");
var _excluded = ["className", "children", "data", "innerRef", "path", "percent", "x", "y", "source", "target"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function pathRadialCurve(_ref) {
var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
return function (link) {

@@ -52,21 +45,19 @@ var sourceData = source(link);

}
function LinkRadialCurve(_ref2) {
var className = _ref2.className,
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.2 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "children", "data", "innerRef", "path", "percent", "x", "y", "source", "target"]);
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.2 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathRadialCurve({

@@ -73,0 +64,0 @@ source: source,

"use strict";
exports.__esModule = true;
exports.default = LinkVerticalCurve;
exports.pathVerticalCurve = pathVerticalCurve;
exports.default = LinkVerticalCurve;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _d3Path = require("d3-path");
var _accessors = require("../../../util/accessors");
var _excluded = ["className", "children", "data", "innerRef", "path", "percent", "x", "y", "source", "target"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function pathVerticalCurve(_ref) {
var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
return function (link) {

@@ -44,21 +37,19 @@ var sourceData = source(link);

}
function LinkVerticalCurve(_ref2) {
var className = _ref2.className,
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.2 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "children", "data", "innerRef", "path", "percent", "x", "y", "source", "target"]);
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.2 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathVerticalCurve({

@@ -65,0 +56,0 @@ source: source,

"use strict";
exports.__esModule = true;
exports.default = LinkHorizontalDiagonal;
exports.pathHorizontalDiagonal = pathHorizontalDiagonal;
exports.default = LinkHorizontalDiagonal;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _d3Shape = require("d3-shape");
var _accessors = require("../../../util/accessors");
var _excluded = ["className", "children", "data", "innerRef", "path", "x", "y", "source", "target"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function pathHorizontalDiagonal(_ref) {
var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y;
target = _ref.target,
x = _ref.x,
y = _ref.y;
return function (data) {

@@ -35,19 +28,17 @@ var link = (0, _d3Shape.linkHorizontal)();

}
function LinkHorizontalDiagonal(_ref2) {
var className = _ref2.className,
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "children", "data", "innerRef", "path", "x", "y", "source", "target"]);
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathHorizontalDiagonal({

@@ -54,0 +45,0 @@ source: source,

"use strict";
exports.__esModule = true;
exports.default = LinkRadialDiagonal;
exports.pathRadialDiagonal = pathRadialDiagonal;
exports.default = LinkRadialDiagonal;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _d3Shape = require("d3-shape");
var _accessors = require("../../../util/accessors");
var _excluded = ["className", "children", "data", "innerRef", "path", "angle", "radius", "source", "target"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function pathRadialDiagonal(_ref) {
var source = _ref.source,
target = _ref.target,
angle = _ref.angle,
radius = _ref.radius;
target = _ref.target,
angle = _ref.angle,
radius = _ref.radius;
return function (data) {

@@ -35,19 +28,17 @@ var link = (0, _d3Shape.linkRadial)();

}
function LinkRadialDiagonal(_ref2) {
var className = _ref2.className,
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$angle = _ref2.angle,
angle = _ref2$angle === void 0 ? _accessors.getX : _ref2$angle,
_ref2$radius = _ref2.radius,
radius = _ref2$radius === void 0 ? _accessors.getY : _ref2$radius,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "children", "data", "innerRef", "path", "angle", "radius", "source", "target"]);
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$angle = _ref2.angle,
angle = _ref2$angle === void 0 ? _accessors.getX : _ref2$angle,
_ref2$radius = _ref2.radius,
radius = _ref2$radius === void 0 ? _accessors.getY : _ref2$radius,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathRadialDiagonal({

@@ -54,0 +45,0 @@ source: source,

"use strict";
exports.__esModule = true;
exports.default = LinkVerticalDiagonal;
exports.pathVerticalDiagonal = pathVerticalDiagonal;
exports.default = LinkVerticalDiagonal;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _d3Shape = require("d3-shape");
var _accessors = require("../../../util/accessors");
var _excluded = ["className", "children", "data", "innerRef", "path", "x", "y", "source", "target"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function pathVerticalDiagonal(_ref) {
var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y;
target = _ref.target,
x = _ref.x,
y = _ref.y;
return function (data) {

@@ -35,19 +28,17 @@ var link = (0, _d3Shape.linkVertical)();

}
function LinkVerticalDiagonal(_ref2) {
var className = _ref2.className,
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "children", "data", "innerRef", "path", "x", "y", "source", "target"]);
children = _ref2.children,
data = _ref2.data,
innerRef = _ref2.innerRef,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathVerticalDiagonal({

@@ -54,0 +45,0 @@ source: source,

"use strict";
exports.__esModule = true;
exports.default = LinkHorizontalLine;
exports.pathHorizontalLine = pathHorizontalLine;
exports.default = LinkHorizontalLine;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _d3Path = require("d3-path");
var _accessors = require("../../../util/accessors");
var _excluded = ["className", "children", "innerRef", "data", "path", "x", "y", "source", "target"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function pathHorizontalLine(_ref) {
var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y;
target = _ref.target,
x = _ref.x,
y = _ref.y;
return function (data) {

@@ -39,19 +32,17 @@ var sourceData = source(data);

}
function LinkHorizontalLine(_ref2) {
var className = _ref2.className,
children = _ref2.children,
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "children", "innerRef", "data", "path", "x", "y", "source", "target"]);
children = _ref2.children,
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathHorizontalLine({

@@ -58,0 +49,0 @@ source: source,

"use strict";
exports.__esModule = true;
exports.default = LinkRadialLine;
exports.pathRadialLine = pathRadialLine;
exports.default = LinkRadialLine;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _d3Path = require("d3-path");
var _accessors = require("../../../util/accessors");
var _excluded = ["className", "innerRef", "data", "path", "x", "y", "source", "target", "children"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function pathRadialLine(_ref) {
var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y;
target = _ref.target,
x = _ref.x,
y = _ref.y;
return function (data) {

@@ -43,19 +36,17 @@ var sourceData = source(data);

}
function LinkRadialLine(_ref2) {
var className = _ref2.className,
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "innerRef", "data", "path", "x", "y", "source", "target", "children"]);
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathRadialLine({

@@ -62,0 +53,0 @@ source: source,

"use strict";
exports.__esModule = true;
exports.default = LinkVerticalLine;
exports.pathVerticalLine = pathVerticalLine;
exports.default = LinkVerticalLine;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _d3Path = require("d3-path");
var _accessors = require("../../../util/accessors");
var _excluded = ["className", "innerRef", "data", "path", "x", "y", "source", "target", "children"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function pathVerticalLine(_ref) {
var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y;
target = _ref.target,
x = _ref.x,
y = _ref.y;
return function (data) {

@@ -39,19 +32,17 @@ var sourceData = source(data);

}
function LinkVerticalLine(_ref2) {
var className = _ref2.className,
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "innerRef", "data", "path", "x", "y", "source", "target", "children"]);
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathVerticalLine({

@@ -58,0 +49,0 @@ source: source,

"use strict";
exports.__esModule = true;
exports.default = LinkHorizontalStep;
exports.pathHorizontalStep = pathHorizontalStep;
exports.default = LinkHorizontalStep;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _d3Path = require("d3-path");
var _accessors = require("../../../util/accessors");
var _excluded = ["className", "innerRef", "data", "path", "percent", "x", "y", "source", "target", "children"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function pathHorizontalStep(_ref) {
var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
return function (link) {

@@ -42,21 +35,19 @@ var sourceData = source(link);

}
function LinkHorizontalStep(_ref2) {
var className = _ref2.className,
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.5 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "innerRef", "data", "path", "percent", "x", "y", "source", "target", "children"]);
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.5 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getY : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getX : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathHorizontalStep({

@@ -63,0 +54,0 @@ source: source,

"use strict";
exports.__esModule = true;
exports.default = LinkRadialStep;
exports.pathRadialStep = pathRadialStep;
exports.default = LinkRadialStep;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _accessors = require("../../../util/accessors");
var _excluded = ["className", "innerRef", "data", "path", "x", "y", "source", "target", "children"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function pathRadialStep(_ref) {
var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y;
target = _ref.target,
x = _ref.x,
y = _ref.y;
return function (link) {

@@ -43,19 +37,17 @@ var sourceData = source(link);

}
function LinkRadialStep(_ref2) {
var className = _ref2.className,
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "innerRef", "data", "path", "x", "y", "source", "target", "children"]);
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathRadialStep({

@@ -62,0 +54,0 @@ source: source,

"use strict";
exports.__esModule = true;
exports.default = LinkVerticalStep;
exports.pathVerticalStep = pathVerticalStep;
exports.default = LinkVerticalStep;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _d3Path = require("d3-path");
var _accessors = require("../../../util/accessors");
var _excluded = ["className", "innerRef", "data", "path", "percent", "x", "y", "source", "target", "children"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function pathVerticalStep(_ref) {
var source = _ref.source,
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
target = _ref.target,
x = _ref.x,
y = _ref.y,
percent = _ref.percent;
return function (link) {

@@ -42,21 +35,19 @@ var sourceData = source(link);

}
function LinkVerticalStep(_ref2) {
var className = _ref2.className,
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.5 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, ["className", "innerRef", "data", "path", "percent", "x", "y", "source", "target", "children"]);
innerRef = _ref2.innerRef,
data = _ref2.data,
path = _ref2.path,
_ref2$percent = _ref2.percent,
percent = _ref2$percent === void 0 ? 0.5 : _ref2$percent,
_ref2$x = _ref2.x,
x = _ref2$x === void 0 ? _accessors.getX : _ref2$x,
_ref2$y = _ref2.y,
y = _ref2$y === void 0 ? _accessors.getY : _ref2$y,
_ref2$source = _ref2.source,
source = _ref2$source === void 0 ? _accessors.getSource : _ref2$source,
_ref2$target = _ref2.target,
target = _ref2$target === void 0 ? _accessors.getTarget : _ref2$target,
children = _ref2.children,
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
var pathGen = path || pathVerticalStep({

@@ -63,0 +54,0 @@ source: source,

@@ -5,40 +5,32 @@ "use strict";

exports.default = Pie;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _group = require("@visx/group");
var _D3ShapeFactories = require("../util/D3ShapeFactories");
var _excluded = ["className", "top", "left", "data", "centroid", "innerRadius", "outerRadius", "cornerRadius", "startAngle", "endAngle", "padAngle", "padRadius", "pieSort", "pieSortValues", "pieValue", "children", "fill"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function Pie(_ref) {
var className = _ref.className,
top = _ref.top,
left = _ref.left,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
centroid = _ref.centroid,
_ref$innerRadius = _ref.innerRadius,
innerRadius = _ref$innerRadius === void 0 ? 0 : _ref$innerRadius,
outerRadius = _ref.outerRadius,
cornerRadius = _ref.cornerRadius,
startAngle = _ref.startAngle,
endAngle = _ref.endAngle,
padAngle = _ref.padAngle,
padRadius = _ref.padRadius,
pieSort = _ref.pieSort,
pieSortValues = _ref.pieSortValues,
pieValue = _ref.pieValue,
children = _ref.children,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? '' : _ref$fill,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "top", "left", "data", "centroid", "innerRadius", "outerRadius", "cornerRadius", "startAngle", "endAngle", "padAngle", "padRadius", "pieSort", "pieSortValues", "pieValue", "children", "fill"]);
top = _ref.top,
left = _ref.left,
_ref$data = _ref.data,
data = _ref$data === void 0 ? [] : _ref$data,
centroid = _ref.centroid,
_ref$innerRadius = _ref.innerRadius,
innerRadius = _ref$innerRadius === void 0 ? 0 : _ref$innerRadius,
outerRadius = _ref.outerRadius,
cornerRadius = _ref.cornerRadius,
startAngle = _ref.startAngle,
endAngle = _ref.endAngle,
padAngle = _ref.padAngle,
padRadius = _ref.padRadius,
pieSort = _ref.pieSort,
pieSortValues = _ref.pieSortValues,
pieValue = _ref.pieValue,
children = _ref.children,
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? '' : _ref$fill,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var path = (0, _D3ShapeFactories.arc)({

@@ -58,4 +50,3 @@ innerRadius: innerRadius,

});
var arcs = pie(data); // eslint-disable-next-line react/jsx-no-useless-fragment
var arcs = pie(data);
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children({

@@ -62,0 +53,0 @@ arcs: arcs,

@@ -6,15 +6,9 @@ "use strict";

exports.getPoints = exports.getPoint = void 0;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _trigonometry = require("../util/trigonometry");
var _excluded = ["sides", "size", "center", "rotate", "className", "children", "innerRef", "points"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
var DEFAULT_CENTER = {

@@ -24,13 +18,12 @@ x: 0,

};
var getPoint = function getPoint(_ref) {
var _ref$sides = _ref.sides,
sides = _ref$sides === void 0 ? 4 : _ref$sides,
_ref$size = _ref.size,
size = _ref$size === void 0 ? 25 : _ref$size,
_ref$center = _ref.center,
center = _ref$center === void 0 ? DEFAULT_CENTER : _ref$center,
_ref$rotate = _ref.rotate,
rotate = _ref$rotate === void 0 ? 0 : _ref$rotate,
side = _ref.side;
sides = _ref$sides === void 0 ? 4 : _ref$sides,
_ref$size = _ref.size,
size = _ref$size === void 0 ? 25 : _ref$size,
_ref$center = _ref.center,
center = _ref$center === void 0 ? DEFAULT_CENTER : _ref$center,
_ref$rotate = _ref.rotate,
rotate = _ref$rotate === void 0 ? 0 : _ref$rotate,
side = _ref.side;
var degrees = 360 / sides * side - rotate;

@@ -43,10 +36,8 @@ var radians = (0, _trigonometry.degreesToRadians)(degrees);

};
exports.getPoint = getPoint;
var getPoints = function getPoints(_ref2) {
var sides = _ref2.sides,
size = _ref2.size,
center = _ref2.center,
rotate = _ref2.rotate;
size = _ref2.size,
center = _ref2.center,
rotate = _ref2.rotate;
return new Array(sides).fill(0).map(function (_, side) {

@@ -62,20 +53,17 @@ return getPoint({

};
exports.getPoints = getPoints;
function Polygon(_ref3) {
var _ref3$sides = _ref3.sides,
sides = _ref3$sides === void 0 ? 4 : _ref3$sides,
_ref3$size = _ref3.size,
size = _ref3$size === void 0 ? 25 : _ref3$size,
_ref3$center = _ref3.center,
center = _ref3$center === void 0 ? DEFAULT_CENTER : _ref3$center,
_ref3$rotate = _ref3.rotate,
rotate = _ref3$rotate === void 0 ? 0 : _ref3$rotate,
className = _ref3.className,
children = _ref3.children,
innerRef = _ref3.innerRef,
points = _ref3.points,
restProps = _objectWithoutPropertiesLoose(_ref3, ["sides", "size", "center", "rotate", "className", "children", "innerRef", "points"]);
sides = _ref3$sides === void 0 ? 4 : _ref3$sides,
_ref3$size = _ref3.size,
size = _ref3$size === void 0 ? 25 : _ref3$size,
_ref3$center = _ref3.center,
center = _ref3$center === void 0 ? DEFAULT_CENTER : _ref3$center,
_ref3$rotate = _ref3.rotate,
rotate = _ref3$rotate === void 0 ? 0 : _ref3$rotate,
className = _ref3.className,
children = _ref3.children,
innerRef = _ref3.innerRef,
points = _ref3.points,
restProps = _objectWithoutPropertiesLoose(_ref3, _excluded);
var pointsToRender = points || getPoints({

@@ -88,6 +76,5 @@ sides: sides,

var x = _ref4.x,
y = _ref4.y;
y = _ref4.y;
return [x, y];
}); // eslint-disable-next-line react/jsx-no-useless-fragment
});
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children({

@@ -94,0 +81,0 @@ points: pointsToRender

@@ -5,40 +5,28 @@ "use strict";

exports.default = SplitLinePath;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireWildcard(require("react"));
var _getSplitLineSegments = _interopRequireDefault(require("../util/getSplitLineSegments"));
var _D3ShapeFactories = require("../util/D3ShapeFactories");
var _LinePath = _interopRequireDefault(require("./LinePath"));
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var getX = function getX(d) {
return d.x || 0;
};
var getY = function getY(d) {
return d.y || 0;
};
function SplitLinePath(_ref) {
var children = _ref.children,
className = _ref.className,
curve = _ref.curve,
defined = _ref.defined,
segmentation = _ref.segmentation,
sampleRate = _ref.sampleRate,
segments = _ref.segments,
x = _ref.x,
y = _ref.y,
styles = _ref.styles;
className = _ref.className,
curve = _ref.curve,
defined = _ref.defined,
segmentation = _ref.segmentation,
sampleRate = _ref.sampleRate,
segments = _ref.segments,
x = _ref.x,
y = _ref.y,
styles = _ref.styles;
// Convert data in all segments to points.

@@ -79,7 +67,9 @@ var pointsInSegments = (0, _react.useMemo)(function () {

return /*#__PURE__*/_react.default.createElement("g", null, splitLineSegments.map(function (segment, index) {
return children ? children({
return children ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
key: index
}, children({
index: index,
segment: segment,
styles: styles[index] || styles[index % styles.length]
}) : /*#__PURE__*/_react.default.createElement(_LinePath.default, _extends({
})) : /*#__PURE__*/_react.default.createElement(_LinePath.default, _extends({
key: index,

@@ -93,3 +83,2 @@ className: className,

}
SplitLinePath.propTypes = {

@@ -96,0 +85,0 @@ segments: _propTypes.default.arrayOf(_propTypes.default.array).isRequired,

@@ -5,37 +5,29 @@ "use strict";

exports.default = Stack;
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _group = require("@visx/group");
var _D3ShapeFactories = require("../util/D3ShapeFactories");
var _excluded = ["className", "top", "left", "keys", "data", "curve", "defined", "x", "x0", "x1", "y0", "y1", "value", "order", "offset", "color", "children"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function Stack(_ref) {
var className = _ref.className,
top = _ref.top,
left = _ref.left,
keys = _ref.keys,
data = _ref.data,
curve = _ref.curve,
defined = _ref.defined,
x = _ref.x,
x0 = _ref.x0,
x1 = _ref.x1,
y0 = _ref.y0,
y1 = _ref.y1,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
color = _ref.color,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["className", "top", "left", "keys", "data", "curve", "defined", "x", "x0", "x1", "y0", "y1", "value", "order", "offset", "color", "children"]);
top = _ref.top,
left = _ref.left,
keys = _ref.keys,
data = _ref.data,
curve = _ref.curve,
defined = _ref.defined,
x = _ref.x,
x0 = _ref.x0,
x1 = _ref.x1,
y0 = _ref.y0,
y1 = _ref.y1,
value = _ref.value,
order = _ref.order,
offset = _ref.offset,
color = _ref.color,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
var stack = (0, _D3ShapeFactories.stack)({

@@ -56,4 +48,3 @@ keys: keys,

});
var stacks = stack(data); // eslint-disable-next-line react/jsx-no-useless-fragment
var stacks = stack(data);
if (children) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children({

@@ -60,0 +51,0 @@ stacks: stacks,

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

"use strict";
"use strict";
exports.__esModule = true;

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

/// <reference types="react" />
import { Area } from 'd3-shape';
import { ReactNode, Ref } from 'react';
import { AreaPathConfig } from './D3ShapeConfig';

@@ -8,3 +8,3 @@ export declare type BaseAreaProps<Datum> = {

path: Area<Datum>;
}) => React.ReactNode;
}) => ReactNode;
/** Classname applied to path element. */

@@ -15,4 +15,4 @@ className?: string;

/** React RefObject passed to the path element. */
innerRef?: React.Ref<SVGPathElement>;
innerRef?: Ref<SVGPathElement>;
} & AreaPathConfig<Datum>;
//# sourceMappingURL=area.d.ts.map

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

"use strict";
"use strict";
exports.__esModule = true;

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

"use strict";
"use strict";
exports.__esModule = true;

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

/// <reference types="react" />
import { ReactNode } from 'react';
import { BarGroupBar } from './barGroup';

@@ -46,4 +46,4 @@ import { BaseStackProps, StackKey } from './stack';

/** Override render function which is passed the configured stack generator as input. */
children?: (stacks: BarStack<Datum, Key>[]) => React.ReactNode;
children?: (stacks: BarStack<Datum, Key>[]) => ReactNode;
};
//# sourceMappingURL=barStack.d.ts.map

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

"use strict";
"use strict";
exports.__esModule = true;

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

/// <reference types="react" />
import { D3Scale, PickD3Scale } from '@visx/scale';
import { ReactNode, SVGProps } from 'react';
export declare type $TSFIXME = any;

@@ -12,4 +12,4 @@ export declare type DatumObject = Record<string | number, $TSFIXME>;

*/
export declare type AddSVGProps<Props, Element extends SVGElement> = Props & Omit<React.SVGProps<Element>, keyof Props>;
export declare type RenderProp<Input> = (args: Input) => React.ReactNode;
export declare type AddSVGProps<Props, Element extends SVGElement> = Props & Omit<SVGProps<Element>, keyof Props>;
export declare type RenderProp<Input> = (args: Input) => ReactNode;
//# sourceMappingURL=base.d.ts.map

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

"use strict";
"use strict";
exports.__esModule = true;

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

"use strict";
"use strict";
exports.__esModule = true;
"use strict";
exports.__esModule = true;
var _base = require("./base");
Object.keys(_base).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _base[key]) return;
exports[key] = _base[key];
});
var _accessor = require("./accessor");
Object.keys(_accessor).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _accessor[key]) return;
exports[key] = _accessor[key];
});
var _area = require("./area");
Object.keys(_area).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _area[key]) return;
exports[key] = _area[key];
});
var _barGroup = require("./barGroup");
Object.keys(_barGroup).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _barGroup[key]) return;
exports[key] = _barGroup[key];
});
var _barStack = require("./barStack");
Object.keys(_barStack).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _barStack[key]) return;
exports[key] = _barStack[key];
});
var _D3ShapeConfig = require("./D3ShapeConfig");
Object.keys(_D3ShapeConfig).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _D3ShapeConfig[key]) return;
exports[key] = _D3ShapeConfig[key];
});
var _link = require("./link");
Object.keys(_link).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _link[key]) return;
exports[key] = _link[key];
});
var _stack = require("./stack");
Object.keys(_stack).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _stack[key]) return;
exports[key] = _stack[key];
});

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

/// <reference types="react" />
import { ReactNode, Ref } from 'react';
export declare type AccessorProps<Link, Node> = {

@@ -23,3 +23,3 @@ /** Given a node, returns its x coordinate. */

/** React ref to the path element. */
innerRef?: React.Ref<SVGPathElement>;
innerRef?: Ref<SVGPathElement>;
/** Path generator, given a link returns a path d attribute string */

@@ -30,3 +30,3 @@ path?: PathType<Link>;

path: PathType<Link>;
}) => React.ReactNode;
}) => ReactNode;
/** Datum for which to render a link. */

@@ -33,0 +33,0 @@ data: Link;

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

"use strict";
"use strict";
exports.__esModule = true;

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

"use strict";
"use strict";
exports.__esModule = true;
"use strict";
exports.__esModule = true;
exports.getFirstItem = getFirstItem;
exports.getSecondItem = getSecondItem;
exports.getSource = getSource;
exports.getTarget = getTarget;
exports.getX = getX;
exports.getY = getY;
exports.getSource = getSource;
exports.getTarget = getTarget;
exports.getFirstItem = getFirstItem;
exports.getSecondItem = getSecondItem;
function getX(l) {
return typeof (l == null ? void 0 : l.x) === 'number' ? l == null ? void 0 : l.x : 0;
}
function getY(l) {
return typeof (l == null ? void 0 : l.y) === 'number' ? l == null ? void 0 : l.y : 0;
}
function getSource(l) {
return l == null ? void 0 : l.source;
}
function getTarget(l) {
return l == null ? void 0 : l.target;
}
function getFirstItem(d) {
return d == null ? void 0 : d[0];
}
function getSecondItem(d) {
return d == null ? void 0 : d[1];
}

@@ -10,23 +10,16 @@ "use strict";

exports.stack = stack;
var _d3Shape = require("d3-shape");
var _setNumberOrNumberAccessor = _interopRequireDefault(require("./setNumberOrNumberAccessor"));
var _stackOrder = _interopRequireDefault(require("./stackOrder"));
var _stackOffset = _interopRequireDefault(require("./stackOffset"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function arc(_temp) {
var _ref = _temp === void 0 ? {} : _temp,
innerRadius = _ref.innerRadius,
outerRadius = _ref.outerRadius,
cornerRadius = _ref.cornerRadius,
startAngle = _ref.startAngle,
endAngle = _ref.endAngle,
padAngle = _ref.padAngle,
padRadius = _ref.padRadius;
innerRadius = _ref.innerRadius,
outerRadius = _ref.outerRadius,
cornerRadius = _ref.cornerRadius,
startAngle = _ref.startAngle,
endAngle = _ref.endAngle,
padAngle = _ref.padAngle,
padRadius = _ref.padRadius;
var path = (0, _d3Shape.arc)();

@@ -42,14 +35,12 @@ if (innerRadius != null) (0, _setNumberOrNumberAccessor.default)(path.innerRadius, innerRadius);

}
function area(_temp2) {
var _ref2 = _temp2 === void 0 ? {} : _temp2,
x = _ref2.x,
x0 = _ref2.x0,
x1 = _ref2.x1,
y = _ref2.y,
y0 = _ref2.y0,
y1 = _ref2.y1,
defined = _ref2.defined,
curve = _ref2.curve;
x = _ref2.x,
x0 = _ref2.x0,
x1 = _ref2.x1,
y = _ref2.y,
y0 = _ref2.y0,
y1 = _ref2.y1,
defined = _ref2.defined,
curve = _ref2.curve;
var path = (0, _d3Shape.area)();

@@ -66,10 +57,8 @@ if (x) (0, _setNumberOrNumberAccessor.default)(path.x, x);

}
function line(_temp3) {
var _ref3 = _temp3 === void 0 ? {} : _temp3,
x = _ref3.x,
y = _ref3.y,
defined = _ref3.defined,
curve = _ref3.curve;
x = _ref3.x,
y = _ref3.y,
defined = _ref3.defined,
curve = _ref3.curve;
var path = (0, _d3Shape.line)();

@@ -82,14 +71,13 @@ if (x) (0, _setNumberOrNumberAccessor.default)(path.x, x);

}
function pie(_temp4) {
var _ref4 = _temp4 === void 0 ? {} : _temp4,
startAngle = _ref4.startAngle,
endAngle = _ref4.endAngle,
padAngle = _ref4.padAngle,
value = _ref4.value,
sort = _ref4.sort,
sortValues = _ref4.sortValues;
startAngle = _ref4.startAngle,
endAngle = _ref4.endAngle,
padAngle = _ref4.padAngle,
value = _ref4.value,
sort = _ref4.sort,
sortValues = _ref4.sortValues;
var path = (0, _d3Shape.pie)();
var path = (0, _d3Shape.pie)(); // ts can't distinguish between these method overloads
// ts can't distinguish between these method overloads
if (sort === null) path.sort(sort);else if (sort != null) path.sort(sort);

@@ -103,10 +91,8 @@ if (sortValues === null) path.sortValues(sortValues);else if (sortValues != null) path.sortValues(sortValues);

}
function radialLine(_temp5) {
var _ref5 = _temp5 === void 0 ? {} : _temp5,
angle = _ref5.angle,
radius = _ref5.radius,
defined = _ref5.defined,
curve = _ref5.curve;
angle = _ref5.angle,
radius = _ref5.radius,
defined = _ref5.defined,
curve = _ref5.curve;
var path = (0, _d3Shape.radialLine)();

@@ -119,8 +105,7 @@ if (angle) (0, _setNumberOrNumberAccessor.default)(path.angle, angle);

}
function stack(_ref6) {
var keys = _ref6.keys,
value = _ref6.value,
order = _ref6.order,
offset = _ref6.offset;
value = _ref6.value,
order = _ref6.order,
offset = _ref6.offset;
var path = (0, _d3Shape.stack)();

@@ -127,0 +112,0 @@ if (keys) path.keys(keys);

@@ -5,3 +5,2 @@ "use strict";

exports.default = getBandwidth;
function getBandwidth(scale) {

@@ -11,3 +10,2 @@ if ('bandwidth' in scale) {

}
var range = scale.range();

@@ -14,0 +12,0 @@ var domain = scale.domain();

@@ -6,17 +6,19 @@ "use strict";

var SVG_NAMESPACE_URL = 'http://www.w3.org/2000/svg';
function getOrCreateMeasurementElement(elementId) {
var pathElement = document.getElementById(elementId); // create a single path element if not done already
var pathElement = document.getElementById(elementId);
// create a single path element if not done already
if (!pathElement) {
var svg = document.createElementNS(SVG_NAMESPACE_URL, 'svg'); // not visible
var svg = document.createElementNS(SVG_NAMESPACE_URL, 'svg');
// not visible
svg.setAttribute('aria-hidden', 'true');
svg.style.opacity = '0';
svg.style.width = '0';
svg.style.height = '0'; // off screen
svg.style.height = '0';
// off screen
svg.style.position = 'absolute';
svg.style.top = '-100%';
svg.style.left = '-100%'; // no mouse events
svg.style.left = '-100%';
// no mouse events
svg.style.pointerEvents = 'none';

@@ -28,4 +30,3 @@ pathElement = document.createElementNS(SVG_NAMESPACE_URL, 'path');

}
return pathElement;
}

@@ -5,21 +5,15 @@ "use strict";

exports.default = getSplitLineSegments;
var _getOrCreateMeasurementElement = _interopRequireDefault(require("./getOrCreateMeasurementElement"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var MEASUREMENT_ELEMENT_ID = '__visx_splitpath_svg_path_measurement_id';
var TRUE = function TRUE() {
return true;
};
function getSplitLineSegments(_ref) {
var path = _ref.path,
pointsInSegments = _ref.pointsInSegments,
_ref$segmentation = _ref.segmentation,
segmentation = _ref$segmentation === void 0 ? 'x' : _ref$segmentation,
_ref$sampleRate = _ref.sampleRate,
sampleRate = _ref$sampleRate === void 0 ? 1 : _ref$sampleRate;
pointsInSegments = _ref.pointsInSegments,
_ref$segmentation = _ref.segmentation,
segmentation = _ref$segmentation === void 0 ? 'x' : _ref$segmentation,
_ref$sampleRate = _ref.sampleRate,
sampleRate = _ref$sampleRate === void 0 ? 1 : _ref$sampleRate;
try {

@@ -33,7 +27,5 @@ var pathElement = (0, _getOrCreateMeasurementElement.default)(MEASUREMENT_ELEMENT_ID);

});
if (segmentation === 'x' || segmentation === 'y') {
var segmentStarts = pointsInSegments.map(function (points) {
var _points$find;
return (_points$find = points.find(function (p) {

@@ -56,12 +48,10 @@ return typeof p[segmentation] === 'number';

var currentSegment = 0;
for (var distance = 0; distance <= totalLength; distance += sampleRate) {
var sample = pathElement.getPointAtLength(distance);
var position = sample[segmentation]; // find the current segment to which this sample belongs
var position = sample[segmentation];
// find the current segment to which this sample belongs
while (currentSegment < numSegments - 1 && isBeyondSegmentStart[currentSegment + 1](position)) {
currentSegment += 1;
} // add sample to segment
}
// add sample to segment
lineSegments[currentSegment].push(sample);

@@ -78,30 +68,21 @@ }

var lengthBetweenPoints = totalLength / Math.max(1, numPoints - 1);
var _segmentStarts = numPointsInSegment.slice(0, numSegments - 1);
_segmentStarts.unshift(0);
for (var i = 2; i < numSegments; i += 1) {
_segmentStarts[i] += _segmentStarts[i - 1];
}
for (var _i = 0; _i < numSegments; _i += 1) {
_segmentStarts[_i] *= lengthBetweenPoints;
}
var _currentSegment = 0;
for (var _distance = 0; _distance <= totalLength; _distance += sampleRate) {
var _sample = pathElement.getPointAtLength(_distance); // find the current segment to which this sample belongs
var _sample = pathElement.getPointAtLength(_distance);
// find the current segment to which this sample belongs
while (_currentSegment < numSegments - 1 && _distance >= _segmentStarts[_currentSegment + 1]) {
_currentSegment += 1;
} // add sample to segment
}
// add sample to segment
lineSegments[_currentSegment].push(_sample);
}
}
return lineSegments;

@@ -108,0 +89,0 @@ } catch (e) {

@@ -5,3 +5,2 @@ "use strict";

exports.default = setNumberOrNumberAccessor;
/**

@@ -8,0 +7,0 @@ * This is a workaround for TypeScript not inferring the correct

"use strict";
exports.__esModule = true;
exports.STACK_OFFSET_NAMES = exports.STACK_OFFSETS = void 0;
exports.default = stackOffset;
exports.STACK_OFFSET_NAMES = exports.STACK_OFFSETS = void 0;
var _d3Shape = require("d3-shape");
var STACK_OFFSETS = {

@@ -19,5 +17,4 @@ expand: _d3Shape.stackOffsetExpand,

exports.STACK_OFFSET_NAMES = STACK_OFFSET_NAMES;
function stackOffset(offset) {
return offset && STACK_OFFSETS[offset] || STACK_OFFSETS.none;
}
"use strict";
exports.__esModule = true;
exports.STACK_ORDER_NAMES = exports.STACK_ORDERS = void 0;
exports.default = stackOrder;
exports.STACK_ORDER_NAMES = exports.STACK_ORDERS = void 0;
var _d3Shape = require("d3-shape");
var STACK_ORDERS = {

@@ -19,5 +17,4 @@ ascending: _d3Shape.stackOrderAscending,

exports.STACK_ORDER_NAMES = STACK_ORDER_NAMES;
function stackOrder(order) {
return order && STACK_ORDERS[order] || STACK_ORDERS.none;
}

@@ -5,7 +5,5 @@ "use strict";

exports.degreesToRadians = void 0;
var degreesToRadians = function degreesToRadians(degrees) {
return Math.PI / 180 * degrees;
};
exports.degreesToRadians = degreesToRadians;
{
"name": "@visx/shape",
"version": "3.0.0-alpha.0",
"version": "3.0.0",
"description": "visx shape",

@@ -26,15 +26,15 @@ "sideEffects": false,

"@types/d3-shape": "^1.3.1",
"@types/lodash": "^4.14.146",
"@types/lodash": "^4.14.172",
"@types/react": "*",
"@visx/curve": "1.7.0",
"@visx/group": "3.0.0-alpha.0",
"@visx/scale": "1.14.0",
"@visx/curve": "3.0.0",
"@visx/group": "3.0.0",
"@visx/scale": "3.0.0",
"classnames": "^2.3.1",
"d3-path": "^1.0.5",
"d3-shape": "^1.2.0",
"lodash": "^4.17.15",
"lodash": "^4.17.21",
"prop-types": "^15.5.10"
},
"peerDependencies": {
"react": "^16.3.0-0 || ^17.0.0-0"
"react": "^16.3.0-0 || ^17.0.0-0 || ^18.0.0-0"
},

@@ -48,3 +48,3 @@ "publishConfig": {

},
"gitHead": "2f2fb26030b5f1328803b2bd7de171d66e088aff"
"gitHead": "2fbffbaee80b88302274266112f8ad9a241def33"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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