@tradingaction/core 2.0.12 → 2.0.15

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.
Files changed (57) hide show
  1. package/LICENSE +24 -24
  2. package/README.md +5 -5
  3. package/lib/CanvasContainer.d.ts +19 -19
  4. package/lib/CanvasContainer.js +27 -27
  5. package/lib/Chart.d.ts +32 -32
  6. package/lib/Chart.js +56 -56
  7. package/lib/Chart.js.map +1 -1
  8. package/lib/ChartCanvas.d.ts +235 -235
  9. package/lib/ChartCanvas.js +770 -770
  10. package/lib/ChartCanvas.js.map +1 -1
  11. package/lib/EventCapture.d.ts +131 -131
  12. package/lib/EventCapture.js +488 -488
  13. package/lib/GenericChartComponent.d.ts +21 -21
  14. package/lib/GenericChartComponent.js +74 -74
  15. package/lib/GenericComponent.d.ts +81 -81
  16. package/lib/GenericComponent.js +354 -354
  17. package/lib/GenericComponent.js.map +1 -1
  18. package/lib/MoreProps.d.ts +16 -16
  19. package/lib/MoreProps.js +1 -1
  20. package/lib/index.d.ts +7 -7
  21. package/lib/index.js +7 -7
  22. package/lib/useEvent.d.ts +1 -1
  23. package/lib/useEvent.js +12 -12
  24. package/lib/utils/ChartDataUtil.d.ts +49 -49
  25. package/lib/utils/ChartDataUtil.js +204 -204
  26. package/lib/utils/PureComponent.d.ts +4 -4
  27. package/lib/utils/PureComponent.js +9 -9
  28. package/lib/utils/accumulatingWindow.d.ts +15 -15
  29. package/lib/utils/accumulatingWindow.js +97 -97
  30. package/lib/utils/barWidth.d.ts +15 -15
  31. package/lib/utils/barWidth.js +26 -26
  32. package/lib/utils/closestItem.d.ts +5 -5
  33. package/lib/utils/closestItem.js +44 -44
  34. package/lib/utils/evaluator.d.ts +7 -7
  35. package/lib/utils/evaluator.js +93 -93
  36. package/lib/utils/identity.d.ts +1 -1
  37. package/lib/utils/identity.js +1 -1
  38. package/lib/utils/index.d.ts +46 -46
  39. package/lib/utils/index.js +125 -125
  40. package/lib/utils/noop.d.ts +1 -1
  41. package/lib/utils/noop.js +2 -2
  42. package/lib/utils/shallowEqual.d.ts +1 -1
  43. package/lib/utils/shallowEqual.js +21 -21
  44. package/lib/utils/slidingWindow.d.ts +19 -19
  45. package/lib/utils/slidingWindow.js +108 -108
  46. package/lib/utils/strokeDasharray.d.ts +3 -3
  47. package/lib/utils/strokeDasharray.js +36 -36
  48. package/lib/utils/zipper.d.ts +7 -7
  49. package/lib/utils/zipper.js +35 -35
  50. package/lib/zoom/index.d.ts +1 -1
  51. package/lib/zoom/index.js +1 -1
  52. package/lib/zoom/zoomBehavior.d.ts +10 -10
  53. package/lib/zoom/zoomBehavior.js +17 -17
  54. package/package.json +2 -2
  55. package/src/Chart.tsx +2 -2
  56. package/src/ChartCanvas.tsx +1 -1
  57. package/src/GenericComponent.tsx +1 -0
