victory-brush-container 36.8.5-next.0 → 36.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,13 +1,10 @@
1
1
  # victory-brush-container
2
2
 
3
- ## 36.8.5-next.0
3
+ ## 36.8.5
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - c8c2eb2f5: Replace instances of lodash.assign with Object.assign
8
- - Updated dependencies [c8c2eb2f5]
9
- - Updated dependencies [0f3abe234]
10
- - victory-core@36.8.5-next.0
7
+ - Replace instances of lodash.assign with Object.assign ([#2757](https://github.com/FormidableLabs/victory/pull/2757))
11
8
 
12
9
  ## 36.8.4
13
10
 
@@ -6704,6 +6704,7 @@ __webpack_require__.r(__webpack_exports__);
6704
6704
  /* harmony export */ "modifyProps": () => (/* binding */ modifyProps),
6705
6705
  /* harmony export */ "omit": () => (/* binding */ omit),
6706
6706
  /* harmony export */ "radiansToDegrees": () => (/* binding */ radiansToDegrees),
6707
+ /* harmony export */ "range": () => (/* binding */ range),
6707
6708
  /* harmony export */ "reduceChildren": () => (/* binding */ reduceChildren),
6708
6709
  /* harmony export */ "scalePoint": () => (/* binding */ scalePoint)
6709
6710
  /* harmony export */ });
@@ -6983,6 +6984,38 @@ function getCurrentAxis(axis, horizontal) {
6983
6984
  var otherAxis = axis === "x" ? "y" : "x";
6984
6985
  return horizontal ? otherAxis : axis;
6985
6986
  }