@@ -1,15 +1,15 @@
1
- import { ScaleContinuousNumeric, ScaleTime } from "d3-scale";
2
- /**
3
- * Bar width is based on the amount of items in the plot data and the distance between the first and last of those
4
- * items.
5
- * @param props the props passed to the series.
6
- * @param moreProps an object holding the xScale, xAccessor and plotData.
7
- * @return {number} the bar width.
8
- */
9
- export declare const plotDataLengthBarWidth: <T>(props: {
10
- widthRatio: number;
11
- }, moreProps: {
12
- xAccessor: (datum: T) => number | Date;
13
- xScale: ScaleContinuousNumeric<number, number> | ScaleTime<number, number>;
14
- plotData: T[];
15
- }) => number;
1
+ import { ScaleContinuousNumeric, ScaleTime } from "d3-scale";
2
+ /**
3
+ * Bar width is based on the amount of items in the plot data and the distance between the first and last of those
4
+ * items.
5
+ * @param props the props passed to the series.
6
+ * @param moreProps an object holding the xScale, xAccessor and plotData.
7
+ * @return {number} the bar width.
8
+ */
9
+ export declare const plotDataLengthBarWidth: <T>(props: {
10
+ widthRatio: number;
11
+ }, moreProps: {
12
+ xAccessor: (datum: T) => number | Date;
13
+ xScale: ScaleContinuousNumeric<number, number> | ScaleTime<number, number>;
14
+ plotData: T[];
15
+ }) => number;
@@ -1,27 +1,27 @@
1
- import { first, last } from ".";
2
- /**
3
- * Bar width is based on the amount of items in the plot data and the distance between the first and last of those
4
- * items.
5
- * @param props the props passed to the series.
6
- * @param moreProps an object holding the xScale, xAccessor and plotData.
7
- * @return {number} the bar width.
8
- */
9
- export const plotDataLengthBarWidth = (props, moreProps) => {
10
- const { widthRatio } = props;
11
- const { xAccessor, xScale, plotData } = moreProps;
12
- const [l, r] = xScale.range();
13
- if (xScale.invert != null) {
14
- const [dl, dr] = xScale.domain();
15
- if (typeof dl === "number" && typeof dr === "number") {
16
- const totalWidth = Math.abs(r - l);
17
- const width = totalWidth / Math.abs(dl - dr);
18
- return width * widthRatio;
19
- }
20
- const width = xScale(xAccessor(last(plotData))) - xScale(xAccessor(first(plotData)));
21
- return (width / plotData.length) * widthRatio * 0.7;
22
- }
23
- const totalWidth = Math.abs(r - l);
24
- const width = totalWidth / xScale.domain().length;
25
- return width * widthRatio;
26
- };
1
+ import { first, last } from ".";
2
+ /**
3
+ * Bar width is based on the amount of items in the plot data and the distance between the first and last of those
4
+ * items.
5
+ * @param props the props passed to the series.
6
+ * @param moreProps an object holding the xScale, xAccessor and plotData.
7
+ * @return {number} the bar width.
8
+ */
9
+ export const plotDataLengthBarWidth = (props, moreProps) => {
10
+ const { widthRatio } = props;
11
+ const { xAccessor, xScale, plotData } = moreProps;
12
+ const [l, r] = xScale.range();
13
+ if (xScale.invert != null) {
14
+ const [dl, dr] = xScale.domain();
15
+ if (typeof dl === "number" && typeof dr === "number") {
16
+ const totalWidth = Math.abs(r - l);
17
+ const width = totalWidth / Math.abs(dl - dr);
18
+ return width * widthRatio;
19
+ }
20
+ const width = xScale(xAccessor(last(plotData))) - xScale(xAccessor(first(plotData)));
21
+ return (width / plotData.length) * widthRatio * 0.7;
22
+ }
23
+ const totalWidth = Math.abs(r - l);
24
+ const width = totalWidth / xScale.domain().length;
25
+ return width * widthRatio;
26
+ };
27
27
  //# sourceMappingURL=barWidth.js.map
@@ -1,5 +1,5 @@
1
- export declare const getClosestItemIndexes: <T, TAccessor extends number | Date>(array: T[], value: TAccessor, accessor: (item: T) => TAccessor) => {
2
- left: number;
3
- right: number;
4
- };
5
- export declare const getClosestItem: <T, TAccessor extends number | Date>(array: T[], value: TAccessor, accessor: (item: T) => TAccessor) => T;
1
+ export declare const getClosestItemIndexes: <T, TAccessor extends number | Date>(array: T[], value: TAccessor, accessor: (item: T) => TAccessor) => {
2
+ left: number;
3
+ right: number;
4
+ };
5
+ export declare const getClosestItem: <T, TAccessor extends number | Date>(array: T[], value: TAccessor, accessor: (item: T) => TAccessor) => T;
@@ -1,45 +1,45 @@
1
- export const getClosestItemIndexes = (array, value, accessor) => {
2
- let lo = 0;
3
- let hi = array.length - 1;
4
- while (hi - lo > 1) {
5
- const mid = Math.round((lo + hi) / 2);
6
- const itemAtMid = array[mid];
7
- const valueAtMid = accessor(itemAtMid);
8
- if (valueAtMid <= value) {
9
- lo = mid;
10
- }
11
- else {
12
- hi = mid;
13
- }
14
- }
15
- const lowItemValue = accessor(array[lo]);
16
- const highItemValue = accessor(array[hi]);
17
- // for Date object === does not work, so using the <= in combination with >=
18
- // the same code works for both dates and numbers
19
- if ((lowItemValue === null || lowItemValue === void 0 ? void 0 : lowItemValue.valueOf()) === (value === null || value === void 0 ? void 0 : value.valueOf())) {
20
- hi = lo;
21
- }
22
- if ((highItemValue === null || highItemValue === void 0 ? void 0 : highItemValue.valueOf()) === (value === null || value === void 0 ? void 0 : value.valueOf())) {
23
- lo = hi;
24
- }
25
- if (lowItemValue < value && highItemValue < value) {
26
- lo = hi;
27
- }
28
- if (lowItemValue > value && highItemValue > value) {
29
- hi = lo;
30
- }
31
- return { left: lo, right: hi };
32
- };
33
- export const getClosestItem = (array, value, accessor) => {
34
- const { left, right } = getClosestItemIndexes(array, value, accessor);
35
- if (left === right) {
36
- return array[left];
37
- }
38
- const leftItem = accessor(array[left]);
39
- const rightItem = accessor(array[right]);
40
- const closest = Math.abs(leftItem.valueOf() - value.valueOf()) < Math.abs(rightItem.valueOf() - value.valueOf())
41
- ? array[left]
42
- : array[right];
43
- return closest;
44
- };
1
+ export const getClosestItemIndexes = (array, value, accessor) => {
2
+ let lo = 0;
3
+ let hi = array.length - 1;
4
+ while (hi - lo > 1) {
5
+ const mid = Math.round((lo + hi) / 2);
6
+ const itemAtMid = array[mid];
7
+ const valueAtMid = accessor(itemAtMid);
8
+ if (valueAtMid <= value) {
9
+ lo = mid;
10
+ }
11
+ else {
12
+ hi = mid;
13
+ }
14
+ }
15
+ const lowItemValue = accessor(array[lo]);
16
+ const highItemValue = accessor(array[hi]);
17
+ // for Date object === does not work, so using the <= in combination with >=
18
+ // the same code works for both dates and numbers
19
+ if ((lowItemValue === null || lowItemValue === void 0 ? void 0 : lowItemValue.valueOf()) === (value === null || value === void 0 ? void 0 : value.valueOf())) {
20
+ hi = lo;
21
+ }
22
+ if ((highItemValue === null || highItemValue === void 0 ? void 0 : highItemValue.valueOf()) === (value === null || value === void 0 ? void 0 : value.valueOf())) {
23
+ lo = hi;
24
+ }
25
+ if (lowItemValue < value && highItemValue < value) {
26
+ lo = hi;
27
+ }
28
+ if (lowItemValue > value && highItemValue > value) {
29
+ hi = lo;
30
+ }
31
+ return { left: lo, right: hi };
32
+ };
33
+ export const getClosestItem = (array, value, accessor) => {
34
+ const { left, right } = getClosestItemIndexes(array, value, accessor);
35
+ if (left === right) {
36
+ return array[left];
37
+ }
38
+ const leftItem = accessor(array[left]);
39
+ const rightItem = accessor(array[right]);
40
+ const closest = Math.abs(leftItem.valueOf() - value.valueOf()) < Math.abs(rightItem.valueOf() - value.valueOf())
41
+ ? array[left]
42
+ : array[right];
43
+ return closest;
44
+ };
45
45
  //# sourceMappingURL=closestItem.js.map