6987
+ /**
6988
+ * Creates an array of numbers (positive and/or negative) progressing
6989
+ * from start up to, but not including, end.
6990
+ * A step of -1 is used if a negative start is specified without an end or step.
6991
+ * If end is not specified, it's set to start with start then set to 0.
6992
+ *
6993
+ * @param start The length of the array to create, or the start value
6994
+ * @param end [The end value] If this is defined, start is the start value
6995
+ * @returns An array of the given length
6996
+ */
6997
+
6998
+ function range(start, end, increment) {
6999
+ // when the end index is not given, start from 0
7000
+ var startIndex = end ? start : 0; // when the end index is not given, the end of the range is the start index
7001
+
7002
+ var endIndex = end ? end : start; // ensure endIndex is not a falsy value
7003
+
7004
+ if (!endIndex) endIndex = 0;
7005
+ var k = endIndex - startIndex; // the value range
7006
+
7007
+ var length = Math.abs(k); // the length of the range
7008
+
7009
+ var sign = k / length || 1; // the sign of the range (negative or positive)
7010
+
7011
+ var inc = increment || 1; // the step size of each increment
7012
+ // normalize the array length when dealing with floating point values
7013
+
7014
+ var arrayLength = Math.max(Math.ceil(length / inc), 0);
7015
+ return Array.from(Array(arrayLength), function (_, i) {
7016
+ return startIndex + i * sign * inc;
7017
+ });
7018
+ }
6986
7019
  /**
6987
7020
  * @param {Array} children: an array of child components
6988
7021
  * @param {Function} iteratee: a function with arguments "child", "childName", and "parent"
@@ -1,71 +1,71 @@
1
- /// <reference types="lodash" />
2
- export declare const BrushHelpers: {
3
- onMouseDown: (evt: any, targetProps: any) => {};
4
- onGlobalMouseUp: (evt: any, targetProps: any) => {};
5
- onGlobalMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {}>;
6
- getDimension(props: any): any;
7
- withinBounds(point: any, bounds: any, padding?: any): boolean;
8
- getDomainBox(props: any, fullDomain: any, selectedDomain?: any): {
9
- x1: number;
10
- x2: number;
11
- y1: number;
12
- y2: number;
13
- };
14
- getHandles(props: any, domainBox: any): {
15
- left: false | {
16
- x1: number;
17
- x2: number;
18
- y1: any;
19
- y2: any;
20
- };
21
- right: false | {
22
- x1: number;
23
- x2: number;
24
- y1: any;
25
- y2: any;
26
- };
27
- top: false | {
28
- x1: any;
29
- x2: any;
30
- y1: number;
31
- y2: number;
32
- };
33
- bottom: false | {
34
- x1: any;
35
- x2: any;
36
- y1: number;
37
- y2: number;
38
- };
39
- };
40
- getActiveHandles(point: any, props: any, domainBox: any): 0 | string[];
41
- getResizeMutation(box: any, handles: any): any;
42
- getMinimumDomain(): {
43
- x: number[];
44
- y: number[];
45
- };
46
- getDefaultBrushArea(targetProps: any, cachedDomain: any, evt: any): any;
47
- getSelectionMutation(point: any, box: any, brushDimension: any): {
48
- x1: any;
49
- y1: any;
50
- x2: any;
51
- y2: any;
52
- };
53
- panBox(props: any, point: any): {
54
- x1: number;
55
- x2: number;
56
- y1: number;
57
- y2: number;
58
- };
59
- constrainBox(box: any, fullDomainBox: any): {
60
- x1: number;
61
- y1: number;
62
- x2: number;
63
- y2: number;
64
- };
65
- constrainPoint(point: any, fullDomainBox: any): {
66
- x: number;
67
- y: number;
68
- };
69
- hasMoved(props: any): boolean;
70
- };
1
+ /// <reference types="lodash" />
2
+ export declare const BrushHelpers: {
3
+ onMouseDown: (evt: any, targetProps: any) => {};
4
+ onGlobalMouseUp: (evt: any, targetProps: any) => {};
5
+ onGlobalMouseMove: import("lodash").DebouncedFunc<(evt: any, targetProps: any) => {}>;
6
+ getDimension(props: any): any;
7
+ withinBounds(point: any, bounds: any, padding?: any): boolean;
8
+ getDomainBox(props: any, fullDomain: any, selectedDomain?: any): {
9
+ x1: number;
10
+ x2: number;
11
+ y1: number;
12
+ y2: number;
13
+ };
14
+ getHandles(props: any, domainBox: any): {
15
+ left: false | {
16
+ x1: number;
17
+ x2: number;
18
+ y1: any;
19
+ y2: any;
20
+ };
21
+ right: false | {
22
+ x1: number;
23
+ x2: number;
24
+ y1: any;
25
+ y2: any;
26
+ };
27
+ top: false | {
28
+ x1: any;
29
+ x2: any;
30
+ y1: number;
31
+ y2: number;
32
+ };
33
+ bottom: false | {
34
+ x1: any;
35
+ x2: any;
36
+ y1: number;
37
+ y2: number;
38
+ };
39
+ };
40
+ getActiveHandles(point: any, props: any, domainBox: any): 0 | string[];
41
+ getResizeMutation(box: any, handles: any): any;
42
+ getMinimumDomain(): {
43
+ x: number[];
44
+ y: number[];
45
+ };
46
+ getDefaultBrushArea(targetProps: any, cachedDomain: any, evt: any): any;
47
+ getSelectionMutation(point: any, box: any, brushDimension: any): {
48
+ x1: any;
49
+ y1: any;
50
+ x2: any;
51
+ y2: any;
52
+ };
53
+ panBox(props: any, point: any): {
54
+ x1: number;
55
+ x2: number;
56
+ y1: number;
57
+ y2: number;
58
+ };
59
+ constrainBox(box: any, fullDomainBox: any): {
60
+ x1: number;
61
+ y1: number;
62
+ x2: number;
63
+ y2: number;
64
+ };
65
+ constrainPoint(point: any, fullDomainBox: any): {
66
+ x: number;
67
+ y: number;
68
+ };
69
+ hasMoved(props: any): boolean;
70
+ };
71
71
  //# sourceMappingURL=brush-helpers.d.ts.map
package/es/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from "./victory-brush-container";
2
- export * from "./brush-helpers";
1
+ export * from "./victory-brush-container";
2
+ export * from "./brush-helpers";
3
3
  //# sourceMappingURL=index.d.ts.map