@@ -1,7 +1,7 @@
1
- import { ScaleContinuousNumeric, ScaleTime } from "d3-scale";
2
- export default function ({ xScale, useWholeData, clamp, pointsPerPxThreshold, minPointsPerPxThreshold, flipXScale, }: any): {
3
- filterData: <T>(data: T[], inputDomain: [number | Date, number | Date], xAccessor: (item: T) => number | Date, initialXScale: ScaleContinuousNumeric<number, number, never> | ScaleTime<number, number, never>, { currentPlotData, currentDomain, fallbackStart, fallbackEnd, ignoreThresholds }?: any) => {
4
- plotData: T[];
5
- domain: [number | Date, number | Date];
6
- };
7
- };
1
+ import { ScaleContinuousNumeric, ScaleTime } from "d3-scale";
2
+ export default function ({ xScale, useWholeData, clamp, pointsPerPxThreshold, minPointsPerPxThreshold, flipXScale, }: any): {
3
+ filterData: <T>(data: T[], inputDomain: [number | Date, number | Date], xAccessor: (item: T) => number | Date, initialXScale: ScaleContinuousNumeric<number, number, never> | ScaleTime<number, number, never>, { currentPlotData, currentDomain, fallbackStart, fallbackEnd, ignoreThresholds }?: any) => {
4
+ plotData: T[];
5
+ domain: [number | Date, number | Date];
6
+ };
7
+ };
@@ -1,94 +1,94 @@
1
- import { max, min } from "d3-array";
2
- import { getClosestItemIndexes, head, isDefined, isNotDefined, last } from "../utils";
3
- function getNewEnd(fallbackEnd, xAccessor, initialXScale, start) {
4
- const { lastItem, lastItemX } = fallbackEnd;
5
- const lastItemXValue = xAccessor(lastItem);
6
- const [rangeStart, rangeEnd] = initialXScale.range();
7
- const newEnd = ((rangeEnd - rangeStart) / (lastItemX.valueOf() - rangeStart)) * (lastItemXValue.valueOf() - start.valueOf()) +
8
- start.valueOf();
9
- return newEnd;
10
- }
11
- function extentsWrapper(useWholeData, clamp, pointsPerPxThreshold, minPointsPerPxThreshold, flipXScale) {
12
- function filterData(data, inputDomain, xAccessor, initialXScale, { currentPlotData, currentDomain, fallbackStart, fallbackEnd, ignoreThresholds = false } = {}) {
13
- if (useWholeData) {
14
- return { plotData: data, domain: inputDomain };
15
- }
16
- let left = head(inputDomain);
17
- let right = last(inputDomain);
18
- let clampedDomain = inputDomain;
19
- let filteredData = getFilteredResponse(data, left, right, xAccessor);
20
- if (filteredData.length === 1 && fallbackStart !== undefined) {
21
- left = fallbackStart;
22
- right = getNewEnd(fallbackEnd, xAccessor, initialXScale, left);
23
- clampedDomain = [left, right];
24
- filteredData = getFilteredResponse(data, left, right, xAccessor);
25
- }
26
- if (typeof clamp === "function") {
27
- clampedDomain = clamp(clampedDomain, [xAccessor(head(data)), xAccessor(last(data))]);
28
- }
29
- else {
30
- if (clamp === "left" || clamp === "both" || clamp === true) {
31
- clampedDomain = [max([left, xAccessor(head(data))]), clampedDomain[1]];
32
- }
33
- if (clamp === "right" || clamp === "both" || clamp === true) {
34
- clampedDomain = [clampedDomain[0], min([right, xAccessor(last(data))])];
35
- }
36
- }
37
- if (clampedDomain !== inputDomain) {
38
- filteredData = getFilteredResponse(data, clampedDomain[0], clampedDomain[1], xAccessor);
39
- }
40
- const realInputDomain = clampedDomain;
41
- const xScale = initialXScale.copy().domain(realInputDomain);
42
- let width = Math.floor(xScale(xAccessor(last(filteredData))) - xScale(xAccessor(head(filteredData))));
43
- // prevent negative width when flipXScale
44
- if (flipXScale && width < 0) {
45
- width = width * -1;
46
- }
47
- let plotData;
48
- let domain;
49
- const chartWidth = last(xScale.range()) - head(xScale.range());
50
- if ((ignoreThresholds && filteredData.length > 1) ||
51
- canShowTheseManyPeriods(width, filteredData.length, pointsPerPxThreshold, minPointsPerPxThreshold)) {
52
- plotData = filteredData;
53
- domain = realInputDomain;
54
- }
55
- else {
56
- if (chartWidth > showMaxThreshold(width, pointsPerPxThreshold) && isDefined(fallbackEnd)) {
57
- plotData = filteredData;
58
- const newEnd = getNewEnd(fallbackEnd, xAccessor, initialXScale, head(realInputDomain));
59
- domain = [head(realInputDomain), newEnd];
60
- }
61
- else {
62
- plotData =
63
- currentPlotData !== null && currentPlotData !== void 0 ? currentPlotData : filteredData.slice(filteredData.length - showMax(width, pointsPerPxThreshold));
64
- domain = currentDomain !== null && currentDomain !== void 0 ? currentDomain : [xAccessor(head(plotData)), xAccessor(last(plotData))];
65
- }
66
- }
67
- return { plotData, domain };
68
- }
69
- return { filterData };
70
- }
71
- function canShowTheseManyPeriods(width, arrayLength, maxThreshold, minThreshold) {
72
- const widthAdjustedMinThreshold = showMinThreshold(width, minThreshold);
73
- const widthAdjustedMaxTheshold = showMaxThreshold(width, maxThreshold);
74
- return arrayLength >= widthAdjustedMinThreshold && arrayLength < widthAdjustedMaxTheshold;
75
- }
76
- function showMinThreshold(width, threshold) {
77
- return Math.max(1, Math.ceil(width * threshold));
78
- }
79
- function showMaxThreshold(width, threshold) {
80
- return Math.floor(width * threshold);
81
- }
82
- function showMax(width, threshold) {
83
- return Math.floor(showMaxThreshold(width, threshold) * 0.97);
84
- }
85
- function getFilteredResponse(data, left, right, xAccessor) {
86
- const newLeftIndex = getClosestItemIndexes(data, left, xAccessor).left;
87
- const newRightIndex = getClosestItemIndexes(data, right, xAccessor).right;
88
- const filteredData = data.slice(newLeftIndex, newRightIndex + 1);
89
- return filteredData;
90
- }
91
- export default function ({ xScale, useWholeData, clamp, pointsPerPxThreshold, minPointsPerPxThreshold, flipXScale, }) {
92
- return extentsWrapper(useWholeData || isNotDefined(xScale.invert), clamp, pointsPerPxThreshold, minPointsPerPxThreshold, flipXScale);
93
- }
1
+ import { max, min } from "d3-array";
2
+ import { getClosestItemIndexes, head, isDefined, isNotDefined, last } from "../utils";
3
+ function getNewEnd(fallbackEnd, xAccessor, initialXScale, start) {
4
+ const { lastItem, lastItemX } = fallbackEnd;
5
+ const lastItemXValue = xAccessor(lastItem);
6
+ const [rangeStart, rangeEnd] = initialXScale.range();
7
+ const newEnd = ((rangeEnd - rangeStart) / (lastItemX.valueOf() - rangeStart)) * (lastItemXValue.valueOf() - start.valueOf()) +
8
+ start.valueOf();
9
+ return newEnd;
10
+ }
11
+ function extentsWrapper(useWholeData, clamp, pointsPerPxThreshold, minPointsPerPxThreshold, flipXScale) {
12
+ function filterData(data, inputDomain, xAccessor, initialXScale, { currentPlotData, currentDomain, fallbackStart, fallbackEnd, ignoreThresholds = false } = {}) {
13
+ if (useWholeData) {
14
+ return { plotData: data, domain: inputDomain };
15
+ }
16
+ let left = head(inputDomain);
17
+ let right = last(inputDomain);
18
+ let clampedDomain = inputDomain;
19
+ let filteredData = getFilteredResponse(data, left, right, xAccessor);
20
+ if (filteredData.length === 1 && fallbackStart !== undefined) {
21
+ left = fallbackStart;
22
+ right = getNewEnd(fallbackEnd, xAccessor, initialXScale, left);
23
+ clampedDomain = [left, right];
24
+ filteredData = getFilteredResponse(data, left, right, xAccessor);
25
+ }
26
+ if (typeof clamp === "function") {
27
+ clampedDomain = clamp(clampedDomain, [xAccessor(head(data)), xAccessor(last(data))]);
28
+ }
29
+ else {
30
+ if (clamp === "left" || clamp === "both" || clamp === true) {
31
+ clampedDomain = [max([left, xAccessor(head(data))]), clampedDomain[1]];
32
+ }
33
+ if (clamp === "right" || clamp === "both" || clamp === true) {
34
+ clampedDomain = [clampedDomain[0], min([right, xAccessor(last(data))])];
35
+ }
36
+ }
37
+ if (clampedDomain !== inputDomain) {
38
+ filteredData = getFilteredResponse(data, clampedDomain[0], clampedDomain[1], xAccessor);
39
+ }
40
+ const realInputDomain = clampedDomain;
41
+ const xScale = initialXScale.copy().domain(realInputDomain);
42
+ let width = Math.floor(xScale(xAccessor(last(filteredData))) - xScale(xAccessor(head(filteredData))));
43
+ // prevent negative width when flipXScale
44
+ if (flipXScale && width < 0) {
45
+ width = width * -1;
46
+ }
47
+ let plotData;
48
+ let domain;
49
+ const chartWidth = last(xScale.range()) - head(xScale.range());
50
+ if ((ignoreThresholds && filteredData.length > 1) ||
51
+ canShowTheseManyPeriods(width, filteredData.length, pointsPerPxThreshold, minPointsPerPxThreshold)) {
52
+ plotData = filteredData;
53
+ domain = realInputDomain;
54
+ }
55
+ else {
56
+ if (chartWidth > showMaxThreshold(width, pointsPerPxThreshold) && isDefined(fallbackEnd)) {
57
+ plotData = filteredData;
58
+ const newEnd = getNewEnd(fallbackEnd, xAccessor, initialXScale, head(realInputDomain));
59
+ domain = [head(realInputDomain), newEnd];
60
+ }
61
+ else {
62
+ plotData =
63
+ currentPlotData !== null && currentPlotData !== void 0 ? currentPlotData : filteredData.slice(filteredData.length - showMax(width, pointsPerPxThreshold));
64
+ domain = currentDomain !== null && currentDomain !== void 0 ? currentDomain : [xAccessor(head(plotData)), xAccessor(last(plotData))];
65
+ }
66
+ }
67
+ return { plotData, domain };
68
+ }
69
+ return { filterData };
70
+ }
71
+ function canShowTheseManyPeriods(width, arrayLength, maxThreshold, minThreshold) {
72
+ const widthAdjustedMinThreshold = showMinThreshold(width, minThreshold);
73
+ const widthAdjustedMaxTheshold = showMaxThreshold(width, maxThreshold);
74
+ return arrayLength >= widthAdjustedMinThreshold && arrayLength < widthAdjustedMaxTheshold;
75
+ }
76
+ function showMinThreshold(width, threshold) {
77
+ return Math.max(1, Math.ceil(width * threshold));
78
+ }
79
+ function showMaxThreshold(width, threshold) {
80
+ return Math.floor(width * threshold);
81
+ }
82
+ function showMax(width, threshold) {
83
+ return Math.floor(showMaxThreshold(width, threshold) * 0.97);
84
+ }
85
+ function getFilteredResponse(data, left, right, xAccessor) {
86
+ const newLeftIndex = getClosestItemIndexes(data, left, xAccessor).left;
87
+ const newRightIndex = getClosestItemIndexes(data, right, xAccessor).right;
88
+ const filteredData = data.slice(newLeftIndex, newRightIndex + 1);
89
+ return filteredData;
90
+ }
91
+ export default function ({ xScale, useWholeData, clamp, pointsPerPxThreshold, minPointsPerPxThreshold, flipXScale, }) {
92
+ return extentsWrapper(useWholeData || isNotDefined(xScale.invert), clamp, pointsPerPxThreshold, minPointsPerPxThreshold, flipXScale);
93
+ }
94
94
  //# sourceMappingURL=evaluator.js.map
@@ -1 +1 @@
1
- export declare const identity: (d: any) => any;
1
+ export declare const identity: (d: any) => any;
@@ -1,2 +1,2 @@
1
- export const identity = (d) => d;
1
+ export const identity = (d) => d;
2
2
  //# sourceMappingURL=identity.js.map
@@ -1,46 +1,46 @@
1
- import React from "react";
2
- export { default as zipper } from "./zipper";
3
- export { default as slidingWindow } from "./slidingWindow";
4
- export * from "./closestItem";
5
- export * from "./identity";
6
- export * from "./noop";
7
- export * from "./shallowEqual";
8
- export { default as accumulatingWindow } from "./accumulatingWindow";
9
- export * from "./barWidth";
10
- export * from "./strokeDasharray";
11
- export * from "./PureComponent";
12
- export declare const sign: (x: any) => number;
13
- export declare const path: (loc?: never[]) => (obj: any, defaultValue?: any) => any;
14
- export declare const functor: (v: any) => any;
15
- export declare function getClosestValue(inputValue: any, currentValue: any): any;
16
- export declare function d3Window(node: any): any;
17
- export declare const MOUSEENTER = "mouseenter.interaction";
18
- export declare const MOUSELEAVE = "mouseleave.interaction";
19
- export declare const MOUSEMOVE = "mousemove.pan";
20
- export declare const MOUSEUP = "mouseup.pan";
21
- export declare const TOUCHMOVE = "touchmove.pan";
22
- export declare const TOUCHEND = "touchend.pan touchcancel.pan";
23
- export declare function getTouchProps(touch: any): {
24
- pageX: any;
25
- pageY: any;
26
- clientX: any;
27
- clientY: any;
28
- };
29
- export declare function head(array: any[], accessor?: any): any;
30
- export declare const first: typeof head;
31
- export declare function last(array: any[], accessor?: any): any;
32
- export declare const isDefined: <T>(d: T) => d is NonNullable<T>;
33
- export declare function isNotDefined<T>(d: T): boolean;
34
- export declare function isObject(d: any): boolean;
35
- export declare function touchPosition(touch: {
36
- clientX: number;
37
- clientY: number;
38
- }, e: React.TouchEvent): [number, number];
39
- export declare function mousePosition(e: React.MouseEvent, defaultRect?: {
40
- height: number;
41
- width: number;
42
- left: number;
43
- top: number;
44
- }): [number, number];
45
- export declare function clearCanvas(canvasList: CanvasRenderingContext2D[], ratio: number): void;
46
- export declare function mapObject(object?: {}, iteratee?: (x: any) => any): any[];
1
+ import React from "react";
2
+ export { default as zipper } from "./zipper";
3
+ export { default as slidingWindow } from "./slidingWindow";
4
+ export * from "./closestItem";
5
+ export * from "./identity";
6
+ export * from "./noop";
7
+ export * from "./shallowEqual";
8
+ export { default as accumulatingWindow } from "./accumulatingWindow";
9
+ export * from "./barWidth";
10
+ export * from "./strokeDasharray";
11
+ export * from "./PureComponent";
12
+ export declare const sign: (x: any) => number;
13
+ export declare const path: (loc?: never[]) => (obj: any, defaultValue?: any) => any;
14
+ export declare const functor: (v: any) => any;
15
+ export declare function getClosestValue(inputValue: any, currentValue: any): any;
16
+ export declare function d3Window(node: any): any;
17
+ export declare const MOUSEENTER = "mouseenter.interaction";
18
+ export declare const MOUSELEAVE = "mouseleave.interaction";
19
+ export declare const MOUSEMOVE = "mousemove.pan";
20
+ export declare const MOUSEUP = "mouseup.pan";
21
+ export declare const TOUCHMOVE = "touchmove.pan";
22
+ export declare const TOUCHEND = "touchend.pan touchcancel.pan";
23
+ export declare function getTouchProps(touch: any): {
24
+ pageX: any;
25
+ pageY: any;
26
+ clientX: any;
27
+ clientY: any;
28
+ };
29
+ export declare function head(array: any[], accessor?: any): any;
30
+ export declare const first: typeof head;
31
+ export declare function last(array: any[], accessor?: any): any;
32
+ export declare const isDefined: <T>(d: T) => d is NonNullable<T>;
33
+ export declare function isNotDefined<T>(d: T): boolean;
34
+ export declare function isObject(d: any): boolean;
35
+ export declare function touchPosition(touch: {
36
+ clientX: number;
37
+ clientY: number;
38
+ }, e: React.TouchEvent): [number, number];
39
+ export declare function mousePosition(e: React.MouseEvent, defaultRect?: {
40
+ height: number;
41
+ width: number;
42
+ left: number;
43
+ top: number;
44
+ }): [number, number];
45
+ export declare function clearCanvas(canvasList: CanvasRenderingContext2D[], ratio: number): void;
46
+ export declare function mapObject(object?: {}, iteratee?: (x: any) => any): any[];